Correct support for Tool Group.
--HG-- branch : feature
This commit is contained in:
parent
182d07f761
commit
bcec065872
|
@ -131,3 +131,14 @@ void VSimpleCurve::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||||
SetPen(this, currentColor, WidthHairLine(patternUnit));
|
SetPen(this, currentColor, WidthHairLine(patternUnit));
|
||||||
QGraphicsPathItem::hoverLeaveEvent(event);
|
QGraphicsPathItem::hoverLeaveEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
QVariant VSimpleCurve::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
|
||||||
|
{
|
||||||
|
if (change == QGraphicsItem::ItemSelectedChange)
|
||||||
|
{
|
||||||
|
emit Selected(value.toBool(), id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return QGraphicsPathItem::itemChange(change, value);
|
||||||
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ protected:
|
||||||
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE;
|
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE;
|
||||||
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
|
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
|
||||||
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
|
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
|
||||||
|
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(VSimpleCurve)
|
Q_DISABLE_COPY(VSimpleCurve)
|
||||||
|
|
|
@ -174,7 +174,7 @@ void VSimplePoint::PointChoosed()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VSimplePoint::PointSelected(bool selected)
|
void VSimplePoint::PointSelected(bool selected)
|
||||||
{
|
{
|
||||||
emit Selected(selected, id);
|
setSelected(selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user