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 (qt) [public ]
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 )

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: dfaure on kde.faure.org on Thu Jan 17 22:16:05 2002, using kdoc 2.0a53.