mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-26 13:20:52 +01:00
Improve code style
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user