KDEUI
kxmlguiwindow.cpp
Go to the documentation of this file.
189 void KXmlGuiWindow::setupGUI( const QSize & defaultSize, StandardWindowOptions options, const QString & xmlfile ) {
255 const QString windowXmlFile = xmlfile.isNull() ? componentData().componentName() + "ui.rc" : xmlfile;
261 << "You should call createGUI("<<xmlFile()<<") or setupGUI(<options>,"<<xmlFile()<<") instead.";
324 d->showStatusBarAction = KStandardAction::showStatusbar(this, SLOT(setSettingsDirty()), actionCollection());
QAction * toolBarMenuAction()
Returns a pointer to the mainwindows action responsible for the toolbars menu.
Definition: kxmlguiwindow.cpp:100
virtual void configureToolbars()
Show a standard configure toolbar dialog.
Definition: kxmlguiwindow.cpp:161
adds action to show/hide the statusbar if the statusbar exists.
Definition: kxmlguiwindow.h:210
void createGUI(const QString &xmlfile=QString())
Create a GUI given a local XML file.
Definition: kxmlguiwindow.cpp:232
void setSettingsDirty()
Tell the main window that it should save its settings when being closed.
Definition: kmainwindow.cpp:949
virtual KActionCollection * actionCollection() const
Retrieves the entire action collection for the GUI client.
Definition: kxmlguiclient.cpp:128
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document...
Definition: kxmlguiclient.h:46
void setHelpMenuEnabled(bool showHelpMenu=true)
Enables the build of a standard help menu when calling createGUI/setupGUI().
Definition: kxmlguiwindow.cpp:138
virtual bool event(QEvent *event)
Reimplemented to catch QEvent::Polish in order to adjust the object name if needed, once all constructor code for the main window has run.
Definition: kmainwindow.cpp:1019
void removeClient(KXMLGUIClient *client)
Removes the GUI described by the client, by unplugging all provided actions and removing all owned co...
Definition: kxmlguifactory.cpp:411
KToggleAction * showStatusbar(const QObject *recvr, const char *slot, QObject *parent)
Show/Hide the statusbar.
Definition: kstandardaction.cpp:542
void addClient(KXMLGUIClient *client)
Creates the GUI described by the QDomDocument of the client, using the client's actions, and merges it with the previously created GUI.
Definition: kxmlguifactory.cpp:210
virtual void setXMLFile(const QString &file, bool merge=false, bool setXMLDoc=true)
Sets the name of the rc file containing the XML for the part.
Definition: kxmlguiclient.cpp:203
KXMLGUIFactory * factory() const
Retrieves a pointer to the KXMLGUIFactory this client is associated with (will return 0 if the client...
Definition: kxmlguiclient.cpp:602
virtual QString xmlFile() const
This will return the name of the XML file as set by setXMLFile().
Definition: kxmlguiclient.cpp:154
bool isValid() const
virtual void slotStateChanged(const QString &newstate)
Apply a state change.
Definition: kxmlguiwindow.cpp:280
void reset()
Use this method to free all memory allocated by the KXMLGUIFactory.
Definition: kxmlguifactory.cpp:496
Definition: kxmlguiclient.h:262
KSharedConfigPtr config()
bool isStandardToolBarMenuEnabled() const
Definition: kxmlguiwindow.cpp:315
virtual void stateChanged(const QString &newstate, ReverseStateChange reverse=StateNoReverse)
Actions can collectively be assigned a "State".
Definition: kxmlguiclient.cpp:705
KAction * keyBindings(const QObject *recvr, const char *slot, QObject *parent)
Display the configure key bindings dialog.
Definition: kstandardaction.cpp:576
adds action to show/hide the toolbar(s) and adds action to configure the toolbar(s).
Definition: kxmlguiwindow.h:199
Implements the creation of the GUI (menubar, menus and toolbars) as requested by the GUI factory...
Definition: kxmlguibuilder.h:41
virtual KComponentData componentData() const
Definition: kxmlguiclient.cpp:144
void setupToolbarMenuActions()
Definition: kxmlguiwindow.cpp:110
auto-saves (and loads) the toolbar/menubar/statusbar settings and window size using the default name...
Definition: kxmlguiwindow.h:222
void createStandardStatusBarAction()
Sets whether KMainWindow should provide a menu that allows showing/hiding of the statusbar ( using KT...
Definition: kxmlguiwindow.cpp:321
void saveMainWindowSettings(const KConfigGroup &config)
Save settings for statusbar, menubar and toolbar to their respective groups in the config group confi...
Definition: kmainwindow.cpp:659
bool autoSaveSettings() const
QString componentName() const
virtual bool event(QEvent *event)
Reimplemented to catch QEvent::Polish in order to adjust the object name if needed, once all constructor code for the main window has run.
Definition: kxmlguiwindow.cpp:124
void setupGUI(StandardWindowOptions options=Default, const QString &xmlfile=QString())
Configures the current windows and its actions in the typical KDE fashion.
Definition: kxmlguiwindow.cpp:185
bool initialGeometrySet() const
KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets...
Definition: kxmlguifactory.h:65
virtual void applyMainWindowSettings(const KConfigGroup &config, bool forceGlobal=false)
Read settings for statusbar, menubar and toolbar from their respective groups in the config file and ...
Definition: kmainwindow.cpp:746
virtual void finalizeGUI(KXMLGUIClient *client)
Definition: kxmlguiwindow.cpp:359
void setAutoSaveSettings(const QString &groupName=QLatin1String("MainWindow"), bool saveWindowSize=true)
Call this to enable "auto-save" of toolbar/menubar/statusbar settings (and optionally window size)...
Definition: kmainwindow.cpp:961
virtual void saveNewToolbarConfig()
Rebuilds the GUI after KEditToolbar changed the toolbar layout.
Definition: kxmlguiwindow.cpp:174
Definition: kxmlguiclient.h:262
void setStandardToolBarMenuEnabled(bool enable)
Sets whether KMainWindow should provide a menu that allows showing/hiding the available toolbars ( us...
Definition: kxmlguiwindow.cpp:292
QString dbusName() const
Returns the path under which this window's D-Bus object is exported.
Definition: kmainwindow.cpp:1178
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KAction * configureToolbars(const QObject *recvr, const char *slot, QObject *parent)
The Customize Toolbar dialog.
Definition: kstandardaction.cpp:586
KXmlGuiWindow(QWidget *parent=0, Qt::WindowFlags f=KDE_DEFAULT_WINDOWFLAGS)
Construct a main window.
Definition: kxmlguiwindow.cpp:88
virtual void finalizeGUI(KXMLGUIClient *client)
Definition: kxmlguibuilder.cpp:402
calls createGUI() once ToolBar, Keys and Statusbar have been taken care of.
Definition: kxmlguiwindow.h:234
bool isHelpMenuEnabled() const
Return true when the help menu is enabled.
Definition: kxmlguiwindow.cpp:144
virtual void applyMainWindowSettings(const KConfigGroup &config, bool force=false)
Read settings for statusbar, menubar and toolbar from their respective groups in the config file and ...
Definition: kxmlguiwindow.cpp:348
KConfigGroup autoSaveConfigGroup() const
Definition: kmainwindow.cpp:1003
void setXMLGUIBuildDocument(const QDomDocument &doc)
Definition: kxmlguiclient.cpp:587
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.