![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Classes | |
| struct | Feature |
| One editable feature: identity, geometry, attributes. More... | |
| class | FeatureGeometry |
| A complete feature geometry: a type plus zero or more parts. More... | |
| class | FeatureStore |
| One open, writable OGR table inside a GeoPackage. More... | |
| struct | FieldDef |
| One user-defined attribute column. More... | |
| struct | Part |
| One part of a geometry: a polygon (exterior + holes), a line run, or a single point. More... | |
| struct | Ring |
| One ordered run of vertices, with optional per-vertex Z. More... | |
| class | Schema |
| An ordered list of FieldDef, with name lookup. More... | |
Typedefs | |
| using | FeatureId = qint64 |
Enumerations | |
| enum class | GeometryType { None = 0 , Point , LineString , Polygon , MultiPoint , MultiLineString , MultiPolygon } |
| Geometry kinds an editable feature layer can hold. More... | |
| enum class | FieldType { Text = 0 , Integer , Real , Boolean } |
| The attribute types an authored schema may declare. More... | |
Functions | |
| QString | geometryTypeLabel (GeometryType t) |
Human label for t, for combo boxes and metadata rows. | |
| QString | geometryTypeToken (GeometryType t) |
Stable token for t, for .oswp persistence. Round-trips through geometryTypeFromToken. | |
| GeometryType | geometryTypeFromToken (const QString &token) |
| Inverse of geometryTypeToken; GeometryType::None when unknown. | |
| bool | isMultiType (GeometryType t) |
True when t is one of the Multi* kinds. | |
| GeometryType | toMultiType (GeometryType t) |
The Multi* kind corresponding to t (identity for Multi* inputs). | |
| QString | fieldTypeLabel (FieldType t) |
| QString | fieldTypeToken (FieldType t) |
| FieldType | fieldTypeFromToken (const QString &token) |
| int | ogrFieldTypeFor (FieldType t) |
| QVariant | coerceToFieldType (const QVariant &v, FieldType t) |
| QString | sanitizeFieldName (const QString &raw) |
Make raw safe as an OGR/GeoPackage column name: ASCII letters, digits and underscore, never starting with a digit, at most 63 characters, never one of the reserved names ("fid", "geom"). | |
| QString | sanitizeTableName (const QString &raw) |
Make raw safe as a GeoPackage table name, on the same rules as sanitizeFieldName plus a "fl_" prefix when raw would otherwise start with a digit. | |
Variables | |
| constexpr FeatureId | kInvalidFeatureId = -1 |
| using openswmmvis::feature::FeatureId = typedef qint64 |
Feature id. Mirrors OGR's GIntBig FID. -1 means "not yet stored".
|
strong |
The attribute types an authored schema may declare.
Deliberately small: these four cover every role template in plan ยง6 and map 1:1 onto both OGR field types and QVariant. Adding a type means touching the OGR mapping, the property adapter editor, and the table delegate together.
| Enumerator | |
|---|---|
| Text | |
| Integer | |
| Real | |
| Boolean | |
|
strong |
Geometry kinds an editable feature layer can hold.
A layer declares one type at creation; it decides the OGR geometry type of the GeoPackage table and therefore cannot change afterwards. The Multi* variants accept single-part geometries too (a one-part multi-polygon), so "Add part" can promote a drawing without a table migration.
| Enumerator | |
|---|---|
| None | |
| Point | |
| LineString | |
| Polygon | |
| MultiPoint | |
| MultiLineString | |
| MultiPolygon | |
| QVariant openswmmvis::feature::coerceToFieldType | ( | const QVariant & | v, |
| FieldType | t | ||
| ) |
Coerce v to t, returning a default-constructed value of the right type when the conversion fails. Never returns an invalid QVariant.
| FieldType openswmmvis::feature::fieldTypeFromToken | ( | const QString & | token | ) |
| QString openswmmvis::feature::fieldTypeLabel | ( | FieldType | t | ) |
| QString openswmmvis::feature::fieldTypeToken | ( | FieldType | t | ) |
| GeometryType openswmmvis::feature::geometryTypeFromToken | ( | const QString & | token | ) |
Inverse of geometryTypeToken; GeometryType::None when unknown.
| QString openswmmvis::feature::geometryTypeLabel | ( | GeometryType | t | ) |
Human label for t, for combo boxes and metadata rows.
| QString openswmmvis::feature::geometryTypeToken | ( | GeometryType | t | ) |
Stable token for t, for .oswp persistence. Round-trips through geometryTypeFromToken.
| bool openswmmvis::feature::isMultiType | ( | GeometryType | t | ) |
True when t is one of the Multi* kinds.
| int openswmmvis::feature::ogrFieldTypeFor | ( | FieldType | t | ) |
The OGRFieldType constant for t (Boolean is an integer with a subtype; see FeatureStore::createLayer, which sets OFSTBoolean).
| QString openswmmvis::feature::sanitizeFieldName | ( | const QString & | raw | ) |
Make raw safe as an OGR/GeoPackage column name: ASCII letters, digits and underscore, never starting with a digit, at most 63 characters, never one of the reserved names ("fid", "geom").
raw contains no usable character. | QString openswmmvis::feature::sanitizeTableName | ( | const QString & | raw | ) |
Make raw safe as a GeoPackage table name, on the same rules as sanitizeFieldName plus a "fl_" prefix when raw would otherwise start with a digit.
| GeometryType openswmmvis::feature::toMultiType | ( | GeometryType | t | ) |
The Multi* kind corresponding to t (identity for Multi* inputs).
|
inlineconstexpr |