Isis Developer Reference
TabBar.h
Go to the documentation of this file.
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
16class QWidget;
17template< class A > class QVector;
18
19namespace 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
A TabBar is a QToolBar which is specifically designed to store and manage Tabs, which are specialized...
Definition TabBar.h:40
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
void setSelected(const int &index, const bool &status)
Sets whether the Tab at the specified index is selected or not.
Definition TabBar.cpp:98
virtual ~TabBar()
destruct a TabBar
Definition TabBar.cpp:28
bool noneSelected()
Definition TabBar.cpp:123
bool radioStyle()
Definition TabBar.cpp:75
virtual void addTab(Tab *newTab)
Adds a Tab to the TabBar.
Definition TabBar.cpp:44
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
int curSelectedTab() const
bool isSelected(const int &index)
Definition TabBar.cpp:111
A Tab is a QAction which shows or hides some other QWidget, which we call associatedWidget.
Definition Tab.h:42
This is free and unencumbered software released into the public domain.
Definition Calculator.h:18
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16