.TH "KMainWindow" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KMainWindow \- KDE top level main window  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kmainwindow.h>\fP
.PP
Inherits \fBQMainWindow\fP, \fBKXMLGUIBuilder\fP, and \fBKXMLGUIClient\fP.
.PP
Inherited by \fBKDockMainWindow\fP, and \fBUIServer\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBCreationFlags\fP { \fBNoDCOPObject\fP =  1 }"
.br
.ti -1c
.RI "enum \fBStandardWindowOptions\fP { \fBToolBar\fP =  1, \fBKeys\fP =  2, \fBStatusBar\fP =  4, \fBSave\fP =  8, \fBCreate\fP =  16 }"
.br
.in -1c
.SS "Public Slots"

.in +1c
.ti -1c
.RI "int \fBconfigureToolbars\fP ()"
.br
.ti -1c
.RI "virtual void \fBsetCaption\fP (const \fBQString\fP &caption)"
.br
.ti -1c
.RI "virtual void \fBsetCaption\fP (const \fBQString\fP &caption, bool modified)"
.br
.ti -1c
.RI "virtual void \fBsetPlainCaption\fP (const \fBQString\fP &caption)"
.br
.ti -1c
.RI "void \fBappHelpActivated\fP (void)"
.br
.ti -1c
.RI "virtual void \fBslotStateChanged\fP (const \fBQString\fP &newstate)"
.br
.ti -1c
.RI "void \fBslotStateChanged\fP (const \fBQString\fP &newstate, KXMLGUIClient::ReverseStateChange)"
.br
.ti -1c
.RI "void \fBsetSettingsDirty\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKMainWindow\fP (\fBQWidget\fP *parent=0, const char *name=0, WFlags f=WType_TopLevel|WDestructiveClose)"
.br
.ti -1c
.RI "\fBKMainWindow\fP (int cflags, \fBQWidget\fP *parent=0, const char *name=0, WFlags f=WType_TopLevel|WDestructiveClose)"
.br
.ti -1c
.RI "virtual \fB~KMainWindow\fP ()"
.br
.ti -1c
.RI "\fBKPopupMenu\fP * \fBhelpMenu\fP (const \fBQString\fP &aboutAppText=QString::null, bool showWhatsThis=true)"
.br
.ti -1c
.RI "\fBKPopupMenu\fP * \fBcustomHelpMenu\fP (bool showWhatsThis=true)"
.br
.ti -1c
.RI "virtual void \fBshow\fP ()"
.br
.ti -1c
.RI "virtual void \fBhide\fP ()"
.br
.ti -1c
.RI "bool \fBrestore\fP (int number, bool show=true)"
.br
.ti -1c
.RI "virtual \fBKXMLGUIFactory\fP * \fBguiFactory\fP ()"
.br
.ti -1c
.RI "void \fBcreateGUI\fP (const \fBQString\fP &xmlfile=QString::null, bool _conserveMemory=true)"
.br
.ti -1c
.RI "void \fBsetHelpMenuEnabled\fP (bool showHelpMenu=true)"
.br
.ti -1c
.RI "bool \fBisHelpMenuEnabled\fP ()"
.br
.ti -1c
.RI "bool \fBhasMenuBar\fP ()"
.br
.ti -1c
.RI "\fBKMenuBar\fP * \fBmenuBar\fP ()"
.br
.ti -1c
.RI "\fBKStatusBar\fP * \fBstatusBar\fP ()"
.br
.ti -1c
.RI "\fBKToolBar\fP * \fBtoolBar\fP (const char *name=0)"
.br
.ti -1c
.RI "\fBQPtrListIterator\fP< \fBKToolBar\fP > \fBtoolBarIterator\fP ()"
.br
.ti -1c
.RI "\fBKAccel\fP * \fBaccel\fP ()"
.br
.ti -1c
.RI "void \fBsetFrameBorderWidth\fP (int)"
.br
.ti -1c
.RI "void \fBsetAutoSaveSettings\fP (const \fBQString\fP &groupName=\fBQString::fromLatin1\fP('MainWindow'), bool saveWindowSize=true)"
.br
.ti -1c
.RI "void \fBresetAutoSaveSettings\fP ()"
.br
.ti -1c
.RI "bool \fBautoSaveSettings\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBautoSaveGroup\fP () const "
.br
.ti -1c
.RI "void \fBapplyMainWindowSettings\fP (\fBKConfig\fP *config, const \fBQString\fP &groupName, bool force)"
.br
.ti -1c
.RI "void \fBapplyMainWindowSettings\fP (\fBKConfig\fP *config, const \fBQString\fP &groupName=QString::null)"
.br
.ti -1c
.RI "void \fBsaveMainWindowSettings\fP (\fBKConfig\fP *config, const \fBQString\fP &groupName=QString::null)"
.br
.ti -1c
.RI "void \fBsetStandardToolBarMenuEnabled\fP (bool enable)"
.br
.ti -1c
.RI "bool \fBisStandardToolBarMenuEnabled\fP () const "
.br
.ti -1c
.RI "void \fBcreateStandardStatusBarAction\fP ()"
.br
.ti -1c
.RI "void \fBsetupGUI\fP (int options=ToolBar|Keys|StatusBar|Save|Create, const \fBQString\fP &xmlfile=QString::null)"
.br
.ti -1c
.RI "\fBKAction\fP * \fBtoolBarMenuAction\fP ()"
.br
.ti -1c
.RI "void \fBsetupToolbarMenuActions\fP ()"
.br
.ti -1c
.RI "virtual void \fBfinalizeGUI\fP (\fBKXMLGUIClient\fP *client)"
.br
.ti -1c
.RI "void \fBfinalizeGUI\fP (bool force)"
.br
.ti -1c
.RI "bool \fBinitialGeometrySet\fP () const "
.br
.ti -1c
.RI "void \fBignoreInitialGeometry\fP ()"
.br
.ti -1c
.RI "\fBQSize\fP \fBsizeForCentralWidgetSize\fP (\fBQSize\fP size) KDE_DEPRECATED"
.br
.ti -1c
.RI "virtual void \fBsetIcon\fP (const \fBQPixmap\fP &)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static bool \fBcanBeRestored\fP (int number)"
.br
.ti -1c
.RI "static const \fBQString\fP \fBclassNameOfToplevel\fP (int number)"
.br
.ti -1c
.RI "static \fBQPtrList\fP< \fBKMainWindow\fP > * \fBgetMemberList\fP ()"
.br
.in -1c
.SS "Static Public Attributes"

.in +1c
.ti -1c
.RI "static \fBQPtrList\fP< \fBKMainWindow\fP > * \fBmemberList\fP = 0L"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBsaveNewToolbarConfig\fP ()"
.br
.ti -1c
.RI "virtual void \fBshowAboutApplication\fP ()"
.br
.ti -1c
.RI "void \fBsaveAutoSaveSettings\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBpaintEvent\fP (\fBQPaintEvent\fP *e)"
.br
.ti -1c
.RI "void \fBchildEvent\fP (\fBQChildEvent\fP *e)"
.br
.ti -1c
.RI "void \fBresizeEvent\fP (\fBQResizeEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBcloseEvent\fP (\fBQCloseEvent\fP *)"
.br
.ti -1c
.RI "virtual bool \fBqueryExit\fP ()"
.br
.ti -1c
.RI "virtual bool \fBqueryClose\fP ()"
.br
.ti -1c
.RI "virtual void \fBsaveProperties\fP (\fBKConfig\fP *)"
.br
.ti -1c
.RI "virtual void \fBreadProperties\fP (\fBKConfig\fP *)"
.br
.ti -1c
.RI "virtual void \fBsaveGlobalProperties\fP (\fBKConfig\fP *sessionConfig)"
.br
.ti -1c
.RI "virtual void \fBreadGlobalProperties\fP (\fBKConfig\fP *sessionConfig)"
.br
.ti -1c
.RI "void \fBsavePropertiesInternal\fP (\fBKConfig\fP *, int)"
.br
.ti -1c
.RI "bool \fBreadPropertiesInternal\fP (\fBKConfig\fP *, int)"
.br
.ti -1c
.RI "bool \fBsettingsDirty\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBsettingsGroup\fP () const "
.br
.ti -1c
.RI "void \fBsaveWindowSize\fP (\fBKConfig\fP *config) const "
.br
.ti -1c
.RI "void \fBrestoreWindowSize\fP (\fBKConfig\fP *config)"
.br
.ti -1c
.RI "void \fBparseGeometry\fP (bool parsewidth)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKMWSessionManaged\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
KDE top level main window 

Top level widget that provides toolbars, a status line and a frame.
.PP
It should be used as a top level (parent-less) widget. It manages the geometry for all its children, including your main widget.
.PP
Normally, you will inherit from KMainWindow, then construct (or use some existing) widget as your main view. You can set only one main view.
.PP
You can add as many toolbars as you like. There can be only one menubar and only one statusbar.
.PP
The toolbars, menubar, and statusbar can be created by the KMainWindow and - unlike the old KMainWindow - may, but do not have to, be deleted by you. KMainWindow will handle that internally.
.PP
Height and width can be operated independently from each other. Simply define the minimum/maximum height/width of your main widget and KMainWindow will take this into account. For fixed size windows set your main widget to a fixed size.
.PP
Fixed aspect ratios (heightForWidth()) and fixed width widgets are not supported.
.PP
KMainWindow will set icon, mini icon and caption, which it gets from \fBKApplication\fP. It provides full session management, and will save its position, geometry and positions of toolbars and menubar on logout. If you want to save additional data, reimplement \fBsaveProperties()\fP and (to read them again on next login) \fBreadProperties()\fP. To save special data about your data, reimplement \fBsaveGlobalProperties()\fP. To warn user that application or windows have unsaved data on close or logout, reimplement \fBqueryClose()\fP and/or \fBqueryExit()\fP.
.PP
There are also kRestoreMainWindows convenience functions which can restore all your windows on next login.
.PP
Note that a KMainWindow per-default is created with the WDestructiveClose flag, i.e. it is automatically destroyed when the window is closed. If you do not want this behavior, specify 0 as widget flag in the constructor.
.PP
\fBSee also:\fP
.RS 4
\fBKApplication\fP 
.RE
.PP
\fBAuthor:\fP
.RS 4
Reginald Stadlbauer (reggie@kde.org) Stephan Kulow (coolo@kde.org), Matthias Ettrich (ettrich@kde.org), Chris Schlaeger (cs@kde.org), Sven Radej (radej@kde.org). Maintained by Sven Radej (radej@kde.org) 
.RE
.PP

.PP
Definition at line 98 of file kmainwindow.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "\fBenum\fP \fBKMainWindow::CreationFlags\fP"
.PP
Flags that can be passed in an argument to the constructor to change the behavior. 
.PP
NoDCOPObject tells KMainWindow not to create a \fBKMainWindowInterface\fP. This can be useful in particular for inherited classes, which might want to create more specific dcop interfaces. It's a good idea to use \fBKMainWindowInterface\fP as the base class for such interfaces though (to provide the standard mainwindow functionality via \fBDCOP\fP). 
.PP
Definition at line 148 of file kmainwindow.h.
.SS "\fBenum\fP \fBKMainWindow::StandardWindowOptions\fP"
.PP
\fBSee also:\fP
.RS 4
\fBsetupGUI()\fP 
.RE
.PP

.PP
\fBEnumeration values: \fP
.in +1c
.TP
\fB\fIToolBar \fP\fP
adds action to show/hide the toolbar(s) and adds action to configure the toolbar(s). 
.PP
\fBSee also:\fP
.RS 4
\fBsetStandardToolBarMenuEnabled\fP 
.RE
.PP

.TP
\fB\fIKeys \fP\fP
adds action to show the key configure action. 
.TP
\fB\fIStatusBar \fP\fP
adds action to show/hide the statusbar if the statusbar exists. 
.PP
\fBSee also:\fP
.RS 4
\fBcreateStandardStatusBarAction\fP 
.RE
.PP

.TP
\fB\fISave \fP\fP
auto-saves (and loads) the toolbar/menubar/statusbar settings and window size using the default name. 
.PP
\fBSee also:\fP
.RS 4
\fBsetAutoSaveSettings\fP
.RE
.PP
Typically you want to let the default window size be determined by the widgets size hints. Make sure that \fBsetupGUI()\fP is called after all the widgets are created ( including setCentralWidget ) so the default size's will be correct. 
.PP
\fBSee also:\fP
.RS 4
\fBsetAutoSaveSettings\fP for more information on this topic. 
.RE
.PP

.TP
\fB\fICreate \fP\fP
calls \fBcreateGUI()\fP once ToolBar, Keys and Statusbar have been taken care of. 
.PP
\fBSee also:\fP
.RS 4
\fBcreateGUI\fP 
.RE
.PP

.PP
Definition at line 546 of file kmainwindow.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KMainWindow::KMainWindow (\fBQWidget\fP * parent = \fC0\fP, const char * name = \fC0\fP, WFlags f = \fCWType_TopLevel|WDestructiveClose\fP)"
.PP
Construct a main window. 
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP The widget parent. This is usually 0 but it may also be the window group leader. In that case, the KMainWindow becomes sort of a secondary window.
.br
\fIname\fP The object name. For session management and window management to work properly, all main windows in the application should have a different name. When passing 0 (the default), KMainWindow will create a unique name, but it's recommended to explicitly pass a window name that will also describe the type of the window. If there can be several windows of the same type, append '#' (hash) to the name, and KMainWindow will append numbers to make the names unique. For example, for a mail client which has one main window showing the mails and folders, and which can also have one or more windows for composing mails, the name for the folders window should be e.g. 'mainwindow' and for the composer windows 'composer#'.
.br
\fIf\fP Specify the widget flags. The default is WType_TopLevel and WDestructiveClose. TopLevel indicates that a main window is a toplevel window, regardless of whether it has a parent or not. DestructiveClose indicates that a main window is automatically destroyed when its window is closed. Pass 0 if you do not want this behavior.
.RE
.PP
\fBSee also:\fP
.RS 4
http://doc.trolltech.com/3.2/qt.html#WidgetFlags-enum
.RE
.PP
KMainWindows must be created on the heap with 'new', like: 
.PP
.nf
 KMainWindow *kmw = new KMainWindow (...);

.fi
.PP
 
.PP
Definition at line 167 of file kmainwindow.cpp.
.SS "KMainWindow::KMainWindow (int cflags, \fBQWidget\fP * parent = \fC0\fP, const char * name = \fC0\fP, WFlags f = \fCWType_TopLevel|WDestructiveClose\fP)"
.PP
Overloaded constructor which allows passing some \fBKMainWindow::CreationFlags\fP. 
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 173 of file kmainwindow.cpp.
.SS "KMainWindow::~\fBKMainWindow\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.PP
Will also destroy the toolbars, and menubar if needed. 
.PP
Definition at line 314 of file kmainwindow.cpp.
.PP
References memberList, and QPtrList::remove().
.SH "Member Function Documentation"
.PP 
.SS "\fBKPopupMenu\fP * KMainWindow::helpMenu (const \fBQString\fP & aboutAppText = \fCQString::null\fP, bool showWhatsThis = \fCtrue\fP)"
.PP
Retrieve the standard help menu. 
.PP
It contains entires for the help system (activated by F1), an optional 'What's This?' entry (activated by Shift F1), an application specific dialog box, and an 'About KDE' dialog box.
.PP
Example (adding a standard help menu to your application): 
.PP
.nf
 KPopupMenu *help = helpMenu( <myTextString> );
 menuBar()->insertItem( i18n('&Help'), help );

.fi
.PP
.PP
\fBParameters:\fP
.RS 4
\fIaboutAppText\fP The string that is used in the application specific dialog box. If you leave this string empty the information in the global \fBKAboutData\fP of the application will be used to make a standard dialog box.
.br
\fIshowWhatsThis\fP Set this to false if you do not want to include the 'What's This' menu entry.
.RE
.PP
\fBReturns:\fP
.RS 4
A standard help menu. 
.RE
.PP

.PP
Definition at line 324 of file kmainwindow.cpp.
.PP
References KXMLGUIClient::instance(), KHelpMenu::menu(), and showAboutApplication().
.SS "\fBKPopupMenu\fP * KMainWindow::customHelpMenu (bool showWhatsThis = \fCtrue\fP)"
.PP
Returns the help menu. 
.PP
Creates a standard help menu if none exists yet.
.PP
It contains entries for the help system (activated by F1), an optional 'What's This?' entry (activated by Shift F1), an application specific dialog box, and an 'About KDE' dialog box. You must create the application specific dialog box yourself. When the 'About application' menu entry is activated, a signal will trigger the showAboutApplication slot. See showAboutApplication for more information.
.PP
Example (adding a help menu to your application): 
.PP
.nf
 menuBar()->insertItem( i18n('&Help'), customHelpMenu() );

.fi
.PP
.PP
\fBParameters:\fP
.RS 4
\fIshowWhatsThis\fP Set this to \fCfalse\fP if you do not want to include the 'What's This' menu entry.
.RE
.PP
\fBReturns:\fP
.RS 4
A standard help menu. 
.RE
.PP

.PP
Definition at line 341 of file kmainwindow.cpp.
.PP
References KHelpMenu::menu(), and showAboutApplication().
.SS "bool KMainWindow::canBeRestored (int number)\fC [static]\fP"
.PP
\fBSession Management\fP 
.PP
Try to restore the toplevel widget as defined by the number (1..X).
.PP
If the session did not contain so high a number, the configuration is not changed and \fCfalse\fP returned.
.PP
That means clients could simply do the following: 
.PP
.nf
 if (kapp->isRestored()){
   int n = 1;
   while (KMainWindow::canBeRestored(n)){
     (new childMW)->restore(n);
     n++;
   }
 } else {
   // create default application as usual
 }

.fi
.PP
 Note that \fBQWidget::show()\fP is called implicitly in restore.
.PP
With this you can easily restore all toplevel windows of your application.
.PP
If your application uses different kinds of toplevel windows, then you can use KMainWindow::classNameOfToplevel(n) to determine the exact type before calling the childMW constructor in the example from above.
.PP
If your client has only one kind of toplevel widgets (which should be pretty usual) then you should use the RESTORE-macro for backwards compatibility with 3.1 and 3.0 branches:
.PP
.PP
.nf
 if (kapp->isRestored())
   RESTORE(childMW)
 else {
   // create default application as usual
 }
.fi
.PP
.PP
The macro expands to the term above but is easier to use and less code to write.
.PP
For new code or if you have more than one kind of toplevel widget (each derived from KMainWindow, of course), you can use the templated kRestoreMainWindows global functions:
.PP
.PP
.nf
 if (kapp->isRestored())
   kRestoreMainWindows< childMW1, childMW2, childMW3 >();
 else {
   // create default application as usual
 }
.fi
.PP
.PP
Currently, these functions are provided for up to three template arguments. If you need more, tell us. To help you in deciding whether or not you can use kRestoreMainWindows, a define KDE_RESTORE_MAIN_WINDOWS_NUM_TEMPLATE_ARGS is provided.
.PP
\fBSee also:\fP
.RS 4
\fBrestore()\fP 
.PP
\fBclassNameOfToplevel()\fP 
.RE
.PP

.PP
Definition at line 352 of file kmainwindow.cpp.
.PP
References KConfigBase::readNumEntry(), and KConfigBase::setGroup().
.PP
Referenced by restore().
.SS "const \fBQString\fP KMainWindow::classNameOfToplevel (int number)\fC [static]\fP"
.PP
Returns the className() of the \fCnumber\fP of the toplevel window which should be restored. 
.PP
This is only useful if your application uses different kinds of toplevel windows. 
.PP
Definition at line 364 of file kmainwindow.cpp.
.PP
References KConfigBase::hasKey(), QString::prepend(), KConfigBase::readEntry(), KConfigBase::setGroup(), and QString::setNum().
.SS "void KMainWindow::show ()\fC [virtual]\fP"
.PP
Reimplementation of QMainWindow::show(). 
.PP
Definition at line 381 of file kmainwindow.cpp.
.PP
Referenced by restore().
.SS "void KMainWindow::hide ()\fC [virtual]\fP"
.PP
Reimplementation of QMainWindow::hide(). 
.PP
Definition at line 391 of file kmainwindow.cpp.
.PP
References QString::append(), and QWidget::hide().
.SS "bool KMainWindow::restore (int number, bool show = \fCtrue\fP)"
.PP
Restore the session specified by \fCnumber\fP. 
.PP
Returns \fCfalse\fP if this fails, otherwise returns \fCtrue\fP and shows the window. You should call \fBcanBeRestored()\fP first. If \fCshow\fP is true (default), this widget will be shown automatically. 
.PP
Definition at line 411 of file kmainwindow.cpp.
.PP
References canBeRestored(), and show().
.SS "void KMainWindow::createGUI (const \fBQString\fP & xmlfile = \fCQString::null\fP, bool _conserveMemory = \fCtrue\fP)"
.PP
Create a GUI given a local XML file. 
.PP
If \fCxmlfile\fP is NULL, then it will try to construct a local XML filename like appnameui.rc where 'appname' is your app's name. If that file does not exist, then the XML UI code will only use the global (standard) XML file for the layout purposes.
.PP
Note that when passing true for the conserveMemory argument subsequent calls to guiFactory()->addClient/removeClient may not work as expected. Also retrieving references to containers like popup menus or toolbars using the container method will not work.
.PP
\fBParameters:\fP
.RS 4
\fIxmlfile\fP The local xmlfile (relative or absolute) 
.br
\fI_conserveMemory\fP Specify whether \fBcreateGUI()\fP should call KXMLGuiClient::conserveMemory() to free all memory allocated by the \fBQDomDocument\fP and by the \fBKXMLGUIFactory\fP. 
.RE
.PP

.PP
Definition at line 477 of file kmainwindow.cpp.
.PP
References KXMLGUIClient::actionCollection(), KXMLGUIFactory::addClient(), QDomElement::attribute(), QPtrList::clear(), QMenuBar::clear(), KXMLGUIClient::conserveMemory(), QDomDocument::documentElement(), KXMLGUIClient::domDocument(), KXMLGUIClient::instance(), QDomNode::isNull(), locate(), QDomNode::nextSibling(), KXMLGUIFactory::removeClient(), KXMLGUIFactory::resetContainer(), QPtrList::setAutoDelete(), KXMLGUIClient::setXMLFile(), QDomElement::tagName(), QDomNode::toElement(), and toolBarIterator().
.PP
Referenced by saveNewToolbarConfig(), and setupGUI().
.SS "void KMainWindow::setHelpMenuEnabled (bool showHelpMenu = \fCtrue\fP)"
.PP
Enables the build of a standard help menu when calling \fBcreateGUI()\fP. 
.PP
The default behavior is to build one, you must call this function to disable it 
.PP
Definition at line 557 of file kmainwindow.cpp.
.SS "bool KMainWindow::isHelpMenuEnabled ()"
.PP
Return \fCtrue\fP when the help menu is enabled. 
.PP
Definition at line 562 of file kmainwindow.cpp.
.SS "bool KMainWindow::hasMenuBar ()"
.PP
Returns true, if there is a menubar 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP

.PP
Definition at line 1052 of file kmainwindow.cpp.
.SS "\fBKMenuBar\fP * KMainWindow::menuBar ()"
.PP
Returns a pointer to the menu bar. 
.PP
If there is no menu bar yet one will be created. 
.PP
Definition at line 1057 of file kmainwindow.cpp.
.PP
References QMainWindow::menuBar().
.SS "\fBKStatusBar\fP * KMainWindow::statusBar ()"
.PP
Returns a pointer to the status bar. 
.PP
If there is no status bar yet, one will be created.
.PP
Note that tooltips for kactions in \fBactionCollection()\fP are not automatically connected to this statusBar. See the \fBKActionCollection\fP documentation for more details.
.PP
\fBSee also:\fP
.RS 4
\fBKActionCollection\fP 
.RE
.PP

.PP
Definition at line 1069 of file kmainwindow.cpp.
.PP
References QMainWindow::statusBar().
.PP
Referenced by KXMLGUIBuilder::createContainer(), and createStandardStatusBarAction().
.SS "\fBQPtrList\fP< \fBKMainWindow\fP > * KMainWindow::getMemberList ()\fC [static]\fP"
.PP
List of members of KMainWindow class. 
.PP
\fBSince:\fP
.RS 4
3.4 
.RE
.PP

.PP
Definition at line 1221 of file kmainwindow.cpp.
.PP
References memberList.
.SS "\fBKToolBar\fP * KMainWindow::toolBar (const char * name = \fC0\fP)"
.PP
Returns a pointer to the toolbar with the specified name. 
.PP
This refers to toolbars created dynamically from the XML UI framework. If the toolbar does not exist one will be created.
.PP
\fBParameters:\fP
.RS 4
\fIname\fP The internal name of the toolbar. If no name is specified 'mainToolBar' is assumed.
.RE
.PP
\fBReturns:\fP
.RS 4
A pointer to the toolbar 
.RE
.PP

.PP
Definition at line 1127 of file kmainwindow.cpp.
.PP
Referenced by KToggleToolBarAction::plug(), and sizeForCentralWidgetSize().
.SS "\fBQPtrListIterator\fP< \fBKToolBar\fP > KMainWindow::toolBarIterator ()"
.PP
\fBReturns:\fP
.RS 4
An iterator over the list of all toolbars for this window. 
.RE
.PP

.PP
Definition at line 1142 of file kmainwindow.cpp.
.PP
References QPtrList::append(), QPtrList::clear(), QPtrList::first(), QPtrList::next(), and QMainWindow::toolBars().
.PP
Referenced by applyMainWindowSettings(), createGUI(), and saveMainWindowSettings().
.SS "\fBKAccel\fP * KMainWindow::accel ()"
.PP
\fBReturns:\fP
.RS 4
A \fBKAccel\fP instance bound to this mainwindow. Used automatically by \fBKAction\fP to make keybindings work in all cases. 
.RE
.PP

.PP
Definition at line 1157 of file kmainwindow.cpp.
.SS "void KMainWindow::setAutoSaveSettings (const \fBQString\fP & groupName = \fC\fBQString::fromLatin1\fP('MainWindow')\fP, bool saveWindowSize = \fCtrue\fP)"
.PP
Call this to enable 'auto-save' of toolbar/menubar/statusbar settings (and optionally window size). 
.PP
If the *bars were moved around/shown/hidden when the window is closed, saveMainWindowSettings( \fBKGlobal::config()\fP, groupName ) will be called.
.PP
\fBParameters:\fP
.RS 4
\fIgroupName\fP a name that identifies this 'type of window'. You can have several types of window in the same application.
.br
\fIsaveWindowSize\fP set it to true to include the window size when saving.
.RE
.PP
Typically, you will call \fBsetAutoSaveSettings()\fP in your KMainWindow-inherited class constructor, and it will take care of restoring and saving automatically. Make sure you call this _after all_ your *bars have been created.
.PP
To make sure that KMainWindow propertly obtains the default size of the window you should do the following:
.IP "\(bu" 2
Remove hard coded resize() calls in the constructor or main, they should be removed in favor of letting the automatic resizing determine the default window size. Hard coded window sizes will be wrong for users that have big fonts, use different styles, long/small translations, large toolbars, and other factors.
.IP "\(bu" 2
Put the setAutoSaveSettings ( or \fBsetupGUI()\fP ) call after all widgets have been created and placed inside the main window (i.e. for 99% of apps \fBsetCentralWidget()\fP)
.IP "\(bu" 2
Widgets that inherit from \fBQWidget\fP (like game boards) should overload 'virtual QSize sizeHint() const;' to specify a default size rather than letting QWidget::adjust use the default size of 0x0. 
.PP

.PP
Definition at line 1003 of file kmainwindow.cpp.
.PP
References applyMainWindowSettings(), QMainWindow::dockWindowPositionChanged(), and setSettingsDirty().
.PP
Referenced by setupGUI().
.SS "void KMainWindow::resetAutoSaveSettings ()"
.PP
Disable the auto-save-settings feature. 
.PP
You don't normally need to call this, ever. 
.PP
Definition at line 1018 of file kmainwindow.cpp.
.SS "bool KMainWindow::autoSaveSettings () const"
.PP
\fBReturns:\fP
.RS 4
the current autosave setting, i.e. true if \fBsetAutoSaveSettings()\fP was called, false by default or if \fBresetAutoSaveSettings()\fP was called. 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 1025 of file kmainwindow.cpp.
.SS "\fBQString\fP KMainWindow::autoSaveGroup () const"
.PP
\fBReturns:\fP
.RS 4
the group used for setting-autosaving. Only meaningful if \fBsetAutoSaveSettings()\fP was called. This can be useful for forcing a save or an apply, e.g. before and after using \fBKEditToolbar\fP. 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 1030 of file kmainwindow.cpp.
.SS "void KMainWindow::applyMainWindowSettings (\fBKConfig\fP * config, const \fBQString\fP & groupName, bool force)"
.PP
Read settings for statusbar, menubar and toolbar from their respective groups in the config file and apply them. 
.PP
\fBParameters:\fP
.RS 4
\fIconfig\fP Config file to read the settings from. 
.br
\fIgroupName\fP Group name to use. If not specified, the last used group name is used. 
.br
\fIforce\fP if set, even default settings are re-applied 
.RE
.PP

.PP
Definition at line 820 of file kmainwindow.cpp.
.PP
References KToolBar::applySettings(), QPtrListIterator::current(), endl(), finalizeGUI(), QMenuBar::hide(), kdDebug(), QString::number(), QString::prepend(), restoreWindowSize(), QMenuBar::show(), and toolBarIterator().
.PP
Referenced by saveNewToolbarConfig(), and setAutoSaveSettings().
.SS "void KMainWindow::saveMainWindowSettings (\fBKConfig\fP * config, const \fBQString\fP & groupName = \fCQString::null\fP)"
.PP
Save settings for statusbar, menubar and toolbar to their respective groups in the config file \fCconfig\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIconfig\fP Config file to save the settings to. 
.br
\fIgroupName\fP Group name to use. If not specified, the last used group name is used 
.RE
.PP

.PP
Definition at line 702 of file kmainwindow.cpp.
.PP
References QPtrListIterator::current(), endl(), QString::fromLatin1(), kdDebug(), QString::number(), QString::prepend(), KToolBar::saveSettings(), saveWindowSize(), and toolBarIterator().
.PP
Referenced by configureToolbars(), and saveAutoSaveSettings().
.SS "void KMainWindow::setStandardToolBarMenuEnabled (bool enable)"
.PP
Sets whether KMainWindow should provide a menu that allows showing/hiding the available toolbars ( using \fBKToggleToolBarAction\fP ) . 
.PP
In case there is only one toolbar configured a simple 'Show <toolbar name here>' menu item is shown.
.PP
The menu / menu item is implemented using xmlgui. It will be inserted in your menu structure in the 'Settings' menu.
.PP
If your application uses a non-standard xmlgui resource file then you can specify the exact position of the menu / menu item by adding a <Merge name='StandardToolBarMenuHandler' /> line to the settings menu section of your resource file ( usually appname.rc ).
.PP
Note that you should enable this feature before calling \fBcreateGUI()\fP ( or similar ) . You enable/disable it anytime if you pass false to the conserveMemory argument of createGUI. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 755 of file kmainwindow.cpp.
.PP
References KXMLGUIFactory::addClient(), KXMLGUIClient::factory(), and KXMLGUIFactory::removeClient().
.PP
Referenced by setupGUI().
.SS "bool KMainWindow::isStandardToolBarMenuEnabled () const"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 777 of file kmainwindow.cpp.
.SS "void KMainWindow::createStandardStatusBarAction ()"
.PP
Sets whether KMainWindow should provide a menu that allows showing/hiding of the statusbar ( using KToggleStatusBarAction ). 
.PP
The menu / menu item is implemented using xmlgui. It will be inserted in your menu structure in the 'Settings' menu.
.PP
Note that you should enable this feature before calling \fBcreateGUI()\fP ( or similar ).
.PP
If an application maintains the action on its own (i.e. never calls this function) a connection needs to be made to let KMainWindow know when that status (hidden/shown) of the statusbar has changed. For example: connect(action, SIGNAL(activated()), kmainwindow, SLOT(\fBsetSettingsDirty()\fP)); Otherwise the status (hidden/show) of the statusbar might not be saved by KMainWindow. 
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 782 of file kmainwindow.cpp.
.PP
References KXMLGUIClient::actionCollection(), setSettingsDirty(), KStdAction::showStatusbar(), and statusBar().
.PP
Referenced by setupGUI().
.SS "void KMainWindow::setupGUI (int options = \fCToolBar|Keys|StatusBar|Save|Create\fP, const \fBQString\fP & xmlfile = \fCQString::null\fP)"
.PP
Configures the current windows and its actions in the typical \fBKDE\fP fashion. 
.PP
The options are all enabled by default but can be turned off if desired through the params or if the prereqs don't exists.
.PP
Typically this function replaces \fBcreateGUI()\fP.
.PP
\fBSee also:\fP
.RS 4
\fBStandardWindowOptions\fP
.RE
.PP
\fBSince:\fP
.RS 4
3.3 
.RE
.PP

.PP
Definition at line 445 of file kmainwindow.cpp.
.PP
References KXMLGUIClient::actionCollection(), configureToolbars(), KStdAction::configureToolbars(), Create, createGUI(), createStandardStatusBarAction(), KStdAction::keyBindings(), Keys, Save, setAutoSaveSettings(), setStandardToolBarMenuEnabled(), StatusBar, and ToolBar.
.SS "\fBKAction\fP * KMainWindow::toolBarMenuAction ()"
.PP
Returns a pointer to the mainwindows action responsible for the toolbars menu 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP

.PP
Definition at line 264 of file kmainwindow.cpp.
.SS "void KMainWindow::finalizeGUI (\fBKXMLGUIClient\fP * client)\fC [virtual]\fP"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Reimplemented from \fBKXMLGUIBuilder\fP.
.PP
Definition at line 1225 of file kmainwindow.cpp.
.PP
Referenced by applyMainWindowSettings().
.SS "bool KMainWindow::initialGeometrySet () const"
.PP
\fBReturns:\fP
.RS 4
true if a -geometry argument was given on the command line, and this is the first window created (the one on which this option applies) 
.RE
.PP

.PP
Definition at line 966 of file kmainwindow.cpp.
.SS "\fBQSize\fP KMainWindow::sizeForCentralWidgetSize (\fBQSize\fP size)"
.PP
\fBReturns:\fP
.RS 4
the size the mainwindow should have so that the central widget will be of \fCsize\fP.
.RE
.PP
.PP
\fBDeprecated\fP
.RS 4
You normally don't need this, the recommended way to achieve a certain central widget size is as follows: 
.PD 0

.IP "\(bu" 2
Override sizeHint() in the central widget so that it returns the desired size. 
.IP "\(bu" 2
Call updateGeometry() in the central widget whenever the desired size changes. This ensures that the new sizeHint() is properly propagated to any parent layout. 
.IP "\(bu" 2
Now call adjustSize() in the mainwindow to resize the mainwindow such that the central widget will become the desired size. 
.PP
.RE
.PP

.PP
Definition at line 1169 of file kmainwindow.cpp.
.PP
References KToolBar::barPos, QMainWindow::dockWindowsMovable(), QSize::height(), QMenuBar::heightForWidth(), KToolBar::sizeHint(), toolBar(), and QSize::width().
.SS "int KMainWindow::configureToolbars ()\fC [slot]\fP"
.PP
Show a standard configure toolbar dialog. 
.PP
This slot can be connected dirrectly to the action to configure shortcuts. This is very simple to do that by adding a single line 
.PP
.nf
 KStdAction::configureToolbars( guiFactory(), SLOT( configureToolbars() ),
                                actionCollection() );

.fi
.PP
.PP
\fBSince:\fP
.RS 4
3.3 
.RE
.PP

.PP
Definition at line 431 of file kmainwindow.cpp.
.PP
References KXMLGUIClient::actionCollection(), QDialog::exec(), saveMainWindowSettings(), saveNewToolbarConfig(), and KXMLGUIClient::xmlFile().
.PP
Referenced by setupGUI().
.SS "void KMainWindow::setCaption (const \fBQString\fP & caption)\fC [virtual, slot]\fP"
.PP
Makes a \fBKDE\fP compliant caption. 
.PP
\fBParameters:\fP
.RS 4
\fIcaption\fP Your caption. \fIDo\fP \fInot\fP include the application name in this string. It will be added automatically according to the \fBKDE\fP standard. 
.RE
.PP

.PP
Definition at line 567 of file kmainwindow.cpp.
.PP
References setPlainCaption().
.SS "void KMainWindow::setCaption (const \fBQString\fP & caption, bool modified)\fC [virtual, slot]\fP"
.PP
Makes a \fBKDE\fP compliant caption. 
.PP
\fBParameters:\fP
.RS 4
\fIcaption\fP Your caption. \fIDo\fP \fInot\fP include the application name in this string. It will be added automatically according to the \fBKDE\fP standard. 
.br
\fImodified\fP Specify whether the document is modified. This displays an additional sign in the title bar, usually '**'. 
.RE
.PP

.PP
Definition at line 572 of file kmainwindow.cpp.
.PP
References setPlainCaption().
.SS "void KMainWindow::setPlainCaption (const \fBQString\fP & caption)\fC [virtual, slot]\fP"
.PP
Make a plain caption without any modifications. 
.PP
\fBParameters:\fP
.RS 4
\fIcaption\fP Your caption. This is the string that will be displayed in the window title. 
.RE
.PP

.PP
Definition at line 577 of file kmainwindow.cpp.
.PP
References NETWinInfo::setName().
.PP
Referenced by setCaption().
.SS "void KMainWindow::appHelpActivated (void)\fC [slot]\fP"
.PP
Open the help page for the application. 
.PP
The application name is used as a key to determine what to display and the system will attempt to open <appName>/index.html.
.PP
This method is intended for use by a help button in the toolbar or components outside the regular help menu. Use \fBhelpMenu()\fP when you want to provide access to the help system from the help menu.
.PP
Example (adding a help button to the first toolbar):
.PP
.PP
.nf
 KIconLoader &loader = *KGlobal::iconLoader();
 QPixmap pixmap = loader.loadIcon( 'help' );
 toolBar(0)->insertButton( pixmap, 0, SIGNAL(clicked()),
   this, SLOT(appHelpActivated()), true, i18n('Help') );
.fi
.PP
 
.PP
Definition at line 586 of file kmainwindow.cpp.
.PP
References KHelpMenu::appHelpActivated().
.SS "void KMainWindow::slotStateChanged (const \fBQString\fP & newstate)\fC [virtual, slot]\fP"
.PP
Apply a state change. 
.PP
Enable and disable actions as defined in the XML rc file 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 596 of file kmainwindow.cpp.
.PP
References KXMLGUIClient::stateChanged().
.SS "void KMainWindow::slotStateChanged (const \fBQString\fP & newstate, KXMLGUIClient::ReverseStateChange)\fC [slot]\fP"
.PP
Apply a state change. 
.PP
Enable and disable actions as defined in the XML rc file, can 'reverse' the state (disable the actions which should be enabled, and vice-versa) if specified. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 604 of file kmainwindow.cpp.
.PP
References KXMLGUIClient::stateChanged().
.SS "void KMainWindow::setSettingsDirty ()\fC [slot]\fP"
.PP
Tell the main window that it should save its settings when being closed. 
.PP
This is part of the auto-save-settings feature. For everything related to toolbars this happens automatically, but you have to call \fBsetSettingsDirty()\fP in the slot that toggles the visibility of the statusbar. 
.PP
Definition at line 976 of file kmainwindow.cpp.
.PP
References saveAutoSaveSettings().
.PP
Referenced by createStandardStatusBarAction(), and setAutoSaveSettings().
.SS "void KMainWindow::closeEvent (\fBQCloseEvent\fP *)\fC [protected, virtual]\fP"
.PP
Reimplemented to call the \fBqueryClose()\fP and \fBqueryExit()\fP handlers. 
.PP
We recommend that you reimplement the handlers rather than \fBcloseEvent()\fP. If you do it anyway, ensure to call the base implementation to keep \fBqueryExit()\fP running. 
.PP
Definition at line 620 of file kmainwindow.cpp.
.PP
References QPtrListIterator::current(), memberList, queryClose(), queryExit(), saveAutoSaveSettings(), and QPtrListIterator::toFirst().
.SS "bool KMainWindow::queryExit ()\fC [protected, virtual]\fP"
.PP
Called before the very last window is closed, either by the user or indirectly by the session manager. 
.PP
It is not recommended to do any user interaction in this function other than indicating severe errors. Better ask the user on \fBqueryClose()\fP (see below).
.PP
A typical usage of \fBqueryExit()\fP is to write configuration data back. Note that the application may continue to run after \fBqueryExit()\fP (the user may have canceled a shutdown), so you should not do any cleanups here. The purpose of \fBqueryExit()\fP is purely to prepare the application (with possible user interaction) so it can safely be closed later (without user interaction).
.PP
If you need to do serious things on exit (like shutting a dial-up connection down), connect to the signal \fBKApplication::shutDown()\fP.
.PP
Default implementation returns \fCtrue\fP. Returning \fCfalse\fP will cancel the exiting. In the latter case, the last window will remain visible. If \fBKApplication::sessionSaving()\fP is true, refusing the exit will also cancel \fBKDE\fP logout.
.PP
\fBSee also:\fP
.RS 4
\fBqueryClose()\fP 
.PP
\fBKApplication::sessionSaving()\fP 
.RE
.PP

.PP
Definition at line 650 of file kmainwindow.cpp.
.PP
Referenced by closeEvent().
.SS "bool KMainWindow::queryClose ()\fC [protected, virtual]\fP"
.PP
Called before the window is closed, either by the user or indirectly by the session manager. 
.PP
The purpose of this function is to prepare the window in a way that it is safe to close it, i.e. without the user losing some data.
.PP
Default implementation returns true. Returning \fCfalse\fP will cancel the closing, and, if \fBKApplication::sessionSaving()\fP is true, it will also cancel \fBKDE\fP logout.
.PP
Reimplement this function to prevent the user from losing data. Example: 
.PP
.nf
       switch ( KMessageBox::warningYesNoCancel( this,
                i18n('Save changes to document foo?')) ) {
       case KMessageBox::Yes :
         // save document here. If saving fails, return false;
         return true;
       case KMessageBox::No :
         return true;
       default: // cancel
         return false;

.fi
.PP
.PP
Note that you should probably \fInot\fP actually close the document from within this method, as it may be called by the session manager before the session is saved. If the document is closed before the session save occurs, its location might not be properly saved. In addition, the session shutdown may be canceled, in which case the document should remain open.
.PP
\fBSee also:\fP
.RS 4
\fBqueryExit()\fP 
.PP
\fBKApplication::sessionSaving()\fP 
.RE
.PP

.PP
Reimplemented in \fBUIServer\fP.
.PP
Definition at line 655 of file kmainwindow.cpp.
.PP
Referenced by closeEvent().
.SS "virtual void KMainWindow::saveProperties (\fBKConfig\fP *)\fC [inline, protected, virtual]\fP"
.PP
Save your instance-specific properties. 
.PP
The function is invoked when the session manager requests your application to save its state.
.PP
You \fImust\fP \fInot\fP change the group of the \fCkconfig\fP object, since KMainWindow uses one group for each window. Please reimplement these function in childclasses.
.PP
Note: No user interaction is allowed in this function! 
.PP
Definition at line 861 of file kmainwindow.h.
.SS "virtual void KMainWindow::readProperties (\fBKConfig\fP *)\fC [inline, protected, virtual]\fP"
.PP
Read your instance-specific properties. 
.PP
Definition at line 866 of file kmainwindow.h.
.SS "void KMainWindow::saveGlobalProperties (\fBKConfig\fP * sessionConfig)\fC [protected, virtual]\fP"
.PP
Save your application-wide properties. 
.PP
The function is invoked when the session manager requests your application to save its state.
.PP
This function is similar to \fBsaveProperties()\fP but is only called for the very first main window, regardless how many main window are open.
.PP
Override it if you need to save other data about your documents on session end. sessionConfig is a config to which that data should be saved. Normally, you don't need this function. But if you want to save data about your documents that are not in opened windows you might need it.
.PP
Default implementation does nothing. 
.PP
Definition at line 660 of file kmainwindow.cpp.
.SS "void KMainWindow::readGlobalProperties (\fBKConfig\fP * sessionConfig)\fC [protected, virtual]\fP"
.PP
The counterpart of \fBsaveGlobalProperties()\fP. 
.PP
Read the application-specific properties in again. 
.PP
Definition at line 664 of file kmainwindow.cpp.
.SS "bool KMainWindow::settingsDirty () const\fC [protected]\fP"
.PP
For inherited classes. 
.PP
Definition at line 993 of file kmainwindow.cpp.
.SS "\fBQString\fP KMainWindow::settingsGroup () const\fC [protected]\fP"
.PP
For inherited classes. 
.PP
Definition at line 998 of file kmainwindow.cpp.
.SS "void KMainWindow::saveWindowSize (\fBKConfig\fP * config) const\fC [protected]\fP"
.PP
For inherited classes Note that the group must be set before calling. 
.PP
Definition at line 888 of file kmainwindow.cpp.
.PP
References QApplication::desktop(), QString::fromLatin1(), QRect::height(), and QRect::width().
.PP
Referenced by saveMainWindowSettings().
.SS "void KMainWindow::restoreWindowSize (\fBKConfig\fP * config)\fC [protected]\fP"
.PP
For inherited classes Note that the group must be set before calling, and that a -geometry on the command line has priority. 
.PP
Definition at line 920 of file kmainwindow.cpp.
.PP
References QApplication::desktop(), QRect::height(), parseGeometry(), and QRect::width().
.PP
Referenced by applyMainWindowSettings().
.SS "void KMainWindow::parseGeometry (bool parsewidth)\fC [protected]\fP"
.PP
parse the geometry from the geometry command line argument 
.PP
Definition at line 279 of file kmainwindow.cpp.
.PP
References QApplication::desktop(), QSize::height(), and QSize::width().
.PP
Referenced by restoreWindowSize().
.SS "void KMainWindow::saveNewToolbarConfig ()\fC [protected, slot]\fP"
.PP
Rebuilds the GUI after \fBKEditToolbar\fP changed the toolbar layout. 
.PP
\fBSee also:\fP
.RS 4
\fBconfigureToolbars()\fP 
.RE
.PP

.PP
Definition at line 439 of file kmainwindow.cpp.
.PP
References applyMainWindowSettings(), createGUI(), and KXMLGUIClient::xmlFile().
.PP
Referenced by configureToolbars().
.SS "void KMainWindow::showAboutApplication ()\fC [protected, virtual, slot]\fP"
.PP
This slot does nothing. 
.PP
It must be reimplemented if you want to use a custom About Application dialog box. This slot is connected to the About Application entry in the menu returned by customHelpMenu.
.PP
Example: 
.PP
.nf
 void MyMainLevel::setupInterface()
 {
   ..
   menuBar()->insertItem( i18n('&Help'), customHelpMenu() );
   ..
 }

 void MyMainLevel::showAboutApplication()
 {
   <activate your custom dialog>
 }

.fi
.PP
 
.PP
Definition at line 674 of file kmainwindow.cpp.
.PP
Referenced by customHelpMenu(), and helpMenu().
.SS "void KMainWindow::saveAutoSaveSettings ()\fC [protected, slot]\fP"
.PP
This slot should only be called in case you reimplement \fBcloseEvent()\fP and if you are using the 'auto-save' feature. 
.PP
In all other cases, \fBsetSettingsDirty()\fP should be called instead to benefit from the delayed saving.
.PP
\fBSee also:\fP
.RS 4
\fBsetAutoSaveSettings\fP 
.PP
\fBsetSettingsDirty\fP
.RE
.PP
\fBSince:\fP
.RS 4
3.2
.RE
.PP
Example: 
.PP
.nf
 void MyMainWindow::closeEvent( QCloseEvent *e )
 {
   // Save settings if auto-save is enabled, and settings have changed
   if ( settingsDirty() && autoSaveSettings() )
     saveAutoSaveSettings();
   ..
 }

.fi
.PP
 
.PP
Definition at line 1035 of file kmainwindow.cpp.
.PP
References KGlobal::config(), saveMainWindowSettings(), and KConfigBase::sync().
.PP
Referenced by closeEvent(), and setSettingsDirty().
.SH "Member Data Documentation"
.PP 
.SS "\fBQPtrList\fP< \fBKMainWindow\fP > * \fBKMainWindow::memberList\fP = 0L\fC [static]\fP"
.PP
List of members of KMainWindow class. 
.PP
Definition at line 79 of file kmainwindow.cpp.
.PP
Referenced by closeEvent(), getMemberList(), and ~KMainWindow().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
