An ordered list of FieldDef, with name lookup.
More...
#include <featuretypes.h>
An ordered list of FieldDef, with name lookup.
Field order is the column order in the attribute table and the row order in the property panel, so it is preserved exactly as authored.
◆ Schema()
| openswmmvis::feature::Schema::Schema |
( |
| ) |
|
|
default |
◆ append()
| bool openswmmvis::feature::Schema::append |
( |
const FieldDef & |
f | ) |
|
Append f. Fails (returns false) when the name is empty or already present — name collisions are a user error the schema editor reports, not something to silently rename.
◆ at()
| FieldDef openswmmvis::feature::Schema::at |
( |
int |
i | ) |
const |
◆ clear()
| void openswmmvis::feature::Schema::clear |
( |
| ) |
|
|
inline |
◆ conform()
| QVariantMap openswmmvis::feature::Schema::conform |
( |
const QVariantMap & |
attrs | ) |
const |
Drop keys not in the schema and coerce the rest to their declared types. Called before every write so a stale attribute map from an undo record cannot reintroduce a removed column.
◆ contains()
| bool openswmmvis::feature::Schema::contains |
( |
const QString & |
name | ) |
const |
|
inline |
◆ count()
| int openswmmvis::feature::Schema::count |
( |
| ) |
const |
|
inline |
◆ defaultAttributes()
| QVariantMap openswmmvis::feature::Schema::defaultAttributes |
( |
| ) |
const |
A QVariantMap with every field at its default (or a type-appropriate empty value), for a newly drawn feature.
◆ field()
| const FieldDef * openswmmvis::feature::Schema::field |
( |
const QString & |
name | ) |
const |
◆ fields()
| const QVector< FieldDef > & openswmmvis::feature::Schema::fields |
( |
| ) |
const |
|
inline |
◆ fromJson()
| Schema openswmmvis::feature::Schema::fromJson |
( |
const QJsonObject & |
o | ) |
|
|
static |
◆ indexOf()
| int openswmmvis::feature::Schema::indexOf |
( |
const QString & |
name | ) |
const |
◆ isEmpty()
| bool openswmmvis::feature::Schema::isEmpty |
( |
| ) |
const |
|
inline |
◆ names()
| QStringList openswmmvis::feature::Schema::names |
( |
| ) |
const |
◆ operator!=()
| bool openswmmvis::feature::Schema::operator!= |
( |
const Schema & |
o | ) |
const |
|
inline |
◆ operator==()
| bool openswmmvis::feature::Schema::operator== |
( |
const Schema & |
o | ) |
const |
|
inline |
◆ remove()
| bool openswmmvis::feature::Schema::remove |
( |
const QString & |
name | ) |
|
◆ replace()
| bool openswmmvis::feature::Schema::replace |
( |
const QString & |
name, |
|
|
const FieldDef & |
f |
|
) |
| |
◆ toJson()
| QJsonObject openswmmvis::feature::Schema::toJson |
( |
| ) |
const |
The documentation for this class was generated from the following files: