KDEUI
kxmlguiwindow.cpp
Go to the documentation of this file.
189void 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());
QString componentName() const
bool isValid() const
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
void setSettingsDirty()
Tell the main window that it should save its settings when being closed.
Definition: kmainwindow.cpp:991
KConfigGroup autoSaveConfigGroup() const
Definition: kmainwindow.cpp:1045
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
virtual bool event(QEvent *event)
Reimplemented to catch QEvent::Polish in order to adjust the object name if needed,...
Definition: kmainwindow.cpp:1061
QString dbusName() const
Returns the path under which this window's D-Bus object is exported.
Definition: kmainwindow.cpp:1220
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:1003
Implements the creation of the GUI (menubar, menus and toolbars) as requested by the GUI factory.
Definition: kxmlguibuilder.h:42
virtual void finalizeGUI(KXMLGUIClient *client)
Definition: kxmlguibuilder.cpp:402
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document,...
Definition: kxmlguiclient.h:47
virtual QString xmlFile() const
This will return the name of the XML file as set by setXMLFile().
Definition: kxmlguiclient.cpp:154
virtual void stateChanged(const QString &newstate, ReverseStateChange reverse=StateNoReverse)
Actions can collectively be assigned a "State".
Definition: kxmlguiclient.cpp:705
virtual KActionCollection * actionCollection() const
Retrieves the entire action collection for the GUI client.
Definition: kxmlguiclient.cpp:128
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
virtual KComponentData componentData() const
Definition: kxmlguiclient.cpp:144
KXMLGUIFactory * factory() const
Retrieves a pointer to the KXMLGUIFactory this client is associated with (will return 0 if the client...
Definition: kxmlguiclient.cpp:602
void setXMLGUIBuildDocument(const QDomDocument &doc)
Definition: kxmlguiclient.cpp:587
KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets...
Definition: kxmlguifactory.h:66
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
void addClient(KXMLGUIClient *client)
Creates the GUI described by the QDomDocument of the client, using the client's actions,...
Definition: kxmlguifactory.cpp:210
void reset()
Use this method to free all memory allocated by the KXMLGUIFactory.
Definition: kxmlguifactory.cpp:496
void createGUI(const QString &xmlfile=QString())
Create a GUI given a local XML file.
Definition: kxmlguiwindow.cpp:232
QAction * toolBarMenuAction()
Returns a pointer to the mainwindows action responsible for the toolbars menu.
Definition: kxmlguiwindow.cpp:100
void createStandardStatusBarAction()
Sets whether KMainWindow should provide a menu that allows showing/hiding of the statusbar ( using KT...
Definition: kxmlguiwindow.cpp:321
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
void setStandardToolBarMenuEnabled(bool enable)
Sets whether KMainWindow should provide a menu that allows showing/hiding the available toolbars ( us...
Definition: kxmlguiwindow.cpp:292
virtual bool event(QEvent *event)
Reimplemented to catch QEvent::Polish in order to adjust the object name if needed,...
Definition: kxmlguiwindow.cpp:124
bool isStandardToolBarMenuEnabled() const
Definition: kxmlguiwindow.cpp:315
@ StatusBar
adds action to show/hide the statusbar if the statusbar exists.
Definition: kxmlguiwindow.h:210
@ Save
auto-saves (and loads) the toolbar/menubar/statusbar settings and window size using the default name.
Definition: kxmlguiwindow.h:222
@ ToolBar
adds action to show/hide the toolbar(s) and adds action to configure the toolbar(s).
Definition: kxmlguiwindow.h:199
@ Create
calls createGUI() once ToolBar, Keys and Statusbar have been taken care of.
Definition: kxmlguiwindow.h:234
void setupToolbarMenuActions()
Definition: kxmlguiwindow.cpp:110
KXmlGuiWindow(QWidget *parent=0, Qt::WindowFlags f=KDE_DEFAULT_WINDOWFLAGS)
Construct a main window.
Definition: kxmlguiwindow.cpp:88
virtual void slotStateChanged(const QString &newstate)
Apply a state change.
Definition: kxmlguiwindow.cpp:280
virtual void configureToolbars()
Show a standard configure toolbar dialog.
Definition: kxmlguiwindow.cpp:161
void setHelpMenuEnabled(bool showHelpMenu=true)
Enables the build of a standard help menu when calling createGUI/setupGUI().
Definition: kxmlguiwindow.cpp:138
virtual void saveNewToolbarConfig()
Rebuilds the GUI after KEditToolbar changed the toolbar layout.
Definition: kxmlguiwindow.cpp:174
bool isHelpMenuEnabled() const
Return true when the help menu is enabled.
Definition: kxmlguiwindow.cpp:144
virtual void finalizeGUI(KXMLGUIClient *client)
Definition: kxmlguiwindow.cpp:359
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
#define kWarning
KSharedConfigPtr config()
KToggleAction * showStatusbar(const QObject *recvr, const char *slot, QObject *parent)
Show/Hide the statusbar.
Definition: kstandardaction.cpp:542
KAction * keyBindings(const QObject *recvr, const char *slot, QObject *parent)
Display the configure key bindings dialog.
Definition: kstandardaction.cpp:576
KAction * configureToolbars(const QObject *recvr, const char *slot, QObject *parent)
The Customize Toolbar dialog.
Definition: kstandardaction.cpp:586
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.