\section{KColor\-Drag Class Reference}
\label{classKColorDrag}\index{KColorDrag@{KColorDrag}}
A drag-and-drop object for colors.  


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

Inheritance diagram for KColor\-Drag:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=55pt]{classKColorDrag__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KColor\-Drag:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=94pt]{classKColorDrag__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KColor\-Drag} ({\bf QWidget} $\ast$dragsource=0, const char $\ast$name=0)
\item 
{\bf KColor\-Drag} (const {\bf QColor} \&col, {\bf QWidget} $\ast$dragsource=0, const char $\ast$name=0)
\item 
virtual const char $\ast$ {\bf format} (int i) const \label{classKColorDrag_a3}

\item 
virtual {\bf QByte\-Array} {\bf encoded\-Data} (const char $\ast$m) const \label{classKColorDrag_a4}

\item 
void {\bf set\-Color} (const {\bf QColor} \&col)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static bool {\bf can\-Decode} ({\bf QMime\-Source} $\ast$e)
\item 
static bool {\bf decode} ({\bf QMime\-Source} $\ast$e, {\bf QColor} \&col)
\item 
static {\bf KColor\-Drag} $\ast$ {\bf make\-Drag} (const {\bf QColor} \&, {\bf QWidget} $\ast$dragsource) KDE\_\-DEPRECATED
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKColorDrag_b0}

\end{CompactItemize}


\subsection{Detailed Description}
A drag-and-drop object for colors. 

The according MIME type is set to application/x-color.

See the {\bf Qt} drag'n'drop documentation. 



Definition at line 36 of file kcolordrag.h.

\subsection{Constructor \& Destructor Documentation}
\index{KColorDrag@{KColor\-Drag}!KColorDrag@{KColorDrag}}
\index{KColorDrag@{KColorDrag}!KColorDrag@{KColor\-Drag}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KColor\-Drag::KColor\-Drag ({\bf QWidget} $\ast$ {\em dragsource} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKColorDrag_a0}


Constructs a color drag with a white color. 



Definition at line 33 of file kcolordrag.cpp.

References set\-Color().

Referenced by make\-Drag().\index{KColorDrag@{KColor\-Drag}!KColorDrag@{KColorDrag}}
\index{KColorDrag@{KColorDrag}!KColorDrag@{KColor\-Drag}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KColor\-Drag::KColor\-Drag (const {\bf QColor} \& {\em col}, {\bf QWidget} $\ast$ {\em dragsource} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKColorDrag_a1}


Constructs a color drag with the color {\tt col}. 



Definition at line 26 of file kcolordrag.cpp.

References set\-Color().

\subsection{Member Function Documentation}
\index{KColorDrag@{KColor\-Drag}!setColor@{setColor}}
\index{setColor@{setColor}!KColorDrag@{KColor\-Drag}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KColor\-Drag::set\-Color (const {\bf QColor} \& {\em col})}\label{classKColorDrag_a5}


Sets the color of the drag to {\tt col}. 



Definition at line 40 of file kcolordrag.cpp.

References QPainter::draw\-Rect(), QPainter::end(), QPixmap::fill(), QStored\-Drag::set\-Encoded\-Data(), and QPainter::set\-Pen().

Referenced by KColor\-Drag().\index{KColorDrag@{KColor\-Drag}!canDecode@{canDecode}}
\index{canDecode@{canDecode}!KColorDrag@{KColor\-Drag}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KColor\-Drag::can\-Decode ({\bf QMime\-Source} $\ast$ {\em e})\hspace{0.3cm}{\tt  [static]}}\label{classKColorDrag_e0}


Returns true if the MIME source {\tt e} contains a color object. 



Definition at line 76 of file kcolordrag.cpp.

References decode().\index{KColorDrag@{KColor\-Drag}!decode@{decode}}
\index{decode@{decode}!KColorDrag@{KColor\-Drag}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KColor\-Drag::decode ({\bf QMime\-Source} $\ast$ {\em e}, {\bf QColor} \& {\em col})\hspace{0.3cm}{\tt  [static]}}\label{classKColorDrag_e1}


Decodes the MIME source {\tt e} and puts the resulting color into {\tt col}. 



Definition at line 89 of file kcolordrag.cpp.

References QString::from\-Latin1(), and QString::length().

Referenced by can\-Decode().\index{KColorDrag@{KColor\-Drag}!makeDrag@{makeDrag}}
\index{makeDrag@{makeDrag}!KColorDrag@{KColor\-Drag}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KColor\-Drag} $\ast$ KColor\-Drag::make\-Drag (const {\bf QColor} \&, {\bf QWidget} $\ast$ {\em dragsource})\hspace{0.3cm}{\tt  [static]}}\label{classKColorDrag_e2}


\begin{Desc}
\item[{\bf Deprecated}]This is equivalent with \char`\"{}new KColor\-Drag(color, dragsource)\char`\"{}. \end{Desc}


Definition at line 104 of file kcolordrag.cpp.

References KColor\-Drag().

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