Na ovoj stranici

Utils::Id Class

class Utils::Id

Klasa Id obuhvaća identifikator koji je jedinstven unutar određenog procesa izvođenja Qt Creator a. Više...

Header: #include <utils/id.h>

Javne funkcije

QByteArrayView name() const
QString suffixAfter(Utils::Id baseId) const
QVariant toSetting() const
QString toString() const
Utils::Id withPrefix(const char *prefix) const
Utils::Id withSuffix(qsizetype suffix) const
Utils::Id withSuffix(QStringView suffix) const
Utils::Id withSuffix(char suffix) const
Utils::Id withSuffix(const char *suffix) const
Utils::Id withSuffix(int suffix) const

Statični javni članovi

Utils::Id fromSetting(const QVariant &variant)

Detaljan opis

Utils::Id koristi se kao sredstvo za identifikaciju objekata od interesa na tipski sigurniji i brži način nego što bi to omogućili obični QString ili QByteArray.

ID je povezan s običnim 7-bitno čistim ASCII nazivom koji se koristi za prikaz i trajnost.

Dokumentacija funkcija člana

[static] Utils::Id Id::fromSetting(const QVariant &variant)

Rekonstruira ID iz trajne vrijednosti variant.

Vidi također toSetting().

QByteArrayView Id::name() const

Vraća internu reprezentaciju ID-a.

QString Id::suffixAfter(Utils::Id baseId) const

Izvlači dio reprezentacije ID-a u nizu. Ova se funkcija može koristiti za odvajanje osnovnog dijela koji je specificiran pomoću baseId, a koji se koristi pri generiranju ID-a pomoću withSuffix().

Vidi također withSuffix().

QVariant Id::toSetting() const

Vraća trajnu vrijednost koja predstavlja ID prikladan za pohranu u QSettings.

Vidi također fromSetting().

QString Id::toString() const

Vraća niz znakova ID-a prikladan za prikaz u korisničkom sučelju.

Ovo se ne bi smjelo koristiti za stvaranje trajne verzije ID-a, umjesto toga upotrijebite toSetting().

Vidi također fromString() i toSetting().

Utils::Id Id::withPrefix(const char *prefix) const

Konstruira izvedeni ID.

Ovo se može koristiti za izgradnju grupa ID-ova koje logički pripadaju zajedno. Povezano interno ime generirat će se dodavanjem prefiksa prefix.

Utils::Id Id::withSuffix(qsizetype suffix) const

Konstruira izvedeni ID.

Ovo se može koristiti za formiranje grupa ID-ova koje logički pripadaju zajedno. Povezano interno ime generirat će se dodavanjem " suffix".

Utils::Id Id::withSuffix(QStringView suffix) const

Ovo je preopterećena funkcija.

Utils::Id Id::withSuffix(char suffix) const

Ovo je preopterećena funkcija.

Utils::Id Id::withSuffix(const char *suffix) const

Ovo je preopterećena funkcija.

Utils::Id Id::withSuffix(int suffix) const

Ovo je preopterećena funkcija.

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.