CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxColorSelectWidget.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 #ifndef CXCOLORSELECTWIDGET_H_
12 #define CXCOLORSELECTWIDGET_H_
13 
14 #include "cxResourceWidgetsExport.h"
15 
16 #include <QWidget>
17 #include <QCheckBox>
18 #include <QLabel>
19 #include <QGridLayout>
21 #include "cxColorPropertyBase.h"
22 #include "cxColorSelectButton.h"
23 
24 namespace cx
25 {
26 
33 class cxResourceWidgets_EXPORT ColorSelectWidget: public OptimizedUpdateWidget
34 {
35 Q_OBJECT
36 public:
37  ColorSelectWidget(QWidget* parent, ColorPropertyBasePtr data, QGridLayout* gridLayout = 0, int row = 0);
38 
39 private slots:
40  void prePaintEvent();
41  void valueChanged(QColor val);
42 
43 private:
44  QLabel* mLabel;
45  cx::ColorSelectButton* mColorButton;
47 };
48 
49 } // namespace cx
50 
51 #endif // CXCOLORSELECTWIDGET_H_
Convenience button for chosing color. Will open a color select dialog, and color the button itself in...
Widget for the ColorPropertyBase.
Interface for all classes following the modified/prepaint paradigm.
boost::shared_ptr< class ColorPropertyBase > ColorPropertyBasePtr
Namespace for all CustusX production code.