<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qremoteobjectnode.cpp --> <title>QRemoteObjectPersistedStore Class | Qt Remote Objects 5.9</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.9</td><td ><a href="qtremoteobjects-index.html">Qt Remote Objects</a></td><td ><a href="qtremoteobjects-module.html">C++ Classes</a></td><td >QRemoteObjectPersistedStore</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QRemoteObjectPersistedStore Class</h1> <!-- $$$QRemoteObjectPersistedStore-brief --> <p>The <a href="qremoteobjectpersistedstore.html">QRemoteObjectPersistedStore</a> virtual class provides the methods for setting PROP values of a replica to value they had the last time the replica was used. <a href="#details">More...</a></p> <!-- @@@QRemoteObjectPersistedStore --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QRemoteObjectPersistedStore></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += remoteobjects</td></tr></table></div><ul> <li><a href="qremoteobjectpersistedstore-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectpersistedstore.html#dtor.QRemoteObjectPersistedStore">~QRemoteObjectPersistedStore</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual QVariantList </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectpersistedstore.html#restoreProperties">restoreProperties</a></b>(const QString &<i>repName</i>, const QByteArray &<i>repSig</i>) = 0</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qremoteobjectpersistedstore.html#saveProperties">saveProperties</a></b>(const QString &<i>repName</i>, const QByteArray &<i>repSig</i>, const QVariantList &<i>values</i>) = 0</td></tr> </table></div> <a name="details"></a> <!-- $$$QRemoteObjectPersistedStore-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qremoteobjectpersistedstore.html">QRemoteObjectPersistedStore</a> virtual class provides the methods for setting PROP values of a replica to value they had the last time the replica was used.</p> <p>This can be used to provide a "reasonable" value to be displayed until the connection to the source is established and current values are available.</p> <p>This class must be overridden to provide an implementation for saving (<a href="qremoteobjectpersistedstore.html#saveProperties">QRemoteObjectPersistedStore::saveProperties</a>) and restoring (<a href="qremoteobjectpersistedstore.html#restoreProperties">QRemoteObjectPersistedStore::restoreProperties</a>) PROP values. The derived type can then be set for a node, and any replica acquired from that node will then automatically store PERSISTED properties when the replica destructor is called, and retrieve the values when the replica is instantiated.</p> </div> <!-- @@@QRemoteObjectPersistedStore --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$~QRemoteObjectPersistedStore[overload1]$$$~QRemoteObjectPersistedStore --> <h3 class="fn" id="dtor.QRemoteObjectPersistedStore"><a name="dtor.QRemoteObjectPersistedStore"></a><code>[virtual] </code>QRemoteObjectPersistedStore::<span class="name">~QRemoteObjectPersistedStore</span>()</h3> <p>Destroys the instance of QRemoteObjectPersistedStore. The destructor is virtual.</p><!-- @@@~QRemoteObjectPersistedStore --> <!-- $$$restoreProperties[overload1]$$$restorePropertiesconstQString&constQByteArray& --> <h3 class="fn" id="restoreProperties"><a name="restoreProperties"></a><code>[pure virtual] </code><span class="type">QVariantList</span> QRemoteObjectPersistedStore::<span class="name">restoreProperties</span>(const <span class="type">QString</span> &<i>repName</i>, const <span class="type">QByteArray</span> &<i>repSig</i>)</h3> <p>This method will be provided the replica class's <i>repName</i> and <i>repSig</i> when the replica is being initialized. It is the responsibility of the inheriting class to get the last values persisted by <a href="qremoteobjectpersistedstore.html#saveProperties">QRemoteObjectPersistedStore::saveProperties</a> and return them. An empty QVariantList should be returned if no values are available.</p> <p><b>See also </b><a href="qremoteobjectpersistedstore.html#saveProperties">QRemoteObjectPersistedStore::saveProperties</a>.</p> <!-- @@@restoreProperties --> <!-- $$$saveProperties[overload1]$$$savePropertiesconstQString&constQByteArray&constQVariantList& --> <h3 class="fn" id="saveProperties"><a name="saveProperties"></a><code>[pure virtual] </code><span class="type">void</span> QRemoteObjectPersistedStore::<span class="name">saveProperties</span>(const <span class="type">QString</span> &<i>repName</i>, const <span class="type">QByteArray</span> &<i>repSig</i>, const <span class="type">QVariantList</span> &<i>values</i>)</h3> <p>This method will be provided the replica class's <i>repName</i>, <i>repSig</i> and the list of <i>values</i> that PERSISTED properties have when the replica destructor was called. It is the responsibility of the inheriting class to store the information in a manner consistent for <a href="qremoteobjectpersistedstore.html#restoreProperties">QRemoteObjectPersistedStore::restoreProperties</a> to retrieve.</p> <p><b>See also </b><a href="qremoteobjectpersistedstore.html#restoreProperties">QRemoteObjectPersistedStore::restoreProperties</a>.</p> <!-- @@@saveProperties --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> 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. </p> </div> </body> </html>