KColorCombo Class Reference
from PyKDE4.kdeui import *
Inherits: QComboBox → QWidget → QObject
Detailed Description
Combobox for colors.
The combobox provides some preset colors to be selected, and an entry to select a custom color using a color dialog.
Signals | |
activated (QColor col) | |
highlighted (QColor col) | |
Methods | |
__init__ (self, QWidget parent=0) | |
__init__ (self, KColorCombo a0) | |
activated (self, QColor col) | |
QColor | color (self) |
[QColor] | colors (self) |
highlighted (self, QColor col) | |
bool | isCustomColor (self) |
paintEvent (self, QPaintEvent event) | |
setColor (self, QColor col) | |
setColors (self, [QColor] colors) | |
showEmptyList (self) |
Method Documentation
__init__ | ( | self, | ||
QWidget | parent=0 | |||
) |
Constructs a color combo box.
__init__ | ( | self, | ||
KColorCombo | a0 | |||
) |
activated | ( | self, | ||
QColor | col | |||
) |
Emitted when a new color box has been selected.
- Signal syntax:
QObject.connect(source, SIGNAL("activated(const QColor&)"), target_slot)
QColor color | ( | self ) |
Returns the currently selected color.
[QColor] colors | ( | self ) |
Return the list of colors available for selection.
- Returns:
- list of colors
highlighted | ( | self, | ||
QColor | col | |||
) |
Emitted when a new item has been highlighted.
- Signal syntax:
QObject.connect(source, SIGNAL("highlighted(const QColor&)"), target_slot)
bool isCustomColor | ( | self ) |
Find whether the currently selected color is a custom color selected using a color dialog.
paintEvent | ( | self, | ||
QPaintEvent | event | |||
) |
setColor | ( | self, | ||
QColor | col | |||
) |
Selects the color col.
setColors | ( | self, | ||
[QColor] | colors | |||
) |
Set a custom list of colors to choose from, in place of the standard list.
- Parameters:
-
cols list of colors. If empty, the selection list reverts to the standard list.
showEmptyList | ( | self ) |
Clear the color list and don't show it, till the next setColor() call