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
maskspec.h
Go to the documentation of this file.
1
26#ifndef OPENSWMM_RENDER_MASKSPEC_H
27#define OPENSWMM_RENDER_MASKSPEC_H
28
29#include <QJsonObject>
30#include <QString>
31
32namespace OpenSWMM::Render
33{
34
39enum class MaskMode : int {
40 ClipInside = 0,
41 ClipOutside = 1,
42};
43
44[[nodiscard]] QString maskModeToString(MaskMode m);
45[[nodiscard]] MaskMode maskModeFromString(const QString &s);
46
52{
54 bool enabled = false;
55
61
64
65 [[nodiscard]] QJsonObject toJson() const;
66 static MaskSpec fromJson(const QJsonObject &j);
67
68 [[nodiscard]] bool operator==(const MaskSpec &other) const;
69 [[nodiscard]] bool operator!=(const MaskSpec &other) const
70 { return !(*this == other); }
71};
72
73} // namespace OpenSWMM::Render
74
75#endif // OPENSWMM_RENDER_MASKSPEC_H
double s
Scene px per model length unit.
Definition inletdrawingview.cpp:82
MaskMode m
Definition maskspec.cpp:18
Definition gisrasterlayer.h:40
MaskMode
Which side of the polygon source layer paints.
Definition maskspec.h:39
MaskMode maskModeFromString(const QString &s)
Definition maskspec.cpp:33
QString maskModeToString(MaskMode m)
Definition maskspec.cpp:26
Per-layer mask configuration.
Definition maskspec.h:52
bool enabled
Master switch. When false, paint is unmasked.
Definition maskspec.h:54
bool operator!=(const MaskSpec &other) const
Definition maskspec.h:69
MaskMode mode
Which side paints.
Definition maskspec.h:63
static MaskSpec fromJson(const QJsonObject &j)
Definition maskspec.cpp:52
QString sourceLayerId
Layer id of the polygon source. Empty when no source has been picked yet — paint falls through to unm...
Definition maskspec.h:60
QJsonObject toJson() const
Definition maskspec.cpp:40
bool operator==(const MaskSpec &other) const
Definition maskspec.cpp:62