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
SWMMVis Class Reference

Main application window for SWMMVis. More...

#include <swmmvis.h>

Inheritance diagram for SWMMVis:
Collaboration diagram for SWMMVis:

Public Slots

void onLogMessage (const QString &message, OpenSWMMVisLogMessage::LogMessageType messageType=OpenSWMMVisLogMessage::LogMessageType::Information)
 Appends a log entry to the Message Log dock panel.
 

Public Member Functions

 SWMMVis (QWidget *parent=nullptr)
 Constructs the main window, initialises toolbars, docks, and menus, and restores the previous session geometry from QSettings.
 
virtual ~SWMMVis ()
 Destructor. Saves window geometry and dock layout to QSettings.
 
bool saveProjectWindowAs (SWMMVisProjectWindow *pw)
 The Save As flow (path dialog, filter memory, normalization, write) for pw. Returns false when the user cancels or the save fails. Public so SWMMVisProjectWindow's untitled close prompt can offer a real Save As and keep the window open on cancel.
 
void logPortabilityPreflight (SWMMVisProjectWindow *pw, const QString &targetPath, bool isGpkg)
 Run the pre-save portability check for pw against targetPath and log any warnings.
 

Protected Member Functions

void closeEvent (QCloseEvent *event) override
 
bool eventFilter (QObject *watched, QEvent *event) override
 
QMenu * createPopupMenu () override
 
void dragEnterEvent (QDragEnterEvent *event) override
 
void dragMoveEvent (QDragMoveEvent *event) override
 
void dropEvent (QDropEvent *event) override
 
QStringList acceptableDropPaths (const QMimeData *mime) const
 
QMdiSubWindow * welcomeSubWindow () const
 
void removeWelcomeSubWindow ()
 

Detailed Description

Main application window for SWMMVis.

Wraps MapCanvas, manages the project workspace/session, map tools, and all top-level UI interactions (menus, toolbars, status bar, docks). Each MDI sub-window contains one SWMMVisProjectWindow whose canvas is rebound to the shared panels on focus change.

Constructor & Destructor Documentation

◆ SWMMVis()

SWMMVis::SWMMVis ( QWidget *  parent = nullptr)
explicit

Constructs the main window, initialises toolbars, docks, and menus, and restores the previous session geometry from QSettings.

Parameters
parentQt parent widget (normally nullptr for a top-level window).
Here is the call graph for this function:

◆ ~SWMMVis()

SWMMVis::~SWMMVis ( )
virtual

Destructor. Saves window geometry and dock layout to QSettings.

Member Function Documentation

◆ acceptableDropPaths()

QStringList SWMMVis::acceptableDropPaths ( const QMimeData *  mime) const
protected

Local file paths from a drag payload that we know how to open (currently *.inp and *.oswp), in drop order. Empty when the payload carries nothing droppable.

Here is the caller graph for this function:

◆ closeEvent()

void SWMMVis::closeEvent ( QCloseEvent *  event)
overrideprotected
Here is the call graph for this function:

◆ createPopupMenu()

QMenu * SWMMVis::createPopupMenu ( )
overrideprotected

UI redesign P6 — the toolbar-area context menu offers only the dock toggles: the compact-toolbar rows are managed by the tab strip and must not be individually hideable.

◆ dragEnterEvent()

void SWMMVis::dragEnterEvent ( QDragEnterEvent *  event)
overrideprotected
Here is the call graph for this function:

◆ dragMoveEvent()

void SWMMVis::dragMoveEvent ( QDragMoveEvent *  event)
overrideprotected
Here is the call graph for this function:

◆ dropEvent()

void SWMMVis::dropEvent ( QDropEvent *  event)
overrideprotected
Here is the call graph for this function:

◆ eventFilter()

bool SWMMVis::eventFilter ( QObject *  watched,
QEvent *  event 
)
overrideprotected

◆ logPortabilityPreflight()

void SWMMVis::logPortabilityPreflight ( SWMMVisProjectWindow pw,
const QString &  targetPath,
bool  isGpkg 
)

Run the pre-save portability check for pw against targetPath and log any warnings.

Advance preview of the cross-volume / missing-file diagnostics the engine's writer produces, so they land in the log panel next to the save-success line instead of only inside the saved file. Non-blocking. Called from BOTH Save and Save As — it used to run only on Save As, so a plain Save of a model with an unportable reference reported nothing.

Parameters
pwProject window; no-op when it has no live engine.
targetPathPath the save will write to.
isGpkgTrue for a GeoPackage export, false for .inp.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onLogMessage

void SWMMVis::onLogMessage ( const QString &  message,
OpenSWMMVisLogMessage::LogMessageType  messageType = OpenSWMMVisLogMessage::LogMessageType::Information 
)
slot

Appends a log entry to the Message Log dock panel.

Parameters
messageHuman-readable message text.
messageTypeSeverity level (default: Information).
Here is the caller graph for this function:

◆ removeWelcomeSubWindow()

void SWMMVis::removeWelcomeSubWindow ( )
protected

Tear the welcome sub-window and its tab out of the MDI area without destroying the inner widget, so Help → Show Welcome Screen can re-add it later.

Here is the call graph for this function:

◆ saveProjectWindowAs()

bool SWMMVis::saveProjectWindowAs ( SWMMVisProjectWindow pw)

The Save As flow (path dialog, filter memory, normalization, write) for pw. Returns false when the user cancels or the save fails. Public so SWMMVisProjectWindow's untitled close prompt can offer a real Save As and keep the window open on cancel.

Here is the call graph for this function:

◆ welcomeSubWindow()

QMdiSubWindow * SWMMVis::welcomeSubWindow ( ) const
protected

Return the QMdiSubWindow currently wrapping welcomeWidget, or nullptr if it has been removed (closed).

Here is the caller graph for this function:

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