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
featuretypes.h File Reference
#include "feature/featuregeometry.h"
#include <QJsonObject>
#include <QString>
#include <QStringList>
#include <QVariant>
#include <QVariantMap>
#include <QVector>
Include dependency graph for featuretypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmmvis::feature::FieldDef
 One user-defined attribute column. More...
 
class  openswmmvis::feature::Schema
 An ordered list of FieldDef, with name lookup. More...
 
struct  openswmmvis::feature::Feature
 One editable feature: identity, geometry, attributes. More...
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::feature
 

Typedefs

using openswmmvis::feature::FeatureId = qint64
 

Enumerations

enum class  openswmmvis::feature::FieldType {
  openswmmvis::feature::Text = 0 ,
  openswmmvis::feature::Integer ,
  openswmmvis::feature::Real ,
  openswmmvis::feature::Boolean
}
 The attribute types an authored schema may declare. More...
 

Functions

QString openswmmvis::feature::fieldTypeLabel (FieldType t)
 
QString openswmmvis::feature::fieldTypeToken (FieldType t)
 
FieldType openswmmvis::feature::fieldTypeFromToken (const QString &token)
 
int openswmmvis::feature::ogrFieldTypeFor (FieldType t)
 
QVariant openswmmvis::feature::coerceToFieldType (const QVariant &v, FieldType t)
 
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").
 
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.
 

Variables

constexpr FeatureId openswmmvis::feature::kInvalidFeatureId = -1
 

Detailed Description

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Schema and feature value types for editable feature layers (workplans/MESH_DIALOG_TABS_AND_FEATURE_LAYERS_PLAN_2026-09-07.md ยง3.1).

The repo has no runtime-defined attribute schema today: the 32 property adapters in include/ui/properties/ are hand-written against fixed property sets, SWMMAttributeTableModel::ColumnSpec is a compile-time table, and GISVectorLayer::identifyAt returns QVariantMap as read-only OUTPUT. FieldDef / Schema are the first field descriptors the user can author, and Feature is the first value type that owns a QVariantMap of attributes.