Changeset View
Changeset View
Standalone View
Standalone View
containmentactions/applauncher/launch.h
Show All 20 Lines | |||||
21 | #define SWITCHWINDOW_HEADER | 21 | #define SWITCHWINDOW_HEADER | ||
22 | 22 | | |||
23 | #include <QMenu> | 23 | #include <QMenu> | ||
24 | 24 | | |||
25 | #include <KServiceGroup> | 25 | #include <KServiceGroup> | ||
26 | 26 | | |||
27 | #include <plasma/containmentactions.h> | 27 | #include <plasma/containmentactions.h> | ||
28 | 28 | | |||
29 | #include "ui_config.h" | ||||
30 | | ||||
29 | class QAction; | 31 | class QAction; | ||
30 | class QMenu; | 32 | class QMenu; | ||
31 | 33 | | |||
32 | class AppLauncher : public Plasma::ContainmentActions | 34 | class AppLauncher : public Plasma::ContainmentActions | ||
33 | { | 35 | { | ||
34 | Q_OBJECT | 36 | Q_OBJECT | ||
35 | public: | 37 | public: | ||
36 | AppLauncher(QObject* parent, const QVariantList& args); | 38 | AppLauncher(QObject* parent, const QVariantList& args); | ||
37 | ~AppLauncher() override; | 39 | ~AppLauncher() override; | ||
38 | 40 | | |||
39 | void init(const KConfigGroup &config); | 41 | void init(const KConfigGroup &config); | ||
40 | 42 | | |||
41 | QList<QAction*> contextualActions() override; | 43 | QList<QAction*> contextualActions() override; | ||
42 | 44 | | |||
45 | QWidget *createConfigurationInterface(QWidget* parent) override; | ||||
46 | void configurationAccepted() override; | ||||
47 | | ||||
48 | void restore(const KConfigGroup &config) override; | ||||
49 | void save(KConfigGroup &config) override; | ||||
50 | | ||||
43 | protected: | 51 | protected: | ||
44 | void makeMenu(QMenu *menu, const KServiceGroup::Ptr group); | 52 | void makeMenu(QMenu *menu, const KServiceGroup::Ptr group); | ||
45 | 53 | | |||
46 | private: | 54 | private: | ||
47 | KServiceGroup::Ptr m_group; | 55 | KServiceGroup::Ptr m_group; | ||
48 | QList<QAction *> m_actions; | 56 | QList<QAction *> m_actions; | ||
57 | | ||||
58 | Ui::Config m_ui; | ||||
59 | bool m_showAppsByName = false; | ||||
49 | }; | 60 | }; | ||
50 | 61 | | |||
51 | 62 | | |||
52 | #endif | 63 | #endif |