use the global type for ContainmentType

This commit is contained in:
Marco Martin 2013-08-20 17:21:05 +02:00
parent 4058e1da66
commit 98612b983d
2 changed files with 7 additions and 16 deletions

View File

@ -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

View File

@ -35,20 +35,11 @@ class ContainmentInterface : public AppletInterface
Q_OBJECT
Q_PROPERTY(QList <QObject *> 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<Plasma::Containment *>(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;