QPlaceAttribute Class
QPlaceAttribute 클래스는 장소에 대한 일반적인 속성 정보를 나타냅니다. 더 보기...
| Header: | #include <QPlaceAttribute> |
| qmake: | QT += location |
속성
공용 함수
| QPlaceAttribute() | |
| QPlaceAttribute(const QPlaceAttribute &other) | |
| QPlaceAttribute(QPlaceAttribute &&other) | |
| ~QPlaceAttribute() | |
| bool | isEmpty() const |
| QString | label() const |
| void | setLabel(const QString &label) |
| void | setText(const QString &text) |
| QString | text() const |
| QPlaceAttribute & | operator=(const QPlaceAttribute &other) |
정적 공용 멤버
| const QString | OpeningHours |
| const QString | Payment |
| const QString | Provider |
관련 비멤버
| bool | operator!=(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs) |
| bool | operator==(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs) |
상세 설명
QPlaceAttribute 인스턴스는 QPlace 클래스를 통해 노출되지 않는 장소에 대한 추가 정보를 저장합니다. QPlaceAttribute는 속성을 설명하는 현지화된 레이블과 속성의 값을 나타내는 서식 있는 텍스트 문자열을 캡슐화합니다. 일반적으로 이 두 가지 모두 최종 사용자에게 있는 그대로 표시되도록 의도되어 있습니다.
일부 플러그인은 속성을 전혀 지원하지 않을 수도 있고, 다른 플러그인은 특정 세트만 지원하거나, 시간이 지남에 따라 동적으로 변경되는 속성 세트를 지원하거나, 심지어 클라이언트 애플리케이션에서 속성을 임의로 정의할 수 있도록 허용할 수도 있습니다. 또한 속성은 장소마다 다를 수 있습니다. 예를 들어, 한 장소에는 영업 시간이 있을 수 있지만 다른 장소에는 없을 수 있습니다. 자세한 내용은 플러그인 참조 문서를 확인하십시오.
속성 유형
QPlaceAttribute 클래스는 표준 속성 유형을 나타내는 몇 가지 상수 문자열을 정의합니다.
x_id_<provider> 형식의 속성 유형 클래스가 있는데, 예를 들어 x_id_here가 있습니다. 이 속성 클래스는 지정된 제공자의 관점에서 볼 때 장소에 대한 대체 식별자 집합입니다.
위의 유형들은 다음을 통해 QPlace 에서 속성에 접근하고 수정하는 데 사용됩니다:
- QPlace::extendedAttribute()
- QPlace::setExtendedAttribute()
- QPlace::removeExtendedAttribute()
- QPlace::removeExtendedAttribute()
속성 유형은 문자열 유형이므로, 제공자는 필요에 따라 새로운 속성을 도입할 수 있습니다. 충돌을 방지하기 위해 사용자 정의 속성 유형에는 항상 접두사를 붙여야 합니다.
사용자가 읽을 수 있는 속성과 읽을 수 없는 속성
일부 속성은 최종 사용자가 읽을 수 없도록 의도된 것일 수 있으며, 이러한 속성의 레이블 필드는 이를 나타내기 위해 비어 있습니다.
속성 문서
label : QString
이 속성은 해당 속성을 설명하는 현지화된 레이블을 포함합니다.
액세스 함수:
| QString | label() const |
| void | setLabel(const QString &label) |
text : QString
이 속성은 속성 값을 나타내는 서식 있는 텍스트를 포함합니다.
액세스 함수:
| QString | text() const |
| void | setText(const QString &text) |
멤버 함수 설명서
QPlaceAttribute::QPlaceAttribute()
속성을 생성합니다.
[noexcept] QPlaceAttribute::QPlaceAttribute(const QPlaceAttribute &other)
other 의 복사본을 생성합니다.
[constexpr noexcept default] QPlaceAttribute::QPlaceAttribute(QPlaceAttribute &&other)
QPlaceAttribute 의 인스턴스를 move-construct로 생성합니다.
[noexcept] QPlaceAttribute::~QPlaceAttribute()
속성을 삭제합니다.
bool QPlaceAttribute::isEmpty() const
place 속성의 모든 필드가 비어 있는지 여부를 나타내는 부울 값을 반환합니다.
[noexcept] QPlaceAttribute &QPlaceAttribute::operator=(const QPlaceAttribute &other)
이 속성에 ` other `을 할당하고, 이 속성에 대한 참조를 반환합니다.
멤버 변수 설명서
const QString QPlaceAttribute::OpeningHours
영업 시간을 지정합니다.
const QString QPlaceAttribute::Payment
결제 방법을 정의하는 속성을 지정하는 상수입니다.
const QString QPlaceAttribute::Provider
해당 장소가 어느 제공자로부터 유래했는지를 정의하는 속성을 지정하는 상수입니다.
관련 비회원
[noexcept] bool operator!=(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs)
lhs 가 rhs 와 같지 않으면 true를 반환하고, 그렇지 않으면 false를 반환합니다.
[noexcept] bool operator==(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs)
lhs 가 rhs 와 같으면 true를 반환하고, 그렇지 않으면 false를 반환합니다.
© 2026 The Qt Company Ltd. 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.