NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxTabbedWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXTABBEDWIDGET_H_
13 #define CXTABBEDWIDGET_H_
14 
15 #include "cxResourceWidgetsExport.h"
16 
17 #include <QString>
18 #include "cxBaseWidget.h"
19 
20 class QTabWidget;
21 
22 namespace cx
23 {
34 class cxResourceWidgets_EXPORT TabbedWidget : public BaseWidget
35 {
36  Q_OBJECT
37 public:
38  TabbedWidget(QWidget* parent, QString objectName, QString windowTitle);
39  virtual ~TabbedWidget();
40 
41  void addTab(BaseWidget* newTab, QString newTabName);
42  void insertWidgetAtTop(QWidget* newWidget);
43  void setDefaultWidget(QWidget* widget);
44 
45 private slots:
46  void tabChanged(const int &index);
47 
48 protected:
49  QTabWidget* mTabWidget;
50  QVBoxLayout* mLayout;
51 
52 private:
53  TabbedWidget();
54 };
55 //------------------------------------------------------------------------------
56 
57 
58 }
59 #endif /* CXTABBEDWIDGET_H_ */
cxBaseWidget.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::BaseWidget
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
cx::TabbedWidget
Interface for making widgets with a hierarchy of tabs.
Definition: cxTabbedWidget.h:34
cx::TabbedWidget::mTabWidget
QTabWidget * mTabWidget
Definition: cxTabbedWidget.h:49
cx::TabbedWidget::mLayout
QVBoxLayout * mLayout
Definition: cxTabbedWidget.h:50