mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-15 14:19:59 +01: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:
@@ -35,7 +35,7 @@ class ArcEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
ArcEditor(QETElementEditor *, PartArc * = nullptr, QWidget * = nullptr);
|
||||
virtual ~ArcEditor();
|
||||
~ArcEditor() override;
|
||||
private:
|
||||
ArcEditor(const ArcEditor &);
|
||||
|
||||
@@ -49,14 +49,14 @@ class ArcEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void updateArcS();
|
||||
void updateArcA();
|
||||
void updateArcRect();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
||||
@@ -35,7 +35,7 @@ class ElementEditionCommand : public QUndoCommand
|
||||
public:
|
||||
ElementEditionCommand(ElementScene * = nullptr, ElementView * = nullptr, QUndoCommand * = nullptr);
|
||||
ElementEditionCommand(const QString &, ElementScene * = nullptr, ElementView * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~ElementEditionCommand();
|
||||
~ElementEditionCommand() override;
|
||||
private:
|
||||
ElementEditionCommand(const ElementEditionCommand &);
|
||||
|
||||
@@ -61,14 +61,14 @@ class DeletePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
DeletePartsCommand(ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = nullptr);
|
||||
virtual ~DeletePartsCommand();
|
||||
~DeletePartsCommand() override;
|
||||
private:
|
||||
DeletePartsCommand(const DeletePartsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@@ -83,14 +83,14 @@ class PastePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PastePartsCommand(ElementView *, const ElementContent &, QUndoCommand * = nullptr);
|
||||
virtual ~PastePartsCommand();
|
||||
~PastePartsCommand() override;
|
||||
private:
|
||||
PastePartsCommand(const PastePartsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
virtual void setOffset(int, const QPointF &, int, const QPointF &);
|
||||
|
||||
// attributes
|
||||
@@ -114,7 +114,7 @@ class CutPartsCommand : public DeletePartsCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
CutPartsCommand(ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = nullptr);
|
||||
virtual ~CutPartsCommand();
|
||||
~CutPartsCommand() override;
|
||||
private:
|
||||
CutPartsCommand(const CutPartsCommand &);
|
||||
};
|
||||
@@ -126,14 +126,14 @@ class MovePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
MovePartsCommand(const QPointF &, ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = nullptr);
|
||||
virtual ~MovePartsCommand();
|
||||
~MovePartsCommand() override;
|
||||
private:
|
||||
MovePartsCommand(const MovePartsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@@ -152,14 +152,14 @@ class AddPartCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
AddPartCommand(const QString &, ElementScene *, QGraphicsItem *, QUndoCommand * = nullptr);
|
||||
virtual ~AddPartCommand();
|
||||
~AddPartCommand() override;
|
||||
private:
|
||||
AddPartCommand(const AddPartCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@@ -176,14 +176,14 @@ class ChangeNamesCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeNamesCommand(ElementScene *, const NamesList &, const NamesList &, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeNamesCommand();
|
||||
~ChangeNamesCommand() override;
|
||||
private:
|
||||
ChangeNamesCommand(const ChangeNamesCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@@ -208,14 +208,14 @@ class ChangeZValueCommand : public ElementEditionCommand {
|
||||
SendBackward ///< Send primitives to the background so they have the lowest zValue
|
||||
};
|
||||
ChangeZValueCommand(ElementScene *, Option, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeZValueCommand();
|
||||
~ChangeZValueCommand() override;
|
||||
private:
|
||||
ChangeZValueCommand(const ChangeZValueCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
void applyBringForward(const QList<QGraphicsItem *> &);
|
||||
@@ -240,14 +240,14 @@ class ChangeInformationsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeInformationsCommand(ElementScene *, const QString &, const QString &, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeInformationsCommand();
|
||||
~ChangeInformationsCommand() override;
|
||||
private:
|
||||
ChangeInformationsCommand(const ChangeInformationsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@@ -264,14 +264,14 @@ class ScalePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ScalePartsCommand(ElementScene * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~ScalePartsCommand();
|
||||
~ScalePartsCommand() override;
|
||||
private:
|
||||
ScalePartsCommand(const ScalePartsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
ElementScene *elementScene() const;
|
||||
void setScaledPrimitives(const QList<CustomElementPart *> &);
|
||||
QList<CustomElementPart *> scaledPrimitives() const;
|
||||
@@ -297,10 +297,10 @@ class ScalePartsCommand : public ElementEditionCommand {
|
||||
class ChangePropertiesCommand : public ElementEditionCommand {
|
||||
public:
|
||||
ChangePropertiesCommand (ElementScene *scene, QString type, DiagramContext info, QUndoCommand *parent=nullptr);
|
||||
virtual ~ChangePropertiesCommand ();
|
||||
~ChangePropertiesCommand () override;
|
||||
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
QList <QString> m_type;
|
||||
|
||||
@@ -36,7 +36,7 @@ class ElementItemEditor : public QWidget
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementItemEditor(QETElementEditor *, QWidget * = nullptr);
|
||||
virtual ~ElementItemEditor() {};
|
||||
~ElementItemEditor() override {};
|
||||
private:
|
||||
ElementItemEditor(const ElementItemEditor &);
|
||||
|
||||
|
||||
@@ -43,15 +43,15 @@ class ElementPrimitiveDecorator : public QGraphicsObject
|
||||
|
||||
public:
|
||||
ElementPrimitiveDecorator(QGraphicsItem * = nullptr);
|
||||
virtual ~ElementPrimitiveDecorator();
|
||||
~ElementPrimitiveDecorator() override;
|
||||
|
||||
enum { Type = UserType + 2200 };
|
||||
|
||||
// methods
|
||||
QRectF internalBoundingRect() const;
|
||||
virtual QRectF boundingRect () const;
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
virtual int type() const { return Type; }
|
||||
QRectF boundingRect () const override;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
int type() const override { return Type; }
|
||||
void setItems(const QList<QGraphicsItem *> &);
|
||||
void setItems(const QList<CustomElementPart *> &);
|
||||
QList<CustomElementPart *> items() const;
|
||||
@@ -64,18 +64,18 @@ class ElementPrimitiveDecorator : public QGraphicsObject
|
||||
void actionFinished(ElementEditionCommand *);
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
|
||||
void keyPressEvent(QKeyEvent *);
|
||||
void keyReleaseEvent(QKeyEvent *);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override;
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void keyReleaseEvent(QKeyEvent *) override;
|
||||
QPointF deltaForRoundScaling(const QRectF &, const QRectF &, qreal);
|
||||
QPointF snapConstPointToGrid(const QPointF &) const;
|
||||
void snapPointToGrid(QPointF &) const;
|
||||
bool mustSnapToGrid(QGraphicsSceneMouseEvent *);
|
||||
QET::ScalingMethod scalingMethod(QGraphicsSceneMouseEvent *);
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
||||
@@ -56,7 +56,7 @@ class ElementScene : public QGraphicsScene
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementScene(QETElementEditor *, QObject * = nullptr);
|
||||
virtual ~ElementScene();
|
||||
~ElementScene() override;
|
||||
|
||||
private:
|
||||
ElementScene(const ElementScene &);
|
||||
@@ -130,14 +130,14 @@ class ElementScene : public QGraphicsScene
|
||||
QETElementEditor* editor() const;
|
||||
|
||||
protected:
|
||||
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *);
|
||||
virtual void mousePressEvent (QGraphicsSceneMouseEvent *);
|
||||
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *);
|
||||
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void keyPressEvent (QKeyEvent *event);
|
||||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
||||
void mouseMoveEvent (QGraphicsSceneMouseEvent *) override;
|
||||
void mousePressEvent (QGraphicsSceneMouseEvent *) override;
|
||||
void mouseReleaseEvent (QGraphicsSceneMouseEvent *) override;
|
||||
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void keyPressEvent (QKeyEvent *event) override;
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
|
||||
|
||||
virtual void drawForeground(QPainter *, const QRectF &);
|
||||
void drawForeground(QPainter *, const QRectF &) override;
|
||||
|
||||
private:
|
||||
QRectF elementContentBoundingRect(const ElementContent &) const;
|
||||
|
||||
@@ -31,7 +31,7 @@ class ElementView : public QGraphicsView {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementView(ElementScene *, QWidget * = nullptr);
|
||||
virtual ~ElementView();
|
||||
~ElementView() override;
|
||||
|
||||
private:
|
||||
ElementView(const ElementView &);
|
||||
@@ -43,13 +43,13 @@ class ElementView : public QGraphicsView {
|
||||
QRectF viewedSceneRect() const;
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *);
|
||||
void mouseMoveEvent(QMouseEvent *);
|
||||
void mouseReleaseEvent(QMouseEvent *);
|
||||
void mousePressEvent(QMouseEvent *) override;
|
||||
void mouseMoveEvent(QMouseEvent *) override;
|
||||
void mouseReleaseEvent(QMouseEvent *) override;
|
||||
bool gestureEvent(QGestureEvent *event);
|
||||
bool event(QEvent *event);
|
||||
void wheelEvent(QWheelEvent *);
|
||||
virtual void drawBackground(QPainter *, const QRectF &);
|
||||
bool event(QEvent *event) override;
|
||||
void wheelEvent(QWheelEvent *) override;
|
||||
void drawBackground(QPainter *, const QRectF &) override;
|
||||
|
||||
private:
|
||||
QRectF applyMovement(const QRectF &, const QPointF &);
|
||||
|
||||
@@ -34,7 +34,7 @@ class EllipseEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
EllipseEditor(QETElementEditor *, PartEllipse * = nullptr, QWidget * = nullptr);
|
||||
virtual ~EllipseEditor();
|
||||
~EllipseEditor() override;
|
||||
private:
|
||||
EllipseEditor(const EllipseEditor &);
|
||||
|
||||
@@ -47,12 +47,12 @@ class EllipseEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void editingFinished();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
||||
@@ -32,12 +32,12 @@ class ESEventAddArc : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddArc(ElementScene *scene);
|
||||
virtual ~ESEventAddArc();
|
||||
~ESEventAddArc() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool keyPressEvent (QKeyEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool keyPressEvent (QKeyEvent *event) override;
|
||||
|
||||
private:
|
||||
void updateArc ();
|
||||
|
||||
@@ -33,11 +33,11 @@ class ESEventAddEllipse : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddEllipse(ElementScene *scene);
|
||||
~ESEventAddEllipse();
|
||||
~ESEventAddEllipse() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartEllipse *m_ellipse;
|
||||
|
||||
@@ -32,11 +32,11 @@ class ESEventAddLine : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddLine(ElementScene *scene);
|
||||
virtual ~ESEventAddLine();
|
||||
~ESEventAddLine() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartLine *m_line;
|
||||
|
||||
@@ -32,12 +32,12 @@ class ESEventAddPolygon : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddPolygon(ElementScene *scene);
|
||||
virtual ~ESEventAddPolygon();
|
||||
~ESEventAddPolygon() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartPolygon *m_polygon;
|
||||
|
||||
@@ -29,11 +29,11 @@ class ESEventAddRect : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddRect(ElementScene *scene);
|
||||
virtual ~ESEventAddRect();
|
||||
~ESEventAddRect() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartRectangle *m_rect;
|
||||
|
||||
@@ -32,11 +32,11 @@ class ESEventAddTerminal : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddTerminal(ElementScene *scene);
|
||||
virtual ~ESEventAddTerminal();
|
||||
~ESEventAddTerminal() override;
|
||||
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool keyPressEvent (QKeyEvent *event);
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool keyPressEvent (QKeyEvent *event) override;
|
||||
|
||||
private:
|
||||
PartTerminal *m_terminal;
|
||||
|
||||
@@ -32,10 +32,10 @@ class ESEventAddText : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddText(ElementScene *scene);
|
||||
virtual ~ESEventAddText();
|
||||
~ESEventAddText() override;
|
||||
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartText *m_text;
|
||||
|
||||
@@ -32,10 +32,10 @@ class ESEventAddTextField : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddTextField(ElementScene *scene);
|
||||
virtual ~ESEventAddTextField();
|
||||
~ESEventAddTextField() override;
|
||||
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartTextField *m_text;
|
||||
|
||||
@@ -42,7 +42,7 @@ class AbstractPartEllipse : public CustomElementGraphicPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
AbstractPartEllipse(QETElementEditor *editor, QGraphicsItem * parent = nullptr);
|
||||
virtual ~AbstractPartEllipse();
|
||||
~AbstractPartEllipse() override;
|
||||
|
||||
private:
|
||||
AbstractPartEllipse(const AbstractPartEllipse &);
|
||||
@@ -54,17 +54,17 @@ class AbstractPartEllipse : public CustomElementGraphicPart
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void startUserTransformation (const QRectF &);
|
||||
virtual void handleUserTransformation (const QRectF &, const QRectF &);
|
||||
void startUserTransformation (const QRectF &) override;
|
||||
void handleUserTransformation (const QRectF &, const QRectF &) override;
|
||||
|
||||
//Coordinates
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
QRectF boundingRect() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
virtual QPointF sceneTopLeft() const;
|
||||
|
||||
QRectF rect() const;
|
||||
virtual void setRect (const QRectF &rect);
|
||||
virtual bool isUseless() const;
|
||||
bool isUseless() const override;
|
||||
|
||||
int startAngle() const {return m_start_angle;}
|
||||
virtual void setStartAngle (const int &start_angle);
|
||||
|
||||
@@ -65,7 +65,7 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
public:
|
||||
|
||||
CustomElementGraphicPart(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~CustomElementGraphicPart();
|
||||
~CustomElementGraphicPart() override;
|
||||
|
||||
static void drawCross (const QPointF ¢er, QPainter *painter);
|
||||
|
||||
@@ -89,8 +89,8 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
|
||||
|
||||
//Rediriged to QObject Q_PROPERTY system
|
||||
virtual void setProperty (const char *name, const QVariant &value) {QObject::setProperty(name, value);}
|
||||
virtual QVariant property (const char *name) const {return QObject::property(name);}
|
||||
void setProperty (const char *name, const QVariant &value) override {QObject::setProperty(name, value);}
|
||||
QVariant property (const char *name) const override {return QObject::property(name);}
|
||||
|
||||
virtual QPainterPath shadowShape ()const = 0;
|
||||
|
||||
@@ -101,14 +101,14 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
void applyStylesToQPainter(QPainter &) const;
|
||||
void drawShadowShape (QPainter *painter);
|
||||
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
void hoverMoveEvent (QGraphicsSceneHoverEvent *event);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverMoveEvent (QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
// attributes
|
||||
bool m_hovered;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -34,7 +34,7 @@ class PartEllipse : public AbstractPartEllipse
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartEllipse(QETElementEditor *editor, QGraphicsItem * parent = nullptr);
|
||||
virtual ~PartEllipse();
|
||||
~PartEllipse() override;
|
||||
|
||||
private:
|
||||
PartEllipse(const PartEllipse &);
|
||||
@@ -46,22 +46,22 @@ class PartEllipse : public AbstractPartEllipse
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartEllipse.
|
||||
* @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("ellipse", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("ellipse")); }
|
||||
virtual const QDomElement toXml (QDomDocument &) const;
|
||||
virtual void fromXml (const QDomElement &);
|
||||
virtual QPainterPath shape() const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual void setRect(const QRectF &rect) {AbstractPartEllipse::setRect(rect); adjusteHandlerPos();}
|
||||
QString name() const override { return(QObject::tr("ellipse", "element part name")); }
|
||||
QString xmlName() const override { return(QString("ellipse")); }
|
||||
const QDomElement toXml (QDomDocument &) const override;
|
||||
void fromXml (const QDomElement &) override;
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
void setRect(const QRectF &rect) override {AbstractPartEllipse::setRect(rect); 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();
|
||||
|
||||
@@ -46,7 +46,7 @@ class PartLine : public CustomElementGraphicPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartLine(QETElementEditor *, QGraphicsItem * = nullptr);
|
||||
virtual ~PartLine();
|
||||
~PartLine() override;
|
||||
private:
|
||||
PartLine(const PartLine &);
|
||||
|
||||
@@ -66,21 +66,21 @@ class PartLine : public CustomElementGraphicPart
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartLine.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
virtual QString name() const { return(QObject::tr("ligne", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("line")); }
|
||||
virtual const QDomElement toXml(QDomDocument &) const;
|
||||
virtual void fromXml(const QDomElement &);
|
||||
int type() const override { return Type; }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
QString name() const override { return(QObject::tr("ligne", "element part name")); }
|
||||
QString xmlName() const override { return(QString("line")); }
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
void fromXml(const QDomElement &) override;
|
||||
virtual QPointF sceneP1() const;
|
||||
virtual QPointF sceneP2() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
QRectF boundingRect() const override;
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
static uint requiredLengthForEndType(const Qet::EndType &);
|
||||
static QList<QPointF> fourEndPoints(const QPointF &, const QPointF &, const qreal &);
|
||||
|
||||
@@ -96,8 +96,8 @@ class PartLine : public CustomElementGraphicPart
|
||||
void setSecondEndLength(const qreal &l);
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void adjusteHandlerPos();
|
||||
|
||||
@@ -39,7 +39,7 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartPolygon(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartPolygon();
|
||||
~PartPolygon() override;
|
||||
|
||||
private:
|
||||
PartPolygon(const PartPolygon &);
|
||||
@@ -55,23 +55,23 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartPolygon.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
int type() const override { return Type; }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
|
||||
|
||||
virtual QString name() const { return(QObject::tr("polygone", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("polygon")); }
|
||||
void fromXml(const QDomElement &);
|
||||
const QDomElement toXml(QDomDocument &) const;
|
||||
QString name() const override { return(QObject::tr("polygone", "element part name")); }
|
||||
QString xmlName() const override { return(QString("polygon")); }
|
||||
void fromXml(const QDomElement &) override;
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
|
||||
virtual QPainterPath shape () const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
QPainterPath shape () const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
QRectF boundingRect() const override;
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
virtual QET::ScalingMethod preferredScalingMethod() const;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
QET::ScalingMethod preferredScalingMethod() const override;
|
||||
|
||||
QPolygonF polygon () const;
|
||||
void setPolygon (const QPolygonF &polygon);
|
||||
@@ -84,8 +84,8 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
void setClosed (bool close);
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void adjusteHandlerPos();
|
||||
|
||||
@@ -37,7 +37,7 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartRectangle(QETElementEditor *, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartRectangle();
|
||||
~PartRectangle() override;
|
||||
|
||||
private:
|
||||
PartRectangle(const PartRectangle &);
|
||||
@@ -52,32 +52,32 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartRectangle.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type () const { return Type; }
|
||||
virtual void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
virtual QString name () const { return(QObject::tr("rectangle", "element part name")); }
|
||||
int type () const override { return Type; }
|
||||
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
QString name () const override { return(QObject::tr("rectangle", "element part name")); }
|
||||
|
||||
virtual QString xmlName () const { return(QString("rect")); }
|
||||
virtual const QDomElement toXml (QDomDocument &) const;
|
||||
virtual void fromXml (const QDomElement &);
|
||||
QString xmlName () const override { return(QString("rect")); }
|
||||
const QDomElement toXml (QDomDocument &) const override;
|
||||
void fromXml (const QDomElement &) override;
|
||||
|
||||
QRectF rect() const;
|
||||
void setRect(const QRectF &rect);
|
||||
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
virtual QPointF sceneTopLeft() const;
|
||||
|
||||
virtual QPainterPath shape () const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual bool isUseless() const;
|
||||
QPainterPath shape () const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
QRectF boundingRect() const override;
|
||||
bool isUseless() const override;
|
||||
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
|
||||
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();
|
||||
|
||||
@@ -36,7 +36,7 @@ class PartTerminal : public CustomElementGraphicPart
|
||||
public:
|
||||
// constructors, destructor
|
||||
PartTerminal(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartTerminal();
|
||||
~PartTerminal() override;
|
||||
private:
|
||||
PartTerminal(const PartTerminal &);
|
||||
|
||||
@@ -56,20 +56,20 @@ class PartTerminal : public CustomElementGraphicPart
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartTerminal.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual QString name() const { return(QObject::tr("borne", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("terminal")); }
|
||||
virtual void fromXml(const QDomElement &);
|
||||
virtual const QDomElement toXml(QDomDocument &) const;
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
int type() const override { return Type; }
|
||||
QString name() const override { return(QObject::tr("borne", "element part name")); }
|
||||
QString xmlName() const override { return(QString("terminal")); }
|
||||
void fromXml(const QDomElement &) override;
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
|
||||
|
||||
virtual QPainterPath shape() const;
|
||||
virtual QPainterPath shadowShape() const {return shape();}
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override {return shape();}
|
||||
QRectF boundingRect() const override;
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
|
||||
Qet::Orientation orientation() const {return m_orientation;}
|
||||
void setOrientation(Qet::Orientation ori);
|
||||
|
||||
@@ -32,7 +32,7 @@ class PartText : public QGraphicsTextItem, public CustomElementPart {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartText(QETElementEditor *, QGraphicsItem * = nullptr);
|
||||
virtual ~PartText();
|
||||
~PartText() override;
|
||||
|
||||
private:
|
||||
PartText(const PartText &);
|
||||
@@ -45,20 +45,20 @@ class PartText : public QGraphicsTextItem, public CustomElementPart {
|
||||
PartText.
|
||||
@return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual QString name() const { return(QObject::tr("texte", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("text")); }
|
||||
void fromXml(const QDomElement &);
|
||||
const QDomElement toXml(QDomDocument &) const;
|
||||
int type() const override { return Type; }
|
||||
QString name() const override { return(QObject::tr("texte", "element part name")); }
|
||||
QString xmlName() const override { return(QString("text")); }
|
||||
void fromXml(const QDomElement &) override;
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
void setRotation(qreal angle) {(QGraphicsObject::setRotation(QET::correctAngle(angle)));}
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
|
||||
///PROPERTY
|
||||
void setProperty(const char *name, const QVariant &value) {QGraphicsTextItem::setProperty(name, value);}
|
||||
QVariant property(const char *name) const {return QGraphicsTextItem::property(name);}
|
||||
void setProperty(const char *name, const QVariant &value) override {QGraphicsTextItem::setProperty(name, value);}
|
||||
QVariant property(const char *name) const override {return QGraphicsTextItem::property(name);}
|
||||
// Size value
|
||||
Q_PROPERTY(qreal size READ size WRITE setSize)
|
||||
qreal size () const {return font().pointSize();}
|
||||
@@ -81,15 +81,15 @@ class PartText : public QGraphicsTextItem, public CustomElementPart {
|
||||
void endEdition();
|
||||
|
||||
protected:
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void focusOutEvent(QFocusEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
|
||||
virtual QVariant itemChange(GraphicsItemChange, const QVariant &);
|
||||
QRectF boundingRect() const;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void focusInEvent(QFocusEvent *) override;
|
||||
void focusOutEvent(QFocusEvent *) override;
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) override;
|
||||
QVariant itemChange(GraphicsItemChange, const QVariant &) override;
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
private:
|
||||
QPointF margin() const;
|
||||
|
||||
@@ -36,7 +36,7 @@ class PartTextField : public QGraphicsTextItem, public CustomElementPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartTextField(QETElementEditor *, QGraphicsItem * = nullptr);
|
||||
virtual ~PartTextField();
|
||||
~PartTextField() override;
|
||||
|
||||
private:
|
||||
PartTextField(const PartTextField &);
|
||||
@@ -53,19 +53,19 @@ class PartTextField : public QGraphicsTextItem, public CustomElementPart
|
||||
PartTextField.
|
||||
@return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual QString name() const { return(QObject::tr("champ de texte", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("input")); }
|
||||
void fromXml(const QDomElement &);
|
||||
const QDomElement toXml(QDomDocument &) const;
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
int type() const override { return Type; }
|
||||
QString name() const override { return(QObject::tr("champ de texte", "element part name")); }
|
||||
QString xmlName() const override { return(QString("input")); }
|
||||
void fromXml(const QDomElement &) override;
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
|
||||
///PROPERTY
|
||||
virtual void setProperty(const char *name, const QVariant &value) {QGraphicsTextItem::setProperty(name, value);}
|
||||
virtual QVariant property(const char *name) const {return QGraphicsTextItem::property(name);}
|
||||
void setProperty(const char *name, const QVariant &value) override {QGraphicsTextItem::setProperty(name, value);}
|
||||
QVariant property(const char *name) const override {return QGraphicsTextItem::property(name);}
|
||||
|
||||
// displayed text
|
||||
Q_PROPERTY(QString text READ toPlainText WRITE setPlainText)
|
||||
@@ -97,15 +97,15 @@ class PartTextField : public QGraphicsTextItem, public CustomElementPart
|
||||
void endEdition();
|
||||
|
||||
protected:
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void focusOutEvent(QFocusEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
|
||||
virtual QVariant itemChange(GraphicsItemChange, const QVariant &);
|
||||
QRectF boundingRect() const;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void focusInEvent(QFocusEvent *) override;
|
||||
void focusOutEvent(QFocusEvent *) override;
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) override;
|
||||
QVariant itemChange(GraphicsItemChange, const QVariant &) override;
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
private:
|
||||
QPointF margin() const;
|
||||
|
||||
@@ -34,7 +34,7 @@ class LineEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
LineEditor(QETElementEditor *, PartLine * = nullptr, QWidget * = nullptr);
|
||||
virtual ~LineEditor();
|
||||
~LineEditor() override;
|
||||
private:
|
||||
LineEditor(const LineEditor &);
|
||||
|
||||
@@ -49,8 +49,8 @@ class LineEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QPointF editedP1() const;
|
||||
QPointF editedP2() const;
|
||||
|
||||
@@ -60,7 +60,7 @@ class LineEditor : public ElementItemEditor
|
||||
void updateLineEndType2();
|
||||
void updateLineEndLength2();
|
||||
void lineEditingFinished();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
||||
@@ -36,7 +36,7 @@ class PolygonEditor : public ElementItemEditor {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PolygonEditor(QETElementEditor *, PartPolygon * = nullptr, QWidget * = nullptr);
|
||||
virtual ~PolygonEditor();
|
||||
~PolygonEditor() override;
|
||||
|
||||
private:
|
||||
PolygonEditor(const PolygonEditor &);
|
||||
@@ -50,8 +50,8 @@ class PolygonEditor : public ElementItemEditor {
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
private:
|
||||
QVector<QPointF> getPointsFromTree();
|
||||
@@ -59,7 +59,7 @@ class PolygonEditor : public ElementItemEditor {
|
||||
public slots:
|
||||
void updatePolygonPoints();
|
||||
void updatePolygonClosedState();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
void validColumn(QTreeWidgetItem *qtwi, int column);
|
||||
|
||||
private:
|
||||
|
||||
@@ -37,7 +37,7 @@ class QETElementEditor : public QETMainWindow {
|
||||
// constructor, destructor
|
||||
public:
|
||||
QETElementEditor(QWidget * = nullptr);
|
||||
virtual ~QETElementEditor();
|
||||
~QETElementEditor() override;
|
||||
private:
|
||||
QETElementEditor(const QETElementEditor &);
|
||||
void setupActions();
|
||||
@@ -116,8 +116,8 @@ class QETElementEditor : public QETMainWindow {
|
||||
void saveToLocation(ElementsLocation loc);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
virtual void firstActivation(QEvent *);
|
||||
void closeEvent(QCloseEvent *) override;
|
||||
void firstActivation(QEvent *) override;
|
||||
|
||||
private:
|
||||
bool canClose();
|
||||
|
||||
@@ -34,7 +34,7 @@ class RectangleEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
RectangleEditor(QETElementEditor *, PartRectangle * = nullptr, QWidget * = nullptr);
|
||||
virtual ~RectangleEditor();
|
||||
~RectangleEditor() override;
|
||||
private:
|
||||
RectangleEditor(const RectangleEditor &);
|
||||
|
||||
@@ -47,12 +47,12 @@ class RectangleEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QPointF editedTopLeft () const;
|
||||
|
||||
public slots:
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
void editingFinished();
|
||||
|
||||
private:
|
||||
|
||||
@@ -37,7 +37,7 @@ class StyleEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
StyleEditor(QETElementEditor *, CustomElementGraphicPart * = nullptr, QWidget * = nullptr);
|
||||
virtual ~StyleEditor();
|
||||
~StyleEditor() override;
|
||||
|
||||
private:
|
||||
StyleEditor(const StyleEditor &);
|
||||
@@ -53,14 +53,14 @@ class StyleEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual bool setParts(QList<CustomElementPart *>);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
bool setParts(QList<CustomElementPart *>) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
static bool isStyleEditable (QList <CustomElementPart *> cep_list);
|
||||
|
||||
public slots:
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
void updatePartAntialiasing();
|
||||
void updatePartColor();
|
||||
void updatePartLineStyle();
|
||||
|
||||
@@ -32,7 +32,7 @@ class TerminalEditor : public ElementItemEditor {
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TerminalEditor(QETElementEditor *, PartTerminal * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TerminalEditor();
|
||||
~TerminalEditor() override;
|
||||
private:
|
||||
TerminalEditor(const TerminalEditor &);
|
||||
|
||||
@@ -45,13 +45,13 @@ class TerminalEditor : public ElementItemEditor {
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void updateTerminalO();
|
||||
void updatePos();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
||||
@@ -39,7 +39,7 @@ class TextEditor : public ElementItemEditor
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TextEditor(QETElementEditor *, PartText * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TextEditor();
|
||||
~TextEditor() override;
|
||||
private:
|
||||
TextEditor(const TextEditor &);
|
||||
|
||||
@@ -56,8 +56,8 @@ class TextEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void updateTextT();
|
||||
@@ -65,7 +65,7 @@ class TextEditor : public ElementItemEditor
|
||||
void updateTextC();
|
||||
void updateTextRotationAngle();
|
||||
void updatePos();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
||||
@@ -38,7 +38,7 @@ class TextFieldEditor : public ElementItemEditor
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TextFieldEditor(QETElementEditor *, PartTextField * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TextFieldEditor();
|
||||
~TextFieldEditor() override;
|
||||
private:
|
||||
TextFieldEditor(const TextFieldEditor &);
|
||||
|
||||
@@ -55,8 +55,8 @@ class TextFieldEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void updateTextFieldT();
|
||||
@@ -65,7 +65,7 @@ class TextFieldEditor : public ElementItemEditor
|
||||
void updateTextFieldRotationAngle();
|
||||
void updateTagg();
|
||||
void updatePos();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
||||
@@ -38,7 +38,7 @@ class ElementPropertiesEditorWidget : public QDialog
|
||||
//METHODS
|
||||
public:
|
||||
explicit ElementPropertiesEditorWidget(QString &basic_type, DiagramContext &dc, QWidget *parent = nullptr);
|
||||
~ElementPropertiesEditorWidget();
|
||||
~ElementPropertiesEditorWidget() override;
|
||||
|
||||
void upDateInterface();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user