diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index 387a26ef3..9d8edac51 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -106,14 +106,14 @@ bool ContainmentInterface::drawWallpaper() return m_appletScriptEngine->drawWallpaper(); } -ContainmentInterface::Type ContainmentInterface::containmentType() const +Plasma::Types::ContainmentType ContainmentInterface::containmentType() const { - return (ContainmentInterface::Type)m_appletScriptEngine->containmentType(); + return m_appletScriptEngine->containmentType(); } -void ContainmentInterface::setContainmentType(ContainmentInterface::Type type) +void ContainmentInterface::setContainmentType(Plasma::Types::ContainmentType type) { - m_appletScriptEngine->setContainmentType((Plasma::Types::ContainmentType)type); + m_appletScriptEngine->setContainmentType(type); } int ContainmentInterface::screen() const diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.h b/src/scriptengines/qml/plasmoid/containmentinterface.h index c2cc18e06..dad74962e 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.h +++ b/src/scriptengines/qml/plasmoid/containmentinterface.h @@ -35,20 +35,11 @@ class ContainmentInterface : public AppletInterface Q_OBJECT Q_PROPERTY(QList applets READ applets NOTIFY appletsChanged) Q_PROPERTY(bool drawWallpaper READ drawWallpaper WRITE setDrawWallpaper) - Q_PROPERTY(Type containmentType READ containmentType WRITE setContainmentType) + Q_PROPERTY(Plasma::Types::ContainmentType containmentType READ containmentType WRITE setContainmentType) Q_PROPERTY(int screen READ screen NOTIFY screenChanged) Q_PROPERTY(QString activity READ activity NOTIFY activityChanged) - Q_ENUMS(Type) public: - enum Type { - NoContainmentType = -1, /**< @internal */ - DesktopContainment = 0, /**< A desktop containment */ - PanelContainment, /**< A desktop panel */ - CustomContainment = 127, /**< A containment that is neither a desktop nor a panel - but something application specific */ - CustomPanelContainment = 128 /**< A customized desktop panel */ - }; ContainmentInterface(DeclarativeAppletScript *parent); //Not for QML inline Plasma::Containment *containment() const { return static_cast(m_appletScriptEngine->applet()->containment()); } @@ -60,8 +51,8 @@ public: void setDrawWallpaper(bool drawWallpaper); bool drawWallpaper(); - Type containmentType() const; - void setContainmentType(Type type); + Plasma::Types::ContainmentType containmentType() const; + void setContainmentType(Plasma::Types::ContainmentType type); int screen() const; QString activity() const;