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


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

Inheritance diagram for KSelector:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=118pt]{classKSelector__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KSelector:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=96pt]{classKSelector__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf value\-Changed} (int value)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KSelector} ({\bf QWidget} $\ast$parent=0, const char $\ast$name=0)
\item 
{\bf KSelector} (Orientation o, {\bf QWidget} $\ast$parent=0L, const char $\ast$name=0L)
\item 
Orientation {\bf orientation} () const 
\item 
{\bf QRect} {\bf contents\-Rect} () const 
\item 
void {\bf set\-Indent} (bool i)
\item 
bool {\bf indent} () const 
\item 
void {\bf set\-Value} (int value)
\item 
int {\bf value} () const 
\item 
void {\bf set\-Min\-Value} (int value)
\item 
int {\bf min\-Value} () const 
\item 
void {\bf set\-Max\-Value} (int value)
\item 
int {\bf max\-Value} () const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf draw\-Contents} ({\bf QPainter} $\ast$)
\item 
virtual void {\bf draw\-Arrow} ({\bf QPainter} $\ast$painter, bool {\bf show}, const {\bf QPoint} \&{\bf pos})
\item 
virtual void {\bf value\-Change} ()\label{classKSelector_b2}

\item 
virtual void {\bf paint\-Event} ({\bf QPaint\-Event} $\ast$)\label{classKSelector_b3}

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

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

\item 
virtual void {\bf wheel\-Event} ({\bf QWheel\-Event} $\ast$)\label{classKSelector_b6}

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

\end{CompactItemize}
\subsection*{Properties}
\begin{CompactItemize}
\item 
int {\bf value}\label{classKSelector_00}

\item 
int {\bf min\-Value}\label{classKSelector_01}

\item 
int {\bf max\-Value}\label{classKSelector_02}

\end{CompactItemize}


\subsection{Detailed Description}
KSelector is the base class for other widgets which provides the ability to choose from a one-dimensional range of values. 

An example is the {\bf KGradient\-Selector}{\rm (p.\,\pageref{classKGradientSelector})} which allows to choose from a range of colors.

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



Definition at line 159 of file kselect.h.

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


Constructs a horizontal one-dimensional selection widget. 



Definition at line 217 of file kselect.cpp.\index{KSelector@{KSelector}!KSelector@{KSelector}}
\index{KSelector@{KSelector}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSelector::KSelector (Orientation {\em o}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0L}, const char $\ast$ {\em name} = {\tt 0L})}\label{classKSelector_a1}


Constructs a one-dimensional selection widget with a given orientation. 



Definition at line 224 of file kselect.cpp.

\subsection{Member Function Documentation}
\index{KSelector@{KSelector}!orientation@{orientation}}
\index{orientation@{orientation}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Orientation KSelector::orientation () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSelector_a3}


\begin{Desc}
\item[Returns:]the orientation of the widget. \end{Desc}


Definition at line 184 of file kselect.h.

Referenced by contents\-Rect(), draw\-Arrow(), KGradient\-Selector::draw\-Contents(), and KValue\-Selector::draw\-Palette().\index{KSelector@{KSelector}!contentsRect@{contentsRect}}
\index{contentsRect@{contentsRect}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QRect} KSelector::contents\-Rect () const}\label{classKSelector_a4}


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


Definition at line 236 of file kselect.cpp.

References QWidget::height(), orientation(), and QWidget::width().

Referenced by KGradient\-Selector::draw\-Contents(), KValue\-Selector::draw\-Contents(), and KValue\-Selector::draw\-Palette().\index{KSelector@{KSelector}!setIndent@{setIndent}}
\index{setIndent@{setIndent}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSelector::set\-Indent (bool {\em i})\hspace{0.3cm}{\tt  [inline]}}\label{classKSelector_a5}


Sets the indent option of the widget to i. 

This determines whether a shaded frame is drawn. 

Definition at line 196 of file kselect.h.\index{KSelector@{KSelector}!indent@{indent}}
\index{indent@{indent}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSelector::indent () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSelector_a6}


\begin{Desc}
\item[Returns:]whether the indent option is set. \end{Desc}


Definition at line 201 of file kselect.h.\index{KSelector@{KSelector}!setValue@{setValue}}
\index{setValue@{setValue}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSelector::set\-Value (int {\em value})\hspace{0.3cm}{\tt  [inline]}}\label{classKSelector_a7}


Sets the value. 



Reimplemented from {\bf QRange\-Control}.

Definition at line 207 of file kselect.h.

References QRange\-Control::set\-Value().\index{KSelector@{KSelector}!value@{value}}
\index{value@{value}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KSelector::value () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSelector_a8}


\begin{Desc}
\item[Returns:]the value. \end{Desc}


Reimplemented from {\bf QRange\-Control}.

Definition at line 213 of file kselect.h.

References QRange\-Control::value().\index{KSelector@{KSelector}!setMinValue@{setMinValue}}
\index{setMinValue@{setMinValue}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSelector::set\-Min\-Value (int {\em value})\hspace{0.3cm}{\tt  [inline]}}\label{classKSelector_a9}


Sets the min value. 



Reimplemented from {\bf QRange\-Control}.

Definition at line 219 of file kselect.h.

References QRange\-Control::set\-Min\-Value().\index{KSelector@{KSelector}!minValue@{minValue}}
\index{minValue@{minValue}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KSelector::min\-Value () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSelector_a10}


\begin{Desc}
\item[Returns:]the min value. \end{Desc}


Reimplemented from {\bf QRange\-Control}.

Definition at line 225 of file kselect.h.

References QRange\-Control::min\-Value().\index{KSelector@{KSelector}!setMaxValue@{setMaxValue}}
\index{setMaxValue@{setMaxValue}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSelector::set\-Max\-Value (int {\em value})\hspace{0.3cm}{\tt  [inline]}}\label{classKSelector_a11}


Sets the max value. 



Reimplemented from {\bf QRange\-Control}.

Definition at line 231 of file kselect.h.

References QRange\-Control::set\-Max\-Value().\index{KSelector@{KSelector}!maxValue@{maxValue}}
\index{maxValue@{maxValue}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KSelector::max\-Value () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSelector_a12}


\begin{Desc}
\item[Returns:]the max value. \end{Desc}


Reimplemented from {\bf QRange\-Control}.

Definition at line 237 of file kselect.h.

References QRange\-Control::max\-Value().\index{KSelector@{KSelector}!valueChanged@{valueChanged}}
\index{valueChanged@{valueChanged}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSelector::value\-Changed (int {\em value})\hspace{0.3cm}{\tt  [signal]}}\label{classKSelector_l0}


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

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


Override this function to draw the contents of the control. 

The default implementation does nothing.

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

Reimplemented in {\bf KValue\-Selector} {\rm (p.\,\pageref{classKValueSelector_b2})}, and {\bf KGradient\-Selector} {\rm (p.\,\pageref{classKGradientSelector_b0})}.

Definition at line 338 of file kselect.cpp.\index{KSelector@{KSelector}!drawArrow@{drawArrow}}
\index{drawArrow@{drawArrow}!KSelector@{KSelector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSelector::draw\-Arrow ({\bf QPainter} $\ast$ {\em painter}, bool {\em show}, const {\bf QPoint} \& {\em pos})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKSelector_b1}


Override this function to draw the cursor which indicates the current value. 

This function is always called twice, once with argument show=false to clear the old cursor, once with argument show=true to draw the new one. 

Definition at line 341 of file kselect.cpp.

References QWidget::color\-Group(), QPainter::draw\-Polygon(), orientation(), QWidget::repaint(), QPainter::set\-Brush(), QPainter::set\-Pen(), QPoint\-Array::set\-Point(), QPoint::x(), and QPoint::y().

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