QwwColorButton Class Reference

Button acting as a colour chooser. More...

Inherits QPushButton.

List of all members.

Public Slots

void setCurrentColor (const QColor &c)

Signals

void colorPicked (QColor)
 a colour has been chosen

Public Member Functions

void addColor (const QColor &c, const QString &n=QString::null)
 Adds a colour with a name to the list of colours to choose from.
void clear ()
 Clears the colour list.
 QwwColorButton (QWidget *parent=0)
void setColors (const QList< QColor > &)
void setStandardColors ()
 Sets standard Qt colours as the list of colours to choose from.
 ~QwwColorButton ()
 Destructor.

Properties

QList< QColorcolors []
 list of colours known to the button.
QColor currentColor []
 Returns the currently chosen colour.


Detailed Description

Button acting as a colour chooser.

This widget provides a push button that can be used to choose a colour from either a predefined set of colours or a custom colour using a QColorDialog.

Colours can be added to the button with addColor(), setColors() or setStandardColors().

Definition at line 23 of file qwwcolorbutton.h.


Constructor & Destructor Documentation

QwwColorButton::~QwwColorButton (  ) 

Destructor.

Destroys the button.

Definition at line 153 of file qwwcolorbutton.cpp.


Member Function Documentation

void QwwColorButton::addColor ( const QColor c,
const QString n = QString::null 
)

Adds a colour with a name to the list of colours to choose from.

Parameters:
colour colour to add
name name to associate with the colour

Definition at line 207 of file qwwcolorbutton.cpp.

QwwColorButton::colorPicked ( QColor   )  [signal]

a colour has been chosen

This signal is emitted when a colour is picked and displayed on the button

void QwwColorButton::setColors ( const QList< QColor > &  list  ) 

Parameters:
list 

Definition at line 249 of file qwwcolorbutton.cpp.

void QwwColorButton::setCurrentColor ( const QColor c  )  [slot]

Sets the current colour

Parameters:
c 

Definition at line 273 of file qwwcolorbutton.cpp.


Generated on Sat Apr 21 21:54:36 2007 for wwWidgets by  doxygen 1.5.1