LeechCraft  0.6.70-10870-g558588d6ec
Modular cross-platform feature rich live environment.
LeechCraft::Util::ColorButton Class Reference

A button for choosing a color. More...

#include "colorbutton.h"

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

Signals

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

Public Member Functions

 ColorButton (QWidget *parent=0)
 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 46 of file colorbutton.h.

Constructor & Destructor Documentation

◆ ColorButton()

LeechCraft::Util::ColorButton::ColorButton ( QWidget *  parent = 0)

Constructs the button with the given parent.

Parameters
[in]parentThe parent widget for the button.

Definition at line 37 of file colorbutton.cpp.

Member Function Documentation

◆ colorChanged

void LeechCraft::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 LeechCraft::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 48 of file colorbutton.cpp.

◆ SetColor()

void LeechCraft::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 53 of file colorbutton.cpp.

References colorChanged().


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