summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorAntti Hölttä <AHoelttae@luxoft.com>2018-12-06 14:17:32 +0100
committerAntti Hölttä <AHoelttae@luxoft.com>2019-03-18 16:33:53 +0100
commit65b3492325672bc24400edbdeb0aa91b46cb8c8e (patch)
tree0e4eb395c26d638452e73ef80b16fd1b58ad0f10 /plugin
parent1b7b25b06aaac3889be21aaa34654af9f5ac0262 (diff)
Add demo page with a map and POIs, navigated with a Gamepad
Diffstat (limited to 'plugin')
-rw-r--r--plugin/spatialnavigation360.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/plugin/spatialnavigation360.cpp b/plugin/spatialnavigation360.cpp
index bddcc5a..f7d1e62 100644
--- a/plugin/spatialnavigation360.cpp
+++ b/plugin/spatialnavigation360.cpp
@@ -121,7 +121,6 @@ CursorNavigationAttached* SpatialNavigation360::getNextCandidate(
return nullptr;
if (!currentItem && candidates.size()) {
- qDebug() << "the spatial chooser falling back to first child" << candidates.first();
return candidates.first();
}
@@ -139,14 +138,10 @@ CursorNavigationAttached* SpatialNavigation360::getNextCandidate(
quadrants[2] = sectorsOverlap(angle1, angle2, -M_PI, -M_PI_2);
quadrants[3] = sectorsOverlap(angle1, angle2, -M_PI_2, 0);
- qWarning() << "navigation360: beam angles: " << angle1 << " , " << angle2;
- qWarning() << "navigation360: quadrants = " << quadrants;
-
const QRectF currentItemSceneRect = currentItem->item()->mapRectToScene(
QRectF( 0, 0, currentItem->item()->width(), currentItem->item()->height() ));
const QPointF origin = currentItemSceneRect.center();
- qWarning() << "origin = " << origin;
//item that overlaps the center of the selector beam
CursorNavigationAttached* directHitItem = nullptr;
@@ -167,17 +162,14 @@ CursorNavigationAttached* SpatialNavigation360::getNextCandidate(
if (isRectIncluded(quadrants, itemSceneRect, origin)) {
std::pair<qreal,qreal> sector = getSector(itemSceneRect, origin);
- qWarning() << "item " << iter->item() << " rect = " << itemSceneRect << " sector " << sector;
if (angleIsBetween(cmd.angle, sector.first, sector.second)) {
- qWarning() << "is direct hit";
qreal dist = rectDistance(itemSceneRect, currentItemSceneRect);
if (!directHitItem || dist < directHitDistance) {
directHitDistance = dist;
directHitItem = iter;
}
} else if (!directHitItem && sectorsOverlap(angle1, angle2, sector.first, sector.second)) {
- qWarning() << "is within tolerances";
qreal dist = rectDistance(itemSceneRect, currentItemSceneRect);
if (!withinToleranceItem || dist < withinToleranceDistance) {
withinToleranceDistance = dist;