Improve code style

This commit is contained in:
Simon De Backer
2020-08-16 14:25:31 +02:00
parent 6c806d151d
commit e55d336dc1
9 changed files with 85 additions and 56 deletions

View File

@@ -93,8 +93,8 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
QVariant property (const char *name) const override {return QObject::property(name);}
virtual QPainterPath shadowShape ()const = 0;
virtual void setHandlerColor(QPointF /*pos*/, const QColor &/*color*/) {}
virtual void resetAllHandlerColor() {}
virtual void setHandlerColor(QPointF /*pos*/, const QColor &/*color*/) {}
virtual void resetAllHandlerColor() {}
protected:
void stylesToXml (QDomElement &) const;
@@ -119,7 +119,7 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
Filling _filling ;
Color _color;
bool _antialiased;
QPointF m_origin_pos;
QPointF m_origin_pos;
};
typedef CustomElementGraphicPart CEGP;

View File

@@ -254,7 +254,7 @@ void PartPolygon::setClosed(bool close)
if (m_closed == close) return;
prepareGeometryChange();
m_closed = close;
emit closedChange();
emit closedChange();
}
/**
@@ -544,7 +544,7 @@ void PartPolygon::removePoint()
if (index > -1 && index<m_handler_vector.count())
{
QPolygonF polygon = this->polygon();
qDebug() << index;
qDebug() << index;
polygon.removeAt(index);
//Wrap the undo for avoid to merge the undo commands when user add several points.

View File

@@ -84,8 +84,8 @@ class PartPolygon : public CustomElementGraphicPart
bool isClosed () const {return m_closed;}
void setClosed (bool close);
void setHandlerColor(QPointF pos, const QColor &color) final;
void resetAllHandlerColor() final;
void setHandlerColor(QPointF pos, const QColor &color) final;
void resetAllHandlerColor() final;
protected:
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;

View File

@@ -25,7 +25,7 @@
@param scene La scene sur laquelle figure cette borne
*/
PartTerminal::PartTerminal(QETElementEditor *editor, QGraphicsItem *parent) :
CustomElementGraphicPart(editor, parent)
CustomElementGraphicPart(editor, parent)
{
d = new TerminalData(this);
d -> m_orientation = Qet::North;