QtNovelUI/WordsIDE/presentcontainer.h

44 lines
1.2 KiB
C++

#ifndef PRESENTHOSTX_H
#define PRESENTHOSTX_H
#include "manager_docs.h"
#include <QPushButton>
#include <QStackedWidget>
#include <splitpanel.h>
namespace Components {
class WelcomePanel;
/**
* @brief 文档视图容器
*/
class PresentContainer : public SplitFrame::FnWrap<PresentContainer, true>, public PresentHost {
Q_OBJECT
public:
PresentContainer(SplitFrame::ViewPresent *host, QWidget *parent = nullptr);
// PresentContainer interface
public:
virtual QWidget *hostWidget() const override;
virtual void append(PresentBase *ins) override;
virtual bool active(const PresentBase *ins) override;
virtual void remove(const PresentBase *ins) override;
virtual bool contains(const PresentBase *ins) const override;
private:
QList<const PresentBase *> items_store;
QComboBox *const title_store;
QStackedWidget *const stack_container;
Components::WelcomePanel *const welcome_list;
QPushButton *const close_btn;
void change_view(int view_index);
void close_current_view();
};
} // namespace Components
#endif // PRESENTHOSTX_H