\section{KParts::Plugin Class Reference}
\label{classKParts_1_1Plugin}\index{KParts::Plugin@{KParts::Plugin}}
A plugin is the way to add actions to an existing KParts application, or to a {\bf Part}{\rm (p.\,\pageref{classKParts_1_1Part})}.  


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

Inheritance diagram for KParts::Plugin:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=101pt]{classKParts_1_1Plugin__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KParts::Plugin:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=101pt]{classKParts_1_1Plugin__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Plugin} ({\bf QObject} $\ast${\bf parent}=0, const  char $\ast${\bf name}=0)
\begin{CompactList}\small\item\em Construct a new KParts plugin. \item\end{CompactList}\item 
virtual {\bf $\sim$Plugin} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
virtual {\bf QString} {\bf xml\-File} () const 
\begin{CompactList}\small\item\em Reimplemented for internal reasons. \item\end{CompactList}\item 
virtual {\bf QString} {\bf local\-XMLFile} () const 
\begin{CompactList}\small\item\em Reimplemented for internal reasons. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf load\-Plugins} ({\bf QObject} $\ast${\bf parent}, const  {\bf KInstance} $\ast${\bf instance})
\begin{CompactList}\small\item\em Load the plugin libraries from the directories appropriate to {\tt instance} and make the {\bf Plugin}{\rm (p.\,\pageref{classKParts_1_1Plugin})} objects children of {\tt parent}. \item\end{CompactList}\item 
void {\bf load\-Plugins} ({\bf QObject} $\ast${\bf parent}, const  {\bf QValue\-List}$<$ Plugin\-Info $>$ \&plugin\-Infos)
\begin{CompactList}\small\item\em Load the plugin libraries specified by the list {\tt docs} and make the {\bf Plugin}{\rm (p.\,\pageref{classKParts_1_1Plugin})} objects children of {\tt parent} . \item\end{CompactList}\item 
void {\bf load\-Plugins} ({\bf QObject} $\ast${\bf parent}, const  {\bf QValue\-List}$<$ Plugin\-Info $>$ \&plugin\-Infos, const  {\bf KInstance} $\ast${\bf instance})
\begin{CompactList}\small\item\em Load the plugin libraries specified by the list {\tt plugin\-Infos}, make the {\bf Plugin}{\rm (p.\,\pageref{classKParts_1_1Plugin})} objects children of {\tt parent}, and use the given {\tt instance}. \item\end{CompactList}\item 
void {\bf load\-Plugins} ({\bf QObject} $\ast${\bf parent}, {\bf KXMLGUIClient} $\ast$parent\-GUIClient, {\bf KInstance} $\ast${\bf instance}, bool enable\-New\-Plugins\-By\-Default=true)
\begin{CompactList}\small\item\em Load the plugin libraries for the given {\tt instance}, make the {\bf Plugin}{\rm (p.\,\pageref{classKParts_1_1Plugin})} objects children of {\tt parent}, and insert the plugin as a child GUI client of {\tt parent\-GUIClient}. \item\end{CompactList}\item 
{\bf QPtr\-List}$<$ {\bf Plugin} $>$ {\bf plugin\-Objects} ({\bf QObject} $\ast${\bf parent})
\begin{CompactList}\small\item\em Returns a list of plugin objects loaded for {\tt parent}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf set\-Instance} ({\bf KInstance} $\ast${\bf instance})\label{classKParts_1_1Plugin_b0}

\end{CompactItemize}
\subsection*{Static Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf QValue\-List}$<$ Plugin::Plugin\-Info $>$ {\bf plugin\-Infos} (const  {\bf KInstance} $\ast${\bf instance})
\begin{CompactList}\small\item\em Look for plugins in the {\tt instance's} \char`\"{}data\char`\"{} directory (+\char`\"{}/kpartplugins\char`\"{}). \item\end{CompactList}\item 
{\bf Plugin} $\ast$ {\bf load\-Plugin} ({\bf QObject} $\ast${\bf parent}, const  char $\ast$libname)\label{classKParts_1_1Plugin_f1}

\end{CompactItemize}


\subsection{Detailed Description}
A plugin is the way to add actions to an existing KParts application, or to a {\bf Part}{\rm (p.\,\pageref{classKParts_1_1Part})}. 

The XML of those plugins looks exactly like of the shell or parts, with one small difference: The document tag should have an additional attribute, named \char`\"{}library\char`\"{}, and contain the name of the library implementing the plugin.

If you want this plugin to be used by a part, you need to install the rc file under the directory \char`\"{}data\char`\"{} (KDEDIR/share/apps usually)+\char`\"{}/instancename/kpartplugins/\char`\"{} where instancename is the name of the part's instance. 



Definition at line 46 of file plugin.h.

\subsection{Constructor \& Destructor Documentation}
\index{KParts::Plugin@{KParts::Plugin}!Plugin@{Plugin}}
\index{Plugin@{Plugin}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KParts::Plugin::Plugin ({\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0)}\label{classKParts_1_1Plugin_a0}


Construct a new KParts plugin. 

\index{KParts::Plugin@{KParts::Plugin}!~Plugin@{$\sim$Plugin}}
\index{~Plugin@{$\sim$Plugin}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual KParts::Plugin::$\sim${\bf Plugin} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKParts_1_1Plugin_a1}


Destructor. 



\subsection{Member Function Documentation}
\index{KParts::Plugin@{KParts::Plugin}!xmlFile@{xmlFile}}
\index{xmlFile@{xmlFile}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QString} KParts::Plugin::xml\-File () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKParts_1_1Plugin_a2}


Reimplemented for internal reasons. 



Reimplemented from {\bf KXMLGUIClient}.\index{KParts::Plugin@{KParts::Plugin}!localXMLFile@{localXMLFile}}
\index{localXMLFile@{localXMLFile}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QString} KParts::Plugin::local\-XMLFile () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKParts_1_1Plugin_a3}


Reimplemented for internal reasons. 



Reimplemented from {\bf KXMLGUIClient}.\index{KParts::Plugin@{KParts::Plugin}!loadPlugins@{loadPlugins}}
\index{loadPlugins@{loadPlugins}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KParts::Plugin::load\-Plugins ({\bf QObject} $\ast$ {\em parent}, const {\bf KInstance} $\ast$ {\em instance})\hspace{0.3cm}{\tt  [static]}}\label{classKParts_1_1Plugin_e0}


Load the plugin libraries from the directories appropriate to {\tt instance} and make the {\bf Plugin}{\rm (p.\,\pageref{classKParts_1_1Plugin})} objects children of {\tt parent}. 

It is recommended to use the last {\bf load\-Plugins}{\rm (p.\,\pageref{classKParts_1_1Plugin_e0})} method instead, to support enabling and disabling of plugins. \index{KParts::Plugin@{KParts::Plugin}!loadPlugins@{loadPlugins}}
\index{loadPlugins@{loadPlugins}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KParts::Plugin::load\-Plugins ({\bf QObject} $\ast$ {\em parent}, const {\bf QValue\-List}$<$ Plugin\-Info $>$ \& {\em plugin\-Infos})\hspace{0.3cm}{\tt  [static]}}\label{classKParts_1_1Plugin_e1}


Load the plugin libraries specified by the list {\tt docs} and make the {\bf Plugin}{\rm (p.\,\pageref{classKParts_1_1Plugin})} objects children of {\tt parent} . 

It is recommended to use the last {\bf load\-Plugins}{\rm (p.\,\pageref{classKParts_1_1Plugin_e0})} method instead, to support enabling and disabling of plugins. \index{KParts::Plugin@{KParts::Plugin}!loadPlugins@{loadPlugins}}
\index{loadPlugins@{loadPlugins}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KParts::Plugin::load\-Plugins ({\bf QObject} $\ast$ {\em parent}, const {\bf QValue\-List}$<$ Plugin\-Info $>$ \& {\em plugin\-Infos}, const {\bf KInstance} $\ast$ {\em instance})\hspace{0.3cm}{\tt  [static]}}\label{classKParts_1_1Plugin_e2}


Load the plugin libraries specified by the list {\tt plugin\-Infos}, make the {\bf Plugin}{\rm (p.\,\pageref{classKParts_1_1Plugin})} objects children of {\tt parent}, and use the given {\tt instance}. 

It is recommended to use the last {\bf load\-Plugins}{\rm (p.\,\pageref{classKParts_1_1Plugin_e0})} method instead, to support enabling and disabling of plugins. \index{KParts::Plugin@{KParts::Plugin}!loadPlugins@{loadPlugins}}
\index{loadPlugins@{loadPlugins}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KParts::Plugin::load\-Plugins ({\bf QObject} $\ast$ {\em parent}, {\bf KXMLGUIClient} $\ast$ {\em parent\-GUIClient}, {\bf KInstance} $\ast$ {\em instance}, bool {\em enable\-New\-Plugins\-By\-Default} = true)\hspace{0.3cm}{\tt  [static]}}\label{classKParts_1_1Plugin_e3}


Load the plugin libraries for the given {\tt instance}, make the {\bf Plugin}{\rm (p.\,\pageref{classKParts_1_1Plugin})} objects children of {\tt parent}, and insert the plugin as a child GUI client of {\tt parent\-GUIClient}. 

This method uses the {\bf KConfig} object of the given instance, to find out which plugins are enabled and which are disabled. What happens by default (i.e. for new plugins that are not in that config file) is controlled by {\tt enable\-New\-Plugins\-By\-Default}.

If a disabled plugin is already loaded it will be removed from the GUI factory and deleted.

This method is automatically called by KParts::Plugin and by {\bf KParts::Main\-Window}{\rm (p.\,\pageref{classKParts_1_1MainWindow})}. \index{KParts::Plugin@{KParts::Plugin}!pluginObjects@{pluginObjects}}
\index{pluginObjects@{pluginObjects}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPtr\-List}$<${\bf Plugin}$>$ KParts::Plugin::plugin\-Objects ({\bf QObject} $\ast$ {\em parent})\hspace{0.3cm}{\tt  [static]}}\label{classKParts_1_1Plugin_e4}


Returns a list of plugin objects loaded for {\tt parent}. 

This functions basically calls the {\bf query\-List} method of {\bf QObject} to retrieve the list of child objects inheriting KParts::Plugin . \index{KParts::Plugin@{KParts::Plugin}!pluginInfos@{pluginInfos}}
\index{pluginInfos@{pluginInfos}!KParts::Plugin@{KParts::Plugin}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QValue\-List}$<$Plugin::Plugin\-Info$>$ KParts::Plugin::plugin\-Infos (const {\bf KInstance} $\ast$ {\em instance})\hspace{0.3cm}{\tt  [static, protected]}}\label{classKParts_1_1Plugin_f0}


Look for plugins in the {\tt instance's} \char`\"{}data\char`\"{} directory (+\char`\"{}/kpartplugins\char`\"{}). 

\begin{Desc}
\item[Returns:]A list of {\bf QDom\-Document} s, containing the parsed xml documents returned by plugins. \end{Desc}


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