KColorPatch Class Reference
from PyKDE4.kdeui import *
Inherits: QFrame → QWidget → QObject
Detailed Description
A color displayer.
The KColorPatch widget is a (usually small) widget showing a selected color e.g. in the KColorDialog. It automatically handles drag and drop from and on the widget.

"KDE Color Patch"
| Signals | |
| colorChanged (QColor a0) | |
| Methods | |
| __init__ (self, QWidget parent) | |
| __init__ (self, KColorPatch a0) | |
| QColor | color (self) | 
| dragEnterEvent (self, QDragEnterEvent a0) | |
| dropEvent (self, QDropEvent a0) | |
| mouseMoveEvent (self, QMouseEvent a0) | |
| paintEvent (self, QPaintEvent pe) | |
| setColor (self, QColor col) | |
Signal Documentation
| colorChanged | ( | QColor | a0 | |
| ) | 
This signal is emitted whenever the current color changes due to a drop event
- Signal syntax:
- QObject.connect(source, SIGNAL("colorChanged(const QColor&)"), target_slot)
Method Documentation
| __init__ | ( | self, | ||
| QWidget | parent | |||
| ) | 
| __init__ | ( | self, | ||
| KColorPatch | a0 | |||
| ) | 
| QColor color | ( | self ) | 
Get the currently displayed color
| dragEnterEvent | ( | self, | ||
| QDragEnterEvent | a0 | |||
| ) | 
| dropEvent | ( | self, | ||
| QDropEvent | a0 | |||
| ) | 
| mouseMoveEvent | ( | self, | ||
| QMouseEvent | a0 | |||
| ) | 
| paintEvent | ( | self, | ||
| QPaintEvent | pe | |||
| ) | 
| setColor | ( | self, | ||
| QColor | col | |||
| ) | 
Set the color to display and update the display
- Parameters:
- 
col color to display 
 KDE 4.5 PyKDE API Reference
        KDE 4.5 PyKDE API Reference