Changeset View
Changeset View
Standalone View
Standalone View
runners/places/placesrunner.h
Show All 29 Lines | |||||
30 | { | 30 | { | ||
31 | Q_OBJECT | 31 | Q_OBJECT | ||
32 | 32 | | |||
33 | public: | 33 | public: | ||
34 | PlacesRunnerHelper(PlacesRunner *runner); | 34 | PlacesRunnerHelper(PlacesRunner *runner); | ||
35 | 35 | | |||
36 | public Q_SLOTS: | 36 | public Q_SLOTS: | ||
37 | void match(Plasma::RunnerContext *context); | 37 | void match(Plasma::RunnerContext *context); | ||
38 | void openDevice(const QString &udi); | ||||
38 | 39 | | |||
39 | private: | 40 | private: | ||
40 | KFilePlacesModel m_places; | 41 | KFilePlacesModel m_places; | ||
42 | QString m_pendingUdi; | ||||
41 | }; | 43 | }; | ||
42 | 44 | | |||
43 | class PlacesRunner : public Plasma::AbstractRunner | 45 | class PlacesRunner : public Plasma::AbstractRunner | ||
44 | { | 46 | { | ||
45 | Q_OBJECT | 47 | Q_OBJECT | ||
46 | 48 | | |||
47 | public: | 49 | public: | ||
48 | PlacesRunner(QObject* parent, const QVariantList &args); | 50 | PlacesRunner(QObject* parent, const QVariantList &args); | ||
49 | ~PlacesRunner() override; | 51 | ~PlacesRunner() override; | ||
50 | 52 | | |||
51 | void match(Plasma::RunnerContext &context) override; | 53 | void match(Plasma::RunnerContext &context) override; | ||
52 | void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action) override; | 54 | void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action) override; | ||
53 | QMimeData *mimeDataForMatch(const Plasma::QueryMatch &match) override; | 55 | QMimeData *mimeDataForMatch(const Plasma::QueryMatch &match) override; | ||
54 | 56 | | |||
55 | Q_SIGNALS: | 57 | Q_SIGNALS: | ||
56 | void doMatch(Plasma::RunnerContext *context); | 58 | void doMatch(Plasma::RunnerContext *context); | ||
57 | 59 | | |||
58 | private Q_SLOTS: | | |||
59 | void setupComplete(QModelIndex, bool); | | |||
60 | | ||||
61 | private: | 60 | private: | ||
62 | PlacesRunnerHelper *m_helper; | 61 | PlacesRunnerHelper *m_helper; | ||
63 | }; | 62 | }; | ||
64 | 63 | | |||
65 | 64 | | |||
66 | #endif | 65 | #endif |