CCIMXDesktop
 
Loading...
Searching...
No Matches
ColorPicker Class Reference

A widget for selecting and displaying colors. More...

#include <ColorPicker.h>

Inheritance diagram for ColorPicker:

Signals

void colorChanged (const QColor &color)
 Emitted when the color changes.
 

Public Member Functions

 ColorPicker (QWidget *parent=nullptr)
 Constructs a ColorPicker widget.
 
QColor color () const
 Gets the currently selected color.
 
void setColor (const QColor &color)
 Sets the current color.
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 Handles paint events.
 

Detailed Description

A widget for selecting and displaying colors.

Provides a button that opens a color dialog when clicked and displays the currently selected color.

Constructor & Destructor Documentation

◆ ColorPicker()

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

Constructs a ColorPicker widget.

Parameters
parentThe parent widget

Member Function Documentation

◆ color()

QColor ColorPicker::color ( ) const

Gets the currently selected color.

Returns
The current QColor

◆ colorChanged

void ColorPicker::colorChanged ( const QColor &  color)
signal

Emitted when the color changes.

Parameters
colorThe new color

◆ paintEvent()

void ColorPicker::paintEvent ( QPaintEvent *  event)
overrideprotected

Handles paint events.

Parameters
eventThe paint event

◆ setColor()

void ColorPicker::setColor ( const QColor &  color)

Sets the current color.

Parameters
colorThe color to set

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