\section{KParts::Main\-Window Class Reference}
\label{classKParts_1_1MainWindow}\index{KParts::MainWindow@{KParts::MainWindow}}
A KPart-aware main window, whose user interface is described in XML.  


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

Inheritance diagram for KParts::Main\-Window:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=182pt]{classKParts_1_1MainWindow__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KParts::Main\-Window:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=309pt]{classKParts_1_1MainWindow__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Main\-Window} ({\bf QWidget} $\ast$parent, const  char $\ast$name=0L, WFlags f=WType\_\-Top\-Level$|$WDestructive\-Close)
\begin{CompactList}\small\item\em Constructor, same signature as {\bf KMain\-Window}. \item\end{CompactList}\item 
{\bf Main\-Window} (const  char $\ast$name=0L, WFlags f=WDestructive\-Close)
\begin{CompactList}\small\item\em Compatibility Constructor, same signature as {\bf KMain\-Window}. \item\end{CompactList}\item 
virtual {\bf $\sim$Main\-Window} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf create\-GUI} ({\bf KParts::Part} $\ast$part)
\begin{CompactList}\small\item\em Create the GUI (by merging the host's and the active part's) You \_\-must\_\- call this in order to see any GUI being created. \item\end{CompactList}\item 
virtual void {\bf slot\-Set\-Status\-Bar\-Text} (const  {\bf QString} \&)
\begin{CompactList}\small\item\em Called when the active part wants to change the statusbar message Reimplement if your mainwindow has a complex statusbar (with several items). \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf create\-Shell\-GUI} (bool create=true)\label{classKParts_1_1MainWindow_b0}

\end{CompactItemize}


\subsection{Detailed Description}
A KPart-aware main window, whose user interface is described in XML. 

Inherit your main window from this class and don't forget to call {\bf set\-XMLFile}() in the inherited constructor.

It implements all internal interfaces in the case of a {\bf KMain\-Window} as host: the builder and servant interface (for menu merging). 



Definition at line 47 of file mainwindow.h.

\subsection{Constructor \& Destructor Documentation}
\index{KParts::MainWindow@{KParts::Main\-Window}!MainWindow@{MainWindow}}
\index{MainWindow@{MainWindow}!KParts::MainWindow@{KParts::Main\-Window}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Main\-Window::Main\-Window ({\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0L, WFlags {\em f} = WType\_\-Top\-Level$|$WDestructive\-Close)}\label{classKParts_1_1MainWindow_a0}


Constructor, same signature as {\bf KMain\-Window}. 



Definition at line 60 of file mainwindow.cpp.

References KStd\-Accel::name().\index{KParts::MainWindow@{KParts::Main\-Window}!MainWindow@{MainWindow}}
\index{MainWindow@{MainWindow}!KParts::MainWindow@{KParts::Main\-Window}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Main\-Window::Main\-Window (const char $\ast$ {\em name} = 0L, WFlags {\em f} = WDestructive\-Close)}\label{classKParts_1_1MainWindow_a1}


Compatibility Constructor, same signature as {\bf KMain\-Window}. 



Definition at line 67 of file mainwindow.cpp.

References KStd\-Accel::name().\index{KParts::MainWindow@{KParts::Main\-Window}!~MainWindow@{$\sim$MainWindow}}
\index{~MainWindow@{$\sim$MainWindow}!KParts::MainWindow@{KParts::Main\-Window}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Main\-Window::$\sim${\bf Main\-Window} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKParts_1_1MainWindow_a2}


Destructor. 



Definition at line 74 of file mainwindow.cpp.

\subsection{Member Function Documentation}
\index{KParts::MainWindow@{KParts::Main\-Window}!createGUI@{createGUI}}
\index{createGUI@{createGUI}!KParts::MainWindow@{KParts::Main\-Window}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Main\-Window::create\-GUI ({\bf KParts::Part} $\ast$ {\em part})\hspace{0.3cm}{\tt  [protected, slot]}}\label{classKParts_1_1MainWindow_j0}


Create the GUI (by merging the host's and the active part's) You \_\-must\_\- call this in order to see any GUI being created. 

In a main window with multiple parts being shown (e.g. as in Konqueror) you need to connect this slot to the KPart\-Manager::active\-Part\-Changed() signal

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em part}]The active part (set to 0L if no part). \end{description}
\end{Desc}


Definition at line 79 of file mainwindow.cpp.

References KXMLGUIFactory::add\-Client(), QObject::class\-Name(), KXMLGUIClient::factory(), KMain\-Window::gui\-Factory(), KGlobal::instance(), KParts::Part\-Base::load\-Plugins(), QObject::name(), KXMLGUIFactory::remove\-Client(), QApplication::send\-Event(), KMain\-Window::set\-Caption(), and slot\-Set\-Status\-Bar\-Text().\index{KParts::MainWindow@{KParts::Main\-Window}!slotSetStatusBarText@{slotSetStatusBarText}}
\index{slotSetStatusBarText@{slotSetStatusBarText}!KParts::MainWindow@{KParts::Main\-Window}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Main\-Window::slot\-Set\-Status\-Bar\-Text (const {\bf QString} \&)\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKParts_1_1MainWindow_j1}


Called when the active part wants to change the statusbar message Reimplement if your mainwindow has a complex statusbar (with several items). 



Definition at line 135 of file mainwindow.cpp.

References QStatus\-Bar::message(), and KMain\-Window::status\-Bar().

Referenced by create\-GUI().

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