Changeset View
Changeset View
Standalone View
Standalone View
plasmoidviewer/view.cpp
Show First 20 Lines • Show All 217 Lines • ▼ Show 20 Line(s) | 194 | { | |||
---|---|---|---|---|---|
218 | if (!c) { | 218 | if (!c) { | ||
219 | qCritical("Containment doesn't exist!"); | 219 | qCritical("Containment doesn't exist!"); | ||
220 | return; | 220 | return; | ||
221 | } | 221 | } | ||
222 | 222 | | |||
223 | setLocation(locationType); | 223 | setLocation(locationType); | ||
224 | } | 224 | } | ||
225 | 225 | | |||
226 | void View::emitExternalData(const QString &data) | ||||
227 | { | ||||
228 | if (data.isEmpty()) { | ||||
229 | return; | ||||
230 | } | ||||
231 | | ||||
232 | Plasma::Applet *applet = containment()->applets().constFirst(); | ||||
233 | | ||||
234 | QObject *graphicsObject = qobject_cast<QQuickItem *>(applet->property("_plasma_graphicObject").value<QObject *>()); | ||||
235 | if (!graphicsObject) { | ||||
236 | return; | ||||
237 | } | ||||
238 | | ||||
239 | QMetaObject::invokeMethod(graphicsObject, "externalData", Q_ARG(QString, QString()), | ||||
240 | Q_ARG(QVariant, data)); | ||||
241 | } | ||||
242 | | ||||
226 | bool View::konsoleVisible() | 243 | bool View::konsoleVisible() | ||
227 | { | 244 | { | ||
228 | return m_konsoleVisible; | 245 | return m_konsoleVisible; | ||
229 | } | 246 | } | ||
230 | 247 | | |||
231 | void View::changeLocation(int location) | 248 | void View::changeLocation(int location) | ||
232 | { | 249 | { | ||
233 | QString locationType = "floating"; | 250 | QString locationType = "floating"; | ||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |