Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkColorPropertyView.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef QmitkColorPropertyView_h
13 #define QmitkColorPropertyView_h
14 
16 #include <QLabel>
17 #include <mitkColorProperty.h>
18 #include <mitkPropertyObserver.h>
19 
29 {
30  Q_OBJECT
31 
32 public:
38  QmitkColorPropertyView(const mitk::ColorProperty *property, QWidget *parent);
39 
42 
43 protected:
44  void PropertyChanged() override;
45  void PropertyRemoved() override;
46 
47  void DisplayColor();
48 
50 
51  QPalette m_WidgetPalette;
52 };
53 
54 #endif
#define MITKQTWIDGETSEXT_EXPORT
Read-only QLabel that displays a mitk::ColorProperty as a colored swatch.
void PropertyRemoved() override
Called when the observed property is about to be deleted.
~QmitkColorPropertyView() override
Destructor.
const mitk::ColorProperty * m_ColorProperty
void PropertyChanged() override
Called when the observed property value has changed.
QmitkColorPropertyView(const mitk::ColorProperty *property, QWidget *parent)
Construct a color view for the given property.
Property for storing RGB color values.
Read-only observer for a mitk::BaseProperty.