QtMvvm  1.1.0
A mvvm oriented library for Qt, to create Projects for Widgets and Quick in parallel
datasyncwindow.h
1 #ifndef QTMVVM_DATASYNCWINDOW_H
2 #define QTMVVM_DATASYNCWINDOW_H
3 
4 #include <QtCore/QScopedPointer>
5 
6 #include <QtWidgets/QWidget>
7 
8 #include <QtMvvmDataSyncCore/DataSyncViewModel>
9 
10 #include "QtMvvmDataSyncWidgets/qtmvvmdatasyncwidgets_global.h"
11 
12 namespace QtMvvm {
13 
14 class DataSyncWindowPrivate;
16 class Q_MVVMDATASYNCWIDGETS_EXPORT DataSyncWindow : public QWidget
17 {
18  Q_OBJECT
19 
21  Q_PROPERTY(double syncProgress READ syncProgress WRITE setSyncProgress)
23  Q_PROPERTY(QString errorText READ errorText WRITE setErrorText)
24 
25 public:
27  Q_INVOKABLE explicit DataSyncWindow(QtMvvm::ViewModel *viewModel, QWidget *parent = nullptr);
28  ~DataSyncWindow() override;
29 
31  double syncProgress() const;
33  QString errorText() const;
34 
35 public Q_SLOTS:
37  void setSyncProgress(double syncProgress);
39  void setErrorText(QString errorText);
40 
41 protected Q_SLOTS:
43  virtual void viewModelReady();
44 
45 private Q_SLOTS:
46  void removeCurrentDevice();
47 
48 private:
49  QScopedPointer<DataSyncWindowPrivate> d;
50 };
51 
52 }
53 
54 #endif // QTMVVM_DATASYNCWINDOW_H
The base class for all viewmodels.
Definition: viewmodel.h:21
The primary namespace of the QtMvvm library.
The widgets view implementation for the DataSyncViewModel.