\section{KXYSelector Class Reference}
\label{classKXYSelector}\index{KXYSelector@{KXYSelector}}
KXYSelector is the base class for other widgets which provides the ability to choose from a two-dimensional range of values.  


{\tt \#include $<$kselect.h$>$}

Inheritance diagram for KXYSelector:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=56pt]{classKXYSelector__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KXYSelector:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=85pt]{classKXYSelector__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf value\-Changed} (int {\bf x}, int {\bf y})
\begin{CompactList}\small\item\em This signal is emitted whenever the user chooses a value, e.g. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KXYSelector} ({\bf QWidget} $\ast$parent=0, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Constructs a two-dimensional selector widget which has a value range of [0..100] in both directions. \item\end{CompactList}\item 
{\bf $\sim$KXYSelector} ()
\begin{CompactList}\small\item\em Destructs the widget. \item\end{CompactList}\item 
void {\bf set\-Values} (int x\-Pos, int y\-Pos)
\begin{CompactList}\small\item\em Sets the current values in horizontal and vertical direction. \item\end{CompactList}\item 
void {\bf set\-Range} (int min\-X, int min\-Y, int max\-X, int max\-Y)
\begin{CompactList}\small\item\em Sets the range of possible values. \item\end{CompactList}\item 
int {\bf x\-Value} () const 
\item 
int {\bf y\-Value} () const 
\item 
{\bf QRect} {\bf contents\-Rect} () const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf draw\-Contents} ({\bf QPainter} $\ast$)
\begin{CompactList}\small\item\em Override this function to draw the contents of the widget. \item\end{CompactList}\item 
virtual void {\bf draw\-Cursor} ({\bf QPainter} $\ast$p, int xp, int yp)
\begin{CompactList}\small\item\em Override this function to draw the cursor which indicates the currently selected value pair. \item\end{CompactList}\item 
virtual void {\bf paint\-Event} ({\bf QPaint\-Event} $\ast$e)\label{classKXYSelector_b2}

\item 
virtual void {\bf mouse\-Press\-Event} ({\bf QMouse\-Event} $\ast$e)\label{classKXYSelector_b3}

\item 
virtual void {\bf mouse\-Move\-Event} ({\bf QMouse\-Event} $\ast$e)\label{classKXYSelector_b4}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKXYSelector_b5}

\end{CompactItemize}


\subsection{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 {\bf KHSSelector}{\rm (p.\,\pageref{classKHSSelector})} which allows to choose from a range of colors, and which is used in {\bf KColor\-Dialog}{\rm (p.\,\pageref{classKColorDialog})}.

A custom drawing routine for the widget surface has to be provided by the subclass. 



Definition at line 41 of file kselect.h.

\subsection{Constructor \& Destructor Documentation}
\index{KXYSelector@{KXYSelector}!KXYSelector@{KXYSelector}}
\index{KXYSelector@{KXYSelector}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KXYSelector::KXYSelector ({\bf QWidget} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0)}\label{classKXYSelector_a0}


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.

References KStd\-Accel::name(), QPixmap::resize(), and QPixmap::set\-Optimization().\index{KXYSelector@{KXYSelector}!~KXYSelector@{$\sim$KXYSelector}}
\index{~KXYSelector@{$\sim$KXYSelector}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KXYSelector::$\sim${\bf KXYSelector} ()}\label{classKXYSelector_a1}


Destructs the widget. 



Definition at line 49 of file kselect.cpp.

\subsection{Member Function Documentation}
\index{KXYSelector@{KXYSelector}!setValues@{setValues}}
\index{setValues@{setValues}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXYSelector::set\-Values (int {\em x\-Pos}, int {\em y\-Pos})}\label{classKXYSelector_a2}


Sets the current values in horizontal and vertical direction. 



Definition at line 63 of file kselect.cpp.

References QWidget::height(), and QWidget::width().\index{KXYSelector@{KXYSelector}!setRange@{setRange}}
\index{setRange@{setRange}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXYSelector::set\-Range (int {\em min\-X}, int {\em min\-Y}, int {\em max\-X}, int {\em max\-Y})}\label{classKXYSelector_a3}


Sets the range of possible values. 



Definition at line 53 of file kselect.cpp.\index{KXYSelector@{KXYSelector}!xValue@{xValue}}
\index{xValue@{xValue}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KXYSelector::x\-Value () const\hspace{0.3cm}{\tt  [inline]}}\label{classKXYSelector_a4}


\begin{Desc}
\item[Returns:]the current value in horizontal direction. \end{Desc}


Definition at line 69 of file kselect.h.\index{KXYSelector@{KXYSelector}!yValue@{yValue}}
\index{yValue@{yValue}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KXYSelector::y\-Value () const\hspace{0.3cm}{\tt  [inline]}}\label{classKXYSelector_a5}


\begin{Desc}
\item[Returns:]the current value in vertical direction. \end{Desc}


Definition at line 73 of file kselect.h.\index{KXYSelector@{KXYSelector}!contentsRect@{contentsRect}}
\index{contentsRect@{contentsRect}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QRect} KXYSelector::contents\-Rect () const}\label{classKXYSelector_a6}


\begin{Desc}
\item[Returns:]the rectangle on which subclasses should draw. \end{Desc}


Definition at line 84 of file kselect.cpp.

References QWidget::height(), and QWidget::width().\index{KXYSelector@{KXYSelector}!valueChanged@{valueChanged}}
\index{valueChanged@{valueChanged}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXYSelector::value\-Changed (int {\em x}, int {\em y})\hspace{0.3cm}{\tt  [signal]}}\label{classKXYSelector_l0}


This signal is emitted whenever the user chooses a value, e.g. 

by clicking with the mouse on the widget. \index{KXYSelector@{KXYSelector}!drawContents@{drawContents}}
\index{drawContents@{drawContents}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXYSelector::draw\-Contents ({\bf QPainter} $\ast$)\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKXYSelector_b0}


Override this function to draw the contents of the widget. 

The default implementation does nothing.

Draw within {\bf contents\-Rect}{\rm (p.\,\pageref{classKXYSelector_a6})}() only. 

Reimplemented in {\bf KHSSelector} {\rm (p.\,\pageref{classKHSSelector_b2})}.

Definition at line 169 of file kselect.cpp.\index{KXYSelector@{KXYSelector}!drawCursor@{drawCursor}}
\index{drawCursor@{drawCursor}!KXYSelector@{KXYSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXYSelector::draw\-Cursor ({\bf QPainter} $\ast$ {\em p}, int {\em xp}, int {\em yp})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKXYSelector_b1}


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



Definition at line 173 of file kselect.cpp.

References QPainter::draw\-Line(), and QPainter::set\-Pen().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kselect.h\item 
kselect.cpp\end{CompactItemize}
