KXmlGui
kmainwindow.h
45 * It extends QMainWindow with session management capabilities. For ready-made window functionality and simpler UI management, use KXmlGuiWindow instead.
47 * Define the minimum/maximum height/width of your central widget and KMainWindow will take this into account.
48 * For fixed size windows set your main widget to a fixed size. Fixed aspect ratios (QWidget::heightForWidth()) and fixed width widgets are not supported.
53 * Use setAutoSaveSettings() to automatically save and restore the window geometry and toolbar/menubar/statusbar state when the application is restarted.
55 * Use kRestoreMainWindows() in your main function to restore your windows when the session is restored.
60 * Reimplement saveProperties() / readProperties() or saveGlobalProperties() / readGlobalProperties()
66 * See https://develop.kde.org/docs/use/session-managment for more information on session management.
189 * @returns @c true if the number of KMainWindow instances of the previous session did contain the requested @p numberOfInstances, @c false otherwise.
297 * saveMainWindowSettings( KConfigGroup(KSharedConfig::openConfig(), groupName) ) will be called.
325 void setAutoSaveSettings(const QString &groupName = QStringLiteral("MainWindow"), bool saveWindowSize = true);
virtual bool event(QEvent *event) override
Q_PROPERTY(...)
Q_SLOTSQ_SLOTS
virtual void readProperties(const KConfigGroup &)
Reads your instance-specific properties.
Definition: kmainwindow.h:634
static const QString classNameOfToplevel(int instanceNumber)
Useful if your application uses different kinds of top-level windows.
Definition: kmainwindow.cpp:488
typedef WindowFlags
static bool canBeRestored(int numberOfInstances)
Definition: kmainwindow.cpp:474
KSharedConfigPtr config()
virtual void closeEvent(QCloseEvent *event)
virtual void saveProperties(KConfigGroup &)
Saves your instance-specific properties.
Definition: kmainwindow.h:614
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 10 2023 03:57:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 10 2023 03:57:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.