ZIMA CAD Parts
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
navbarpage.h
Go to the documentation of this file.
1 #ifndef NAVBARPAGE_H
2 #define NAVBARPAGE_H
3 
4 #include <QAction>
5 #include <QToolButton>
6 
7 struct NavBarPage
8 {
9  QToolButton *button;
10  QAction *action;
11 
12  inline void setText(const QString &text) { action->setText(text); }
13  inline void setIcon(const QIcon &icon) { action->setIcon(icon); }
14  inline void setName(const QString &name) { action->setObjectName(name); }
15  inline void setEnabled(bool enabled) { action->setEnabled(enabled); }
16  inline void setVisible(bool visible) { action->setVisible(visible);
17  button->setVisible(visible); }
18  inline QString text() const { return action->text(); }
19  inline QIcon icon() const { return action->icon(); }
20  inline QString name() const { return action->objectName(); }
21  inline bool isEnabled() const { return action->isEnabled(); }
22  inline bool isVisible() const { return action->isVisible(); }
23 };
24 
25 QList<NavBarPage> sortNavBarPageList(const QList<NavBarPage> &pages, const QStringList &order);
26 
27 #endif // NAVBARPAGE_H
void setName(const QString &name)
Definition: navbarpage.h:14
QToolButton * button
Definition: navbarpage.h:9
void setEnabled(bool enabled)
Definition: navbarpage.h:15
QIcon icon() const
Definition: navbarpage.h:19
bool isEnabled() const
Definition: navbarpage.h:21
QString text() const
Definition: navbarpage.h:18
Definition: navbarpage.h:7
void setVisible(bool visible)
Definition: navbarpage.h:16
bool isVisible() const
Definition: navbarpage.h:22
QString name() const
Definition: navbarpage.h:20
void setIcon(const QIcon &icon)
Definition: navbarpage.h:13
void setText(const QString &text)
Definition: navbarpage.h:12
QAction * action
Definition: navbarpage.h:10