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
heatconfigdialog.h
Go to the documentation of this file.
1
38#ifndef OPENSWMM_UI_DIALOGS_HEATCONFIGDIALOG_H
39#define OPENSWMM_UI_DIALOGS_HEATCONFIGDIALOG_H
40
41#include <openswmm/engine/openswmm_engine.h>
42
43#include <QDialog>
44
45class QCheckBox;
46class QComboBox;
47class QDoubleSpinBox;
48class QLabel;
49class QRadioButton;
50class QTableWidget;
51class QTabWidget;
52
53namespace OpenSWMMVis
54{
55
60class HeatConfigDialog : public QDialog
61{
62 Q_OBJECT
63
64public:
73
74 explicit HeatConfigDialog(SWMM_Engine engine, QWidget *parent = nullptr);
75 ~HeatConfigDialog() override = default;
76
78 bool wroteAnyChanges() const { return m_wroteAnyChanges; }
79
81 void setCurrentTab(int idx);
82
84 int lastWriteCount() const { return m_lastWriteCount; }
85
86private slots:
87 void onAccept();
88 void onAddOverride();
89 void onRemoveOverride();
90
91private:
92 void buildUi();
93 void readFromEngine();
94 int writeToEngine();
95 int writeSolar();
96 int writeRadiative();
97 int writeSources();
98 int writeModules();
99 int writeCloud();
100
101 SWMM_Engine m_engine = nullptr;
102 bool m_wroteAnyChanges = false;
103 int m_lastWriteCount = 0;
104 QTabWidget *m_tabs = nullptr;
105
106 // Sources tab
107 QTableWidget *m_sourceTable = nullptr;
108 QTableWidget *m_overrideTable = nullptr;
109
110 // Fluxes tab
111 QCheckBox *m_modules[3] = { nullptr, nullptr, nullptr };
112
113 // Radiative tab
114 QRadioButton *m_swConstant = nullptr;
115 QRadioButton *m_swTimeseries = nullptr;
116 QRadioButton *m_swComputed = nullptr;
117 QDoubleSpinBox *m_swConstSpin = nullptr;
118 QComboBox *m_swTsCombo = nullptr;
121 QString m_swTsInitial;
122 QString m_cloudTsInitial;
123 QDoubleSpinBox *m_radSpin[8] = {};
124
125 // Solar tab
126 QDoubleSpinBox *m_solarSpin[9] = {};
127
128 // Cloud tab
129 QCheckBox *m_cloudEnable = nullptr;
130 QDoubleSpinBox *m_cloudSpin[4] = {};
131 QComboBox *m_cloudTsCombo = nullptr;
132};
133
134} // namespace OpenSWMMVis
135
136#endif // OPENSWMM_UI_DIALOGS_HEATCONFIGDIALOG_H
Editor for [HEAT_SOURCES], [HEAT_FLUXES] and the H6a radiative / solar / cloud configuration.
Definition heatconfigdialog.h:61
Tab
Definition heatconfigdialog.h:66
@ TabSolar
Definition heatconfigdialog.h:70
@ TabCloud
Definition heatconfigdialog.h:71
@ TabRadiative
Definition heatconfigdialog.h:69
@ TabFluxes
Definition heatconfigdialog.h:68
@ TabSources
Definition heatconfigdialog.h:67
void setCurrentTab(int idx)
Select the tab a menu action maps to (see Tab).
Definition heatconfigdialog.cpp:130
bool wroteAnyChanges() const
True once OK has written at least one change to the engine.
Definition heatconfigdialog.h:78
~HeatConfigDialog() override=default
int lastWriteCount() const
Number of engine writes the last OK performed (test hook).
Definition heatconfigdialog.h:84
Definition gwsourcesummary.h:21
void * SWMM_Engine
Definition objectdefaultsapplier.h:19
QVector< int > parent
union-find
Definition pslgminsize.cpp:176