QtCraft API C++ classes QML types Handbook

QcHandbookLinks Class

Titles, icons and entry ids of content in the handbook, and links to their entries. More...

Header: #include <common/handbook/QcHandbookLinks.h>

Public Types

Link

Public Functions

QString basePack() const
QString biomeIcon(const QcBiomeDefinition &biome) const
QcHandbookLinks::Link biomeLink(const QcBiomeDefinition &biome, const QString &note = {}) const
QcHandbookLinks::Link blockLink(const QString &block, const QString &note = {}) const
QString featureIcon(const QcFeatureDefinition &feature) const
QcHandbookLinks::Link featureLink(const QcFeatureDefinition &feature, const QString &note = {}) const
QString featureTitle(const QcFeatureDefinition &feature, const QString &language) const
bool hasBlockEntry(const QString &name) const
QcHandbookLinks::Link ingredientLink(const QString &ingredient) const
QString itemEntryId(const QString &item) const
QString itemIcon(const QString &item) const
QcHandbookLinks::Link itemLink(const QString &item, const QString &note = {}) const
QString itemOrMobIcon(const QString &name) const
QString itemTitle(const QString &item, const QString &language) const
QcHandbookLinks::Link mobLink(const QcMobDefinition &mob, const QString &note = {}) const
QcHandbookLinks::Link oreLink(const QcOreDefinition &ore, const QString &note = {}) const
QString oreTitle(const QcOreDefinition &ore, const QString &language) const
QcHandbookLinks::Link tableLink(const QString &table) const
QcHandbookLinks::Link tagLink(const QString &tag) const
const QMap<QString, QStringList> &tagMembers() const
QString tagTitle(const QString &tag, const QString &language) const

Static Public Members

QString humanized(const QString &name)
QString localPart(const QString &name)
QString mobIcon(const QString &mob)
QString packOf(const QString &name)
QList<QcHandbookLinks::Link> sortedLinks(QList<QcHandbookLinks::Link> links)

Detailed Description

Member Type Documentation

A link to an entry.

Member Function Documentation

QString QcHandbookLinks::basePack() const

Returns the pack of the overviews: the first loaded pack (the base game).

QString QcHandbookLinks::biomeIcon(const QcBiomeDefinition &biome) const

Returns the icon of biome: its icon item, else its surface block.

Returns the link to the entry of biome with note, with its icon (biomeIcon()).

Returns the link to the entry of block with note (as itemLink()).

QString QcHandbookLinks::featureIcon(const QcFeatureDefinition &feature) const

Returns the icon of feature: its icon item, else its trunk or block (a liquid's bucket).

Returns the link to the entry of feature with note, with its icon (featureIcon()).

QString QcHandbookLinks::featureTitle(const QcFeatureDefinition &feature, const QString &language) const

Returns the title of feature in language; its humanized name without a translation.

bool QcHandbookLinks::hasBlockEntry(const QString &name) const

Returns whether the block name has an entry (it exists and is not invisible).

[static] QString QcHandbookLinks::humanized(const QString &name)

Returns the local part of name as words, the first capitalised ("oak_tree" -> "Oak tree"): the last resort for content without a translated name.

Returns the link of a recipe's ingredient: a tag for "#tag", else an item.

QString QcHandbookLinks::itemEntryId(const QString &item) const

Returns the entry id of item: its block's entry when it has one, else its item entry; empty for unknown names.

QString QcHandbookLinks::itemIcon(const QString &item) const

Returns item when it is an item of the content (its icon), else empty.

Returns the link to the entry of item with note; a liquid shows its bucket.

QString QcHandbookLinks::itemOrMobIcon(const QString &name) const

Returns the icon of a handbook chapter that names name: the item of that name, else the creature of that name (mobIcon()), else empty.

QString QcHandbookLinks::itemTitle(const QString &item, const QString &language) const

Returns the translated name of the item or block item in language; the name itself when unknown.

[static] QString QcHandbookLinks::localPart(const QString &name)

Returns the content name name without its namespace.

[static] QString QcHandbookLinks::mobIcon(const QString &mob)

Returns the icon name of the creature mob ("mob:" and its name, a name no item can have): the picture of its model, which the icon sets draw for every creature (decision E-944).

Returns the link to the entry of mob with note, with its picture (mobIcon()).

Returns the link to the entry of ore with note, with the icon of its block.

QString QcHandbookLinks::oreTitle(const QcOreDefinition &ore, const QString &language) const

Returns the title of ore in language, made from its block's name.

[static] QString QcHandbookLinks::packOf(const QString &name)

Returns the namespace of the content name name (the pack it belongs to); empty without one.

Returns links sorted by text (as compared by the search), then by target.

Returns the link to the overview table table ("fuels", ...).

Returns the link to the entry of tag, with the icon of its plainest member: the one with the shortest name, the first in content order of equally short ones (decision E-944).

const QMap<QString, QStringList> &QcHandbookLinks::tagMembers() const

Returns the tag (without '#') -> member items in content order.

QString QcHandbookLinks::tagTitle(const QString &tag, const QString &language) const

Returns the title of tag in language; "#" and its local part without a translation.