kdeui
KXYSelector Class Reference
KXYSelector is the base class for other widgets which provides the ability to choose from a two-dimensional range of values. More...
#include <kselect.h>
Signals | |
void | valueChanged (int x, int y) |
Public Member Functions | |
QRect | contentsRect () const |
KXYSelector (QWidget *parent=0, const char *name=0) | |
void | setRange (int minX, int minY, int maxX, int maxY) |
void | setValues (int xPos, int yPos) |
void | setXValue (int xPos) |
void | setYValue (int yPos) |
int | xValue () const |
int | yValue () const |
~KXYSelector () | |
Protected Member Functions | |
virtual void | drawContents (QPainter *) |
virtual void | drawCursor (QPainter *p, int xp, int yp) |
virtual void | mouseMoveEvent (QMouseEvent *e) |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | paintEvent (QPaintEvent *e) |
void | valuesFromPosition (int x, int y, int &xVal, int &yVal) const |
virtual void | virtual_hook (int id, void *data) |
virtual void | wheelEvent (QWheelEvent *) |
Properties | |
int | xValue |
int | yValue |
Detailed Description
KXYSelector is the base class for other widgets which provides the ability to choose from a two-dimensional range of values.The currently chosen value is indicated by a cross. An example is the KHSSelector which allows to choose from a range of colors, and which is used in KColorDialog.
A custom drawing routine for the widget surface has to be provided by the subclass.
Definition at line 43 of file kselect.h.
Constructor & Destructor Documentation
KXYSelector::KXYSelector | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) |
Constructs a two-dimensional selector widget which has a value range of [0.
.100] in both directions.
Definition at line 36 of file kselect.cpp.
KXYSelector::~KXYSelector | ( | ) |
Member Function Documentation
QRect KXYSelector::contentsRect | ( | ) | const |
void KXYSelector::drawContents | ( | QPainter * | ) | [protected, virtual] |
Override this function to draw the contents of the widget.
The default implementation does nothing.
Draw within contentsRect() only.
Reimplemented in KHSSelector.
Definition at line 217 of file kselect.cpp.
void KXYSelector::drawCursor | ( | QPainter * | p, | |
int | xp, | |||
int | yp | |||
) | [protected, virtual] |
Override this function to draw the cursor which indicates the currently selected value pair.
Definition at line 221 of file kselect.cpp.
void KXYSelector::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
void KXYSelector::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
void KXYSelector::paintEvent | ( | QPaintEvent * | e | ) | [protected, virtual] |
void KXYSelector::setRange | ( | int | minX, | |
int | minY, | |||
int | maxX, | |||
int | maxY | |||
) |
void KXYSelector::setValues | ( | int | xPos, | |
int | yPos | |||
) |
Sets the current values in horizontal and vertical direction.
- Parameters:
-
xPos the horizontal value yPos the veritcal value
Definition at line 75 of file kselect.cpp.
void KXYSelector::setXValue | ( | int | xPos | ) |
Sets the current horizontal value.
- Parameters:
-
xPos the horizontal value
Definition at line 65 of file kselect.cpp.
void KXYSelector::setYValue | ( | int | yPos | ) |
Sets the current vertical value.
- Parameters:
-
yPos the veritcal value
Definition at line 70 of file kselect.cpp.
void KXYSelector::valueChanged | ( | int | x, | |
int | y | |||
) | [signal] |
This signal is emitted whenever the user chooses a value, e.g.
by clicking with the mouse on the widget.
void KXYSelector::valuesFromPosition | ( | int | x, | |
int | y, | |||
int & | xVal, | |||
int & | yVal | |||
) | const [protected] |
void KXYSelector::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
void KXYSelector::wheelEvent | ( | QWheelEvent * | e | ) | [protected, virtual] |
int KXYSelector::xValue | ( | ) | const [inline] |
int KXYSelector::yValue | ( | ) | const [inline] |
Property Documentation
The documentation for this class was generated from the following files: