kdeui
KColorButton Class Reference
A pushbutton to display or allow user selection of a color. More...
#include <kcolorbutton.h>
Signals | |
void | changed (const QColor &newColor) |
Public Member Functions | |
QColor | color () const |
QColor | defaultColor () const |
KColorButton (const QColor &c, const QColor &defaultColor, QWidget *parent, const char *name=0L) | |
KColorButton (const QColor &c, QWidget *parent, const char *name=0L) | |
KColorButton (QWidget *parent, const char *name=0L) | |
void | setColor (const QColor &c) |
void | setDefaultColor (const QColor &c) |
QSize | sizeHint () const |
virtual | ~KColorButton () |
Protected Slots | |
void | chooseColor () |
Protected Member Functions | |
virtual void | dragEnterEvent (QDragEnterEvent *) |
virtual void | drawButtonLabel (QPainter *p) |
virtual void | dropEvent (QDropEvent *) |
virtual void | keyPressEvent (QKeyEvent *e) |
virtual void | mouseMoveEvent (QMouseEvent *e) |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | virtual_hook (int id, void *data) |
Properties | |
QColor | color |
QColor | defaultColor |
Detailed Description
A pushbutton to display or allow user selection of a color.This widget can be used to display or allow user selection of a color.
- See also:
- KColorDialog
KDE Color Button
Definition at line 37 of file kcolorbutton.h.
Constructor & Destructor Documentation
KColorButton::KColorButton | ( | QWidget * | parent, | |
const char * | name = 0L | |||
) |
KColorButton::~KColorButton | ( | ) | [virtual] |
Definition at line 79 of file kcolorbutton.cpp.
Member Function Documentation
void KColorButton::changed | ( | const QColor & | newColor | ) | [signal] |
Emitted when the color of the widget is changed, either with setColor() or via user selection.
void KColorButton::chooseColor | ( | ) | [protected, slot] |
Definition at line 187 of file kcolorbutton.cpp.
QColor KColorButton::color | ( | ) | const [inline] |
QColor KColorButton::defaultColor | ( | ) | const |
Returns the default color or an invalid color if no default color is set.
- Since:
- 3.4
void KColorButton::dragEnterEvent | ( | QDragEnterEvent * | event | ) | [protected, virtual] |
Definition at line 139 of file kcolorbutton.cpp.
void KColorButton::drawButtonLabel | ( | QPainter * | p | ) | [protected, virtual] |
Definition at line 105 of file kcolorbutton.cpp.
void KColorButton::dropEvent | ( | QDropEvent * | event | ) | [protected, virtual] |
Definition at line 144 of file kcolorbutton.cpp.
void KColorButton::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
Definition at line 152 of file kcolorbutton.cpp.
void KColorButton::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Definition at line 175 of file kcolorbutton.cpp.
void KColorButton::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Definition at line 169 of file kcolorbutton.cpp.
void KColorButton::setColor | ( | const QColor & | c | ) |
void KColorButton::setDefaultColor | ( | const QColor & | c | ) |
QSize KColorButton::sizeHint | ( | void | ) | const |
Definition at line 133 of file kcolorbutton.cpp.
void KColorButton::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
Definition at line 204 of file kcolorbutton.cpp.
Property Documentation
QColor KColorButton::color [read, write] |
Definition at line 40 of file kcolorbutton.h.
QColor KColorButton::defaultColor [read, write] |
Definition at line 41 of file kcolorbutton.h.
The documentation for this class was generated from the following files: