forked from qt-creator/qt-creator
ModelEditor: Use override keyword
Change-Id: I258fd9e644db16a97fa2b667da38238d24841d90 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -47,7 +47,7 @@ class QMT_EXPORT ConfigController : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigController(QObject *parent = 0);
|
explicit ConfigController(QObject *parent = 0);
|
||||||
~ConfigController();
|
~ConfigController() override;
|
||||||
|
|
||||||
void setStereotypeController(StereotypeController *stereotypeController);
|
void setStereotypeController(StereotypeController *stereotypeController);
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ class QMT_EXPORT StereotypeDefinitionParserError : public Exception
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StereotypeDefinitionParserError(const QString &errorMsg, const SourcePos &sourcePos);
|
StereotypeDefinitionParserError(const QString &errorMsg, const SourcePos &sourcePos);
|
||||||
~StereotypeDefinitionParserError();
|
~StereotypeDefinitionParserError() override;
|
||||||
|
|
||||||
SourcePos sourcePos() const { return m_sourcePos; }
|
SourcePos sourcePos() const { return m_sourcePos; }
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ class QMT_EXPORT StereotypeDefinitionParser : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StereotypeDefinitionParser(QObject *parent = 0);
|
explicit StereotypeDefinitionParser(QObject *parent = 0);
|
||||||
~StereotypeDefinitionParser();
|
~StereotypeDefinitionParser() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void iconParsed(const StereotypeIcon &stereotypeIcon);
|
void iconParsed(const StereotypeIcon &stereotypeIcon);
|
||||||
|
@@ -41,14 +41,14 @@ class QMT_EXPORT StringTextSource : public ITextSource
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StringTextSource();
|
StringTextSource();
|
||||||
~StringTextSource();
|
~StringTextSource() override;
|
||||||
|
|
||||||
void setText(const QString &text);
|
void setText(const QString &text);
|
||||||
int sourceId() const { return m_sourceId; }
|
int sourceId() const { return m_sourceId; }
|
||||||
void setSourceId(int sourceId);
|
void setSourceId(int sourceId);
|
||||||
|
|
||||||
// ITextSource interface
|
// ITextSource interface
|
||||||
SourceChar readNextChar();
|
SourceChar readNextChar() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_text;
|
QString m_text;
|
||||||
|
@@ -47,7 +47,7 @@ class QMT_EXPORT TextScannerError : public Exception
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TextScannerError(const QString &errorMsg, const SourcePos &sourcePos);
|
TextScannerError(const QString &errorMsg, const SourcePos &sourcePos);
|
||||||
~TextScannerError();
|
~TextScannerError() override;
|
||||||
|
|
||||||
SourcePos sourcePos() const { return m_sourcePos; }
|
SourcePos sourcePos() const { return m_sourcePos; }
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ class QMT_EXPORT TextScanner : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TextScanner(QObject *parent = 0);
|
explicit TextScanner(QObject *parent = 0);
|
||||||
~TextScanner();
|
~TextScanner() override;
|
||||||
|
|
||||||
void setKeywords(const QList<QPair<QString, int> > &keywords);
|
void setKeywords(const QList<QPair<QString, int> > &keywords);
|
||||||
void setOperators(const QList<QPair<QString, int> > &operators);
|
void setOperators(const QList<QPair<QString, int> > &operators);
|
||||||
|
@@ -45,7 +45,7 @@ class QMT_EXPORT NameController : public QObject
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
NameController(QObject *parent = 0);
|
NameController(QObject *parent = 0);
|
||||||
~NameController();
|
~NameController() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static QString convertFileNameToElementName(const QString &fileName);
|
static QString convertFileNameToElementName(const QString &fileName);
|
||||||
|
@@ -40,17 +40,17 @@ class QMT_EXPORT UndoCommand : public QUndoCommand
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit UndoCommand(const QString &text);
|
explicit UndoCommand(const QString &text);
|
||||||
~UndoCommand();
|
~UndoCommand() override;
|
||||||
|
|
||||||
bool canRedo() const { return m_canRedo; }
|
bool canRedo() const { return m_canRedo; }
|
||||||
int id() const;
|
int id() const override;
|
||||||
void setDoNotMerge(bool doNotMerge);
|
void setDoNotMerge(bool doNotMerge);
|
||||||
|
|
||||||
bool mergeWith(const QUndoCommand *other);
|
bool mergeWith(const QUndoCommand *other) override;
|
||||||
virtual bool mergeWith(const UndoCommand *other);
|
virtual bool mergeWith(const UndoCommand *other);
|
||||||
|
|
||||||
void undo();
|
void undo() override;
|
||||||
void redo();
|
void redo() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_canRedo;
|
bool m_canRedo;
|
||||||
|
@@ -48,7 +48,7 @@ class QMT_EXPORT UndoController : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit UndoController(QObject *parent = 0);
|
explicit UndoController(QObject *parent = 0);
|
||||||
~UndoController();
|
~UndoController() override;
|
||||||
|
|
||||||
QUndoStack *undoStack() const { return m_undoStack; }
|
QUndoStack *undoStack() const { return m_undoStack; }
|
||||||
|
|
||||||
|
@@ -52,11 +52,11 @@ public:
|
|||||||
|
|
||||||
DAnnotation();
|
DAnnotation();
|
||||||
DAnnotation(const DAnnotation &);
|
DAnnotation(const DAnnotation &);
|
||||||
~DAnnotation();
|
~DAnnotation() override;
|
||||||
|
|
||||||
DAnnotation &operator=(const DAnnotation &);
|
DAnnotation &operator=(const DAnnotation &);
|
||||||
|
|
||||||
Uid modelUid() const { return Uid::invalidUid(); }
|
Uid modelUid() const override { return Uid::invalidUid(); }
|
||||||
QString text() const { return m_text; }
|
QString text() const { return m_text; }
|
||||||
void setText(const QString &text);
|
void setText(const QString &text);
|
||||||
QPointF pos() const { return m_pos; }
|
QPointF pos() const { return m_pos; }
|
||||||
@@ -68,8 +68,8 @@ public:
|
|||||||
bool isAutoSized() const { return m_isAutoSized; }
|
bool isAutoSized() const { return m_isAutoSized; }
|
||||||
void setAutoSized(bool autoSized);
|
void setAutoSized(bool autoSized);
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_text;
|
QString m_text;
|
||||||
|
@@ -67,7 +67,7 @@ class QMT_EXPORT DAssociation : public DRelation
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DAssociation();
|
DAssociation();
|
||||||
~DAssociation();
|
~DAssociation() override;
|
||||||
|
|
||||||
DAssociationEnd endA() const { return m_endA; }
|
DAssociationEnd endA() const { return m_endA; }
|
||||||
void setEndA(const DAssociationEnd &endA);
|
void setEndA(const DAssociationEnd &endA);
|
||||||
@@ -76,8 +76,8 @@ public:
|
|||||||
Uid assoicationClassUid() const { return m_associationClassUid; }
|
Uid assoicationClassUid() const { return m_associationClassUid; }
|
||||||
void setAssociationClassUid(const Uid &uid);
|
void setAssociationClassUid(const Uid &uid);
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DAssociationEnd m_endA;
|
DAssociationEnd m_endA;
|
||||||
|
@@ -43,11 +43,11 @@ class QMT_EXPORT DBoundary : public DElement
|
|||||||
public:
|
public:
|
||||||
DBoundary();
|
DBoundary();
|
||||||
DBoundary(const DBoundary &rhs);
|
DBoundary(const DBoundary &rhs);
|
||||||
~DBoundary();
|
~DBoundary() override;
|
||||||
|
|
||||||
DBoundary &operator=(const DBoundary &rhs);
|
DBoundary &operator=(const DBoundary &rhs);
|
||||||
|
|
||||||
Uid modelUid() const { return Uid::invalidUid(); }
|
Uid modelUid() const override { return Uid::invalidUid(); }
|
||||||
QString text() const { return m_text; }
|
QString text() const { return m_text; }
|
||||||
void setText(const QString &text);
|
void setText(const QString &text);
|
||||||
QPointF pos() const { return m_pos; }
|
QPointF pos() const { return m_pos; }
|
||||||
@@ -55,8 +55,8 @@ public:
|
|||||||
QRectF rect() const { return m_rect; }
|
QRectF rect() const { return m_rect; }
|
||||||
void setRect(const QRectF &rect);
|
void setRect(const QRectF &rect);
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_text;
|
QString m_text;
|
||||||
|
@@ -62,8 +62,8 @@ public:
|
|||||||
bool showAllMembers() const { return m_showAllMembers; }
|
bool showAllMembers() const { return m_showAllMembers; }
|
||||||
void setShowAllMembers(bool showAllMembers);
|
void setShowAllMembers(bool showAllMembers);
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_umlNamespace;
|
QString m_umlNamespace;
|
||||||
|
@@ -43,8 +43,8 @@ public:
|
|||||||
bool isPlainShape() const { return m_isPlainShape; }
|
bool isPlainShape() const { return m_isPlainShape; }
|
||||||
void setPlainShape(bool planeShape);
|
void setPlainShape(bool planeShape);
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_isPlainShape;
|
bool m_isPlainShape;
|
||||||
|
@@ -43,7 +43,7 @@ class QMT_EXPORT DDependency : public DRelation
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DDependency();
|
DDependency();
|
||||||
~DDependency();
|
~DDependency() override;
|
||||||
|
|
||||||
Uid source() const;
|
Uid source() const;
|
||||||
void setSource(const Uid &source);
|
void setSource(const Uid &source);
|
||||||
@@ -52,8 +52,8 @@ public:
|
|||||||
MDependency::Direction direction() const { return m_direction; }
|
MDependency::Direction direction() const { return m_direction; }
|
||||||
void setDirection(MDependency::Direction direction);
|
void setDirection(MDependency::Direction direction);
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MDependency::Direction m_direction;
|
MDependency::Direction m_direction;
|
||||||
|
@@ -40,8 +40,8 @@ class QMT_EXPORT DDiagram : public DObject
|
|||||||
public:
|
public:
|
||||||
DDiagram();
|
DDiagram();
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -47,8 +47,8 @@ public:
|
|||||||
Uid base() const;
|
Uid base() const;
|
||||||
void setBase(const Uid &base);
|
void setBase(const Uid &base);
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -39,7 +39,7 @@ class QMT_EXPORT DItem : public DObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DItem();
|
DItem();
|
||||||
~DItem();
|
~DItem() override;
|
||||||
|
|
||||||
QString variety() const { return m_variety; }
|
QString variety() const { return m_variety; }
|
||||||
void setVariety(const QString &variety);
|
void setVariety(const QString &variety);
|
||||||
@@ -48,8 +48,8 @@ public:
|
|||||||
bool isShapeEditable() const { return m_isShapeEditable; }
|
bool isShapeEditable() const { return m_isShapeEditable; }
|
||||||
void setShapeEditable(bool shapeEditable);
|
void setShapeEditable(bool shapeEditable);
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_variety;
|
QString m_variety;
|
||||||
|
@@ -77,11 +77,11 @@ public:
|
|||||||
|
|
||||||
DObject();
|
DObject();
|
||||||
DObject(const DObject &);
|
DObject(const DObject &);
|
||||||
~DObject();
|
~DObject() override;
|
||||||
|
|
||||||
DObject &operator=(const DObject &rhs);
|
DObject &operator=(const DObject &rhs);
|
||||||
|
|
||||||
Uid modelUid() const { return m_modelUid; }
|
Uid modelUid() const override { return m_modelUid; }
|
||||||
void setModelUid(const Uid &uid);
|
void setModelUid(const Uid &uid);
|
||||||
QList<QString> stereotypes() const { return m_stereotypes; }
|
QList<QString> stereotypes() const { return m_stereotypes; }
|
||||||
void setStereotypes(const QList<QString> &stereotypes);
|
void setStereotypes(const QList<QString> &stereotypes);
|
||||||
@@ -106,8 +106,8 @@ public:
|
|||||||
bool isVisualEmphasized() const { return m_isVisualEmphasized; }
|
bool isVisualEmphasized() const { return m_isVisualEmphasized; }
|
||||||
void setVisualEmphasized(bool visualEmphasized);
|
void setVisualEmphasized(bool visualEmphasized);
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Uid m_modelUid;
|
Uid m_modelUid;
|
||||||
|
@@ -40,8 +40,8 @@ class QMT_EXPORT DPackage : public DObject
|
|||||||
public:
|
public:
|
||||||
DPackage();
|
DPackage();
|
||||||
|
|
||||||
virtual void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
virtual void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -56,9 +56,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
DRelation();
|
DRelation();
|
||||||
~DRelation();
|
~DRelation() override;
|
||||||
|
|
||||||
Uid modelUid() const { return m_modelUid; }
|
Uid modelUid() const override { return m_modelUid; }
|
||||||
void setModelUid(const Uid &uid);
|
void setModelUid(const Uid &uid);
|
||||||
QList<QString> stereotypes() const { return m_stereotypes; }
|
QList<QString> stereotypes() const { return m_stereotypes; }
|
||||||
void setStereotypes(const QList<QString> &stereotypes);
|
void setStereotypes(const QList<QString> &stereotypes);
|
||||||
@@ -71,8 +71,8 @@ public:
|
|||||||
QList<IntermediatePoint> intermediatePoints() const { return m_intermediatePoints; }
|
QList<IntermediatePoint> intermediatePoints() const { return m_intermediatePoints; }
|
||||||
void setIntermediatePoints(const QList<IntermediatePoint> &intermediatePoints);
|
void setIntermediatePoints(const QList<IntermediatePoint> &intermediatePoints);
|
||||||
|
|
||||||
void accept(DVisitor *visitor);
|
void accept(DVisitor *visitor) override;
|
||||||
void accept(DConstVisitor *visitor) const;
|
void accept(DConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Uid m_modelUid;
|
Uid m_modelUid;
|
||||||
|
@@ -43,19 +43,19 @@ public:
|
|||||||
|
|
||||||
DElement *cloned() const { return m_cloned; }
|
DElement *cloned() const { return m_cloned; }
|
||||||
|
|
||||||
void visitDElement(const DElement *element);
|
void visitDElement(const DElement *element) override;
|
||||||
void visitDObject(const DObject *object);
|
void visitDObject(const DObject *object) override;
|
||||||
void visitDPackage(const DPackage *package);
|
void visitDPackage(const DPackage *package) override;
|
||||||
void visitDClass(const DClass *klass);
|
void visitDClass(const DClass *klass) override;
|
||||||
void visitDComponent(const DComponent *component);
|
void visitDComponent(const DComponent *component) override;
|
||||||
void visitDDiagram(const DDiagram *diagram);
|
void visitDDiagram(const DDiagram *diagram) override;
|
||||||
void visitDItem(const DItem *item);
|
void visitDItem(const DItem *item) override;
|
||||||
void visitDRelation(const DRelation *relation);
|
void visitDRelation(const DRelation *relation) override;
|
||||||
void visitDInheritance(const DInheritance *inheritance);
|
void visitDInheritance(const DInheritance *inheritance) override;
|
||||||
void visitDDependency(const DDependency *dependency);
|
void visitDDependency(const DDependency *dependency) override;
|
||||||
void visitDAssociation(const DAssociation *association);
|
void visitDAssociation(const DAssociation *association) override;
|
||||||
void visitDAnnotation(const DAnnotation *annotation);
|
void visitDAnnotation(const DAnnotation *annotation) override;
|
||||||
void visitDBoundary(const DBoundary *boundary);
|
void visitDBoundary(const DBoundary *boundary) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DElement *m_cloned;
|
DElement *m_cloned;
|
||||||
@@ -68,19 +68,19 @@ public:
|
|||||||
|
|
||||||
DElement *cloned() const { return m_cloned; }
|
DElement *cloned() const { return m_cloned; }
|
||||||
|
|
||||||
void visitDElement(const DElement *element);
|
void visitDElement(const DElement *element) override;
|
||||||
void visitDObject(const DObject *object);
|
void visitDObject(const DObject *object) override;
|
||||||
void visitDPackage(const DPackage *package);
|
void visitDPackage(const DPackage *package) override;
|
||||||
void visitDClass(const DClass *klass);
|
void visitDClass(const DClass *klass) override;
|
||||||
void visitDComponent(const DComponent *component);
|
void visitDComponent(const DComponent *component) override;
|
||||||
void visitDDiagram(const DDiagram *diagram);
|
void visitDDiagram(const DDiagram *diagram) override;
|
||||||
void visitDItem(const DItem *item);
|
void visitDItem(const DItem *item) override;
|
||||||
void visitDRelation(const DRelation *relation);
|
void visitDRelation(const DRelation *relation) override;
|
||||||
void visitDInheritance(const DInheritance *inheritance);
|
void visitDInheritance(const DInheritance *inheritance) override;
|
||||||
void visitDDependency(const DDependency *dependency);
|
void visitDDependency(const DDependency *dependency) override;
|
||||||
void visitDAssociation(const DAssociation *association);
|
void visitDAssociation(const DAssociation *association) override;
|
||||||
void visitDAnnotation(const DAnnotation *annotation);
|
void visitDAnnotation(const DAnnotation *annotation) override;
|
||||||
void visitDBoundary(const DBoundary *boundary);
|
void visitDBoundary(const DBoundary *boundary) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DElement *m_cloned;
|
DElement *m_cloned;
|
||||||
|
@@ -45,18 +45,18 @@ public:
|
|||||||
|
|
||||||
DElement *product() const { return m_product; }
|
DElement *product() const { return m_product; }
|
||||||
|
|
||||||
void visitMElement(const MElement *element);
|
void visitMElement(const MElement *element) override;
|
||||||
void visitMObject(const MObject *object);
|
void visitMObject(const MObject *object) override;
|
||||||
void visitMPackage(const MPackage *package);
|
void visitMPackage(const MPackage *package) override;
|
||||||
void visitMClass(const MClass *klass);
|
void visitMClass(const MClass *klass) override;
|
||||||
void visitMComponent(const MComponent *component);
|
void visitMComponent(const MComponent *component) override;
|
||||||
void visitMDiagram(const MDiagram *diagram);
|
void visitMDiagram(const MDiagram *diagram) override;
|
||||||
void visitMCanvasDiagram(const MCanvasDiagram *diagram);
|
void visitMCanvasDiagram(const MCanvasDiagram *diagram) override;
|
||||||
void visitMItem(const MItem *item);
|
void visitMItem(const MItem *item) override;
|
||||||
void visitMRelation(const MRelation *relation);
|
void visitMRelation(const MRelation *relation) override;
|
||||||
void visitMDependency(const MDependency *dependency);
|
void visitMDependency(const MDependency *dependency) override;
|
||||||
void visitMInheritance(const MInheritance *inheritance);
|
void visitMInheritance(const MInheritance *inheritance) override;
|
||||||
void visitMAssociation(const MAssociation *association);
|
void visitMAssociation(const MAssociation *association) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DElement *m_product;
|
DElement *m_product;
|
||||||
|
@@ -41,19 +41,19 @@ class QMT_EXPORT DFlatAssignmentVisitor : public DConstVisitor
|
|||||||
public:
|
public:
|
||||||
DFlatAssignmentVisitor(DElement *target);
|
DFlatAssignmentVisitor(DElement *target);
|
||||||
|
|
||||||
void visitDElement(const DElement *element);
|
void visitDElement(const DElement *element) override;
|
||||||
void visitDObject(const DObject *object);
|
void visitDObject(const DObject *object) override;
|
||||||
void visitDPackage(const DPackage *package);
|
void visitDPackage(const DPackage *package) override;
|
||||||
void visitDClass(const DClass *klass);
|
void visitDClass(const DClass *klass) override;
|
||||||
void visitDComponent(const DComponent *component);
|
void visitDComponent(const DComponent *component) override;
|
||||||
void visitDDiagram(const DDiagram *diagram);
|
void visitDDiagram(const DDiagram *diagram) override;
|
||||||
void visitDItem(const DItem *item);
|
void visitDItem(const DItem *item) override;
|
||||||
void visitDRelation(const DRelation *relation);
|
void visitDRelation(const DRelation *relation) override;
|
||||||
void visitDInheritance(const DInheritance *inheritance);
|
void visitDInheritance(const DInheritance *inheritance) override;
|
||||||
void visitDDependency(const DDependency *dependency);
|
void visitDDependency(const DDependency *dependency) override;
|
||||||
void visitDAssociation(const DAssociation *association);
|
void visitDAssociation(const DAssociation *association) override;
|
||||||
void visitDAnnotation(const DAnnotation *annotation);
|
void visitDAnnotation(const DAnnotation *annotation) override;
|
||||||
void visitDBoundary(const DBoundary *boundary);
|
void visitDBoundary(const DBoundary *boundary) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DElement *m_target;
|
DElement *m_target;
|
||||||
|
@@ -111,12 +111,12 @@ public:
|
|||||||
m_clonedElements.insert(visitor.cloned()->uid(), visitor.cloned());
|
m_clonedElements.insert(visitor.cloned()->uid(), visitor.cloned());
|
||||||
}
|
}
|
||||||
|
|
||||||
~UpdateElementCommand()
|
~UpdateElementCommand() override
|
||||||
{
|
{
|
||||||
qDeleteAll(m_clonedElements);
|
qDeleteAll(m_clonedElements);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mergeWith(const UndoCommand *other)
|
bool mergeWith(const UndoCommand *other) override
|
||||||
{
|
{
|
||||||
auto otherUpdateCommand = dynamic_cast<const UpdateElementCommand *>(other);
|
auto otherUpdateCommand = dynamic_cast<const UpdateElementCommand *>(other);
|
||||||
if (!otherUpdateCommand)
|
if (!otherUpdateCommand)
|
||||||
@@ -140,7 +140,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void redo()
|
void redo() override
|
||||||
{
|
{
|
||||||
if (canRedo()) {
|
if (canRedo()) {
|
||||||
swap();
|
swap();
|
||||||
@@ -148,7 +148,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void undo()
|
void undo() override
|
||||||
{
|
{
|
||||||
swap();
|
swap();
|
||||||
UndoCommand::undo();
|
UndoCommand::undo();
|
||||||
@@ -192,7 +192,7 @@ protected:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
~AbstractAddRemCommand()
|
~AbstractAddRemCommand() override
|
||||||
{
|
{
|
||||||
foreach (const Clone &clone, m_clonedElements)
|
foreach (const Clone &clone, m_clonedElements)
|
||||||
delete clone.m_clonedElement;
|
delete clone.m_clonedElement;
|
||||||
@@ -260,7 +260,7 @@ public:
|
|||||||
m_clonedElements.append(clone);
|
m_clonedElements.append(clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
void redo()
|
void redo() override
|
||||||
{
|
{
|
||||||
if (canRedo()) {
|
if (canRedo()) {
|
||||||
insert();
|
insert();
|
||||||
@@ -268,7 +268,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void undo()
|
void undo() override
|
||||||
{
|
{
|
||||||
remove();
|
remove();
|
||||||
UndoCommand::undo();
|
UndoCommand::undo();
|
||||||
@@ -298,7 +298,7 @@ public:
|
|||||||
m_clonedElements.append(clone);
|
m_clonedElements.append(clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
void redo()
|
void redo() override
|
||||||
{
|
{
|
||||||
if (canRedo()) {
|
if (canRedo()) {
|
||||||
remove();
|
remove();
|
||||||
@@ -306,7 +306,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void undo()
|
void undo() override
|
||||||
{
|
{
|
||||||
insert();
|
insert();
|
||||||
UndoCommand::undo();
|
UndoCommand::undo();
|
||||||
@@ -321,7 +321,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void visitMDiagram(MDiagram *diagram)
|
void visitMDiagram(MDiagram *diagram) override
|
||||||
{
|
{
|
||||||
m_allDiagrams->append(diagram);
|
m_allDiagrams->append(diagram);
|
||||||
MChildrenVisitor::visitMDiagram(diagram);
|
MChildrenVisitor::visitMDiagram(diagram);
|
||||||
|
@@ -72,7 +72,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DiagramController(QObject *parent = 0);
|
explicit DiagramController(QObject *parent = 0);
|
||||||
~DiagramController();
|
~DiagramController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void beginResetAllDiagrams();
|
void beginResetAllDiagrams();
|
||||||
|
@@ -46,18 +46,18 @@ public:
|
|||||||
bool isUpdateNeeded() const { return m_isUpdateNeeded; }
|
bool isUpdateNeeded() const { return m_isUpdateNeeded; }
|
||||||
void setCheckNeedsUpdate(bool checkNeedsUpdate);
|
void setCheckNeedsUpdate(bool checkNeedsUpdate);
|
||||||
|
|
||||||
void visitMElement(const MElement *element);
|
void visitMElement(const MElement *element) override;
|
||||||
void visitMObject(const MObject *object);
|
void visitMObject(const MObject *object) override;
|
||||||
void visitMPackage(const MPackage *package);
|
void visitMPackage(const MPackage *package) override;
|
||||||
void visitMClass(const MClass *klass);
|
void visitMClass(const MClass *klass) override;
|
||||||
void visitMComponent(const MComponent *component);
|
void visitMComponent(const MComponent *component) override;
|
||||||
void visitMDiagram(const MDiagram *diagram);
|
void visitMDiagram(const MDiagram *diagram) override;
|
||||||
void visitMCanvasDiagram(const MCanvasDiagram *diagram);
|
void visitMCanvasDiagram(const MCanvasDiagram *diagram) override;
|
||||||
void visitMItem(const MItem *item);
|
void visitMItem(const MItem *item) override;
|
||||||
void visitMRelation(const MRelation *relation);
|
void visitMRelation(const MRelation *relation) override;
|
||||||
void visitMDependency(const MDependency *dependency);
|
void visitMDependency(const MDependency *dependency) override;
|
||||||
void visitMInheritance(const MInheritance *inheritance);
|
void visitMInheritance(const MInheritance *inheritance) override;
|
||||||
void visitMAssociation(const MAssociation *association);
|
void visitMAssociation(const MAssociation *association) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool isUpdating(bool valueChanged);
|
bool isUpdating(bool valueChanged);
|
||||||
|
@@ -42,19 +42,19 @@ class QMT_EXPORT DVoidVisitor : public DVisitor
|
|||||||
public:
|
public:
|
||||||
DVoidVisitor();
|
DVoidVisitor();
|
||||||
|
|
||||||
void visitDElement(DElement *element);
|
void visitDElement(DElement *element) override;
|
||||||
void visitDObject(DObject *object);
|
void visitDObject(DObject *object) override;
|
||||||
void visitDPackage(DPackage *package);
|
void visitDPackage(DPackage *package) override;
|
||||||
void visitDClass(DClass *klass);
|
void visitDClass(DClass *klass) override;
|
||||||
void visitDComponent(DComponent *component);
|
void visitDComponent(DComponent *component) override;
|
||||||
void visitDDiagram(DDiagram *diagram);
|
void visitDDiagram(DDiagram *diagram) override;
|
||||||
void visitDItem(DItem *item);
|
void visitDItem(DItem *item) override;
|
||||||
void visitDRelation(DRelation *relation);
|
void visitDRelation(DRelation *relation) override;
|
||||||
void visitDInheritance(DInheritance *inheritance);
|
void visitDInheritance(DInheritance *inheritance) override;
|
||||||
void visitDDependency(DDependency *dependency);
|
void visitDDependency(DDependency *dependency) override;
|
||||||
void visitDAssociation(DAssociation *association);
|
void visitDAssociation(DAssociation *association) override;
|
||||||
void visitDAnnotation(DAnnotation *annotation);
|
void visitDAnnotation(DAnnotation *annotation) override;
|
||||||
void visitDBoundary(DBoundary *boundary);
|
void visitDBoundary(DBoundary *boundary) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QMT_EXPORT DConstVoidVisitor : public DConstVisitor
|
class QMT_EXPORT DConstVoidVisitor : public DConstVisitor
|
||||||
@@ -62,19 +62,19 @@ class QMT_EXPORT DConstVoidVisitor : public DConstVisitor
|
|||||||
public:
|
public:
|
||||||
DConstVoidVisitor();
|
DConstVoidVisitor();
|
||||||
|
|
||||||
void visitDElement(const DElement *element);
|
void visitDElement(const DElement *element) override;
|
||||||
void visitDObject(const DObject *object);
|
void visitDObject(const DObject *object) override;
|
||||||
void visitDPackage(const DPackage *package);
|
void visitDPackage(const DPackage *package) override;
|
||||||
void visitDClass(const DClass *klass);
|
void visitDClass(const DClass *klass) override;
|
||||||
void visitDComponent(const DComponent *component);
|
void visitDComponent(const DComponent *component) override;
|
||||||
void visitDDiagram(const DDiagram *diagram);
|
void visitDDiagram(const DDiagram *diagram) override;
|
||||||
void visitDItem(const DItem *item);
|
void visitDItem(const DItem *item) override;
|
||||||
void visitDRelation(const DRelation *relation);
|
void visitDRelation(const DRelation *relation) override;
|
||||||
void visitDInheritance(const DInheritance *inheritance);
|
void visitDInheritance(const DInheritance *inheritance) override;
|
||||||
void visitDDependency(const DDependency *dependency);
|
void visitDDependency(const DDependency *dependency) override;
|
||||||
void visitDAssociation(const DAssociation *association);
|
void visitDAssociation(const DAssociation *association) override;
|
||||||
void visitDAnnotation(const DAnnotation *annotation);
|
void visitDAnnotation(const DAnnotation *annotation) override;
|
||||||
void visitDBoundary(const DBoundary *boundary);
|
void visitDBoundary(const DBoundary *boundary) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -44,30 +44,30 @@ class QMT_EXPORT DiagramGraphicsScene : public QGraphicsScene
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DiagramGraphicsScene(DiagramSceneModel *diagramSceneModel, QObject *parent = 0);
|
DiagramGraphicsScene(DiagramSceneModel *diagramSceneModel, QObject *parent = 0);
|
||||||
~DiagramGraphicsScene();
|
~DiagramGraphicsScene() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sceneActivated();
|
void sceneActivated();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event(QEvent *event);
|
bool event(QEvent *event) override;
|
||||||
bool eventFilter(QObject *watched, QEvent *event);
|
bool eventFilter(QObject *watched, QEvent *event) override;
|
||||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
|
||||||
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
|
void dragEnterEvent(QGraphicsSceneDragDropEvent *event) override;
|
||||||
void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
|
void dragMoveEvent(QGraphicsSceneDragDropEvent *event) override;
|
||||||
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
|
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) override;
|
||||||
void dropEvent(QGraphicsSceneDragDropEvent *event);
|
void dropEvent(QGraphicsSceneDragDropEvent *event) override;
|
||||||
void focusInEvent(QFocusEvent *event);
|
void focusInEvent(QFocusEvent *event) override;
|
||||||
void focusOutEvent(QFocusEvent *event);
|
void focusOutEvent(QFocusEvent *event) override;
|
||||||
void helpEvent(QGraphicsSceneHelpEvent *event);
|
void helpEvent(QGraphicsSceneHelpEvent *event) override;
|
||||||
void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
void keyReleaseEvent(QKeyEvent *event);
|
void keyReleaseEvent(QKeyEvent *event) override;
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void wheelEvent(QGraphicsSceneWheelEvent *event);
|
void wheelEvent(QGraphicsSceneWheelEvent *event) override;
|
||||||
void inputMethodEvent(QInputMethodEvent *event);
|
void inputMethodEvent(QInputMethodEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DiagramSceneModel *m_diagramSceneModel;
|
DiagramSceneModel *m_diagramSceneModel;
|
||||||
|
@@ -79,7 +79,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
DiagramSceneModel(QObject *parent = 0);
|
DiagramSceneModel(QObject *parent = 0);
|
||||||
~DiagramSceneModel();
|
~DiagramSceneModel() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void diagramSceneActivated(const MDiagram *diagram);
|
void diagramSceneActivated(const MDiagram *diagram);
|
||||||
|
@@ -44,19 +44,19 @@ public:
|
|||||||
|
|
||||||
QGraphicsItem *createdGraphicsItem() const { return m_graphicsItem; }
|
QGraphicsItem *createdGraphicsItem() const { return m_graphicsItem; }
|
||||||
|
|
||||||
void visitDElement(DElement *element);
|
void visitDElement(DElement *element) override;
|
||||||
void visitDObject(DObject *object);
|
void visitDObject(DObject *object) override;
|
||||||
void visitDPackage(DPackage *package);
|
void visitDPackage(DPackage *package) override;
|
||||||
void visitDClass(DClass *klass);
|
void visitDClass(DClass *klass) override;
|
||||||
void visitDComponent(DComponent *component);
|
void visitDComponent(DComponent *component) override;
|
||||||
void visitDDiagram(DDiagram *diagram);
|
void visitDDiagram(DDiagram *diagram) override;
|
||||||
void visitDItem(DItem *item);
|
void visitDItem(DItem *item) override;
|
||||||
void visitDRelation(DRelation *relation);
|
void visitDRelation(DRelation *relation) override;
|
||||||
void visitDInheritance(DInheritance *inheritance);
|
void visitDInheritance(DInheritance *inheritance) override;
|
||||||
void visitDDependency(DDependency *dependency);
|
void visitDDependency(DDependency *dependency) override;
|
||||||
void visitDAssociation(DAssociation *association);
|
void visitDAssociation(DAssociation *association) override;
|
||||||
void visitDAnnotation(DAnnotation *annotation);
|
void visitDAnnotation(DAnnotation *annotation) override;
|
||||||
void visitDBoundary(DBoundary *boundary);
|
void visitDBoundary(DBoundary *boundary) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DiagramSceneModel *m_diagramSceneModel;
|
DiagramSceneModel *m_diagramSceneModel;
|
||||||
@@ -69,19 +69,19 @@ public:
|
|||||||
UpdateVisitor(QGraphicsItem *item, DiagramSceneModel *diagramSceneModel,
|
UpdateVisitor(QGraphicsItem *item, DiagramSceneModel *diagramSceneModel,
|
||||||
DElement *relatedElement = 0);
|
DElement *relatedElement = 0);
|
||||||
|
|
||||||
void visitDElement(DElement *element);
|
void visitDElement(DElement *element) override;
|
||||||
void visitDObject(DObject *object);
|
void visitDObject(DObject *object) override;
|
||||||
void visitDPackage(DPackage *package);
|
void visitDPackage(DPackage *package) override;
|
||||||
void visitDClass(DClass *klass);
|
void visitDClass(DClass *klass) override;
|
||||||
void visitDComponent(DComponent *component);
|
void visitDComponent(DComponent *component) override;
|
||||||
void visitDDiagram(DDiagram *diagram);
|
void visitDDiagram(DDiagram *diagram) override;
|
||||||
void visitDItem(DItem *item);
|
void visitDItem(DItem *item) override;
|
||||||
void visitDRelation(DRelation *relation);
|
void visitDRelation(DRelation *relation) override;
|
||||||
void visitDInheritance(DInheritance *inheritance);
|
void visitDInheritance(DInheritance *inheritance) override;
|
||||||
void visitDDependency(DDependency *dependency);
|
void visitDDependency(DDependency *dependency) override;
|
||||||
void visitDAssociation(DAssociation *association);
|
void visitDAssociation(DAssociation *association) override;
|
||||||
void visitDAnnotation(DAnnotation *annotation);
|
void visitDAnnotation(DAnnotation *annotation) override;
|
||||||
void visitDBoundary(DBoundary *boundary);
|
void visitDBoundary(DBoundary *boundary) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QGraphicsItem *m_graphicsItem;
|
QGraphicsItem *m_graphicsItem;
|
||||||
|
@@ -57,46 +57,46 @@ class AnnotationItem :
|
|||||||
public:
|
public:
|
||||||
AnnotationItem(DAnnotation *annotation, DiagramSceneModel *diagramSceneModel,
|
AnnotationItem(DAnnotation *annotation, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = 0);
|
||||||
~AnnotationItem();
|
~AnnotationItem() override;
|
||||||
|
|
||||||
DAnnotation *annotation() const { return m_annotation; }
|
DAnnotation *annotation() const { return m_annotation; }
|
||||||
DiagramSceneModel *diagramSceneModel() const { return m_diagramSceneModel; }
|
DiagramSceneModel *diagramSceneModel() const { return m_diagramSceneModel; }
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
|
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
|
|
||||||
virtual void update();
|
virtual void update();
|
||||||
|
|
||||||
QPointF pos() const;
|
QPointF pos() const override;
|
||||||
QRectF rect() const;
|
QRectF rect() const override;
|
||||||
QSizeF minimumSize() const;
|
QSizeF minimumSize() const override;
|
||||||
|
|
||||||
void setPosAndRect(const QPointF &originalPos, const QRectF &originalRect,
|
void setPosAndRect(const QPointF &originalPos, const QRectF &originalRect,
|
||||||
const QPointF &topLeftDelta, const QPointF &bottomRightDelta);
|
const QPointF &topLeftDelta, const QPointF &bottomRightDelta) override;
|
||||||
void alignItemSizeToRaster(Side adjustHorizontalSide, Side adjustVerticalSide,
|
void alignItemSizeToRaster(Side adjustHorizontalSide, Side adjustVerticalSide,
|
||||||
double rasterWidth, double rasterHeight);
|
double rasterWidth, double rasterHeight) override;
|
||||||
|
|
||||||
void moveDelta(const QPointF &delta);
|
void moveDelta(const QPointF &delta) override;
|
||||||
void alignItemPositionToRaster(double rasterWidth, double rasterHeight);
|
void alignItemPositionToRaster(double rasterWidth, double rasterHeight) override;
|
||||||
|
|
||||||
bool isSecondarySelected() const;
|
bool isSecondarySelected() const override;
|
||||||
void setSecondarySelected(bool secondarySelected);
|
void setSecondarySelected(bool secondarySelected) override;
|
||||||
bool isFocusSelected() const;
|
bool isFocusSelected() const override;
|
||||||
void setFocusSelected(bool focusSelected);
|
void setFocusSelected(bool focusSelected) override;
|
||||||
|
|
||||||
bool isEditable() const;
|
bool isEditable() const override;
|
||||||
void edit();
|
void edit() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
|
|
||||||
void updateSelectionMarker();
|
void updateSelectionMarker();
|
||||||
void updateSelectionMarkerGeometry(const QRectF &annotationRect);
|
void updateSelectionMarkerGeometry(const QRectF &annotationRect);
|
||||||
const Style *adaptedStyle();
|
const Style *adaptedStyle();
|
||||||
|
|
||||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onContentsChanged();
|
void onContentsChanged();
|
||||||
|
@@ -47,10 +47,10 @@ class AssociationItem : public RelationItem
|
|||||||
public:
|
public:
|
||||||
AssociationItem(DAssociation *association, DiagramSceneModel *diagramSceneModel,
|
AssociationItem(DAssociation *association, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = 0);
|
||||||
~AssociationItem();
|
~AssociationItem() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void update(const Style *style);
|
void update(const Style *style) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateEndLabels(const DAssociationEnd &end, const DAssociationEnd &otherEnd,
|
void updateEndLabels(const DAssociationEnd &end, const DAssociationEnd &otherEnd,
|
||||||
|
@@ -57,44 +57,44 @@ class BoundaryItem :
|
|||||||
public:
|
public:
|
||||||
BoundaryItem(DBoundary *boundary, DiagramSceneModel *diagramSceneModel,
|
BoundaryItem(DBoundary *boundary, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = 0);
|
||||||
~BoundaryItem();
|
~BoundaryItem() override;
|
||||||
|
|
||||||
DBoundary *boundary() const { return m_boundary; }
|
DBoundary *boundary() const { return m_boundary; }
|
||||||
DiagramSceneModel *diagramSceneModel() const { return m_diagramSceneModel; }
|
DiagramSceneModel *diagramSceneModel() const { return m_diagramSceneModel; }
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
|
|
||||||
virtual void update();
|
virtual void update();
|
||||||
|
|
||||||
QPointF pos() const;
|
QPointF pos() const override;
|
||||||
QRectF rect() const;
|
QRectF rect() const override;
|
||||||
QSizeF minimumSize() const;
|
QSizeF minimumSize() const override;
|
||||||
void setPosAndRect(const QPointF &originalPos, const QRectF &originalRect,
|
void setPosAndRect(const QPointF &originalPos, const QRectF &originalRect,
|
||||||
const QPointF &topLeftDelta, const QPointF &bottomRightDelta);
|
const QPointF &topLeftDelta, const QPointF &bottomRightDelta) override;
|
||||||
void alignItemSizeToRaster(Side adjustHorizontalSide, Side adjustVerticalSide,
|
void alignItemSizeToRaster(Side adjustHorizontalSide, Side adjustVerticalSide,
|
||||||
double rasterWidth, double rasterHeight);
|
double rasterWidth, double rasterHeight) override;
|
||||||
|
|
||||||
void moveDelta(const QPointF &delta);
|
void moveDelta(const QPointF &delta) override;
|
||||||
void alignItemPositionToRaster(double rasterWidth, double rasterHeight);
|
void alignItemPositionToRaster(double rasterWidth, double rasterHeight) override;
|
||||||
|
|
||||||
bool isSecondarySelected() const;
|
bool isSecondarySelected() const override;
|
||||||
void setSecondarySelected(bool secondarySelected);
|
void setSecondarySelected(bool secondarySelected) override;
|
||||||
bool isFocusSelected() const;
|
bool isFocusSelected() const override;
|
||||||
void setFocusSelected(bool focusSelected);
|
void setFocusSelected(bool focusSelected) override;
|
||||||
|
|
||||||
bool isEditable() const;
|
bool isEditable() const override;
|
||||||
void edit();
|
void edit() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
|
|
||||||
void updateSelectionMarker();
|
void updateSelectionMarker();
|
||||||
void updateSelectionMarkerGeometry(const QRectF &boundaryRect);
|
void updateSelectionMarkerGeometry(const QRectF &boundaryRect);
|
||||||
const Style *adaptedStyle();
|
const Style *adaptedStyle();
|
||||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onContentsChanged();
|
void onContentsChanged();
|
||||||
|
@@ -56,22 +56,22 @@ class ClassItem : public ObjectItem, public IRelationable
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ClassItem(DClass *klass, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
ClassItem(DClass *klass, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
||||||
~ClassItem();
|
~ClassItem() override;
|
||||||
|
|
||||||
void update();
|
void update() override;
|
||||||
|
|
||||||
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
||||||
QLineF *intersectionLine) const;
|
QLineF *intersectionLine) const override;
|
||||||
|
|
||||||
QSizeF minimumSize() const;
|
QSizeF minimumSize() const override;
|
||||||
|
|
||||||
QPointF relationStartPos() const;
|
QPointF relationStartPos() const override;
|
||||||
void relationDrawn(const QString &id, const QPointF &toScenePos,
|
void relationDrawn(const QString &id, const QPointF &toScenePos,
|
||||||
const QList<QPointF> &intermediatePoints);
|
const QList<QPointF> &intermediatePoints) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool extendContextMenu(QMenu *menu);
|
bool extendContextMenu(QMenu *menu) override;
|
||||||
bool handleSelectedContextMenuAction(QAction *action);
|
bool handleSelectedContextMenuAction(QAction *action) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSizeF calcMinimumGeometry() const;
|
QSizeF calcMinimumGeometry() const;
|
||||||
|
@@ -54,21 +54,21 @@ class ComponentItem : public ObjectItem, public IRelationable
|
|||||||
public:
|
public:
|
||||||
ComponentItem(DComponent *component, DiagramSceneModel *diagramSceneModel,
|
ComponentItem(DComponent *component, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = 0);
|
||||||
~ComponentItem();
|
~ComponentItem() override;
|
||||||
|
|
||||||
void update();
|
void update() override;
|
||||||
|
|
||||||
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
||||||
QLineF *intersectionLine) const;
|
QLineF *intersectionLine) const override;
|
||||||
|
|
||||||
QSizeF minimumSize() const;
|
QSizeF minimumSize() const override;
|
||||||
|
|
||||||
QList<Latch> horizontalLatches(Action action, bool grabbedItem) const;
|
QList<Latch> horizontalLatches(Action action, bool grabbedItem) const override;
|
||||||
QList<Latch> verticalLatches(Action action, bool grabbedItem) const;
|
QList<Latch> verticalLatches(Action action, bool grabbedItem) const override;
|
||||||
|
|
||||||
QPointF relationStartPos() const;
|
QPointF relationStartPos() const override;
|
||||||
void relationDrawn(const QString &id, const QPointF &toScenePos, const
|
void relationDrawn(const QString &id, const QPointF &toScenePos, const
|
||||||
QList<QPointF> &intermediatePoints);
|
QList<QPointF> &intermediatePoints) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool hasPlainShape() const;
|
bool hasPlainShape() const;
|
||||||
|
@@ -44,14 +44,14 @@ class DiagramItem : public ObjectItem
|
|||||||
public:
|
public:
|
||||||
explicit DiagramItem(DDiagram *diagram, DiagramSceneModel *diagramSceneModel,
|
explicit DiagramItem(DDiagram *diagram, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = 0);
|
||||||
~DiagramItem();
|
~DiagramItem() override;
|
||||||
|
|
||||||
virtual void update();
|
void update() override;
|
||||||
|
|
||||||
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
||||||
QLineF *intersectionLine) const;
|
QLineF *intersectionLine) const override;
|
||||||
|
|
||||||
QSizeF minimumSize() const;
|
QSizeF minimumSize() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSizeF calcMinimumGeometry() const;
|
QSizeF calcMinimumGeometry() const;
|
||||||
|
@@ -53,21 +53,21 @@ class ItemItem : public ObjectItem, public IRelationable
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ItemItem(DItem *item, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
ItemItem(DItem *item, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
||||||
~ItemItem();
|
~ItemItem() override;
|
||||||
|
|
||||||
void update();
|
void update() override;
|
||||||
|
|
||||||
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
||||||
QLineF *intersectionLine) const;
|
QLineF *intersectionLine) const override;
|
||||||
|
|
||||||
QSizeF minimumSize() const;
|
QSizeF minimumSize() const override;
|
||||||
|
|
||||||
QList<Latch> horizontalLatches(Action action, bool grabbedItem) const;
|
QList<Latch> horizontalLatches(Action action, bool grabbedItem) const override;
|
||||||
QList<Latch> verticalLatches(Action action, bool grabbedItem) const;
|
QList<Latch> verticalLatches(Action action, bool grabbedItem) const override;
|
||||||
|
|
||||||
QPointF relationStartPos() const;
|
QPointF relationStartPos() const override;
|
||||||
void relationDrawn(const QString &id, const QPointF &toScenePos,
|
void relationDrawn(const QString &id, const QPointF &toScenePos,
|
||||||
const QList<QPointF> &intermediatePoints);
|
const QList<QPointF> &intermediatePoints) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSizeF calcMinimumGeometry() const;
|
QSizeF calcMinimumGeometry() const;
|
||||||
|
@@ -81,39 +81,39 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ObjectItem(DObject *object, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
ObjectItem(DObject *object, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
||||||
~ObjectItem();
|
~ObjectItem() override;
|
||||||
|
|
||||||
DObject *object() const { return m_object; }
|
DObject *object() const { return m_object; }
|
||||||
DiagramSceneModel *diagramSceneModel() const { return m_diagramSceneModel; }
|
DiagramSceneModel *diagramSceneModel() const { return m_diagramSceneModel; }
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
|
|
||||||
virtual void update() = 0;
|
virtual void update() = 0;
|
||||||
|
|
||||||
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
||||||
QLineF *intersectionLine) const = 0;
|
QLineF *intersectionLine) const override = 0;
|
||||||
|
|
||||||
QPointF pos() const;
|
QPointF pos() const override;
|
||||||
QRectF rect() const;
|
QRectF rect() const override;
|
||||||
QSizeF minimumSize() const = 0;
|
QSizeF minimumSize() const override = 0;
|
||||||
void setPosAndRect(const QPointF &originalPos, const QRectF &originalRect,
|
void setPosAndRect(const QPointF &originalPos, const QRectF &originalRect,
|
||||||
const QPointF &topLeftDelta, const QPointF &bottomRightDelta);
|
const QPointF &topLeftDelta, const QPointF &bottomRightDelta) override;
|
||||||
void alignItemSizeToRaster(Side adjustHorizontalSide, Side adjustVerticalSide,
|
void alignItemSizeToRaster(Side adjustHorizontalSide, Side adjustVerticalSide,
|
||||||
double rasterWidth, double rasterHeight);
|
double rasterWidth, double rasterHeight) override;
|
||||||
|
|
||||||
void moveDelta(const QPointF &delta);
|
void moveDelta(const QPointF &delta) override;
|
||||||
void alignItemPositionToRaster(double rasterWidth, double rasterHeight);
|
void alignItemPositionToRaster(double rasterWidth, double rasterHeight) override;
|
||||||
|
|
||||||
bool isSecondarySelected() const;
|
bool isSecondarySelected() const override;
|
||||||
void setSecondarySelected(bool secondarySelected);
|
void setSecondarySelected(bool secondarySelected) override;
|
||||||
bool isFocusSelected() const;
|
bool isFocusSelected() const override;
|
||||||
void setFocusSelected(bool focusSelected);
|
void setFocusSelected(bool focusSelected) override;
|
||||||
|
|
||||||
QList<Latch> horizontalLatches(Action action, bool grabbedItem) const;
|
QList<Latch> horizontalLatches(Action action, bool grabbedItem) const override;
|
||||||
QList<Latch> verticalLatches(Action action, bool grabbedItem) const;
|
QList<Latch> verticalLatches(Action action, bool grabbedItem) const override;
|
||||||
|
|
||||||
void align(AlignType alignType, const QString &identifier);
|
void align(AlignType alignType, const QString &identifier) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void updateStereotypeIconDisplay();
|
void updateStereotypeIconDisplay();
|
||||||
@@ -141,11 +141,11 @@ protected:
|
|||||||
virtual bool extendContextMenu(QMenu *menu);
|
virtual bool extendContextMenu(QMenu *menu);
|
||||||
virtual bool handleSelectedContextMenuAction(QAction *action);
|
virtual bool handleSelectedContextMenuAction(QAction *action);
|
||||||
|
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSizeF minimumSize(const QSet<QGraphicsItem *> &items) const;
|
QSizeF minimumSize(const QSet<QGraphicsItem *> &items) const;
|
||||||
|
@@ -54,21 +54,21 @@ class PackageItem : public ObjectItem, public IRelationable
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
PackageItem(DPackage *package, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
PackageItem(DPackage *package, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
||||||
~PackageItem();
|
~PackageItem() override;
|
||||||
|
|
||||||
void update();
|
void update() override;
|
||||||
|
|
||||||
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
||||||
QLineF *intersectionLine) const;
|
QLineF *intersectionLine) const override;
|
||||||
|
|
||||||
virtual QSizeF minimumSize() const;
|
QSizeF minimumSize() const override;
|
||||||
|
|
||||||
QList<Latch> horizontalLatches(Action action, bool grabbedItem) const;
|
QList<Latch> horizontalLatches(Action action, bool grabbedItem) const override;
|
||||||
QList<Latch> verticalLatches(Action action, bool grabbedItem) const;
|
QList<Latch> verticalLatches(Action action, bool grabbedItem) const override;
|
||||||
|
|
||||||
QPointF relationStartPos() const;
|
QPointF relationStartPos() const override;
|
||||||
void relationDrawn(const QString &id, const QPointF &toScenePos,
|
void relationDrawn(const QString &id, const QPointF &toScenePos,
|
||||||
const QList<QPointF> &intermediatePoints);
|
const QList<QPointF> &intermediatePoints) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ShapeGeometry calcMinimumGeometry() const;
|
ShapeGeometry calcMinimumGeometry() const;
|
||||||
|
@@ -61,36 +61,36 @@ class RelationItem :
|
|||||||
public:
|
public:
|
||||||
RelationItem(DRelation *relation, DiagramSceneModel *diagramSceneModel,
|
RelationItem(DRelation *relation, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = 0);
|
||||||
~RelationItem();
|
~RelationItem() override;
|
||||||
|
|
||||||
DRelation *relation() const { return m_relation; }
|
DRelation *relation() const { return m_relation; }
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
QPainterPath shape() const;
|
QPainterPath shape() const override;
|
||||||
|
|
||||||
void moveDelta(const QPointF &delta);
|
void moveDelta(const QPointF &delta) override;
|
||||||
void alignItemPositionToRaster(double rasterWidth, double rasterHeight);
|
void alignItemPositionToRaster(double rasterWidth, double rasterHeight) override;
|
||||||
|
|
||||||
bool isSecondarySelected() const;
|
bool isSecondarySelected() const override;
|
||||||
void setSecondarySelected(bool secondarySelected);
|
void setSecondarySelected(bool secondarySelected) override;
|
||||||
bool isFocusSelected() const;
|
bool isFocusSelected() const override;
|
||||||
void setFocusSelected(bool focusSelected);
|
void setFocusSelected(bool focusSelected) override;
|
||||||
|
|
||||||
QPointF handlePos(int index);
|
QPointF handlePos(int index) override;
|
||||||
void insertHandle(int beforeIndex, const QPointF &pos);
|
void insertHandle(int beforeIndex, const QPointF &pos) override;
|
||||||
void deleteHandle(int index);
|
void deleteHandle(int index) override;
|
||||||
void setHandlePos(int index, const QPointF &pos);
|
void setHandlePos(int index, const QPointF &pos) override;
|
||||||
void alignHandleToRaster(int index, double rasterWidth, double rasterHeight);
|
void alignHandleToRaster(int index, double rasterWidth, double rasterHeight) override;
|
||||||
|
|
||||||
virtual void update();
|
virtual void update();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void update(const Style *style);
|
virtual void update(const Style *style);
|
||||||
|
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Style *adaptedStyle();
|
const Style *adaptedStyle();
|
||||||
|
@@ -45,7 +45,7 @@ class StereotypeDisplayVisitor : public DConstVoidVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StereotypeDisplayVisitor();
|
StereotypeDisplayVisitor();
|
||||||
~StereotypeDisplayVisitor();
|
~StereotypeDisplayVisitor() override;
|
||||||
|
|
||||||
void setModelController(ModelController *modelController);
|
void setModelController(ModelController *modelController);
|
||||||
void setStereotypeController(StereotypeController *stereotypeController);
|
void setStereotypeController(StereotypeController *stereotypeController);
|
||||||
@@ -54,12 +54,12 @@ public:
|
|||||||
QString stereotypeIconId() const { return m_stereotypeIconId; }
|
QString stereotypeIconId() const { return m_stereotypeIconId; }
|
||||||
QString shapeIconId() const { return m_shapeIconId; }
|
QString shapeIconId() const { return m_shapeIconId; }
|
||||||
|
|
||||||
void visitDObject(const DObject *object);
|
void visitDObject(const DObject *object) override;
|
||||||
void visitDPackage(const DPackage *package);
|
void visitDPackage(const DPackage *package) override;
|
||||||
void visitDClass(const DClass *klass);
|
void visitDClass(const DClass *klass) override;
|
||||||
void visitDComponent(const DComponent *component);
|
void visitDComponent(const DComponent *component) override;
|
||||||
void visitDDiagram(const DDiagram *diagram);
|
void visitDDiagram(const DDiagram *diagram) override;
|
||||||
void visitDItem(const DItem *item);
|
void visitDItem(const DItem *item) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ModelController *m_modelController;
|
ModelController *m_modelController;
|
||||||
|
@@ -53,7 +53,7 @@ class QMT_EXPORT LatchController : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
LatchController(QObject *parent = 0);
|
LatchController(QObject *parent = 0);
|
||||||
~LatchController();
|
~LatchController() override;
|
||||||
|
|
||||||
void setDiagramSceneModel(DiagramSceneModel *diagramSceneModel);
|
void setDiagramSceneModel(DiagramSceneModel *diagramSceneModel);
|
||||||
|
|
||||||
|
@@ -55,10 +55,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
AlignButtonsItem(IAlignable *alignable, QGraphicsItem *parent = 0);
|
AlignButtonsItem(IAlignable *alignable, QGraphicsItem *parent = 0);
|
||||||
~AlignButtonsItem();
|
~AlignButtonsItem() override;
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
void addButton(IAlignable::AlignType alignType, const QString &identifier, qreal pos);
|
void addButton(IAlignable::AlignType alignType, const QString &identifier, qreal pos);
|
||||||
|
@@ -44,13 +44,14 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
AlignLineItem(Direction direction, QGraphicsItem *parent = 0);
|
AlignLineItem(Direction direction, QGraphicsItem *parent = 0);
|
||||||
~AlignLineItem();
|
~AlignLineItem() override;
|
||||||
|
|
||||||
void setLine(qreal pos);
|
void setLine(qreal pos);
|
||||||
void setLine(qreal pos, qreal otherPos1, qreal otherPos2);
|
void setLine(qreal pos, qreal otherPos1, qreal otherPos2);
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
|
QWidget *widget = 0) override;
|
||||||
|
|
||||||
Direction m_direction;
|
Direction m_direction;
|
||||||
QGraphicsLineItem *m_alignLine;
|
QGraphicsLineItem *m_alignLine;
|
||||||
|
@@ -75,7 +75,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
~GraphicsHeadItem()
|
~GraphicsHeadItem() override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,12 +97,12 @@ public:
|
|||||||
m_diamondSize = diamondSize;
|
m_diamondSize = diamondSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRectF boundingRect() const
|
QRectF boundingRect() const override
|
||||||
{
|
{
|
||||||
return childrenBoundingRect();
|
return childrenBoundingRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(painter);
|
Q_UNUSED(painter);
|
||||||
Q_UNUSED(option);
|
Q_UNUSED(option);
|
||||||
@@ -121,7 +121,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QPainterPath shape() const
|
QPainterPath shape() const override
|
||||||
{
|
{
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
path.setFillRule(Qt::WindingFill);
|
path.setFillRule(Qt::WindingFill);
|
||||||
|
@@ -66,7 +66,7 @@ public:
|
|||||||
|
|
||||||
ArrowItem(QGraphicsItem *parent = 0);
|
ArrowItem(QGraphicsItem *parent = 0);
|
||||||
ArrowItem(const ArrowItem &rhs, QGraphicsItem *parent = 0);
|
ArrowItem(const ArrowItem &rhs, QGraphicsItem *parent = 0);
|
||||||
~ArrowItem();
|
~ArrowItem() override;
|
||||||
|
|
||||||
void setShaft(Shaft shaft);
|
void setShaft(Shaft shaft);
|
||||||
void setArrowSize(double arrowSize);
|
void setArrowSize(double arrowSize);
|
||||||
@@ -75,9 +75,9 @@ public:
|
|||||||
void setEndHead(Head head);
|
void setEndHead(Head head);
|
||||||
void setPoints(const QList<QPointF> &points);
|
void setPoints(const QList<QPointF> &points);
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
QPainterPath shape() const;
|
QPainterPath shape() const override;
|
||||||
|
|
||||||
QPointF calcPointAtPercent(double percentage) const;
|
QPointF calcPointAtPercent(double percentage) const;
|
||||||
QLineF firstLineSegment() const;
|
QLineF firstLineSegment() const;
|
||||||
|
@@ -39,7 +39,7 @@ class ContextLabelItem : public QGraphicsSimpleTextItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ContextLabelItem(QGraphicsItem *parent = 0);
|
ContextLabelItem(QGraphicsItem *parent = 0);
|
||||||
~ContextLabelItem();
|
~ContextLabelItem() override;
|
||||||
|
|
||||||
void setMaxWidth(double maxWidth);
|
void setMaxWidth(double maxWidth);
|
||||||
void resetMaxWidth();
|
void resetMaxWidth();
|
||||||
|
@@ -47,7 +47,7 @@ class CustomIconItem : public QGraphicsItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CustomIconItem(DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
CustomIconItem(DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
||||||
~CustomIconItem();
|
~CustomIconItem() override;
|
||||||
|
|
||||||
void setStereotypeIconId(const QString &stereotypeIconId);
|
void setStereotypeIconId(const QString &stereotypeIconId);
|
||||||
void setBaseSize(const QSizeF &baseSize);
|
void setBaseSize(const QSizeF &baseSize);
|
||||||
@@ -58,8 +58,8 @@ public:
|
|||||||
double shapeWidth() const;
|
double shapeWidth() const;
|
||||||
double shapeHeight() const;
|
double shapeHeight() const;
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DiagramSceneModel *m_diagramSceneModel;
|
DiagramSceneModel *m_diagramSceneModel;
|
||||||
|
@@ -56,11 +56,11 @@ class PathSelectionItem : public QGraphicsItem
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
PathSelectionItem(IWindable *windable, QGraphicsItem *parent = 0);
|
PathSelectionItem(IWindable *windable, QGraphicsItem *parent = 0);
|
||||||
~PathSelectionItem();
|
~PathSelectionItem() override;
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
QPainterPath shape() const;
|
QPainterPath shape() const override;
|
||||||
|
|
||||||
QSizeF pointSize() const { return m_pointSize; }
|
QSizeF pointSize() const { return m_pointSize; }
|
||||||
void setPointSize(const QSizeF &size);
|
void setPointSize(const QSizeF &size);
|
||||||
@@ -69,7 +69,7 @@ public:
|
|||||||
void setSecondarySelected(bool secondarySelected);
|
void setSecondarySelected(bool secondarySelected);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void update();
|
void update();
|
||||||
|
@@ -81,10 +81,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
RectangularSelectionItem(IResizable *itemResizer, QGraphicsItem *parent = 0);
|
RectangularSelectionItem(IResizable *itemResizer, QGraphicsItem *parent = 0);
|
||||||
~RectangularSelectionItem();
|
~RectangularSelectionItem() override;
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
|
|
||||||
QRectF rect() const { return m_rect; }
|
QRectF rect() const { return m_rect; }
|
||||||
void setRect(const QRectF &rectangle);
|
void setRect(const QRectF &rectangle);
|
||||||
|
@@ -47,19 +47,20 @@ class RelationStarter : public QGraphicsRectItem
|
|||||||
public:
|
public:
|
||||||
RelationStarter(IRelationable *owner, DiagramSceneModel *diagramSceneModel,
|
RelationStarter(IRelationable *owner, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = 0);
|
||||||
~RelationStarter();
|
~RelationStarter() override;
|
||||||
|
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
|
QWidget *widget = 0) override;
|
||||||
|
|
||||||
void addArrow(const QString &id, ArrowItem::Shaft shaft, ArrowItem::Head endHead,
|
void addArrow(const QString &id, ArrowItem::Shaft shaft, ArrowItem::Head endHead,
|
||||||
ArrowItem::Head startHead = ArrowItem::HeadNone);
|
ArrowItem::Head startHead = ArrowItem::HeadNone);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateCurrentPreviewArrow(const QPointF &headPoint);
|
void updateCurrentPreviewArrow(const QPointF &headPoint);
|
||||||
|
@@ -40,7 +40,7 @@ class StereotypesItem : public QGraphicsSimpleTextItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StereotypesItem(QGraphicsItem *parent = 0);
|
StereotypesItem(QGraphicsItem *parent = 0);
|
||||||
~StereotypesItem();
|
~StereotypesItem() override;
|
||||||
|
|
||||||
void setStereotypes(const QList<QString> &stereotypes);
|
void setStereotypes(const QList<QString> &stereotypes);
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ class TemplateParameterBox : public QGraphicsRectItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TemplateParameterBox(QGraphicsItem *parent = 0);
|
TemplateParameterBox(QGraphicsItem *parent = 0);
|
||||||
~TemplateParameterBox();
|
~TemplateParameterBox() override;
|
||||||
|
|
||||||
void setFont(const QFont &font);
|
void setFont(const QFont &font);
|
||||||
void setTextBrush(const QBrush &brush);
|
void setTextBrush(const QBrush &brush);
|
||||||
|
@@ -63,7 +63,7 @@ class QMT_EXPORT DiagramsManager : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DiagramsManager(QObject *parent = 0);
|
explicit DiagramsManager(QObject *parent = 0);
|
||||||
~DiagramsManager();
|
~DiagramsManager() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void someDiagramOpened(bool);
|
void someDiagramOpened(bool);
|
||||||
|
@@ -43,14 +43,14 @@ class QMT_EXPORT SceneInspector : public QObject, public ISceneInspector
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit SceneInspector(QObject *parent = 0);
|
explicit SceneInspector(QObject *parent = 0);
|
||||||
~SceneInspector();
|
~SceneInspector() override;
|
||||||
|
|
||||||
void setDiagramsManager(DiagramsManager *diagramsManager);
|
void setDiagramsManager(DiagramsManager *diagramsManager);
|
||||||
|
|
||||||
QSizeF rasterSize() const;
|
QSizeF rasterSize() const override;
|
||||||
QSizeF minimalSize(const DElement *element, const MDiagram *diagram) const;
|
QSizeF minimalSize(const DElement *element, const MDiagram *diagram) const override;
|
||||||
IMoveable *moveable(const DElement *element, const MDiagram *diagram) const;
|
IMoveable *moveable(const DElement *element, const MDiagram *diagram) const override;
|
||||||
IResizable *resizable(const DElement *element, const MDiagram *diagram) const;
|
IResizable *resizable(const DElement *element, const MDiagram *diagram) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DiagramsManager *m_diagramsManager;
|
DiagramsManager *m_diagramsManager;
|
||||||
|
@@ -53,7 +53,7 @@ class QMT_EXPORT DiagramsView : public QTabWidget, public DiagramsViewInterface
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DiagramsView(QWidget *parent = 0);
|
explicit DiagramsView(QWidget *parent = 0);
|
||||||
~DiagramsView();
|
~DiagramsView() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void currentDiagramChanged(const MDiagram *diagram);
|
void currentDiagramChanged(const MDiagram *diagram);
|
||||||
@@ -63,10 +63,10 @@ signals:
|
|||||||
public:
|
public:
|
||||||
void setDiagramsManager(DiagramsManager *diagramsManager);
|
void setDiagramsManager(DiagramsManager *diagramsManager);
|
||||||
|
|
||||||
void openDiagram(MDiagram *diagram);
|
void openDiagram(MDiagram *diagram) override;
|
||||||
void closeDiagram(const MDiagram *diagram);
|
void closeDiagram(const MDiagram *diagram) override;
|
||||||
void closeAllDiagrams();
|
void closeAllDiagrams() override;
|
||||||
void onDiagramRenamed(const MDiagram *diagram);
|
void onDiagramRenamed(const MDiagram *diagram) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onCurrentChanged(int tabIndex);
|
void onCurrentChanged(int tabIndex);
|
||||||
|
@@ -45,16 +45,16 @@ class QMT_EXPORT DiagramView : public QGraphicsView
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit DiagramView(QWidget *parent);
|
explicit DiagramView(QWidget *parent);
|
||||||
~DiagramView();
|
~DiagramView() override;
|
||||||
|
|
||||||
DiagramSceneModel *diagramSceneModel() const;
|
DiagramSceneModel *diagramSceneModel() const;
|
||||||
void setDiagramSceneModel(DiagramSceneModel *diagramSceneModel);
|
void setDiagramSceneModel(DiagramSceneModel *diagramSceneModel);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||||
void dragLeaveEvent(QDragLeaveEvent *event);
|
void dragLeaveEvent(QDragLeaveEvent *event) override;
|
||||||
void dragMoveEvent(QDragMoveEvent *event);
|
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPointer<DiagramSceneModel> m_diagramSceneModel;
|
QPointer<DiagramSceneModel> m_diagramSceneModel;
|
||||||
|
@@ -52,7 +52,7 @@ class QMT_EXPORT StackedDiagramsView : public QStackedWidget, public DiagramsVie
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StackedDiagramsView(QWidget *parent = 0);
|
explicit StackedDiagramsView(QWidget *parent = 0);
|
||||||
~StackedDiagramsView();
|
~StackedDiagramsView() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void currentDiagramChanged(const MDiagram *diagram);
|
void currentDiagramChanged(const MDiagram *diagram);
|
||||||
@@ -62,10 +62,10 @@ signals:
|
|||||||
public:
|
public:
|
||||||
void setDiagramsManager(DiagramsManager *diagramsManager);
|
void setDiagramsManager(DiagramsManager *diagramsManager);
|
||||||
|
|
||||||
void openDiagram(MDiagram *diagram);
|
void openDiagram(MDiagram *diagram) override;
|
||||||
void closeDiagram(const MDiagram *diagram);
|
void closeDiagram(const MDiagram *diagram) override;
|
||||||
void closeAllDiagrams();
|
void closeAllDiagrams() override;
|
||||||
void onDiagramRenamed(const MDiagram *diagram);
|
void onDiagramRenamed(const MDiagram *diagram) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onCurrentChanged(int tabIndex);
|
void onCurrentChanged(int tabIndex);
|
||||||
|
@@ -63,7 +63,7 @@ class QMT_EXPORT DocumentController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DocumentController(QObject *parent = 0);
|
explicit DocumentController(QObject *parent = 0);
|
||||||
~DocumentController();
|
~DocumentController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void changed();
|
void changed();
|
||||||
|
@@ -41,7 +41,7 @@ public:
|
|||||||
ContextMenuAction(const QString &label, const QString &id, QObject *parent = 0);
|
ContextMenuAction(const QString &label, const QString &id, QObject *parent = 0);
|
||||||
ContextMenuAction(const QString &label, const QString &id, const QKeySequence &shortcut,
|
ContextMenuAction(const QString &label, const QString &id, const QKeySequence &shortcut,
|
||||||
QObject *parent = 0);
|
QObject *parent = 0);
|
||||||
~ContextMenuAction();
|
~ContextMenuAction() override;
|
||||||
|
|
||||||
QString id() const { return m_id; }
|
QString id() const { return m_id; }
|
||||||
|
|
||||||
|
@@ -43,16 +43,16 @@ class QCompressedDevice : public QIODevice
|
|||||||
public:
|
public:
|
||||||
explicit QCompressedDevice(QObject *parent = 0);
|
explicit QCompressedDevice(QObject *parent = 0);
|
||||||
explicit QCompressedDevice(QIODevice *targetDevice, QObject *parent = 0);
|
explicit QCompressedDevice(QIODevice *targetDevice, QObject *parent = 0);
|
||||||
~QCompressedDevice();
|
~QCompressedDevice() override;
|
||||||
|
|
||||||
QIODevice *targetDevice() const { return m_targetDevice; }
|
QIODevice *targetDevice() const { return m_targetDevice; }
|
||||||
void setTargetDevice(QIODevice *targetDevice);
|
void setTargetDevice(QIODevice *targetDevice);
|
||||||
|
|
||||||
void close();
|
void close() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
qint64 readData(char *data, qint64 maxlen);
|
qint64 readData(char *data, qint64 maxlen) override;
|
||||||
qint64 writeData(const char *data, qint64 len);
|
qint64 writeData(const char *data, qint64 len) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
qint64 flush();
|
qint64 flush();
|
||||||
|
@@ -81,7 +81,7 @@ class QMT_EXPORT MAssociation : public MRelation
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MAssociation();
|
MAssociation();
|
||||||
~MAssociation();
|
~MAssociation() override;
|
||||||
|
|
||||||
MAssociationEnd endA() const { return m_endA; }
|
MAssociationEnd endA() const { return m_endA; }
|
||||||
void setEndA(const MAssociationEnd &end);
|
void setEndA(const MAssociationEnd &end);
|
||||||
@@ -90,8 +90,8 @@ public:
|
|||||||
Uid assoicationClassUid() const { return m_associationClassUid; }
|
Uid assoicationClassUid() const { return m_associationClassUid; }
|
||||||
void setAssociationClassUid(const Uid &uid);
|
void setAssociationClassUid(const Uid &uid);
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MAssociationEnd m_endA;
|
MAssociationEnd m_endA;
|
||||||
|
@@ -39,10 +39,10 @@ class QMT_EXPORT MCanvasDiagram : public MDiagram
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MCanvasDiagram();
|
MCanvasDiagram();
|
||||||
~MCanvasDiagram();
|
~MCanvasDiagram() override;
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -43,7 +43,7 @@ class QMT_EXPORT MClass : public MObject
|
|||||||
public:
|
public:
|
||||||
MClass();
|
MClass();
|
||||||
MClass(const MClass &rhs);
|
MClass(const MClass &rhs);
|
||||||
~MClass();
|
~MClass() override;
|
||||||
|
|
||||||
MClass &operator=(const MClass &rhs);
|
MClass &operator=(const MClass &rhs);
|
||||||
|
|
||||||
@@ -59,8 +59,8 @@ public:
|
|||||||
void removeMember(const Uid &uid);
|
void removeMember(const Uid &uid);
|
||||||
void removeMember(const MClassMember &member);
|
void removeMember(const MClassMember &member);
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_umlNamespace;
|
QString m_umlNamespace;
|
||||||
|
@@ -39,10 +39,10 @@ class QMT_EXPORT MComponent : public MObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MComponent();
|
MComponent();
|
||||||
~MComponent();
|
~MComponent() override;
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -48,7 +48,7 @@ public:
|
|||||||
|
|
||||||
MDependency();
|
MDependency();
|
||||||
MDependency(const MDependency &rhs);
|
MDependency(const MDependency &rhs);
|
||||||
~MDependency();
|
~MDependency() override;
|
||||||
|
|
||||||
MDependency &operator=(const MDependency &rhs);
|
MDependency &operator=(const MDependency &rhs);
|
||||||
|
|
||||||
@@ -59,8 +59,8 @@ public:
|
|||||||
Uid target() const;
|
Uid target() const;
|
||||||
void setTarget(const Uid &target);
|
void setTarget(const Uid &target);
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Direction m_direction;
|
Direction m_direction;
|
||||||
|
@@ -44,7 +44,7 @@ class QMT_EXPORT MDiagram : public MObject
|
|||||||
public:
|
public:
|
||||||
MDiagram();
|
MDiagram();
|
||||||
MDiagram(const MDiagram &rhs);
|
MDiagram(const MDiagram &rhs);
|
||||||
~MDiagram();
|
~MDiagram() override;
|
||||||
|
|
||||||
MDiagram &operator=(const MDiagram &rhs);
|
MDiagram &operator=(const MDiagram &rhs);
|
||||||
|
|
||||||
@@ -61,8 +61,8 @@ public:
|
|||||||
void setLastModified(const QDateTime &lastModified);
|
void setLastModified(const QDateTime &lastModified);
|
||||||
void setLastModifiedToNow();
|
void setLastModifiedToNow();
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<DElement *> m_elements;
|
QList<DElement *> m_elements;
|
||||||
|
@@ -41,7 +41,7 @@ class QMT_EXPORT MInheritance : public MRelation
|
|||||||
public:
|
public:
|
||||||
MInheritance();
|
MInheritance();
|
||||||
MInheritance(const MInheritance &rhs);
|
MInheritance(const MInheritance &rhs);
|
||||||
~MInheritance();
|
~MInheritance() override;
|
||||||
|
|
||||||
MInheritance operator=(const MInheritance &rhs);
|
MInheritance operator=(const MInheritance &rhs);
|
||||||
|
|
||||||
@@ -50,8 +50,8 @@ public:
|
|||||||
Uid base() const;
|
Uid base() const;
|
||||||
void setBase(const Uid &base);
|
void setBase(const Uid &base);
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
6
src/libs/3rdparty/modeling/qmt/model/mitem.h
vendored
6
src/libs/3rdparty/modeling/qmt/model/mitem.h
vendored
@@ -39,7 +39,7 @@ class QMT_EXPORT MItem : public MObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MItem();
|
MItem();
|
||||||
~MItem();
|
~MItem() override;
|
||||||
|
|
||||||
QString variety() const { return m_variety; }
|
QString variety() const { return m_variety; }
|
||||||
void setVariety(const QString &variety);
|
void setVariety(const QString &variety);
|
||||||
@@ -48,8 +48,8 @@ public:
|
|||||||
bool isShapeEditable() const { return m_isShapeEditable; }
|
bool isShapeEditable() const { return m_isShapeEditable; }
|
||||||
void setShapeEditable(bool shapeEditable);
|
void setShapeEditable(bool shapeEditable);
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_variety;
|
QString m_variety;
|
||||||
|
@@ -45,7 +45,7 @@ class QMT_EXPORT MObject : public MElement
|
|||||||
public:
|
public:
|
||||||
MObject();
|
MObject();
|
||||||
MObject(const MObject &rhs);
|
MObject(const MObject &rhs);
|
||||||
~MObject();
|
~MObject() override;
|
||||||
|
|
||||||
MObject &operator=(const MObject &rhs);
|
MObject &operator=(const MObject &rhs);
|
||||||
|
|
||||||
@@ -71,8 +71,8 @@ public:
|
|||||||
void removeRelation(MRelation *relation);
|
void removeRelation(MRelation *relation);
|
||||||
void decontrolRelation(MRelation *relation);
|
void decontrolRelation(MRelation *relation);
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_name;
|
QString m_name;
|
||||||
|
@@ -40,10 +40,10 @@ class QMT_EXPORT MPackage : public MObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MPackage();
|
MPackage();
|
||||||
~MPackage();
|
~MPackage() override;
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -44,7 +44,7 @@ class QMT_EXPORT MRelation : public MElement
|
|||||||
public:
|
public:
|
||||||
MRelation();
|
MRelation();
|
||||||
MRelation(const MRelation &rhs);
|
MRelation(const MRelation &rhs);
|
||||||
~MRelation();
|
~MRelation() override;
|
||||||
|
|
||||||
MRelation &operator=(const MRelation &rhs);
|
MRelation &operator=(const MRelation &rhs);
|
||||||
|
|
||||||
@@ -55,8 +55,8 @@ public:
|
|||||||
Uid endBUid() const { return m_endBUid; }
|
Uid endBUid() const { return m_endBUid; }
|
||||||
void setEndBUid(const Uid &uid);
|
void setEndBUid(const Uid &uid);
|
||||||
|
|
||||||
virtual void accept(MVisitor *visitor);
|
void accept(MVisitor *visitor) override;
|
||||||
virtual void accept(MConstVisitor *visitor) const;
|
void accept(MConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_name;
|
QString m_name;
|
||||||
|
@@ -40,11 +40,11 @@ class QMT_EXPORT MSourceExpansion : public MExpansion
|
|||||||
public:
|
public:
|
||||||
MSourceExpansion();
|
MSourceExpansion();
|
||||||
MSourceExpansion(const MSourceExpansion &rhs);
|
MSourceExpansion(const MSourceExpansion &rhs);
|
||||||
~MSourceExpansion();
|
~MSourceExpansion() override;
|
||||||
|
|
||||||
MSourceExpansion &operator=(const MSourceExpansion &rhs);
|
MSourceExpansion &operator=(const MSourceExpansion &rhs);
|
||||||
|
|
||||||
MSourceExpansion *clone(const MElement &rhs) const;
|
MSourceExpansion *clone(const MElement &rhs) const override;
|
||||||
|
|
||||||
QString sourceId() const { return m_sourceId; }
|
QString sourceId() const { return m_sourceId; }
|
||||||
void setSourceId(const QString &sourceId);
|
void setSourceId(const QString &sourceId);
|
||||||
|
@@ -41,18 +41,18 @@ class QMT_EXPORT MChildrenVisitor : public MVisitor
|
|||||||
public:
|
public:
|
||||||
MChildrenVisitor();
|
MChildrenVisitor();
|
||||||
|
|
||||||
void visitMElement(MElement *element);
|
void visitMElement(MElement *element) override;
|
||||||
void visitMObject(MObject *object);
|
void visitMObject(MObject *object) override;
|
||||||
void visitMPackage(MPackage *package);
|
void visitMPackage(MPackage *package) override;
|
||||||
void visitMClass(MClass *klass);
|
void visitMClass(MClass *klass) override;
|
||||||
void visitMComponent(MComponent *component);
|
void visitMComponent(MComponent *component) override;
|
||||||
void visitMDiagram(MDiagram *diagram);
|
void visitMDiagram(MDiagram *diagram) override;
|
||||||
void visitMCanvasDiagram(MCanvasDiagram *diagram);
|
void visitMCanvasDiagram(MCanvasDiagram *diagram) override;
|
||||||
void visitMItem(MItem *item);
|
void visitMItem(MItem *item) override;
|
||||||
void visitMRelation(MRelation *relation);
|
void visitMRelation(MRelation *relation) override;
|
||||||
void visitMDependency(MDependency *dependency);
|
void visitMDependency(MDependency *dependency) override;
|
||||||
void visitMInheritance(MInheritance *inheritance);
|
void visitMInheritance(MInheritance *inheritance) override;
|
||||||
void visitMAssociation(MAssociation *association);
|
void visitMAssociation(MAssociation *association) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -45,18 +45,18 @@ public:
|
|||||||
|
|
||||||
MElement *cloned() const { return m_cloned; }
|
MElement *cloned() const { return m_cloned; }
|
||||||
|
|
||||||
void visitMElement(const MElement *element);
|
void visitMElement(const MElement *element) override;
|
||||||
void visitMObject(const MObject *object);
|
void visitMObject(const MObject *object) override;
|
||||||
void visitMPackage(const MPackage *package);
|
void visitMPackage(const MPackage *package) override;
|
||||||
void visitMClass(const MClass *klass);
|
void visitMClass(const MClass *klass) override;
|
||||||
void visitMComponent(const MComponent *component);
|
void visitMComponent(const MComponent *component) override;
|
||||||
void visitMDiagram(const MDiagram *diagram);
|
void visitMDiagram(const MDiagram *diagram) override;
|
||||||
void visitMCanvasDiagram(const MCanvasDiagram *diagram);
|
void visitMCanvasDiagram(const MCanvasDiagram *diagram) override;
|
||||||
void visitMItem(const MItem *item);
|
void visitMItem(const MItem *item) override;
|
||||||
void visitMRelation(const MRelation *relation);
|
void visitMRelation(const MRelation *relation) override;
|
||||||
void visitMDependency(const MDependency *dependency);
|
void visitMDependency(const MDependency *dependency) override;
|
||||||
void visitMInheritance(const MInheritance *inheritance);
|
void visitMInheritance(const MInheritance *inheritance) override;
|
||||||
void visitMAssociation(const MAssociation *association);
|
void visitMAssociation(const MAssociation *association) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MElement *m_cloned;
|
MElement *m_cloned;
|
||||||
@@ -69,18 +69,18 @@ public:
|
|||||||
|
|
||||||
MElement *cloned() const { return m_cloned; }
|
MElement *cloned() const { return m_cloned; }
|
||||||
|
|
||||||
void visitMElement(const MElement *element);
|
void visitMElement(const MElement *element) override;
|
||||||
void visitMObject(const MObject *object);
|
void visitMObject(const MObject *object) override;
|
||||||
void visitMPackage(const MPackage *package);
|
void visitMPackage(const MPackage *package) override;
|
||||||
void visitMClass(const MClass *klass);
|
void visitMClass(const MClass *klass) override;
|
||||||
void visitMComponent(const MComponent *component);
|
void visitMComponent(const MComponent *component) override;
|
||||||
void visitMDiagram(const MDiagram *diagram);
|
void visitMDiagram(const MDiagram *diagram) override;
|
||||||
void visitMCanvasDiagram(const MCanvasDiagram *diagram);
|
void visitMCanvasDiagram(const MCanvasDiagram *diagram) override;
|
||||||
void visitMItem(const MItem *item);
|
void visitMItem(const MItem *item) override;
|
||||||
void visitMRelation(const MRelation *relation);
|
void visitMRelation(const MRelation *relation) override;
|
||||||
void visitMDependency(const MDependency *dependency);
|
void visitMDependency(const MDependency *dependency) override;
|
||||||
void visitMInheritance(const MInheritance *inheritance);
|
void visitMInheritance(const MInheritance *inheritance) override;
|
||||||
void visitMAssociation(const MAssociation *association);
|
void visitMAssociation(const MAssociation *association) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MElement *m_cloned;
|
MElement *m_cloned;
|
||||||
|
@@ -43,18 +43,18 @@ class QMT_EXPORT MFlatAssignmentVisitor : public MConstVisitor
|
|||||||
public:
|
public:
|
||||||
MFlatAssignmentVisitor(MElement *target);
|
MFlatAssignmentVisitor(MElement *target);
|
||||||
|
|
||||||
void visitMElement(const MElement *element);
|
void visitMElement(const MElement *element) override;
|
||||||
void visitMObject(const MObject *object);
|
void visitMObject(const MObject *object) override;
|
||||||
void visitMPackage(const MPackage *package);
|
void visitMPackage(const MPackage *package) override;
|
||||||
void visitMClass(const MClass *klass);
|
void visitMClass(const MClass *klass) override;
|
||||||
void visitMComponent(const MComponent *component);
|
void visitMComponent(const MComponent *component) override;
|
||||||
void visitMDiagram(const MDiagram *diagram);
|
void visitMDiagram(const MDiagram *diagram) override;
|
||||||
void visitMCanvasDiagram(const MCanvasDiagram *diagram);
|
void visitMCanvasDiagram(const MCanvasDiagram *diagram) override;
|
||||||
void visitMItem(const MItem *item);
|
void visitMItem(const MItem *item) override;
|
||||||
void visitMRelation(const MRelation *relation);
|
void visitMRelation(const MRelation *relation) override;
|
||||||
void visitMDependency(const MDependency *dependency);
|
void visitMDependency(const MDependency *dependency) override;
|
||||||
void visitMInheritance(const MInheritance *inheritance);
|
void visitMInheritance(const MInheritance *inheritance) override;
|
||||||
void visitMAssociation(const MAssociation *association);
|
void visitMAssociation(const MAssociation *association) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MElement *m_target;
|
MElement *m_target;
|
||||||
|
@@ -80,12 +80,12 @@ public:
|
|||||||
QMT_CHECK(m_object);
|
QMT_CHECK(m_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
~UpdateObjectCommand()
|
~UpdateObjectCommand() override
|
||||||
{
|
{
|
||||||
delete m_object;
|
delete m_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mergeWith(const UndoCommand *other)
|
bool mergeWith(const UndoCommand *other) override
|
||||||
{
|
{
|
||||||
auto updateCommand = dynamic_cast<const UpdateObjectCommand *>(other);
|
auto updateCommand = dynamic_cast<const UpdateObjectCommand *>(other);
|
||||||
if (!updateCommand)
|
if (!updateCommand)
|
||||||
@@ -96,7 +96,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void redo()
|
void redo() override
|
||||||
{
|
{
|
||||||
if (canRedo()) {
|
if (canRedo()) {
|
||||||
assign();
|
assign();
|
||||||
@@ -104,7 +104,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void undo()
|
void undo() override
|
||||||
{
|
{
|
||||||
assign();
|
assign();
|
||||||
UndoCommand::undo();
|
UndoCommand::undo();
|
||||||
@@ -155,12 +155,12 @@ public:
|
|||||||
QMT_CHECK(m_relation);
|
QMT_CHECK(m_relation);
|
||||||
}
|
}
|
||||||
|
|
||||||
~UpdateRelationCommand()
|
~UpdateRelationCommand() override
|
||||||
{
|
{
|
||||||
delete m_relation;
|
delete m_relation;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mergeWith(const UndoCommand *other)
|
bool mergeWith(const UndoCommand *other) override
|
||||||
{
|
{
|
||||||
auto updateCommand = dynamic_cast<const UpdateRelationCommand *>(other);
|
auto updateCommand = dynamic_cast<const UpdateRelationCommand *>(other);
|
||||||
if (!updateCommand)
|
if (!updateCommand)
|
||||||
@@ -171,7 +171,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void redo()
|
void redo() override
|
||||||
{
|
{
|
||||||
if (canRedo()) {
|
if (canRedo()) {
|
||||||
assign();
|
assign();
|
||||||
@@ -179,7 +179,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void undo()
|
void undo() override
|
||||||
{
|
{
|
||||||
assign();
|
assign();
|
||||||
UndoCommand::undo();
|
UndoCommand::undo();
|
||||||
@@ -220,7 +220,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
~AddElementsCommand()
|
~AddElementsCommand() override
|
||||||
{
|
{
|
||||||
foreach (const Clone &clone, m_clonedElements)
|
foreach (const Clone &clone, m_clonedElements)
|
||||||
delete clone.m_clonedElement;
|
delete clone.m_clonedElement;
|
||||||
@@ -236,7 +236,7 @@ public:
|
|||||||
m_clonedElements.append(clone);
|
m_clonedElements.append(clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
void redo()
|
void redo() override
|
||||||
{
|
{
|
||||||
if (canRedo()) {
|
if (canRedo()) {
|
||||||
bool inserted = false;
|
bool inserted = false;
|
||||||
@@ -284,7 +284,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void undo()
|
void undo() override
|
||||||
{
|
{
|
||||||
bool removed = false;
|
bool removed = false;
|
||||||
for (int i = 0; i < m_clonedElements.count(); ++i) {
|
for (int i = 0; i < m_clonedElements.count(); ++i) {
|
||||||
@@ -350,7 +350,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
~RemoveElementsCommand()
|
~RemoveElementsCommand() override
|
||||||
{
|
{
|
||||||
foreach (const Clone &clone, m_clonedElements)
|
foreach (const Clone &clone, m_clonedElements)
|
||||||
delete clone.m_clonedElement;
|
delete clone.m_clonedElement;
|
||||||
@@ -380,7 +380,7 @@ public:
|
|||||||
m_clonedElements.append(clone);
|
m_clonedElements.append(clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
void redo()
|
void redo() override
|
||||||
{
|
{
|
||||||
if (canRedo()) {
|
if (canRedo()) {
|
||||||
bool removed = false;
|
bool removed = false;
|
||||||
@@ -434,7 +434,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void undo()
|
void undo() override
|
||||||
{
|
{
|
||||||
bool inserted = false;
|
bool inserted = false;
|
||||||
for (int i = m_clonedElements.count() - 1; i >= 0; --i) {
|
for (int i = m_clonedElements.count() - 1; i >= 0; --i) {
|
||||||
@@ -496,11 +496,11 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
~MoveObjectCommand()
|
~MoveObjectCommand() override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void redo()
|
void redo() override
|
||||||
{
|
{
|
||||||
if (canRedo()) {
|
if (canRedo()) {
|
||||||
swap();
|
swap();
|
||||||
@@ -508,7 +508,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void undo()
|
void undo() override
|
||||||
{
|
{
|
||||||
swap();
|
swap();
|
||||||
UndoCommand::undo();
|
UndoCommand::undo();
|
||||||
@@ -551,11 +551,11 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
~MoveRelationCommand()
|
~MoveRelationCommand() override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void redo()
|
void redo() override
|
||||||
{
|
{
|
||||||
if (canRedo()) {
|
if (canRedo()) {
|
||||||
swap();
|
swap();
|
||||||
@@ -563,7 +563,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void undo()
|
void undo() override
|
||||||
{
|
{
|
||||||
swap();
|
swap();
|
||||||
UndoCommand::undo();
|
UndoCommand::undo();
|
||||||
|
@@ -68,7 +68,7 @@ class QMT_EXPORT ModelController : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ModelController(QObject *parent = 0);
|
explicit ModelController(QObject *parent = 0);
|
||||||
~ModelController();
|
~ModelController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void beginResetModel();
|
void beginResetModel();
|
||||||
|
@@ -42,18 +42,18 @@ class QMT_EXPORT MVoidVisitor : public MVisitor
|
|||||||
public:
|
public:
|
||||||
MVoidVisitor();
|
MVoidVisitor();
|
||||||
|
|
||||||
void visitMElement(MElement *element);
|
void visitMElement(MElement *element) override;
|
||||||
void visitMObject(MObject *object);
|
void visitMObject(MObject *object) override;
|
||||||
void visitMPackage(MPackage *package);
|
void visitMPackage(MPackage *package) override;
|
||||||
void visitMClass(MClass *klass);
|
void visitMClass(MClass *klass) override;
|
||||||
void visitMComponent(MComponent *component);
|
void visitMComponent(MComponent *component) override;
|
||||||
void visitMDiagram(MDiagram *diagram);
|
void visitMDiagram(MDiagram *diagram) override;
|
||||||
void visitMCanvasDiagram(MCanvasDiagram *diagram);
|
void visitMCanvasDiagram(MCanvasDiagram *diagram) override;
|
||||||
void visitMItem(MItem *item);
|
void visitMItem(MItem *item) override;
|
||||||
void visitMRelation(MRelation *relation);
|
void visitMRelation(MRelation *relation) override;
|
||||||
void visitMDependency(MDependency *dependency);
|
void visitMDependency(MDependency *dependency) override;
|
||||||
void visitMInheritance(MInheritance *inheritance);
|
void visitMInheritance(MInheritance *inheritance) override;
|
||||||
void visitMAssociation(MAssociation *association);
|
void visitMAssociation(MAssociation *association) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QMT_EXPORT MVoidConstVisitor : public MConstVisitor
|
class QMT_EXPORT MVoidConstVisitor : public MConstVisitor
|
||||||
@@ -61,18 +61,18 @@ class QMT_EXPORT MVoidConstVisitor : public MConstVisitor
|
|||||||
public:
|
public:
|
||||||
MVoidConstVisitor();
|
MVoidConstVisitor();
|
||||||
|
|
||||||
void visitMElement(const MElement *element);
|
void visitMElement(const MElement *element) override;
|
||||||
void visitMObject(const MObject *object);
|
void visitMObject(const MObject *object) override;
|
||||||
void visitMPackage(const MPackage *package);
|
void visitMPackage(const MPackage *package) override;
|
||||||
void visitMClass(const MClass *klass);
|
void visitMClass(const MClass *klass) override;
|
||||||
void visitMComponent(const MComponent *component);
|
void visitMComponent(const MComponent *component) override;
|
||||||
void visitMDiagram(const MDiagram *diagram);
|
void visitMDiagram(const MDiagram *diagram) override;
|
||||||
void visitMCanvasDiagram(const MCanvasDiagram *diagram);
|
void visitMCanvasDiagram(const MCanvasDiagram *diagram) override;
|
||||||
void visitMItem(const MItem *item);
|
void visitMItem(const MItem *item) override;
|
||||||
void visitMRelation(const MRelation *relation);
|
void visitMRelation(const MRelation *relation) override;
|
||||||
void visitMDependency(const MDependency *dependency);
|
void visitMDependency(const MDependency *dependency) override;
|
||||||
void visitMInheritance(const MInheritance *inheritance);
|
void visitMInheritance(const MInheritance *inheritance) override;
|
||||||
void visitMAssociation(const MAssociation *association);
|
void visitMAssociation(const MAssociation *association) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -46,13 +46,13 @@ class QMT_EXPORT SortedTreeModel : public QSortFilterProxyModel
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SortedTreeModel(QObject *parent = 0);
|
explicit SortedTreeModel(QObject *parent = 0);
|
||||||
~SortedTreeModel();
|
~SortedTreeModel() override;
|
||||||
|
|
||||||
TreeModel *treeModel() const { return m_treeModel; }
|
TreeModel *treeModel() const { return m_treeModel; }
|
||||||
void setTreeModel(TreeModel *treeModel);
|
void setTreeModel(TreeModel *treeModel);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onTreeModelRowsInserted(const QModelIndex &parent, int start, int end);
|
void onTreeModelRowsInserted(const QModelIndex &parent, int start, int end);
|
||||||
|
@@ -75,7 +75,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
explicit TreeModel(QObject *parent = 0);
|
explicit TreeModel(QObject *parent = 0);
|
||||||
~TreeModel();
|
~TreeModel() override;
|
||||||
|
|
||||||
ModelController *modelController() const { return m_modelController; }
|
ModelController *modelController() const { return m_modelController; }
|
||||||
void setModelController(ModelController *modelController);
|
void setModelController(ModelController *modelController);
|
||||||
@@ -88,8 +88,8 @@ public:
|
|||||||
QModelIndex indexOf(const MElement *element) const;
|
QModelIndex indexOf(const MElement *element) const;
|
||||||
QIcon icon(const QModelIndex &index) const;
|
QIcon icon(const QModelIndex &index) const;
|
||||||
|
|
||||||
Qt::DropActions supportedDropActions() const;
|
Qt::DropActions supportedDropActions() const override;
|
||||||
QStringList mimeTypes() const;
|
QStringList mimeTypes() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onBeginResetModel();
|
void onBeginResetModel();
|
||||||
|
@@ -48,7 +48,7 @@ class QMT_EXPORT TreeModelManager : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TreeModelManager(QObject *parent = 0);
|
explicit TreeModelManager(QObject *parent = 0);
|
||||||
~TreeModelManager();
|
~TreeModelManager() override;
|
||||||
|
|
||||||
TreeModel *treeModel() const { return m_treeModel; }
|
TreeModel *treeModel() const { return m_treeModel; }
|
||||||
void setTreeModel(TreeModel *treeModel);
|
void setTreeModel(TreeModel *treeModel);
|
||||||
|
@@ -46,7 +46,7 @@ class QMT_EXPORT ClassMembersEdit : public QPlainTextEdit
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ClassMembersEdit(QWidget *parent = 0);
|
explicit ClassMembersEdit(QWidget *parent = 0);
|
||||||
~ClassMembersEdit();
|
~ClassMembersEdit() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void statusChanged(bool valid);
|
void statusChanged(bool valid);
|
||||||
|
@@ -48,14 +48,14 @@ class QMT_EXPORT ModelTreeView : public QTreeView, public ModelTreeViewInterface
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ModelTreeView(QWidget *parent = 0);
|
explicit ModelTreeView(QWidget *parent = 0);
|
||||||
~ModelTreeView();
|
~ModelTreeView() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void treeViewActivated();
|
void treeViewActivated();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QModelIndex currentSourceModelIndex() const;
|
QModelIndex currentSourceModelIndex() const override;
|
||||||
QList<QModelIndex> selectedSourceModelIndexes() const;
|
QList<QModelIndex> selectedSourceModelIndexes() const override;
|
||||||
|
|
||||||
void setTreeModel(SortedTreeModel *model);
|
void setTreeModel(SortedTreeModel *model);
|
||||||
void setElementTasks(IElementTasks *elementTasks);
|
void setElementTasks(IElementTasks *elementTasks);
|
||||||
@@ -64,13 +64,13 @@ public:
|
|||||||
void selectFromSourceModelIndex(const QModelIndex &index);
|
void selectFromSourceModelIndex(const QModelIndex &index);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void startDrag(Qt::DropActions supportedActions);
|
void startDrag(Qt::DropActions supportedActions) override;
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||||
void dragMoveEvent(QDragMoveEvent *event);
|
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||||
void dragLeaveEvent(QDragLeaveEvent *event);
|
void dragLeaveEvent(QDragLeaveEvent *event) override;
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event) override;
|
||||||
void focusInEvent(QFocusEvent *event);
|
void focusInEvent(QFocusEvent *event) override;
|
||||||
void contextMenuEvent(QContextMenuEvent *event);
|
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SortedTreeModel *m_sortedTreeModel;
|
SortedTreeModel *m_sortedTreeModel;
|
||||||
|
@@ -45,7 +45,7 @@ class QMT_EXPORT PaletteBox : public QWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PaletteBox(QWidget *parent = 0);
|
explicit PaletteBox(QWidget *parent = 0);
|
||||||
~PaletteBox();
|
~PaletteBox() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void activated(int index);
|
void activated(int index);
|
||||||
@@ -61,9 +61,9 @@ public:
|
|||||||
void setCurrentIndex(int index);
|
void setCurrentIndex(int index);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event) override;
|
||||||
virtual void mousePressEvent(QMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
virtual void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QVector<QBrush> m_brushes;
|
QVector<QBrush> m_brushes;
|
||||||
|
@@ -60,7 +60,7 @@ class QMT_EXPORT PropertiesView : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PropertiesView(QObject *parent = 0);
|
explicit PropertiesView(QObject *parent = 0);
|
||||||
~PropertiesView();
|
~PropertiesView() override;
|
||||||
|
|
||||||
ModelController *modelController() const { return m_modelController; }
|
ModelController *modelController() const { return m_modelController; }
|
||||||
void setModelController(ModelController *modelController);
|
void setModelController(ModelController *modelController);
|
||||||
|
@@ -67,36 +67,36 @@ class QMT_EXPORT PropertiesView::MView : public QObject, public MConstVisitor, p
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
MView(PropertiesView *propertiesView);
|
MView(PropertiesView *propertiesView);
|
||||||
~MView();
|
~MView() override;
|
||||||
|
|
||||||
QWidget *topLevelWidget() const { return m_topWidget; }
|
QWidget *topLevelWidget() const { return m_topWidget; }
|
||||||
|
|
||||||
void visitMElement(const MElement *element);
|
void visitMElement(const MElement *element) override;
|
||||||
void visitMObject(const MObject *object);
|
void visitMObject(const MObject *object) override;
|
||||||
void visitMPackage(const MPackage *package);
|
void visitMPackage(const MPackage *package) override;
|
||||||
void visitMClass(const MClass *klass);
|
void visitMClass(const MClass *klass) override;
|
||||||
void visitMComponent(const MComponent *component);
|
void visitMComponent(const MComponent *component) override;
|
||||||
void visitMDiagram(const MDiagram *diagram);
|
void visitMDiagram(const MDiagram *diagram) override;
|
||||||
void visitMCanvasDiagram(const MCanvasDiagram *diagram);
|
void visitMCanvasDiagram(const MCanvasDiagram *diagram) override;
|
||||||
void visitMItem(const MItem *item);
|
void visitMItem(const MItem *item) override;
|
||||||
void visitMRelation(const MRelation *relation);
|
void visitMRelation(const MRelation *relation) override;
|
||||||
void visitMDependency(const MDependency *dependency);
|
void visitMDependency(const MDependency *dependency) override;
|
||||||
void visitMInheritance(const MInheritance *inheritance);
|
void visitMInheritance(const MInheritance *inheritance) override;
|
||||||
void visitMAssociation(const MAssociation *association);
|
void visitMAssociation(const MAssociation *association) override;
|
||||||
|
|
||||||
void visitDElement(const DElement *element);
|
void visitDElement(const DElement *element) override;
|
||||||
void visitDObject(const DObject *object);
|
void visitDObject(const DObject *object) override;
|
||||||
void visitDPackage(const DPackage *package);
|
void visitDPackage(const DPackage *package) override;
|
||||||
void visitDClass(const DClass *klass);
|
void visitDClass(const DClass *klass) override;
|
||||||
void visitDComponent(const DComponent *component);
|
void visitDComponent(const DComponent *component) override;
|
||||||
void visitDDiagram(const DDiagram *diagram);
|
void visitDDiagram(const DDiagram *diagram) override;
|
||||||
void visitDItem(const DItem *item);
|
void visitDItem(const DItem *item) override;
|
||||||
void visitDRelation(const DRelation *relation);
|
void visitDRelation(const DRelation *relation) override;
|
||||||
void visitDInheritance(const DInheritance *inheritance);
|
void visitDInheritance(const DInheritance *inheritance) override;
|
||||||
void visitDDependency(const DDependency *dependency);
|
void visitDDependency(const DDependency *dependency) override;
|
||||||
void visitDAssociation(const DAssociation *association);
|
void visitDAssociation(const DAssociation *association) override;
|
||||||
void visitDAnnotation(const DAnnotation *annotation);
|
void visitDAnnotation(const DAnnotation *annotation) override;
|
||||||
void visitDBoundary(const DBoundary *boundary);
|
void visitDBoundary(const DBoundary *boundary) override;
|
||||||
|
|
||||||
void update(QList<MElement *> &modelElements);
|
void update(QList<MElement *> &modelElements);
|
||||||
void update(QList<DElement *> &diagramElements, MDiagram *diagram);
|
void update(QList<DElement *> &diagramElements, MDiagram *diagram);
|
||||||
|
@@ -59,7 +59,7 @@ class QMT_EXPORT ProjectController : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ProjectController(QObject *parent = 0);
|
explicit ProjectController(QObject *parent = 0);
|
||||||
~ProjectController();
|
~ProjectController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void changed();
|
void changed();
|
||||||
|
@@ -46,13 +46,13 @@ public:
|
|||||||
ShapePaintVisitor(QPainter *painter, const QPointF &scaledOrigin, const QSizeF &originalSize,
|
ShapePaintVisitor(QPainter *painter, const QPointF &scaledOrigin, const QSizeF &originalSize,
|
||||||
const QSizeF &baseSize, const QSizeF &size);
|
const QSizeF &baseSize, const QSizeF &size);
|
||||||
|
|
||||||
void visitLine(const LineShape *shapeLine);
|
void visitLine(const LineShape *shapeLine) override;
|
||||||
void visitRect(const RectShape *shapeRect);
|
void visitRect(const RectShape *shapeRect) override;
|
||||||
void visitRoundedRect(const RoundedRectShape *shapeRoundedRect);
|
void visitRoundedRect(const RoundedRectShape *shapeRoundedRect) override;
|
||||||
void visitCircle(const CircleShape *shapeCircle);
|
void visitCircle(const CircleShape *shapeCircle) override;
|
||||||
void visitEllipse(const EllipseShape *shapeEllipse);
|
void visitEllipse(const EllipseShape *shapeEllipse) override;
|
||||||
void visitArc(const ArcShape *shapeArc);
|
void visitArc(const ArcShape *shapeArc) override;
|
||||||
void visitPath(const PathShape *shapePath);
|
void visitPath(const PathShape *shapePath) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPainter *m_painter;
|
QPainter *m_painter;
|
||||||
@@ -70,13 +70,13 @@ public:
|
|||||||
|
|
||||||
QRectF boundingRect() const { return m_boundingRect; }
|
QRectF boundingRect() const { return m_boundingRect; }
|
||||||
|
|
||||||
void visitLine(const LineShape *shapeLine);
|
void visitLine(const LineShape *shapeLine) override;
|
||||||
void visitRect(const RectShape *shapeRect);
|
void visitRect(const RectShape *shapeRect) override;
|
||||||
void visitRoundedRect(const RoundedRectShape *shapeRoundedRect);
|
void visitRoundedRect(const RoundedRectShape *shapeRoundedRect) override;
|
||||||
void visitCircle(const CircleShape *shapeCircle);
|
void visitCircle(const CircleShape *shapeCircle) override;
|
||||||
void visitEllipse(const EllipseShape *shapeEllipse);
|
void visitEllipse(const EllipseShape *shapeEllipse) override;
|
||||||
void visitArc(const ArcShape *shapeArc);
|
void visitArc(const ArcShape *shapeArc) override;
|
||||||
void visitPath(const PathShape *shapePath);
|
void visitPath(const PathShape *shapePath) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPointF m_scaledOrigin;
|
QPointF m_scaledOrigin;
|
||||||
|
@@ -57,9 +57,9 @@ public:
|
|||||||
ShapePointF pos1() const { return m_pos1; }
|
ShapePointF pos1() const { return m_pos1; }
|
||||||
ShapePointF pos2() const { return m_pos2; }
|
ShapePointF pos2() const { return m_pos2; }
|
||||||
|
|
||||||
IShape *Clone() const;
|
IShape *Clone() const override;
|
||||||
void accept(ShapeVisitor *visitor);
|
void accept(ShapeVisitor *visitor) override;
|
||||||
void accept(ShapeConstVisitor *visitor) const;
|
void accept(ShapeConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ShapePointF m_pos1;
|
ShapePointF m_pos1;
|
||||||
@@ -82,9 +82,9 @@ public:
|
|||||||
ShapePointF pos() const { return m_pos; }
|
ShapePointF pos() const { return m_pos; }
|
||||||
ShapeSizeF size() const { return m_size; }
|
ShapeSizeF size() const { return m_size; }
|
||||||
|
|
||||||
IShape *Clone() const;
|
IShape *Clone() const override;
|
||||||
void accept(ShapeVisitor *visitor);
|
void accept(ShapeVisitor *visitor) override;
|
||||||
void accept(ShapeConstVisitor *visitor) const;
|
void accept(ShapeConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ShapePointF m_pos;
|
ShapePointF m_pos;
|
||||||
@@ -109,9 +109,9 @@ public:
|
|||||||
ShapeSizeF size() const { return m_size; }
|
ShapeSizeF size() const { return m_size; }
|
||||||
ShapeValueF radius() const { return m_radius; }
|
ShapeValueF radius() const { return m_radius; }
|
||||||
|
|
||||||
IShape *Clone() const;
|
IShape *Clone() const override;
|
||||||
void accept(ShapeVisitor *visitor);
|
void accept(ShapeVisitor *visitor) override;
|
||||||
void accept(ShapeConstVisitor *visitor) const;
|
void accept(ShapeConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ShapePointF m_pos;
|
ShapePointF m_pos;
|
||||||
@@ -135,9 +135,9 @@ public:
|
|||||||
ShapePointF center() const { return m_center; }
|
ShapePointF center() const { return m_center; }
|
||||||
ShapeValueF radius() const { return m_radius; }
|
ShapeValueF radius() const { return m_radius; }
|
||||||
|
|
||||||
IShape *Clone() const;
|
IShape *Clone() const override;
|
||||||
void accept(ShapeVisitor *visitor);
|
void accept(ShapeVisitor *visitor) override;
|
||||||
void accept(ShapeConstVisitor *visitor) const;
|
void accept(ShapeConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ShapePointF m_center;
|
ShapePointF m_center;
|
||||||
@@ -160,9 +160,9 @@ public:
|
|||||||
ShapePointF center() const { return m_center; }
|
ShapePointF center() const { return m_center; }
|
||||||
ShapeSizeF radius() const { return m_radius; }
|
ShapeSizeF radius() const { return m_radius; }
|
||||||
|
|
||||||
IShape *Clone() const;
|
IShape *Clone() const override;
|
||||||
void accept(ShapeVisitor *visitor);
|
void accept(ShapeVisitor *visitor) override;
|
||||||
void accept(ShapeConstVisitor *visitor) const;
|
void accept(ShapeConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ShapePointF m_center;
|
ShapePointF m_center;
|
||||||
@@ -189,9 +189,9 @@ public:
|
|||||||
qreal startAngle() const { return m_startAngle; }
|
qreal startAngle() const { return m_startAngle; }
|
||||||
qreal spanAngle() const { return m_spanAngle; }
|
qreal spanAngle() const { return m_spanAngle; }
|
||||||
|
|
||||||
IShape *Clone() const;
|
IShape *Clone() const override;
|
||||||
void accept(ShapeVisitor *visitor);
|
void accept(ShapeVisitor *visitor) override;
|
||||||
void accept(ShapeConstVisitor *visitor) const;
|
void accept(ShapeConstVisitor *visitor) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ShapePointF m_center;
|
ShapePointF m_center;
|
||||||
@@ -230,13 +230,13 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
PathShape();
|
PathShape();
|
||||||
~PathShape();
|
~PathShape() override;
|
||||||
|
|
||||||
QList<Element> elements() const { return m_elements; }
|
QList<Element> elements() const { return m_elements; }
|
||||||
|
|
||||||
IShape *Clone() const;
|
IShape *Clone() const override;
|
||||||
void accept(ShapeVisitor *visitor);
|
void accept(ShapeVisitor *visitor) override;
|
||||||
void accept(ShapeConstVisitor *visitor) const;
|
void accept(ShapeConstVisitor *visitor) const override;
|
||||||
|
|
||||||
void moveTo(const ShapePointF &pos);
|
void moveTo(const ShapePointF &pos);
|
||||||
void lineTo(const ShapePointF &pos);
|
void lineTo(const ShapePointF &pos);
|
||||||
|
@@ -49,7 +49,7 @@ class QMT_EXPORT StereotypeController : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StereotypeController(QObject *parent = 0);
|
explicit StereotypeController(QObject *parent = 0);
|
||||||
~StereotypeController();
|
~StereotypeController() override;
|
||||||
|
|
||||||
QList<StereotypeIcon> stereotypeIcons() const;
|
QList<StereotypeIcon> stereotypeIcons() const;
|
||||||
QList<Toolbar> toolbars() const;
|
QList<Toolbar> toolbars() const;
|
||||||
|
@@ -39,7 +39,7 @@ class QMT_EXPORT DefaultStyle : public Style
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DefaultStyle();
|
DefaultStyle();
|
||||||
~DefaultStyle();
|
~DefaultStyle() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -55,20 +55,21 @@ class QMT_EXPORT DefaultStyleEngine : public StyleEngine
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DefaultStyleEngine();
|
DefaultStyleEngine();
|
||||||
~DefaultStyleEngine();
|
~DefaultStyleEngine() override;
|
||||||
|
|
||||||
const Style *applyStyle(const Style *baseStyle, ElementType elementType,
|
const Style *applyStyle(const Style *baseStyle, ElementType elementType,
|
||||||
const Parameters *parameters);
|
const Parameters *parameters) override;
|
||||||
const Style *applyObjectStyle(const Style *baseStyle, ElementType elementType,
|
const Style *applyObjectStyle(const Style *baseStyle, ElementType elementType,
|
||||||
const ObjectVisuals &objectVisuals, const Parameters *parameters);
|
const ObjectVisuals &objectVisuals,
|
||||||
|
const Parameters *parameters) override;
|
||||||
const Style *applyObjectStyle(const Style *baseStyle, const StyledObject &styledObject,
|
const Style *applyObjectStyle(const Style *baseStyle, const StyledObject &styledObject,
|
||||||
const Parameters *parameters);
|
const Parameters *parameters) override;
|
||||||
const Style *applyRelationStyle(const Style *baseStyle, const StyledRelation &styledRelation,
|
const Style *applyRelationStyle(const Style *baseStyle, const StyledRelation &styledRelation,
|
||||||
const Parameters *parameters);
|
const Parameters *parameters) override;
|
||||||
const Style *applyAnnotationStyle(const Style *baseStyle, const DAnnotation *annotation,
|
const Style *applyAnnotationStyle(const Style *baseStyle, const DAnnotation *annotation,
|
||||||
const Parameters *parameters);
|
const Parameters *parameters) override;
|
||||||
const Style *applyBoundaryStyle(const Style *baseStyle, const DBoundary *boundary,
|
const Style *applyBoundaryStyle(const Style *baseStyle, const DBoundary *boundary,
|
||||||
const Parameters *parameters);
|
const Parameters *parameters) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Style *applyAnnotationStyle(const Style *baseStyle, DAnnotation::VisualRole visualRole,
|
const Style *applyAnnotationStyle(const Style *baseStyle, DAnnotation::VisualRole visualRole,
|
||||||
|
@@ -39,7 +39,7 @@ class QMT_EXPORT RelationStarterStyle : public Style
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RelationStarterStyle();
|
RelationStarterStyle();
|
||||||
~RelationStarterStyle();
|
~RelationStarterStyle() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -54,7 +54,7 @@ class QMT_EXPORT StyleController : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StyleController(QObject *parent = 0);
|
explicit StyleController(QObject *parent = 0);
|
||||||
~StyleController();
|
~StyleController() override;
|
||||||
|
|
||||||
bool suppressGradients() const { return m_suppressGradients; }
|
bool suppressGradients() const { return m_suppressGradients; }
|
||||||
void setSuppressGradients(bool suppressGradients);
|
void setSuppressGradients(bool suppressGradients);
|
||||||
|
@@ -44,25 +44,25 @@ class QMT_EXPORT AlignOnRasterVisitor : public DVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AlignOnRasterVisitor();
|
AlignOnRasterVisitor();
|
||||||
~AlignOnRasterVisitor();
|
~AlignOnRasterVisitor() override;
|
||||||
|
|
||||||
void setDiagramController(DiagramController *diagramController);
|
void setDiagramController(DiagramController *diagramController);
|
||||||
void setSceneInspector(ISceneInspector *sceneInspector);
|
void setSceneInspector(ISceneInspector *sceneInspector);
|
||||||
void setDiagram(MDiagram *diagram);
|
void setDiagram(MDiagram *diagram);
|
||||||
|
|
||||||
void visitDElement(DElement *element);
|
void visitDElement(DElement *element) override;
|
||||||
void visitDObject(DObject *object);
|
void visitDObject(DObject *object) override;
|
||||||
void visitDPackage(DPackage *package);
|
void visitDPackage(DPackage *package) override;
|
||||||
void visitDClass(DClass *klass);
|
void visitDClass(DClass *klass) override;
|
||||||
void visitDComponent(DComponent *component);
|
void visitDComponent(DComponent *component) override;
|
||||||
void visitDDiagram(DDiagram *diagram);
|
void visitDDiagram(DDiagram *diagram) override;
|
||||||
void visitDItem(DItem *item);
|
void visitDItem(DItem *item) override;
|
||||||
void visitDRelation(DRelation *relation);
|
void visitDRelation(DRelation *relation) override;
|
||||||
void visitDInheritance(DInheritance *inheritance);
|
void visitDInheritance(DInheritance *inheritance) override;
|
||||||
void visitDDependency(DDependency *dependency);
|
void visitDDependency(DDependency *dependency) override;
|
||||||
void visitDAssociation(DAssociation *association);
|
void visitDAssociation(DAssociation *association) override;
|
||||||
void visitDAnnotation(DAnnotation *annotation);
|
void visitDAnnotation(DAnnotation *annotation) override;
|
||||||
void visitDBoundary(DBoundary *boundary);
|
void visitDBoundary(DBoundary *boundary) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DiagramController *m_diagramController;
|
DiagramController *m_diagramController;
|
||||||
|
@@ -61,7 +61,7 @@ class QMT_EXPORT DiagramSceneController : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DiagramSceneController(QObject *parent = 0);
|
DiagramSceneController(QObject *parent = 0);
|
||||||
~ DiagramSceneController();
|
~DiagramSceneController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void newElementCreated(DElement *element, MDiagram *diagram);
|
void newElementCreated(DElement *element, MDiagram *diagram);
|
||||||
|
@@ -39,12 +39,12 @@ class QMT_EXPORT FindDiagramVisitor : public MVoidConstVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FindDiagramVisitor();
|
FindDiagramVisitor();
|
||||||
~FindDiagramVisitor();
|
~FindDiagramVisitor() override;
|
||||||
|
|
||||||
const MDiagram *diagram() const { return m_diagram; }
|
const MDiagram *diagram() const { return m_diagram; }
|
||||||
|
|
||||||
void visitMObject(const MObject *object);
|
void visitMObject(const MObject *object) override;
|
||||||
void visitMDiagram(const MDiagram *diagram);
|
void visitMDiagram(const MDiagram *diagram) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const MDiagram *m_diagram;
|
const MDiagram *m_diagram;
|
||||||
|
@@ -41,11 +41,11 @@ class QMT_EXPORT FindRootDiagramVisitor : public MVoidVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FindRootDiagramVisitor();
|
FindRootDiagramVisitor();
|
||||||
~FindRootDiagramVisitor();
|
~FindRootDiagramVisitor() override;
|
||||||
|
|
||||||
MDiagram *diagram() const { return m_diagram; }
|
MDiagram *diagram() const { return m_diagram; }
|
||||||
|
|
||||||
void visitMObject(MObject *object);
|
void visitMObject(MObject *object) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MDiagram *m_diagram;
|
MDiagram *m_diagram;
|
||||||
|
@@ -40,44 +40,44 @@ class QMT_EXPORT VoidElementTasks : public IElementTasks
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VoidElementTasks();
|
VoidElementTasks();
|
||||||
~VoidElementTasks();
|
~VoidElementTasks() override;
|
||||||
|
|
||||||
void openElement(const MElement *);
|
void openElement(const MElement *) override;
|
||||||
void openElement(const DElement *, const MDiagram *);
|
void openElement(const DElement *, const MDiagram *) override;
|
||||||
|
|
||||||
bool hasClassDefinition(const MElement *) const;
|
bool hasClassDefinition(const MElement *) const override;
|
||||||
bool hasClassDefinition(const DElement *, const MDiagram *) const;
|
bool hasClassDefinition(const DElement *, const MDiagram *) const override;
|
||||||
void openClassDefinition(const MElement *);
|
void openClassDefinition(const MElement *) override;
|
||||||
void openClassDefinition(const DElement *, const MDiagram *);
|
void openClassDefinition(const DElement *, const MDiagram *) override;
|
||||||
|
|
||||||
bool hasHeaderFile(const MElement *) const;
|
bool hasHeaderFile(const MElement *) const override;
|
||||||
bool hasHeaderFile(const DElement *, const MDiagram *) const;
|
bool hasHeaderFile(const DElement *, const MDiagram *) const override;
|
||||||
bool hasSourceFile(const MElement *) const;
|
bool hasSourceFile(const MElement *) const override;
|
||||||
bool hasSourceFile(const DElement *, const MDiagram *) const;
|
bool hasSourceFile(const DElement *, const MDiagram *) const override;
|
||||||
void openHeaderFile(const MElement *);
|
void openHeaderFile(const MElement *) override;
|
||||||
void openHeaderFile(const DElement *, const MDiagram *);
|
void openHeaderFile(const DElement *, const MDiagram *) override;
|
||||||
void openSourceFile(const MElement *);
|
void openSourceFile(const MElement *) override;
|
||||||
void openSourceFile(const DElement *, const MDiagram *);
|
void openSourceFile(const DElement *, const MDiagram *) override;
|
||||||
|
|
||||||
bool hasFolder(const MElement *) const;
|
bool hasFolder(const MElement *) const override;
|
||||||
bool hasFolder(const DElement *, const MDiagram *) const;
|
bool hasFolder(const DElement *, const MDiagram *) const override;
|
||||||
void showFolder(const MElement *);
|
void showFolder(const MElement *) override;
|
||||||
void showFolder(const DElement *, const MDiagram *);
|
void showFolder(const DElement *, const MDiagram *) override;
|
||||||
|
|
||||||
bool hasDiagram(const MElement *) const;
|
bool hasDiagram(const MElement *) const override;
|
||||||
bool hasDiagram(const DElement *, const MDiagram *) const;
|
bool hasDiagram(const DElement *, const MDiagram *) const override;
|
||||||
void openDiagram(const MElement *);
|
void openDiagram(const MElement *) override;
|
||||||
void openDiagram(const DElement *, const MDiagram *);
|
void openDiagram(const DElement *, const MDiagram *) override;
|
||||||
|
|
||||||
bool hasParentDiagram(const MElement *) const;
|
bool hasParentDiagram(const MElement *) const override;
|
||||||
bool hasParentDiagram(const DElement *, const MDiagram *) const;
|
bool hasParentDiagram(const DElement *, const MDiagram *) const override;
|
||||||
void openParentDiagram(const MElement *);
|
void openParentDiagram(const MElement *) override;
|
||||||
void openParentDiagram(const DElement *, const MElement *);
|
void openParentDiagram(const DElement *, const MElement *) override;
|
||||||
|
|
||||||
bool mayCreateDiagram(const qmt::MElement *) const;
|
bool mayCreateDiagram(const qmt::MElement *) const override;
|
||||||
bool mayCreateDiagram(const qmt::DElement *, const qmt::MDiagram *) const;
|
bool mayCreateDiagram(const qmt::DElement *, const qmt::MDiagram *) const override;
|
||||||
void createAndOpenDiagram(const qmt::MElement *);
|
void createAndOpenDiagram(const qmt::MElement *) override;
|
||||||
void createAndOpenDiagram(const qmt::DElement *, const qmt::MDiagram *);
|
void createAndOpenDiagram(const qmt::DElement *, const qmt::MDiagram *) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
@@ -52,7 +52,7 @@ private:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RefNode(V &v) : m_v(v) { }
|
RefNode(V &v) : m_v(v) { }
|
||||||
bool accept(Parser &visitor, int *index) { return visitor.visit(this, index); }
|
bool accept(Parser &visitor, int *index) override { return visitor.visit(this, index); }
|
||||||
V &ref() const { return m_v; }
|
V &ref() const { return m_v; }
|
||||||
private:
|
private:
|
||||||
V &m_v;
|
V &m_v;
|
||||||
@@ -63,7 +63,7 @@ private:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SetterNode(U &u, void (U::*setter)(V)) : m_object(u), m_setter(setter) { }
|
SetterNode(U &u, void (U::*setter)(V)) : m_object(u), m_setter(setter) { }
|
||||||
bool accept(Parser &visitor, int *index) { return visitor.visit(this, index); }
|
bool accept(Parser &visitor, int *index) override{ return visitor.visit(this, index); }
|
||||||
U &object() const { return m_object; }
|
U &object() const { return m_object; }
|
||||||
void (U::*setter() const)(V) { return m_setter; }
|
void (U::*setter() const)(V) { return m_setter; }
|
||||||
private:
|
private:
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user