Fabcoin Core  0.16.2
P2P Digital Currency
navigationbar.h
Go to the documentation of this file.
1 #ifndef NAVIGATIONBAR_H
2 #define NAVIGATIONBAR_H
3 
4 #include <QWidget>
5 #include <QAction>
6 #include <QList>
7 #include <QMap>
8 #include <QSize>
9 
13 class NavigationBar : public QWidget
14 {
15  Q_OBJECT
16 public:
21  explicit NavigationBar(QWidget *parent = 0);
22 
27  void addAction(QAction *action);
28 
36  QAction *addGroup(QList<QAction*> list, const QIcon &icon, const QString &text);
37 
44  QAction *addGroup(QList<QAction*> list, const QString &text);
45 
51  void mapGroup(QAction* action, QList<QAction*> list);
52 
56  void buildUi();
57 
58 Q_SIGNALS:
62  void resized(const QSize&);
63 
64 public Q_SLOTS:
68  void onSubBarClick(bool);
69 
74  void setToolButtonStyle(Qt::ToolButtonStyle toolButtonStyle);
75 
76 protected:
77  void resizeEvent(QResizeEvent * evt);
78 
79 private:
80 
85  void setSubBar(bool subBar);
86 
87  QList<QAction*> m_actions;
88  QMap<QAction*, QList<QAction*>> m_groups;
89  Qt::ToolButtonStyle m_toolStyle;
90  bool m_subBar;
91  bool m_built;
92 };
93 
94 #endif // NAVIGATIONBAR_H
95 
Qt::ToolButtonStyle m_toolStyle
Definition: navigationbar.h:89
QList< QAction * > m_actions
Definition: navigationbar.h:87
void setToolButtonStyle(Qt::ToolButtonStyle toolButtonStyle)
setToolButtonStyle Set the style for the tool buttons
void resized(const QSize &)
resized Signal that the size is changed
void buildUi()
buildUi Construct the layout of the composite GUI control
void addAction(QAction *action)
addAction Add action to the navigation bar
void setSubBar(bool subBar)
setSubBar Set the component be sub-navigation bar
void onSubBarClick(bool)
onSubBarClick Activate the sub-navigation bar
QMap< QAction *, QList< QAction * > > m_groups
Definition: navigationbar.h:88
The NavigationBar class Custom control for navigation bar.
Definition: navigationbar.h:13
void mapGroup(QAction *action, QList< QAction * > list)
mapGroup Map the action with group
QAction * addGroup(QList< QAction * > list, const QIcon &icon, const QString &text)
addGroup Add group of actions
NavigationBar(QWidget *parent=0)
NavigationBar Constructor.
void resizeEvent(QResizeEvent *evt)