\section{KGradient\-Selector Class Reference}
\label{classKGradientSelector}\index{KGradientSelector@{KGradientSelector}}
The KGradient\-Selector widget allows the user to choose from a one-dimensional range of colors which is given as a gradient between two colors provided by the programmer.  


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

Inheritance diagram for KGradient\-Selector:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=96pt]{classKGradientSelector__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KGradient\-Selector:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=135pt]{classKGradientSelector__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KGradient\-Selector} ({\bf QWidget} $\ast$parent=0, const char $\ast$name=0)
\item 
{\bf KGradient\-Selector} (Orientation o, {\bf QWidget} $\ast$parent=0, const char $\ast$name=0)
\item 
{\bf $\sim$KGradient\-Selector} ()
\item 
void {\bf set\-Colors} (const {\bf QColor} \&col1, const {\bf QColor} \&col2)
\item 
void {\bf set\-Text} (const {\bf QString} \&t1, const {\bf QString} \&t2)\label{classKGradientSelector_a4}

\item 
void {\bf set\-First\-Color} (const {\bf QColor} \&col)
\item 
void {\bf set\-Second\-Color} (const {\bf QColor} \&col)\label{classKGradientSelector_a6}

\item 
void {\bf set\-First\-Text} (const {\bf QString} \&t)
\item 
void {\bf set\-Second\-Text} (const {\bf QString} \&t)\label{classKGradientSelector_a8}

\item 
const {\bf QColor} {\bf first\-Color} () const \label{classKGradientSelector_a9}

\item 
const {\bf QColor} {\bf second\-Color} () const \label{classKGradientSelector_a10}

\item 
const {\bf QString} {\bf first\-Text} () const \label{classKGradientSelector_a11}

\item 
const {\bf QString} {\bf second\-Text} () const \label{classKGradientSelector_a12}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf draw\-Contents} ({\bf QPainter} $\ast$)
\item 
virtual {\bf QSize} {\bf minimum\-Size} () const \label{classKGradientSelector_b1}

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

\end{CompactItemize}
\subsection*{Properties}
\begin{CompactItemize}
\item 
{\bf QColor} {\bf first\-Color}\label{classKGradientSelector_00}

\item 
{\bf QColor} {\bf second\-Color}\label{classKGradientSelector_01}

\item 
{\bf QString} {\bf first\-Text}\label{classKGradientSelector_02}

\item 
{\bf QString} {\bf second\-Text}\label{classKGradientSelector_03}

\end{CompactItemize}


\subsection{Detailed Description}
The KGradient\-Selector widget allows the user to choose from a one-dimensional range of colors which is given as a gradient between two colors provided by the programmer. 





Definition at line 293 of file kselect.h.

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


Constructs a horizontal color selector which contains a gradient between white and black. 



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


Constructs a colors selector with orientation o which contains a gradient between white and black. 



Definition at line 386 of file kselect.cpp.\index{KGradientSelector@{KGradient\-Selector}!~KGradientSelector@{$\sim$KGradientSelector}}
\index{~KGradientSelector@{$\sim$KGradientSelector}!KGradientSelector@{KGradient\-Selector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KGradient\-Selector::$\sim${\bf KGradient\-Selector} ()}\label{classKGradientSelector_a2}


Destructs the widget. 



Definition at line 394 of file kselect.cpp.

\subsection{Member Function Documentation}
\index{KGradientSelector@{KGradient\-Selector}!setColors@{setColors}}
\index{setColors@{setColors}!KGradientSelector@{KGradient\-Selector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KGradient\-Selector::set\-Colors (const {\bf QColor} \& {\em col1}, const {\bf QColor} \& {\em col2})\hspace{0.3cm}{\tt  [inline]}}\label{classKGradientSelector_a3}


Sets the two colors which span the gradient. 



Definition at line 320 of file kselect.h.

References QWidget::update().\index{KGradientSelector@{KGradient\-Selector}!setFirstColor@{setFirstColor}}
\index{setFirstColor@{setFirstColor}!KGradientSelector@{KGradient\-Selector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KGradient\-Selector::set\-First\-Color (const {\bf QColor} \& {\em col})\hspace{0.3cm}{\tt  [inline]}}\label{classKGradientSelector_a5}


Set each color on its own. 



Definition at line 328 of file kselect.h.

References QWidget::update().\index{KGradientSelector@{KGradient\-Selector}!setFirstText@{setFirstText}}
\index{setFirstText@{setFirstText}!KGradientSelector@{KGradient\-Selector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KGradient\-Selector::set\-First\-Text (const {\bf QString} \& {\em t})\hspace{0.3cm}{\tt  [inline]}}\label{classKGradientSelector_a7}


Set each description on its own. 



Definition at line 336 of file kselect.h.

References QWidget::update().\index{KGradientSelector@{KGradient\-Selector}!drawContents@{drawContents}}
\index{drawContents@{drawContents}!KGradientSelector@{KGradient\-Selector}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KGradient\-Selector::draw\-Contents ({\bf QPainter} $\ast$)\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKGradientSelector_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 from {\bf KSelector} {\rm (p.\,\pageref{classKSelector_b0})}.

Definition at line 407 of file kselect.cpp.

References QColor::blue(), QRect::bottom(), KSelector::contents\-Rect(), QPixmap::convert\-From\-Image(), KImage\-Effect::dither(), QPainter::draw\-Pixmap(), QPainter::draw\-Text(), QPainter::font\-Metrics(), QColor::green(), QImage::height(), QWidget::height(), QRect::left(), KSelector::orientation(), QColor::red(), QColor::rgb(), QImage::scan\-Line(), QPen::set\-Color(), QPainter::set\-Pen(), QColor::set\-Rgb(), QRect::top(), QRect::width(), QImage::width(), QWidget::width(), QWidget::x(), and QWidget::y().

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