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
profileplotoptions.h
Go to the documentation of this file.
1
15#ifndef PROFILE_PLOT_OPTIONS_H
16#define PROFILE_PLOT_OPTIONS_H
17
18#include "plot/numberformat.h"
19
20#include <QBrush>
21#include <QColor>
22#include <QFont>
23#include <QObject>
24#include <QPen>
25#include <QPointF>
26
27class ProfilePlotOptions : public QObject
28{
29 Q_OBJECT
30
31public:
33 Q_ENUM(LabelOrientation)
34
35
40 Q_ENUM(LabelFormatMode)
41
42
67 Q_ENUM(AxisNumberFormat)
68
71 Q_ENUM(LegendPosition)
72
75 Q_ENUM(TimeLabelPosition)
76
77
79 enum GroundSource { Auto = 0, NodeRims = 1, Mesh2D = 2, TerrainDEM = 3 };
80 Q_ENUM(GroundSource)
81
82 // ── Layer visibility ────────────────────────────────────────────────
83 // Live HGL is split into two independent toggles: the stroked line
84 // and the under-line fill polygon. Either can be on without the
85 // other; the legend still shows one HGL entry whenever at least
86 // one is enabled.
87 Q_PROPERTY(bool currentHglLine READ currentHglLine WRITE setCurrentHglLine NOTIFY changed)
88 Q_PROPERTY(bool currentHglFill READ currentHglFill WRITE setCurrentHglFill NOTIFY changed)
89 Q_PROPERTY(bool currentEgl READ currentEgl WRITE setCurrentEgl NOTIFY changed)
90 Q_PROPERTY(bool maxHglBand READ maxHglBand WRITE setMaxHglBand NOTIFY changed)
91 Q_PROPERTY(bool maxHglLine READ maxHglLine WRITE setMaxHglLine NOTIFY changed)
92 // EGL has no fill — only a line toggle.
93 Q_PROPERTY(bool maxEglLine READ maxEglLine WRITE setMaxEglLine NOTIFY changed)
94
95 // ── Labels ──────────────────────────────────────────────────────────
96 Q_PROPERTY(bool showNodeLabels READ showNodeLabels WRITE setShowNodeLabels NOTIFY changed)
97 Q_PROPERTY(bool showLinkLabels READ showLinkLabels WRITE setShowLinkLabels NOTIFY changed)
101 Q_PROPERTY(int labelAngleDeg READ labelAngleDeg WRITE setLabelAngleDeg NOTIFY changed)
102
103 // ── Axis number format ──────────────────────────────────────────────
104 // X axis = distance/chainage; Y axis = elevation/value. Seeded from the
105 // global Preferences default; edits here override per-plot.
108 Q_PROPERTY(QString xLabelFormat
109 READ xLabelFormat WRITE setXLabelFormat NOTIFY changed)
112 Q_PROPERTY(QString yLabelFormat
113 READ yLabelFormat WRITE setYLabelFormat NOTIFY changed)
114
115 // ── Ground line source ──────────────────────────────────────────────
116 // Where the soil's top edge comes from. Auto (default) = the 2D mesh
117 // vertex elevations interpolated at the path stations whenever the
118 // project has a mesh layer, else the node rims (invert + max depth).
120 READ groundSource WRITE setGroundSource NOTIFY changed)
121
122 // ── 2D inundation overlay ───────────────────────────────────────────
123 // Water surface of the active 2D results layer sampled along the path
124 // (mesh bed + interpolated depth), drawn as a band above the ground with
125 // a WSE line, animated with the profile cursor. Nothing draws when the
126 // project has no active 2D results layer.
130
131 // ── Node connectivity ───────────────────────────────────────────────
132 // What ELSE meets each node on the path: truncated stubs of the links
133 // the profile does not follow, and a small plan rose giving every
134 // connected link's map bearing and flow direction.
136 Q_PROPERTY(bool showNodeRoses READ showNodeRoses WRITE setShowNodeRoses NOTIFY changed)
137
138 // ── Flooding indicator (animated wedge above the rim) ───────────────
139 Q_PROPERTY(double floodRadiusPx READ floodRadiusPx WRITE setFloodRadiusPx NOTIFY changed)
140 Q_PROPERTY(int floodSweepDeg READ floodSweepDeg WRITE setFloodSweepDeg NOTIFY changed)
141 Q_PROPERTY(QColor floodColor READ floodColor WRITE setFloodColor NOTIFY changed)
142
143 // ── Theming: node-type colours ──────────────────────────────────────
144 Q_PROPERTY(QColor junctionFill READ junctionFill WRITE setJunctionFill NOTIFY changed)
145 Q_PROPERTY(QColor junctionOutline READ junctionOutline WRITE setJunctionOutline NOTIFY changed)
146 Q_PROPERTY(QColor outfallFill READ outfallFill WRITE setOutfallFill NOTIFY changed)
147 Q_PROPERTY(QColor outfallOutline READ outfallOutline WRITE setOutfallOutline NOTIFY changed)
148 Q_PROPERTY(QColor storageFill READ storageFill WRITE setStorageFill NOTIFY changed)
149 Q_PROPERTY(QColor storageOutline READ storageOutline WRITE setStorageOutline NOTIFY changed)
150 Q_PROPERTY(QColor dividerFill READ dividerFill WRITE setDividerFill NOTIFY changed)
151 Q_PROPERTY(QColor dividerOutline READ dividerOutline WRITE setDividerOutline NOTIFY changed)
152 // A virtual junction is a break point inside a pipe, not a structure: it
153 // draws as a dashed outline rectangle over the conduit running through
154 // it, with no fill and no rim glyph. One pen therefore carries its whole
155 // appearance — colour, width, style and dash pattern — instead of the
156 // fill/outline colour pair the physical node kinds use.
159
160 // ── Theming: link-type colours ──────────────────────────────────────
161 Q_PROPERTY(QColor conduitFill READ conduitFill WRITE setConduitFill NOTIFY changed)
162 Q_PROPERTY(QColor conduitOutline READ conduitOutline WRITE setConduitOutline NOTIFY changed)
163 Q_PROPERTY(QColor pumpFill READ pumpFill WRITE setPumpFill NOTIFY changed)
164 Q_PROPERTY(QColor pumpOutline READ pumpOutline WRITE setPumpOutline NOTIFY changed)
165 Q_PROPERTY(QColor weirFill READ weirFill WRITE setWeirFill NOTIFY changed)
166 Q_PROPERTY(QColor weirOutline READ weirOutline WRITE setWeirOutline NOTIFY changed)
167 Q_PROPERTY(QColor orificeFill READ orificeFill WRITE setOrificeFill NOTIFY changed)
168 Q_PROPERTY(QColor orificeOutline READ orificeOutline WRITE setOrificeOutline NOTIFY changed)
169 Q_PROPERTY(QColor outletFill READ outletFill WRITE setOutletFill NOTIFY changed)
170 Q_PROPERTY(QColor outletOutline READ outletOutline WRITE setOutletOutline NOTIFY changed)
171
172 // ── Theming: soil + lines ───────────────────────────────────────────
173 Q_PROPERTY(QColor soilFill READ soilFill WRITE setSoilFill NOTIFY changed)
174 Q_PROPERTY(QColor beddingFill READ beddingFill WRITE setBeddingFill NOTIFY changed)
175 // Line pens carry colour, width, style (solid / dashed / dotted) and
176 // a custom dash pattern — all editable via the property tree's QPen
177 // editor (qpenpropertyitem) which exposes those fields as expandable
178 // children. Fill brushes stay QBrush since gradients/textures matter
179 // for fills.
180 Q_PROPERTY(QPen hglLinePen READ hglLinePen WRITE setHglLinePen NOTIFY changed)
181 Q_PROPERTY(QBrush hglFillBrush READ hglFillBrush WRITE setHglFillBrush NOTIFY changed)
182 Q_PROPERTY(QPen eglLinePen READ eglLinePen WRITE setEglLinePen NOTIFY changed)
183 // EGL has no fill brush: the velocity-head band above the HGL is not a
184 // physically meaningful filled region. EGL renders as a line only.
185 Q_PROPERTY(QPen maxHglLinePen READ maxHglLinePen WRITE setMaxHglLinePen NOTIFY changed)
186 Q_PROPERTY(QBrush maxHglFillBrush READ maxHglFillBrush WRITE setMaxHglFillBrush NOTIFY changed)
187 Q_PROPERTY(QPen maxEglLinePen READ maxEglLinePen WRITE setMaxEglLinePen NOTIFY changed)
190 Q_PROPERTY(QPen weirOutlinePen READ weirOutlinePen WRITE setWeirOutlinePen NOTIFY changed)
191 Q_PROPERTY(QPen pumpOutlinePen READ pumpOutlinePen WRITE setPumpOutlinePen NOTIFY changed)
194
195 // ── Legend ──────────────────────────────────────────────────────────
196 Q_PROPERTY(bool legendVisible READ legendVisible WRITE setLegendVisible NOTIFY changed)
198 READ legendPosition WRITE setLegendPosition NOTIFY changed)
199 Q_PROPERTY(QFont legendFont READ legendFont WRITE setLegendFont NOTIFY changed)
200 Q_PROPERTY(double legendOpacity READ legendOpacity WRITE setLegendOpacity NOTIFY changed)
201 Q_PROPERTY(QPointF legendOffset READ legendOffset WRITE setLegendOffset NOTIFY changed)
202
203 // ── Timestamp overlay ───────────────────────────────────────────────
204 Q_PROPERTY(bool showTimeLabel READ showTimeLabel WRITE setShowTimeLabel NOTIFY changed)
207 Q_PROPERTY(QColor timeLabelColor READ timeLabelColor WRITE setTimeLabelColor NOTIFY changed)
208 Q_PROPERTY(QFont timeLabelFont READ timeLabelFont WRITE setTimeLabelFont NOTIFY changed)
209 Q_PROPERTY(QString timeLabelFormat READ timeLabelFormat WRITE setTimeLabelFormat NOTIFY changed)
210 Q_PROPERTY(QPointF timeLabelOffset READ timeLabelOffset WRITE setTimeLabelOffset NOTIFY changed)
211
212public:
213 explicit ProfilePlotOptions(QObject *parent = nullptr);
214
220 Q_INVOKABLE QString displayLabelFor(const QString &propertyName) const;
221
222 // ── Getters ─────────────────────────────────────────────────────────
223 bool currentHglLine() const { return m_currentHglLine; }
224 bool currentHglFill() const { return m_currentHglFill; }
225 bool currentEgl() const { return m_currentEgl; }
226 bool maxHglBand() const { return m_maxHglBand; }
227 bool maxHglLine() const { return m_maxHglLine; }
228 bool maxEglLine() const { return m_maxEglLine; }
229 bool showNodeLabels() const { return m_showNodeLabels; }
230 bool showLinkLabels() const { return m_showLinkLabels; }
231 bool inlineNodeLabels() const { return m_inlineNodeLabels; }
232 LabelOrientation labelOrientation() const { return m_labelOrientation; }
233 int labelAngleDeg() const { return m_labelAngleDeg; }
238
239 LabelFormatMode xLabelFormatMode() const { return m_xLabelMode; }
240 int xLabelPrecision() const { return m_xLabelPrecision; }
241 QString xLabelFormat() const { return m_xLabelFormatStr; }
242 LabelFormatMode yLabelFormatMode() const { return m_yLabelMode; }
243 int yLabelPrecision() const { return m_yLabelPrecision; }
244 QString yLabelFormat() const { return m_yLabelFormatStr; }
247 { return { static_cast<openswmmvis::plot::NumberFormatMode>(m_xLabelMode), m_xLabelPrecision, m_xLabelFormatStr }; }
249 { return { static_cast<openswmmvis::plot::NumberFormatMode>(m_yLabelMode), m_yLabelPrecision, m_yLabelFormatStr }; }
250 GroundSource groundSource() const { return m_groundSource; }
251 bool show2DInundation() const { return m_show2DInundation; }
252 QPen inundation2DLinePen() const { return m_inundation2DLinePen; }
253 QBrush inundation2DFillBrush() const { return m_inundation2DFillBrush; }
254 bool showBranchStubs() const { return m_showBranchStubs; }
255 bool showNodeRoses() const { return m_showNodeRoses; }
256
257 double floodRadiusPx() const { return m_floodRadiusPx; }
258 int floodSweepDeg() const { return m_floodSweepDeg; }
259 QColor floodColor() const { return m_floodColor; }
260
261 QColor junctionFill() const { return m_junctionFill; }
262 QColor junctionOutline() const { return m_junctionOutline; }
263 QColor outfallFill() const { return m_outfallFill; }
264 QColor outfallOutline() const { return m_outfallOutline; }
265 QColor storageFill() const { return m_storageFill; }
266 QColor storageOutline() const { return m_storageOutline; }
267 QColor dividerFill() const { return m_dividerFill; }
268 QColor dividerOutline() const { return m_dividerOutline; }
269 QPen virtualJunctionOutlinePen() const { return m_virtualJunctionOutlinePen; }
270 QColor conduitFill() const { return m_conduitFill; }
271 QColor conduitOutline() const { return m_conduitOutline; }
272 QColor pumpFill() const { return m_pumpFill; }
273 QColor pumpOutline() const { return m_pumpOutline; }
274 QColor weirFill() const { return m_weirFill; }
275 QColor weirOutline() const { return m_weirOutline; }
276 QColor orificeFill() const { return m_orificeFill; }
277 QColor orificeOutline() const { return m_orificeOutline; }
278 QColor outletFill() const { return m_outletFill; }
279 QColor outletOutline() const { return m_outletOutline; }
280 QColor soilFill() const { return m_soilFill; }
281 QColor beddingFill() const { return m_beddingFill; }
282 QPen hglLinePen() const { return m_hglLinePen; }
283 QBrush hglFillBrush() const { return m_hglFillBrush; }
284 QPen eglLinePen() const { return m_eglLinePen; }
285 QPen maxHglLinePen() const { return m_maxHglLinePen; }
286 QBrush maxHglFillBrush() const { return m_maxHglFillBrush; }
287 QPen maxEglLinePen() const { return m_maxEglLinePen; }
288 QPen conduitOutlinePen() const { return m_conduitOutlinePen; }
289 QPen orificeOutlinePen() const { return m_orificeOutlinePen; }
290 QPen weirOutlinePen() const { return m_weirOutlinePen; }
291 QPen pumpOutlinePen() const { return m_pumpOutlinePen; }
292 QPen outletOutlinePen() const { return m_outletOutlinePen; }
295 QBrush streetInvertBrush() const { return m_streetInvertBrush; }
296 bool legendVisible() const { return m_legendVisible; }
297 LegendPosition legendPosition() const { return m_legendPosition; }
298 QFont legendFont() const { return m_legendFont; }
299 double legendOpacity() const { return m_legendOpacity; }
300 QPointF legendOffset() const { return m_legendOffset; }
301
302 bool showTimeLabel() const { return m_showTimeLabel; }
303 TimeLabelPosition timeLabelPosition() const { return m_timeLabelPosition; }
304 QColor timeLabelColor() const { return m_timeLabelColor; }
305 QFont timeLabelFont() const { return m_timeLabelFont; }
306 QString timeLabelFormat() const { return m_timeLabelFormat; }
307 QPointF timeLabelOffset() const { return m_timeLabelOffset; }
308
309public slots:
310 void setCurrentHglLine(bool v);
311 void setCurrentHglFill(bool v);
312 void setCurrentEgl(bool v);
313 void setMaxHglBand(bool v);
314 void setMaxHglLine(bool v);
315 void setMaxEglLine(bool v);
316 void setShowNodeLabels (bool v);
317 void setShowLinkLabels (bool v);
318 void setInlineNodeLabels(bool v);
320 void setLabelAngleDeg (int deg);
324 void setXLabelPrecision (int count);
325 void setXLabelFormat (const QString &spec);
327 void setYLabelPrecision (int count);
328 void setYLabelFormat (const QString &spec);
330 void setShow2DInundation(bool v);
331 void setInundation2DLinePen (const QPen &p);
332 void setInundation2DFillBrush(const QBrush &b);
333 void setShowBranchStubs (bool v);
334 void setShowNodeRoses (bool v);
335 void setFloodRadiusPx (double r);
336 void setFloodSweepDeg (int deg);
337 void setFloodColor (const QColor &c);
338 void setJunctionFill (const QColor &c);
339 void setJunctionOutline(const QColor &c);
340 void setOutfallFill (const QColor &c);
341 void setOutfallOutline (const QColor &c);
342 void setStorageFill (const QColor &c);
343 void setStorageOutline (const QColor &c);
344 void setDividerFill (const QColor &c);
345 void setDividerOutline (const QColor &c);
346 void setVirtualJunctionOutlinePen(const QPen &p);
347 void setConduitFill (const QColor &c);
348 void setConduitOutline (const QColor &c);
349 void setPumpFill (const QColor &c);
350 void setPumpOutline (const QColor &c);
351 void setWeirFill (const QColor &c);
352 void setWeirOutline (const QColor &c);
353 void setOrificeFill (const QColor &c);
354 void setOrificeOutline (const QColor &c);
355 void setOutletFill (const QColor &c);
356 void setOutletOutline (const QColor &c);
357 void setSoilFill (const QColor &c);
358 void setBeddingFill (const QColor &c);
359 void setHglLinePen (const QPen &p);
360 void setHglFillBrush (const QBrush &b);
361 void setEglLinePen (const QPen &p);
362 void setMaxHglLinePen (const QPen &p);
363 void setMaxHglFillBrush(const QBrush &b);
364 void setMaxEglLinePen (const QPen &p);
365 void setConduitOutlinePen(const QPen &p);
366 void setOrificeOutlinePen(const QPen &p);
367 void setWeirOutlinePen (const QPen &p);
368 void setPumpOutlinePen (const QPen &p);
369 void setOutletOutlinePen (const QPen &p);
370 void setStreetInvertBrush(const QBrush &b);
371 void setLegendVisible (bool v);
373 void setLegendFont (const QFont &f);
374 void setLegendOpacity (double a);
375 void setLegendOffset (const QPointF &p);
376 void setShowTimeLabel (bool v);
378 void setTimeLabelColor (const QColor &c);
379 void setTimeLabelFont (const QFont &f);
380 void setTimeLabelFormat (const QString &fmt);
381 void setTimeLabelOffset (const QPointF &p);
382
383signals:
384 void changed();
385
386private:
387 // Visibility defaults match the pre-refactor LayerToggles defaults.
388 bool m_currentHglLine = true;
389 bool m_currentHglFill = true;
390 bool m_currentEgl = true;
391 bool m_maxHglBand = false;
392 bool m_maxHglLine = false;
393 bool m_maxEglLine = false;
394 bool m_showNodeLabels = false;
395 bool m_showLinkLabels = false;
396 bool m_inlineNodeLabels = false;
397 LabelOrientation m_labelOrientation = Vertical;
398 int m_labelAngleDeg = 45;
399 // Axis number format — seeded from the global Preferences default in the
400 // constructor (hence no in-class initializer values relied upon here).
401 LabelFormatMode m_xLabelMode = Decimals;
402 int m_xLabelPrecision = 0;
403 QString m_xLabelFormatStr; // optional printf override; empty = use mode+precision
404 LabelFormatMode m_yLabelMode = Decimals;
405 int m_yLabelPrecision = 2;
406 QString m_yLabelFormatStr; // optional printf override; empty = use mode+precision
407 GroundSource m_groundSource = Auto;
408 // On by default: the overlay is inert without an active 2D results
409 // layer, and a coupled model's user expects the surface water shown.
410 bool m_show2DInundation = true;
411 // Teal, distinct from the HGL blues so the two water surfaces read apart.
412 QPen m_inundation2DLinePen = QPen(QColor(0x00, 0x8B, 0x8B), 1.6, Qt::SolidLine);
413 QBrush m_inundation2DFillBrush {QColor(0x20, 0xB2, 0xAA, 90), Qt::SolidPattern};
414 bool m_showBranchStubs = true;
415 bool m_showNodeRoses = true;
416
417 // Flooding-glyph defaults: a 60° wedge with a 15 px radius reads at
418 // small zoom levels without crowding adjacent rim glyphs. Colour is
419 // a saturated warning red; outline is auto-derived as a 60 %-darker
420 // tint of the fill so a single user setting keeps the glyph coherent.
421 double m_floodRadiusPx = 15.0;
422 int m_floodSweepDeg = 60;
423 QColor m_floodColor {0xE5, 0x21, 0x21};
424
425 // Theming defaults match the pre-refactor hardcoded helpers in
426 // profileplotwidget.cpp.
427 QColor m_junctionFill {0xCF, 0xE2, 0xF3};
428 QColor m_junctionOutline {0x1C, 0x4E, 0x7A};
429 QColor m_outfallFill {0xF4, 0xCC, 0xCC};
430 QColor m_outfallOutline {0x8A, 0x21, 0x21};
431 QColor m_storageFill {0xD9, 0xEA, 0xD3};
432 QColor m_storageOutline {0x2D, 0x6A, 0x2D};
433 QColor m_dividerFill {0xFF, 0xE5, 0x99};
434 QColor m_dividerOutline {0x9C, 0x6F, 0x14};
435 // Dash pattern / cap / join are set in the constructor — QPen needs the
436 // calls. Dark grey like the conduit outline it overlaps, but thinner and
437 // dashed so it reads as a marker rather than a structure.
438 QPen m_virtualJunctionOutlinePen =
439 QPen(QColor(0x33, 0x33, 0x33), 1.0, Qt::CustomDashLine);
440 QColor m_conduitFill {0xEE, 0xEE, 0xEE};
441 QColor m_conduitOutline {0x33, 0x33, 0x33};
442 QColor m_pumpFill {0xFF, 0xD6, 0xA5};
443 QColor m_pumpOutline {0xC2, 0x70, 0x1A};
444 QColor m_weirFill {0x5D, 0x40, 0x37}; // dark brown (masonry block)
445 QColor m_weirOutline {0x3E, 0x2A, 0x1E}; // very dark brown
446 QColor m_orificeFill {0xC9, 0xE4, 0xCA};
447 QColor m_orificeOutline {0x2E, 0x6E, 0x39};
448 QColor m_outletFill {0xF5, 0xC2, 0xC7};
449 QColor m_outletOutline {0xA3, 0x3D, 0x4C};
450 QColor m_soilFill {0xC6, 0xA9, 0x7A, 130};
451 QColor m_beddingFill {0x9C, 0x82, 0x5A, 110};
452 // Pen defaults — solid for HGL (the dominant curve), long-dash for EGL
453 // (set in the constructor since QPen needs a dash pattern call), dashed
454 // for max-envelope outlines (matches the typical max-envelope
455 // convention). Conduit outline is solid dark grey.
456 QPen m_hglLinePen = QPen(QColor(0x1F, 0x6F, 0xB7), 2.2, Qt::SolidLine);
457 QBrush m_hglFillBrush {QColor(0x55, 0xA8, 0xE6, 110), Qt::SolidPattern};
458 QPen m_eglLinePen = QPen(QColor(0x1F, 0x6F, 0xB7), 1.6, Qt::CustomDashLine);
459 QPen m_maxHglLinePen = QPen(QColor(0x1F, 0x6F, 0xB7), 1.54, Qt::DashLine);
460 QBrush m_maxHglFillBrush {QColor(0x55, 0xA8, 0xE6, 80), Qt::SolidPattern};
461 QPen m_maxEglLinePen = QPen(QColor(0x1F, 0x6F, 0xB7), 1.12, Qt::DashLine);
462 QPen m_conduitOutlinePen = QPen(QColor(0x33, 0x33, 0x33), 1.5, Qt::SolidLine);
463 QPen m_orificeOutlinePen = QPen(QColor(0x2E, 0x6E, 0x39), 1.5, Qt::SolidLine);
464 QPen m_weirOutlinePen = QPen(QColor(0x3E, 0x2A, 0x1E), 1.5, Qt::SolidLine);
465 QPen m_pumpOutlinePen = QPen(QColor(0xC2, 0x70, 0x1A), 1.2, Qt::SolidLine);
466 QPen m_outletOutlinePen = QPen(QColor(0xA3, 0x3D, 0x4C), 1.2, Qt::SolidLine);
467 QBrush m_streetInvertBrush {QColor(0x55, 0x55, 0x55), Qt::BDiagPattern};
468
469 // Legend defaults.
470 bool m_legendVisible = true;
471 LegendPosition m_legendPosition = TopRight;
472 QFont m_legendFont; // initialised from QApplication font
473 double m_legendOpacity = 0.86;
474 QPointF m_legendOffset { 0.0, 0.0 };
475
476 // Timestamp overlay defaults. Anchor in TopLeft by default so the chip
477 // doesn't overlap the legend (which anchors top-right). User can drag
478 // either overlay; the offset accumulates relative to the anchor.
479 bool m_showTimeLabel = true;
480 TimeLabelPosition m_timeLabelPosition = TimeTopLeft;
481 QColor m_timeLabelColor {0x10, 0x10, 0x10};
482 QFont m_timeLabelFont; // initialised from QApplication font
483 QString m_timeLabelFormat = QStringLiteral("dd-MMM-yyyy HH:mm:ss");
484 QPointF m_timeLabelOffset { 0.0, 0.0 };
485};
486
487#endif // PROFILE_PLOT_OPTIONS_H
Definition profileplotoptions.h:28
void setInlineNodeLabels(bool v)
Definition profileplotoptions.cpp:144
QPen weirOutlinePen
Definition profileplotoptions.h:190
QColor conduitOutline
Definition profileplotoptions.h:162
LegendPosition legendPosition() const
Definition profileplotoptions.h:297
QColor outfallOutline
Definition profileplotoptions.h:147
void setWeirOutline(const QColor &c)
Definition profileplotoptions.cpp:224
void setBeddingFill(const QColor &c)
Definition profileplotoptions.cpp:230
QColor pumpOutline
Definition profileplotoptions.h:164
QColor outletOutline
Definition profileplotoptions.h:170
QColor pumpOutline() const
Definition profileplotoptions.h:273
QPen maxEglLinePen
Definition profileplotoptions.h:187
bool maxEglLine() const
Definition profileplotoptions.h:228
void setDividerOutline(const QColor &c)
Definition profileplotoptions.cpp:216
ProfilePlotOptions::TimeLabelPosition timeLabelPosition
Definition profileplotoptions.h:206
void setLabelAngleDeg(int deg)
Definition profileplotoptions.cpp:146
QBrush maxHglFillBrush
Definition profileplotoptions.h:186
QPen conduitOutlinePen() const
Definition profileplotoptions.h:288
int xLabelPrecision() const
Definition profileplotoptions.h:240
QFont timeLabelFont
Definition profileplotoptions.h:208
bool currentHglLine
Definition profileplotoptions.h:87
QColor orificeOutline() const
Definition profileplotoptions.h:277
QColor storageFill() const
Definition profileplotoptions.h:265
void setLegendVisible(bool v)
Definition profileplotoptions.cpp:245
void setYLabelFormat(const QString &spec)
Definition profileplotoptions.cpp:191
AxisNumberFormat
Definition profileplotoptions.h:48
@ Scientific4
Definition profileplotoptions.h:60
@ Decimals4
Definition profileplotoptions.h:53
@ SigFigs4
Definition profileplotoptions.h:56
@ Thousands2
Definition profileplotoptions.h:65
@ Scientific2
Definition profileplotoptions.h:58
@ SigFigs3
Definition profileplotoptions.h:55
@ Scientific3
Definition profileplotoptions.h:59
@ SigFigs6
Definition profileplotoptions.h:57
@ Decimals6
Definition profileplotoptions.h:54
@ Decimals2
Definition profileplotoptions.h:51
@ Engineering3
Definition profileplotoptions.h:62
@ Integer
Definition profileplotoptions.h:49
@ Decimals1
Definition profileplotoptions.h:50
@ ThousandsInteger
Definition profileplotoptions.h:63
@ Decimals3
Definition profileplotoptions.h:52
@ Thousands1
Definition profileplotoptions.h:64
@ Engineering2
Definition profileplotoptions.h:61
void setStorageFill(const QColor &c)
Definition profileplotoptions.cpp:213
QColor junctionOutline() const
Definition profileplotoptions.h:262
ProfilePlotOptions::GroundSource groundSource
Definition profileplotoptions.h:120
QPointF legendOffset() const
Definition profileplotoptions.h:300
bool showNodeLabels() const
Definition profileplotoptions.h:229
bool showLinkLabels() const
Definition profileplotoptions.h:230
QPointF legendOffset
Definition profileplotoptions.h:201
QColor outfallFill() const
Definition profileplotoptions.h:263
void setOutletFill(const QColor &c)
Definition profileplotoptions.cpp:227
QColor weirFill
Definition profileplotoptions.h:165
QPen virtualJunctionOutlinePen
Definition profileplotoptions.h:158
bool showNodeLabels
Definition profileplotoptions.h:96
void setMaxHglLinePen(const QPen &p)
Definition profileplotoptions.cpp:234
void setShowBranchStubs(bool v)
Definition profileplotoptions.cpp:196
QColor soilFill
Definition profileplotoptions.h:173
bool showLinkLabels
Definition profileplotoptions.h:97
bool maxHglBand
Definition profileplotoptions.h:90
QBrush streetInvertBrush() const
Definition profileplotoptions.h:295
bool inlineNodeLabels() const
Definition profileplotoptions.h:231
void setVirtualJunctionOutlinePen(const QPen &p)
Definition profileplotoptions.cpp:217
void setTimeLabelPosition(TimeLabelPosition p)
Definition profileplotoptions.cpp:256
ProfilePlotOptions::AxisNumberFormat yAxisNumberFormat
Definition profileplotoptions.h:111
QString yLabelFormat
Definition profileplotoptions.h:113
void setWeirFill(const QColor &c)
Definition profileplotoptions.cpp:223
QColor outletFill() const
Definition profileplotoptions.h:278
void setOutfallFill(const QColor &c)
Definition profileplotoptions.cpp:211
void setOutletOutline(const QColor &c)
Definition profileplotoptions.cpp:228
bool showTimeLabel
Definition profileplotoptions.h:204
QString timeLabelFormat() const
Definition profileplotoptions.h:306
TimeLabelPosition
Definition profileplotoptions.h:73
@ TimeBottomLeft
Definition profileplotoptions.h:74
@ TimeTopRight
Definition profileplotoptions.h:73
@ TimeTopLeft
Definition profileplotoptions.h:73
@ TimeBottomRight
Definition profileplotoptions.h:74
GroundSource
Ground-line source. Auto resolves to Mesh2D when the project has a 2D mesh layer, else NodeRims.
Definition profileplotoptions.h:79
@ NodeRims
Definition profileplotoptions.h:79
@ Auto
Definition profileplotoptions.h:79
@ TerrainDEM
Definition profileplotoptions.h:79
@ Mesh2D
Definition profileplotoptions.h:79
QString timeLabelFormat
Definition profileplotoptions.h:209
QPointF timeLabelOffset() const
Definition profileplotoptions.h:307
void setOrificeOutline(const QColor &c)
Definition profileplotoptions.cpp:226
QPen maxHglLinePen() const
Definition profileplotoptions.h:285
QColor dividerFill() const
Definition profileplotoptions.h:267
void setStorageOutline(const QColor &c)
Definition profileplotoptions.cpp:214
void setMaxEglLine(bool v)
Definition profileplotoptions.cpp:139
QColor soilFill() const
Definition profileplotoptions.h:280
QColor weirOutline
Definition profileplotoptions.h:166
void setLegendOpacity(double a)
Definition profileplotoptions.cpp:248
QColor conduitOutline() const
Definition profileplotoptions.h:271
QColor outletFill
Definition profileplotoptions.h:169
bool currentEgl
Definition profileplotoptions.h:89
void setShow2DInundation(bool v)
Definition profileplotoptions.cpp:193
void setMaxHglBand(bool v)
Definition profileplotoptions.cpp:137
QColor outfallFill
Definition profileplotoptions.h:146
void setLegendFont(const QFont &f)
Definition profileplotoptions.cpp:247
bool maxEglLine
Definition profileplotoptions.h:93
QColor outfallOutline() const
Definition profileplotoptions.h:264
void setLegendPosition(LegendPosition p)
Definition profileplotoptions.cpp:246
void setJunctionFill(const QColor &c)
Definition profileplotoptions.cpp:209
void setXLabelFormat(const QString &spec)
Definition profileplotoptions.cpp:185
void setConduitOutlinePen(const QPen &p)
Definition profileplotoptions.cpp:237
double legendOpacity() const
Definition profileplotoptions.h:299
bool legendVisible
Definition profileplotoptions.h:196
void setGroundSource(GroundSource s)
Definition profileplotoptions.cpp:192
ProfilePlotOptions::LegendPosition legendPosition
Definition profileplotoptions.h:198
bool maxHglBand() const
Definition profileplotoptions.h:226
void setMaxHglFillBrush(const QBrush &b)
Definition profileplotoptions.cpp:235
Q_INVOKABLE QString displayLabelFor(const QString &propertyName) const
Human-readable label QPropertyModel uses in the row header instead of the raw Q_PROPERTY name....
Definition profileplotoptions.cpp:47
QColor outletOutline() const
Definition profileplotoptions.h:279
void setXLabelFormatMode(LabelFormatMode m)
Definition profileplotoptions.cpp:150
bool showNodeRoses
Definition profileplotoptions.h:136
TimeLabelPosition timeLabelPosition() const
Definition profileplotoptions.h:303
QPen pumpOutlinePen() const
Definition profileplotoptions.h:291
LabelOrientation labelOrientation() const
Definition profileplotoptions.h:232
void setXAxisNumberFormat(AxisNumberFormat f)
Definition profileplotoptions.cpp:165
void setOrificeFill(const QColor &c)
Definition profileplotoptions.cpp:225
QColor junctionOutline
Definition profileplotoptions.h:145
bool currentHglFill() const
Definition profileplotoptions.h:224
QPointF timeLabelOffset
Definition profileplotoptions.h:210
bool maxHglLine() const
Definition profileplotoptions.h:227
void setDividerFill(const QColor &c)
Definition profileplotoptions.cpp:215
openswmmvis::plot::NumberFormat yFormat() const
Definition profileplotoptions.h:248
QColor dividerOutline() const
Definition profileplotoptions.h:268
QColor timeLabelColor() const
Definition profileplotoptions.h:304
ProfilePlotOptions::LabelOrientation labelOrientation
Definition profileplotoptions.h:100
void setConduitOutline(const QColor &c)
Definition profileplotoptions.cpp:220
QColor pumpFill
Definition profileplotoptions.h:163
bool legendVisible() const
Definition profileplotoptions.h:296
void setInundation2DFillBrush(const QBrush &b)
Definition profileplotoptions.cpp:195
openswmmvis::plot::NumberFormat xFormat() const
Current X/Y axis label format as the shared value type.
Definition profileplotoptions.h:246
QColor weirOutline() const
Definition profileplotoptions.h:275
LabelFormatMode yLabelFormatMode() const
Definition profileplotoptions.h:242
LabelOrientation
Definition profileplotoptions.h:32
@ Diagonal
Definition profileplotoptions.h:32
@ Vertical
Definition profileplotoptions.h:32
@ Horizontal
Definition profileplotoptions.h:32
ProfilePlotOptions::AxisNumberFormat xAxisNumberFormat
Definition profileplotoptions.h:107
double floodRadiusPx() const
Definition profileplotoptions.h:257
void setShowNodeRoses(bool v)
Definition profileplotoptions.cpp:197
QColor junctionFill() const
Definition profileplotoptions.h:261
void setJunctionOutline(const QColor &c)
Definition profileplotoptions.cpp:210
void setYLabelFormatMode(LabelFormatMode m)
Definition profileplotoptions.cpp:186
QColor beddingFill() const
Definition profileplotoptions.h:281
bool showTimeLabel() const
Definition profileplotoptions.h:302
LabelFormatMode
Axis label number mode; values mirror openswmmvis::plot::NumberFormatMode (0=Decimals,...
Definition profileplotoptions.h:38
@ Scientific
Definition profileplotoptions.h:39
@ Engineering
Definition profileplotoptions.h:39
@ Decimals
Definition profileplotoptions.h:38
@ Thousands
Definition profileplotoptions.h:39
@ SignificantFigures
Definition profileplotoptions.h:38
QBrush inundation2DFillBrush() const
Definition profileplotoptions.h:253
QColor pumpFill() const
Definition profileplotoptions.h:272
void setStreetInvertBrush(const QBrush &b)
Definition profileplotoptions.cpp:242
QColor conduitFill
Definition profileplotoptions.h:161
QPen orificeOutlinePen
Definition profileplotoptions.h:189
bool show2DInundation() const
Definition profileplotoptions.h:251
void setFloodColor(const QColor &c)
Definition profileplotoptions.cpp:206
QPen outletOutlinePen() const
Definition profileplotoptions.h:292
void setEglLinePen(const QPen &p)
Definition profileplotoptions.cpp:233
bool show2DInundation
Definition profileplotoptions.h:127
void setLabelOrientation(LabelOrientation o)
Definition profileplotoptions.cpp:145
QFont legendFont
Definition profileplotoptions.h:199
void setShowNodeLabels(bool v)
Definition profileplotoptions.cpp:142
int floodSweepDeg() const
Definition profileplotoptions.h:258
void setWeirOutlinePen(const QPen &p)
Definition profileplotoptions.cpp:239
double legendOpacity
Definition profileplotoptions.h:200
void setFloodSweepDeg(int deg)
Definition profileplotoptions.cpp:202
LabelFormatMode xLabelFormatMode() const
Definition profileplotoptions.h:239
QColor timeLabelColor
Definition profileplotoptions.h:207
void setOrificeOutlinePen(const QPen &p)
Definition profileplotoptions.cpp:238
QColor floodColor
Definition profileplotoptions.h:141
QPen orificeOutlinePen() const
Definition profileplotoptions.h:289
QPen hglLinePen() const
Definition profileplotoptions.h:282
void setCurrentEgl(bool v)
Definition profileplotoptions.cpp:136
void setConduitFill(const QColor &c)
Definition profileplotoptions.cpp:219
QBrush hglFillBrush
Definition profileplotoptions.h:181
LegendPosition
Definition profileplotoptions.h:69
@ BottomLeft
Definition profileplotoptions.h:70
@ BottomRight
Definition profileplotoptions.h:70
@ TopRight
Definition profileplotoptions.h:69
@ TopLeft
Definition profileplotoptions.h:69
QString yLabelFormat() const
Definition profileplotoptions.h:244
bool maxHglLine
Definition profileplotoptions.h:91
QColor storageOutline() const
Definition profileplotoptions.h:266
void setTimeLabelColor(const QColor &c)
Definition profileplotoptions.cpp:257
double floodRadiusPx
Definition profileplotoptions.h:139
int yLabelPrecision() const
Definition profileplotoptions.h:243
QColor floodColor() const
Definition profileplotoptions.h:259
QPen pumpOutlinePen
Definition profileplotoptions.h:191
int labelAngleDeg() const
Definition profileplotoptions.h:233
void setTimeLabelFormat(const QString &fmt)
Definition profileplotoptions.cpp:259
void setPumpOutline(const QColor &c)
Definition profileplotoptions.cpp:222
void setShowLinkLabels(bool v)
Definition profileplotoptions.cpp:143
void setPumpOutlinePen(const QPen &p)
Definition profileplotoptions.cpp:240
QBrush inundation2DFillBrush
Definition profileplotoptions.h:129
QPen inundation2DLinePen() const
Definition profileplotoptions.h:252
bool inlineNodeLabels
Definition profileplotoptions.h:98
bool currentHglFill
Definition profileplotoptions.h:88
void setShowTimeLabel(bool v)
Definition profileplotoptions.cpp:255
QColor storageFill
Definition profileplotoptions.h:148
QPen eglLinePen
Definition profileplotoptions.h:182
void setYAxisNumberFormat(AxisNumberFormat f)
Definition profileplotoptions.cpp:174
void setMaxEglLinePen(const QPen &p)
Definition profileplotoptions.cpp:236
QPen inundation2DLinePen
Definition profileplotoptions.h:128
int floodSweepDeg
Definition profileplotoptions.h:140
QFont timeLabelFont() const
Definition profileplotoptions.h:305
QColor orificeFill
Definition profileplotoptions.h:167
void setInundation2DLinePen(const QPen &p)
Definition profileplotoptions.cpp:194
bool currentEgl() const
Definition profileplotoptions.h:225
void setPumpFill(const QColor &c)
Definition profileplotoptions.cpp:221
QBrush hglFillBrush() const
Definition profileplotoptions.h:283
QColor dividerOutline
Definition profileplotoptions.h:151
void setHglFillBrush(const QBrush &b)
Definition profileplotoptions.cpp:232
void setCurrentHglFill(bool v)
Definition profileplotoptions.cpp:135
QColor dividerFill
Definition profileplotoptions.h:150
QString xLabelFormat() const
Definition profileplotoptions.h:241
QString xLabelFormat
Definition profileplotoptions.h:109
QColor conduitFill() const
Definition profileplotoptions.h:270
void setOutletOutlinePen(const QPen &p)
Definition profileplotoptions.cpp:241
QPen virtualJunctionOutlinePen() const
Definition profileplotoptions.h:269
bool showBranchStubs() const
Definition profileplotoptions.h:254
QPen weirOutlinePen() const
Definition profileplotoptions.h:290
GroundSource groundSource() const
Definition profileplotoptions.h:250
bool showBranchStubs
Definition profileplotoptions.h:135
QColor beddingFill
Definition profileplotoptions.h:174
QColor orificeOutline
Definition profileplotoptions.h:168
QColor storageOutline
Definition profileplotoptions.h:149
QPen hglLinePen
Definition profileplotoptions.h:180
int labelAngleDeg
Definition profileplotoptions.h:101
QFont legendFont() const
Definition profileplotoptions.h:298
QPen maxEglLinePen() const
Definition profileplotoptions.h:287
void setSoilFill(const QColor &c)
Definition profileplotoptions.cpp:229
bool showNodeRoses() const
Definition profileplotoptions.h:255
void setTimeLabelFont(const QFont &f)
Definition profileplotoptions.cpp:258
void setXLabelPrecision(int count)
Definition profileplotoptions.cpp:181
QColor orificeFill() const
Definition profileplotoptions.h:276
QColor weirFill() const
Definition profileplotoptions.h:274
QBrush streetInvertBrush
Definition profileplotoptions.h:193
void setCurrentHglLine(bool v)
Definition profileplotoptions.cpp:134
QPen outletOutlinePen
Definition profileplotoptions.h:192
QColor junctionFill
Definition profileplotoptions.h:144
void setYLabelPrecision(int count)
Definition profileplotoptions.cpp:187
void setOutfallOutline(const QColor &c)
Definition profileplotoptions.cpp:212
QPen conduitOutlinePen
Definition profileplotoptions.h:188
void setTimeLabelOffset(const QPointF &p)
Definition profileplotoptions.cpp:260
void setHglLinePen(const QPen &p)
Definition profileplotoptions.cpp:231
void setLegendOffset(const QPointF &p)
Definition profileplotoptions.cpp:252
QBrush maxHglFillBrush() const
Definition profileplotoptions.h:286
void setMaxHglLine(bool v)
Definition profileplotoptions.cpp:138
void setFloodRadiusPx(double r)
Definition profileplotoptions.cpp:198
QPen eglLinePen() const
Definition profileplotoptions.h:284
QPen maxHglLinePen
Definition profileplotoptions.h:185
double s
Scene px per model length unit.
Definition inletdrawingview.cpp:82
ArrowPlacement p
Definition linesymbollayer.cpp:27
MaskMode m
Definition maskspec.cpp:18
int b
local residual indices, a < b
Definition meshquadmatch.cpp:46
int a
Definition meshquadmatch.cpp:46
NumberFormatMode
Interpretation of NumberFormat::count.
Definition numberformat.h:32
int count
Definition numberformat.cpp:101
Single source of truth for how chart plots render numeric values.
QVector< int > v
pool vertex indices
Definition pslgminsize.cpp:159
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
A mode + count describing how to render a double.
Definition numberformat.h:41