bind screen() and Corona::screenGeometry()
This commit is contained in:
parent
dde9d31775
commit
0dda9c72ee
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#include <Plasma/Plasma>
|
#include <Plasma/Plasma>
|
||||||
#include <Plasma/Applet>
|
#include <Plasma/Applet>
|
||||||
|
#include <Plasma/Corona>
|
||||||
#include <Plasma/Context>
|
#include <Plasma/Context>
|
||||||
#include <Plasma/Package>
|
#include <Plasma/Package>
|
||||||
|
|
||||||
@ -473,6 +474,20 @@ void ContainmentInterface::setContainmentType(ContainmentInterface::Type type)
|
|||||||
m_appletScriptEngine->setContainmentType((Plasma::Containment::Type)type);
|
m_appletScriptEngine->setContainmentType((Plasma::Containment::Type)type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ContainmentInterface::screen() const
|
||||||
|
{
|
||||||
|
return screen();
|
||||||
|
}
|
||||||
|
|
||||||
|
QRect ContainmentInterface::screenGeometry(int id) const
|
||||||
|
{
|
||||||
|
if (containment()->corona()) {
|
||||||
|
return containment()->corona()->screenGeometry(id);
|
||||||
|
} else {
|
||||||
|
return QRect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
@ -361,6 +361,7 @@ class ContainmentInterface : public APPLETSUPERCLASS
|
|||||||
Q_PROPERTY(QScriptValue applets READ applets)
|
Q_PROPERTY(QScriptValue applets READ applets)
|
||||||
Q_PROPERTY(bool drawWallpaper READ drawWallpaper WRITE setDrawWallpaper)
|
Q_PROPERTY(bool drawWallpaper READ drawWallpaper WRITE setDrawWallpaper)
|
||||||
Q_PROPERTY(Type containmentType READ containmentType WRITE setContainmentType)
|
Q_PROPERTY(Type containmentType READ containmentType WRITE setContainmentType)
|
||||||
|
Q_PROPERTY(int screen READ screen)
|
||||||
Q_ENUMS(Type)
|
Q_ENUMS(Type)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -382,6 +383,9 @@ public:
|
|||||||
bool drawWallpaper();
|
bool drawWallpaper();
|
||||||
Type containmentType() const;
|
Type containmentType() const;
|
||||||
void setContainmentType(Type type);
|
void setContainmentType(Type type);
|
||||||
|
int screen() const;
|
||||||
|
|
||||||
|
Q_INVOKABLE QRect screenGeometry(int id) const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void appletAdded(QGraphicsWidget *applet, const QPointF &pos);
|
void appletAdded(QGraphicsWidget *applet, const QPointF &pos);
|
||||||
|
Loading…
Reference in New Issue
Block a user