KColorButton Class Reference
from PyKDE4.kdeui import *
Inherits: QPushButton → QAbstractButton → QWidget → QObject
Detailed Description
A pushbutton to display or allow user selection of a color.
This widget can be used to display or allow user selection of a color.
- See also:
- KColorDialog

"KDE Color Button"
Signals |
| | changed (QColor newColor) |
Methods |
| | __init__ (self, QWidget parent=0) |
| | __init__ (self, QColor c, QWidget parent=0) |
| | __init__ (self, QColor c, QColor defaultColor, QWidget parent=0) |
| | changed (self, QColor newColor) |
| QColor | color (self) |
| QColor | defaultColor (self) |
| | dragEnterEvent (self, QDragEnterEvent a0) |
| | dropEvent (self, QDropEvent a0) |
| | keyPressEvent (self, QKeyEvent e) |
| QSize | minimumSizeHint (self) |
| | mouseMoveEvent (self, QMouseEvent e) |
| | mousePressEvent (self, QMouseEvent e) |
| | paintEvent (self, QPaintEvent pe) |
| | setColor (self, QColor c) |
| | setDefaultColor (self, QColor c) |
| QSize | sizeHint (self) |
Method Documentation
| __init__ |
( |
self, |
|
|
|
QWidget |
parent=0 |
|
) |
|
|
|
Creates a color button with an initial color c.
Creates a color button with an initial color c and default color defaultColor.
| changed |
( |
self, |
|
|
|
QColor |
newColor |
|
) |
|
|
|
Emitted when the color of the widget
is changed, either with setColor() or via user selection.
- Signal syntax:
QObject.connect(source, SIGNAL("changed(const QColor&)"), target_slot)
Returns the currently chosen color.
Returns the default color or an invalid color
if no default color is set.
| QSize minimumSizeHint |
( |
|
self ) |
|
Sets the current color to c.
| setDefaultColor |
( |
self, |
|
|
|
QColor |
c |
|
) |
|
|
|
Sets the default color to c.