kdeui
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>
Signals | |
void | valueChanged (int value) |
Public Member Functions | |
QRect | contentsRect () const |
bool | indent () const |
KSelector (Orientation o, QWidget *parent=0L, const char *name=0L) | |
KSelector (QWidget *parent=0, const char *name=0) | |
int | maxValue () const |
int | minValue () const |
Orientation | orientation () const |
void | setIndent (bool i) |
void | setMaxValue (int value) |
void | setMinValue (int value) |
void | setValue (int value) |
int | value () const |
~KSelector () | |
Protected Member Functions | |
virtual void | drawArrow (QPainter *painter, bool show, const QPoint &pos) |
virtual void | drawContents (QPainter *) |
virtual void | mouseMoveEvent (QMouseEvent *e) |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | paintEvent (QPaintEvent *) |
virtual void | valueChange () |
virtual void | virtual_hook (int id, void *data) |
virtual void | wheelEvent (QWheelEvent *) |
Properties | |
int | maxValue |
int | minValue |
int | value |
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 159 of file kselect.h.
Constructor & Destructor Documentation
KSelector::KSelector | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) |
Constructs a horizontal one-dimensional selection widget.
Definition at line 238 of file kselect.cpp.
KSelector::KSelector | ( | Orientation | o, | |
QWidget * | parent = 0L , |
|||
const char * | name = 0L | |||
) |
Constructs a one-dimensional selection widget with a given orientation.
Definition at line 245 of file kselect.cpp.
KSelector::~KSelector | ( | ) |
Definition at line 253 of file kselect.cpp.
Member Function Documentation
QRect KSelector::contentsRect | ( | ) | const |
void KSelector::drawArrow | ( | QPainter * | painter, | |
bool | show, | |||
const QPoint & | pos | |||
) | [protected, virtual] |
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 370 of file kselect.cpp.
void KSelector::drawContents | ( | QPainter * | ) | [protected, virtual] |
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 367 of file kselect.cpp.
bool KSelector::indent | ( | ) | const [inline] |
int KSelector::maxValue | ( | ) | const [inline] |
int KSelector::minValue | ( | ) | const [inline] |
void KSelector::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
void KSelector::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Orientation KSelector::orientation | ( | ) | const [inline] |
void KSelector::paintEvent | ( | QPaintEvent * | ) | [protected, virtual] |
void KSelector::setIndent | ( | bool | i | ) | [inline] |
void KSelector::setMaxValue | ( | int | value | ) | [inline] |
void KSelector::setMinValue | ( | int | value | ) | [inline] |
void KSelector::setValue | ( | int | value | ) | [inline] |
int KSelector::value | ( | ) | const [inline] |
void KSelector::valueChange | ( | ) | [protected, virtual] |
void KSelector::valueChanged | ( | int | value | ) | [signal] |
This signal is emitted whenever the user chooses a value, e.g.
by clicking with the mouse on the widget.
void KSelector::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
void KSelector::wheelEvent | ( | QWheelEvent * | e | ) | [protected, virtual] |
Property Documentation
The documentation for this class was generated from the following files: