\section{KPanel\-Applet Class Reference}
\label{classKPanelApplet}\index{KPanelApplet@{KPanelApplet}}
KDE Panel Applet class  


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

Inheritance diagram for KPanel\-Applet:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=56pt]{classKPanelApplet__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KPanel\-Applet:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=244pt]{classKPanelApplet__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Type} \{ {\bf Normal} =  0, 
{\bf Stretch}
 \}
\item 
enum {\bf Action} \{ {\bf About} =  1, 
{\bf Help} =  2, 
{\bf Preferences} =  4, 
{\bf Report\-Bug} =  8
 \}
\item 
enum {\bf Position} \{ {\bf p\-Left} =  0, 
{\bf p\-Right}, 
{\bf p\-Top}, 
{\bf p\-Bottom}
 \}
\item 
enum {\bf Alignment} \{ {\bf Left\-Top} =  0, 
{\bf Center}, 
{\bf Right\-Bottom}
 \}
\item 
enum {\bf Direction} \{ {\bf Up} =  0, 
{\bf Down}, 
{\bf Left}, 
{\bf Right}
 \}
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf update\-Layout} ()
\item 
void {\bf request\-Focus} ()
\item 
void {\bf request\-Focus} (bool focus)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KPanel\-Applet} (const {\bf QString} \&config\-File, {\bf Type} t=Normal, int actions=0, {\bf QWidget} $\ast$parent=0, const char $\ast$name=0, WFlags f=0)
\item 
{\bf $\sim$KPanel\-Applet} ()
\item 
virtual int {\bf width\-For\-Height} (int height) const 
\item 
virtual int {\bf height\-For\-Width} (int width) const 
\item 
{\bf KConfig} $\ast$ {\bf config} () const 
\item 
{\bf KShared\-Config::Ptr} {\bf shared\-Config} () const \label{classKPanelApplet_a5}

\item 
{\bf Type} {\bf type} () const 
\item 
int {\bf actions} () const 
\item 
virtual void {\bf action} ({\bf Action} a)
\item 
const {\bf QPopup\-Menu} $\ast$ {\bf custom\-Menu} () const 
\item 
void {\bf set\-Position} (Position p)\label{classKPanelApplet_a10}

\item 
void {\bf set\-Alignment} (Alignment a)\label{classKPanelApplet_a11}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf about} ()
\item 
virtual void {\bf help} ()
\item 
virtual void {\bf preferences} ()
\item 
virtual void {\bf report\-Bug} ()
\item 
Orientation {\bf orientation} () const 
\item 
Position {\bf position} () const 
\item 
Alignment {\bf alignment} () const 
\item 
virtual void {\bf position\-Change} (Position p)
\item 
virtual void {\bf alignment\-Change} (Alignment)
\item 
void {\bf set\-Custom\-Menu} (const {\bf QPopup\-Menu} $\ast$)
\item 
void {\bf watch\-For\-Focus} ({\bf QWidget} $\ast$widget, bool watch=true)
\item 
void {\bf needs\-Focus} (bool focus)
\item 
virtual KDE\_\-DEPRECATED void {\bf orientation\-Change} (Orientation)
\item 
Direction {\bf popup\-Direction} ()
\item 
virtual KDE\_\-DEPRECATED void {\bf popup\-Direction\-Change} (Direction)
\item 
bool {\bf event\-Filter} ({\bf QObject} $\ast$, {\bf QEvent} $\ast$)\label{classKPanelApplet_b15}

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

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
KPanel\-Applet\-Private $\ast$ {\bf d}\label{classKPanelApplet_p0}

\end{CompactItemize}


\subsection{Detailed Description}
KDE Panel Applet class 

Panel applets \begin{itemize}
\item Are small applications living in the KDE panel. \item Are implemented as DSOs (Dynamic Shared Objects).\end{itemize}
Note: For security and stability reasons the panel won't load untrusted third party applets directly into its namespace but via an external wrapper process.

The panel locates available applets by searching for applet desktop files in (ALL\_\-DIRS)/share/apps/kicker/applets. Every panel applet should install a desktop file there to be recognized by the panel.

Besides standard keys like \char`\"{}Name\char`\"{}, \char`\"{}Comment\char`\"{} and \char`\"{}Icon\char`\"{} there are two panel applet specific keys:

{\bf X-KDE-Library} \par


Used by the panel to locate the applet DSO (Dynamic Shared Object) Example: X-KDE-Library=libexampleapplet

{\bf X-KDE-Unique\-Applet} \par


Similar to {\bf KApplication} and {\bf KUnique\-Application} there are two types of panel applets. Use unique applets when it makes no sence to run more than one instance of a applet in the panel. A good example for unique applets is the taskbar applet. Use normal applets when you need instance specific configuration. An example is the koolclock applet where you might want to run two instances in your panel, one configured as analog clock, the other one as digital clock. X-KDE-Unique\-Applet is a boolean key which defaults to \char`\"{}false\char`\"{}. Example: X-KDE-Unique\-Applet=true

Back to panel applet DSOs, the following conventions are used for KDE: Name: lib$<$appletname$>$applet.la LDFLAGS: -module -no-undefined

To implement a panel applet it is not enough to write a class inheriting from KPanel\-Applet but you also have to provide a factory function in your DSO. A sample factory function could look like this:



\footnotesize\begin{verbatim} extern "C"
 {
     KPanelApplet* init(QWidget *parent, const QString& configFile)
     {
         KGlobal::locale()->insertCatalogue("exampleapplet");
         return new ExampleApplet(configFile, KPanelApplet::Normal,
                       KPanelApplet::About | KPanelApplet::Help | KPanelApplet::Preferences,
                       parent, "exampleapplet");
     }
 }
\end{verbatim}
\normalsize


Note: Don't change the factory function signature or the panel will fail to load your applet.

\begin{Desc}
\item[Author:]Matthias Elter $<${\tt elter@kde.org}$>$ \end{Desc}




Definition at line 97 of file kpanelapplet.h.

\subsection{Member Enumeration Documentation}
\index{KPanelApplet@{KPanel\-Applet}!Type@{Type}}
\index{Type@{Type}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf enum} {\bf KPanel\-Applet::Type}}\label{classKPanelApplet_w17}


This enum describes the type of the applet. 



Definition at line 106 of file kpanelapplet.h.\index{KPanelApplet@{KPanel\-Applet}!Action@{Action}}
\index{Action@{Action}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf enum} {\bf KPanel\-Applet::Action}}\label{classKPanelApplet_w18}


This enum holds flags which can be ORed together to describe which items the context menu over the applet handle contains. 



Definition at line 112 of file kpanelapplet.h.

\subsection{Constructor \& Destructor Documentation}
\index{KPanelApplet@{KPanel\-Applet}!KPanelApplet@{KPanelApplet}}
\index{KPanelApplet@{KPanelApplet}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPanel\-Applet::KPanel\-Applet (const {\bf QString} \& {\em config\-File}, {\bf Type} {\em t} = {\tt Normal}, int {\em actions} = {\tt 0}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0}, WFlags {\em f} = {\tt 0})}\label{classKPanelApplet_a0}


Constructs a KPanel\-Applet just like any other widget. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em config\-File}]The config\-File handed over in the factory function. \item[{\em t}]The applet {\bf type()}{\rm (p.\,\pageref{classKPanelApplet_a6})}. \item[{\em actions}]Standard RMB menu actions supported by the applet (see {\bf action()}{\rm (p.\,\pageref{classKPanelApplet_a8})} ). \item[{\em parent}]The pointer to the parent widget handed over in the factory function. \item[{\em name}]A {\bf Qt} object name for your applet. \item[{\em f}]Window control flags \end{description}
\end{Desc}


Definition at line 45 of file kpanelapplet.cpp.

References QPalette::active(), QPalette::inactive(), KShared\-Config::open\-Config(), QFrame::set\-Frame\-Style(), and QPalette::set\-Inactive().\index{KPanelApplet@{KPanel\-Applet}!~KPanelApplet@{$\sim$KPanelApplet}}
\index{~KPanelApplet@{$\sim$KPanelApplet}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPanel\-Applet::$\sim${\bf KPanel\-Applet} ()}\label{classKPanelApplet_a1}


Destructor. 



Definition at line 67 of file kpanelapplet.cpp.

References needs\-Focus().

\subsection{Member Function Documentation}
\index{KPanelApplet@{KPanel\-Applet}!widthForHeight@{widthForHeight}}
\index{widthForHeight@{widthForHeight}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int KPanel\-Applet::width\-For\-Height (int {\em height}) const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKPanelApplet_a2}


Returns a suggested width for a given height. 

Every applet should reimplement this function.

Depending on the panel orientation the height (horizontal panel) or the width (vertical panel) of the applets is fixed. The exact values of the fixed size component depend on the panel size.

On a horizontal panel the applet height is fixed, the panel will call width\-For\-Height(int height) with {\tt height} equal to 'the fixed applet height' when laying out the applets.

The applet can now choose the other size component (width) based on the given height.

The width you return is granted. 

Definition at line 155 of file kpanelapplet.h.\index{KPanelApplet@{KPanel\-Applet}!heightForWidth@{heightForWidth}}
\index{heightForWidth@{heightForWidth}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int KPanel\-Applet::height\-For\-Width (int {\em width}) const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKPanelApplet_a3}


\begin{Desc}
\item[Returns:]A suggested height for a given width.\end{Desc}
Every applet should reimplement this function.

Depending on the panel orientation the height (horizontal panel) or the width (vertical panel) of the applets is fixed. The exact values of the fixed size component depend on the panel size.

On a vertical panel the applet width is fixed, the panel will call height\-For\-Width(int width) with {\tt width} equal to 'the fixed applet width' when laying out the applets.

The applet can now choose the other size component (height) based on the given width.

The height you return is granted. 

Definition at line 176 of file kpanelapplet.h.\index{KPanelApplet@{KPanel\-Applet}!config@{config}}
\index{config@{config}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KConfig}$\ast$ KPanel\-Applet::config () const\hspace{0.3cm}{\tt  [inline]}}\label{classKPanelApplet_a4}


Always use this {\bf KConfig} object to save/load your applet's configuration. 

For unique applets this config object will write to a config file called $<$appletname$>$rc in the user's local KDE directory.

For normal applets this config object will write to a instance specific config file called $<$appletname$>$$<$instanceid$>$rc in the user's local KDE directory. 

Definition at line 187 of file kpanelapplet.h.\index{KPanelApplet@{KPanel\-Applet}!type@{type}}
\index{type@{type}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Type} KPanel\-Applet::type () const\hspace{0.3cm}{\tt  [inline]}}\label{classKPanelApplet_a6}


\begin{Desc}
\item[Returns:]Type indicating the applet's type. Type \end{Desc}


Definition at line 194 of file kpanelapplet.h.\index{KPanelApplet@{KPanel\-Applet}!actions@{actions}}
\index{actions@{actions}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KPanel\-Applet::actions () const\hspace{0.3cm}{\tt  [inline]}}\label{classKPanelApplet_a7}


\begin{Desc}
\item[Returns:]int indicating the supported RMB menu actions. Action \end{Desc}


Definition at line 200 of file kpanelapplet.h.\index{KPanelApplet@{KPanel\-Applet}!action@{action}}
\index{action@{action}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPanel\-Applet::action ({\bf Action} {\em a})\hspace{0.3cm}{\tt  [virtual]}}\label{classKPanelApplet_a8}


Generic action dispatcher. 

Called when the user selects an item from the applet's RMB menu.

Reimplement this function to handle actions.

For About, Help, Preferences and Report\-Bug, use the convenience handlers ref {\bf about()}{\rm (p.\,\pageref{classKPanelApplet_b0})}, {\bf help()}{\rm (p.\,\pageref{classKPanelApplet_b1})}, {\bf preferences()}{\rm (p.\,\pageref{classKPanelApplet_b2})}, {\bf report\-Bug()}{\rm (p.\,\pageref{classKPanelApplet_b3})} 

Definition at line 118 of file kpanelapplet.cpp.

References about(), help(), preferences(), and report\-Bug().\index{KPanelApplet@{KPanel\-Applet}!customMenu@{customMenu}}
\index{customMenu@{customMenu}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QPopup\-Menu} $\ast$ KPanel\-Applet::custom\-Menu () const}\label{classKPanelApplet_a9}


\begin{Desc}
\item[Returns:]the applet's custom menu, usually the same as the context menu, or 0 if none see set\-Custom\-Menu(QPopup\-Menu$\ast$) \end{Desc}


Definition at line 130 of file kpanelapplet.cpp.\index{KPanelApplet@{KPanel\-Applet}!updateLayout@{updateLayout}}
\index{updateLayout@{updateLayout}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPanel\-Applet::update\-Layout ()\hspace{0.3cm}{\tt  [signal]}}\label{classKPanelApplet_l0}


Emit this signal to make the panel relayout all applets, when you want to change your width (horizontal panel) or height (vertical panel). 

The panel is going to relayout all applets based on their width\-For\-Height(int height) (horizontal panel) or height\-For\-Width(int width) (vertical panel).

Please note that the panel may change the applet's location if the new width\-For\-Height(int height) (horizontal panel) or height\-For\-Width(int width) (vertical panel) does not fit into the current panel layout. \index{KPanelApplet@{KPanel\-Applet}!requestFocus@{requestFocus}}
\index{requestFocus@{requestFocus}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPanel\-Applet::request\-Focus ()\hspace{0.3cm}{\tt  [signal]}}\label{classKPanelApplet_l1}


Request keyboard focus from the panel. 

\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}


Referenced by needs\-Focus().\index{KPanelApplet@{KPanel\-Applet}!requestFocus@{requestFocus}}
\index{requestFocus@{requestFocus}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPanel\-Applet::request\-Focus (bool {\em focus})\hspace{0.3cm}{\tt  [signal]}}\label{classKPanelApplet_l2}


Request keyboard focus from the panel. 

Applets should never call this directly but rather call {\bf needs\-Focus(bool)}{\rm (p.\,\pageref{classKPanelApplet_b11})} \begin{Desc}
\item[See also:]{\bf needs\-Focus}{\rm (p.\,\pageref{classKPanelApplet_b11})} \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em focus}]activate the window and ensure the panel remains visible when true Each and ever time a request\-Focus(true) is emitted, it MUST be paired eventually with a request\-Focus(false) otherwise the panel may end up never hiding \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.4 \end{Desc}
\index{KPanelApplet@{KPanel\-Applet}!about@{about}}
\index{about@{about}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KPanel\-Applet::about ()\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{classKPanelApplet_b0}


Is called when the user selects \char`\"{}About\char`\"{} from the applet's RMB menu. 

Reimplement this function to launch a about dialog.

Note that this is called only when your applet supports the About action. See Action and {\bf KPanel\-Applet()}{\rm (p.\,\pageref{classKPanelApplet_a0})}. 

Definition at line 272 of file kpanelapplet.h.

Referenced by action().\index{KPanelApplet@{KPanel\-Applet}!help@{help}}
\index{help@{help}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KPanel\-Applet::help ()\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{classKPanelApplet_b1}


Is called when the user selects \char`\"{}Help\char`\"{} from the applet's RMB menu. 

Reimplement this function to launch a manual or help page.

Note that this is called only when your applet supports the Help action. See Action and {\bf KPanel\-Applet()}{\rm (p.\,\pageref{classKPanelApplet_a0})}. 

Definition at line 281 of file kpanelapplet.h.

Referenced by action().\index{KPanelApplet@{KPanel\-Applet}!preferences@{preferences}}
\index{preferences@{preferences}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KPanel\-Applet::preferences ()\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{classKPanelApplet_b2}


Is called when the user selects \char`\"{}Preferences\char`\"{} from the applet's RMB menu. 

Reimplement this function to launch a preferences dialog or kcontrol module.

Note that this is called only when your applet supports the preferences action. See Action and {\bf KPanel\-Applet()}{\rm (p.\,\pageref{classKPanelApplet_a0})}. 

Definition at line 290 of file kpanelapplet.h.

Referenced by action().\index{KPanelApplet@{KPanel\-Applet}!reportBug@{reportBug}}
\index{reportBug@{reportBug}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KPanel\-Applet::report\-Bug ()\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{classKPanelApplet_b3}


Is called when the user selects \char`\"{}Report bug\char`\"{} from the applet's RMB menu. 

Reimplement this function to launch a bug reporting dialog.

Note that this is called only when your applet supports the Report\-Bug action. See Action and {\bf KPanel\-Applet()}{\rm (p.\,\pageref{classKPanelApplet_a0})} 

Definition at line 300 of file kpanelapplet.h.

Referenced by action().\index{KPanelApplet@{KPanel\-Applet}!orientation@{orientation}}
\index{orientation@{orientation}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Qt::Orientation KPanel\-Applet::orientation () const\hspace{0.3cm}{\tt  [protected]}}\label{classKPanelApplet_b4}


\begin{Desc}
\item[Returns:]the applet's orientation. (horizontal or vertical) \end{Desc}


Definition at line 97 of file kpanelapplet.cpp.

Referenced by position\-Change().\index{KPanelApplet@{KPanel\-Applet}!position@{position}}
\index{position@{position}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Position KPanel\-Applet::position () const\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKPanelApplet_b5}


\begin{Desc}
\item[Returns:]the applet's position. (top, left, bottom, or right) \end{Desc}


Definition at line 309 of file kpanelapplet.h.\index{KPanelApplet@{KPanel\-Applet}!alignment@{alignment}}
\index{alignment@{alignment}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Alignment KPanel\-Applet::alignment () const\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKPanelApplet_b6}


\begin{Desc}
\item[Returns:]the applet's alignment. (top/left, center, or bottom/right) \end{Desc}


Definition at line 313 of file kpanelapplet.h.\index{KPanelApplet@{KPanel\-Applet}!positionChange@{positionChange}}
\index{positionChange@{positionChange}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPanel\-Applet::position\-Change (Position {\em p})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKPanelApplet_b7}


The panel on which this applet resides has changed its position. 

Reimplement this change handler in order to adjust the look of your applet. 

Definition at line 89 of file kpanelapplet.cpp.

References orientation(), orientation\-Change(), popup\-Direction(), popup\-Direction\-Change(), and QFrame::resize\-Event().\index{KPanelApplet@{KPanel\-Applet}!alignmentChange@{alignmentChange}}
\index{alignmentChange@{alignmentChange}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KPanel\-Applet::alignment\-Change (Alignment)\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{classKPanelApplet_b8}


The panel on which this applet resides has changed its alignment. 

Reimplement this change handler in order to adjust the look of your applet. 

Definition at line 327 of file kpanelapplet.h.\index{KPanelApplet@{KPanel\-Applet}!setCustomMenu@{setCustomMenu}}
\index{setCustomMenu@{setCustomMenu}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPanel\-Applet::set\-Custom\-Menu (const {\bf QPopup\-Menu} $\ast$)\hspace{0.3cm}{\tt  [protected]}}\label{classKPanelApplet_b9}


Use this method to set the custom menu for this applet so that it can be shown in the applet handle menu and other appropriate places that the applet many not itself be aware of. 

The applet itself is still responsible for deleting and managing the the menu.

If the menu is deleted during the life of the applet, be sure to call this method again with the new menu (or 0) to avoid crashes 

Definition at line 135 of file kpanelapplet.cpp.\index{KPanelApplet@{KPanel\-Applet}!watchForFocus@{watchForFocus}}
\index{watchForFocus@{watchForFocus}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPanel\-Applet::watch\-For\-Focus ({\bf QWidget} $\ast$ {\em widget}, bool {\em watch} = {\tt true})\hspace{0.3cm}{\tt  [protected]}}\label{classKPanelApplet_b10}


Register widgets that can receive keyboard focus with this this method This call results in an event\-Filter being places on the widget. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em widget}]the widget to watch for keyboard focus \item[{\em watch}]whether to start watching the widget, or to stop doing so \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.4 \end{Desc}


Definition at line 140 of file kpanelapplet.cpp.\index{KPanelApplet@{KPanel\-Applet}!needsFocus@{needsFocus}}
\index{needsFocus@{needsFocus}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPanel\-Applet::needs\-Focus (bool {\em focus})\hspace{0.3cm}{\tt  [protected]}}\label{classKPanelApplet_b11}


Call this whenever focus is needed or not needed. 

You do not have to call this method for widgets that have been registered with watch\-For\-Focus \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em focus}]whether to or not to request focus \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.4 \end{Desc}


Definition at line 162 of file kpanelapplet.cpp.

References request\-Focus().

Referenced by $\sim$KPanel\-Applet().\index{KPanelApplet@{KPanel\-Applet}!orientationChange@{orientationChange}}
\index{orientationChange@{orientationChange}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual KDE\_\-DEPRECATED void KPanel\-Applet::orientation\-Change (Orientation)\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{classKPanelApplet_b12}


The orientation changed to {\tt orientation}. 

Reimplement this change handler in order to adjust the look of your applet.

\begin{Desc}
\item[{\bf Deprecated}]Reimplement position\-Change instead. \end{Desc}


Definition at line 364 of file kpanelapplet.h.

Referenced by position\-Change().\index{KPanelApplet@{KPanel\-Applet}!popupDirection@{popupDirection}}
\index{popupDirection@{popupDirection}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPanel\-Applet::Direction KPanel\-Applet::popup\-Direction ()\hspace{0.3cm}{\tt  [protected]}}\label{classKPanelApplet_b13}


A convenience method that translates the position of the applet into which direction to show a popup. 



Definition at line 107 of file kpanelapplet.cpp.

Referenced by position\-Change().\index{KPanelApplet@{KPanel\-Applet}!popupDirectionChange@{popupDirectionChange}}
\index{popupDirectionChange@{popupDirectionChange}!KPanelApplet@{KPanel\-Applet}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual KDE\_\-DEPRECATED void KPanel\-Applet::popup\-Direction\-Change (Direction)\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{classKPanelApplet_b14}


The popup direction changed to {\tt direction}. 

Reimplement this change handler in order to adjust the look of your applet.

\begin{Desc}
\item[{\bf Deprecated}]Reimplement position\-Change instead. \end{Desc}


Definition at line 379 of file kpanelapplet.h.

Referenced by position\-Change().

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