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
dialoglayoutwatcher.h File Reference
#include <QObject>
Include dependency graph for dialoglayoutwatcher.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::ui::DialogLayoutWatcher
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Variables

constexpr char openswmmvis::ui::kNoLayoutPersistenceProp [] = "noLayoutPersistence"
 Dynamic property opting a QDialog out of automatic persistence.
 
constexpr char openswmmvis::ui::kLayoutRestoredOnceProp [] = "layoutRestoredOnce"
 Instance property marking that the first-show restore already ran.
 

Detailed Description

UI redesign iteration 2 (D1) — app-wide automatic dialog layout persistence. Installed as its OWN application event filter (one line in the SWMMVisApplication ctor; deliberately separate from the existing macOS stacking filter): every top-level QDialog with a non-empty objectName gets restoreDialogLayout() synchronously on its FIRST Show (pre-map — after the ctor, so hard-coded defaults are the first-run values and saved geometry wins thereafter) and saveDialogLayout() on Hide/Close (Hide covers the QDialog::done() / exec() paths, which never emit Close).

Opt-out: set the "noLayoutPersistence" dynamic property (the command palette does — it is deliberately fixed-size). Unnamed dialogs are implicitly out.