FixedTabWidget.hpp
1 #pragma once
2 #include <score/plugins/panel/PanelDelegate.hpp>
3 #include <score/widgets/MarginLess.hpp>
4 
5 #include <QMenuView/qmenuview.h>
6 #include <QStackedWidget>
7 #include <QVBoxLayout>
8 #include <QWidget>
9 
10 #include <verdigris>
11 
12 class QToolBar;
13 class QActionGroup;
14 namespace score
15 {
16 
17 class FixedTabWidget : public QWidget
18 {
19  W_OBJECT(FixedTabWidget)
20 public:
21  FixedTabWidget() noexcept;
22 
23  QActionGroup* actionGroup() const noexcept;
24  QToolBar* toolbar() const noexcept;
25 
26  QSize sizeHint() const override;
27  void setTab(int index);
28  std::pair<int, QAction*> addTab(QWidget* widg, const score::PanelStatus& v);
29  QAction* addAction(QWidget* widg, const PanelStatus& v);
30  QAction* addAction(QAction* act);
31 
32  QBrush brush;
33  void paintEvent(QPaintEvent* ev) override;
34  void actionTriggered(QAction* act, bool b) W_SIGNAL(actionTriggered, act, b)
35 
36 private:
38  QToolBar* m_buttons{};
39  QStackedWidget m_stack;
40  QActionGroup* m_actGrp{};
41 };
42 }
Definition: FixedTabWidget.hpp:18
Base toolkit upon which the software is built.
Definition: Application.cpp:90
The PanelStatus struct.
Definition: PanelDelegate.hpp:24