Isis Developer Reference
ToolPad.h
Go to the documentation of this file.
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
QWidget
QToolBar
Isis::ToolPad
Definition: ToolPad.h:14
Isis::ToolPad::addAction
void addAction(QAction *action)
Adds an action to the action group and tool bar.
Definition: ToolPad.h:38
QAction
Isis::ToolPad::ToolPad
ToolPad(const QString &label, QWidget *parent)
Toolpad constructor.
Definition: ToolPad.h:25
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16