\section{KColor\-Button Class Reference}
\label{classKColorButton}\index{KColorButton@{KColorButton}}
This widget can be used to display or allow user selection of a colour. A pushbutton to display or allow user selection of a colour.  


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

Inheritance diagram for KColor\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=58pt]{classKColorButton__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KColor\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=125pt]{classKColorButton__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf changed} (const  {\bf QColor} \&new\-Color)
\begin{CompactList}\small\item\em Emitted when the color of the widget is changed, either with {\bf set\-Color}{\rm (p.\,\pageref{classKColorButton_a5})}() or via user selection. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KColor\-Button} ({\bf QWidget} $\ast$parent, const  char $\ast$name=0L)
\begin{CompactList}\small\item\em Creates a color button. \item\end{CompactList}\item 
{\bf KColor\-Button} (const  {\bf QColor} \&c, {\bf QWidget} $\ast$parent, const  char $\ast$name=0L)
\begin{CompactList}\small\item\em Creates a color button with an initial color {\tt c}. \item\end{CompactList}\item 
{\bf KColor\-Button} (const  {\bf QColor} \&c, const  {\bf QColor} \&default\-Color, {\bf QWidget} $\ast$parent, const  char $\ast$name=0L)
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
virtual {\bf $\sim$KColor\-Button} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
{\bf QColor} {\bf color} () const 
\begin{CompactList}\small\item\em Returns the currently chosen color. \item\end{CompactList}\item 
void {\bf set\-Color} (const  {\bf QColor} \&c)
\begin{CompactList}\small\item\em Sets the current color to {\tt c}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf choose\-Color} ()\label{classKColorButton_j0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf draw\-Button\-Label} ({\bf QPainter} $\ast$p)\label{classKColorButton_b0}

\item 
virtual void {\bf drag\-Enter\-Event} ({\bf QDrag\-Enter\-Event} $\ast$)\label{classKColorButton_b1}

\item 
virtual void {\bf drop\-Event} ({\bf QDrop\-Event} $\ast$)\label{classKColorButton_b2}

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

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

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

\end{CompactItemize}


\subsection{Detailed Description}
This widget can be used to display or allow user selection of a colour. A pushbutton to display or allow user selection of a colour. 

\begin{Desc}
\item[See also:]{\bf KColor\-Dialog}{\rm (p.\,\pageref{classKColorDialog})}\end{Desc}


\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kcolorbutton.h}{\rm (p.\,\pageref{kcolorbutton_8h})},v 1.6 2002/09/28 15:16:22 tjansen Exp \end{Desc}
\end{Desc}




Definition at line 34 of file kcolorbutton.h.

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


Creates a color button. 



Definition at line 39 of file kcolorbutton.cpp.

References QPush\-Button::clicked(), and KStd\-Accel::name().\index{KColorButton@{KColor\-Button}!KColorButton@{KColorButton}}
\index{KColorButton@{KColorButton}!KColorButton@{KColor\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KColor\-Button::KColor\-Button (const {\bf QColor} \& {\em c}, {\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0L)}\label{classKColorButton_a1}


Creates a color button with an initial color {\tt c}. 



Definition at line 51 of file kcolorbutton.cpp.

References QPush\-Button::clicked(), and KStd\-Accel::name().\index{KColorButton@{KColor\-Button}!KColorButton@{KColorButton}}
\index{KColorButton@{KColorButton}!KColorButton@{KColor\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KColor\-Button::KColor\-Button (const {\bf QColor} \& {\em c}, const {\bf QColor} \& {\em default\-Color}, {\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0L)}\label{classKColorButton_a2}


\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 64 of file kcolorbutton.cpp.

References QPush\-Button::clicked(), and KStd\-Accel::name().\index{KColorButton@{KColor\-Button}!~KColorButton@{$\sim$KColorButton}}
\index{~KColorButton@{$\sim$KColorButton}!KColorButton@{KColor\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KColor\-Button::$\sim${\bf KColor\-Button} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKColorButton_a3}


Destructor. 



Definition at line 77 of file kcolorbutton.cpp.

\subsection{Member Function Documentation}
\index{KColorButton@{KColor\-Button}!color@{color}}
\index{color@{color}!KColorButton@{KColor\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QColor} KColor\-Button::color () const\hspace{0.3cm}{\tt  [inline]}}\label{classKColorButton_a4}


Returns the currently chosen color. 



Definition at line 60 of file kcolorbutton.h.\index{KColorButton@{KColor\-Button}!setColor@{setColor}}
\index{setColor@{setColor}!KColorButton@{KColor\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KColor\-Button::set\-Color (const {\bf QColor} \& {\em c})}\label{classKColorButton_a5}


Sets the current color to {\tt c}. 



Definition at line 82 of file kcolorbutton.cpp.

References changed().\index{KColorButton@{KColor\-Button}!changed@{changed}}
\index{changed@{changed}!KColorButton@{KColor\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KColor\-Button::changed (const {\bf QColor} \& {\em new\-Color})\hspace{0.3cm}{\tt  [signal]}}\label{classKColorButton_l0}


Emitted when the color of the widget is changed, either with {\bf set\-Color}{\rm (p.\,\pageref{classKColorButton_a5})}() or via user selection. 



Referenced by set\-Color().

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