QcVillageLayoutParser Namespace
The street plans of a village style (decision E-408): layouts in villages/*.json, a list of weighted kinds with their parameters, and the defaults of each kind and of a style without the field. More...
| Header: | #include <common/content/villages/QcVillageLayoutParser.h> |
Functions
| QList<QcVillageLayout> | defaultLayouts() |
| QcVillageLayout | defaults(QcVillageLayout::Kind kind) |
| QString | kindName(QcVillageLayout::Kind kind) |
| std::optional<QcVillageLayout::Kind> | kindNamed(const QString &name) |
| QList<QcVillageLayout> | read(const QJsonObject &style, QcJsonFieldReader &reader) |
Detailed Description
Function Documentation
QList<QcVillageLayout> QcVillageLayoutParser::defaultLayouts()
Returns the mix a style without layouts is laid out with.
QcVillageLayout QcVillageLayoutParser::defaults(QcVillageLayout::Kind kind)
Returns a layout of kind kind with the kind's own parameters.
QString QcVillageLayoutParser::kindName(QcVillageLayout::Kind kind)
Returns the name of kind in data ("cross", "street", "t", "l", "plaza", "tree").
std::optional<QcVillageLayout::Kind> QcVillageLayoutParser::kindNamed(const QString &name)
Returns the kind called name in data; none for an unknown name.
QList<QcVillageLayout> QcVillageLayoutParser::read(const QJsonObject &style, QcJsonFieldReader &reader)
Returns the layouts of the style object style (1 to maxLayouts entries); the defaults when it has none. Fails reader on a broken entry.