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
initialbedqualitydialog.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: Apache-2.0 */
2
12#ifndef OPENSWMM_UI_DIALOGS_INITIALBEDQUALITYDIALOG_H
13#define OPENSWMM_UI_DIALOGS_INITIALBEDQUALITYDIALOG_H
14
15#include <openswmm/engine/openswmm_engine.h>
16#include <QDialog>
17#include <QString>
18
19class QLabel;
20class QPushButton;
21class QTableWidget;
22
23namespace OpenSWMMVis
24{
25
26class InitialBedQualityDialog final : public QDialog
27{
28 Q_OBJECT
29public:
40 explicit InitialBedQualityDialog(SWMM_Engine engine, QWidget *parent = nullptr);
47 bool wroteAnyChanges() const noexcept { return wrote_any_changes_; }
55 int lastWriteCount() const noexcept { return last_write_count_; }
56
57signals:
65
66public slots:
73 void invalidateEngine();
74
75private slots:
82 void addRow();
88 void removeRow();
107 void acceptDraft();
108
109private:
116 void buildUi();
126 void readFromEngine();
147 void appendRow(int scope, const QString &target, const QString &species, double concentration);
157 void setEditable(bool editable);
158 SWMM_Engine engine_ = nullptr;
159 QTableWidget *table_ = nullptr;
160 QLabel *status_ = nullptr;
161 QPushButton *remove_ = nullptr;
162 bool wrote_any_changes_ = false;
163 int last_write_count_ = 0;
164};
165
166} // namespace OpenSWMMVis
167#endif
Definition initialbedqualitydialog.h:27
int lastWriteCount() const noexcept
Definition initialbedqualitydialog.h:55
void invalidateEngine()
Forget the raw engine and disable table/Add/Remove/OK while changing Cancel to Close and showing clos...
Definition initialbedqualitydialog.cpp:154
void changesApplied()
Notify a successfully completed changed draft with a positive successful-call count.
bool wroteAnyChanges() const noexcept
Definition initialbedqualitydialog.h:47
QString species
Definition initialbedqualitydialog.cpp:52
double concentration
Definition initialbedqualitydialog.cpp:53
QString target
Definition initialbedqualitydialog.cpp:51
int scope
Definition initialbedqualitydialog.cpp:50
Definition heatassignment.h:15
void * SWMM_Engine
Definition objectdefaultsapplier.h:23
int parent
Definition planning.cpp:199