tasksparabolic:use view triggering values

work/spdx
Michail Vourlakos 4 years ago
parent 259f04f7c9
commit b5ceb4d91a

@ -1292,6 +1292,10 @@ void View::setCurrentParabolicItem(QQuickItem *item)
return; return;
} }
if (item && m_currentParabolicItem) {
QMetaObject::invokeMethod(item, "parabolicExited", Qt::QueuedConnection);
}
m_currentParabolicItem = item; m_currentParabolicItem = item;
emit currentParabolicItemChanged(); emit currentParabolicItemChanged();
} }
@ -1440,7 +1444,7 @@ bool View::event(QEvent *e)
//! sending move event to parabolic item //! sending move event to parabolic item
QMetaObject::invokeMethod(m_currentParabolicItem, QMetaObject::invokeMethod(m_currentParabolicItem,
"parabolicMove", "parabolicMove",
Qt::DirectConnection, Qt::QueuedConnection,
Q_ARG(qreal, internal.x()), Q_ARG(qreal, internal.x()),
Q_ARG(qreal, internal.y())); Q_ARG(qreal, internal.y()));
} else { } else {
@ -1587,14 +1591,13 @@ void View::onCurrentParabolicItemChanged()
m_parabolicItemNullifier.stop(); m_parabolicItemNullifier.stop();
if (m_currentParabolicItem != nullptr) { if (m_currentParabolicItem != nullptr) {
//! send the ParabolicEnter because the
QPointF internal = m_currentParabolicItem->mapFromScene(m_lastOrphanParabolicMove); QPointF internal = m_currentParabolicItem->mapFromScene(m_lastOrphanParabolicMove);
if (m_currentParabolicItem->contains(internal)) { if (m_currentParabolicItem->contains(internal)) {
//! sending enter event to parabolic item //! sending enter event to parabolic item
QMetaObject::invokeMethod(m_currentParabolicItem, QMetaObject::invokeMethod(m_currentParabolicItem,
"parabolicEntered", "parabolicEntered",
Qt::DirectConnection, Qt::QueuedConnection,
Q_ARG(qreal, internal.x()), Q_ARG(qreal, internal.x()),
Q_ARG(qreal, internal.y())); Q_ARG(qreal, internal.y()));
} }

@ -48,16 +48,6 @@ Item {
} }
} }
Connections {
target: appletItem.parabolic
onCurrentParabolicItemChanged: {
if (appletItem.parabolic.currentParabolicItem !== _parabolicArea) {
_parabolicArea.parabolicExited();
}
}
}
onParabolicEntered: { onParabolicEntered: {
appletItem.parabolic.stopRestoreZoomTimer(); appletItem.parabolic.stopRestoreZoomTimer();

@ -46,16 +46,6 @@ Item {
} }
} }
Connections {
target: taskItem.parabolic
onCurrentParabolicItemChanged: {
if (taskItem.parabolic.currentParabolicItem !== _parabolicArea) {
_parabolicArea.parabolicExited();
}
}
}
Connections{ Connections{
target: root target: root
@ -112,7 +102,8 @@ Item {
//! do not send any parabolic mouse movement. At this point mouseX/Y are NOT valid/accurate //! do not send any parabolic mouse movement. At this point mouseX/Y are NOT valid/accurate
var current = root.isHorizontal ? mouseX : mouseY; var current = root.isHorizontal ? mouseX : mouseY;
console.log(" current spot ENTER : " + current); icList.currentSpot = current;
calculateParabolicScales(current);
} }
onParabolicMove: { onParabolicMove: {
@ -120,7 +111,6 @@ Item {
lastMouseY = mouseY; lastMouseY = mouseY;
var mousePos = root.isHorizontal ? mouseX : mouseY; var mousePos = root.isHorizontal ? mouseX : mouseY;
console.log(" current move : " + mousePos);
if (mousePos<0 || (inBlockingAnimation && !(inAttentionAnimation||inFastRestoreAnimation||inMimicParabolicAnimation))) if (mousePos<0 || (inBlockingAnimation && !(inAttentionAnimation||inFastRestoreAnimation||inMimicParabolicAnimation)))
return; return;

Loading…
Cancel
Save