NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxLabeledComboBoxWidget.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 
13 #ifndef CXLABELEDCOMBOBOXWIDGET_H_
14 #define CXLABELEDCOMBOBOXWIDGET_H_
15 
16 #include "cxResourceWidgetsExport.h"
17 
18 #include <QWidget>
19 #include <QSlider>
20 #include <QLineEdit>
21 #include <QLabel>
22 #include <QGridLayout>
23 #include "cxStringPropertyBase.h"
24 #include "cxBaseWidget.h"
25 
26 namespace cx
27 {
28 
36 class cxResourceWidgets_EXPORT LabeledComboBoxWidget: public BaseWidget
37 {
38 Q_OBJECT
39 public:
40  LabeledComboBoxWidget(QWidget* parent, StringPropertyBasePtr, QGridLayout* gridLayout = 0, int row = 0);
42 
43  void showLabel(bool on);
44 
45 protected:
46  QHBoxLayout* mTopLayout;
47 
48 private slots:
49  void prePaintEvent();
50  void comboIndexChanged(int val);
51 
52 private:
53  QIcon getIcon(QString uid);
54 
55  QLabel* mLabel;
56  QComboBox* mCombo;
58 };
59 
60 } // namespace cx
61 
62 #endif /* CXLABELEDCOMBOBOXWIDGET_H_ */
cx::LabeledComboBoxWidget
Composite widget for string selection.
Definition: cxLabeledComboBoxWidget.h:36
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::LabeledComboBoxWidget::~LabeledComboBoxWidget
virtual ~LabeledComboBoxWidget()
Definition: cxLabeledComboBoxWidget.h:41
cx::LabeledComboBoxWidget::mTopLayout
QHBoxLayout * mTopLayout
Definition: cxLabeledComboBoxWidget.h:46
cxStringPropertyBase.h
cx::StringPropertyBasePtr
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
Definition: cxIGTLinkStreamerService.h:20