\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=120pt]{classKSelector__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KSelector:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=98pt]{classKSelector__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf value\-Changed} (int value)
\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 KSelector} ({\bf QWidget} $\ast$parent=0, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Constructs a horizontal one-dimensional selection widget. \item\end{CompactList}\item 
{\bf KSelector} (Orientation o, {\bf QWidget} $\ast$parent=0L, const  char $\ast$name=0L)
\begin{CompactList}\small\item\em Constructs a one-dimensional selection widget with a given orientation. \item\end{CompactList}\item 
Orientation {\bf orientation} () const 
\item 
{\bf QRect} {\bf contents\-Rect} () const 
\item 
void {\bf set\-Indent} (bool i)
\begin{CompactList}\small\item\em Sets the indent option of the widget to i. \item\end{CompactList}\item 
bool {\bf indent} () const 
\item 
void {\bf set\-Value} (int value)
\begin{CompactList}\small\item\em Sets the value. \item\end{CompactList}\item 
int {\bf value} () const 
\item 
void {\bf set\-Min\-Value} (int value)
\begin{CompactList}\small\item\em Sets the min value. \item\end{CompactList}\item 
int {\bf min\-Value} () const 
\item 
void {\bf set\-Max\-Value} (int value)
\begin{CompactList}\small\item\em Sets the max value. \item\end{CompactList}\item 
int {\bf max\-Value} () 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 control. \item\end{CompactList}\item 
virtual void {\bf draw\-Arrow} ({\bf QPainter} $\ast$painter, bool {\bf show}, const  {\bf QPoint} \&{\bf pos})
\begin{CompactList}\small\item\em Override this function to draw the cursor which indicates the current value. \item\end{CompactList}\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 virtual\_\-hook} (int id, void $\ast$data)\label{classKSelector_b6}

\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 142 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} = 0, const char $\ast$ {\em name} = 0)}\label{classKSelector_a0}


Constructs a horizontal one-dimensional selection widget. 



Definition at line 190 of file kselect.cpp.

References KStd\-Accel::name().\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} = 0L, const char $\ast$ {\em name} = 0L)}\label{classKSelector_a1}


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



Definition at line 197 of file kselect.cpp.

References KStd\-Accel::name().

\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 167 of file kselect.h.

Referenced by contents\-Rect(), draw\-Arrow(), and KGradient\-Selector::draw\-Contents().\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 209 of file kselect.cpp.

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

Referenced by KGradient\-Selector::draw\-Contents().\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 179 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 184 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 190 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 196 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 202 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 208 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 214 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 220 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 309 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 312 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}
