QtPass
2.0.0
Developer documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
windowstatestore.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2026 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
8
#ifndef SRC_WINDOWSTATESTORE_H_
9
#define SRC_WINDOWSTATESTORE_H_
10
11
#include <QString>
12
13
class
QDialog;
14
class
QWidget;
15
27
namespace
WindowStateStore
{
28
39
auto
restore
(QWidget &window,
const
QString &key) -> bool;
40
46
void
save
(
const
QWidget &window,
const
QString &key);
47
57
void
attach
(QDialog &dialog,
const
QString &key);
58
65
void
centreOnCursorScreen
(QWidget &window);
66
67
}
// namespace WindowStateStore
68
69
#endif
// SRC_WINDOWSTATESTORE_H_
WindowStateStore
Persist and restore a top-level window's geometry, one way for the main window and every dialog.
Definition
windowstatestore.cpp:30
WindowStateStore::save
void save(const QWidget &window, const QString &key)
Save window's geometry under key.
Definition
windowstatestore.cpp:41
WindowStateStore::restore
auto restore(QWidget &window, const QString &key) -> bool
Restore window's geometry saved under key.
Definition
windowstatestore.cpp:32
WindowStateStore::centreOnCursorScreen
void centreOnCursorScreen(QWidget &window)
Move window so its frame is centred on the screen under the mouse pointer (the primary screen when th...
Definition
windowstatestore.cpp:51
WindowStateStore::attach
void attach(QDialog &dialog, const QString &key)
restore() now, save() whenever the dialog finishes.
Definition
windowstatestore.cpp:45
src
windowstatestore.h
Generated by
1.18.0