class KXYSelector

KXYSelector is the base class for other widgets which provides the ability to choose from a two-dimensional range of values. More...

Definition#include <kselect.h>
InheritsQWidget (kdecore)
Inherited byKHSSelector
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Protected Methods

Protected Members


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.

 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.

KXYSelector ()

Destructs the widget.

void  setValues ( int _xPos, int _yPos )

Sets the current values in horizontal and vertical direction.

void  setRange ( int _minX, int _minY, int _maxX, int _maxY )

Sets the range of possible values.

int  xValue ()

Returns: the current value in horizontal direction.

int  yValue ()

Returns: the current value in vertical direction.

QRect  contentsRect ()

[const]

Returns: the rectangle on which subclasses should draw.

void  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  drawContents ( QPainter * )

[protected virtual]

Override this function to draw the contents of the widget. The default implementation doesn nothing.

Draw within contentsRect() only.

void  drawCursor ( QPainter *p, int xp, int yp )

[protected virtual]

Override this function to draw the cursor which indicates the currently selected value pair.

void  paintEvent ( QPaintEvent *e )

[protected virtual]

void  mousePressEvent ( QMouseEvent *e )

[protected virtual]

void  mouseMoveEvent ( QMouseEvent *e )

[protected virtual]

int px

[protected]

int py

[protected]

int xPos

[protected]

int yPos

[protected]

int minX

[protected]

int maxX

[protected]

int minY

[protected]

int maxY

[protected]

QPixmap store

[protected]


Generated by: baudens@ke.mandrakesoft.com on Thu Oct 26 17:36:26 2000, using kdoc 2.0a40.