Utils::Id Class
class Utils::IdLa classe `Id` incapsula un identificatore univoco all'interno di uno specifico processo in esecuzione di Qt Creator. Per saperne di più...
| Header: | #include <utils/id.h> |
Funzioni pubbliche
| 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 |
Membri pubblici statici
| Utils::Id | fromSetting(const QVariant &variant) |
Descrizione dettagliata
Utils::Id viene utilizzato come strumento per identificare gli oggetti di interesse in modo più sicuro dal punto di vista dei tipi e più veloce rispetto a quanto offerto da un semplice ` QString ` o ` QByteArray `.
A un ID è associato un nome ASCII standard a 7 bit, utilizzato per la visualizzazione e la persistenza.
Documentazione delle funzioni membro
[static] Utils::Id Id::fromSetting(const QVariant &variant)
Ricostruisce un ID dal valore persistente variant.
Vedi anche toSetting().
QByteArrayView Id::name() const
Restituisce una rappresentazione interna dell'ID.
QString Id::suffixAfter(Utils::Id baseId) const
Estrae una parte della rappresentazione stringa dell'ID. Questa funzione può essere utilizzata per separare la parte di base specificata da baseId utilizzata durante la generazione di un ID con withSuffix().
Vedi anche withSuffix().
QVariant Id::toSetting() const
Restituisce un valore persistente che rappresenta l'ID, adatto per essere memorizzato in QSettings.
Vedi anche fromSetting().
QString Id::toString() const
Restituisce una rappresentazione stringa dell'ID adatta alla visualizzazione nell'interfaccia utente.
Questa funzione non deve essere utilizzata per creare una versione persistente dell'ID; utilizzare invece toSetting().
Vedi anche fromString() e toSetting().
Utils::Id Id::withPrefix(const char *prefix) const
Crea un ID derivato.
Questo può essere utilizzato per creare gruppi di ID che appartengono logicamente alla stessa categoria. Il nome interno associato verrà generato anteponendo prefix.
Utils::Id Id::withSuffix(qsizetype suffix) const
Crea un ID derivato.
Questo può essere utilizzato per creare gruppi di ID che appartengono logicamente alla stessa categoria. Il nome interno associato verrà generato aggiungendo " suffix".
Utils::Id Id::withSuffix(QStringView suffix) const
Questa è una funzione sovraccaricata.
Utils::Id Id::withSuffix(char suffix) const
Questa è una funzione sovraccaricata.
Utils::Id Id::withSuffix(const char *suffix) const
Questa è una funzione sovraccaricata.
Utils::Id Id::withSuffix(int suffix) const
Questa è una funzione sovraccaricata.
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.