이 페이지에서

Utils::Id Class

class Utils::Id

Id 클래스는 특정 실행 중인 Qt Creator 프로세스 내에서 고유한 식별자를 캡슐화합니다. 더 보기...

Header: #include <utils/id.h>

공개 함수

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

정적 공용 멤버

Utils::Id fromSetting(const QVariant &variant)

상세 설명

Utils::Id 는 일반 QString 또는 QByteArray 가 제공하는 것보다 더 유형 안전하고 빠른 방식으로 관심 있는 객체를 식별하는 수단으로 사용됩니다.

ID는 표시 및 영구 저장을 위해 사용되는 일반 7비트 클린 ASCII 이름과 연관되어 있습니다.

멤버 함수 문서

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

variant 의 영구 저장값을 기반으로 ID를 재구성합니다.

toSetting()도 참조하십시오 .

QByteArrayView Id::name() const

id의 내부 표현을 반환합니다.

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

ID 문자열 표현식의 일부를 추출합니다. 이 함수는 withSuffix() 을 사용하여 ID를 생성할 때 baseId 로 지정된 기본 부분을 분리하는 데 사용할 수 있습니다.

withSuffix()도 참조하십시오 .

QVariant Id::toSetting() const

QSettings 에 저장하기에 적합한 ID를 나타내는 영구 값을 반환합니다.

fromSetting()도 참조하십시오 .

QString Id::toString() const

UI 표시에 적합한 ID의 문자열 표현을 반환합니다.

이 메서드는 ID의 영구 버전을 생성하는 데 사용해서는 안 되며, 대신 toSetting() 를 사용하십시오.

fromString() 및 toSetting()도 참조하십시오 .

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

파생 ID를 생성합니다.

이를 통해 논리적으로 서로 연관된 ID 그룹을 생성할 수 있습니다. 관련 내부 이름은 ' prefix'을 앞에 붙여 생성됩니다.

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

파생 ID를 생성합니다.

이를 통해 논리적으로 서로 연관된 ID 그룹을 생성할 수 있습니다. 관련 내부 이름은 suffix 를 끝에 추가하여 생성됩니다.

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

이것은 오버로드된 함수입니다.

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

이것은 오버로드된 함수입니다.

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

이것은 오버로드된 함수입니다.

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

이것은 오버로드된 함수입니다.

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.