Show context menu VSimplePoint and VSimpleCurve.
--HG-- branch : develop
This commit is contained in:
parent
8d373f91af
commit
1d059ca9a5
|
@ -149,6 +149,12 @@ QVariant VSimpleCurve::itemChange(QGraphicsItem::GraphicsItemChange change, cons
|
|||
return QGraphicsPathItem::itemChange(change, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VSimpleCurve::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||
{
|
||||
emit ShowContextMenu(event);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VSimpleCurve::ShowPath()
|
||||
{
|
||||
|
|
|
@ -69,6 +69,7 @@ protected:
|
|||
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
|
||||
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
|
||||
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE;
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(VSimpleCurve)
|
||||
|
|
|
@ -263,3 +263,9 @@ QVariant VSimplePoint::itemChange(QGraphicsItem::GraphicsItemChange change, cons
|
|||
|
||||
return QGraphicsEllipseItem::itemChange(change, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VSimplePoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||
{
|
||||
emit ShowContextMenu(event);
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ protected:
|
|||
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
|
||||
virtual void keyReleaseEvent ( QKeyEvent * event ) Q_DECL_OVERRIDE;
|
||||
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE;
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(VSimplePoint)
|
||||
|
|
Loading…
Reference in New Issue
Block a user