Changeset View
Changeset View
Standalone View
Standalone View
libdiscover/resources/AbstractResource.h
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 47 | { | |||
---|---|---|---|---|---|
51 | Q_PROPERTY(QString comment READ comment CONSTANT) | 51 | Q_PROPERTY(QString comment READ comment CONSTANT) | ||
52 | Q_PROPERTY(QVariant icon READ icon NOTIFY iconChanged) | 52 | Q_PROPERTY(QVariant icon READ icon NOTIFY iconChanged) | ||
53 | Q_PROPERTY(bool canExecute READ canExecute CONSTANT) | 53 | Q_PROPERTY(bool canExecute READ canExecute CONSTANT) | ||
54 | Q_PROPERTY(State state READ state NOTIFY stateChanged) | 54 | Q_PROPERTY(State state READ state NOTIFY stateChanged) | ||
55 | Q_PROPERTY(QString status READ status NOTIFY stateChanged) | 55 | Q_PROPERTY(QString status READ status NOTIFY stateChanged) | ||
56 | Q_PROPERTY(QStringList category READ categories CONSTANT) | 56 | Q_PROPERTY(QStringList category READ categories CONSTANT) | ||
57 | Q_PROPERTY(bool isTechnical READ isTechnical CONSTANT) | 57 | Q_PROPERTY(bool isTechnical READ isTechnical CONSTANT) | ||
58 | Q_PROPERTY(QUrl homepage READ homepage CONSTANT) | 58 | Q_PROPERTY(QUrl homepage READ homepage CONSTANT) | ||
59 | Q_PROPERTY(QUrl helpURL READ helpURL CONSTANT) | ||||
60 | Q_PROPERTY(QUrl bugURL READ bugURL CONSTANT) | ||||
61 | Q_PROPERTY(QUrl donationURL READ donationURL CONSTANT) | ||||
59 | Q_PROPERTY(bool canUpgrade READ canUpgrade NOTIFY stateChanged) | 62 | Q_PROPERTY(bool canUpgrade READ canUpgrade NOTIFY stateChanged) | ||
60 | Q_PROPERTY(bool isInstalled READ isInstalled NOTIFY stateChanged) | 63 | Q_PROPERTY(bool isInstalled READ isInstalled NOTIFY stateChanged) | ||
61 | Q_PROPERTY(QString license READ license CONSTANT) | 64 | Q_PROPERTY(QString license READ license CONSTANT) | ||
62 | Q_PROPERTY(QString longDescription READ longDescription CONSTANT) | 65 | Q_PROPERTY(QString longDescription READ longDescription CONSTANT) | ||
63 | Q_PROPERTY(QString origin READ origin CONSTANT) | 66 | Q_PROPERTY(QString origin READ origin CONSTANT) | ||
64 | Q_PROPERTY(QString displayOrigin READ displayOrigin CONSTANT) | 67 | Q_PROPERTY(QString displayOrigin READ displayOrigin CONSTANT) | ||
65 | Q_PROPERTY(int size READ size NOTIFY sizeChanged) | 68 | Q_PROPERTY(int size READ size NOTIFY sizeChanged) | ||
66 | Q_PROPERTY(QString sizeDescription READ sizeDescription NOTIFY sizeChanged) | 69 | Q_PROPERTY(QString sizeDescription READ sizeDescription NOTIFY sizeChanged) | ||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | 79 | public: | |||
120 | virtual bool canExecute() const = 0; | 123 | virtual bool canExecute() const = 0; | ||
121 | 124 | | |||
122 | ///executes the resource, if applies. | 125 | ///executes the resource, if applies. | ||
123 | Q_SCRIPTABLE virtual void invokeApplication() const = 0; | 126 | Q_SCRIPTABLE virtual void invokeApplication() const = 0; | ||
124 | 127 | | |||
125 | virtual State state() = 0; | 128 | virtual State state() = 0; | ||
126 | 129 | | |||
127 | virtual QStringList categories() = 0; | 130 | virtual QStringList categories() = 0; | ||
128 | ///@returns a URL that points to the content | 131 | ///@returns a URL that points to the app's website | ||
129 | virtual QUrl homepage() = 0; | 132 | virtual QUrl homepage(); | ||
133 | ///@returns a URL that points to the app's online documentation | ||||
apol: Maybe they could return an empty url by default? This way they don't have to be implemented… | |||||
134 | virtual QUrl helpURL(); | ||||
135 | ///@returns a URL that points to the place where you can file a bug | ||||
136 | virtual QUrl bugURL(); | ||||
137 | ///@returns a URL that points to the place where you can donate money to the app developer | ||||
138 | virtual QUrl donationURL(); | ||||
130 | 139 | | |||
131 | virtual bool isTechnical() const; | 140 | virtual bool isTechnical() const; | ||
132 | 141 | | |||
133 | virtual int size() = 0; | 142 | virtual int size() = 0; | ||
134 | virtual QString sizeDescription(); | 143 | virtual QString sizeDescription(); | ||
135 | virtual QString license() = 0; | 144 | virtual QString license() = 0; | ||
136 | 145 | | |||
137 | virtual QString installedVersion() const = 0; | 146 | virtual QString installedVersion() const = 0; | ||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |
Maybe they could return an empty url by default? This way they don't have to be implemented right away.