OpenHantek
ColorBox Class Reference

A widget for the selection of a color. More...

#include <colorbox.h>

Inheritance diagram for ColorBox:

Public Slots

void setColor (QColor color)
 Sets the color. More...
 
void waitForColor ()
 Wait for the color dialog and apply chosen color. More...
 

Signals

void colorChanged (QColor color)
 The color has been changed. More...
 

Public Member Functions

 ColorBox (QColor color, QWidget *parent=nullptr)
 Initializes the widget. More...
 
 ~ColorBox ()
 Cleans up the widget. More...
 
const QColor getColor ()
 Get the current color. More...
 

Private Attributes

QColor color
 

Detailed Description

A widget for the selection of a color.

Constructor & Destructor Documentation

◆ ColorBox()

ColorBox::ColorBox ( QColor  color_,
QWidget *  parent = nullptr 
)

Initializes the widget.

Parameters
color_Initial color value.
parentThe parent widget.

◆ ~ColorBox()

ColorBox::~ColorBox ( )

Cleans up the widget.

Member Function Documentation

◆ colorChanged

void ColorBox::colorChanged ( QColor  color)
signal

The color has been changed.

◆ getColor()

const QColor ColorBox::getColor ( )

Get the current color.

Returns
The current color as QColor.

◆ setColor

void ColorBox::setColor ( QColor  newColor)
slot

Sets the color.

Parameters
newColorThe new color.

◆ waitForColor

void ColorBox::waitForColor ( )
slot

Wait for the color dialog and apply chosen color.

Field Documentation

◆ color

QColor ColorBox::color
private

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