void PathStrokeRenderer::mousePressEvent(QMouseEvent *e) { if (!m_fingerPointMapping.isEmpty()) return; setDescriptionEnabled(false); m_activePoint = -1; qreal distance = -1; for (int i=0; i<m_points.size(); ++i) { qreal d = QLineF(e->pos(), m_points.at(i)).length(); if ((distance < 0 && d < 8 * m_pointSize) || d < distance) { distance = d; m_activePoint = i; } } if (m_activePoint != -1) { m_wasAnimated = m_timer.isActive(); setAnimation(false); mouseMoveEvent(e); } // If we're not running in small screen mode, always assume we're dragging m_mouseDrag = !m_smallScreen; m_mousePress = e->pos(); }
void PathDeformRenderer::mousePressEvent(QMouseEvent *e) { setDescriptionEnabled(false); m_repaintTimer.stop(); m_offset = QPointF(); if (QLineF(m_pos, e->pos()).length() <= m_radius) m_offset = m_pos - e->pos(); m_mousePress = e->pos(); // If we're not running in small screen mode, always assume we're dragging m_mouseDrag = !m_smallScreen; mouseMoveEvent(e); }
void CompositionRenderer::mousePressEvent(QMouseEvent *e) { setDescriptionEnabled(false); QRectF circle = rectangle_around(m_circle_pos); if (circle.contains(e->pos())) { m_current_object = Circle; m_offset = circle.center() - e->pos(); } else { m_current_object = NoObject; } if (m_animation_enabled) { killTimer(m_animationTimer); m_animationTimer = 0; } }
void GradientRenderer::mousePressEvent(QMouseEvent *) { setDescriptionEnabled(false); }
void XFormView::mousePressEvent(QMouseEvent *) { setDescriptionEnabled(false); }