#include <colorbutton.h>
This class is an extension of the QPushButton class. It shows the color on the button and presents a QColorDialog when clicked.
Definition at line 33 of file colorbutton.h.
Signals | |
void | resized () |
void | newColor (QColor *color) |
Public Member Functions | |
ColorButton (QWidget *parent=0, const char *name=0) | |
ColorButton (const QColor &color, QWidget *parent=0, const char *name=0) | |
~ColorButton () | |
The default destructor. | |
QColor | color () const |
Returns the color of the button. | |
void | setColor (const QColor color) |
Sets the color of the button. | |
Protected Member Functions | |
virtual void | resizeEvent (QResizeEvent *e) |
Overridden from QPushButton::resizeEvent(). | |
Private Slots | |
void | selectColor () |
Allows the selection of a new color. | |
void | updatePixmap () |
Updates the size and color of the pixmap representing the current color. | |
Private Attributes | |
QColor | fillColor |
the color of the pixmap | |
QPixmap * | pixmap |
the pixmap itself |
|
Definition at line 44 of file colorbutton.cpp. |
|
Definition at line 55 of file colorbutton.cpp. |
|
The default destructor.
Definition at line 66 of file colorbutton.cpp. |
|
Returns the color of the button.
Definition at line 73 of file colorbutton.cpp. |
|
Sets the color of the button.
Definition at line 80 of file colorbutton.cpp. |
|
|
|
|
|
Overridden from QPushButton::resizeEvent().
Definition at line 93 of file colorbutton.cpp. |
|
Allows the selection of a new color.
Definition at line 106 of file colorbutton.cpp. |
|
Updates the size and color of the pixmap representing the current color.
Definition at line 118 of file colorbutton.cpp. |
|
the color of the pixmap
Definition at line 57 of file colorbutton.h. |
|
the pixmap itself
Definition at line 58 of file colorbutton.h. |