CustusX  18.04-rc1
An IGT application
cxStringListSelectWidget.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 CXSTRINGLISTSELECTWIDGET_H
13 #define CXSTRINGLISTSELECTWIDGET_H
14 
15 #include "cxResourceWidgetsExport.h"
16 
17 #include <QWidget>
18 #include <QSlider>
19 #include <QLineEdit>
20 #include <QLabel>
21 #include <QGridLayout>
22 #include "cxStringListProperty.h"
23 #include "cxBaseWidget.h"
24 
25 namespace cx
26 {
27 
28 
33 class cxResourceWidgets_EXPORT StringListSelectWidget: public BaseWidget
34 {
35 Q_OBJECT
36 public:
37  StringListSelectWidget(QWidget* parent, StringListPropertyPtr property, QGridLayout* gridLayout = 0, int row = 0);
39 
40  void showLabel(bool on);
41  void setIcon(QIcon icon);
42 
43 protected:
44  QHBoxLayout* mTopLayout;
45 
46 private slots:
47  void prePaintEvent();
48 
49 private:
50  void onCheckToggled(QString nodeType, bool value);
51 
52  QLabel* mLabel;
53  QToolButton* mButton;
54  QMenu* mMenu;
56  QStringList mCachedRange;
57  std::vector<QCheckBox*> mCheckBoxes;
58 };
59 
60 } // namespace cx
61 
62 #endif // CXSTRINGLISTSELECTWIDGET_H
Composite widget for string list selection.
boost::shared_ptr< class StringListProperty > StringListPropertyPtr
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
Namespace for all CustusX production code.