Workspace 6.21.5
Public Slots | Signals | Public Member Functions | Properties | List of all members
ColorButton Class Reference

#include <Workspace/Widgets/colorbutton.h>

Inheritance diagram for ColorButton:
[legend]

Public Slots

virtual void setColor (const QColor &c)
 
void showEditor (bool b=true)
 

Signals

void colorChanged (const QColor &c)
 

Public Member Functions

 ColorButton (QWidget *parent=nullptr)
 
 ~ColorButton () override
 
const QColor & getColor () const
 
QColorDialog * getEditor ()
 

Properties

QColor color
 

Constructor & Destructor Documentation

◆ ColorButton()

ColorButton ( QWidget *  parent = nullptr)

◆ ~ColorButton()

~ColorButton ( )
override

Member Function Documentation

◆ colorChanged

void colorChanged ( const QColor &  c)
signal

◆ getColor()

const QColor & getColor ( ) const
Returns
The color represented by the button.

◆ getEditor()

QColorDialog * getEditor ( )
Returns
A pointer to the editor for this button. If no editor exists at the time of the call, a new one will be created (but not necessarily shown). It will be a child widget of the button itself but will appear to be a modeless window.
See also
showEditor()

◆ setColor

void setColor ( const QColor &  c)
virtualslot
Parameters
cThe new color to assign to the button.

◆ showEditor

void showEditor ( bool  b = true)
slot
Parameters
bIf true, this function ensures that the editor for this button is created and visible, and then tries to make it the top and active window. If it is false, the editor will be hidden but not deleted (if one existed at the time of the call).
See also
getEditor()

Property Documentation

◆ color

QColor color
readwrite