Changeset View
Changeset View
Standalone View
Standalone View
plasma/vaultsmodel.h
Show All 27 Lines | |||||
28 | 28 | | |||
29 | #include <common/vaultinfo.h> | 29 | #include <common/vaultinfo.h> | ||
30 | 30 | | |||
31 | class VaultsModel: public QAbstractListModel { | 31 | class VaultsModel: public QAbstractListModel { | ||
32 | Q_OBJECT | 32 | Q_OBJECT | ||
33 | 33 | | |||
34 | Q_PROPERTY(bool isBusy READ isBusy NOTIFY isBusyChanged) | 34 | Q_PROPERTY(bool isBusy READ isBusy NOTIFY isBusyChanged) | ||
35 | Q_PROPERTY(bool hasError READ hasError NOTIFY hasErrorChanged) | 35 | Q_PROPERTY(bool hasError READ hasError NOTIFY hasErrorChanged) | ||
36 | Q_PROPERTY(bool hasOpen READ hasOpen NOTIFY hasOpenChanged) | ||||
broulik: I think this should be `openCount` to match `count`. | |||||
36 | Q_PROPERTY(int count READ rowCount NOTIFY rowCountChanged) | 37 | Q_PROPERTY(int count READ rowCount NOTIFY rowCountChanged) | ||
37 | 38 | | |||
38 | public: | 39 | public: | ||
39 | explicit VaultsModel(QObject *parent = nullptr); | 40 | explicit VaultsModel(QObject *parent = nullptr); | ||
40 | ~VaultsModel() override; | 41 | ~VaultsModel() override; | ||
41 | 42 | | |||
42 | // This forces detection of removable drives | 43 | // This forces detection of removable drives | ||
43 | void reloadDevices(); | 44 | void reloadDevices(); | ||
Show All 40 Lines | 66 | public Q_SLOTS: | |||
84 | void configure(const QString &device); | 85 | void configure(const QString &device); | ||
85 | 86 | | |||
86 | // Open in file manager | 87 | // Open in file manager | ||
87 | void openInFileManager(const QString &device); | 88 | void openInFileManager(const QString &device); | ||
88 | 89 | | |||
89 | 90 | | |||
90 | bool isBusy() const; | 91 | bool isBusy() const; | ||
91 | bool hasError() const; | 92 | bool hasError() const; | ||
93 | bool hasOpen() const; | ||||
92 | 94 | | |||
93 | Q_SIGNALS: | 95 | Q_SIGNALS: | ||
94 | void isBusyChanged(bool isBusy); | 96 | void isBusyChanged(bool isBusy); | ||
95 | void hasErrorChanged(bool hasError); | 97 | void hasErrorChanged(bool hasError); | ||
98 | void hasOpenChanged(bool hasOpen); | ||||
96 | void rowCountChanged(int count); | 99 | void rowCountChanged(int count); | ||
97 | 100 | | |||
98 | private: | 101 | private: | ||
99 | class Private; | 102 | class Private; | ||
100 | friend class Private; | 103 | friend class Private; | ||
101 | QScopedPointer<Private> d; | 104 | QScopedPointer<Private> d; | ||
102 | }; | 105 | }; | ||
103 | 106 | | |||
Show All 25 Lines |
I think this should be openCount to match count.