cut 3.4.3
Loading...
Searching...
No Matches
QeColorSelector Class Reference

Button widget that opens a color dialog to select a color. More...

#include <CutWidgets.h>

Public Slots

void SelectNewColor ()
 Open the color dialog to let the user select a new color.
 
void SetColor (const QColor &newColor)
 Set the color programmatically.
 

Signals

void ColorChanged (QColor newColor)
 Emitted when the color changes.
 

Public Member Functions

 QeColorSelector (QWidget *parent=nullptr)
 Construct a QeColorSelector widget.
 
QColor GetColor () const
 Get the currently selected color.
 
void ResetColor ()
 Reset the color to its default value.
 

Properties

QColor color
 The currently selected color.
 

Detailed Description

Button widget that opens a color dialog to select a color.

Displays the currently selected color as its background. Clicking the button opens a standard color dialog where the user can pick a new color.

Constructor & Destructor Documentation

◆ QeColorSelector()

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

Construct a QeColorSelector widget.

Parameters
parentParent widget.

Member Function Documentation

◆ ColorChanged

void QeColorSelector::ColorChanged ( QColor newColor)
signal

Emitted when the color changes.

Parameters
newColorThe new QColor.

◆ GetColor()

QColor QeColorSelector::GetColor ( ) const

Get the currently selected color.

Returns
The selected QColor.

◆ SetColor

void QeColorSelector::SetColor ( const QColor & newColor)
slot

Set the color programmatically.

Parameters
newColorThe new QColor to set.

Property Documentation

◆ color

QColor QeColorSelector::color
readwrite

The currently selected color.

Accessors:
GetColor(), SetColor(QColor), ResetColor()

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