KColorValueSelector

KDE 4.5 PyKDE API Reference

- KDE's Python API

# KColorValueSelector Class Reference

`from PyKDE4.kdeui import *`

Inherits: KSelector → QAbstractSlider → QWidget → QObject

## Detailed Description

## Methods
| __init__ (self, QWidget parent=0)
| __init__ (self, Qt::Orientation o, QWidget parent=0)
| __init__ (self, KColorValueSelector a0)
KColorChooserMode | chooserMode (self)
int | colorValue (self)
| drawContents (self, QPainter painter)
| drawPalette (self, QPixmap pixmap)
int | hue (self)
| resizeEvent (self, QResizeEvent a0)
int | saturation (self)
| setChooserMode (self, KColorChooserMode chooserMode)
| setColorValue (self, int colorValue)
| setHue (self, int hue)
| setSaturation (self, int saturation)
| updateContents (self)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

Constructs a widget for color selection.

__init__ | ( | self, |
|  | Qt::Orientation | o,
|  | QWidget | parent=0
| ) |  |  |

Constructs a widget for color selection with a given orientation

__init__ | ( | self, |
|  | KColorValueSelector | a0
| ) |  |  |

KColorChooserMode chooserMode | ( |  | self ) |

Returns the current chooser mode.

@return The chooser mode (one of the KColorChooserMode constants)

int colorValue | ( |  | self ) |

Returns the current color value.

@return The color value (0-255)

drawContents | ( | self, |
|  | QPainter | painter
| ) |  |  |

Reimplemented from KSelector. The drawing is buffered in a pixmap here. As real drawing routine, drawPalette() is used.

drawPalette | ( | self, |
|  | QPixmap | pixmap
| ) |  |  |

Draws the contents of the widget on a pixmap, which is used for buffering.

int hue | ( |  | self ) |

Returns the current hue value.

Returns:
  The hue value (0-359)

resizeEvent | ( | self, |
|  | QResizeEvent | a0
| ) |  |  |

int saturation | ( |  | self ) |

Returns the current saturation value.

@return The saturation value (0-255)

setChooserMode | ( | self, |
|  | KColorChooserMode | chooserMode
| ) |  |  |

Sets the chooser mode. Doesn't automatically update the widget; you have to call updateContents manually.

@param chooserMode Sets the chooser mode (one of the KColorChooserMode constants)

setColorValue | ( | self, |
|  | int | colorValue
| ) |  |  |

Sets the color value. Doesn't automatically update the widget; you have to call updateContents manually.

@param colorValue Sets the color value (0-255)

setHue | ( | self, |
|  | int | hue
| ) |  |  |

Sets the hue value. Doesn't automatically update the widget; you have to call updateContents manually.

@param hue Sets the hue value (0-359)

setSaturation | ( | self, |
|  | int | saturation
| ) |  |  |

Sets the saturation value. Doesn't automatically update the widget; you have to call updateContents manually.

@param saturation Sets the saturation value (0-255)

updateContents | ( |  | self ) |

Updates the widget's contents.