\section{KColor\-Button Class Reference}
\label{classKColorButton}\index{KColorButton@{KColorButton}}
A pushbutton to display or allow user selection of a color.  


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

Inheritance diagram for KColor\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=55pt]{classKColorButton__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KColor\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=121pt]{classKColorButton__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf changed} (const {\bf QColor} \&new\-Color)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KColor\-Button} ({\bf QWidget} $\ast$parent, const char $\ast$name=0L)
\item 
{\bf KColor\-Button} (const {\bf QColor} \&c, {\bf QWidget} $\ast$parent, const char $\ast$name=0L)
\item 
{\bf KColor\-Button} (const {\bf QColor} \&c, const {\bf QColor} \&default\-Color, {\bf QWidget} $\ast$parent, const char $\ast$name=0L)
\item 
{\bf QColor} {\bf color} () const 
\item 
void {\bf set\-Color} (const {\bf QColor} \&c)
\item 
{\bf QColor} {\bf default\-Color} () const 
\item 
void {\bf set\-Default\-Color} (const {\bf QColor} \&c)
\item 
{\bf QSize} {\bf size\-Hint} () const \label{classKColorButton_a8}

\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 key\-Press\-Event} ({\bf QKey\-Event} $\ast$e)\label{classKColorButton_b5}

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

\end{CompactItemize}
\subsection*{Properties}
\begin{CompactItemize}
\item 
{\bf QColor} {\bf color}\label{classKColorButton_00}

\end{CompactItemize}


\subsection{Detailed Description}
A pushbutton to display or allow user selection of a color. 

This widget can be used to display or allow user selection of a color.

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




Definition at line 37 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} = {\tt 0L})}\label{classKColorButton_a0}


Creates a color button. 



Definition at line 41 of file kcolorbutton.cpp.

References QPush\-Button::clicked().\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} = {\tt 0L})}\label{classKColorButton_a1}


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



Definition at line 53 of file kcolorbutton.cpp.

References QPush\-Button::clicked().\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} = {\tt 0L})}\label{classKColorButton_a2}


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




Definition at line 66 of file kcolorbutton.cpp.

References QPush\-Button::clicked(), and default\-Color().

\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 61 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 84 of file kcolorbutton.cpp.

References changed().\index{KColorButton@{KColor\-Button}!defaultColor@{defaultColor}}
\index{defaultColor@{defaultColor}!KColorButton@{KColor\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QColor} KColor\-Button::default\-Color () const}\label{classKColorButton_a6}


Returns the default color or an invalid color if no default color is set. 

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


Definition at line 93 of file kcolorbutton.cpp.

Referenced by KColor\-Button().\index{KColorButton@{KColor\-Button}!setDefaultColor@{setDefaultColor}}
\index{setDefaultColor@{setDefaultColor}!KColorButton@{KColor\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KColor\-Button::set\-Default\-Color (const {\bf QColor} \& {\em c})}\label{classKColorButton_a7}


Sets the default color to {\tt c}. 

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


Definition at line 98 of file kcolorbutton.cpp.

References QColor::is\-Valid().\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}
