Fraxinus  18.10
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_ */
Composite widget for string selection.
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
Namespace for all CustusX production code.