SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
dialoglayoutpersistence.cpp File Reference
#include "ui/dialogs/dialoglayoutpersistence.h"
#include <QAction>
#include <QByteArray>
#include <QDialog>
#include <QGuiApplication>
#include <QHeaderView>
#include <QList>
#include <QRect>
#include <QScreen>
#include <QSettings>
#include <QSplitter>
#include <QStackedWidget>
#include <QString>
#include <QTabWidget>
#include <QTableView>
#include <QTreeView>
#include <QWidget>
Include dependency graph for dialoglayoutpersistence.cpp:

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Functions

QRect openswmmvis::ui::clampToVisibleScreen (const QRect &saved, int titleBarStrip=-1)
 Clamp a saved top-level geometry into currently-available screen space, so a window can never be restored somewhere unreachable.
 
void openswmmvis::ui::ensureWindowOnScreen (QWidget *widget, const QScreen *preferred=nullptr)
 Move/resize widget's window so it is reachable on a connected screen, using the live frame geometry to size the title-bar allowance.
 
void openswmmvis::ui::saveDialogLayout (QWidget *root)
 Persist the dialog's geometry + every named QSplitter under it.
 
bool openswmmvis::ui::restoreDialogLayout (QWidget *root)
 Inverse of saveDialogLayout — restore geometry + splitter states.
 
void openswmmvis::ui::applyAlwaysOnTopPolicy (QDialog *d)
 Step H — pin the dialog above the main window so a map click doesn't hide it. Idempotent. Harmless on modal dialogs and on dialogs that already have the flag set. On macOS this is a no-op (the always-on-top hint would also float above other applications; Qt::Tool already keeps the dialog above the main window).
 

Detailed Description

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later