Simple curve ignore press event and allow move curve by mouse.
--HG-- branch : feature
This commit is contained in:
parent
0deaa1b7b4
commit
99ebbc3ed9
|
@ -204,6 +204,12 @@ void VToolSplinePath::ControlPointChangePosition(const qint32 &indexSpline, cons
|
||||||
qApp->getUndoStack()->push(moveSplPath);
|
qApp->getUndoStack()->push(moveSplPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VToolSplinePath::EnableToolMove(bool move)
|
||||||
|
{
|
||||||
|
this->setFlag(QGraphicsItem::ItemIsMovable, move);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief UpdateControlPoints update position points control points in file.
|
* @brief UpdateControlPoints update position points control points in file.
|
||||||
|
|
|
@ -73,6 +73,7 @@ public slots:
|
||||||
|
|
||||||
void ControlPointChangePosition(const qint32 &indexSpline, const SplinePointPosition &position,
|
void ControlPointChangePosition(const qint32 &indexSpline, const SplinePointPosition &position,
|
||||||
const QPointF &pos);
|
const QPointF &pos);
|
||||||
|
virtual void EnableToolMove(bool move);
|
||||||
protected:
|
protected:
|
||||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||||
virtual void RefreshDataInFile();
|
virtual void RefreshDataInFile();
|
||||||
|
|
|
@ -144,6 +144,12 @@ void VSimpleCurve::SetCurrentColor(const QColor &value)
|
||||||
setPen(QPen(CorrectColor(currentColor), pen().widthF()));
|
setPen(QPen(CorrectColor(currentColor), pen().widthF()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VSimpleCurve::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
|
{
|
||||||
|
event->ignore();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QColor VSimpleCurve::CorrectColor(const QColor &color) const
|
QColor VSimpleCurve::CorrectColor(const QColor &color) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,6 +60,7 @@ signals:
|
||||||
void Choosed(quint32 id);
|
void Choosed(quint32 id);
|
||||||
void HoverPath(quint32 id, SimpleCurvePoint curvePosition, PathDirection direction);
|
void HoverPath(quint32 id, SimpleCurvePoint curvePosition, PathDirection direction);
|
||||||
protected:
|
protected:
|
||||||
|
virtual void mousePressEvent(QGraphicsSceneMouseEvent * event);
|
||||||
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event );
|
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event );
|
||||||
virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event );
|
virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event );
|
||||||
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
|
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user