Changeset View
Changeset View
Standalone View
Standalone View
components/shellprivate/widgetexplorer/widgetexplorer.h
Context not available. | |||||
35 | class Applet; | 35 | class Applet; | ||
---|---|---|---|---|---|
36 | } | 36 | } | ||
37 | class WidgetExplorerPrivate; | 37 | class WidgetExplorerPrivate; | ||
38 | class WidgetExplorerAssistant; | ||||
38 | 39 | | |||
39 | //We need to access the separator property that is not exported by QAction | 40 | //We need to access the separator property that is not exported by QAction | ||
40 | class WidgetAction : public QAction | 41 | class WidgetAction : public QAction | ||
Context not available. | |||||
95 | Q_PROPERTY(Plasma::Containment *containment READ containment WRITE setContainment NOTIFY containmentChanged) | 96 | Q_PROPERTY(Plasma::Containment *containment READ containment WRITE setContainment NOTIFY containmentChanged) | ||
96 | 97 | | |||
97 | public: | 98 | public: | ||
99 | enum class WidgetSource { | ||||
100 | Network, | ||||
101 | Filesystem | ||||
102 | }; | ||||
103 | Q_ENUM(WidgetSource) | ||||
104 | | ||||
98 | explicit WidgetExplorer(QObject *parent = nullptr); | 105 | explicit WidgetExplorer(QObject *parent = nullptr); | ||
99 | ~WidgetExplorer() override; | 106 | ~WidgetExplorer() override; | ||
100 | 107 | | |||
Context not available. | |||||
142 | */ | 149 | */ | ||
143 | Q_INVOKABLE void uninstall(const QString &pluginName); | 150 | Q_INVOKABLE void uninstall(const QString &pluginName); | ||
144 | 151 | | |||
152 | //external assistant to open and to keep widget dialogs | ||||
153 | //if we want to use it then it should be set before first getNewWidgets dialog is opened | ||||
154 | Q_INVOKABLE void setExternalAssistant(WidgetExplorerAssistant *assistant); | ||||
155 | | ||||
145 | void classBegin() override; | 156 | void classBegin() override; | ||
146 | void componentComplete() override; | 157 | void componentComplete() override; | ||
147 | 158 | | |||
Context not available. | |||||
159 | * Adds currently selected applets | 170 | * Adds currently selected applets | ||
160 | */ | 171 | */ | ||
161 | void addApplet(const QString &pluginName); | 172 | void addApplet(const QString &pluginName); | ||
162 | void openWidgetFile(); | | |||
163 | void downloadWidgets(); | | |||
164 | 173 | | |||
165 | Q_SIGNALS: | 174 | Q_SIGNALS: | ||
166 | void showSpecialFiltersChanged() const; | 175 | void showSpecialFiltersChanged() const; | ||
Context not available. | |||||
168 | protected Q_SLOTS: | 177 | protected Q_SLOTS: | ||
169 | void immutabilityChanged(Plasma::Types::ImmutabilityType); | 178 | void immutabilityChanged(Plasma::Types::ImmutabilityType); | ||
170 | 179 | | |||
180 | protected: | ||||
181 | void openWidgetDialog(WidgetExplorer::WidgetSource source); | ||||
182 | | ||||
171 | private: | 183 | private: | ||
172 | Q_PRIVATE_SLOT(d, void appletAdded(Plasma::Applet*)) | 184 | Q_PRIVATE_SLOT(d, void appletAdded(Plasma::Applet*)) | ||
173 | Q_PRIVATE_SLOT(d, void appletRemoved(Plasma::Applet*)) | 185 | Q_PRIVATE_SLOT(d, void appletRemoved(Plasma::Applet*)) | ||
Context not available. | |||||
177 | friend class WidgetExplorerPrivate; | 189 | friend class WidgetExplorerPrivate; | ||
178 | }; | 190 | }; | ||
179 | 191 | | |||
180 | | ||||
181 | #endif // WIDGETEXPLORER_H | 192 | #endif // WIDGETEXPLORER_H | ||
Context not available. |