QtMvvm  1.1.0
A mvvm oriented library for Qt, to create Projects for Widgets and Quick in parallel
datasyncsettingsviewmodel.h
1 #ifndef QTMVVM_DATASYNCSETTINGSVIEWMODEL_H
2 #define QTMVVM_DATASYNCSETTINGSVIEWMODEL_H
3 
4 #include <QtCore/qobject.h>
5 #include <QtCore/qscopedpointer.h>
6 #include <QtDataSync/DataStore>
7 #include <QtDataSync/DataTypeStore>
8 
9 #include <QtMvvmCore/settingsviewmodel.h>
10 
11 #include "QtMvvmDataSyncCore/qtmvvmdatasynccore_global.h"
12 #include "QtMvvmDataSyncCore/datasyncsettingsentry.h"
13 
14 namespace QtMvvm {
15 
17 class Q_MVVMDATASYNCCORE_EXPORT DataSyncSettingsViewModel : public QtMvvm::SettingsViewModel
18 {
19  Q_OBJECT
20 
21 public:
23  static const QString paramSetup;
25  static const QString paramDataStore;
28 
30  static QVariantHash showParams(const QString &setup, const QString &setupFile = {});
32  static QVariantHash showParams(QtDataSync::DataStore *dataStore, const QString &setupFile = {});
34  static QVariantHash showParams(QtDataSync::DataTypeStore<DataSyncSettingsEntry> *dataStore, const QString &setupFile = {});
35 
37  Q_INVOKABLE explicit DataSyncSettingsViewModel(QObject *parent = nullptr);
38 
39 protected:
40  void onInit(const QVariantHash &params) override;
41 };
42 
43 }
44 
45 #endif // QTMVVM_DATASYNCSETTINGSVIEWMODEL_H
A ViewModel for a generic settings dialog based of an XML settings file.
static const QString paramDataTypeStore
The parameter for a QtDataSync::DataTypeStore object for the onInit() method.
static const QString paramSetup
The parameter for a setup name for the onInit() method.
An extension of the normal settings viewmodel with the DataSyncSettingsAccessor as accessor...
static const QString paramDataStore
The parameter for a QtDataSync::DataStore object for the onInit() method.
The primary namespace of the QtMvvm library.