experim API to move plamoids between containments
This commit is contained in:
parent
0b83de8fbb
commit
97831b616f
@ -230,6 +230,21 @@ void ContainmentInterface::setAppletArgs(Plasma::Applet *applet, const QString &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QObject *ContainmentInterface::containmentAt(int x, int y)
|
||||||
|
{
|
||||||
|
foreach (Plasma::Containment *c, containment()->corona()->containments()) {
|
||||||
|
ContainmentInterface *contInterface = c->property("_plasma_graphicObject").value<ContainmentInterface *>();
|
||||||
|
|
||||||
|
if (contInterface) {
|
||||||
|
QWindow *w = contInterface->window();
|
||||||
|
if (w && w->geometry().contains(QPoint(window()->x(), window()->y()) + QPoint(x, y))) {
|
||||||
|
return contInterface;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void ContainmentInterface::processMimeData(QMimeData *mimeData, int x, int y)
|
void ContainmentInterface::processMimeData(QMimeData *mimeData, int x, int y)
|
||||||
{
|
{
|
||||||
if (!mimeData) {
|
if (!mimeData) {
|
||||||
|
@ -115,6 +115,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
Q_INVOKABLE void processMimeData(QMimeData *data, int x, int y);
|
Q_INVOKABLE void processMimeData(QMimeData *data, int x, int y);
|
||||||
|
|
||||||
|
Q_INVOKABLE QObject *containmentAt(int x, int y);
|
||||||
|
|
||||||
static ContainmentInterface *qmlAttachedProperties(QObject *object)
|
static ContainmentInterface *qmlAttachedProperties(QObject *object)
|
||||||
{
|
{
|
||||||
return qobject_cast<ContainmentInterface *>(AppletQuickItem::qmlAttachedProperties(object));
|
return qobject_cast<ContainmentInterface *>(AppletQuickItem::qmlAttachedProperties(object));
|
||||||
|
Loading…
Reference in New Issue
Block a user