Changeset View
Changeset View
Standalone View
Standalone View
libdiscover/UpdateModel/UpdateModel.h
Show All 34 Lines | 33 | { | |||
---|---|---|---|---|---|
35 | Q_PROPERTY(ResourcesUpdatesModel* backend READ backend WRITE setBackend) | 35 | Q_PROPERTY(ResourcesUpdatesModel* backend READ backend WRITE setBackend) | ||
36 | Q_PROPERTY(bool hasUpdates READ hasUpdates NOTIFY hasUpdatesChanged) | 36 | Q_PROPERTY(bool hasUpdates READ hasUpdates NOTIFY hasUpdatesChanged) | ||
37 | Q_PROPERTY(int toUpdateCount READ toUpdateCount NOTIFY toUpdateChanged) | 37 | Q_PROPERTY(int toUpdateCount READ toUpdateCount NOTIFY toUpdateChanged) | ||
38 | Q_PROPERTY(int totalUpdatesCount READ totalUpdatesCount NOTIFY hasUpdatesChanged) | 38 | Q_PROPERTY(int totalUpdatesCount READ totalUpdatesCount NOTIFY hasUpdatesChanged) | ||
39 | Q_PROPERTY(QString updateSize READ updateSize NOTIFY updateSizeChanged) | 39 | Q_PROPERTY(QString updateSize READ updateSize NOTIFY updateSizeChanged) | ||
40 | public: | 40 | public: | ||
41 | 41 | | |||
42 | enum Roles { | 42 | enum Roles { | ||
43 | VersionRole = Qt::UserRole + 1, | 43 | SizeRole = Qt::UserRole + 1, | ||
44 | SizeRole, | | |||
45 | ResourceRole, | 44 | ResourceRole, | ||
46 | ResourceProgressRole, | 45 | ResourceProgressRole, | ||
47 | SectionResourceProgressRole, | 46 | SectionResourceProgressRole, | ||
48 | ChangelogRole, | 47 | ChangelogRole, | ||
49 | SectionRole | 48 | SectionRole, | ||
49 | InstalledVersionRole, | ||||
50 | AvailableVersionRole | ||||
50 | }; | 51 | }; | ||
51 | Q_ENUM(Roles) | 52 | Q_ENUM(Roles) | ||
52 | 53 | | |||
53 | explicit UpdateModel(QObject *parent = nullptr); | 54 | explicit UpdateModel(QObject *parent = nullptr); | ||
54 | ~UpdateModel() override; | 55 | ~UpdateModel() override; | ||
55 | 56 | | |||
56 | QVariant data(const QModelIndex &index, int role) const override; | 57 | QVariant data(const QModelIndex &index, int role) const override; | ||
57 | Qt::ItemFlags flags(const QModelIndex &index) const override; | 58 | Qt::ItemFlags flags(const QModelIndex &index) const override; | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |