KSelector Class Reference
KSelector is the base class for other widgets which provides the ability to choose from a one-dimensional range of values. More...
#include <kselect.h>
Inheritance diagram for KSelector:

Signals | |
void | valueChanged (int value) |
Public Methods | |
KSelector (QWidget *parent=0, const char *name=0) | |
KSelector (Orientation o, QWidget *parent=0L, const char *name=0L) | |
~KSelector () | |
Orientation | orientation () const |
QRect | contentsRect () const |
void | setIndent (bool i) |
bool | indent () const |
void | setValue (int value) |
int | value () const |
void | setMinValue (int value) |
int | minValue () const |
void | setMaxValue (int value) |
int | maxValue () const |
Protected Methods | |
virtual void | drawContents (QPainter *) |
virtual void | drawArrow (QPainter *painter, bool show, const QPoint &pos) |
virtual void | valueChange () |
virtual void | paintEvent (QPaintEvent *) |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | mouseMoveEvent (QMouseEvent *e) |
virtual void | wheelEvent (QWheelEvent *) |
virtual void | virtual_hook (int id, void *data) |
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.
Definition at line 140 of file kselect.h.
Constructor & Destructor Documentation
|
Constructs a horizontal one-dimensional selection widget.
Definition at line 207 of file kselect.cpp. |
|
Constructs a one-dimensional selection widget with a given orientation.
Definition at line 214 of file kselect.cpp. |
Member Function Documentation
|
Definition at line 165 of file kselect.h. Referenced by contentsRect(), drawArrow(), KGradientSelector::drawContents(), and KValueSelector::drawPalette(). |
|
Definition at line 226 of file kselect.cpp. References QWidget::height(), orientation(), and QWidget::width(). Referenced by KGradientSelector::drawContents(), KValueSelector::drawContents(), and KValueSelector::drawPalette(). |
|
Sets the indent option of the widget to i. This determines whether a shaded frame is drawn. |
|
|
|
Sets the value.
Reimplemented from QRangeControl. Definition at line 188 of file kselect.h. References QRangeControl::setValue(), and value(). |
|
Reimplemented from QRangeControl. Definition at line 194 of file kselect.h. References QRangeControl::value(). Referenced by setMaxValue(), setMinValue(), and setValue(). |
|
Sets the min value.
Reimplemented from QRangeControl. Definition at line 200 of file kselect.h. References QRangeControl::setMinValue(), and value(). |
|
Reimplemented from QRangeControl. Definition at line 206 of file kselect.h. References QRangeControl::minValue(). |
|
Sets the max value.
Reimplemented from QRangeControl. Definition at line 212 of file kselect.h. References QRangeControl::setMaxValue(), and value(). |
|
Reimplemented from QRangeControl. Definition at line 218 of file kselect.h. References QRangeControl::maxValue(). |
|
This signal is emitted whenever the user chooses a value, e.g. by clicking with the mouse on the widget. |
|
Override this function to draw the contents of the control. The default implementation does nothing. Draw only within contentsRect(). Reimplemented in KValueSelector, and KGradientSelector. Definition at line 328 of file kselect.cpp. |
|
Override this function to draw the cursor which indicates the current value. This function is always called twice, once with argument show=false to clear the old cursor, once with argument show=true to draw the new one. Definition at line 331 of file kselect.cpp. References QWidget::colorGroup(), QPainter::drawPolygon(), orientation(), QWidget::repaint(), QPainter::setBrush(), QPainter::setPen(), QPointArray::setPoint(), QPoint::x(), and QPoint::y(). |
The documentation for this class was generated from the following files: