# class KColorDialog

###

Module | kdeui
Namespace |
Class | KColorDialog
Inherits | KDialog

### methods

- KColorDialog (parent, modal)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0
  modal | bool | 0

  Constructs a color selection dialog.

- KColorDialog (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KColorDialog |

- KColorDialog (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0
  a1 | bool | 0

- color ( )

  returns QColor

  Returns the currently selected color.

- colorSelected (col)

  returns Nothing
  SIGNAL ("colorSelected (const QColor&)")

  Argument | Type | Default
  --- | --- | ---
  col | QColor |

  Emitted when a color is selected. Connect to this to monitor the color as it as selected if you are not running modal.

- defaultColor ( )

  returns QColor

  Returns the value passed to setDefaultColor

- eventFilter (obj, ev)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  obj | QObject |
  ev | QEvent |

- getColor (theColor, parent)

  returns int
  static

  Argument | Type | Default
  --- | --- | ---
  theColor | QColor |
  parent | QWidget | 0

  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 theColor.

  theColor - if valid, specifies the color to be initially selected. On return, holds the selected color. Returns QDialog.result().

- getColor (theColor, defaultColor, parent)

  returns int
  static

  Argument | Type | Default
  --- | --- | ---
  theColor | QColor |
  defaultColor | QColor |
  parent | QWidget | 0

  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 theColor.

  This version takes a defaultColor argument, which sets the color selected by the "default color" checkbox. When this checkbox is checked, the invalid color (QColor()) is returned into theColor.

  theColor - if valid, specifies the color to be initially selected. On return, holds the selected color.

  defaultColor - color selected by the "default color" checkbox Returns QDialog.result().

- grabColor (p)

  returns QColor
  static

  Argument | Type | Default
  --- | --- | ---
  p | QPoint |

  Gets the color from the pixel at point p on the screen.

- keyPressEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QKeyEvent |

- mouseMoveEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QMouseEvent |

- mouseReleaseEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QMouseEvent |

- setColor (col)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  col | QColor |

  Preselects a color.

- setDefaultColor (defaultCol)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  defaultCol | QColor |

  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.