[TechDraw] Remove uneeded redefinitions of inherited functions

This commit is contained in:
Benjamin Bræstrup Sayoc
2022-08-18 00:38:49 +02:00
committed by WandererFan
parent f5c5eec3bb
commit 8f067e02f3
8 changed files with 0 additions and 80 deletions

View File

@@ -59,24 +59,6 @@ QGMarker::QGMarker(int idx) : QGIVertex(idx),
setFlag(QGraphicsItem::ItemIsMovable, true);
}
QVariant QGMarker::itemChange(GraphicsItemChange change, const QVariant &value)
{
// Base::Console().Message("QGMarker::itemChange(%d)\n",change);
return QGIVertex::itemChange(change, value);
}
void QGMarker::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
// Base::Console().Message("QGMarker::hoverEnterEvent(%d)\n",getProjIndex());
QGIVertex::hoverEnterEvent(event);
}
void QGMarker::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
// Base::Console().Message("QGMarker::hoverLeaveEvent(%d)\n",getProjIndex());
QGIVertex::hoverLeaveEvent(event);
}
void QGMarker::mousePressEvent(QGraphicsSceneMouseEvent * event)
{
// Base::Console().Message("QGMarker::mousePressEvent() - focustype: %d\n",
@@ -94,12 +76,6 @@ void QGMarker::mousePressEvent(QGraphicsSceneMouseEvent * event)
QGIVertex::mousePressEvent(event);
}
void QGMarker::mouseMoveEvent(QGraphicsSceneMouseEvent * event)
{
// Base::Console().Message("QGMarker::mouseMoveEvent(%d)\n", getProjIndex());
QGIVertex::mouseMoveEvent(event);
}
void QGMarker::mouseReleaseEvent(QGraphicsSceneMouseEvent * event)
{
if (event->button() == Qt::RightButton) { //we're done
@@ -148,16 +124,6 @@ void QGMarker::setRadius(float r)
setPath(p);
}
void QGMarker::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget)
{
QStyleOptionGraphicsItem myOption(*option);
myOption.state &= ~QStyle::State_Selected;
//~ painter->drawRect(boundingRect()); //good for debugging
QGIVertex::paint (painter, &myOption, widget);
}
//******************************************************************************
QGEPath::QGEPath(QGILeaderLine* leader) :
@@ -426,15 +392,6 @@ QPainterPath QGEPath::shape() const
return PreferencesGui::edgeFuzz();
}
void QGEPath::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
QStyleOptionGraphicsItem myOption(*option);
myOption.state &= ~QStyle::State_Selected;
// painter->drawRect(boundingRect()); //good for debugging
QGIPrimPath::paint (painter, &myOption, widget);
}
void QGEPath::dumpGhostPoints(const char* text)
{
int idb = 0;

View File

@@ -48,7 +48,6 @@ public:
enum {Type = QGraphicsItem::UserType + 302};
int type() const override { return Type;}
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
@@ -63,11 +62,7 @@ Q_SIGNALS:
void endEdit(void);
protected:
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
private:
bool m_dragging;
@@ -87,7 +82,6 @@ public:
int type() const override { return Type;}
virtual QRectF boundingRect() const override;
virtual QPainterPath shape() const override;
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
void inEdit(bool b) { m_inEdit = b; }
bool inEdit(void) { return m_inEdit; }

View File

@@ -359,11 +359,3 @@ double QGIArrow::getOverlapAdjust(int style, double size)
}
return result;
}
void QGIArrow::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
QStyleOptionGraphicsItem myOption(*option);
myOption.state &= ~QStyle::State_Selected;
QGIPrimPath::paint (painter, &myOption, widget);
}

View File

@@ -75,8 +75,6 @@ public:
static double getPrefArrowSize();
static double getOverlapAdjust(int style, double size);
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr );
protected:
QPainterPath makeFilledTriangle(double length, double width, bool flipped);
QPainterPath makeFilledTriangle(Base::Vector3d dir, double length, double width);

View File

@@ -76,16 +76,3 @@ QRectF QGIDimLines::boundingRect() const
{
return shape().controlPointRect().adjusted(-3, -3, 3, 3);
}
void QGIDimLines::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
QStyleOptionGraphicsItem myOption(*option);
myOption.state &= ~QStyle::State_Selected;
// painter->drawRect(boundingRect()); //good for debugging
// painter->drawPath(shape()); //good for debugging
QGIPrimPath::paint (painter, &myOption, widget);
}

View File

@@ -52,7 +52,6 @@ public:
//double getLineWidth() { return m_lineWidth; }
//void setLineWidth(double w);
//QPainterPath shape() const;
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr) override;
protected:
//QVariant itemChange(GraphicsItemChange change, const QVariant &value);

View File

@@ -66,12 +66,6 @@ QGIDrawingTemplate::~QGIDrawingTemplate()
pathItem = nullptr;
}
QVariant QGIDrawingTemplate::itemChange(GraphicsItemChange change, const QVariant &value)
{
return QGraphicsItemGroup::itemChange(change, value);
}
void QGIDrawingTemplate::clearContents()
{

View File

@@ -59,7 +59,6 @@ protected:
TechDraw::DrawParametricTemplate * getParametricTemplate();
protected:
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
QGraphicsPathItem *pathItem;
};