1 #ifndef QQMLDATASTORE_H 2 #define QQMLDATASTORE_H 4 #include <QtCore/QObject> 6 #include <QtQml/QQmlParserStatus> 8 #include <QtDataSync/datastore.h> 27 Q_DISABLE_COPY(QQmlDataStore)
69 void classBegin() override;
71 void componentComplete() override;
164 void setSetupName(
QString setupName);
179 #endif // QQMLDATASTORE_H Q_INVOKABLE QT_DATASYNC_REVISION_2 bool contains(const QString &typeName, const QString &key) const
Checks if a dataset exists in the store for the given key.
Q_INVOKABLE void save(const QString &typeName, const QVariant &value)
Saves the given dataset in the store.
QStringList keys() const
Returns all saved keys for the given type.
Q_INVOKABLE QVariant load(const QString &typeName, const QString &key) const
Loads the dataset with the given key for the given type.
The QML import for the QtDataSync QML module.
void setupNameChanged(const QString &setupName)
NOTIFY accessor for AccountManager::setupName.
void clear()
Removes all datasets of the given type from the store.
The primary namespace of the QtDataSync library.
Q_INVOKABLE QString typeName(int typeId) const
Returns the name of the type identified by the given type id.
quint64 count() const
Counts the number of datasets for the given type.
Q_INVOKABLE bool remove(const QString &typeName, const QString &key)
Removes the dataset with the given key for the given type.
The QML binding of QtDataSync::DataStore.
void validChanged(bool valid)
NOTIFY accessor for AccountManager::valid.
SearchMode
Possible pattern modes for the search mechanism.
Q_INVOKABLE QVariantList search(const QString &typeName, const QString &query, DataStore::SearchMode mode=DataStore::RegexpMode) const
Searches the store for datasets of the given type where the key matches the query.
QList< T > loadAll() const
Loads all existing datasets for the given type.
Interpret the search string as a regular expression. See QRegularExpression.
QObject * parent() const const