summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-01-23 11:04:58 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-01-23 12:19:40 +0200
commit44df7a357fc3d9f977ed36b4199d996869a396e9 (patch)
tree69ec550c039bcc62e031dbccfc2895eb60ae522c /src
parent0817c3544683304153536a940ccd6fbdb8ec954c (diff)
Move qmlmultigraphs to examples
+Fix Q3DScene::isPointInPrimarySubView +Fix Q3DScene::isPointInSecondarySubView +Remove some unnecessary imports from examples Task-number: QTRD-2800 Change-Id: I5a9bc737c5ee92edbb514e76054adbb54076aef8 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/datavisualization/engine/q3dscene.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/datavisualization/engine/q3dscene.cpp b/src/datavisualization/engine/q3dscene.cpp
index c15610c1..74767762 100644
--- a/src/datavisualization/engine/q3dscene.cpp
+++ b/src/datavisualization/engine/q3dscene.cpp
@@ -199,8 +199,6 @@ void Q3DScene::setPrimarySubViewport(const QRect &primarySubViewport)
/*!
* Returns whether the given \a point resides inside the primary subview or not.
- * The method takes care of correctly mapping between OpenGL coordinates used in the
- * viewport definitions and the Qt event coordinate system used in the input system.
* \return \c true if the point is inside the primary subview.
*/
bool Q3DScene::isPointInPrimarySubView(const QPoint &point)
@@ -208,19 +206,15 @@ bool Q3DScene::isPointInPrimarySubView(const QPoint &point)
int x = point.x();
int y = point.y();
int areaMinX = d_ptr->m_primarySubViewport.x();
- int areaMaxX = d_ptr->m_viewport.x() + d_ptr->m_primarySubViewport.x()
- + d_ptr->m_primarySubViewport.width();
- int areaMaxY = d_ptr->m_viewport.y() + d_ptr->m_primarySubViewport.y()
- + d_ptr->m_primarySubViewport.height();
- int areaMinY = d_ptr->m_viewport.y() + d_ptr->m_primarySubViewport.y();
+ int areaMaxX = d_ptr->m_primarySubViewport.x() + d_ptr->m_primarySubViewport.width();
+ int areaMinY = d_ptr->m_primarySubViewport.y();
+ int areaMaxY = d_ptr->m_primarySubViewport.y() + d_ptr->m_primarySubViewport.height();
return ( x > areaMinX && x < areaMaxX && y > areaMinY && y < areaMaxY );
}
/*!
* Returns whether the given \a point resides inside the secondary subview or not.
- * The method takes care of correctly mapping between OpenGL coordinates used in the
- * viewport definitions and the Qt event coordinate system used in the input system.
* \return \c true if the point is inside the secondary subview.
*/
bool Q3DScene::isPointInSecondarySubView(const QPoint &point)
@@ -228,11 +222,9 @@ bool Q3DScene::isPointInSecondarySubView(const QPoint &point)
int x = point.x();
int y = point.y();
int areaMinX = d_ptr->m_secondarySubViewport.x();
- int areaMaxX = d_ptr->m_viewport.x() + d_ptr->m_secondarySubViewport.x()
- + d_ptr->m_secondarySubViewport.width();
- int areaMaxY = d_ptr->m_viewport.y() + d_ptr->m_secondarySubViewport.y()
- + d_ptr->m_secondarySubViewport.height();
- int areaMinY = d_ptr->m_viewport.y() + d_ptr->m_secondarySubViewport.y();
+ int areaMaxX = d_ptr->m_secondarySubViewport.x() + d_ptr->m_secondarySubViewport.width();
+ int areaMinY = d_ptr->m_secondarySubViewport.y();
+ int areaMaxY = d_ptr->m_secondarySubViewport.y() + d_ptr->m_secondarySubViewport.height();
return ( x > areaMinX && x < areaMaxX && y > areaMinY && y < areaMaxY );
}