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


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

Inheritance diagram for KToggle\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=131pt]{classKToggleAction__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KToggle\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=113pt]{classKToggleAction__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
virtual void {\bf set\-Checked} (bool)
\begin{CompactList}\small\item\em Sets the state of the action. \item\end{CompactList}\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  KShortcut \&cut=KShortcut(), {\bf QObject} $\ast${\bf parent}=0, const  char $\ast${\bf name}=0)
\begin{CompactList}\small\item\em Constructs a toggle action with text and potential keyboard accelerator but nothing else. \item\end{CompactList}\item 
{\bf KToggle\-Action} (const  {\bf QString} \&text, const  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  KShortcut \&cut=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  KShortcut \&cut=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  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  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} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
virtual int {\bf plug} ({\bf QWidget} $\ast$widget, int index=-1)
\begin{CompactList}\small\item\em \char`\"{}Plug\char`\"{} or insert this action into a given widget. \item\end{CompactList}\item 
bool {\bf is\-Checked} () const 
\begin{CompactList}\small\item\em Returns the actual state of the action. \item\end{CompactList}\item 
{\bf QString} {\bf exclusive\-Group} () const 
\item 
virtual void {\bf set\-Exclusive\-Group} (const  {\bf QString} \&{\bf name})
\begin{CompactList}\small\item\em Defines which \char`\"{}exclusive group\char`\"{} this action is part of. \item\end{CompactList}\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{Detailed Description}
Checkbox like action. Checkbox like action. 

This action provides two states: checked or not.



Definition at line 611 of file kaction.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 KShortcut \& {\em cut} = KShortcut(), {\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 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 1205 of file kaction.cpp.

References KStd\-Accel::cut(), and QObject::name().\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 KShortcut \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name} = 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 1213 of file kaction.cpp.

References KStd\-Accel::cut(), and KStd\-Accel::name().\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 KShortcut \& {\em cut} = KShortcut(), {\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 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 1221 of file kaction.cpp.

References KStd\-Accel::cut(), and KStd\-Accel::name().\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 KShortcut \& {\em cut} = KShortcut(), {\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 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 1229 of file kaction.cpp.

References KStd\-Accel::cut(), and KStd\-Accel::name().\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 KShortcut \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name} = 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 1237 of file kaction.cpp.

References KStd\-Accel::cut(), and KStd\-Accel::name().\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 KShortcut \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name} = 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 1247 of file kaction.cpp.

References KStd\-Accel::cut(), and KStd\-Accel::name().\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} = 0, const char $\ast$ {\em name} = 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 1257 of file kaction.cpp.

References KStd\-Accel::name().\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 1263 of file kaction.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} = -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 1268 of file kaction.cpp.

References is\-Checked(), QObject::name(), 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 1351 of file kaction.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}


Definition at line 1361 of file kaction.cpp.

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 1356 of file kaction.cpp.

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

Definition at line 1297 of file kaction.cpp.

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

Referenced by KStd\-Action::create(), 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 
kaction.h\item 
kaction.cpp\end{CompactItemize}
