LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
LC::Util::ColorButton Class Reference

A button for choosing a color. More...

#include "colorbutton.h"

+ Inheritance diagram for LC::Util::ColorButton:
+ Collaboration diagram for LC::Util::ColorButton:

Signals

void colorChanged (const QColor &color)
 Emitted when the color is changed. More...
 

Public Member Functions

 ColorButton (QWidget *parent=nullptr)
 Constructs the button with the given parent. More...
 
QColor GetColor () const
 Returns the current color represented by this button. More...
 
void SetColor (const QColor &color)
 Sets the color represented by this button. More...
 

Detailed Description

A button for choosing a color.

This class provides a button that can be used to choose a color.

Definition at line 29 of file colorbutton.h.

Constructor & Destructor Documentation

◆ ColorButton()

LC::Util::ColorButton::ColorButton ( QWidget *  parent = nullptr)
explicit

Constructs the button with the given parent.

Parameters
[in]parentThe parent widget for the button.

Definition at line 20 of file colorbutton.cpp.

Member Function Documentation

◆ colorChanged

void LC::Util::ColorButton::colorChanged ( const QColor &  color)
signal

Emitted when the color is changed.

Parameters
[out]colorThe new color represented by this button.
See also
SetColor()

◆ GetColor()

QColor LC::Util::ColorButton::GetColor ( ) const

Returns the current color represented by this button.

The default value for the color is black.

Returns
The currently set color.
See also
SetColor()

Definition at line 31 of file colorbutton.cpp.

◆ SetColor()

void LC::Util::ColorButton::SetColor ( const QColor &  color)

Sets the color represented by this button.

Sets the color of this button and emits the colorChanged() signal if the color has been changed.

Parameters
[in]colorThe new color to be represented by this button.
See also
SetColor(), colorChanged()

Definition at line 36 of file colorbutton.cpp.


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