|
|
@ -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()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|