QtNovelUI/WordsIDE/presentcontainerview.h

50 lines
1.4 KiB
C
Raw Permalink Normal View History

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>
#include <QStackedLayout>
2023-08-27 14:09:46 +00:00
#include <QStackedWidget>
2023-12-30 05:04:51 +00:00
#include <splitwindow.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-12-30 05:04:51 +00:00
PresentContainerView(SplitFrame::SplitPanel *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;
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:
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