.TH "KXYSelector" kde3 "11 Jun 2005" "Version Version 3.4.1" "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
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKXYSelector\fP (\fBQWidget\fP *parent=0, const char *name=0)"
.br
.ti -1c
.RI "\fB~KXYSelector\fP ()"
.br
.ti -1c
.RI "void \fBsetValues\fP (int xPos, int yPos)"
.br
.ti -1c
.RI "void \fBsetXValue\fP (int xPos)"
.br
.ti -1c
.RI "void \fBsetYValue\fP (int yPos)"
.br
.ti -1c
.RI "void \fBsetRange\fP (int minX, int minY, int maxX, int maxY)"
.br
.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
.ti -1c
.RI "virtual void \fBdrawCursor\fP (\fBQPainter\fP *p, int xp, int yp)"
.br
.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 \fBwheelEvent\fP (\fBQWheelEvent\fP *)"
.br
.ti -1c
.RI "void \fBvaluesFromPosition\fP (int \fBx\fP, int \fBy\fP, int &xVal, int &yVal) const "
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Properties"

.in +1c
.ti -1c
.RI "int \fBxValue\fP"
.br
.ti -1c
.RI "int \fByValue\fP"
.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 43 of file kselect.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KXYSelector::KXYSelector (\fBQWidget\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
Constructs a two-dimensional selector widget which has a value range of [0..100] in both directions. 
.PP
Definition at line 35 of file kselect.cpp.
.PP
References QPixmap::resize(), and QPixmap::setOptimization().
.SS "KXYSelector::~\fBKXYSelector\fP ()"
.PP
Destructs the widget. 
.PP
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. 
.PP
\fBParameters:\fP
.RS 4
\fIxPos\fP the horizontal value 
.br
\fIyPos\fP the veritcal value 
.RE
.PP

.PP
Definition at line 73 of file kselect.cpp.
.PP
References QWidget::height(), and QWidget::width().
.PP
Referenced by setXValue(), and setYValue().
.SS "void KXYSelector::setXValue (int xPos)"
.PP
Sets the current horizontal value. 
.PP
\fBParameters:\fP
.RS 4
\fIxPos\fP the horizontal value 
.RE
.PP

.PP
Definition at line 63 of file kselect.cpp.
.PP
References setValues().
.SS "void KXYSelector::setYValue (int yPos)"
.PP
Sets the current vertical value. 
.PP
\fBParameters:\fP
.RS 4
\fIyPos\fP the veritcal value 
.RE
.PP

.PP
Definition at line 68 of file kselect.cpp.
.PP
References setValues().
.SS "void KXYSelector::setRange (int minX, int minY, int maxX, int maxY)"
.PP
Sets the range of possible values. 
.PP
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

.PP
Definition at line 88 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

.PP
Definition at line 92 of file kselect.h.
.SS "\fBQRect\fP KXYSelector::contentsRect () const"
.PP
\fBReturns:\fP
.RS 4
the rectangle on which subclasses should draw. 
.RE
.PP

.PP
Definition at line 94 of file kselect.cpp.
.PP
References QWidget::height(), and QWidget::width().
.PP
Referenced by KHSSelector::drawContents(), and KHSSelector::drawPalette().
.SS "void KXYSelector::valueChanged (int x, int y)\fC [signal]\fP"
.PP
This signal is emitted whenever the user chooses a value, e.g. 
.PP
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. 
.PP
The default implementation does nothing.
.PP
Draw within \fBcontentsRect()\fP only. 
.PP
Reimplemented in \fBKHSSelector\fP.
.PP
Definition at line 196 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. 
.PP
Definition at line 200 of file kselect.cpp.
.PP
References QPainter::drawLine(), and QPainter::setPen().
.SS "void KXYSelector::valuesFromPosition (int x, int y, int & xVal, int & yVal) const\fC [protected]\fP"
.PP
Converts a pixel position to its corresponding values. 
.PP
Definition at line 154 of file kselect.cpp.
.PP
References QWidget::height(), and QWidget::width().

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