QtNovelUI/WordsIDE/viewstackedbar.h

26 lines
744 B
C
Raw Normal View History

2023-08-27 14:09:46 +00:00
#ifndef VIEWSTACKEDBAR_H
#define VIEWSTACKEDBAR_H
#include <QHash>
#include <QToolBar>
2023-12-30 05:04:51 +00:00
#include <splitwindow.h>
2023-08-27 14:09:46 +00:00
namespace Components {
class ViewStackedBar : public QToolBar, public SplitFrame::FreedomViewsListener {
public:
2023-12-30 05:04:51 +00:00
ViewStackedBar(SplitFrame::SplitPanel *host, QWidget *parent = nullptr);
2023-08-27 14:09:46 +00:00
// FreedomViewsListener interface
public:
virtual void freedomAppended(SplitFrame::RectCom *ins, const QIcon &icon, const QString &title) override;
virtual void freedomRemoved(SplitFrame::RectCom *ins) override;
private:
2023-12-30 05:04:51 +00:00
SplitFrame::SplitPanel *const host_ptr;
2023-08-27 14:09:46 +00:00
QHash<SplitFrame::RectCom *, QAction *> freedom_views;
};
} // namespace Components
#endif // VIEWSTACKEDBAR_H