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
openswmmvis::ui::DialogRegistry Class Reference

#include <dialogregistry.h>

Inheritance diagram for openswmmvis::ui::DialogRegistry:
Collaboration diagram for openswmmvis::ui::DialogRegistry:

Public Types

enum class  StackingMode {
  NativeChildWindow ,
  QtRaiseOnActivate
}
 How modeless dialogs are kept above the application's windows. More...
 

Signals

void openDialogsChanged ()
 A dialog was registered, removed, or reordered — the Window menu rebuilds from this.
 

Public Member Functions

StackingMode stackingMode () const
 
void setStackingMode (StackingMode mode)
 
QList< QPointer< QDialog > > openDialogs () const
 Open modeless top-level dialogs, least-recently-used first.
 
void raiseAllInOrder ()
 Raise every registered dialog in MRU order, so the most recently used ends up on top. Never activates — stealing focus on an app switch is what the original AppKit attachment was chosen to avoid.
 

Static Public Member Functions

static DialogRegistryinstance ()
 The process-wide instance. Created on first use; install it on the QApplication as an event filter to start tracking.
 
static StackingMode configuredStackingMode ()
 Resolve the configured mode: OPENSWMM_DIALOG_STACKING env var, then the "Window/DialogStacking" setting, then the platform default.
 

Protected Member Functions

bool eventFilter (QObject *watched, QEvent *event) override
 

Member Enumeration Documentation

◆ StackingMode

How modeless dialogs are kept above the application's windows.

Enumerator
NativeChildWindow 

macOS AppKit -addChildWindow: (current default)

QtRaiseOnActivate 

Portable raise() pass driven by activation.

Member Function Documentation

◆ configuredStackingMode()

DialogRegistry::StackingMode openswmmvis::ui::DialogRegistry::configuredStackingMode ( )
static

Resolve the configured mode: OPENSWMM_DIALOG_STACKING env var, then the "Window/DialogStacking" setting, then the platform default.

Here is the caller graph for this function:

◆ eventFilter()

bool openswmmvis::ui::DialogRegistry::eventFilter ( QObject *  watched,
QEvent *  event 
)
overrideprotected

◆ instance()

DialogRegistry * openswmmvis::ui::DialogRegistry::instance ( )
static

The process-wide instance. Created on first use; install it on the QApplication as an event filter to start tracking.

Here is the caller graph for this function:

◆ openDialogs()

QList< QPointer< QDialog > > openswmmvis::ui::DialogRegistry::openDialogs ( ) const

Open modeless top-level dialogs, least-recently-used first.

Guarded pointers, not raw ones: callers iterate this list while doing things to windows (moving, raising, showing), and a handler reached that way could close a dialog further along the list. Re-checking each entry as it is used is then meaningful rather than decorative.

◆ openDialogsChanged

void openswmmvis::ui::DialogRegistry::openDialogsChanged ( )
signal

A dialog was registered, removed, or reordered — the Window menu rebuilds from this.

◆ raiseAllInOrder()

void openswmmvis::ui::DialogRegistry::raiseAllInOrder ( )

Raise every registered dialog in MRU order, so the most recently used ends up on top. Never activates — stealing focus on an app switch is what the original AppKit attachment was chosen to avoid.

◆ setStackingMode()

void openswmmvis::ui::DialogRegistry::setStackingMode ( StackingMode  mode)

◆ stackingMode()

StackingMode openswmmvis::ui::DialogRegistry::stackingMode ( ) const
inline
Here is the caller graph for this function:

The documentation for this class was generated from the following files: