Exemplo n.º 1
0
  void DrawWidget::mouseMoveEvent(QMouseEvent * e)
  {
    QGLWidget::mouseMoveEvent(e);

    m2::PointD const pt = GetDevicePoint(e);
    if (!pt.EqualDxDy(m_taskPoint, m_framework->GetVisualScale() * 10.0))
    {
      // moved far from start point - do not show balloon
      m_isCleanSingleClick = false;
      KillPressTask();
    }

    if (m_framework->GetGuiController()->OnTapMoved(pt))
      return;

    if (m_isDrag)
      m_framework->DoDrag(GetDragEvent(e));

    if (m_isRotate)
      m_framework->DoRotate(GetRotateEvent(e->pos()));
  }
Exemplo n.º 2
0
bool MyPositionController::AlmostCurrentPosition(m2::PointD const & pos) const
{
  double const kPositionEqualityDelta = 1e-5;
  return pos.EqualDxDy(m_position, kPositionEqualityDelta);
}
Exemplo n.º 3
0
 static bool equal_scr_pts(m2::PointD const & p1, m2::PointD const & p2)
 {
   return p1.EqualDxDy(p2, 0.5);
 }
Exemplo n.º 4
0
 static bool equal_glb_pts(m2::PointD const & p1, m2::PointD const & p2)
 {
   return p1.EqualDxDy(p2, 1.0E-12);
 }