Utils::Id Class
class Utils::IdLa clase `Id` encapsula un identificador único dentro de un proceso específico de ` Qt Creator ` en ejecución. Más información...
| Header: | #include <utils/id.h> |
Funciones públicas
| 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 |
Miembros públicos estáticos
| Utils::Id | fromSetting(const QVariant &variant) |
Descripción detallada
Utils::Id se utiliza como mecanismo para identificar objetos de interés de una forma más segura en cuanto a tipos y más rápida que la que proporcionarían un simple ` QString ` o ` QByteArray `.
A cada identificador se le asocia un nombre ASCII de 7 bits válido que se utiliza para su visualización y almacenamiento.
Documentación de funciones de miembro
[static] Utils::Id Id::fromSetting(const QVariant &variant)
Reconstruye un identificador a partir del valor persistente variant.
Véase también toSetting().
QByteArrayView Id::name() const
Devuelve una representación interna del identificador.
QString Id::suffixAfter(Utils::Id baseId) const
Extrae una parte de la representación de la cadena del identificador. Esta función se puede utilizar para separar la parte base especificada por baseId, que se utiliza al generar un identificador con withSuffix().
Véase también withSuffix().
QVariant Id::toSetting() const
Devuelve un valor persistente que representa el identificador, adecuado para almacenarse en QSettings.
Véase también fromSetting().
QString Id::toString() const
Devuelve una representación en forma de cadena del identificador, adecuada para su visualización en la interfaz de usuario.
Esto no debe utilizarse para crear una versión persistente del Id; en su lugar, utiliza toSetting().
Véanse también fromString() y toSetting().
Utils::Id Id::withPrefix(const char *prefix) const
Crea un identificador derivado.
Esto se puede utilizar para crear grupos de identificadores que pertenezcan lógicamente a un mismo conjunto. El nombre interno asociado se generará añadiendo al principio « prefix ».
Utils::Id Id::withSuffix(qsizetype suffix) const
Crea un identificador derivado.
Esto se puede utilizar para crear grupos de identificadores que pertenezcan lógicamente a un mismo conjunto. El nombre interno asociado se generará añadiendo « suffix » al final.
Utils::Id Id::withSuffix(QStringView suffix) const
Esta es una función sobrecargada.
Utils::Id Id::withSuffix(char suffix) const
Esta es una función sobrecargada.
Utils::Id Id::withSuffix(const char *suffix) const
Esta es una función sobrecargada.
Utils::Id Id::withSuffix(int suffix) const
Esta es una función sobrecargada.
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.