# class MainWindow

###

Module | kparts
Namespace | KParts
Class | MainWindow
Inherits | KXmlGuiWindow,KParts::PartBase

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 setXMLFile() in the inherited constructor.

It implements all internal interfaces in the case of a KMainWindow as host: the builder and servant interface (for menu merging).

### methods

- MainWindow (parent, f)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0
  f | Qt.WindowFlags | 0

  Constructor, same signature as KMainWindow.

- MainWindow (parent, name, f)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget |
  name | char | 0
  f | Qt.WindowFlags | 0

  @deprecated, remove the name argument and use setObjectName instead

- MainWindow (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0
  a1 | Qt.WindowFlags | 0

- MainWindow (a0, a1, a2)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget |
  a1 | char | 0
  a2 | Qt.WindowFlags | 0

- configureToolbars ( )

  returns Nothing

- createGUI (part)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  part | KParts.Part |

  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 KPartManager.activePartChanged() signal

  part - The active part (set to 0 if no part).

- createShellGUI (create)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  create | bool | 1

- saveNewToolbarConfig ( )

  returns Nothing

  Rebuilds the GUI after KEditToolbar changed the toolbar layout.

  See also configureToolbars() KDE4: make this virtual. (For now we rely on the fact that it's called as a slot, so the metaobject finds it here).

- slotSetStatusBarText (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |

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