QtNovelUI/WordsIDE/presentcontainer.h

34 lines
948 B
C
Raw Normal View History

2023-03-17 13:58:38 +00:00
#ifndef PRESENTHOSTX_H
#define PRESENTHOSTX_H
#include "manager_docs.h"
#include <QTabWidget>
namespace Components {
enum GroupType { LEFT = 0, RIGHT = 1, BOTTOM = 2, CENTER = 3 };
class PresentContainer : public QTabWidget, public PresentHost {
Q_OBJECT
2023-08-15 14:40:40 +00:00
public:
PresentContainer(QTabWidget::TabPosition pos, 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-15 14:40:40 +00:00
virtual void append(MakeTools::PresentBase *ins) override;
virtual bool active(const MakeTools::PresentBase *ins) override;
virtual void remove(const MakeTools::PresentBase *ins) override;
virtual bool contains(const MakeTools::PresentBase *ins) const override;
2023-03-17 13:58:38 +00:00
2023-08-15 14:40:40 +00:00
private:
QList<const MakeTools::PresentBase *> items_store;
2023-03-17 13:58:38 +00:00
void accept_close_action(int index);
};
} // namespace Components
#endif // PRESENTHOSTX_H