KConfig 5.109.0
kwindowconfig.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2012 Benjamin Port <benjamin.port@ben2367.fr>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef KWINDOWCONFIG_H
9#define KWINDOWCONFIG_H
10
11#include <kconfiggroup.h>
12#include <kconfiggui_export.h>
13
14class QWindow;
15class QScreen;
16
21{
33KCONFIGGUI_EXPORT void saveWindowSize(const QWindow *window, KConfigGroup &config, KConfigGroup::WriteConfigFlags options = KConfigGroup::Normal);
34
58KCONFIGGUI_EXPORT void restoreWindowSize(QWindow *window, const KConfigGroup &config);
59
72KCONFIGGUI_EXPORT void saveWindowPosition(const QWindow *window, KConfigGroup &config, KConfigGroup::WriteConfigFlags options = KConfigGroup::Normal);
73
85KCONFIGGUI_EXPORT void restoreWindowPosition(QWindow *window, const KConfigGroup &config);
86
99KCONFIGGUI_EXPORT void restoreWindowScreenPosition(QWindow *window, const QScreen *screen, const KConfigGroup &config);
100}
101#endif // KWINDOWCONFIG_H
@ Normal
Save the entry to the application specific config file without a locale tag.
Definition kconfigbase.h:57
QFlags< WriteConfigFlag > WriteConfigFlags
Stores a combination of #WriteConfigFlag values.
Definition kconfigbase.h:67
A class for one specific group in a KConfig object.
Definition kconfiggroup.h:39
Save and load window sizes into a config.
Definition kwindowconfig.h:21
void saveWindowSize(const QWindow *window, KConfigGroup &config, KConfigGroup::WriteConfigFlags options=KConfigGroup::Normal)
Saves the window's size dependent on the screen dimension either to the global or application config ...
void restoreWindowScreenPosition(QWindow *window, const QScreen *screen, const KConfigGroup &config)
Restores the window's position on provided screen from the configuration.
void saveWindowPosition(const QWindow *window, KConfigGroup &config, KConfigGroup::WriteConfigFlags options=KConfigGroup::Normal)
Saves the window's position either to the global or application config file.
void restoreWindowSize(QWindow *window, const KConfigGroup &config)
Restores the dialog's size from the configuration according to the screen size.
void restoreWindowPosition(QWindow *window, const KConfigGroup &config)
Restores the window's screen position from the configuration and calls restoreWindowScreenPosition.