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


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

Inheritance diagram for KPush\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=69pt]{classKPushButton__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KPush\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=94pt]{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)
\item 
{\bf KPush\-Button} (const {\bf QString} \&{\bf text}, {\bf QWidget} $\ast$parent, const char $\ast$name=0)
\item 
{\bf KPush\-Button} (const {\bf QIcon\-Set} \&icon, const {\bf QString} \&{\bf text}, {\bf QWidget} $\ast$parent, const char $\ast$name=0)
\item 
{\bf KPush\-Button} (const {\bf KGui\-Item} \&item, {\bf QWidget} $\ast$parent, const char $\ast$name=0)
\item 
{\bf $\sim$KPush\-Button} ()
\item 
void {\bf set\-Drag\-Enabled} (bool enable)
\item 
bool {\bf is\-Drag\-Enabled} () const 
\item 
void {\bf set\-Gui\-Item} (const {\bf KGui\-Item} \&item)
\item 
void {\bf set\-Gui\-Item} ({\bf KStd\-Gui\-Item::Std\-Item} item)
\item 
{\bf KStd\-Gui\-Item::Std\-Item} {\bf gui\-Item} () const 
\item 
void {\bf set\-Gui\-Itm} (int itm)\label{classKPushButton_a10}

\item 
int {\bf gui\-Itm} () const \label{classKPushButton_a11}

\item 
void {\bf set\-Icon\-Set} (const {\bf QIcon\-Set} \&{\bf icon\-Set})
\item 
void {\bf set\-Text} (const {\bf QString} \&{\bf text})
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual {\bf QDrag\-Object} $\ast$ {\bf drag\-Object} ()
\item 
virtual void {\bf mouse\-Press\-Event} ({\bf QMouse\-Event} $\ast$)
\item 
virtual void {\bf mouse\-Move\-Event} ({\bf QMouse\-Event} $\ast$)
\item 
virtual void {\bf start\-Drag} ()
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKPushButton_b4}

\end{CompactItemize}
\subsection*{Properties}
\begin{CompactItemize}
\item 
int {\bf std\-Item}\label{classKPushButton_00}

\item 
bool {\bf is\-Drag\-Enabled}\label{classKPushButton_01}

\end{CompactItemize}


\subsection{Detailed Description}
This is nothing but a {\bf QPush\-Button} with drag-support and {\bf KGui\-Item}{\rm (p.\,\pageref{classKGuiItem})} support. A {\bf QPush\-Button} with drag-support and {\bf KGui\-Item}{\rm (p.\,\pageref{classKGuiItem})} support. 

You have to call set\-Drag\-Enabled( 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} = {\tt 0})}\label{classKPushButton_a0}


Default constructor. 



Definition at line 42 of file kpushbutton.cpp.\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} = {\tt 0})}\label{classKPushButton_a1}


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



Definition at line 49 of file kpushbutton.cpp.\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} = {\tt 0})}\label{classKPushButton_a2}


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



Definition at line 57 of file kpushbutton.cpp.\index{KPushButton@{KPush\-Button}!KPushButton@{KPushButton}}
\index{KPushButton@{KPushButton}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPush\-Button::KPush\-Button (const {\bf KGui\-Item} \& {\em item}, {\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = {\tt 0})}\label{classKPushButton_a3}


Constructor that takes a {\bf KGui\-Item}{\rm (p.\,\pageref{classKGuiItem})} for the text, the icon, the tooltip and the what's this help. 



Definition at line 65 of file kpushbutton.cpp.\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 73 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 disabled. 

Definition at line 166 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 80 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 {\bf KGui\-Item} \& {\em item})}\label{classKPushButton_a7}


Sets the {\bf KGui\-Item}{\rm (p.\,\pageref{classKGuiItem})} for this button. 



Definition at line 117 of file kpushbutton.cpp.

References set\-Icon\-Set(), and QPush\-Button::set\-Text().

Referenced by KDialog\-Base::set\-Button\-Gui\-Item(), and set\-Gui\-Item().\index{KPushButton@{KPush\-Button}!setGuiItem@{setGuiItem}}
\index{setGuiItem@{setGuiItem}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPush\-Button::set\-Gui\-Item ({\bf KStd\-Gui\-Item::Std\-Item} {\em item})}\label{classKPushButton_a8}


Sets the standard {\bf KGui\-Item}{\rm (p.\,\pageref{classKGuiItem})} for this button. 

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


Definition at line 127 of file kpushbutton.cpp.

References set\-Gui\-Item().\index{KPushButton@{KPush\-Button}!guiItem@{guiItem}}
\index{guiItem@{guiItem}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KStd\-Gui\-Item::Std\-Item} KPush\-Button::gui\-Item () const}\label{classKPushButton_a9}


Reads the standard {\bf KGui\-Item}{\rm (p.\,\pageref{classKGuiItem})} for this button. 

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


Definition at line 133 of file kpushbutton.cpp.\index{KPushButton@{KPush\-Button}!setIconSet@{setIconSet}}
\index{setIconSet@{setIconSet}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPush\-Button::set\-Icon\-Set (const {\bf QIcon\-Set} \& {\em icon\-Set})}\label{classKPushButton_a12}


Sets the Icon Set for this button. 

It also takes into account hte {\bf KGlobal\-Settings::show\-Icons\-On\-Push\-Buttons()} setting. 

Reimplemented from {\bf QPush\-Button}.

Definition at line 150 of file kpushbutton.cpp.

References QPush\-Button::set\-Icon\-Set(), and QPush\-Button::text().

Referenced by set\-Gui\-Item(), and set\-Text().\index{KPushButton@{KPush\-Button}!setText@{setText}}
\index{setText@{setText}!KPushButton@{KPush\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPush\-Button::set\-Text (const {\bf QString} \& {\em text})}\label{classKPushButton_a13}


Sets the text of the button. 



Reimplemented from {\bf QPush\-Button}.

Definition at line 138 of file kpushbutton.cpp.

References set\-Icon\-Set(), and QPush\-Button::set\-Text().

Referenced by KTip\-Dialog::KTip\-Dialog().\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 195 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 171 of file kpushbutton.cpp.\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 178 of file kpushbutton.cpp.

References KGlobal\-Settings::dnd\-Event\-Delay(), QPush\-Button::set\-Down(), and start\-Drag().\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 200 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}
