Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkColorWidget Class Reference

A small widget combining a QLineEdit and a QToolButton for color editing. More...

#include <QmitkPropertyItemDelegate.h>

Inheritance diagram for QmitkColorWidget:
Collaboration diagram for QmitkColorWidget:

Signals

void ColorPicked ()
 Emitted when a new color has been picked via the dialog or line edit. More...
 

Public Member Functions

 QmitkColorWidget (QWidget *parent=nullptr)
 Constructs the color widget. More...
 
 ~QmitkColorWidget () override
 
QColor GetColor () const
 Returns the currently selected color. More...
 
void SetColor (QColor color)
 Sets the displayed color. More...
 

Detailed Description

A small widget combining a QLineEdit and a QToolButton for color editing.

Displays a hex color string in the line edit and a colored button. Clicking the button opens a QColorDialog. Used internally by QmitkPropertyItemDelegate.

See also
QmitkPropertyItemDelegate

Definition at line 35 of file QmitkPropertyItemDelegate.h.

Constructor & Destructor Documentation

◆ QmitkColorWidget()

QmitkColorWidget::QmitkColorWidget ( QWidget *  parent = nullptr)
explicit

Constructs the color widget.

Parameters
[in]parentOptional parent widget.

◆ ~QmitkColorWidget()

QmitkColorWidget::~QmitkColorWidget ( )
override

Member Function Documentation

◆ ColorPicked

void QmitkColorWidget::ColorPicked ( )
signal

Emitted when a new color has been picked via the dialog or line edit.

◆ GetColor()

QColor QmitkColorWidget::GetColor ( ) const

Returns the currently selected color.

Returns
The current QColor.

◆ SetColor()

void QmitkColorWidget::SetColor ( QColor  color)

Sets the displayed color.

Parameters
[in]colorThe color to set.

The documentation for this class was generated from the following file: