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 isActive WRITE setActive NOTIFY activeChanged)
43 static QVariantHash showParams(const
QString &setup);
45 static QVariantHash showParams(
QtDataSync::AccountManager *accountManager);
52 QtDataSync::UserExchangeManager* userExchangeManager() const;
58 bool isActive() const;
59 Q_DECL_DEPRECATED
bool active() const;
67 void exportTo(
int sortedIndex);
70 void setPort(quint16 port);
72 void setDeviceName(
QString deviceName);
74 void setActive(
bool active);
78 void ready(QPrivateSignal);
81 void userExchangeManagerChanged(
QtDataSync::UserExchangeManager* userExchangeManager, QPrivateSignal);
83 void portChanged(quint16 port, QPrivateSignal);
85 void deviceNameChanged(
QString deviceName, QPrivateSignal);
87 void activeChanged(
bool active, QPrivateSignal);
90 void onInit(const QVariantHash ¶ms) override;
91 void onResult(quint32 requestCode, const
QVariant &result) override;
94 void exchangeError(const
QString &errorString);
95 void newUserData(const
QtDataSync::UserInfo &userInfo,
bool trusted);
103 #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.