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
joinspec.h
Go to the documentation of this file.
1
29#ifndef OPENSWMM_RENDER_JOINSPEC_H
30#define OPENSWMM_RENDER_JOINSPEC_H
31
32#include <QJsonObject>
33#include <QString>
34#include <QStringList>
35
36namespace OpenSWMM::Render
37{
38
44{
48 bool enabled = false;
49
52 QString sourcePath;
53
57
60
63
66 QStringList joinFields;
67
71 QString fieldPrefix;
72
73 [[nodiscard]] QJsonObject toJson() const;
74 static JoinSpec fromJson(const QJsonObject &j);
75
76 [[nodiscard]] bool operator==(const JoinSpec &other) const;
77 [[nodiscard]] bool operator!=(const JoinSpec &other) const
78 { return !(*this == other); }
79};
80
81} // namespace OpenSWMM::Render
82
83#endif // OPENSWMM_RENDER_JOINSPEC_H
Definition gisrasterlayer.h:40
One external-table join.
Definition joinspec.h:44
QString fieldPrefix
Prefix applied to joined field names on the host layer (e.g. "obs_" → joined "depth" becomes "obs_dep...
Definition joinspec.h:71
bool enabled
Master switch — when false, the join isn't applied at paint / Identify time (but stays defined for la...
Definition joinspec.h:48
QString sourcePath
Filesystem path to the source data. Relative paths are resolved against the project directory at runt...
Definition joinspec.h:52
QJsonObject toJson() const
Definition joinspec.cpp:16
QString sourceKeyField
Column name in the source that matches targetKeyField.
Definition joinspec.h:59
QStringList joinFields
Names of fields to import from the source. When empty, every non-key column is imported.
Definition joinspec.h:66
QString targetKeyField
Attribute name on the host layer to match.
Definition joinspec.h:62
static JoinSpec fromJson(const QJsonObject &j)
Definition joinspec.cpp:40
QString sourceLayerName
Source layer / sheet name (for multi-table sources like SQLite). Empty for single-table sources (CSV/...
Definition joinspec.h:56
bool operator!=(const JoinSpec &other) const
Definition joinspec.h:77
bool operator==(const JoinSpec &other) const
Definition joinspec.cpp:56