2023-08-29 04:31:29 +00:00
|
|
|
#ifndef PRESENTCONTAINERVIEW_H
|
|
|
|
#define PRESENTCONTAINERVIEW_H
|
2023-03-17 13:58:38 +00:00
|
|
|
|
|
|
|
#include "manager_docs.h"
|
2023-12-24 04:49:58 +00:00
|
|
|
#include <QComboBox>
|
2023-08-27 14:09:46 +00:00
|
|
|
#include <QPushButton>
|
2023-09-04 14:35:14 +00:00
|
|
|
#include <QStackedLayout>
|
2023-08-27 14:09:46 +00:00
|
|
|
#include <QStackedWidget>
|
|
|
|
#include <splitpanel.h>
|
2023-03-17 13:58:38 +00:00
|
|
|
|
2023-08-29 04:31:29 +00:00
|
|
|
namespace Presents {
|
2023-08-27 14:09:46 +00:00
|
|
|
class WelcomePanel;
|
2023-08-29 04:31:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace Components {
|
2023-03-17 13:58:38 +00:00
|
|
|
|
2023-08-27 14:09:46 +00:00
|
|
|
/**
|
|
|
|
* @brief 文档视图容器
|
|
|
|
*/
|
2023-08-29 04:31:29 +00:00
|
|
|
class PresentContainerView : public SplitFrame::FnWrap<PresentContainerView, true>, public Presents::PresentHost {
|
2023-03-17 13:58:38 +00:00
|
|
|
Q_OBJECT
|
2023-08-15 14:40:40 +00:00
|
|
|
public:
|
2023-08-31 15:33:45 +00:00
|
|
|
PresentContainerView(SplitFrame::ViewPresent *host);
|
2023-03-17 13:58:38 +00:00
|
|
|
|
|
|
|
// PresentContainer interface
|
2023-08-15 14:40:40 +00:00
|
|
|
public:
|
2023-03-17 13:58:38 +00:00
|
|
|
virtual QWidget *hostWidget() const override;
|
|
|
|
|
2023-08-29 04:18:41 +00:00
|
|
|
virtual void append(Presents::FilePresent *ins) override;
|
|
|
|
virtual bool active(const Presents::FilePresent *ins) override;
|
|
|
|
virtual void remove(const Presents::FilePresent *ins) override;
|
|
|
|
virtual bool contains(const Presents::FilePresent *ins) const override;
|
|
|
|
virtual bool avaliable(Presents::FilePresent *vins) override;
|
2023-03-17 13:58:38 +00:00
|
|
|
|
2023-08-15 14:40:40 +00:00
|
|
|
private:
|
2023-08-29 04:18:41 +00:00
|
|
|
QList<const Presents::FilePresent *> items_store;
|
2023-08-27 14:09:46 +00:00
|
|
|
QComboBox *const title_store;
|
|
|
|
QStackedWidget *const stack_container;
|
|
|
|
|
2023-08-29 04:31:29 +00:00
|
|
|
Presents::WelcomePanel *const welcome_list;
|
2023-08-27 14:09:46 +00:00
|
|
|
QPushButton *const close_btn;
|
2023-03-17 13:58:38 +00:00
|
|
|
|
2023-08-27 14:09:46 +00:00
|
|
|
void change_view(int view_index);
|
|
|
|
void close_current_view();
|
2023-03-17 13:58:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Components
|
|
|
|
|
2023-08-29 04:31:29 +00:00
|
|
|
#endif // PRESENTCONTAINERVIEW_H
|