# 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>`
Inherits | QWidget (qt) [public ]
Inherited by | KHSSelector
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KXYSelector ( QWidget *parent=0, const char *name=0 )
- ~KXYSelector ()
- void setValues ( int _xPos, int _yPos )
- void setRange ( int _minX, int _minY, int _maxX, int _maxY )
- int xValue ()
- int yValue ()
- QRect contentsRect () const

#### Signals

- void valueChanged ( int _x, int _y )

#### Protected Methods

- virtual void drawContents ( QPainter * )
- virtual void drawCursor ( QPainter *p, int xp, int yp )

#### Protected Members

- int px
- int py
- int xPos
- int yPos
- int minX
- int maxX
- int minY
- int maxY
- QPixmap store

## 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 ) | ### 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

Returns: the current value in horizontal direction.

int yValue () | ### yValue

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 doesn 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]

Reimplemented from QWidget for internal purposes..

void mousePressEvent ( QMouseEvent *e ) | ### mousePressEvent

[protected virtual]

Reimplemented from QWidget for internal purposes..

void mouseMoveEvent ( QMouseEvent *e ) | ### mouseMoveEvent

[protected virtual]

Reimplemented from QWidget for internal purposes..

int px | ### px

[protected]

int py | ### py

[protected]

int xPos | ### xPos

[protected]

int yPos | ### yPos

[protected]

int minX | ### minX

[protected]

int maxX | ### maxX

[protected]

int minY | ### minY

[protected]

int maxY | ### maxY

[protected]

QPixmap store | ### store

[protected]

Generated by: root@i386.ports.openbsd.org on Wed Apr 25 13:58:24 2001, using kdoc 2.0a53.