• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KParts

  • KParts
  • MainWindow
Public Slots | Public Member Functions | Protected Slots | Protected Member Functions
KParts::MainWindow Class Reference

#include <mainwindow.h>

Inheritance diagram for KParts::MainWindow:
KXmlGuiWindow KParts::PartBase KMainWindow KXMLGUIBuilder KXMLGUIClient KXMLGUIClient QMainWindow

List of all members.

Public Slots

virtual void configureToolbars ()
- Public Slots inherited from KXmlGuiWindow
void appHelpActivated (void)
virtual void setCaption (const QString &caption)
virtual void setCaption (const QString &caption, bool modified)
virtual void setPlainCaption (const QString &caption)
void setSettingsDirty ()
void slotStateChanged (const QString &newstate, bool reverse)
virtual void slotStateChanged (const QString &newstate)
- Public Slots inherited from KMainWindow

Public Member Functions

 MainWindow (QWidget *parent=0, Qt::WindowFlags f=KDE_DEFAULT_WINDOWFLAGS)
KDE_CONSTRUCTOR_DEPRECATED MainWindow (QWidget *parent, const char *name=0, Qt::WindowFlags f=KDE_DEFAULT_WINDOWFLAGS)
virtual ~MainWindow ()
- Public Member Functions inherited from KXmlGuiWindow
 KXmlGuiWindow (QWidget *parent=0, Qt::WindowFlags f=KDE_DEFAULT_WINDOWFLAGS)
virtual ~KMainWindow ()
virtual ~KXMLGUIBuilder ()
virtual ~KXMLGUIClient ()
virtual ~KXmlGuiWindow ()
QAction * action (const char *name) const
virtual QAction * action (const QDomElement &element) const
virtual KActionCollection * actionCollection () const
void addStateActionDisabled (const QString &state, const QString &action)
void addStateActionEnabled (const QString &state, const QString &action)
virtual void applyMainWindowSettings (const KConfigGroup &config, bool force=false)
KConfigGroup autoSaveConfigGroup () const
QString autoSaveGroup () const
bool autoSaveSettings () const
void beginXMLPlug (QWidget *)
KXMLGUIClient * builderClient () const
KComponentData builderComponentData () const
QList< KXMLGUIClient * > childClients ()
KXMLGUIBuilder * clientBuilder () const
virtual KComponentData componentData () const
virtual QStringList containerTags () const
virtual QWidget * createContainer (QWidget *parent, int index, const QDomElement &element, QAction *&containerAction)
virtual QAction * createCustomElement (QWidget *parent, int index, const QDomElement &element)
void createGUI (const QString &xmlfile=QString())
void createStandardStatusBarAction ()
KMenu * customHelpMenu (bool showWhatsThis=true)
virtual QStringList customTags () const
QString dbusName () const
virtual QDomDocument domDocument () const
void endXMLPlug ()
KXMLGUIFactory * factory () const
virtual void finalizeGUI (KXMLGUIClient *client)
void finalizeGUI (bool force)
StateChange getActionsToChangeForState (const QString &state)
virtual KXMLGUIFactory * guiFactory ()
bool hasMenuBar ()
KMenu * helpMenu (const QString &aboutAppText=QString(), bool showWhatsThis=true)
void ignoreInitialGeometry ()
bool initialGeometrySet () const
void insertChildClient (KXMLGUIClient *child)
bool isHelpMenuEnabled () const
bool isStandardToolBarMenuEnabled () const
 KMainWindow (QWidget *parent=0, Qt::WindowFlags f=KDE_DEFAULT_WINDOWFLAGS)
 KXMLGUIBuilder (QWidget *widget)
 KXMLGUIClient ()
 KXMLGUIClient (KXMLGUIClient *parent)
virtual QString localXMLFile () const
KMenuBar * menuBar ()
KXMLGUIClient * parentClient () const
void plugActionList (const QString &name, const QList< QAction * > &actionList)
void prepareXMLUnplug (QWidget *)
void reloadXML ()
void removeChildClient (KXMLGUIClient *child)
virtual void removeContainer (QWidget *container, QWidget *parent, QDomElement &element, QAction *containerAction)
virtual void removeCustomElement (QWidget *parent, QAction *action)
void replaceXMLFile (const QString &xmlfile, const QString &localxmlfile, bool merge=false)
void resetAutoSaveSettings ()
bool restore (int number, bool show=true)
void saveMainWindowSettings (const KConfigGroup &config)
void setAutoSaveSettings (const KConfigGroup &group, bool saveWindowSize=true)
void setAutoSaveSettings (const QString &groupName=QLatin1String("MainWindow"), bool saveWindowSize=true)
void setBuilderClient (KXMLGUIClient *client)
void setBuilderComponentData (const KComponentData &componentData)
void setClientBuilder (KXMLGUIBuilder *builder)
void setFactory (KXMLGUIFactory *factory)
void setHelpMenuEnabled (bool showHelpMenu=true)
void setStandardToolBarMenuEnabled (bool enable)
void setupGUI (const QSize &defaultSize, StandardWindowOptions options=Default, const QString &xmlfile=QString())
void setupGUI (StandardWindowOptions options=Default, const QString &xmlfile=QString())
void setupToolbarMenuActions ()
void setXMLGUIBuildDocument (const QDomDocument &doc)
KStatusBar * statusBar ()
KToolBar * toolBar (const QString &name=QString())
QAction * toolBarMenuAction ()
QList< KToolBar * > toolBars () const
void unplugActionList (const QString &name)
QWidget * widget ()
virtual QString xmlFile () const
QDomDocument xmlguiBuildDocument () const
- Public Member Functions inherited from KParts::PartBase
 PartBase ()
virtual ~PartBase ()
QObject * partObject () const
void setPartObject (QObject *object)

Protected Slots

void createGUI (KParts::Part *part)
void saveNewToolbarConfig ()
virtual void slotSetStatusBarText (const QString &)
- Protected Slots inherited from KXmlGuiWindow
void saveAutoSaveSettings ()
virtual void showAboutApplication ()
- Protected Slots inherited from KMainWindow

Protected Member Functions

virtual void createShellGUI (bool create=true)
- Protected Member Functions inherited from KXmlGuiWindow
virtual void closeEvent (QCloseEvent *)
virtual bool event (QEvent *event)
 KMainWindow (KMainWindowPrivate &dd, QWidget *parent, Qt::WindowFlags f)
void loadStandardsXmlFile ()
void parseGeometry (bool parsewidth)
virtual bool queryClose ()
virtual bool queryExit ()
virtual void readGlobalProperties (KConfig *sessionConfig)
virtual void readProperties (const KConfigGroup &)
bool readPropertiesInternal (KConfig *, int)
void restoreWindowSize (const KConfigGroup &config)
virtual void saveGlobalProperties (KConfig *sessionConfig)
virtual void saveProperties (KConfigGroup &)
void savePropertiesInternal (KConfig *, int)
void saveWindowSize (const KConfigGroup &config) const
virtual void setComponentData (const KComponentData &componentData)
virtual void setDOMDocument (const QDomDocument &document, bool merge=false)
virtual void setLocalXMLFile (const QString &file)
bool settingsDirty () const
virtual void setXML (const QString &document, bool merge=false)
virtual void setXMLFile (const QString &file, bool merge=false, bool setXMLDoc=true)
virtual void stateChanged (const QString &newstate, ReverseStateChange reverse=StateNoReverse)
virtual void virtual_hook (int id, void *data)
virtual void virtual_hook (int id, void *data)
- Protected Member Functions inherited from KParts::PartBase
 PartBase (PartBasePrivate &dd)
void loadPlugins (QObject *parent, KXMLGUIClient *parentGUIClient, const KComponentData &componentData)
virtual void setComponentData (const KComponentData &componentData)
virtual void setComponentData (const KComponentData &componentData, bool loadPlugins)
void setPluginInterfaceVersion (int version)
void setPluginLoadingMode (PluginLoadingMode loadingMode)

Additional Inherited Members

- Public Types inherited from KXmlGuiWindow
enum  ReverseStateChange
enum  StandardWindowOption
- Public Types inherited from KXMLGUIClient
- Static Public Member Functions inherited from KXmlGuiWindow
static bool canBeRestored (int number)
static const QString classNameOfToplevel (int number)
static QString findMostRecentXMLFile (const QStringList &files, QString &doc)
static QList< KMainWindow * > memberList ()
- Public Attributes inherited from KXmlGuiWindow
 Create
 Default
 Keys
 Save
 StateNoReverse
 StateReverse
 StatusBar
 ToolBar
- Public Attributes inherited from KXMLGUIClient
- Protected Types inherited from KParts::PartBase
enum  PluginLoadingMode { DoNotLoadPlugins = 0, LoadPlugins = 1, LoadPluginsIfEnabled = 2 }
- Protected Attributes inherited from KXmlGuiWindow
KMainWindowPrivate *const k_ptr
- Protected Attributes inherited from KMainWindow
- Protected Attributes inherited from KParts::PartBase
PartBasePrivate * d_ptr
- Properties inherited from KXmlGuiWindow
QString autoSaveGroup
bool autoSaveSettings
bool hasMenuBar
bool initialGeometrySet
bool standardToolBarMenuEnabled
- Properties inherited from KMainWindow

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 46 of file mainwindow.h.


Constructor & Destructor Documentation

MainWindow::MainWindow ( QWidget *  parent = 0,
Qt::WindowFlags  f = KDE_DEFAULT_WINDOWFLAGS 
)
explicit

Constructor, same signature as KMainWindow.

Definition at line 61 of file mainwindow.cpp.

MainWindow::MainWindow ( QWidget *  parent,
const char *  name = 0,
Qt::WindowFlags  f = KDE_DEFAULT_WINDOWFLAGS 
)
explicit
Deprecated:
, remove the name argument and use setObjectName instead

Definition at line 68 of file mainwindow.cpp.

MainWindow::~MainWindow ( )
virtual

Destructor.

Definition at line 76 of file mainwindow.cpp.


Member Function Documentation

void KParts::MainWindow::configureToolbars ( )
virtualslot

Reimplemented from KXmlGuiWindow.

Definition at line 180 of file mainwindow.cpp.

void MainWindow::createGUI ( KParts::Part *  part)
protectedslot

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:
partThe active part (set to 0L if no part).

Definition at line 81 of file mainwindow.cpp.

void MainWindow::createShellGUI ( bool  create = true)
protectedvirtual

Definition at line 140 of file mainwindow.cpp.

void KParts::MainWindow::saveNewToolbarConfig ( )
protectedvirtualslot

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

Definition at line 173 of file mainwindow.cpp.

void MainWindow::slotSetStatusBarText ( const QString &  text)
protectedvirtualslot

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.


The documentation for this class was generated from the following files:
  • mainwindow.h
  • mainwindow.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 22:02:08 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KParts

Skip menu "KParts"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal