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

상세 설명

소스에 대한 연결이 설정되고 현재 값을 사용할 수 있을 때까지 표시할 "적절한" 값을 제공하는 데 사용할 수 있습니다.

이 클래스를 재정의하여 저장(QRemoteObjectAbstractPersistedStore::saveProperties) 및 복원(QRemoteObjectAbstractPersistedStore::restoreProperties) PROP 값에 대한 구현을 제공해야 합니다. 그런 다음 파생된 유형을 노드에 설정할 수 있으며, 해당 노드에서 획득한 모든 복제본은 복제본 소멸자가 호출될 때 자동으로 PERSISTED 속성을 저장하고 복제본이 인스턴스화될 때 값을 검색합니다.

멤버 함수 문서

QRemoteObjectAbstractPersistedStore::QRemoteObjectAbstractPersistedStore(QObject *parent = nullptr)

주어진 parent 로 QRemoteObjectAbstractPersistedStore를 구축합니다. parent 의 기본값은 nullptr 입니다.

[pure virtual] QVariantList QRemoteObjectAbstractPersistedStore::restoreProperties(const QString &repName, const QByteArray &repSig)

이 메서드는 레플리카가 초기화될 때 레플리카 클래스의 repNamerepSig 을 제공합니다. 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도 참조하세요 .

© 2025 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.