summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorAntti Hölttä <AHoelttae@luxoft.com>2018-12-18 11:38:37 +0100
committerAntti Hölttä <AHoelttae@luxoft.com>2019-03-18 16:34:23 +0100
commitd40b79cb1d3304f113df3091662760f585ee389e (patch)
tree70fb2d77ad5bd8026f487cb39322e8c587ca24ee /plugin
parentfe5883489b5fffc2a833daa4d6a18cef1ac10696 (diff)
Add more features for the demo app
Add a common cursor indicator item that all navigable items may use for visualizing the cursor. Add a cursor navigable delegate. Make lists more generic by adding a CNItemDelegate. Add CNFlipButton that has flipping animations when used with CursorNavigation. Update Page4 with the new button type.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/cursornavigation.cpp2
-rw-r--r--plugin/cursornavigationattached.cpp7
-rw-r--r--plugin/spatialnavigation360.cpp6
3 files changed, 6 insertions, 9 deletions
diff --git a/plugin/cursornavigation.cpp b/plugin/cursornavigation.cpp
index 9049c82..bf2d390 100644
--- a/plugin/cursornavigation.cpp
+++ b/plugin/cursornavigation.cpp
@@ -41,7 +41,7 @@ CursorNavigationAttached *CursorNavigation::find(qreal angle, qreal tolerance, b
if (!m_currentItem)
return defaultItem();
- qWarning() << "find next item, angle = " << angle << " tolerance = " << tolerance << " discrete = " << discrete;
+ //qWarning() << "find next item, angle = " << angle << " tolerance = " << tolerance << " discrete = " << discrete;
QList<CursorNavigationAttached*> candidates;
diff --git a/plugin/cursornavigationattached.cpp b/plugin/cursornavigationattached.cpp
index 1757d12..39a7888 100644
--- a/plugin/cursornavigationattached.cpp
+++ b/plugin/cursornavigationattached.cpp
@@ -176,11 +176,8 @@ void CursorNavigationAttached::moveLeft()
void CursorNavigationAttached::activate()
{
- if (m_cursorNavigation) {
- CursorNavigationAttached *item = m_cursorNavigation->m_currentItem;
- if (m_cursorNavigation->action(Activate) && item)
- item->activated();
- }
+ if (m_cursorNavigation && m_cursorNavigation->m_currentItem)
+ m_cursorNavigation->m_currentItem->activated();
}
void CursorNavigationAttached::moveForward()
diff --git a/plugin/spatialnavigation360.cpp b/plugin/spatialnavigation360.cpp
index 0e6d19b..534a3d2 100644
--- a/plugin/spatialnavigation360.cpp
+++ b/plugin/spatialnavigation360.cpp
@@ -115,7 +115,7 @@ CursorNavigationAttached* SpatialNavigation360::getNextCandidate(
* -remember to use current item's coord system as the reference!!!
*/
- qWarning() << "##### navigation360: start, angle = " << cmd.angle << " tolerance = " << cmd.angleTolerance;
+ //qWarning() << "##### navigation360: start, angle = " << cmd.angle << " tolerance = " << cmd.angleTolerance;
if (candidates.isEmpty())
return nullptr;
@@ -179,8 +179,8 @@ CursorNavigationAttached* SpatialNavigation360::getNextCandidate(
}
}
- qWarning() << "##### end, directHit = " <<
- directHitItem << " withinTolerances = " << withinToleranceItem;
+ //qWarning() << "##### end, directHit = " <<
+ // directHitItem << " withinTolerances = " << withinToleranceItem;
if (directHitItem)
return directHitItem;