.TH "KXYSelector" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KXYSelector \- KXYSelector is the base class for other widgets which provides the ability to choose from a two-dimensional range of values.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kselect.h>\fP
.PP
Inherits \fBQWidget\fP.
.PP
Inherited by \fBKHSSelector\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBvalueChanged\fP (int \fBx\fP, int \fBy\fP)"
.br
.RI "\fIThis signal is emitted whenever the user chooses a value, e.g. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKXYSelector\fP (\fBQWidget\fP *parent=0, const  char *name=0)"
.br
.RI "\fIConstructs a two-dimensional selector widget which has a value range of [0..100] in both directions. \fP"
.ti -1c
.RI "\fB~KXYSelector\fP ()"
.br
.RI "\fIDestructs the widget. \fP"
.ti -1c
.RI "void \fBsetValues\fP (int xPos, int yPos)"
.br
.RI "\fISets the current values in horizontal and vertical direction. \fP"
.ti -1c
.RI "void \fBsetRange\fP (int minX, int minY, int maxX, int maxY)"
.br
.RI "\fISets the range of possible values. \fP"
.ti -1c
.RI "int \fBxValue\fP () const "
.br
.ti -1c
.RI "int \fByValue\fP () const "
.br
.ti -1c
.RI "\fBQRect\fP \fBcontentsRect\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBdrawContents\fP (\fBQPainter\fP *)"
.br
.RI "\fIOverride this function to draw the contents of the widget. \fP"
.ti -1c
.RI "virtual void \fBdrawCursor\fP (\fBQPainter\fP *p, int xp, int yp)"
.br
.RI "\fIOverride this function to draw the cursor which indicates the currently selected value pair. \fP"
.ti -1c
.RI "virtual void \fBpaintEvent\fP (\fBQPaintEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBmousePressEvent\fP (\fBQMouseEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBmouseMoveEvent\fP (\fBQMouseEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
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 \fBKHSSelector\fP which allows to choose from a range of colors, and which is used in \fBKColorDialog\fP.
.PP
A custom drawing routine for the widget surface has to be provided by the subclass. 
.PP
Definition at line 41 of file kselect.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KXYSelector::KXYSelector (\fBQWidget\fP * parent = 0, const char * name = 0)"
.PP
Constructs a two-dimensional selector widget which has a value range of [0..100] in both directions. Definition at line 35 of file kselect.cpp.
.PP
References KStdAccel::name(), QPixmap::resize(), and QPixmap::setOptimization().
.SS "KXYSelector::~\fBKXYSelector\fP ()"
.PP
Destructs the widget. Definition at line 49 of file kselect.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KXYSelector::setValues (int xPos, int yPos)"
.PP
Sets the current values in horizontal and vertical direction. Definition at line 63 of file kselect.cpp.
.PP
References QWidget::height(), and QWidget::width().
.SS "void KXYSelector::setRange (int minX, int minY, int maxX, int maxY)"
.PP
Sets the range of possible values. Definition at line 53 of file kselect.cpp.
.SS "int KXYSelector::xValue () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the current value in horizontal direction. 
.RE
.PP
Definition at line 69 of file kselect.h.
.SS "int KXYSelector::yValue () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the current value in vertical direction. 
.RE
.PP
Definition at line 73 of file kselect.h.
.SS "\fBQRect\fP KXYSelector::contentsRect () const"
.PP
\fBReturns:\fP
.RS 4
the rectangle on which subclasses should draw. 
.RE
.PP
Definition at line 84 of file kselect.cpp.
.PP
References QWidget::height(), and QWidget::width().
.SS "void KXYSelector::valueChanged (int x, int y)\fC [signal]\fP"
.PP
This signal is emitted whenever the user chooses a value, e.g. by clicking with the mouse on the widget. 
.SS "void KXYSelector::drawContents (\fBQPainter\fP *)\fC [protected, virtual]\fP"
.PP
Override this function to draw the contents of the widget. The default implementation does nothing.
.PP
Draw within \fBcontentsRect\fP() only. Reimplemented in \fBKHSSelector\fP.
.PP
Definition at line 169 of file kselect.cpp.
.SS "void KXYSelector::drawCursor (\fBQPainter\fP * p, int xp, int yp)\fC [protected, virtual]\fP"
.PP
Override this function to draw the cursor which indicates the currently selected value pair. Definition at line 173 of file kselect.cpp.
.PP
References QPainter::drawLine(), and QPainter::setPen().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
