Isis 3 Programmer Reference
TabBar.h
1 #ifndef TabBar_H
2 #define TabBar_H
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 // QToolBar is the parent of this class, and should be the ONLY include
13 // in this file. Do not add any other includes to this header file!
14 #include <QToolBar>
15 
16 class QWidget;
17 template< class A > class QVector;
18 
19 namespace Isis
20 {
21  class Tab;
22 
39  class TabBar : public QToolBar
40  {
41  Q_OBJECT
42 
43  public:
44  TabBar();
45  virtual ~TabBar();
46 
47  virtual void addTab(Tab * newTab);
48  int curSelectedTab() const;
49  void setRadioStyle(const bool & radioStyle);
50  bool radioStyle();
51  int size() const;
52 
53  void setSelected(const int & index, const bool & status);
54  bool isSelected(const int & index);
55  bool noneSelected();
56  void setEnabled(bool);
57 
58 
59  private slots:
60  void tabClicked(const int & index);
61 
62 
63  private:
64  // functions
65  bool noOthersInGrpSelected(const int & index) const;
66  void deselectOthersInGrp(const int & index);
67 
68 
69  private:
70  // data
71  QVector< Tab * > * tabs;
72  bool radioStyleTabs;
73  };
74 }
75 
76 #endif
QWidget
Isis::TabBar::size
int size() const
Definition: TabBar.cpp:84
Isis::TabBar::setRadioStyle
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
Isis::TabBar::addTab
virtual void addTab(Tab *newTab)
Adds a Tab to the TabBar.
Definition: TabBar.cpp:44
Isis::TabBar::radioStyle
bool radioStyle()
Definition: TabBar.cpp:75
Isis::TabBar::~TabBar
virtual ~TabBar()
destruct a TabBar
Definition: TabBar.cpp:28
QToolBar
Isis::TabBar::setSelected
void setSelected(const int &index, const bool &status)
Sets whether the Tab at the specified index is selected or not.
Definition: TabBar.cpp:98
Isis::TabBar::tabClicked
void tabClicked(const int &index)
SLOT which performs actions that need to be done when we get a SIGNAL from a Tab telling us that it h...
Definition: TabBar.cpp:163
Isis::TabBar::TabBar
TabBar()
construct a TabBar
Definition: TabBar.cpp:18
Isis::TabBar::setEnabled
void setEnabled(bool)
Custom setEnabled method that also calls setEnabled for each of our Tabs.
Definition: TabBar.cpp:139
Isis::TabBar::isSelected
bool isSelected(const int &index)
Definition: TabBar.cpp:111
Isis::TabBar::noOthersInGrpSelected
bool noOthersInGrpSelected(const int &index) const
Definition: TabBar.cpp:184
Isis::TabBar
A TabBar is a QToolBar which is specifically designed to store and manage Tabs, which are specialized...
Definition: TabBar.h:40
Isis::TabBar::deselectOthersInGrp
void deselectOthersInGrp(const int &index)
Definition: TabBar.cpp:206
QVector
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
Isis::TabBar::noneSelected
bool noneSelected()
Definition: TabBar.cpp:123
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Tab
A Tab is a QAction which shows or hides some other QWidget, which we call associatedWidget.
Definition: Tab.h:42