|
|
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.
KXYSelector ( QWidget *parent=0, const char *name=0 )
| KXYSelector |
Constructs a two-dimensional selector widget which has a value range of [0..100] in both directions.
~KXYSelector ()
| ~KXYSelector |
Destructs the widget.
void setValues ( int xPos, int yPos )
| setValues |
Sets the current values in horizontal and vertical direction.
void setRange ( int minX, int minY, int maxX, int maxY )
| setRange |
Sets the range of possible values.
int xValue ()
| xValue |
[const]
Returns: the current value in horizontal direction.
int yValue ()
| yValue |
[const]
Returns: the current value in vertical direction.
QRect contentsRect ()
| contentsRect |
[const]
Returns: the rectangle on which subclasses should draw.
void valueChanged ( int x, int y )
| valueChanged |
[signal]
This signal is emitted whenever the user chooses a value, e.g. by clicking with the mouse on the widget.
void drawContents ( QPainter * )
| drawContents |
[protected virtual]
Override this function to draw the contents of the widget. The default implementation does nothing.
Draw within contentsRect() only.
void drawCursor ( QPainter *p, int xp, int yp )
| drawCursor |
[protected virtual]
Override this function to draw the cursor which indicates the currently selected value pair.
void paintEvent ( QPaintEvent *e )
| paintEvent |
[protected virtual]
void mousePressEvent ( QMouseEvent *e )
| mousePressEvent |
[protected virtual]
void mouseMoveEvent ( QMouseEvent *e )
| mouseMoveEvent |
[protected virtual]
void virtual_hook ( int id, void* data )
| virtual_hook |
[protected virtual]
Generated by: caleb on tcdevel on Tue Jan 28 12:54:10 2003, using kdoc $. |