Isis 3 Developer Reference
TabBar.h
Go to the documentation of this file.
1 #ifndef TabBar_H
2 #define TabBar_H
3 
26 // QToolBar is the parent of this class, and should be the ONLY include
27 // in this file. Do not add any other includes to this header file!
28 #include <QToolBar>
29 
30 class QWidget;
31 template< class A > class QVector;
32 
33 namespace Isis
34 {
35  class Tab;
36 
53  class TabBar : public QToolBar
54  {
55  Q_OBJECT
56 
57  public:
58  TabBar();
59  virtual ~TabBar();
60 
61  virtual void addTab(Tab * newTab);
62  int curSelectedTab() const;
63  void setRadioStyle(const bool & radioStyle);
64  bool radioStyle();
65  int size() const;
66 
67  void setSelected(const int & index, const bool & status);
68  bool isSelected(const int & index);
69  bool noneSelected();
70  void setEnabled(bool);
71 
72 
73  private slots:
74  void tabClicked(const int & index);
75 
76 
77  private:
78  // functions
79  bool noOthersInGrpSelected(const int & index) const;
80  void deselectOthersInGrp(const int & index);
81 
82 
83  private:
84  // data
85  QVector< Tab * > * tabs;
86  bool radioStyleTabs;
87  };
88 }
89 
90 #endif
bool radioStyle()
Definition: TabBar.cpp:75
virtual ~TabBar()
destruct a TabBar
Definition: TabBar.cpp:28
void setSelected(const int &index, const bool &status)
Sets whether the Tab at the specified index is selected or not.
Definition: TabBar.cpp:98
void setRadioStyle(const bool &radioStyle)
If set to true then the effect is that Tabs in the same radio group can only be selected one at a tim...
Definition: TabBar.cpp:66
int size() const
Definition: TabBar.cpp:84
A TabBar is a QToolBar which is specifically designed to store and manage Tabs, which are specialized...
Definition: TabBar.h:53
virtual void addTab(Tab *newTab)
Adds a Tab to the TabBar.
Definition: TabBar.cpp:44
int curSelectedTab() const
A Tab is a QAction which shows or hides some other QWidget, which we call associatedWidget.
Definition: Tab.h:55
TabBar()
construct a TabBar
Definition: TabBar.cpp:18
void setEnabled(bool)
Custom setEnabled method that also calls setEnabled for each of our Tabs.
Definition: TabBar.cpp:139
Definition: Calculator.h:33
bool isSelected(const int &index)
Definition: TabBar.cpp:111
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool noneSelected()
Definition: TabBar.cpp:123