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
mesh2dresultsexportdialog.h
Go to the documentation of this file.
1
17#ifndef OPENSWMMVIS_UI_DIALOGS_MESH2DRESULTSEXPORTDIALOG_H
18#define OPENSWMMVIS_UI_DIALOGS_MESH2DRESULTSEXPORTDIALOG_H
19
21
22#include <QDateTime>
23#include <QDialog>
24#include <QList>
25#include <QString>
26
27class QCheckBox;
28class QComboBox;
29class QDialogButtonBox;
30class QDoubleSpinBox;
31class QGroupBox;
32class QLabel;
33class QLineEdit;
34class QListWidget;
35class QPushButton;
36class QSpinBox;
37
38namespace openswmmvis::ui {
39
46{
47 QList<QDateTime> times;
48 int currentIndex = -1;
49 double suggestedCellSize = 0.0;
50 double extentWidth = 0.0;
51 double extentHeight = 0.0;
52 bool hasVelocity = false;
53 bool live = false;
54 QString lengthUnit = QStringLiteral("m");
55 QString defaultDir;
57};
58
59class Mesh2DResultsExportDialog : public QDialog
60{
61 Q_OBJECT
62
63public:
65 QWidget *parent = nullptr);
67
71
72private slots:
73 void onBrowse();
74 void onFormatChanged();
75 void onSelectAll();
76 void onSelectNone();
77 void onSelectCurrent();
78 void onApplyStride();
79 void revalidate();
80
81private:
82 void buildUi();
83 openswmmvis::io::Mesh2DExportFormat currentFormat() const;
84 std::vector<int> selectedSteps() const;
85 unsigned selectedVariables() const;
87 QString validationMessage() const;
88
90
91 QComboBox *m_format = nullptr;
92 QLineEdit *m_path = nullptr;
93 QPushButton *m_browse = nullptr;
94 QCheckBox *m_depth = nullptr;
95 QCheckBox *m_head = nullptr;
96 QCheckBox *m_vx = nullptr;
97 QCheckBox *m_vy = nullptr;
98 QCheckBox *m_vmag = nullptr;
99 QCheckBox *m_includeMax = nullptr;
100 QListWidget *m_steps = nullptr;
101 QPushButton *m_all = nullptr;
102 QPushButton *m_none = nullptr;
103 QPushButton *m_current = nullptr;
104 QSpinBox *m_stride = nullptr;
105 QPushButton *m_applyStride = nullptr;
106 QLabel *m_selection = nullptr;
107 QGroupBox *m_rasterGroup = nullptr;
108 QDoubleSpinBox *m_cellSize = nullptr;
109 QLabel *m_gridInfo = nullptr;
110 QComboBox *m_interp = nullptr;
111 QSpinBox *m_neighbours = nullptr;
112 QCheckBox *m_maskDry = nullptr;
113 QLabel *m_validation = nullptr;
114 QDialogButtonBox *m_buttons = nullptr;
115};
116
117} // namespace openswmmvis::ui
118
119#endif // OPENSWMMVIS_UI_DIALOGS_MESH2DRESULTSEXPORTDIALOG_H
Definition mesh2dresultsexportdialog.h:60
openswmmvis::io::Mesh2DExportOptions options() const
The options the user chose. Valid once exec() returns Accepted; readable before that (the tests drive...
Definition mesh2dresultsexportdialog.cpp:288
Mesh2DExportFormat
Output container. Vector formats share one OGR code path.
Definition mesh2dresultsexport.h:49
Definition openswmmvislayer.h:43
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
What to export. Collected by the dialog, consumed by exportMesh2DResults.
Definition mesh2dresultsexport.h:82
What the dialog needs to know about the run it is exporting.
Definition mesh2dresultsexportdialog.h:46
int currentIndex
the frame the animation is on ("Current")
Definition mesh2dresultsexportdialog.h:48
bool live
the run is still going: "so far" wording
Definition mesh2dresultsexportdialog.h:53
QList< QDateTime > times
one per frame; invalid entries render as an index
Definition mesh2dresultsexportdialog.h:47
double extentWidth
mesh bounding box, model units
Definition mesh2dresultsexportdialog.h:50
QString defaultBaseName
suggested file stem (the run's name)
Definition mesh2dresultsexportdialog.h:56
QString defaultDir
where the file chooser opens
Definition mesh2dresultsexportdialog.h:55
bool hasVelocity
false disables the velocity variables
Definition mesh2dresultsexportdialog.h:52
QString lengthUnit
spin-box suffix
Definition mesh2dresultsexportdialog.h:54
double suggestedCellSize
model units; seeds the raster cell size
Definition mesh2dresultsexportdialog.h:49
double extentHeight
so the dialog can size the raster
Definition mesh2dresultsexportdialog.h:51