possible to set drawWallpaper and containmentType
This commit is contained in:
parent
a2b30ffc09
commit
b6f2751ba2
@ -448,6 +448,26 @@ QScriptValue ContainmentInterface::applets()
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ContainmentInterface::setDrawWallpaper(bool drawWallpaper)
|
||||||
|
{
|
||||||
|
m_appletScriptEngine->setDrawWallpaper(drawWallpaper);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ContainmentInterface::drawWallpaper()
|
||||||
|
{
|
||||||
|
return m_appletScriptEngine->drawWallpaper();
|
||||||
|
}
|
||||||
|
|
||||||
|
ContainmentInterface::Type ContainmentInterface::containmentType() const
|
||||||
|
{
|
||||||
|
return (ContainmentInterface::Type)m_appletScriptEngine->containmentType();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ContainmentInterface::setContainmentType(ContainmentInterface::Type type)
|
||||||
|
{
|
||||||
|
m_appletScriptEngine->setContainmentType((Plasma::Containment::Type)type);
|
||||||
|
}
|
||||||
|
|
||||||
void ContainmentInterface::appletAddedForward(Plasma::Applet *applet, const QPointF &pos)
|
void ContainmentInterface::appletAddedForward(Plasma::Applet *applet, const QPointF &pos)
|
||||||
{
|
{
|
||||||
emit appletAdded(applet, pos);
|
emit appletAdded(applet, pos);
|
||||||
|
@ -357,13 +357,28 @@ class ContainmentInterface : public APPLETSUPERCLASS
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QScriptValue applets READ applets)
|
Q_PROPERTY(QScriptValue applets READ applets)
|
||||||
|
Q_PROPERTY(bool drawWallpaper READ drawWallpaper WRITE setDrawWallpaper)
|
||||||
|
Q_ENUMS(ContainmentType)
|
||||||
|
|
||||||
public:
|
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(AbstractJsAppletScript *parent);
|
ContainmentInterface(AbstractJsAppletScript *parent);
|
||||||
|
|
||||||
inline Plasma::Containment *containment() const { return static_cast<Plasma::Containment *>(m_appletScriptEngine->applet()); }
|
inline Plasma::Containment *containment() const { return static_cast<Plasma::Containment *>(m_appletScriptEngine->applet()); }
|
||||||
|
|
||||||
QScriptValue applets() ;
|
QScriptValue applets();
|
||||||
|
|
||||||
|
void setDrawWallpaper(bool drawWallpaper);
|
||||||
|
bool drawWallpaper();
|
||||||
|
Type containmentType() const;
|
||||||
|
void setContainmentType(Type type);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void appletAdded(QGraphicsWidget *applet, const QPointF &pos);
|
void appletAdded(QGraphicsWidget *applet, const QPointF &pos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user