\section{KPush\-Button Class Reference}
\label{classKPushButton}\index{KPushButton@{KPushButton}}
This is nothing but a {\bf QPush\-Button} with drag-support and KGui\-Item support. A {\bf QPush\-Button} with drag-support and KGui\-Item support.  


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

Inheritance diagram for KPush\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=72pt]{classKPushButton__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KPush\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=100pt]{classKPushButton__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KPush\-Button} ({\bf QWidget} $\ast$parent, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
{\bf KPush\-Button} (const  {\bf QString} \&{\bf text}, {\bf QWidget} $\ast$parent, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Constructor, that sets the button-text to {\tt text}. \item\end{CompactList}\item 
{\bf KPush\-Button} (const  {\bf QIcon\-Set} \&icon, const  {\bf QString} \&{\bf text}, {\bf QWidget} $\ast$parent, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Constructor, that sets an icon and the button-text to {\tt text}. \item\end{CompactList}\item 
{\bf KPush\-Button} (const  KGui\-Item \&item, {\bf QWidget} $\ast$parent, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Constructor that takes a KGui\-Item for the text, the icon, the tooltip and the what's this help. \item\end{CompactList}\item 
{\bf $\sim$KPush\-Button} ()
\begin{CompactList}\small\item\em Destructs the button. \item\end{CompactList}\item 
void {\bf set\-Drag\-Enabled} (bool enable)
\begin{CompactList}\small\item\em Enables/disables drag-support. \item\end{CompactList}\item 
bool {\bf is\-Drag\-Enabled} () const 
\item 
void {\bf set\-Gui\-Item} (const  KGui\-Item \&item)
\begin{CompactList}\small\item\em Sets the KGui\-Item for this button. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual {\bf QDrag\-Object} $\ast$ {\bf drag\-Object} ()
\begin{CompactList}\small\item\em Reimplement this and return the {\bf QDrag\-Object} that should be used for the drag. \item\end{CompactList}\item 
virtual void {\bf mouse\-Press\-Event} ({\bf QMouse\-Event} $\ast$)
\begin{CompactList}\small\item\em Reimplemented to add drag-support. \item\end{CompactList}\item 
virtual void {\bf mouse\-Move\-Event} ({\bf QMouse\-Event} $\ast$)
\begin{CompactList}\small\item\em Reimplemented to add drag-support. \item\end{CompactList}\item 
virtual void {\bf start\-Drag} ()
\begin{CompactList}\small\item\em Starts a drag (drag\-Copy() by default) using {\bf drag\-Object}{\rm (p.\,\pageref{classKPushButton_b0})}(). \item\end{CompactList}\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKPushButton_b4}

\end{CompactItemize}


\subsection{Detailed Description}
This is nothing but a {\bf QPush\-Button} with drag-support and KGui\-Item support. A {\bf QPush\-Button} with drag-support and KGui\-Item support. 

You have to call {\bf set\-Drag\-Enabled}{\rm (p.\,\pageref{classKPushButton_a5})}( true ) and override the virtual method {\bf drag\-Object}{\rm (p.\,\pageref{classKPushButton_b0})}() to specify the {\bf QDrag\-Object} to be used.

\begin{Desc}
\item[Author:]Carsten Pfeiffer $<${\tt pfeiffer@kde.org}$>$ \end{Desc}




Definition at line 37 of file kpushbutton.h.

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


Default constructor. 



Definition at line 37 of file kpushbutton.cpp.

References KStd\-Accel::name().\index{KPushButton@{KPush\-Button}!KPushButton@{KPushButton}}
\index{KPushButton@{KPushButton}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPush\-Button::KPush\-Button (const {\bf QString} \& {\em text}, {\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0)}\label{classKPushButton_a1}


Constructor, that sets the button-text to {\tt text}. 



Definition at line 44 of file kpushbutton.cpp.

References KStd\-Accel::name().\index{KPushButton@{KPush\-Button}!KPushButton@{KPushButton}}
\index{KPushButton@{KPushButton}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPush\-Button::KPush\-Button (const {\bf QIcon\-Set} \& {\em icon}, const {\bf QString} \& {\em text}, {\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0)}\label{classKPushButton_a2}


Constructor, that sets an icon and the button-text to {\tt text}. 



Definition at line 52 of file kpushbutton.cpp.

References KStd\-Accel::name().\index{KPushButton@{KPush\-Button}!KPushButton@{KPushButton}}
\index{KPushButton@{KPushButton}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPush\-Button::KPush\-Button (const KGui\-Item \& {\em item}, {\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0)}\label{classKPushButton_a3}


Constructor that takes a KGui\-Item for the text, the icon, the tooltip and the what's this help. 



Definition at line 60 of file kpushbutton.cpp.

References KStd\-Accel::name().\index{KPushButton@{KPush\-Button}!~KPushButton@{$\sim$KPushButton}}
\index{~KPushButton@{$\sim$KPushButton}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPush\-Button::$\sim${\bf KPush\-Button} ()}\label{classKPushButton_a4}


Destructs the button. 



Definition at line 68 of file kpushbutton.cpp.

\subsection{Member Function Documentation}
\index{KPushButton@{KPush\-Button}!setDragEnabled@{setDragEnabled}}
\index{setDragEnabled@{setDragEnabled}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPush\-Button::set\-Drag\-Enabled (bool {\em enable})}\label{classKPushButton_a5}


Enables/disables drag-support. 

Default is enabled. 

Definition at line 130 of file kpushbutton.cpp.\index{KPushButton@{KPush\-Button}!isDragEnabled@{isDragEnabled}}
\index{isDragEnabled@{isDragEnabled}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KPush\-Button::is\-Drag\-Enabled () const\hspace{0.3cm}{\tt  [inline]}}\label{classKPushButton_a6}


\begin{Desc}
\item[Returns:]if drag support is enabled or not. \end{Desc}


Definition at line 77 of file kpushbutton.h.\index{KPushButton@{KPush\-Button}!setGuiItem@{setGuiItem}}
\index{setGuiItem@{setGuiItem}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPush\-Button::set\-Gui\-Item (const KGui\-Item \& {\em item})}\label{classKPushButton_a7}


Sets the KGui\-Item for this button. 



Definition at line 113 of file kpushbutton.cpp.

References QPush\-Button::set\-Icon\-Set(), and QPush\-Button::set\-Text().\index{KPushButton@{KPush\-Button}!dragObject@{dragObject}}
\index{dragObject@{dragObject}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QDrag\-Object} $\ast$ KPush\-Button::drag\-Object ()\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKPushButton_b0}


Reimplement this and return the {\bf QDrag\-Object} that should be used for the drag. 

Default implementation returns 0L, so that no drag is initiated. 

Definition at line 158 of file kpushbutton.cpp.

Referenced by start\-Drag().\index{KPushButton@{KPush\-Button}!mousePressEvent@{mousePressEvent}}
\index{mousePressEvent@{mousePressEvent}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPush\-Button::mouse\-Press\-Event ({\bf QMouse\-Event} $\ast$)\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKPushButton_b1}


Reimplemented to add drag-support. 



Definition at line 135 of file kpushbutton.cpp.

References QMouse\-Event::pos().\index{KPushButton@{KPush\-Button}!mouseMoveEvent@{mouseMoveEvent}}
\index{mouseMoveEvent@{mouseMoveEvent}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPush\-Button::mouse\-Move\-Event ({\bf QMouse\-Event} $\ast$)\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKPushButton_b2}


Reimplemented to add drag-support. 



Definition at line 142 of file kpushbutton.cpp.

References KGlobal\-Settings::dnd\-Event\-Delay(), QMouse\-Event::pos(), QPush\-Button::set\-Down(), start\-Drag(), and QMouse\-Event::state().\index{KPushButton@{KPush\-Button}!startDrag@{startDrag}}
\index{startDrag@{startDrag}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPush\-Button::start\-Drag ()\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKPushButton_b3}


Starts a drag (drag\-Copy() by default) using {\bf drag\-Object}{\rm (p.\,\pageref{classKPushButton_b0})}(). 



Definition at line 163 of file kpushbutton.cpp.

References QDrag\-Object::drag\-Copy(), and drag\-Object().

Referenced by mouse\-Move\-Event().

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