1 #ifndef QTMVVM_DATASYNCVIEWMODEL_H 2 #define QTMVVM_DATASYNCVIEWMODEL_H 4 #include <QtCore/qmap.h> 5 #include <QtCore/qscopedpointer.h> 6 #include <QtCore/qsortfilterproxymodel.h> 8 #include <QtGui/qcolor.h> 10 #include <QtMvvmCore/viewmodel.h> 12 #include <QtDataSync/syncmanager.h> 13 #include <QtDataSync/accountmanager.h> 15 #include "QtMvvmDataSyncCore/qtmvvmdatasynccore_global.h" 16 #include "QtMvvmDataSyncCore/accountmodel.h" 20 class DataSyncViewModelPrivate;
29 Q_PROPERTY(
QtDataSync::AccountManager* accountManager READ accountManager NOTIFY accountManagerChanged)
32 Q_PROPERTY(
ColorMap colorMap READ colorMap WRITE setColorMap RESET resetColorMap NOTIFY colorMapChanged)
34 Q_PROPERTY(
QString statusString READ statusString NOTIFY statusStringChanged)
51 static QVariantHash showParams(const
QString &setup);
62 QtDataSync::AccountManager* accountManager() const;
79 void showDeviceInfo();
89 void startNetworkExchange();
92 void removeDevice(
int sortedIndex);
101 void syncManagerChanged(
QtDataSync::SyncManager* syncManager, QPrivateSignal);
103 void accountManagerChanged(
QtDataSync::AccountManager* accountManager, QPrivateSignal);
105 void colorMapChanged(
ColorMap colorMap, QPrivateSignal);
107 void statusStringChanged(QPrivateSignal);
110 void ready(QPrivateSignal);
113 void onInit(const QVariantHash ¶ms) override;
114 void onResult(quint32 requestCode, const
QVariant &result) override;
117 void showImportDialog(
QtDataSync::LoginRequest request);
118 void showImportAccepted();
119 void showAccessGranted(const
QUuid &
id);
128 #endif // QTMVVM_DATASYNCVIEWMODEL_H
A list model implementation for QtDataSync::DeviceInfo via a QtDataSync::AccountManager.
The base class for all viewmodels.
A viewmodel to show a overview of the datasync status and account.
The primary namespace of the QtMvvm library.