\section{KToggle\-Action Class Reference}
\label{classKToggleAction}\index{KToggleAction@{KToggleAction}}
Checkbox like action.  


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

Inheritance diagram for KToggle\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=196pt]{classKToggleAction__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KToggle\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=100pt]{classKToggleAction__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
virtual void {\bf set\-Checked} (bool)
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf toggled} (bool)\label{classKToggleAction_l0}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KToggle\-Action} (const {\bf QString} \&text, const {\bf KShortcut} \&cut={\bf KShortcut}(), {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\item 
{\bf KToggle\-Action} (const {\bf QString} \&text, const {\bf KShortcut} \&cut, const {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf QObject} $\ast${\bf parent}, const char $\ast${\bf name}=0)
\item 
{\bf KToggle\-Action} (const {\bf QString} \&text, const {\bf QIcon\-Set} \&pix, const {\bf KShortcut} \&cut={\bf KShortcut}(), {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\item 
{\bf KToggle\-Action} (const {\bf QString} \&text, const {\bf QString} \&pix, const {\bf KShortcut} \&cut={\bf KShortcut}(), {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\item 
{\bf KToggle\-Action} (const {\bf QString} \&text, const {\bf QIcon\-Set} \&pix, const {\bf KShortcut} \&cut, const {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf QObject} $\ast${\bf parent}, const char $\ast${\bf name}=0)
\item 
{\bf KToggle\-Action} (const {\bf QString} \&text, const {\bf QString} \&pix, const {\bf KShortcut} \&cut, const {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf QObject} $\ast${\bf parent}, const char $\ast${\bf name}=0)
\item 
{\bf KToggle\-Action} ({\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\item 
virtual {\bf $\sim$KToggle\-Action} ()
\item 
virtual int {\bf plug} ({\bf QWidget} $\ast$widget, int index=-1)
\item 
bool {\bf is\-Checked} () const 
\item 
{\bf QString} {\bf exclusive\-Group} () const 
\item 
virtual void {\bf set\-Exclusive\-Group} (const {\bf QString} \&{\bf name})
\item 
void {\bf set\-Checked\-State} (const {\bf KGui\-Item} \&checked\-Item)
\item 
virtual {\bf QString} {\bf tool\-Tip} () const 
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf slot\-Activated} ()\label{classKToggleAction_j0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf update\-Checked} (int id)\label{classKToggleAction_b0}

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

\end{CompactItemize}
\subsection*{Properties}
\begin{CompactItemize}
\item 
bool {\bf checked}\label{classKToggleAction_00}

\item 
{\bf QString} {\bf exclusive\-Group}\label{classKToggleAction_01}

\end{CompactItemize}


\subsection{Detailed Description}
Checkbox like action. 

Checkbox like action.

This action provides two states: checked or not. 



Definition at line 68 of file kactionclasses.h.

\subsection{Constructor \& Destructor Documentation}
\index{KToggleAction@{KToggle\-Action}!KToggleAction@{KToggleAction}}
\index{KToggleAction@{KToggleAction}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KToggle\-Action::KToggle\-Action (const {\bf QString} \& {\em text}, const {\bf KShortcut} \& {\em cut} = {\tt {\bf KShortcut}()}, {\bf QObject} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKToggleAction_a0}


Constructs a toggle action with text and potential keyboard accelerator but nothing else. 

Use this only if you really know what you are doing.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text that will be displayed. \item[{\em cut}]The corresponding keyboard accelerator (shortcut). \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 70 of file kactionclasses.cpp.\index{KToggleAction@{KToggle\-Action}!KToggleAction@{KToggleAction}}
\index{KToggleAction@{KToggleAction}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KToggle\-Action::KToggle\-Action (const {\bf QString} \& {\em text}, const {\bf KShortcut} \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name} = {\tt 0})}\label{classKToggleAction_a1}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text that will be displayed. \item[{\em cut}]The corresponding keyboard accelerator (shortcut). \item[{\em receiver}]The SLOT's parent. \item[{\em slot}]The SLOT to invoke to execute this action. \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 78 of file kactionclasses.cpp.\index{KToggleAction@{KToggle\-Action}!KToggleAction@{KToggleAction}}
\index{KToggleAction@{KToggleAction}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KToggle\-Action::KToggle\-Action (const {\bf QString} \& {\em text}, const {\bf QIcon\-Set} \& {\em pix}, const {\bf KShortcut} \& {\em cut} = {\tt {\bf KShortcut}()}, {\bf QObject} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKToggleAction_a2}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text that will be displayed. \item[{\em pix}]The icons that go with this action. \item[{\em cut}]The corresponding keyboard accelerator (shortcut). \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 86 of file kactionclasses.cpp.\index{KToggleAction@{KToggle\-Action}!KToggleAction@{KToggleAction}}
\index{KToggleAction@{KToggleAction}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KToggle\-Action::KToggle\-Action (const {\bf QString} \& {\em text}, const {\bf QString} \& {\em pix}, const {\bf KShortcut} \& {\em cut} = {\tt {\bf KShortcut}()}, {\bf QObject} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKToggleAction_a3}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text that will be displayed. \item[{\em pix}]The dynamically loaded icon that goes with this action. \item[{\em cut}]The corresponding keyboard accelerator (shortcut). \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 94 of file kactionclasses.cpp.\index{KToggleAction@{KToggle\-Action}!KToggleAction@{KToggleAction}}
\index{KToggleAction@{KToggleAction}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KToggle\-Action::KToggle\-Action (const {\bf QString} \& {\em text}, const {\bf QIcon\-Set} \& {\em pix}, const {\bf KShortcut} \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name} = {\tt 0})}\label{classKToggleAction_a4}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text that will be displayed. \item[{\em pix}]The icons that go with this action. \item[{\em cut}]The corresponding keyboard accelerator (shortcut). \item[{\em receiver}]The SLOT's parent. \item[{\em slot}]The SLOT to invoke to execute this action. \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 102 of file kactionclasses.cpp.\index{KToggleAction@{KToggle\-Action}!KToggleAction@{KToggleAction}}
\index{KToggleAction@{KToggleAction}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KToggle\-Action::KToggle\-Action (const {\bf QString} \& {\em text}, const {\bf QString} \& {\em pix}, const {\bf KShortcut} \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name} = {\tt 0})}\label{classKToggleAction_a5}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text that will be displayed. \item[{\em pix}]The dynamically loaded icon that goes with this action. \item[{\em cut}]The corresponding keyboard accelerator (shortcut). \item[{\em receiver}]The SLOT's parent. \item[{\em slot}]The SLOT to invoke to execute this action. \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 112 of file kactionclasses.cpp.\index{KToggleAction@{KToggle\-Action}!KToggleAction@{KToggleAction}}
\index{KToggleAction@{KToggleAction}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KToggle\-Action::KToggle\-Action ({\bf QObject} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKToggleAction_a6}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 122 of file kactionclasses.cpp.\index{KToggleAction@{KToggle\-Action}!~KToggleAction@{$\sim$KToggleAction}}
\index{~KToggleAction@{$\sim$KToggleAction}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KToggle\-Action::$\sim${\bf KToggle\-Action} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKToggleAction_a7}


Destructor. 



Definition at line 128 of file kactionclasses.cpp.

\subsection{Member Function Documentation}
\index{KToggleAction@{KToggle\-Action}!plug@{plug}}
\index{plug@{plug}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KToggle\-Action::plug ({\bf QWidget} $\ast$ {\em widget}, int {\em index} = {\tt -1})\hspace{0.3cm}{\tt  [virtual]}}\label{classKToggleAction_a8}


\char`\"{}Plug\char`\"{} or insert this action into a given widget. 

This will typically be a menu or a toolbar. From this point on, you will never need to directly manipulate the item in the menu or toolbar. You do all enabling/disabling/manipulation directly with your KToggle\-Action object.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em widget}]The GUI element to display this action. \item[{\em index}]The index of the item. \end{description}
\end{Desc}


Reimplemented from {\bf KAction} {\rm (p.\,\pageref{classKAction_a12})}.

Reimplemented in {\bf KToggle\-Tool\-Bar\-Action} {\rm (p.\,\pageref{classKToggleToolBarAction_a3})}.

Definition at line 134 of file kactionclasses.cpp.

References endl(), is\-Checked(), kd\-Warning(), KAction::plug(), KTool\-Bar::set\-Button(), and KTool\-Bar::set\-Toggle().

Referenced by KToggle\-Tool\-Bar\-Action::plug().\index{KToggleAction@{KToggle\-Action}!isChecked@{isChecked}}
\index{isChecked@{isChecked}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KToggle\-Action::is\-Checked () const}\label{classKToggleAction_a9}


Returns the actual state of the action. 



Definition at line 234 of file kactionclasses.cpp.

Referenced by plug(), and set\-Checked().\index{KToggleAction@{KToggle\-Action}!exclusiveGroup@{exclusiveGroup}}
\index{exclusiveGroup@{exclusiveGroup}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KToggle\-Action::exclusive\-Group () const}\label{classKToggleAction_a10}


\begin{Desc}
\item[Returns:]which \char`\"{}exclusive group\char`\"{} this action is part of. \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Exclusive\-Group}{\rm (p.\,\pageref{classKToggleAction_a11})} \end{Desc}


Referenced by set\-Checked().\index{KToggleAction@{KToggle\-Action}!setExclusiveGroup@{setExclusiveGroup}}
\index{setExclusiveGroup@{setExclusiveGroup}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KToggle\-Action::set\-Exclusive\-Group (const {\bf QString} \& {\em name})\hspace{0.3cm}{\tt  [virtual]}}\label{classKToggleAction_a11}


Defines which \char`\"{}exclusive group\char`\"{} this action is part of. 

In a given exclusive group, only one toggle action can be checked at a any moment. Checking an action unchecks the other actions of the group. 

Definition at line 239 of file kactionclasses.cpp.\index{KToggleAction@{KToggle\-Action}!setCheckedState@{setCheckedState}}
\index{setCheckedState@{setCheckedState}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KToggle\-Action::set\-Checked\-State (const {\bf KGui\-Item} \& {\em checked\-Item})}\label{classKToggleAction_a12}


Defines the text (and icon, tooltip, whatsthis) that should be displayed instead of the normal text, when the action is checked. 

This feature replaces the checkmark that usually appears in front of the text, in menus. It is useful when the text is mainly a verb: e.g. \char`\"{}Show $<$foo$>$\char`\"{} should turn into \char`\"{}Hide $<$foo$>$\char`\"{} when activated.

If has\-Icon(), the icon is kept for the 'checked state', unless {\tt checked\-Item} defines an icon explicitely. Same thing for tooltip and whatsthis. \begin{Desc}
\item[Since:]3.3 \end{Desc}


Definition at line 249 of file kactionclasses.cpp.

Referenced by KStd\-Action::show\-Menubar(), and KStd\-Action::show\-Statusbar().\index{KToggleAction@{KToggle\-Action}!toolTip@{toolTip}}
\index{toolTip@{toolTip}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KToggle\-Action::tool\-Tip () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKToggleAction_a13}


Reimplemented for internal reasons. 



Reimplemented from {\bf KAction} {\rm (p.\,\pageref{classKAction_a37})}.

Definition at line 255 of file kactionclasses.cpp.

References KAction::tool\-Tip().\index{KToggleAction@{KToggle\-Action}!setChecked@{setChecked}}
\index{setChecked@{setChecked}!KToggleAction@{KToggle\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KToggle\-Action::set\-Checked (bool)\hspace{0.3cm}{\tt  [virtual, slot]}}\label{classKToggleAction_i0}


Sets the state of the action. 



Reimplemented in {\bf KToggle\-Tool\-Bar\-Action} {\rm (p.\,\pageref{classKToggleToolBarAction_i0})}, and {\bf KToggle\-Full\-Screen\-Action} {\rm (p.\,\pageref{classKToggleFullScreenAction_i0})}.

Definition at line 161 of file kactionclasses.cpp.

References exclusive\-Group(), is\-Checked(), QObject::parent(), and toggled().

Referenced by KStd\-Action::create(), KToggle\-Full\-Screen\-Action::set\-Checked(), KToggle\-Tool\-Bar\-Action::set\-Checked(), KStd\-Action::show\-Menubar(), KStd\-Action::show\-Statusbar(), and KStd\-Action::show\-Toolbar().

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