2023-03-17 13:58:38 +00:00
|
|
|
#ifndef PRESENTHOSTX_H
|
|
|
|
#define PRESENTHOSTX_H
|
|
|
|
|
|
|
|
#include "manager_docs.h"
|
2023-08-27 14:09:46 +00:00
|
|
|
#include <QPushButton>
|
|
|
|
#include <QStackedWidget>
|
|
|
|
#include <splitpanel.h>
|
2023-03-17 13:58:38 +00:00
|
|
|
|
|
|
|
namespace Components {
|
2023-08-27 14:09:46 +00:00
|
|
|
class WelcomePanel;
|
2023-03-17 13:58:38 +00:00
|
|
|
|
2023-08-27 14:09:46 +00:00
|
|
|
/**
|
|
|
|
* @brief 文档视图容器
|
|
|
|
*/
|
|
|
|
class PresentContainer : public SplitFrame::FnWrap<PresentContainer, true>, public PresentHost {
|
2023-03-17 13:58:38 +00:00
|
|
|
Q_OBJECT
|
2023-08-15 14:40:40 +00:00
|
|
|
public:
|
2023-08-27 14:09:46 +00:00
|
|
|
PresentContainer(SplitFrame::ViewPresent *host, QWidget *parent = nullptr);
|
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 03:52:56 +00:00
|
|
|
virtual void append(FilePresent *ins) override;
|
|
|
|
virtual bool active(const FilePresent *ins) override;
|
|
|
|
virtual void remove(const FilePresent *ins) override;
|
|
|
|
virtual bool contains(const FilePresent *ins) const override;
|
|
|
|
virtual bool avaliable(FilePresent *vins) override;
|
2023-03-17 13:58:38 +00:00
|
|
|
|
2023-08-15 14:40:40 +00:00
|
|
|
private:
|
2023-08-29 03:52:56 +00:00
|
|
|
QList<const FilePresent *> items_store;
|
2023-08-27 14:09:46 +00:00
|
|
|
QComboBox *const title_store;
|
|
|
|
QStackedWidget *const stack_container;
|
|
|
|
|
|
|
|
Components::WelcomePanel *const welcome_list;
|
|
|
|
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
|
|
|
|
|
|
|
|
#endif // PRESENTHOSTX_H
|