Changeset View
Changeset View
Standalone View
Standalone View
src/context/AppletModel.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 38 | { | |||
---|---|---|---|---|---|
44 | PackagePath, | 44 | PackagePath, | ||
45 | ContentHeight | 45 | ContentHeight | ||
46 | }; | 46 | }; | ||
47 | Q_ENUM(Role) | 47 | Q_ENUM(Role) | ||
48 | 48 | | |||
49 | explicit AppletModel(AppletLoader *loader, QObject *parent = Q_NULLPTR); | 49 | explicit AppletModel(AppletLoader *loader, QObject *parent = Q_NULLPTR); | ||
50 | virtual ~AppletModel(); | 50 | virtual ~AppletModel(); | ||
51 | 51 | | |||
52 | virtual int rowCount(const QModelIndex& parent) const Q_DECL_OVERRIDE; | 52 | virtual int rowCount(const QModelIndex& parent) const override; | ||
53 | virtual QVariant data(const QModelIndex& index, int role) const Q_DECL_OVERRIDE; | 53 | virtual QVariant data(const QModelIndex& index, int role) const override; | ||
54 | virtual bool setData(const QModelIndex& index, const QVariant& value, int role) Q_DECL_OVERRIDE; | 54 | virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override; | ||
55 | virtual QHash< int, QByteArray > roleNames() const Q_DECL_OVERRIDE; | 55 | virtual QHash< int, QByteArray > roleNames() const override; | ||
56 | 56 | | |||
57 | AppletLoader* loader() const { return m_loader; } | 57 | AppletLoader* loader() const { return m_loader; } | ||
58 | 58 | | |||
59 | Q_INVOKABLE void setAppletCollapsed(const QString &id, bool collapsed); | 59 | Q_INVOKABLE void setAppletCollapsed(const QString &id, bool collapsed); | ||
60 | Q_INVOKABLE void setAppletContentHeight(const QString& id, qreal height); | 60 | Q_INVOKABLE void setAppletContentHeight(const QString& id, qreal height); | ||
61 | Q_INVOKABLE QUrl imageUrl(const QString &id, const QString &imageName); | 61 | Q_INVOKABLE QUrl imageUrl(const QString &id, const QString &imageName); | ||
62 | 62 | | |||
63 | public Q_SLOTS: | 63 | public Q_SLOTS: | ||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 80 | public: | |||
129 | * Clear the context area by disabling all applets | 129 | * Clear the context area by disabling all applets | ||
130 | */ | 130 | */ | ||
131 | Q_INVOKABLE void clear(); | 131 | Q_INVOKABLE void clear(); | ||
132 | 132 | | |||
133 | Q_SIGNALS: | 133 | Q_SIGNALS: | ||
134 | void enabledAppletsChanged(); | 134 | void enabledAppletsChanged(); | ||
135 | 135 | | |||
136 | protected: | 136 | protected: | ||
137 | bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const Q_DECL_OVERRIDE; | 137 | bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override; | ||
138 | bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const Q_DECL_OVERRIDE; | 138 | bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override; | ||
139 | 139 | | |||
140 | private: | 140 | private: | ||
141 | AppletModel *m_appletModel; | 141 | AppletModel *m_appletModel; | ||
142 | }; | 142 | }; | ||
143 | 143 | | |||
144 | } | 144 | } | ||
145 | 145 | | |||
146 | #endif // APPLETMODEL_H | 146 | #endif // APPLETMODEL_H |