LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
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.
 

Public Member Functions

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

Detailed Description

A button for choosing a color.

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

Definition at line 23 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 14 of file colorbutton.cpp.

References SetColor().

+ Here is the call graph for this function:

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()

Referenced by SetColor().

+ Here is the caller graph for this function:

◆ 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 25 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 30 of file colorbutton.cpp.

References colorChanged().

Referenced by ColorButton().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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