\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=101pt]{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)
\begin{CompactList}\small\item\em Constructs a color drag with a white color. \item\end{CompactList}\item 
{\bf KColor\-Drag} (const  {\bf QColor} \&col, {\bf QWidget} $\ast$dragsource=0, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Constructs a color drag with the color {\tt }. \item\end{CompactList}\item 
void {\bf set\-Color} (const  {\bf QColor} \&col)
\begin{CompactList}\small\item\em Sets the color of the drag to {\tt col}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
bool {\bf can\-Decode} ({\bf QMime\-Source} $\ast$e)
\begin{CompactList}\small\item\em Returns true if the MIME source {\tt e} contains a color object. \item\end{CompactList}\item 
bool {\bf decode} ({\bf QMime\-Source} $\ast$e, {\bf QColor} \&col)
\begin{CompactList}\small\item\em Decodes the MIME source {\tt e} and puts the resulting color into {\tt col}. \item\end{CompactList}\item 
{\bf KColor\-Drag} $\ast$ {\bf make\-Drag} (const  {\bf QColor} \&, {\bf QWidget} $\ast$dragsource)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} This is equivalent with \char`\"{}new KColor\-Drag(color, dragsource)\char`\"{}. \item\end{CompactList}\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 35 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} = 0, const char $\ast$ {\em name} = 0)}\label{classKColorDrag_a0}


Constructs a color drag with a white color. 



Definition at line 68 of file kcolordrag.cpp.

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


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



Definition at line 61 of file kcolordrag.cpp.

References KStd\-Accel::name(), and 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_a3}


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



Definition at line 75 of file kcolordrag.cpp.

References QColor::blue(), QPainter::draw\-Rect(), QPainter::end(), QPixmap::fill(), QColor::green(), QColor::red(), 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 98 of file kcolordrag.cpp.

References QMime\-Source::provides().\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 104 of file kcolordrag.cpp.

References QMime\-Source::encoded\-Data(), and QColor::set\-Rgb().\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}


{\bf This class or method is obsolete, it is provided for compatibility only.} This is equivalent with \char`\"{}new KColor\-Drag(color, dragsource)\char`\"{}. 



Definition at line 116 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}
