mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-05 03:39:58 +02:00
Modernize-use-override refactors code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5009 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -34,7 +34,7 @@ class PartArc : public AbstractPartEllipse
|
||||
|
||||
public:
|
||||
PartArc(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartArc();
|
||||
~PartArc() override;
|
||||
|
||||
private:
|
||||
PartArc(const PartArc &);
|
||||
@@ -45,25 +45,25 @@ class PartArc : public AbstractPartEllipse
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartArc.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
int type() const override { return Type; }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
|
||||
//Name and XML
|
||||
virtual QString name() const { return(QObject::tr("arc", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("arc")); }
|
||||
virtual const QDomElement toXml (QDomDocument &) const;
|
||||
virtual void fromXml (const QDomElement &);
|
||||
QString name() const override { return(QObject::tr("arc", "element part name")); }
|
||||
QString xmlName() const override { return(QString("arc")); }
|
||||
const QDomElement toXml (QDomDocument &) const override;
|
||||
void fromXml (const QDomElement &) override;
|
||||
|
||||
virtual QPainterPath shape() const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual void setRect(const QRectF &rect) {AbstractPartEllipse::setRect(rect); adjusteHandlerPos();}
|
||||
virtual void setStartAngle(const int &start_angle) {AbstractPartEllipse::setStartAngle(start_angle); adjusteHandlerPos();}
|
||||
virtual void setSpanAngle(const int &span_angle) {AbstractPartEllipse::setSpanAngle(span_angle); adjusteHandlerPos();}
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
void setRect(const QRectF &rect) override {AbstractPartEllipse::setRect(rect); adjusteHandlerPos();}
|
||||
void setStartAngle(const int &start_angle) override {AbstractPartEllipse::setStartAngle(start_angle); adjusteHandlerPos();}
|
||||
void setSpanAngle(const int &span_angle) override {AbstractPartEllipse::setSpanAngle(span_angle); adjusteHandlerPos();}
|
||||
|
||||
protected:
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void switchResizeMode();
|
||||
|
||||
Reference in New Issue
Block a user