\section{KSelection\-Watcher Class Reference}
\label{classKSelectionWatcher}\index{KSelectionWatcher@{KSelectionWatcher}}
This class implements watching manager selections, as described in the ICCCM section 2.8. ICCCM manager selection watching.  


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

Inheritance diagram for KSelection\-Watcher:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=68pt]{classKSelectionWatcher__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KSelection\-Watcher:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=68pt]{classKSelectionWatcher__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf new\-Owner} (Window owner)
\item 
void {\bf lost\-Owner} ()
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KSelection\-Watcher} (Atom selection, int screen=-1, {\bf QObject} $\ast${\bf parent}=NULL)
\item 
{\bf KSelection\-Watcher} (const char $\ast$selection, int screen=-1, {\bf QObject} $\ast${\bf parent}=NULL)
\item 
Window {\bf owner} ()
\item 
void {\bf filter\-Event} (XEvent $\ast$ev\_\-P)\label{classKSelectionWatcher_a4}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKSelectionWatcher_b0}

\end{CompactItemize}


\subsection{Detailed Description}
This class implements watching manager selections, as described in the ICCCM section 2.8. ICCCM manager selection watching. 

It emits signal {\bf new\-Owner()}{\rm (p.\,\pageref{classKSelectionWatcher_l0})} when a new owner claim the selection, and emits {\bf lost\-Owner()}{\rm (p.\,\pageref{classKSelectionWatcher_l1})} when the selection ownership is given up. To find out current owner of the selection, {\bf owner()}{\rm (p.\,\pageref{classKSelectionWatcher_a3})} can be used. \begin{Desc}
\item[Since:]3.2 \end{Desc}




Definition at line 169 of file kmanagerselection.h.

\subsection{Constructor \& Destructor Documentation}
\index{KSelectionWatcher@{KSelection\-Watcher}!KSelectionWatcher@{KSelectionWatcher}}
\index{KSelectionWatcher@{KSelectionWatcher}!KSelectionWatcher@{KSelection\-Watcher}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSelection\-Watcher::KSelection\-Watcher (Atom {\em selection}, int {\em screen} = {\tt -1}, {\bf QObject} $\ast$ {\em parent} = {\tt NULL})}\label{classKSelectionWatcher_a0}


This constructor initializes the object, but doesn't perform any operation on the selection. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em selection}]atom representing the manager selection \item[{\em screen}]X screen, or -1 for default \item[{\em parent}]parent object, or NULL if there is none \end{description}
\end{Desc}


Definition at line 393 of file kmanagerselection.cpp.\index{KSelectionWatcher@{KSelection\-Watcher}!KSelectionWatcher@{KSelectionWatcher}}
\index{KSelectionWatcher@{KSelectionWatcher}!KSelectionWatcher@{KSelection\-Watcher}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSelection\-Watcher::KSelection\-Watcher (const char $\ast$ {\em selection}, int {\em screen} = {\tt -1}, {\bf QObject} $\ast$ {\em parent} = {\tt NULL})}\label{classKSelectionWatcher_a1}


This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

This constructor accepts the selection name and creates the appropriate atom for it automatically.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em selection}]name of the manager selection \item[{\em screen}]X screen, or -1 for default \item[{\em parent}]parent object, or NULL if there is none \end{description}
\end{Desc}


Definition at line 403 of file kmanagerselection.cpp.

\subsection{Member Function Documentation}
\index{KSelectionWatcher@{KSelection\-Watcher}!owner@{owner}}
\index{owner@{owner}!KSelectionWatcher@{KSelection\-Watcher}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Window KSelection\-Watcher::owner ()}\label{classKSelectionWatcher_a3}


Return the current owner of the manager selection, if any. 



Definition at line 432 of file kmanagerselection.cpp.

References KXError\-Handler::error(), and new\-Owner().\index{KSelectionWatcher@{KSelection\-Watcher}!newOwner@{newOwner}}
\index{newOwner@{newOwner}!KSelectionWatcher@{KSelection\-Watcher}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSelection\-Watcher::new\-Owner (Window {\em owner})\hspace{0.3cm}{\tt  [signal]}}\label{classKSelectionWatcher_l0}


This signal is emitted when the selection is successfully claimed by a new owner. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em owner}]the new owner of the selection \end{description}
\end{Desc}


Referenced by owner().\index{KSelectionWatcher@{KSelection\-Watcher}!lostOwner@{lostOwner}}
\index{lostOwner@{lostOwner}!KSelectionWatcher@{KSelection\-Watcher}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSelection\-Watcher::lost\-Owner ()\hspace{0.3cm}{\tt  [signal]}}\label{classKSelectionWatcher_l1}


This signal is emitted when the selection is given up, i.e. 

there's no owner. Note that the selection may be immediatelly claimed again, so the {\bf new\-Owner()}{\rm (p.\,\pageref{classKSelectionWatcher_l0})} signal may be emitted right after this one. It's safe to delete the instance in a slot connected to this signal. 

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