Changeset View
Changeset View
Standalone View
Standalone View
lib/sourcesmodel.h
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Line(s) | 77 | signals: | |||
---|---|---|---|---|---|
83 | void updateSearchTerm(const QString& text, int pos); | 83 | void updateSearchTerm(const QString& text, int pos); | ||
84 | 84 | | |||
85 | void runnerChanged(); | 85 | void runnerChanged(); | ||
86 | 86 | | |||
87 | public slots: | 87 | public slots: | ||
88 | void reloadConfiguration(); | 88 | void reloadConfiguration(); | ||
89 | void setQueryString(const QString& str); | 89 | void setQueryString(const QString& str); | ||
90 | void setQueryLimit(int limit); | 90 | void setQueryLimit(int limit); | ||
91 | /** | ||||
92 | * Clears the model content and resets the runner context, i.e. no new items will appear. | ||||
93 | */ | ||||
broulik: more like a flags thing :), also `TODO Plasma 6` this way round pls | |||||
Done differently now. It's not like the added function would've been useful to call from the outside anyway. fvogt: Done differently now. It's not like the added function would've been useful to call from the… | |||||
91 | void clear(); | 94 | void clear(); | ||
92 | 95 | | |||
93 | bool run(int index); | 96 | bool run(int index); | ||
94 | bool runAction(int index, int actionIndex); | 97 | bool runAction(int index, int actionIndex); | ||
95 | 98 | | |||
96 | Q_INVOKABLE QString getType(int index) const { | 99 | Q_INVOKABLE QString getType(int index) const { | ||
broulik: Yeah please avoid a boolean trap, `clearContent(false)` isn't very obvious | |||||
97 | return data(createIndex(index, 0), TypeRole).toString(); | 100 | return data(createIndex(index, 0), TypeRole).toString(); | ||
98 | } | 101 | } | ||
99 | 102 | | |||
100 | Q_INVOKABLE QMimeData *getMimeData(int index) const; | 103 | Q_INVOKABLE QMimeData *getMimeData(int index) const; | ||
101 | 104 | | |||
102 | private slots: | 105 | private slots: | ||
103 | void slotMatchesChanged(const QList<Plasma::QueryMatch>& list); | 106 | void slotMatchesChanged(const QList<Plasma::QueryMatch>& list); | ||
104 | void slotMatchAdded(const Plasma::QueryMatch& match); | 107 | void slotMatchAdded(const Plasma::QueryMatch& match); | ||
Show All 33 Lines |
more like a flags thing :), also TODO Plasma 6 this way round pls