KDEUI
kmainwindow.cpp
Go to the documentation of this file.
240 q->setAnimated(KGlobalSettings::graphicEffectsLevel() & KGlobalSettings::SimpleAnimationEffects);
319 // Set a unique object name. Required by session management, window management, and for the dbus interface.
371 q->winId(); // workaround for setWindowRole() crashing, and set also window role, just in case TT
372 q->setWindowRole( s ); // will keep insisting that object name suddenly should not be used for window role
374 dbusName = '/' + qApp->applicationName() + '/' + q->objectName().replace(QLatin1Char('/'), QLatin1Char('_'));
382 QDBusConnection::sessionBus().registerObject(dbusName, q, QDBusConnection::ExportScriptableSlots |
439 int m = XParseGeometry( cmdlineGeometry.toLatin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h);
470 delete static_cast<QObject *>(k_ptr->dockResizeListener); //so we don't get anymore events after k_ptr is destroyed
692 if ( !autoSaveSettings() || cg.name() == autoSaveGroup() ) { // TODO should be cg == d->autoSaveGroup, to compare both kconfig and group name
704 group += (toolbar->objectName().isEmpty() ? QString::number(n) : QString(" ")+toolbar->objectName());
779 if ( !autoSaveSettings() || cg.name() == autoSaveGroup() ) { // TODO should be cg == d->autoSaveGroup, to compare both kconfig and group name
792 group += (toolbar->objectName().isEmpty() ? QString::number(n) : QString(" ")+toolbar->objectName());
838 QString geometryKey = QString::fromLatin1("geometry-%1-%2").arg(desk.width()).arg(desk.height());
852 QString geometryKey = QString::fromLatin1("geometry-%1-%2").arg(desk.width()).arg(desk.height());
908 d->defaultWindowSize = QRect(desk.width(), width(), desk.height(), height()); // store default values
916 resize( desk.width(), desk.height() ); // WORKAROUND: this should not be needed. KWindowSystem::setState
1141 q->setAnimated(KGlobalSettings::graphicEffectsLevel() & KGlobalSettings::SimpleAnimationEffects);
QString caption()
KMenu * helpMenu(const QString &aboutAppText=QString(), bool showWhatsThis=true)
Retrieve the standard help menu.
Definition: kmainwindow.cpp:475
void setSettingsDirty()
Tell the main window that it should save its settings when being closed.
Definition: kmainwindow.cpp:949
static void setToolBarsLocked(bool locked)
Allows you to lock and unlock all toolbars (i.e., disallow/allow moving of the toobars).
Definition: ktoolbar.cpp:1415
void savePropertiesInternal(KConfig *, int)
Definition: kmainwindow.cpp:634
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
virtual bool saveState(QSessionManager &sm)
See QApplication::saveState() for documentation.
Definition: ksessionmanager.cpp:35
void saveSettings(KConfigGroup &cg)
Save the toolbar settings to group configGroup in config.
Definition: ktoolbar.cpp:828
bool hasDefault(const QString &key) const
int timeout
static KCmdLineArgs * parsedArgs(const QByteArray &id=QByteArray())
KMenu * customHelpMenu(bool showWhatsThis=true)
Returns the help menu.
Definition: kmainwindow.cpp:491
#define K_GLOBAL_STATIC(TYPE, NAME)
static KWindowInfo windowInfo(WId win, unsigned long properties, unsigned long properties2=0)
Returns information about window win.
Definition: kwindowsystem_mac.cpp:330
void saveWindowSize(const KConfigGroup &config) const
For inherited classes.
Definition: kmainwindow.cpp:845
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
QString autoSaveGroup() const
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
const KAboutData * aboutData() const
unsigned long state() const
Returns the window's state flags (see the NET::State enum for details).
Definition: kwindowinfo_mac.cpp:173
static KGlobalSettings * self()
Return the KGlobalSettings singleton.
Definition: kglobalsettings.cpp:188
static const QString classNameOfToplevel(int number)
Returns the className() of the number of the toplevel window which should be restored.
Definition: kmainwindow.cpp:516
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void ref()
static KApplication * kApplication()
Returns the current application object.
Definition: kapplication.cpp:603
bool isSet(const QByteArray &option) const
static bool isValidDBusObjectPathCharacter(const QChar &c)
Definition: kmainwindow.cpp:308
KSharedConfigPtr config()
void restoreWindowSize(const KConfigGroup &config)
For inherited classes Note that a -geometry on the command line has priority.
Definition: kmainwindow.cpp:831
bool restore(int number, bool show=true)
Try to restore the toplevel widget as defined by number (1..X).
Definition: kmainwindow.cpp:534
Definition: kdialog.h:444
virtual void setPlainCaption(const QString &caption)
Make a plain caption without any modifications.
Definition: kmainwindow.cpp:564
virtual void saveGlobalProperties(KConfig *sessionConfig)
Save your application-wide properties.
Definition: kmainwindow.cpp:622
virtual void readProperties(const KConfigGroup &)
Read your instance-specific properties.
Definition: kmainwindow.h:592
Provides highlevel access to session management on a per-object base.
Definition: ksessionmanager.h:45
void saveAutoSaveSettings()
This slot should only be called in case you reimplement closeEvent() and if you are using the "auto-s...
Definition: kmainwindow.cpp:1009
void deref()
static QString makeStandardCaption(const QString &userCaption, QWidget *window=0, CaptionFlags flags=HIGCompliantCaption)
Builds a caption that contains the application name along with the userCaption using a standard layou...
Definition: kdialog.cpp:442
Definition: kdialog.h:445
void setAllowQuit(bool allowQuit)
virtual bool queryExit()
Called before the very last window is closed, either by the user or indirectly by the session manager...
Definition: kmainwindow.cpp:612
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
static KStatusBar * internalStatusBar(KMainWindow *mw)
Definition: kmainwindow.cpp:81
bool autoSaveSettings() const
static bool canBeRestored(int number)
If the session did contain so high a number, true is returned, else false.
Definition: kmainwindow.cpp:503
bool readPropertiesInternal(KConfig *, int)
Definition: kmainwindow.cpp:712
virtual bool queryClose()
Called before the window is closed, either by the user or indirectly by the session manager...
Definition: kmainwindow.cpp:617
virtual void closeEvent(QCloseEvent *)
Reimplemented to call the queryClose() and queryExit() handlers.
Definition: kmainwindow.cpp:580
virtual void setCaption(const QString &caption)
Makes a KDE compliant caption (window title).
Definition: kmainwindow.cpp:547
virtual bool commitData(QSessionManager &sm)
See QApplication::commitData() for documentation.
Definition: ksessionmanager.cpp:40
static void setState(WId win, unsigned long state)
Sets the state of window win to state.
Definition: kwindowsystem_mac.cpp:506
bool initialGeometrySet() const
void applySettings(const KConfigGroup &cg, bool forceGlobal=false)
Read the toolbar settings from group configGroup in config and apply them.
Definition: ktoolbar.cpp:1039
QString name() 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 parseGeometry(bool parsewidth)
parse the geometry from the geometry command line argument
Definition: kmainwindow.cpp:424
bool hasKey(const QString &key) const
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
KMainWindow(QWidget *parent=0, Qt::WindowFlags f=KDE_DEFAULT_WINDOWFLAGS)
Construct a main window.
Definition: kmainwindow.cpp:217
KToolBar * toolBar(const QString &name=QString())
Returns a pointer to the toolbar with the specified name.
Definition: kmainwindow.cpp:1151
QString dbusName() const
Returns the path under which this window's D-Bus object is exported.
Definition: kmainwindow.cpp:1178
const KComponentData & mainComponent()
QString getOption(const QByteArray &option) const
KConfig * sessionConfig()
Returns the application session config object.
Definition: kapplication.cpp:608
static GraphicEffects graphicEffectsLevel()
This function determines the desired level of effects on the GUI.
Definition: kglobalsettings.cpp:782
T readEntry(const QString &key, const T &aDefault) const
virtual void readGlobalProperties(KConfig *sessionConfig)
The counterpart of saveGlobalProperties().
Definition: kmainwindow.cpp:626
void revertToDefault(const QString &key)
Definition: netwm_def.h:635
virtual void saveProperties(KConfigGroup &)
Save your instance-specific properties.
Definition: kmainwindow.h:585
GUI with simple animations enabled.
Definition: kglobalsettings.h:467
static QList< KMainWindow * > memberList()
List of members of KMainWindow class.
Definition: kmainwindow.cpp:1176
static bool toolBarsLocked()
Returns whether the toolbars are locked (i.e., moving of the toobars disallowed). ...
Definition: ktoolbar.cpp:1428
KConfigGroup autoSaveConfigGroup() const
Definition: kmainwindow.cpp:1003
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 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:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.