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
text
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
Type type() const
void createGUI(const QString &xmlfile=QString())
Create a GUI given a local XML file.
Definition: kxmlguiwindow.cpp:232
bool isHidden() const
void setSettingsDirty()
Tell the main window that it should save its settings when being closed.
Definition: kmainwindow.cpp:991
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:1061
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
bool registerObject(const QString &path, QObject *object, QFlags< QDBusConnection::RegisterOption > options)
virtual void setVisible(bool visible)
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
QDBusConnection sessionBus()
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
void adjustSize()
Definition: kxmlguiclient.h:262
KSharedConfigPtr config()
bool isNull() const
bool isStandardToolBarMenuEnabled() const
Definition: kxmlguiwindow.cpp:315
void resize(int w, int h)
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
whatsThis
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:1003
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:1220
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
typedef WindowFlags
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
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:1045
void setXMLGUIBuildDocument(const QDomDocument &doc)
Definition: kxmlguiclient.cpp:587
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.