KXmlGui
kmainwindow.h
35 * It extends QMainWindow with session management capabilities. For ready-made window functionality and simpler UI management, use KXmlGuiWindow instead.
37 * Define the minimum/maximum height/width of your central widget and KMainWindow will take this into account.
38 * For fixed size windows set your main widget to a fixed size. Fixed aspect ratios (QWidget::heightForWidth()) and fixed width widgets are not supported.
43 * Use setAutoSaveSettings() to automatically save and restore the window geometry and toolbar/menubar/statusbar state when the application is restarted.
45 * Use kRestoreMainWindows() in your main function to restore your windows when the session is restored.
50 * Reimplement saveProperties() / readProperties() or saveGlobalProperties() / readGlobalProperties()
56 * See https://develop.kde.org/docs/use/session-managment for more information on session management.
122 * @returns @c true if the number of KMainWindow instances of the previous session did contain the requested @p numberOfInstances, @c false otherwise.
230 * saveMainWindowSettings( KConfigGroup(KSharedConfig::openConfig(), groupName) ) will be called.
258 void setAutoSaveSettings(const QString &groupName = QStringLiteral("MainWindow"), bool saveWindowSize = true);
bool hasMenuBar()
virtual void saveProperties(KConfigGroup &)
Saves your instance-specific properties.
Definition kmainwindow.h:540
static const QString classNameOfToplevel(int instanceNumber)
Useful if your application uses different kinds of top-level windows.
Definition kmainwindow.cpp:434
virtual void readProperties(const KConfigGroup &)
Reads your instance-specific properties.
Definition kmainwindow.h:560
static bool canBeRestored(int numberOfInstances)
Definition kmainwindow.cpp:420
virtual bool event(QEvent *event) override
Q_PROPERTY(...)
Q_SLOTSQ_SLOTS
typedef WindowFlags
virtual void closeEvent(QCloseEvent *event)
virtual void keyPressEvent(QKeyEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:02:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:02:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.