QRemoteObjectAbstractPersistedStore Class
레플리카의 PROP 값을 해당 레플리카가 마지막으로 사용되었을 때의 값으로 설정하는 메서드를 제공하는 클래스입니다. 더 보기...
| 헤더: | #include <QRemoteObjectAbstractPersistedStore> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS RemoteObjects) target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects) |
| qmake: | QT += remoteobjects |
| 상속: | QObject |
공개 함수
| QRemoteObjectAbstractPersistedStore(QObject *parent = nullptr) | |
| virtual QVariantList | restoreProperties(const QString &repName, const QByteArray &repSig) = 0 |
| virtual void | saveProperties(const QString &repName, const QByteArray &repSig, const QVariantList &values) = 0 |
상세 설명
이 메서드는 소스와의 연결이 설정되고 현재 값을 사용할 수 있게 될 때까지 표시할 "적절한" 값을 제공하는 데 사용할 수 있습니다.
이 클래스는 PROP 값을 저장(QRemoteObjectAbstractPersistedStore::saveProperties)하고 복원(QRemoteObjectAbstractPersistedStore::restoreProperties)하기 위한 구현을 제공하기 위해 재정의되어야 합니다. 그러면 파생 유형을 노드에 설정할 수 있으며, 해당 노드에서 획득한 모든 복제본은 복제본 소멸자가 호출될 때 PERSISTED 속성을 자동으로 저장하고, 복제본이 인스턴스화될 때 해당 값을 검색합니다.
멤버 함수 문서
QRemoteObjectAbstractPersistedStore::QRemoteObjectAbstractPersistedStore(QObject *parent = nullptr)
지정된 ` parent`을 사용하여 `QRemoteObjectAbstractPersistedStore`를 생성합니다. ` parent `의 기본값은 ` nullptr`입니다.
[pure virtual] QVariantList QRemoteObjectAbstractPersistedStore::restoreProperties(const QString &repName, const QByteArray &repSig)
이 메서드는 레플리카가 초기화될 때 레플리카 클래스의 ` repName ` 및 ` repSig `를 전달받게 됩니다. ` QRemoteObjectAbstractPersistedStore::saveProperties `에 의해 마지막으로 저장된 값을 가져와 반환하는 것은 상속 클래스의 책임입니다. 사용할 수 있는 값이 없는 경우 빈 ` QVariantList `를 반환해야 합니다.
QRemoteObjectAbstractPersistedStore::saveProperties도 참조하십시오 .
[pure virtual] void QRemoteObjectAbstractPersistedStore::saveProperties(const QString &repName, const QByteArray &repSig, const QVariantList &values)
이 메서드에는 복제본 소멸자가 호출되었을 당시, 복제본 클래스의 ` repName`, ` repSig ` 및 `PERSISTED` 속성이 가지는 ` values ` 목록이 전달됩니다. 이 정보를 ` QRemoteObjectAbstractPersistedStore::restoreProperties `가 검색할 수 있도록 일관된 방식으로 저장하는 것은 상속 클래스의 책임입니다.
QRemoteObjectAbstractPersistedStore::restoreProperties도 참조하십시오 .
© 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.