KSelector Class Reference
from PyKDE4.kdeui import *
Inherits: QAbstractSlider → QWidget → QObject
Subclasses: KColorValueSelector, KGradientSelector
Detailed Description
KSelector is the base class for other widgets which
provides the ability to choose from a one-dimensional
range of values. An example is the KGradientSelector
which allows to choose from a range of colors.
A custom drawing routine for the widget surface has
to be provided by the subclass.
Methods |
| | __init__ (self, QWidget parent=0) |
| | __init__ (self, Qt::Orientation o, QWidget parent=0) |
| | __init__ (self, KSelector a0) |
| Qt::ArrowType | arrowDirection (self) |
| QRect | contentsRect (self) |
| | drawArrow (self, QPainter painter, QPoint pos) |
| | drawContents (self, QPainter a0) |
| bool | indent (self) |
| | mouseMoveEvent (self, QMouseEvent e) |
| | mousePressEvent (self, QMouseEvent e) |
| | mouseReleaseEvent (self, QMouseEvent e) |
| | paintEvent (self, QPaintEvent a0) |
| | setArrowDirection (self, Qt::ArrowType direction) |
| | setIndent (self, bool i) |
| | wheelEvent (self, QWheelEvent a0) |
Method Documentation
| __init__ |
( |
self, |
|
|
|
QWidget |
parent=0 |
|
) |
|
|
|
Constructs a horizontal one-dimensional selection widget.
Constructs a one-dimensional selection widget with
a given orientation.
- Returns:
- the current arrow direction
| QRect contentsRect |
( |
|
self ) |
|
- Returns:
- the rectangle on which subclasses should draw.
| drawArrow |
( |
self, |
|
|
|
QPainter |
painter, |
|
|
QPoint |
pos |
|
) |
|
|
|
Override this function to draw the cursor which
indicates the current value.
| drawContents |
( |
self, |
|
|
|
QPainter |
a0 |
|
) |
|
|
|
Override this function to draw the contents of the control.
The default implementation does nothing.
Draw only within contentsRect().
- Returns:
- whether the indent option is set.
| mouseMoveEvent |
( |
self, |
|
|
|
QMouseEvent |
e |
|
) |
|
|
|
| mousePressEvent |
( |
self, |
|
|
|
QMouseEvent |
e |
|
) |
|
|
|
| mouseReleaseEvent |
( |
self, |
|
|
|
QMouseEvent |
e |
|
) |
|
|
|
| paintEvent |
( |
self, |
|
|
|
QPaintEvent |
a0 |
|
) |
|
|
|
Sets the arrow direction.
| setIndent |
( |
self, |
|
|
|
bool |
i |
|
) |
|
|
|
Sets the indent option of the widget to i.
This determines whether a shaded frame is drawn.
| wheelEvent |
( |
self, |
|
|
|
QWheelEvent |
a0 |
|
) |
|
|
|