Changeset View
Changeset View
Standalone View
Standalone View
libdiscover/UpdateModel/UpdateItem.h
Show All 30 Lines | |||||
31 | class AbstractResource; | 31 | class AbstractResource; | ||
32 | class DISCOVERCOMMON_EXPORT UpdateItem | 32 | class DISCOVERCOMMON_EXPORT UpdateItem | ||
33 | { | 33 | { | ||
34 | public: | 34 | public: | ||
35 | explicit UpdateItem(AbstractResource *app); | 35 | explicit UpdateItem(AbstractResource *app); | ||
36 | 36 | | |||
37 | ~UpdateItem(); | 37 | ~UpdateItem(); | ||
38 | 38 | | |||
39 | enum Section { | ||||
40 | ApplicationSection, | ||||
41 | SystemSection | ||||
42 | }; | ||||
39 | 43 | | |||
40 | void setSection(const QString §ion) { m_section = section; } | 44 | void setSection(const Section §ion) { m_section = section; } | ||
41 | QString section() const { return m_section; } | 45 | Section section() const { return m_section; } | ||
42 | void setProgress(qreal progress); | 46 | void setProgress(qreal progress); | ||
43 | qreal progress() const; | 47 | qreal progress() const; | ||
44 | 48 | | |||
45 | QString changelog() const; | 49 | QString changelog() const; | ||
46 | void setChangelog(const QString &changelog); | 50 | void setChangelog(const QString &changelog); | ||
47 | 51 | | |||
48 | AbstractResource *app() const; | 52 | AbstractResource *app() const; | ||
49 | QString name() const; | 53 | QString name() const; | ||
50 | QString version() const; | 54 | QString version() const; | ||
51 | QVariant icon() const; | 55 | QVariant icon() const; | ||
52 | qint64 size() const; | 56 | qint64 size() const; | ||
53 | Qt::CheckState checked() const; | 57 | Qt::CheckState checked() const; | ||
54 | 58 | | |||
55 | AbstractResource* resource() const { return m_app; } | 59 | AbstractResource* resource() const { return m_app; } | ||
56 | 60 | | |||
57 | private: | 61 | private: | ||
58 | AbstractResource * const m_app; | 62 | AbstractResource * const m_app; | ||
59 | 63 | | |||
60 | const QString m_categoryName; | 64 | const QString m_categoryName; | ||
61 | const QIcon m_categoryIcon; | 65 | const QIcon m_categoryIcon; | ||
62 | qreal m_progress; | 66 | qreal m_progress; | ||
63 | QString m_changelog; | 67 | QString m_changelog; | ||
64 | QString m_section; | 68 | Section m_section; | ||
65 | }; | 69 | }; | ||
66 | 70 | | |||
67 | #endif // UPDATEITEM_H | 71 | #endif // UPDATEITEM_H |