wwWidgets Home · All Classes · Main Classes · Grouped Classes · Functions |
The QwwColorButton class provides a color chooser in form of a button with a popup list More...
#include <QwwColorButton>
Inherits QPushButton.
QwwColorButton ( QWidget * parent = 0 ) | |
void | addColor ( const QColor & color, const QString & name = QString::null ) |
void | clear () |
QStringList | colors () const |
QColor | currentColor () const |
bool | dragEnabled () const |
void | setColors ( const QStringList & map ) |
void | setDragEnabled ( bool v ) |
virtual void | setStandardColors () |
bool | showName () const |
void | setCurrentColor ( const QColor & c ) |
void | setShowName ( bool v ) |
void | colorPicked ( const QColor & color ) |
The QwwColorButton class provides a color chooser in form of a button with a popup list
This widget provides a push button that can be used to choose a color from either a predefined set or a custom one using a QColorDialog.
Active color can be changed either by clicking the button and choosing a different entry or by dropping a color from another widget or another application.
Colors can be added to the button with addColor(), setColors() or setStandardColors().
This property holds list of colors known to the button.
Access functions:
QStringList | colors () const |
void | setColors ( const QStringList & map ) |
See also currentColor.
This property holds returns the currently chosen color.
Access functions:
QColor | currentColor () const |
void | setCurrentColor ( const QColor & c ) |
This property holds this property holds whether the button starts a drag if the user presses and moves the mouse away from the button.
Dragging is disabled by default.
Access functions:
bool | dragEnabled () const |
void | setDragEnabled ( bool v ) |
This property holds this property holds whether the color name should be displayed on the button.
Access functions:
bool | showName () const |
void | setShowName ( bool v ) |
Constructs a colour button with a specified parent.
Adds a color with a name to the list of colors to choose from color color to add name name to associate with the color
Clears the color list
This signal is emitted when color is picked and displayed on the button.
Sets standard Qt colors as the list of colors to choose from
Copyright © 2007-2010 Witold Wysota | Trademarks | wwWidgets 1.0.0 |