kparts Library API Documentation

KParts::MainWindow Class Reference

A KPart-aware main window, whose user interface is described in XML. More...

#include <mainwindow.h>

Inheritance diagram for KParts::MainWindow:

Inheritance graph
[legend]
Collaboration diagram for KParts::MainWindow:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MainWindow (QWidget *parent, const char *name=0L, WFlags f=WType_TopLevel|WDestructiveClose)
 MainWindow (const char *name=0L, WFlags f=WDestructiveClose)
 MainWindow (int cflags, QWidget *parent, const char *name=0L, WFlags f=WType_TopLevel|WDestructiveClose)
virtual ~MainWindow ()

Protected Slots

void createGUI (KParts::Part *part)
virtual void slotSetStatusBarText (const QString &)
void saveNewToolbarConfig ()

Protected Member Functions

virtual void createShellGUI (bool create=true)

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 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).

Definition at line 47 of file mainwindow.h.


Constructor & Destructor Documentation

MainWindow::MainWindow QWidget parent,
const char *  name = 0L,
WFlags  f = WType_TopLevel|WDestructiveClose
 

Constructor, same signature as KMainWindow.

Definition at line 60 of file mainwindow.cpp.

References KParts::PartBase::setPartObject().

MainWindow::MainWindow const char *  name = 0L,
WFlags  f = WDestructiveClose
 

Compatibility Constructor.

Definition at line 67 of file mainwindow.cpp.

References KParts::PartBase::setPartObject().

MainWindow::MainWindow int  cflags,
QWidget parent,
const char *  name = 0L,
WFlags  f = WType_TopLevel|WDestructiveClose
 

Constructor with creation flags, see KMainWindow.

Since:
3.2

Definition at line 74 of file mainwindow.cpp.

References KParts::PartBase::setPartObject().

MainWindow::~MainWindow  )  [virtual]
 

Destructor.

Definition at line 81 of file mainwindow.cpp.


Member Function Documentation

void MainWindow::createGUI KParts::Part part  )  [protected, slot]
 

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

Parameters:
part The active part (set to 0L if no part).

Definition at line 86 of file mainwindow.cpp.

References KXMLGUIFactory::addClient(), KMainWindow::applyMainWindowSettings(), KMainWindow::autoSaveGroup(), KMainWindow::autoSaveSettings(), QObject::className(), KGlobal::config(), createShellGUI(), endl(), KXMLGUIClient::factory(), KMainWindow::guiFactory(), KGlobal::instance(), kdDebug(), KParts::PartBase::loadPlugins(), QObject::name(), KXMLGUIFactory::removeClient(), QApplication::sendEvent(), KMainWindow::setCaption(), and slotSetStatusBarText().

Referenced by saveNewToolbarConfig().

void MainWindow::slotSetStatusBarText const QString  )  [protected, virtual, slot]
 

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 145 of file mainwindow.cpp.

References QStatusBar::message(), and KMainWindow::statusBar().

Referenced by createGUI().

void KParts::MainWindow::saveNewToolbarConfig  )  [protected, slot]
 

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).

Reimplemented from KMainWindow.

Definition at line 185 of file mainwindow.cpp.

References KMainWindow::applyMainWindowSettings(), KGlobal::config(), and createGUI().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kparts Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 15 10:54:40 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003