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
Public Functions
| QString | basePack() const |
| QString | biomeIcon(const QcBiomeDefinition &biome) const |
| QcHandbookLinks::Link | biomeLink(const QcBiomeDefinition &biome, const QString ¬e = {}) const |
| QcHandbookLinks::Link | blockLink(const QString &block, const QString ¬e = {}) const |
| QString | featureIcon(const QcFeatureDefinition &feature) const |
| QcHandbookLinks::Link | featureLink(const QcFeatureDefinition &feature, const QString ¬e = {}) 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 ¬e = {}) const |
| QString | itemOrMobIcon(const QString &name) const |
| QString | itemTitle(const QString &item, const QString &language) const |
| QcHandbookLinks::Link | mobLink(const QcMobDefinition &mob, const QString ¬e = {}) const |
| QcHandbookLinks::Link | oreLink(const QcOreDefinition &ore, const QString ¬e = {}) 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
[alias] QcHandbookLinks::Link
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.
QcHandbookLinks::Link QcHandbookLinks::biomeLink(const QcBiomeDefinition &biome, const QString ¬e = {}) const
Returns the link to the entry of biome with note, with its icon (biomeIcon()).
QcHandbookLinks::Link QcHandbookLinks::blockLink(const QString &block, const QString ¬e = {}) const
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).
QcHandbookLinks::Link QcHandbookLinks::featureLink(const QcFeatureDefinition &feature, const QString ¬e = {}) const
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.
QcHandbookLinks::Link QcHandbookLinks::ingredientLink(const QString &ingredient) const
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.
QcHandbookLinks::Link QcHandbookLinks::itemLink(const QString &item, const QString ¬e = {}) const
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).
QcHandbookLinks::Link QcHandbookLinks::mobLink(const QcMobDefinition &mob, const QString ¬e = {}) const
Returns the link to the entry of mob with note, with its picture (mobIcon()).
QcHandbookLinks::Link QcHandbookLinks::oreLink(const QcOreDefinition &ore, const QString ¬e = {}) const
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.
[static] QList<QcHandbookLinks::Link> QcHandbookLinks::sortedLinks(QList<QcHandbookLinks::Link> links)
Returns links sorted by text (as compared by the search), then by target.
QcHandbookLinks::Link QcHandbookLinks::tableLink(const QString &table) const
Returns the link to the overview table table ("fuels", ...).
QcHandbookLinks::Link QcHandbookLinks::tagLink(const QString &tag) const
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.