QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
windowstatestore.cpp File Reference

Implements WindowStateStore on top of QWidget::saveGeometry() / restoreGeometry(); the Wayland check lives in the local onWayland(). More...

#include "windowstatestore.h"
#include "qtpasssettings.h"
#include <QCursor>
#include <QDialog>
#include <QGuiApplication>
#include <QScreen>
#include <QWidget>
Include dependency graph for windowstatestore.cpp:

Go to the source code of this file.

Namespaces

namespace  WindowStateStore
 Persist and restore a top-level window's geometry, one way for the main window and every dialog.

Functions

auto WindowStateStore::restore (QWidget &window, const QString &key) -> bool
 Restore window's geometry saved under key.
void WindowStateStore::save (const QWidget &window, const QString &key)
 Save window's geometry under key.
void WindowStateStore::attach (QDialog &dialog, const QString &key)
 restore() now, save() whenever the dialog finishes.
void WindowStateStore::centreOnCursorScreen (QWidget &window)
 Move window so its frame is centred on the screen under the mouse pointer (the primary screen when there is none). No-op on Wayland.

Detailed Description

Implements WindowStateStore on top of QWidget::saveGeometry() / restoreGeometry(); the Wayland check lives in the local onWayland().

Definition in file windowstatestore.cpp.