Remove unnecessary method

This commit is contained in:
joshua
2021-02-12 19:37:07 +01:00
parent a1779d1a7a
commit dea926e4b4
2 changed files with 0 additions and 20 deletions

View File

@@ -1264,24 +1264,6 @@ void CustomElementGraphicPart::drawShadowShape(QPainter *painter)
painter -> restore (); painter -> restore ();
} }
/**
@brief CustomElementGraphicPart::itemChange
Reimplemented from QGraphicsObject.
If the item position change call updateCurrentPartEditor()
the change is always send to QGraphicsObject
@param change
@param value
@return the returned value of QGraphicsObject::itemChange
*/
QVariant CustomElementGraphicPart::itemChange(GraphicsItemChange change, const QVariant &value)
{
if (scene())
if (change == QGraphicsItem::ItemPositionChange || change == QGraphicsItem::ItemPositionHasChanged)
updateCurrentPartEditor();
return(QGraphicsObject::itemChange(change, value));
}
/** /**
@brief CustomElementGraphicPart::hoverEnterEvent @brief CustomElementGraphicPart::hoverEnterEvent
Reimplemented from QGraphicsObject. Reimplemented from QGraphicsObject.

View File

@@ -309,8 +309,6 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
void applyStylesToQPainter(QPainter &) const; void applyStylesToQPainter(QPainter &) const;
void drawShadowShape (QPainter *painter); void drawShadowShape (QPainter *painter);
QVariant itemChange(GraphicsItemChange change,
const QVariant &value) override;
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override; void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override; void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;