|
|
The KColorDialog provides a dialog for color selection.
In most cases, you will want to use the static method KColorDialog::getColor(). This pops up the dialog (with an initial selection provided by you), lets the user choose a color, and returns.
Example:
QColor myColor; int result = KColorDialog::getColor( myColor ); if ( result == KColorDialog::Accepted ) ... |
The color dialog is really a collection of several widgets which can you can also use separately: the quadratic plane in the top left of the dialog is a KXYSelector. Right next to it is a KHSSelector for chosing hue/saturation.
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.
|
Construct a KColorDialog.
~ |
QColor |
Retrieve the currently selected color.
int |
[static]
Create a modal color dialog, let the user choose a color, and return when the dialog is closed.
The selected color is returned in the argument theColor.
Returns: QDialog::result().
QColor |
[static]
Get the color from the pixel at point p on the screen.
void |
[slot]
Preselects a color.
void |
[signal]
Emitted when a color is selected. Connect to this to monitor the color as it as selected if you are not running modal.
void |
[protected virtual]
void |
[protected virtual]
Reimplemented from KDialogBase for internal reasons; the API is not affected.
Generated by: prospector@porky.devel.redhat.com on Fri Nov 3 09:58:47 2000, using kdoc 2.0a42. |