137 const QString &targetPath,
151 void initializeWelcomeScreen();
158 void initializeToolBars();
159 void initializeAnimationToolBar();
160 void initializeTerrainToolBar();
161 void initializeMeshEditingToolBar();
165 void initializeAnalysisLayerCombos();
171 void refreshActiveResultsCombos();
172 void initializeMapTools();
173 void initializeStatusBar();
177 void updateCoordinateReadout();
178 void initializeDockWidgets();
179 void initializeLayersDockWidget();
180 void initializeObjectBrowserDockWidget();
181 void initializePropertiesPanelDockWidget();
182 void initializeSimulationStatusDockWidget();
183 void initializeMessageLogDockWidget();
184 void initializeLegendDockWidget();
189 void initializeFeatureLayerDockWidget();
191 void initializeFeatureLayerActions();
197 void onNewFeatureLayer();
201 void onDeleteSelectedFeatures();
204 void syncFeatureEditState();
206 void initializeMenus();
207 void initializeSettings();
214 void registerActions();
220 QMetaObject::Connection mUndoEnableConn;
221 QMetaObject::Connection mRedoEnableConn;
227 void initializeCompactToolbar();
232 void updateContextualTabs();
235 void clearPreviousWelcomeScreenElements();
236 void initializeDefaultWorkspaceSession();
237 void applyEditSessionToActions(
bool active);
238 void applyProjectOpenToActions(
bool open);
242 void updateOffsetModeLabels(
bool elevation);
251 const QString &rendererId);
278 void onOpenProject(
const QString &
path = QString());
283 void openSingleINP(
const QString &filePath);
290 const QString &filePath,
292 const QList<QString> &warnings,
293 const QList<QString> &errors,
306 const QString &filePath,
325 const QString &filePath,
326 const QString &h5Override = QString());
340 void beginFileOpen(
const QString &
path);
346 void endFileOpen(
const QString &
path,
bool ok,
347 const QString &summary, qint64 elapsedMs,
348 const QString &errorDetail = QString());
351 void openProjectFile(
const QString &oswpPath);
354 void onOpenRecentFile(QAction *action);
357 void onSaveProject();
366 void onClearRecentFiles();
369 void onRecentFilesSizeChanged();
372 void onShowWelcomeScreen();
378 void onSetProgressBarBusy(
bool busy);
384 void onModelLoaded();
387 void onModelLoadError(
const QString &msg);
390 void onFlowUnitsChanged(
int comboIndex);
393 void onCursorPositionChanged(
double mapX,
double mapY);
398 void onMeshHoverElevation(
double z,
bool finite);
404 void onCRSButtonClicked();
408 void onMapScaleEntered(
const QString &
text);
412 void onCanvasScaleChanged(
double denominator);
415 void onAddBasemapLayer();
418 void onAddWMSLayer();
428 void onAddWFSLayer();
431 void onAddVectorLayer();
434 void onAddRasterLayer();
437 void onAddSWMMResultsLayer();
442 void onAddMesh2DLayer();
448 void onAdd2DResultsLayer();
451 void onSimulationOptions();
454 void onClimatology(
int tab);
457 void onEditWaterAgeSources();
460 void onEditInitialQuality();
463 void onEditReactionSystem();
467 void onEditHeatConfig(
int tab = -1);
473 void onTabularView();
475 void onAddDelimitedData();
477 void onSummarizeResults();
481 void onExport2DResults();
487 void onCopyActiveView();
489 void onPrintActiveView();
491 void onInvertSelection();
495 void onSelectUpstream();
497 void onSelectDownstream();
500 void onStreamSelect(
bool upstream);
502 void onFlowBalance(
bool upstream);
504 void onTravelTime(
bool upstream);
511 void onRunSimulation();
516 void onPlotTimeSeries();
557 void openRainfallVisualization();
594 void openComparisonPlotForDescriptor(
597 void openComparisonPlotForDescriptorOnLayer(
607 void openComparisonPlotOverlayForProfile(
621 const QVector<int> &triIdxList,
622 const QVector<openswmmvis::plot::PlotAttribute> &attrs);
627 void onAddFromMapToggled(
bool active);
641 void openMeshProfilePlotFor(
const QVector<QPointF> &scenePolyline);
642 void openMeshBedProfilePlotFor(
const QVector<QPointF> &scenePolyline);
648 void openTerrainProfilePlotFor(
const QVector<QPointF> &scenePolyline);
653 void onPlotProfileTriggered();
656 void openMeshProfileDialog(
const QVector<QPointF> &scenePolyline,
658 const QString &
title);
669 void openMeshVertexSeriesFor(
class SWMM2DMeshLayer *
mesh,
const QVector<int> &vertexIdxList,
670 const QVector<openswmmvis::plot::PlotAttribute> &attrs);
672 void onActiveSubWindowChanged(QMdiSubWindow *window);
682 void rebuildWindowMenu();
695 void resetWindowPositions();
699 bool eventFilter(QObject *watched, QEvent *event)
override;
710 void dropEvent(QDropEvent *event)
override;
728 QStringList mRecentFiles;
729 bool mShowSplashScreenOnStartUp =
true;
730 bool mShowWelcomeScreenOnStartUp =
true;
733 QCheckBox *mCheckBoxLevelOffsetMode =
nullptr;
734 QLabel *mLabelOffsetElevation =
nullptr;
735 QLabel *mLabelOffsetDepth =
nullptr;
736 QCheckBox *mCheckBoxAutoLength =
nullptr;
737 QToolButton *mToolButtonCoordinateReferenceSystem =
nullptr;
738 QLineEdit *mLineEditCoordinates =
nullptr;
742 double mLastCursorMapX = 0.0;
743 double mLastCursorMapY = 0.0;
744 bool mHasCursorPos =
false;
745 std::optional<double> mMeshHoverZ;
746 QComboBox *mComboBoxMapScale =
nullptr;
747 QComboBox *mComboBoxFlowUnits =
nullptr;
748 QComboBox *mComboBoxEngineVersion =
nullptr;
749 QProgressBar *mProgressBar =
nullptr;
752 QLabel *mProgressLabel =
nullptr;
753 QDateTimeEdit *mDateTimeEditAnimationTime =
nullptr;
754 QLabel *mLabelAnimationSpeed =
nullptr;
755 QComboBox *mComboAnimationSpeed =
nullptr;
756 QCheckBox *mCheckBoxAnimationCycle =
nullptr;
758 QLabel *mLabelAnimationWindow =
nullptr;
759 QDoubleSpinBox *mSpinAnimationWindow =
nullptr;
770 QTimer *mScrubCoalesceTimer =
nullptr;
771 QDateTime mPendingSeekTime;
777 QLabel *mLabelActiveResults1D =
nullptr;
778 QComboBox *mComboActiveResults1D =
nullptr;
779 QLabel *mLabelActiveResults2D =
nullptr;
780 QComboBox *mComboActiveResults2D =
nullptr;
781 QCheckBox *mCheckBoxLive2D =
nullptr;
782 QCheckBox *mCheckBoxLive1D =
nullptr;
789 class QToolBar *mToolBarHome =
nullptr;
790 class QToolBar *mToolBarModel =
nullptr;
791 class QToolBar *mToolBarMesh2D =
nullptr;
792 class QToolBar *mToolBarView =
nullptr;
793 class QToolBar *mToolBarFeatures =
nullptr;
796 class QToolBar *mToolBarAnimation =
nullptr;
797 class QToolBar *mToolBarAnalysis =
nullptr;
804 QMetaObject::Connection mMeshTabConnAdd;
805 QMetaObject::Connection mMeshTabConnRemove;
808 QStandardItemModel *mLogMessagesModel =
nullptr;
811 bool mLogScrollPending =
false;
823 class QDockWidget *mFeatureDock =
nullptr;
834 QHash<int, double> mRunningSimProgress;
839 QHash<int, class SimulationRunner *> mActiveRunners;
845 QHash<int, QPointer<class SWMM2DResultsLayer>> mActive2DResultsLayers;
852 void adoptFinished2DResults(
int jobId,
bool success,
int errCode);
857 bool mExport2DInFlight =
false;
858 QHash<int, std::pair<bool, int>> mDeferred2DFinish;
864 QHash<int, QPointer<class SWMMResultsLayer>> mLive1DLayers;
870 const QString &outPath,
871 const QString &rptPath);
876 const QString &outPath,
const QString &rptPath);
881 QHash<int, QDateTime> mSimulationStarts;
887 QPointer<class OpenSWMMVisMapToolPlotPick> mPlotPickTool;
888 QPointer<class OpenSWMMVisMapTool> mPrevMapTool;
900 enum class ProgressOwner { None, Busy, Open, Simulation };
905 QHash<int, class OpenProgressModel *> mRunningOpens;
907 int mBusyRefCount = 0;
911 void applyProgressBarState();
918 void endOpenProgress(
int openId);
921 void updateSimulationProgressBar();
926 void logInheritedThreadEnvironment();
937 void refreshOffsetModeViews();
950 QAction *mActionAddJunction =
nullptr;
951 QAction *mActionAddOutfall =
nullptr;
952 QAction *mActionAddStorage =
nullptr;
953 QAction *mActionAddConduit =
nullptr;
954 QAction *mActionDeleteObject =
nullptr;
959 QMenu *mMenuWindow =
nullptr;
960 QAction *mActionWindowMinimize =
nullptr;
961 QAction *mActionWindowZoom =
nullptr;
962 QAction *mActionWindowBringAllToFront =
nullptr;
963 QAction *mActionWindowResetPositions =
nullptr;
974 bool zoomCanvasToSelection(
MapCanvas *c)
const;