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
wateragesourcesdialog.h
Go to the documentation of this file.
1
33#ifndef OPENSWMM_UI_DIALOGS_WATERAGESOURCESDIALOG_H
34#define OPENSWMM_UI_DIALOGS_WATERAGESOURCESDIALOG_H
35
36#include <openswmm/engine/openswmm_engine.h>
37
38#include <QDialog>
39
40class QTableWidget;
41class QLabel;
42
43namespace OpenSWMMVis
44{
45
49class WaterAgeSourcesDialog : public QDialog
50{
51 Q_OBJECT
52
53public:
54 explicit WaterAgeSourcesDialog(SWMM_Engine engine,
55 QWidget *parent = nullptr);
56 ~WaterAgeSourcesDialog() override = default;
57
61 [[nodiscard]] bool wroteAnyChanges() const { return m_wroteAnyChanges; }
62
65 [[nodiscard]] int lastWriteCount() const { return m_lastWriteCount; }
66
67private slots:
68 void onAddOverride();
69 void onRemoveOverride();
70 void onAccept();
71
72private:
73 void buildUi();
74 void readFromEngine();
75 int writeToEngine();
76
77 SWMM_Engine m_engine = nullptr;
78 QTableWidget *m_globalTable = nullptr;
79 QTableWidget *m_overrideTable = nullptr;
80 QLabel *m_hintLabel = nullptr;
81 bool m_wroteAnyChanges = false;
82 int m_lastWriteCount = 0;
83};
84
85} // namespace OpenSWMMVis
86
87#endif // OPENSWMM_UI_DIALOGS_WATERAGESOURCESDIALOG_H
Non-modal editor for the water-age source table.
Definition wateragesourcesdialog.h:50
~WaterAgeSourcesDialog() override=default
int lastWriteCount() const
Number of engine writes the last OK performed (0 when the dialog was accepted with no edits)....
Definition wateragesourcesdialog.h:65
bool wroteAnyChanges() const
True once OK has written at least one change to the engine.
Definition wateragesourcesdialog.h:61
Definition gwsourcesummary.h:21
void * SWMM_Engine
Definition objectdefaultsapplier.h:19
QVector< int > parent
union-find
Definition pslgminsize.cpp:176