1 #ifndef QTMVVM_NETWORKEXCHANGEVIEWMODEL_H 2 #define QTMVVM_NETWORKEXCHANGEVIEWMODEL_H 4 #include <QtCore/qscopedpointer.h> 5 #include <QtCore/qsortfilterproxymodel.h> 7 #include <QtMvvmCore/viewmodel.h> 9 #include <QtDataSync/userexchangemanager.h> 11 #include "QtMvvmDataSyncCore/qtmvvmdatasynccore_global.h" 12 #include "QtMvvmDataSyncCore/exchangedevicesmodel.h" 16 class NetworkExchangeViewModelPrivate;
25 Q_PROPERTY(quint16 port READ port WRITE setPort NOTIFY portChanged)
27 Q_PROPERTY(
QString deviceName READ deviceName WRITE setDeviceName NOTIFY deviceNameChanged)
29 Q_PROPERTY(
bool active READ active WRITE setActive NOTIFY activeChanged)
43 static QVariantHash showParams(const
QString &setup);
45 static QVariantHash showParams(
QtDataSync::AccountManager *accountManager);
52 QtDataSync::UserExchangeManager* userExchangeManager() const;
66 void exportTo(
int sortedIndex);
69 void setPort(quint16 port);
71 void setDeviceName(
QString deviceName);
73 void setActive(
bool active);
77 void ready(QPrivateSignal);
80 void userExchangeManagerChanged(
QtDataSync::UserExchangeManager* userExchangeManager, QPrivateSignal);
82 void portChanged(quint16 port, QPrivateSignal);
84 void deviceNameChanged(
QString deviceName, QPrivateSignal);
86 void activeChanged(
bool active, QPrivateSignal);
89 void onInit(const QVariantHash ¶ms) override;
90 void onResult(quint32 requestCode, const
QVariant &result) override;
93 void exchangeError(const
QString &errorString);
94 void newUserData(const
QtDataSync::UserInfo &userInfo,
bool trusted);
102 #endif // QTMVVM_NETWORKEXCHANGEVIEWMODEL_H A list model implementation to show all devices available by the QtDataSync::UserExchangeManager.
The base class for all viewmodels.
The primary namespace of the QtMvvm library.
A viewmodel to show a dialog to exchange account data via the QtDataSync::UserExchangeManager.