KColorDialog Class Reference
#include <kcolordialog.h>
Inheritance diagram for KColorDialog:

Detailed Description
A color selection dialog.
Features:
- Color selection from a wide range of palettes.
- Color selection from a palette of H vs S and V selectors.
- Direct input of HSV or RGB values.
- Saving of custom colors
Example:
QColor myColor; int result = KColorDialog::getColor( myColor ); if ( result == KColorDialog::Accepted ) ...

KDE Color Dialog
On the right side of the dialog you see a KPaletteTable showing up to 40 colors with a combo box which offers several predefined palettes or a palette configured by the user. The small field showing the currently selected color is a KColorPatch.
Definition at line 377 of file kcolordialog.h.
Public Slots | |
void | setColor (const QColor &col) |
Signals | |
void | colorSelected (const QColor &col) |
Public Member Functions | |
KColorDialog (QWidget *parent=0L, const char *name=0L, bool modal=false) | |
~KColorDialog () | |
QColor | color () const |
void | setDefaultColor (const QColor &defaultCol) |
QColor | defaultColor () const |
Static Public Member Functions | |
static int | getColor (QColor &theColor, QWidget *parent=0L) |
static int | getColor (QColor &theColor, const QColor &defaultColor, QWidget *parent=0L) |
static QColor | grabColor (const QPoint &p) |
Protected Member Functions | |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual bool | eventFilter (QObject *obj, QEvent *ev) |
virtual void | virtual_hook (int id, void *data) |
Constructor & Destructor Documentation
|
Constructs a color selection dialog.
Definition at line 937 of file kcolordialog.cpp. |
|
Destroys the color selection dialog.
Definition at line 1176 of file kcolordialog.cpp. |
Member Function Documentation
|
Returns the currently selected color.
Definition at line 1283 of file kcolordialog.cpp. |
|
Emitted when a color is selected. Connect to this to monitor the color as it as selected if you are not running modal. |
|
Definition at line 1235 of file kcolordialog.cpp. |
|
Creates a modal color dialog, lets the user choose a color, and returns when the dialog is closed.
The selected color is returned in the argument
This version takes a
Definition at line 1318 of file kcolordialog.cpp. |
|
Creates a modal color dialog, let the user choose a color, and returns when the dialog is closed.
The selected color is returned in the argument
Definition at line 1300 of file kcolordialog.cpp. |
|
Gets the color from the pixel at point p on the screen.
Definition at line 1535 of file kcolordialog.cpp. |
|
Maps some keys to the actions buttons. F1 is mapped to the Help button if present and Escape to the Cancel or Close if present. The button action event is animated. Reimplemented from KDialogBase. Definition at line 1544 of file kcolordialog.cpp. |
|
Preselects a color.
Definition at line 1292 of file kcolordialog.cpp. |
|
Call this to make the dialog show a "Default Color" checkbox. If this checkbox is selected, the dialog will return an "invalid" color (QColor()). This can be used to mean "the default text color", for instance, the one with the KDE text color on screen, but black when printing. Definition at line 1205 of file kcolordialog.cpp. |
The documentation for this class was generated from the following files: