class KColorDialog


Table of contents
Modules
kdeui Classes
All Classes
Module kdeui
Namespace global
Class KColorDialog
Inherits KDialog

A color selection dialog.

Features:\n

  • 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
  • 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 choosing hue/saturation.

    On the right side of the dialog you see a KColorTable showing a number of 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.



    methods