\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=98pt]{classKGradientSelector__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KGradient\-Selector:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=142pt]{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)
\begin{CompactList}\small\item\em Constructs a horizontal color selector which contains a gradient between white and black. \item\end{CompactList}\item 
{\bf KGradient\-Selector} (Orientation o, {\bf QWidget} $\ast$parent=0, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Constructs a colors selector with orientation o which contains a gradient between white and black. \item\end{CompactList}\item 
{\bf $\sim$KGradient\-Selector} ()
\begin{CompactList}\small\item\em Destructs the widget. \item\end{CompactList}\item 
void {\bf set\-Colors} (const  {\bf QColor} \&col1, const  {\bf QColor} \&col2)
\begin{CompactList}\small\item\em Sets the two colors which span the gradient. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Set each color on its own. \item\end{CompactList}\item 
void {\bf set\-Second\-Color} (const  {\bf QColor} \&col)\label{classKGradientSelector_a6}

\item 
void {\bf set\-First\-Text} (const  {\bf QString} \&t)
\begin{CompactList}\small\item\em Set each description on its own. \item\end{CompactList}\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$)
\begin{CompactList}\small\item\em Override this function to draw the contents of the control. \item\end{CompactList}\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{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 284 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} = 0, const char $\ast$ {\em name} = 0)}\label{classKGradientSelector_a0}


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



Definition at line 350 of file kselect.cpp.

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


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



Definition at line 357 of file kselect.cpp.

References KStd\-Accel::name().\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 365 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 311 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 319 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 327 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 378 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}
