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
markershape.h
Go to the documentation of this file.
1
23#ifndef OPENSWMM_RENDER_MARKERSHAPE_H
24#define OPENSWMM_RENDER_MARKERSHAPE_H
25
26#include <QMetaType>
27#include <QObject>
28#include <QString>
29
30class QBrush;
31class QPainter;
32class QPen;
33class QPointF;
34
35namespace OpenSWMM::Render
36{
37
38// Q_NAMESPACE + Q_ENUM_NS exposes MarkerShape to the meta-object system
39// so QPropertyModel surfaces it as a named enum and Q_PROPERTY()
40// declarations can refer to it by type.
41Q_NAMESPACE
42
53enum class MarkerShape : int {
54 Circle = 0,
55 Square = 1,
56 Triangle = 2,
57 Diamond = 3,
58 Star = 4,
59 Cross = 5,
60 Plus = 6,
61 XCross = 7,
62 Pentagon = 8,
63 Hexagon = 9,
64 Arrow = 10,
66 HalfCircle = 12,
67 // Appended set (stable values; future shapes append at the end).
68 TriangleDown = 13,
69 Octagon = 14,
70 Hexagram = 15,
71 ArrowUp = 16,
72 ArrowDown = 17,
73 ArrowLeft = 18
74};
75Q_ENUM_NS(MarkerShape)
76
77
78[[nodiscard]] QString markerShapeToString(MarkerShape shape);
79
82[[nodiscard]] MarkerShape markerShapeFromString(const QString &s);
83
95void drawMarkerShape(QPainter *painter,
97 const QPointF &center,
98 qreal sizePx,
99 const QBrush &fillBrush,
100 const QPen &outlinePen,
101 qreal rotationDeg = 0.0);
102
103} // namespace OpenSWMM::Render
104
105Q_DECLARE_METATYPE(OpenSWMM::Render::MarkerShape)
106
107#endif // OPENSWMM_RENDER_MARKERSHAPE_H
double s
Scene px per model length unit.
Definition inletdrawingview.cpp:82
MarkerShape shape
Definition markershape.cpp:27
Definition gisrasterlayer.h:40
void drawMarkerShape(QPainter *painter, MarkerShape shape, const QPointF &center, qreal sizePx, const QBrush &fillBrush, const QPen &outlinePen, qreal rotationDeg=0.0)
Render shape into painter centred at center with the outer extent sizePx, filled with fillBrush and s...
Definition markershape.cpp:97
MarkerShape markerShapeFromString(const QString &s)
Definition markershape.cpp:89
QString markerShapeToString(MarkerShape shape)
Definition markershape.cpp:81
MarkerShape
13 canonical marker shapes the Rule Model's Marker Symbol Layer supports (per RENDERING_RULE_MODEL_PL...
Definition markershape.h:53