Isis 3 Programmer Reference
ToolPad.h
1 #ifndef Qisis_ToolPad_h
2 #define Qisis_ToolPad_h
3 
4 #include <QToolBar>
5 #include <QActionGroup>
6 
7 namespace Isis {
14  class ToolPad : public QToolBar {
15  Q_OBJECT
16 
17  public:
25  ToolPad(const QString &label, QWidget *parent) : QToolBar(label, parent) {
26  p_actionGroup = new QActionGroup(parent);
27  p_actionGroup->setExclusive(true);
28  setIconSize(QSize(22, 22));
29  }
30 
31 
38  void addAction(QAction *action) {
39  action->setCheckable(true);
40  p_actionGroup->addAction(action);
41  QToolBar::addAction(action);
42  }
43 
44  private:
45  QActionGroup *p_actionGroup;
46  };
47 };
48 
49 #endif
void addAction(QAction *action)
Adds an action to the action group and tool bar.
Definition: ToolPad.h:38
ToolPad(const QString &label, QWidget *parent)
Toolpad constructor.
Definition: ToolPad.h:25
QActionGroup * p_actionGroup
Group of actions.
Definition: ToolPad.h:45
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31