forked from qt-creator/qt-creator
ModelEditor: Replace 0 with nullptr in modelinglib
Change-Id: I9c0c1c6b0d9410e5f4ece358fc6fd262a15c85fb Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
@@ -42,7 +42,7 @@ namespace qmt {
|
|||||||
class ConfigController::ConfigControllerPrivate
|
class ConfigController::ConfigControllerPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StereotypeController *m_stereotypeController = 0;
|
StereotypeController *m_stereotypeController = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
ConfigController::ConfigController(QObject *parent)
|
ConfigController::ConfigController(QObject *parent)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class QMT_EXPORT ConfigController : public QObject
|
|||||||
class ConfigControllerPrivate;
|
class ConfigControllerPrivate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigController(QObject *parent = 0);
|
explicit ConfigController(QObject *parent = nullptr);
|
||||||
~ConfigController() override;
|
~ConfigController() override;
|
||||||
|
|
||||||
void setStereotypeController(StereotypeController *stereotypeController);
|
void setStereotypeController(StereotypeController *stereotypeController);
|
||||||
|
|||||||
@@ -321,10 +321,10 @@ void StereotypeDefinitionParser::parse(ITextSource *source)
|
|||||||
try {
|
try {
|
||||||
parseFile();
|
parseFile();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
d->m_scanner = 0;
|
d->m_scanner = nullptr;
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
d->m_scanner = 0;
|
d->m_scanner = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StereotypeDefinitionParser::parseFile()
|
void StereotypeDefinitionParser::parseFile()
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class QMT_EXPORT StereotypeDefinitionParser : public QObject
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StereotypeDefinitionParser(QObject *parent = 0);
|
explicit StereotypeDefinitionParser(QObject *parent = nullptr);
|
||||||
~StereotypeDefinitionParser() override;
|
~StereotypeDefinitionParser() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
int m_maxOperatorLength = 0;
|
int m_maxOperatorLength = 0;
|
||||||
QSet<QChar> m_operatorFirstCharsSet;
|
QSet<QChar> m_operatorFirstCharsSet;
|
||||||
QSet<QChar> m_operatorCharsSet;
|
QSet<QChar> m_operatorCharsSet;
|
||||||
ITextSource *m_source = 0;
|
ITextSource *m_source = nullptr;
|
||||||
QStack<SourceChar> m_unreadSourceChars;
|
QStack<SourceChar> m_unreadSourceChars;
|
||||||
SourcePos m_lastSourcePos;
|
SourcePos m_lastSourcePos;
|
||||||
QStack<Token> m_unreadTokens;
|
QStack<Token> m_unreadTokens;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class QMT_EXPORT TextScanner : public QObject
|
|||||||
class TextScannerPrivate;
|
class TextScannerPrivate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TextScanner(QObject *parent = 0);
|
explicit TextScanner(QObject *parent = nullptr);
|
||||||
~TextScanner() override;
|
~TextScanner() override;
|
||||||
|
|
||||||
void setKeywords(const QList<QPair<QString, int> > &keywords);
|
void setKeywords(const QList<QPair<QString, int> > &keywords);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class QMT_EXPORT NameController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit NameController(QObject *parent = 0);
|
explicit NameController(QObject *parent = nullptr);
|
||||||
~NameController() override;
|
~NameController() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class QMT_EXPORT UndoController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit UndoController(QObject *parent = 0);
|
explicit UndoController(QObject *parent = nullptr);
|
||||||
~UndoController() override;
|
~UndoController() override;
|
||||||
|
|
||||||
QUndoStack *undoStack() const { return m_undoStack; }
|
QUndoStack *undoStack() const { return m_undoStack; }
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
namespace qmt {
|
namespace qmt {
|
||||||
|
|
||||||
DCloneVisitor::DCloneVisitor()
|
DCloneVisitor::DCloneVisitor()
|
||||||
: m_cloned(0)
|
: m_cloned(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ void DCloneVisitor::visitDSwimlane(const DSwimlane *swimlane)
|
|||||||
|
|
||||||
|
|
||||||
DCloneDeepVisitor::DCloneDeepVisitor()
|
DCloneDeepVisitor::DCloneDeepVisitor()
|
||||||
: m_cloned(0)
|
: m_cloned(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
namespace qmt {
|
namespace qmt {
|
||||||
|
|
||||||
DFactory::DFactory()
|
DFactory::DFactory()
|
||||||
: m_product(0)
|
: m_product(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class DiagramController::Clone
|
|||||||
public:
|
public:
|
||||||
Uid m_elementKey;
|
Uid m_elementKey;
|
||||||
int m_indexOfElement = -1;
|
int m_indexOfElement = -1;
|
||||||
DElement *m_clonedElement = 0;
|
DElement *m_clonedElement = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DiagramController::DiagramUndoCommand : public UndoCommand
|
class DiagramController::DiagramUndoCommand : public UndoCommand
|
||||||
@@ -84,7 +84,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DiagramController *m_diagramController = 0;
|
DiagramController *m_diagramController = nullptr;
|
||||||
Uid m_diagramKey;
|
Uid m_diagramKey;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ protected:
|
|||||||
QMT_CHECK(clone.m_clonedElement->uid() == clone.m_elementKey);
|
QMT_CHECK(clone.m_clonedElement->uid() == clone.m_elementKey);
|
||||||
emit diagramController->beginInsertElement(clone.m_indexOfElement, diagram);
|
emit diagramController->beginInsertElement(clone.m_indexOfElement, diagram);
|
||||||
diagram->insertDiagramElement(clone.m_indexOfElement, clone.m_clonedElement);
|
diagram->insertDiagramElement(clone.m_indexOfElement, clone.m_clonedElement);
|
||||||
clone.m_clonedElement = 0;
|
clone.m_clonedElement = nullptr;
|
||||||
emit diagramController->endInsertElement(clone.m_indexOfElement, diagram);
|
emit diagramController->endInsertElement(clone.m_indexOfElement, diagram);
|
||||||
inserted = true;
|
inserted = true;
|
||||||
}
|
}
|
||||||
@@ -321,7 +321,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<MDiagram *> *m_allDiagrams = 0;
|
QList<MDiagram *> *m_allDiagrams = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
DiagramController::DiagramController(QObject *parent)
|
DiagramController::DiagramController(QObject *parent)
|
||||||
@@ -338,8 +338,8 @@ DiagramController::~DiagramController()
|
|||||||
void DiagramController::setModelController(ModelController *modelController)
|
void DiagramController::setModelController(ModelController *modelController)
|
||||||
{
|
{
|
||||||
if (m_modelController) {
|
if (m_modelController) {
|
||||||
disconnect(m_modelController, 0, this, 0);
|
disconnect(m_modelController, nullptr, this, nullptr);
|
||||||
m_modelController = 0;
|
m_modelController = nullptr;
|
||||||
}
|
}
|
||||||
if (modelController) {
|
if (modelController) {
|
||||||
m_modelController = modelController;
|
m_modelController = modelController;
|
||||||
@@ -432,7 +432,7 @@ DElement *DiagramController::findElement(const Uid &key, const MDiagram *diagram
|
|||||||
bool DiagramController::hasDelegate(const MElement *modelElement, const MDiagram *diagram) const
|
bool DiagramController::hasDelegate(const MElement *modelElement, const MDiagram *diagram) const
|
||||||
{
|
{
|
||||||
// PERFORM smarter implementation after map is introduced
|
// PERFORM smarter implementation after map is introduced
|
||||||
return findDelegate(modelElement, diagram) != 0;
|
return findDelegate(modelElement, diagram) != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
DElement *DiagramController::findDelegate(const MElement *modelElement, const MDiagram *diagram) const
|
DElement *DiagramController::findDelegate(const MElement *modelElement, const MDiagram *diagram) const
|
||||||
@@ -442,7 +442,7 @@ DElement *DiagramController::findDelegate(const MElement *modelElement, const MD
|
|||||||
if (diagramElement->modelUid().isValid() && diagramElement->modelUid() == modelElement->uid())
|
if (diagramElement->modelUid().isValid() && diagramElement->modelUid() == modelElement->uid())
|
||||||
return diagramElement;
|
return diagramElement;
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiagramController::startUpdateElement(DElement *element, MDiagram *diagram, UpdateAction updateAction)
|
void DiagramController::startUpdateElement(DElement *element, MDiagram *diagram, UpdateAction updateAction)
|
||||||
@@ -757,7 +757,7 @@ DElement *DiagramController::findElementOnAnyDiagram(const Uid &uid)
|
|||||||
if (element)
|
if (element)
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiagramController::removeObjects(MObject *modelObject)
|
void DiagramController::removeObjects(MObject *modelObject)
|
||||||
@@ -890,7 +890,7 @@ DReferences DiagramController::simplify(const DSelection &diagramSelection, cons
|
|||||||
MElement *DiagramController::delegatedElement(const DElement *element) const
|
MElement *DiagramController::delegatedElement(const DElement *element) const
|
||||||
{
|
{
|
||||||
if (!element->modelUid().isValid())
|
if (!element->modelUid().isValid())
|
||||||
return 0;
|
return nullptr;
|
||||||
return m_modelController->findElement(element->modelUid());
|
return m_modelController->findElement(element->modelUid());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -936,10 +936,10 @@ void DiagramController::verifyDiagramIntegrity(const MDiagram *diagram)
|
|||||||
QHash<Uid, const DElement *> delementsMap;
|
QHash<Uid, const DElement *> delementsMap;
|
||||||
foreach (const DElement *delement, diagram->diagramElements()) {
|
foreach (const DElement *delement, diagram->diagramElements()) {
|
||||||
delementsMap.insert(delement->uid(), delement);
|
delementsMap.insert(delement->uid(), delement);
|
||||||
if (dynamic_cast<const DObject *>(delement) != 0 || dynamic_cast<const DRelation *>(delement) != 0) {
|
if (dynamic_cast<const DObject *>(delement) || dynamic_cast<const DRelation *>(delement)) {
|
||||||
QMT_ASSERT(delement->modelUid().isValid(), return);
|
QMT_ASSERT(delement->modelUid().isValid(), return);
|
||||||
QMT_ASSERT(m_modelController->findElement(delement->modelUid()) != 0, return);
|
QMT_ASSERT(m_modelController->findElement(delement->modelUid()), return);
|
||||||
if (!delement->modelUid().isValid() || m_modelController->findElement(delement->modelUid()) == 0) {
|
if (!delement->modelUid().isValid() || !m_modelController->findElement(delement->modelUid())) {
|
||||||
if (const DObject *dobject = dynamic_cast<const DObject *>(delement))
|
if (const DObject *dobject = dynamic_cast<const DObject *>(delement))
|
||||||
qWarning() << "Diagram" << diagram->name() << diagram->uid().toString() << ": object" << dobject->name() << dobject->uid().toString() << "has invalid reference to model element.";
|
qWarning() << "Diagram" << diagram->name() << diagram->uid().toString() << ": object" << dobject->name() << dobject->uid().toString() << "has invalid reference to model element.";
|
||||||
else if (const DRelation *drelation = dynamic_cast<const DRelation *>(delement))
|
else if (const DRelation *drelation = dynamic_cast<const DRelation *>(delement))
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ private:
|
|||||||
class FindDiagramsVisitor;
|
class FindDiagramsVisitor;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DiagramController(QObject *parent = 0);
|
explicit DiagramController(QObject *parent = nullptr);
|
||||||
~DiagramController() override;
|
~DiagramController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ void DUpdateVisitor::visitMRelation(const MRelation *relation)
|
|||||||
DObject *endAObject = dynamic_cast<DObject *>(m_diagram->findDiagramElement(drelation->endAUid()));
|
DObject *endAObject = dynamic_cast<DObject *>(m_diagram->findDiagramElement(drelation->endAUid()));
|
||||||
if (!endAObject || relation->endAUid() != endAObject->modelUid()) {
|
if (!endAObject || relation->endAUid() != endAObject->modelUid()) {
|
||||||
(void) isUpdating(true);
|
(void) isUpdating(true);
|
||||||
endAObject = 0;
|
endAObject = nullptr;
|
||||||
// TODO use DiagramController::findDelegate (and improve performance of that method)
|
// TODO use DiagramController::findDelegate (and improve performance of that method)
|
||||||
foreach (DElement *diagramElement, m_diagram->diagramElements()) {
|
foreach (DElement *diagramElement, m_diagram->diagramElements()) {
|
||||||
if (diagramElement->modelUid().isValid() && diagramElement->modelUid() == relation->endAUid()) {
|
if (diagramElement->modelUid().isValid() && diagramElement->modelUid() == relation->endAUid()) {
|
||||||
@@ -172,7 +172,7 @@ void DUpdateVisitor::visitMRelation(const MRelation *relation)
|
|||||||
DObject *endBObject = dynamic_cast<DObject *>(m_diagram->findDiagramElement(drelation->endBUid()));
|
DObject *endBObject = dynamic_cast<DObject *>(m_diagram->findDiagramElement(drelation->endBUid()));
|
||||||
if (!endBObject || relation->endBUid() != endBObject->modelUid()) {
|
if (!endBObject || relation->endBUid() != endBObject->modelUid()) {
|
||||||
(void) isUpdating(true);
|
(void) isUpdating(true);
|
||||||
endBObject = 0;
|
endBObject = nullptr;
|
||||||
// TODO use DiagramController::findDelegate
|
// TODO use DiagramController::findDelegate
|
||||||
foreach (DElement *diagramElement, m_diagram->diagramElements()) {
|
foreach (DElement *diagramElement, m_diagram->diagramElements()) {
|
||||||
if (diagramElement->modelUid().isValid() && diagramElement->modelUid() == relation->endBUid()) {
|
if (diagramElement->modelUid().isValid() && diagramElement->modelUid() == relation->endBUid()) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public:
|
|||||||
virtual ~IIntersectionable() { }
|
virtual ~IIntersectionable() { }
|
||||||
|
|
||||||
virtual bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
virtual bool intersectShapeWithLine(const QLineF &line, QPointF *intersectionPoint,
|
||||||
QLineF *intersectionLine = 0) const = 0;
|
QLineF *intersectionLine = nullptr) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class QMT_EXPORT DiagramGraphicsScene : public QGraphicsScene
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DiagramGraphicsScene(DiagramSceneModel *diagramSceneModel, QObject *parent = 0);
|
explicit DiagramGraphicsScene(DiagramSceneModel *diagramSceneModel, QObject *parent = nullptr);
|
||||||
~DiagramGraphicsScene() override;
|
~DiagramGraphicsScene() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ namespace qmt {
|
|||||||
class DiagramSceneModel::OriginItem : public QGraphicsItem
|
class DiagramSceneModel::OriginItem : public QGraphicsItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit OriginItem(QGraphicsItem *parent = 0)
|
explicit OriginItem(QGraphicsItem *parent = nullptr)
|
||||||
: QGraphicsItem(parent)
|
: QGraphicsItem(parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -96,16 +96,16 @@ public:
|
|||||||
|
|
||||||
DiagramSceneModel::DiagramSceneModel(QObject *parent)
|
DiagramSceneModel::DiagramSceneModel(QObject *parent)
|
||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
m_diagramController(0),
|
m_diagramController(nullptr),
|
||||||
m_diagramSceneController(0),
|
m_diagramSceneController(nullptr),
|
||||||
m_styleController(0),
|
m_styleController(nullptr),
|
||||||
m_stereotypeController(0),
|
m_stereotypeController(nullptr),
|
||||||
m_diagram(0),
|
m_diagram(nullptr),
|
||||||
m_graphicsScene(new DiagramGraphicsScene(this)),
|
m_graphicsScene(new DiagramGraphicsScene(this)),
|
||||||
m_latchController(new LatchController(this)),
|
m_latchController(new LatchController(this)),
|
||||||
m_busyState(NotBusy),
|
m_busyState(NotBusy),
|
||||||
m_originItem(new OriginItem()),
|
m_originItem(new OriginItem()),
|
||||||
m_focusItem(0)
|
m_focusItem(nullptr)
|
||||||
{
|
{
|
||||||
m_latchController->setDiagramSceneModel(this);
|
m_latchController->setDiagramSceneModel(this);
|
||||||
connect(m_graphicsScene, &QGraphicsScene::selectionChanged,
|
connect(m_graphicsScene, &QGraphicsScene::selectionChanged,
|
||||||
@@ -124,7 +124,7 @@ DiagramSceneModel::~DiagramSceneModel()
|
|||||||
m_latchController->removeFromGraphicsScene(m_graphicsScene);
|
m_latchController->removeFromGraphicsScene(m_graphicsScene);
|
||||||
disconnect();
|
disconnect();
|
||||||
if (m_diagramController)
|
if (m_diagramController)
|
||||||
disconnect(m_diagramController, 0, this, 0);
|
disconnect(m_diagramController, nullptr, this, nullptr);
|
||||||
m_graphicsScene->deleteLater();
|
m_graphicsScene->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,8 +133,8 @@ void DiagramSceneModel::setDiagramController(DiagramController *diagramControlle
|
|||||||
if (m_diagramController == diagramController)
|
if (m_diagramController == diagramController)
|
||||||
return;
|
return;
|
||||||
if (m_diagramController) {
|
if (m_diagramController) {
|
||||||
disconnect(m_diagramController, 0, this, 0);
|
disconnect(m_diagramController, nullptr, this, nullptr);
|
||||||
m_diagramController = 0;
|
m_diagramController = nullptr;
|
||||||
}
|
}
|
||||||
m_diagramController = diagramController;
|
m_diagramController = diagramController;
|
||||||
if (diagramController) {
|
if (diagramController) {
|
||||||
@@ -201,7 +201,7 @@ bool DiagramSceneModel::hasMultiObjectsSelection() const
|
|||||||
foreach (QGraphicsItem *item, m_graphicsScene->selectedItems()) {
|
foreach (QGraphicsItem *item, m_graphicsScene->selectedItems()) {
|
||||||
DElement *element = m_itemToElementMap.value(item);
|
DElement *element = m_itemToElementMap.value(item);
|
||||||
QMT_CHECK(element);
|
QMT_CHECK(element);
|
||||||
if (dynamic_cast<DObject *>(element) != 0) {
|
if (dynamic_cast<DObject *>(element)) {
|
||||||
++count;
|
++count;
|
||||||
if (count > 1)
|
if (count > 1)
|
||||||
return true;
|
return true;
|
||||||
@@ -229,7 +229,7 @@ DElement *DiagramSceneModel::findTopmostElement(const QPointF &scenePos) const
|
|||||||
if (m_graphicsItems.contains(item))
|
if (m_graphicsItems.contains(item))
|
||||||
return m_itemToElementMap.value(item);
|
return m_itemToElementMap.value(item);
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
DObject *DiagramSceneModel::findTopmostObject(const QPointF &scenePos) const
|
DObject *DiagramSceneModel::findTopmostObject(const QPointF &scenePos) const
|
||||||
@@ -277,7 +277,7 @@ DElement *DiagramSceneModel::element(QGraphicsItem *item) const
|
|||||||
bool DiagramSceneModel::isElementEditable(const DElement *element) const
|
bool DiagramSceneModel::isElementEditable(const DElement *element) const
|
||||||
{
|
{
|
||||||
auto editable = dynamic_cast<IEditable *>(m_elementToItemMap.value(element));
|
auto editable = dynamic_cast<IEditable *>(m_elementToItemMap.value(element));
|
||||||
return editable != 0 && editable->isEditable();
|
return editable && editable->isEditable();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiagramSceneModel::selectAllElements()
|
void DiagramSceneModel::selectAllElements()
|
||||||
@@ -300,7 +300,7 @@ void DiagramSceneModel::selectElement(DElement *element)
|
|||||||
void DiagramSceneModel::editElement(DElement *element)
|
void DiagramSceneModel::editElement(DElement *element)
|
||||||
{
|
{
|
||||||
auto editable = dynamic_cast<IEditable *>(m_elementToItemMap.value(element));
|
auto editable = dynamic_cast<IEditable *>(m_elementToItemMap.value(element));
|
||||||
if (editable != 0 && editable->isEditable())
|
if (editable && editable->isEditable())
|
||||||
editable->edit();
|
editable->edit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -643,7 +643,7 @@ void DiagramSceneModel::mouseReleaseEventReparenting(QGraphicsSceneMouseEvent *e
|
|||||||
{
|
{
|
||||||
if (event->modifiers() & Qt::AltModifier) {
|
if (event->modifiers() & Qt::AltModifier) {
|
||||||
ModelController *modelController = diagramController()->modelController();
|
ModelController *modelController = diagramController()->modelController();
|
||||||
MPackage *newOwner = 0;
|
MPackage *newOwner = nullptr;
|
||||||
QSet<QGraphicsItem *> selectedItemSet = m_graphicsScene->selectedItems().toSet();
|
QSet<QGraphicsItem *> selectedItemSet = m_graphicsScene->selectedItems().toSet();
|
||||||
QList<QGraphicsItem *> itemsUnderMouse = m_graphicsScene->items(event->scenePos());
|
QList<QGraphicsItem *> itemsUnderMouse = m_graphicsScene->items(event->scenePos());
|
||||||
foreach (QGraphicsItem *item, itemsUnderMouse) {
|
foreach (QGraphicsItem *item, itemsUnderMouse) {
|
||||||
@@ -744,7 +744,7 @@ void DiagramSceneModel::onBeginInsertElement(int row, const MDiagram *diagram)
|
|||||||
void DiagramSceneModel::onEndInsertElement(int row, const MDiagram *diagram)
|
void DiagramSceneModel::onEndInsertElement(int row, const MDiagram *diagram)
|
||||||
{
|
{
|
||||||
QMT_CHECK(m_busyState == InsertElement);
|
QMT_CHECK(m_busyState == InsertElement);
|
||||||
QGraphicsItem *item = 0;
|
QGraphicsItem *item = nullptr;
|
||||||
if (diagram == m_diagram) {
|
if (diagram == m_diagram) {
|
||||||
DElement *element = diagram->diagramElements().at(row);
|
DElement *element = diagram->diagramElements().at(row);
|
||||||
item = createGraphicsItem(element);
|
item = createGraphicsItem(element);
|
||||||
@@ -805,7 +805,7 @@ void DiagramSceneModel::onSelectionChanged()
|
|||||||
// select all contained objects secondarily
|
// select all contained objects secondarily
|
||||||
foreach (QGraphicsItem *selectedItem, m_selectedItems) {
|
foreach (QGraphicsItem *selectedItem, m_selectedItems) {
|
||||||
foreach (QGraphicsItem *item, collectCollidingObjectItems(selectedItem, CollidingInnerItems)) {
|
foreach (QGraphicsItem *item, collectCollidingObjectItems(selectedItem, CollidingInnerItems)) {
|
||||||
if (!item->isSelected() && dynamic_cast<ISelectable *>(item) != 0
|
if (!item->isSelected() && dynamic_cast<ISelectable *>(item)
|
||||||
&& item->collidesWithItem(selectedItem, Qt::ContainsItemBoundingRect)
|
&& item->collidesWithItem(selectedItem, Qt::ContainsItemBoundingRect)
|
||||||
&& isInFrontOf(item, selectedItem)) {
|
&& isInFrontOf(item, selectedItem)) {
|
||||||
QMT_CHECK(!m_selectedItems.contains(item));
|
QMT_CHECK(!m_selectedItems.contains(item));
|
||||||
@@ -891,7 +891,7 @@ void DiagramSceneModel::clearGraphicsScene()
|
|||||||
m_elementToItemMap.clear();
|
m_elementToItemMap.clear();
|
||||||
m_selectedItems.clear();
|
m_selectedItems.clear();
|
||||||
m_secondarySelectedItems.clear();
|
m_secondarySelectedItems.clear();
|
||||||
m_focusItem = 0;
|
m_focusItem = nullptr;
|
||||||
// save extra items from being deleted
|
// save extra items from being deleted
|
||||||
removeExtraSceneItems();
|
removeExtraSceneItems();
|
||||||
m_graphicsScene->clear();
|
m_graphicsScene->clear();
|
||||||
@@ -961,8 +961,8 @@ void DiagramSceneModel::deleteGraphicsItem(QGraphicsItem *item, DElement *elemen
|
|||||||
void DiagramSceneModel::updateFocusItem(const QSet<QGraphicsItem *> &selectedItems)
|
void DiagramSceneModel::updateFocusItem(const QSet<QGraphicsItem *> &selectedItems)
|
||||||
{
|
{
|
||||||
QGraphicsItem *mouseGrabberItem = m_graphicsScene->mouseGrabberItem();
|
QGraphicsItem *mouseGrabberItem = m_graphicsScene->mouseGrabberItem();
|
||||||
QGraphicsItem *focusItem = 0;
|
QGraphicsItem *focusItem = nullptr;
|
||||||
ISelectable *selectable = 0;
|
ISelectable *selectable = nullptr;
|
||||||
|
|
||||||
if (mouseGrabberItem && selectedItems.contains(mouseGrabberItem)) {
|
if (mouseGrabberItem && selectedItems.contains(mouseGrabberItem)) {
|
||||||
selectable = dynamic_cast<ISelectable *>(mouseGrabberItem);
|
selectable = dynamic_cast<ISelectable *>(mouseGrabberItem);
|
||||||
@@ -985,7 +985,7 @@ void DiagramSceneModel::unsetFocusItem()
|
|||||||
oldSelectable->setFocusSelected(false);
|
oldSelectable->setFocusSelected(false);
|
||||||
else
|
else
|
||||||
QMT_CHECK(false);
|
QMT_CHECK(false);
|
||||||
m_focusItem = 0;
|
m_focusItem = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -995,7 +995,7 @@ bool DiagramSceneModel::isInFrontOf(const QGraphicsItem *frontItem, const QGraph
|
|||||||
QMT_ASSERT(backItem, return false);
|
QMT_ASSERT(backItem, return false);
|
||||||
|
|
||||||
// shortcut for usual case of root items
|
// shortcut for usual case of root items
|
||||||
if (frontItem->parentItem() == 0 && backItem->parentItem() == 0) {
|
if (!frontItem->parentItem() && !backItem->parentItem()) {
|
||||||
foreach (const QGraphicsItem *item, m_graphicsScene->items()) {
|
foreach (const QGraphicsItem *item, m_graphicsScene->items()) {
|
||||||
if (item == frontItem)
|
if (item == frontItem)
|
||||||
return true;
|
return true;
|
||||||
@@ -1009,7 +1009,7 @@ bool DiagramSceneModel::isInFrontOf(const QGraphicsItem *frontItem, const QGraph
|
|||||||
// collect all anchestors of front item
|
// collect all anchestors of front item
|
||||||
QList<const QGraphicsItem *> frontStack;
|
QList<const QGraphicsItem *> frontStack;
|
||||||
const QGraphicsItem *iterator = frontItem;
|
const QGraphicsItem *iterator = frontItem;
|
||||||
while (iterator != 0) {
|
while (iterator) {
|
||||||
frontStack.append(iterator);
|
frontStack.append(iterator);
|
||||||
iterator = iterator->parentItem();
|
iterator = iterator->parentItem();
|
||||||
}
|
}
|
||||||
@@ -1017,7 +1017,7 @@ bool DiagramSceneModel::isInFrontOf(const QGraphicsItem *frontItem, const QGraph
|
|||||||
// collect all anchestors of back item
|
// collect all anchestors of back item
|
||||||
QList<const QGraphicsItem *> backStack;
|
QList<const QGraphicsItem *> backStack;
|
||||||
iterator = backItem;
|
iterator = backItem;
|
||||||
while (iterator != 0) {
|
while (iterator) {
|
||||||
backStack.append(iterator);
|
backStack.append(iterator);
|
||||||
iterator = iterator->parentItem();
|
iterator = iterator->parentItem();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public:
|
|||||||
CollidingOuterItems
|
CollidingOuterItems
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit DiagramSceneModel(QObject *parent = 0);
|
explicit DiagramSceneModel(QObject *parent = nullptr);
|
||||||
~DiagramSceneModel() override;
|
~DiagramSceneModel() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -166,12 +166,12 @@ void DiagramSceneModel::UpdateVisitor::visitDElement(DElement *element)
|
|||||||
|
|
||||||
void DiagramSceneModel::UpdateVisitor::visitDObject(DObject *object)
|
void DiagramSceneModel::UpdateVisitor::visitDObject(DObject *object)
|
||||||
{
|
{
|
||||||
if (m_relatedElement == 0) {
|
if (!m_relatedElement) {
|
||||||
// update all related relations
|
// update all related relations
|
||||||
foreach (QGraphicsItem *item, m_diagramSceneModel->m_graphicsItems) {
|
foreach (QGraphicsItem *item, m_diagramSceneModel->m_graphicsItems) {
|
||||||
DElement *element = m_diagramSceneModel->m_itemToElementMap.value(item);
|
DElement *element = m_diagramSceneModel->m_itemToElementMap.value(item);
|
||||||
QMT_CHECK(element);
|
QMT_CHECK(element);
|
||||||
if (dynamic_cast<DRelation *>(element) != 0) {
|
if (dynamic_cast<DRelation *>(element)) {
|
||||||
UpdateVisitor visitor(item, m_diagramSceneModel, object);
|
UpdateVisitor visitor(item, m_diagramSceneModel, object);
|
||||||
element->accept(&visitor);
|
element->accept(&visitor);
|
||||||
}
|
}
|
||||||
@@ -183,7 +183,7 @@ void DiagramSceneModel::UpdateVisitor::visitDPackage(DPackage *package)
|
|||||||
{
|
{
|
||||||
QMT_ASSERT(m_graphicsItem, return);
|
QMT_ASSERT(m_graphicsItem, return);
|
||||||
|
|
||||||
if (m_relatedElement == 0) {
|
if (!m_relatedElement) {
|
||||||
PackageItem *packageItem = qgraphicsitem_cast<PackageItem *>(m_graphicsItem);
|
PackageItem *packageItem = qgraphicsitem_cast<PackageItem *>(m_graphicsItem);
|
||||||
QMT_ASSERT(packageItem, return);
|
QMT_ASSERT(packageItem, return);
|
||||||
QMT_CHECK(packageItem->object() == package);
|
QMT_CHECK(packageItem->object() == package);
|
||||||
@@ -197,7 +197,7 @@ void DiagramSceneModel::UpdateVisitor::visitDClass(DClass *klass)
|
|||||||
{
|
{
|
||||||
QMT_ASSERT(m_graphicsItem, return);
|
QMT_ASSERT(m_graphicsItem, return);
|
||||||
|
|
||||||
if (m_relatedElement == 0) {
|
if (!m_relatedElement) {
|
||||||
ClassItem *classItem = qgraphicsitem_cast<ClassItem *>(m_graphicsItem);
|
ClassItem *classItem = qgraphicsitem_cast<ClassItem *>(m_graphicsItem);
|
||||||
QMT_ASSERT(classItem, return);
|
QMT_ASSERT(classItem, return);
|
||||||
QMT_CHECK(classItem->object() == klass);
|
QMT_CHECK(classItem->object() == klass);
|
||||||
@@ -211,7 +211,7 @@ void DiagramSceneModel::UpdateVisitor::visitDComponent(DComponent *component)
|
|||||||
{
|
{
|
||||||
QMT_ASSERT(m_graphicsItem, return);
|
QMT_ASSERT(m_graphicsItem, return);
|
||||||
|
|
||||||
if (m_relatedElement == 0) {
|
if (!m_relatedElement) {
|
||||||
ComponentItem *componentItem = qgraphicsitem_cast<ComponentItem *>(m_graphicsItem);
|
ComponentItem *componentItem = qgraphicsitem_cast<ComponentItem *>(m_graphicsItem);
|
||||||
QMT_ASSERT(componentItem, return);
|
QMT_ASSERT(componentItem, return);
|
||||||
QMT_CHECK(componentItem->object() == component);
|
QMT_CHECK(componentItem->object() == component);
|
||||||
@@ -225,7 +225,7 @@ void DiagramSceneModel::UpdateVisitor::visitDDiagram(DDiagram *diagram)
|
|||||||
{
|
{
|
||||||
QMT_ASSERT(m_graphicsItem, return);
|
QMT_ASSERT(m_graphicsItem, return);
|
||||||
|
|
||||||
if (m_relatedElement == 0) {
|
if (!m_relatedElement) {
|
||||||
DiagramItem *documentItem = qgraphicsitem_cast<DiagramItem *>(m_graphicsItem);
|
DiagramItem *documentItem = qgraphicsitem_cast<DiagramItem *>(m_graphicsItem);
|
||||||
QMT_ASSERT(documentItem, return);
|
QMT_ASSERT(documentItem, return);
|
||||||
QMT_CHECK(documentItem->object() == diagram);
|
QMT_CHECK(documentItem->object() == diagram);
|
||||||
@@ -239,7 +239,7 @@ void DiagramSceneModel::UpdateVisitor::visitDItem(DItem *item)
|
|||||||
{
|
{
|
||||||
QMT_ASSERT(m_graphicsItem, return);
|
QMT_ASSERT(m_graphicsItem, return);
|
||||||
|
|
||||||
if (m_relatedElement == 0) {
|
if (!m_relatedElement) {
|
||||||
ItemItem *itemItem = qgraphicsitem_cast<ItemItem *>(m_graphicsItem);
|
ItemItem *itemItem = qgraphicsitem_cast<ItemItem *>(m_graphicsItem);
|
||||||
QMT_ASSERT(itemItem, return);
|
QMT_ASSERT(itemItem, return);
|
||||||
QMT_CHECK(itemItem->object() == item);
|
QMT_CHECK(itemItem->object() == item);
|
||||||
@@ -253,7 +253,7 @@ void DiagramSceneModel::UpdateVisitor::visitDRelation(DRelation *relation)
|
|||||||
{
|
{
|
||||||
QMT_ASSERT(m_graphicsItem, return);
|
QMT_ASSERT(m_graphicsItem, return);
|
||||||
|
|
||||||
if (m_relatedElement == 0
|
if (!m_relatedElement
|
||||||
|| m_relatedElement->uid() == relation->endAUid()
|
|| m_relatedElement->uid() == relation->endAUid()
|
||||||
|| m_relatedElement->uid() == relation->endBUid()) {
|
|| m_relatedElement->uid() == relation->endBUid()) {
|
||||||
RelationItem *relationItem = qgraphicsitem_cast<RelationItem *>(m_graphicsItem);
|
RelationItem *relationItem = qgraphicsitem_cast<RelationItem *>(m_graphicsItem);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class QMT_EXPORT DiagramSceneModel::UpdateVisitor : public DVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UpdateVisitor(QGraphicsItem *item, DiagramSceneModel *diagramSceneModel,
|
UpdateVisitor(QGraphicsItem *item, DiagramSceneModel *diagramSceneModel,
|
||||||
DElement *relatedElement = 0);
|
DElement *relatedElement = nullptr);
|
||||||
|
|
||||||
void visitDElement(DElement *element) override;
|
void visitDElement(DElement *element) override;
|
||||||
void visitDObject(DObject *object) override;
|
void visitDObject(DObject *object) override;
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ void AnnotationItem::updateSelectionMarker()
|
|||||||
if (m_selectionMarker->scene())
|
if (m_selectionMarker->scene())
|
||||||
m_selectionMarker->scene()->removeItem(m_selectionMarker);
|
m_selectionMarker->scene()->removeItem(m_selectionMarker);
|
||||||
delete m_selectionMarker;
|
delete m_selectionMarker;
|
||||||
m_selectionMarker = 0;
|
m_selectionMarker = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class AnnotationItem :
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
AnnotationItem(DAnnotation *annotation, DiagramSceneModel *diagramSceneModel,
|
AnnotationItem(DAnnotation *annotation, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = nullptr);
|
||||||
~AnnotationItem() override;
|
~AnnotationItem() override;
|
||||||
|
|
||||||
DAnnotation *annotation() const { return m_annotation; }
|
DAnnotation *annotation() const { return m_annotation; }
|
||||||
@@ -100,13 +100,13 @@ private:
|
|||||||
QSizeF calcMinimumGeometry() const;
|
QSizeF calcMinimumGeometry() const;
|
||||||
void updateGeometry();
|
void updateGeometry();
|
||||||
|
|
||||||
DAnnotation *m_annotation = 0;
|
DAnnotation *m_annotation = nullptr;
|
||||||
DiagramSceneModel *m_diagramSceneModel = 0;
|
DiagramSceneModel *m_diagramSceneModel = nullptr;
|
||||||
bool m_isSecondarySelected = false;
|
bool m_isSecondarySelected = false;
|
||||||
bool m_isFocusSelected = false;
|
bool m_isFocusSelected = false;
|
||||||
RectangularSelectionItem *m_selectionMarker = 0;
|
RectangularSelectionItem *m_selectionMarker = nullptr;
|
||||||
QGraphicsRectItem *m_noTextItem = 0;
|
QGraphicsRectItem *m_noTextItem = nullptr;
|
||||||
AnnotationTextItem *m_textItem = 0;
|
AnnotationTextItem *m_textItem = nullptr;
|
||||||
bool m_isUpdating = false;
|
bool m_isUpdating = false;
|
||||||
bool m_isChanged = false;
|
bool m_isChanged = false;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ void AssociationItem::updateEndLabels(const DAssociationEnd &end, const DAssocia
|
|||||||
} else if (*endName) {
|
} else if (*endName) {
|
||||||
(*endName)->scene()->removeItem(*endName);
|
(*endName)->scene()->removeItem(*endName);
|
||||||
delete *endName;
|
delete *endName;
|
||||||
*endName = 0;
|
*endName = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!otherEnd.cardinality().isEmpty()) {
|
if (!otherEnd.cardinality().isEmpty()) {
|
||||||
@@ -98,7 +98,7 @@ void AssociationItem::updateEndLabels(const DAssociationEnd &end, const DAssocia
|
|||||||
} else if (*endCardinality) {
|
} else if (*endCardinality) {
|
||||||
(*endCardinality)->scene()->removeItem(*endCardinality);
|
(*endCardinality)->scene()->removeItem(*endCardinality);
|
||||||
delete *endCardinality;
|
delete *endCardinality;
|
||||||
*endCardinality = 0;
|
*endCardinality = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class AssociationItem : public RelationItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AssociationItem(DAssociation *association, DiagramSceneModel *diagramSceneModel,
|
AssociationItem(DAssociation *association, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = nullptr);
|
||||||
~AssociationItem() override;
|
~AssociationItem() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -54,11 +54,11 @@ private:
|
|||||||
QGraphicsItem *endCardinality,
|
QGraphicsItem *endCardinality,
|
||||||
QGraphicsItem *endItem, double headLength);
|
QGraphicsItem *endItem, double headLength);
|
||||||
|
|
||||||
DAssociation *m_association = 0;
|
DAssociation *m_association = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_endAName = 0;
|
QGraphicsSimpleTextItem *m_endAName = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_endACardinality = 0;
|
QGraphicsSimpleTextItem *m_endACardinality = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_endBName = 0;
|
QGraphicsSimpleTextItem *m_endBName = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_endBCardinality = 0;
|
QGraphicsSimpleTextItem *m_endBCardinality = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ void BoundaryItem::update()
|
|||||||
} else if (m_noTextItem) {
|
} else if (m_noTextItem) {
|
||||||
m_noTextItem->scene()->removeItem(m_noTextItem);
|
m_noTextItem->scene()->removeItem(m_noTextItem);
|
||||||
delete m_noTextItem;
|
delete m_noTextItem;
|
||||||
m_noTextItem = 0;
|
m_noTextItem = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// item shown if annotation has no text and is not selected
|
// item shown if annotation has no text and is not selected
|
||||||
@@ -323,7 +323,7 @@ void BoundaryItem::updateSelectionMarker()
|
|||||||
if (m_selectionMarker->scene())
|
if (m_selectionMarker->scene())
|
||||||
m_selectionMarker->scene()->removeItem(m_selectionMarker);
|
m_selectionMarker->scene()->removeItem(m_selectionMarker);
|
||||||
delete m_selectionMarker;
|
delete m_selectionMarker;
|
||||||
m_selectionMarker = 0;
|
m_selectionMarker = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class BoundaryItem :
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
BoundaryItem(DBoundary *boundary, DiagramSceneModel *diagramSceneModel,
|
BoundaryItem(DBoundary *boundary, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = nullptr);
|
||||||
~BoundaryItem() override;
|
~BoundaryItem() override;
|
||||||
|
|
||||||
DBoundary *boundary() const { return m_boundary; }
|
DBoundary *boundary() const { return m_boundary; }
|
||||||
@@ -98,14 +98,14 @@ private:
|
|||||||
QSizeF calcMinimumGeometry() const;
|
QSizeF calcMinimumGeometry() const;
|
||||||
void updateGeometry();
|
void updateGeometry();
|
||||||
|
|
||||||
DBoundary *m_boundary = 0;
|
DBoundary *m_boundary = nullptr;
|
||||||
DiagramSceneModel *m_diagramSceneModel = 0;
|
DiagramSceneModel *m_diagramSceneModel = nullptr;
|
||||||
bool m_isSecondarySelected = false;
|
bool m_isSecondarySelected = false;
|
||||||
bool m_isFocusSelected = false;
|
bool m_isFocusSelected = false;
|
||||||
RectangularSelectionItem *m_selectionMarker = 0;
|
RectangularSelectionItem *m_selectionMarker = nullptr;
|
||||||
QGraphicsRectItem *m_borderItem = 0;
|
QGraphicsRectItem *m_borderItem = nullptr;
|
||||||
QGraphicsRectItem *m_noTextItem = 0;
|
QGraphicsRectItem *m_noTextItem = nullptr;
|
||||||
BoundaryTextItem *m_textItem = 0;
|
BoundaryTextItem *m_textItem = nullptr;
|
||||||
bool m_isUpdating = false;
|
bool m_isUpdating = false;
|
||||||
bool m_isChanged = false;
|
bool m_isChanged = false;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ void ClassItem::update()
|
|||||||
} else if (m_customIcon) {
|
} else if (m_customIcon) {
|
||||||
m_customIcon->scene()->removeItem(m_customIcon);
|
m_customIcon->scene()->removeItem(m_customIcon);
|
||||||
delete m_customIcon;
|
delete m_customIcon;
|
||||||
m_customIcon = 0;
|
m_customIcon = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// shape
|
// shape
|
||||||
@@ -124,7 +124,7 @@ void ClassItem::update()
|
|||||||
} else if (m_shape){
|
} else if (m_shape){
|
||||||
m_shape->scene()->removeItem(m_shape);
|
m_shape->scene()->removeItem(m_shape);
|
||||||
delete m_shape;
|
delete m_shape;
|
||||||
m_shape = 0;
|
m_shape = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// stereotypes
|
// stereotypes
|
||||||
@@ -140,7 +140,7 @@ void ClassItem::update()
|
|||||||
} else if (m_namespace) {
|
} else if (m_namespace) {
|
||||||
m_namespace->scene()->removeItem(m_namespace);
|
m_namespace->scene()->removeItem(m_namespace);
|
||||||
delete m_namespace;
|
delete m_namespace;
|
||||||
m_namespace = 0;
|
m_namespace = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// class name
|
// class name
|
||||||
@@ -156,7 +156,7 @@ void ClassItem::update()
|
|||||||
} else if (m_contextLabel) {
|
} else if (m_contextLabel) {
|
||||||
m_contextLabel->scene()->removeItem(m_contextLabel);
|
m_contextLabel->scene()->removeItem(m_contextLabel);
|
||||||
delete m_contextLabel;
|
delete m_contextLabel;
|
||||||
m_contextLabel = 0;
|
m_contextLabel = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// attributes separator
|
// attributes separator
|
||||||
@@ -168,7 +168,7 @@ void ClassItem::update()
|
|||||||
} else if (m_attributesSeparator) {
|
} else if (m_attributesSeparator) {
|
||||||
m_attributesSeparator->scene()->removeItem(m_attributesSeparator);
|
m_attributesSeparator->scene()->removeItem(m_attributesSeparator);
|
||||||
delete m_attributesSeparator;
|
delete m_attributesSeparator;
|
||||||
m_attributesSeparator = 0;
|
m_attributesSeparator = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// attributes
|
// attributes
|
||||||
@@ -182,7 +182,7 @@ void ClassItem::update()
|
|||||||
} else if (m_attributes) {
|
} else if (m_attributes) {
|
||||||
m_attributes->scene()->removeItem(m_attributes);
|
m_attributes->scene()->removeItem(m_attributes);
|
||||||
delete m_attributes;
|
delete m_attributes;
|
||||||
m_attributes = 0;
|
m_attributes = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// methods separator
|
// methods separator
|
||||||
@@ -194,7 +194,7 @@ void ClassItem::update()
|
|||||||
} else if (m_methodsSeparator) {
|
} else if (m_methodsSeparator) {
|
||||||
m_methodsSeparator->scene()->removeItem(m_methodsSeparator);
|
m_methodsSeparator->scene()->removeItem(m_methodsSeparator);
|
||||||
delete m_methodsSeparator;
|
delete m_methodsSeparator;
|
||||||
m_methodsSeparator = 0;
|
m_methodsSeparator = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
@@ -208,7 +208,7 @@ void ClassItem::update()
|
|||||||
} else if (m_methods) {
|
} else if (m_methods) {
|
||||||
m_methods->scene()->removeItem(m_methods);
|
m_methods->scene()->removeItem(m_methods);
|
||||||
delete m_methods;
|
delete m_methods;
|
||||||
m_methods = 0;
|
m_methods = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// template parameters
|
// template parameters
|
||||||
@@ -229,7 +229,7 @@ void ClassItem::update()
|
|||||||
} else if (m_templateParameterBox) {
|
} else if (m_templateParameterBox) {
|
||||||
m_templateParameterBox->scene()->removeItem(m_templateParameterBox);
|
m_templateParameterBox->scene()->removeItem(m_templateParameterBox);
|
||||||
delete m_templateParameterBox;
|
delete m_templateParameterBox;
|
||||||
m_templateParameterBox = 0;
|
m_templateParameterBox = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSelectionMarker(m_customIcon);
|
updateSelectionMarker(m_customIcon);
|
||||||
@@ -380,7 +380,7 @@ void ClassItem::setFromDisplayName(const QString &displayName)
|
|||||||
QString name;
|
QString name;
|
||||||
QStringList templateParameters;
|
QStringList templateParameters;
|
||||||
// NOTE namespace is ignored because it has its own edit field
|
// NOTE namespace is ignored because it has its own edit field
|
||||||
if (NameController::parseClassName(displayName, 0, &name, &templateParameters)) {
|
if (NameController::parseClassName(displayName, nullptr, &name, &templateParameters)) {
|
||||||
auto diagramClass = dynamic_cast<DClass *>(object());
|
auto diagramClass = dynamic_cast<DClass *>(object());
|
||||||
QMT_ASSERT(diagramClass, return);
|
QMT_ASSERT(diagramClass, return);
|
||||||
ModelController *modelController = diagramSceneModel()->diagramSceneController()->modelController();
|
ModelController *modelController = diagramSceneModel()->diagramSceneController()->modelController();
|
||||||
@@ -650,9 +650,9 @@ void ClassItem::updateMembers(const Style *style)
|
|||||||
QString attributesGroup;
|
QString attributesGroup;
|
||||||
QString methodsGroup;
|
QString methodsGroup;
|
||||||
|
|
||||||
MClassMember::Visibility *currentVisibility = 0;
|
MClassMember::Visibility *currentVisibility = nullptr;
|
||||||
QString *currentGroup = 0;
|
QString *currentGroup = nullptr;
|
||||||
QString *text = 0;
|
QString *text = nullptr;
|
||||||
|
|
||||||
auto dclass = dynamic_cast<DClass *>(object());
|
auto dclass = dynamic_cast<DClass *>(object());
|
||||||
QMT_ASSERT(dclass, return);
|
QMT_ASSERT(dclass, return);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class ClassItem : public ObjectItem
|
|||||||
Q_DECLARE_TR_FUNCTIONS(qmt::ClassItem)
|
Q_DECLARE_TR_FUNCTIONS(qmt::ClassItem)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClassItem(DClass *klass, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
ClassItem(DClass *klass, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = nullptr);
|
||||||
~ClassItem() override;
|
~ClassItem() override;
|
||||||
|
|
||||||
void update() override;
|
void update() override;
|
||||||
@@ -77,17 +77,17 @@ private:
|
|||||||
void updateGeometry();
|
void updateGeometry();
|
||||||
void updateMembers(const Style *style);
|
void updateMembers(const Style *style);
|
||||||
|
|
||||||
CustomIconItem *m_customIcon = 0;
|
CustomIconItem *m_customIcon = nullptr;
|
||||||
QGraphicsRectItem *m_shape = 0;
|
QGraphicsRectItem *m_shape = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_namespace = 0;
|
QGraphicsSimpleTextItem *m_namespace = nullptr;
|
||||||
ContextLabelItem *m_contextLabel = 0;
|
ContextLabelItem *m_contextLabel = nullptr;
|
||||||
QGraphicsLineItem *m_attributesSeparator = 0;
|
QGraphicsLineItem *m_attributesSeparator = nullptr;
|
||||||
QString m_attributesText;
|
QString m_attributesText;
|
||||||
QGraphicsTextItem *m_attributes = 0;
|
QGraphicsTextItem *m_attributes = nullptr;
|
||||||
QGraphicsLineItem *m_methodsSeparator = 0;
|
QGraphicsLineItem *m_methodsSeparator = nullptr;
|
||||||
QString m_methodsText;
|
QString m_methodsText;
|
||||||
QGraphicsTextItem *m_methods = 0;
|
QGraphicsTextItem *m_methods = nullptr;
|
||||||
TemplateParameterBox *m_templateParameterBox = 0;
|
TemplateParameterBox *m_templateParameterBox = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ void ComponentItem::update()
|
|||||||
} else if (m_customIcon) {
|
} else if (m_customIcon) {
|
||||||
m_customIcon->scene()->removeItem(m_customIcon);
|
m_customIcon->scene()->removeItem(m_customIcon);
|
||||||
delete m_customIcon;
|
delete m_customIcon;
|
||||||
m_customIcon = 0;
|
m_customIcon = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// shape
|
// shape
|
||||||
@@ -117,19 +117,19 @@ void ComponentItem::update()
|
|||||||
if (m_shape) {
|
if (m_shape) {
|
||||||
m_shape->scene()->removeItem(m_shape);
|
m_shape->scene()->removeItem(m_shape);
|
||||||
delete m_shape;
|
delete m_shape;
|
||||||
m_shape = 0;
|
m_shape = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (deleteRects) {
|
if (deleteRects) {
|
||||||
if (m_lowerRect) {
|
if (m_lowerRect) {
|
||||||
m_lowerRect->scene()->removeItem(m_lowerRect);
|
m_lowerRect->scene()->removeItem(m_lowerRect);
|
||||||
delete m_lowerRect;
|
delete m_lowerRect;
|
||||||
m_lowerRect = 0;
|
m_lowerRect = nullptr;
|
||||||
}
|
}
|
||||||
if (m_upperRect) {
|
if (m_upperRect) {
|
||||||
m_upperRect->scene()->removeItem(m_upperRect);
|
m_upperRect->scene()->removeItem(m_upperRect);
|
||||||
delete m_upperRect;
|
delete m_upperRect;
|
||||||
m_upperRect = 0;
|
m_upperRect = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ void ComponentItem::update()
|
|||||||
} else if (m_contextLabel) {
|
} else if (m_contextLabel) {
|
||||||
m_contextLabel->scene()->removeItem(m_contextLabel);
|
m_contextLabel->scene()->removeItem(m_contextLabel);
|
||||||
delete m_contextLabel;
|
delete m_contextLabel;
|
||||||
m_contextLabel = 0;
|
m_contextLabel = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSelectionMarker(m_customIcon);
|
updateSelectionMarker(m_customIcon);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class ComponentItem : public ObjectItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ComponentItem(DComponent *component, DiagramSceneModel *diagramSceneModel,
|
ComponentItem(DComponent *component, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = nullptr);
|
||||||
~ComponentItem() override;
|
~ComponentItem() override;
|
||||||
|
|
||||||
void update() override;
|
void update() override;
|
||||||
@@ -63,11 +63,11 @@ private:
|
|||||||
QSizeF calcMinimumGeometry() const;
|
QSizeF calcMinimumGeometry() const;
|
||||||
void updateGeometry();
|
void updateGeometry();
|
||||||
|
|
||||||
CustomIconItem *m_customIcon = 0;
|
CustomIconItem *m_customIcon = nullptr;
|
||||||
QGraphicsRectItem *m_shape = 0;
|
QGraphicsRectItem *m_shape = nullptr;
|
||||||
QGraphicsRectItem *m_upperRect = 0;
|
QGraphicsRectItem *m_upperRect = nullptr;
|
||||||
QGraphicsRectItem *m_lowerRect = 0;
|
QGraphicsRectItem *m_lowerRect = nullptr;
|
||||||
ContextLabelItem *m_contextLabel = 0;
|
ContextLabelItem *m_contextLabel = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ void ConnectionItem::updateEndLabels(const DConnectionEnd &end, const DConnectio
|
|||||||
} else if (*endName) {
|
} else if (*endName) {
|
||||||
(*endName)->scene()->removeItem(*endName);
|
(*endName)->scene()->removeItem(*endName);
|
||||||
delete *endName;
|
delete *endName;
|
||||||
*endName = 0;
|
*endName = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!otherEnd.cardinality().isEmpty()) {
|
if (!otherEnd.cardinality().isEmpty()) {
|
||||||
@@ -98,7 +98,7 @@ void ConnectionItem::updateEndLabels(const DConnectionEnd &end, const DConnectio
|
|||||||
} else if (*endCardinality) {
|
} else if (*endCardinality) {
|
||||||
(*endCardinality)->scene()->removeItem(*endCardinality);
|
(*endCardinality)->scene()->removeItem(*endCardinality);
|
||||||
delete *endCardinality;
|
delete *endCardinality;
|
||||||
*endCardinality = 0;
|
*endCardinality = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class ConnectionItem : public RelationItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConnectionItem(DConnection *connection, DiagramSceneModel *diagramSceneModel,
|
ConnectionItem(DConnection *connection, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = nullptr);
|
||||||
~ConnectionItem() override;
|
~ConnectionItem() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -54,11 +54,11 @@ private:
|
|||||||
QGraphicsItem *endCardinality,
|
QGraphicsItem *endCardinality,
|
||||||
QGraphicsItem *endItem, double headLength);
|
QGraphicsItem *endItem, double headLength);
|
||||||
|
|
||||||
DConnection *m_connection = 0;
|
DConnection *m_connection = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_endAName = 0;
|
QGraphicsSimpleTextItem *m_endAName = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_endACardinality = 0;
|
QGraphicsSimpleTextItem *m_endACardinality = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_endBName = 0;
|
QGraphicsSimpleTextItem *m_endBName = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_endBCardinality = 0;
|
QGraphicsSimpleTextItem *m_endBCardinality = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ void DiagramItem::update()
|
|||||||
} else if (m_customIcon) {
|
} else if (m_customIcon) {
|
||||||
m_customIcon->scene()->removeItem(m_customIcon);
|
m_customIcon->scene()->removeItem(m_customIcon);
|
||||||
delete m_customIcon;
|
delete m_customIcon;
|
||||||
m_customIcon = 0;
|
m_customIcon = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// shape
|
// shape
|
||||||
@@ -100,12 +100,12 @@ void DiagramItem::update()
|
|||||||
if (m_fold) {
|
if (m_fold) {
|
||||||
m_fold->scene()->removeItem(m_fold);
|
m_fold->scene()->removeItem(m_fold);
|
||||||
delete m_fold;
|
delete m_fold;
|
||||||
m_fold = 0;
|
m_fold = nullptr;
|
||||||
}
|
}
|
||||||
if (m_body) {
|
if (m_body) {
|
||||||
m_body->scene()->removeItem(m_body);
|
m_body->scene()->removeItem(m_body);
|
||||||
delete m_body;
|
delete m_body;
|
||||||
m_body = 0;
|
m_body = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class DiagramItem : public ObjectItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit DiagramItem(DDiagram *diagram, DiagramSceneModel *diagramSceneModel,
|
explicit DiagramItem(DDiagram *diagram, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = nullptr);
|
||||||
~DiagramItem() override;
|
~DiagramItem() override;
|
||||||
|
|
||||||
void update() override;
|
void update() override;
|
||||||
@@ -51,9 +51,9 @@ private:
|
|||||||
QSizeF calcMinimumGeometry() const;
|
QSizeF calcMinimumGeometry() const;
|
||||||
void updateGeometry();
|
void updateGeometry();
|
||||||
|
|
||||||
CustomIconItem *m_customIcon = 0;
|
CustomIconItem *m_customIcon = nullptr;
|
||||||
QGraphicsPolygonItem *m_body = 0;
|
QGraphicsPolygonItem *m_body = nullptr;
|
||||||
QGraphicsPolygonItem *m_fold = 0;
|
QGraphicsPolygonItem *m_fold = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ void ItemItem::update()
|
|||||||
} else if (m_customIcon) {
|
} else if (m_customIcon) {
|
||||||
m_customIcon->scene()->removeItem(m_customIcon);
|
m_customIcon->scene()->removeItem(m_customIcon);
|
||||||
delete m_customIcon;
|
delete m_customIcon;
|
||||||
m_customIcon = 0;
|
m_customIcon = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// shape
|
// shape
|
||||||
@@ -99,7 +99,7 @@ void ItemItem::update()
|
|||||||
if (m_shape) {
|
if (m_shape) {
|
||||||
m_shape->scene()->removeItem(m_shape);
|
m_shape->scene()->removeItem(m_shape);
|
||||||
delete m_shape;
|
delete m_shape;
|
||||||
m_shape = 0;
|
m_shape = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ void ItemItem::update()
|
|||||||
} else if (m_contextLabel) {
|
} else if (m_contextLabel) {
|
||||||
m_contextLabel->scene()->removeItem(m_contextLabel);
|
m_contextLabel->scene()->removeItem(m_contextLabel);
|
||||||
delete m_contextLabel;
|
delete m_contextLabel;
|
||||||
m_contextLabel = 0;
|
m_contextLabel = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSelectionMarker(m_customIcon);
|
updateSelectionMarker(m_customIcon);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class RelationStarter;
|
|||||||
class ItemItem : public ObjectItem
|
class ItemItem : public ObjectItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ItemItem(DItem *item, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
ItemItem(DItem *item, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = nullptr);
|
||||||
~ItemItem() override;
|
~ItemItem() override;
|
||||||
|
|
||||||
void update() override;
|
void update() override;
|
||||||
@@ -61,9 +61,9 @@ private:
|
|||||||
QSizeF calcMinimumGeometry() const;
|
QSizeF calcMinimumGeometry() const;
|
||||||
void updateGeometry();
|
void updateGeometry();
|
||||||
|
|
||||||
CustomIconItem *m_customIcon = 0;
|
CustomIconItem *m_customIcon = nullptr;
|
||||||
QGraphicsRectItem *m_shape = 0;
|
QGraphicsRectItem *m_shape = nullptr;
|
||||||
ContextLabelItem *m_contextLabel = 0;
|
ContextLabelItem *m_contextLabel = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -491,7 +491,7 @@ void ObjectItem::updateStereotypes(const QString &stereotypeIconId, StereotypeIc
|
|||||||
} else if (m_stereotypeIcon) {
|
} else if (m_stereotypeIcon) {
|
||||||
m_stereotypeIcon->scene()->removeItem(m_stereotypeIcon);
|
m_stereotypeIcon->scene()->removeItem(m_stereotypeIcon);
|
||||||
delete m_stereotypeIcon;
|
delete m_stereotypeIcon;
|
||||||
m_stereotypeIcon = 0;
|
m_stereotypeIcon = nullptr;
|
||||||
}
|
}
|
||||||
if (stereotypeDisplay != StereotypeIcon::DisplayNone && !stereotypes.isEmpty()) {
|
if (stereotypeDisplay != StereotypeIcon::DisplayNone && !stereotypes.isEmpty()) {
|
||||||
if (!m_stereotypes)
|
if (!m_stereotypes)
|
||||||
@@ -502,7 +502,7 @@ void ObjectItem::updateStereotypes(const QString &stereotypeIconId, StereotypeIc
|
|||||||
} else if (m_stereotypes) {
|
} else if (m_stereotypes) {
|
||||||
m_stereotypes->scene()->removeItem(m_stereotypes);
|
m_stereotypes->scene()->removeItem(m_stereotypes);
|
||||||
delete m_stereotypes;
|
delete m_stereotypes;
|
||||||
m_stereotypes = 0;
|
m_stereotypes = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -650,7 +650,7 @@ void ObjectItem::updateSelectionMarker(ResizeFlags resizeFlags)
|
|||||||
if (m_selectionMarker->scene())
|
if (m_selectionMarker->scene())
|
||||||
m_selectionMarker->scene()->removeItem(m_selectionMarker);
|
m_selectionMarker->scene()->removeItem(m_selectionMarker);
|
||||||
delete m_selectionMarker;
|
delete m_selectionMarker;
|
||||||
m_selectionMarker = 0;
|
m_selectionMarker = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -694,7 +694,7 @@ void ObjectItem::updateRelationStarter()
|
|||||||
} else if (m_relationStarter) {
|
} else if (m_relationStarter) {
|
||||||
scene()->removeItem(m_relationStarter);
|
scene()->removeItem(m_relationStarter);
|
||||||
delete m_relationStarter;
|
delete m_relationStarter;
|
||||||
m_relationStarter = 0;
|
m_relationStarter = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -791,13 +791,13 @@ void ObjectItem::updateAlignmentButtons()
|
|||||||
if (m_horizontalAlignButtons->scene())
|
if (m_horizontalAlignButtons->scene())
|
||||||
m_horizontalAlignButtons->scene()->removeItem(m_horizontalAlignButtons);
|
m_horizontalAlignButtons->scene()->removeItem(m_horizontalAlignButtons);
|
||||||
delete m_horizontalAlignButtons;
|
delete m_horizontalAlignButtons;
|
||||||
m_horizontalAlignButtons = 0;
|
m_horizontalAlignButtons = nullptr;
|
||||||
}
|
}
|
||||||
if (m_verticalAlignButtons) {
|
if (m_verticalAlignButtons) {
|
||||||
if (m_verticalAlignButtons->scene())
|
if (m_verticalAlignButtons->scene())
|
||||||
m_verticalAlignButtons->scene()->removeItem(m_verticalAlignButtons);
|
m_verticalAlignButtons->scene()->removeItem(m_verticalAlignButtons);
|
||||||
delete m_verticalAlignButtons;
|
delete m_verticalAlignButtons;
|
||||||
m_verticalAlignButtons = 0;
|
m_verticalAlignButtons = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ObjectItem(const QString &elementType, DObject *object, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
ObjectItem(const QString &elementType, DObject *object, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = nullptr);
|
||||||
~ObjectItem() override;
|
~ObjectItem() override;
|
||||||
|
|
||||||
QString elementType() const { return m_elementType; }
|
QString elementType() const { return m_elementType; }
|
||||||
@@ -179,20 +179,20 @@ private:
|
|||||||
QSizeF minimumSize(const QSet<QGraphicsItem *> &items) const;
|
QSizeF minimumSize(const QSet<QGraphicsItem *> &items) const;
|
||||||
|
|
||||||
QString m_elementType;
|
QString m_elementType;
|
||||||
DObject *m_object = 0;
|
DObject *m_object = nullptr;
|
||||||
DiagramSceneModel *m_diagramSceneModel = 0;
|
DiagramSceneModel *m_diagramSceneModel = nullptr;
|
||||||
bool m_isSecondarySelected = false;
|
bool m_isSecondarySelected = false;
|
||||||
bool m_isFocusSelected = false;
|
bool m_isFocusSelected = false;
|
||||||
QString m_stereotypeIconId;
|
QString m_stereotypeIconId;
|
||||||
QString m_shapeIconId;
|
QString m_shapeIconId;
|
||||||
StereotypeIcon::Display m_stereotypeIconDisplay = StereotypeIcon::DisplayLabel;
|
StereotypeIcon::Display m_stereotypeIconDisplay = StereotypeIcon::DisplayLabel;
|
||||||
StereotypesItem *m_stereotypes = 0;
|
StereotypesItem *m_stereotypes = nullptr;
|
||||||
CustomIconItem *m_stereotypeIcon = 0;
|
CustomIconItem *m_stereotypeIcon = nullptr;
|
||||||
EditableTextItem *m_nameItem = 0;
|
EditableTextItem *m_nameItem = nullptr;
|
||||||
RectangularSelectionItem *m_selectionMarker = 0;
|
RectangularSelectionItem *m_selectionMarker = nullptr;
|
||||||
RelationStarter *m_relationStarter = 0;
|
RelationStarter *m_relationStarter = nullptr;
|
||||||
AlignButtonsItem *m_horizontalAlignButtons = 0;
|
AlignButtonsItem *m_horizontalAlignButtons = nullptr;
|
||||||
AlignButtonsItem *m_verticalAlignButtons = 0;
|
AlignButtonsItem *m_verticalAlignButtons = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ void PackageItem::update()
|
|||||||
} else if (m_customIcon) {
|
} else if (m_customIcon) {
|
||||||
m_customIcon->scene()->removeItem(m_customIcon);
|
m_customIcon->scene()->removeItem(m_customIcon);
|
||||||
delete m_customIcon;
|
delete m_customIcon;
|
||||||
m_customIcon = 0;
|
m_customIcon = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// shape
|
// shape
|
||||||
@@ -111,7 +111,7 @@ void PackageItem::update()
|
|||||||
} else if (m_shape) {
|
} else if (m_shape) {
|
||||||
m_shape->scene()->removeItem(m_shape);
|
m_shape->scene()->removeItem(m_shape);
|
||||||
delete m_shape;
|
delete m_shape;
|
||||||
m_shape = 0;
|
m_shape = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// stereotypes
|
// stereotypes
|
||||||
@@ -130,7 +130,7 @@ void PackageItem::update()
|
|||||||
} else if (m_contextLabel) {
|
} else if (m_contextLabel) {
|
||||||
m_contextLabel->scene()->removeItem(m_contextLabel);
|
m_contextLabel->scene()->removeItem(m_contextLabel);
|
||||||
delete m_contextLabel;
|
delete m_contextLabel;
|
||||||
m_contextLabel = 0;
|
m_contextLabel = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSelectionMarker(m_customIcon);
|
updateSelectionMarker(m_customIcon);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class PackageItem : public ObjectItem
|
|||||||
class ShapeGeometry;
|
class ShapeGeometry;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PackageItem(DPackage *package, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
PackageItem(DPackage *package, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = nullptr);
|
||||||
~PackageItem() override;
|
~PackageItem() override;
|
||||||
|
|
||||||
void update() override;
|
void update() override;
|
||||||
@@ -62,9 +62,9 @@ private:
|
|||||||
ShapeGeometry calcMinimumGeometry() const;
|
ShapeGeometry calcMinimumGeometry() const;
|
||||||
void updateGeometry();
|
void updateGeometry();
|
||||||
|
|
||||||
CustomIconItem *m_customIcon = 0;
|
CustomIconItem *m_customIcon = nullptr;
|
||||||
QGraphicsPolygonItem *m_shape = 0;
|
QGraphicsPolygonItem *m_shape = nullptr;
|
||||||
ContextLabelItem *m_contextLabel = 0;
|
ContextLabelItem *m_contextLabel = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -210,8 +210,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DiagramSceneModel *m_diagramSceneModel = 0;
|
DiagramSceneModel *m_diagramSceneModel = nullptr;
|
||||||
ArrowItem *m_arrow = 0;
|
ArrowItem *m_arrow = nullptr;
|
||||||
QList<QPointF> m_points;
|
QList<QPointF> m_points;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ void RelationItem::update(const Style *style)
|
|||||||
} else if (m_name) {
|
} else if (m_name) {
|
||||||
m_name->scene()->removeItem(m_name);
|
m_name->scene()->removeItem(m_name);
|
||||||
delete m_name;
|
delete m_name;
|
||||||
m_name = 0;
|
m_name = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_relation->stereotypes().isEmpty()) {
|
if (!m_relation->stereotypes().isEmpty()) {
|
||||||
@@ -492,7 +492,7 @@ void RelationItem::update(const Style *style)
|
|||||||
} else if (m_stereotypes) {
|
} else if (m_stereotypes) {
|
||||||
m_stereotypes->scene()->removeItem(m_stereotypes);
|
m_stereotypes->scene()->removeItem(m_stereotypes);
|
||||||
delete m_stereotypes;
|
delete m_stereotypes;
|
||||||
m_stereotypes = 0;
|
m_stereotypes = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSelected() || isSecondarySelected()) {
|
if (isSelected() || isSecondarySelected()) {
|
||||||
@@ -504,7 +504,7 @@ void RelationItem::update(const Style *style)
|
|||||||
if (m_selectionHandles->scene())
|
if (m_selectionHandles->scene())
|
||||||
m_selectionHandles->scene()->removeItem(m_selectionHandles);
|
m_selectionHandles->scene()->removeItem(m_selectionHandles);
|
||||||
delete m_selectionHandles;
|
delete m_selectionHandles;
|
||||||
m_selectionHandles = 0;
|
m_selectionHandles = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
setZValue((isSelected() || isSecondarySelected()) ? RELATION_ITEMS_ZVALUE_SELECTED : RELATION_ITEMS_ZVALUE);
|
setZValue((isSelected() || isSecondarySelected()) ? RELATION_ITEMS_ZVALUE_SELECTED : RELATION_ITEMS_ZVALUE);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class RelationItem :
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
RelationItem(DRelation *relation, DiagramSceneModel *diagramSceneModel,
|
RelationItem(DRelation *relation, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = nullptr);
|
||||||
~RelationItem() override;
|
~RelationItem() override;
|
||||||
|
|
||||||
DRelation *relation() const { return m_relation; }
|
DRelation *relation() const { return m_relation; }
|
||||||
@@ -94,16 +94,16 @@ private:
|
|||||||
QPointF calcEndPoint(const Uid &end, const QPointF &otherEndPos,
|
QPointF calcEndPoint(const Uid &end, const QPointF &otherEndPos,
|
||||||
int nearestIntermediatePointIndex);
|
int nearestIntermediatePointIndex);
|
||||||
|
|
||||||
DRelation *m_relation = 0;
|
DRelation *m_relation = nullptr;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DiagramSceneModel *m_diagramSceneModel = 0;
|
DiagramSceneModel *m_diagramSceneModel = nullptr;
|
||||||
bool m_isSecondarySelected = false;
|
bool m_isSecondarySelected = false;
|
||||||
bool m_isFocusSelected = false;
|
bool m_isFocusSelected = false;
|
||||||
ArrowItem *m_arrow = 0;
|
ArrowItem *m_arrow = nullptr;
|
||||||
QGraphicsSimpleTextItem *m_name = 0;
|
QGraphicsSimpleTextItem *m_name = nullptr;
|
||||||
StereotypesItem *m_stereotypes = 0;
|
StereotypesItem *m_stereotypes = nullptr;
|
||||||
PathSelectionItem *m_selectionHandles = 0;
|
PathSelectionItem *m_selectionHandles = nullptr;
|
||||||
static bool m_grabbedEndA;
|
static bool m_grabbedEndA;
|
||||||
static bool m_grabbedEndB;
|
static bool m_grabbedEndB;
|
||||||
static QPointF m_grabbedEndPos;
|
static QPointF m_grabbedEndPos;
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ public:
|
|||||||
void visitDItem(const DItem *item) override;
|
void visitDItem(const DItem *item) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ModelController *m_modelController = 0;
|
ModelController *m_modelController = nullptr;
|
||||||
StereotypeController *m_stereotypeController = 0;
|
StereotypeController *m_stereotypeController = nullptr;
|
||||||
DObject::StereotypeDisplay m_stereotypeDisplay = DObject::StereotypeNone;
|
DObject::StereotypeDisplay m_stereotypeDisplay = DObject::StereotypeNone;
|
||||||
QString m_stereotypeIconId;
|
QString m_stereotypeIconId;
|
||||||
QString m_shapeIconId;
|
QString m_shapeIconId;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class QMT_EXPORT LatchController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit LatchController(QObject *parent = 0);
|
explicit LatchController(QObject *parent = nullptr);
|
||||||
~LatchController() override;
|
~LatchController() override;
|
||||||
|
|
||||||
void setDiagramSceneModel(DiagramSceneModel *diagramSceneModel);
|
void setDiagramSceneModel(DiagramSceneModel *diagramSceneModel);
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
IAlignable::AlignType m_alignType = IAlignable::AlignLeft;
|
IAlignable::AlignType m_alignType = IAlignable::AlignLeft;
|
||||||
QString m_identifier;
|
QString m_identifier;
|
||||||
IAlignable *m_alignable = 0;
|
IAlignable *m_alignable = nullptr;
|
||||||
QGraphicsPixmapItem *m_pixmapItem = 0;
|
QGraphicsPixmapItem *m_pixmapItem = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
AlignButtonsItem::AlignButtonsItem(IAlignable *alignable, QGraphicsItem *parent)
|
AlignButtonsItem::AlignButtonsItem(IAlignable *alignable, QGraphicsItem *parent)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
VerticalDistanceToObejct = HorizontalDistanceToObject
|
VerticalDistanceToObejct = HorizontalDistanceToObject
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit AlignButtonsItem(IAlignable *alignable, QGraphicsItem *parent = 0);
|
explicit AlignButtonsItem(IAlignable *alignable, QGraphicsItem *parent = nullptr);
|
||||||
~AlignButtonsItem() override;
|
~AlignButtonsItem() override;
|
||||||
|
|
||||||
QRectF boundingRect() const override;
|
QRectF boundingRect() const override;
|
||||||
@@ -58,7 +58,7 @@ public:
|
|||||||
void addButton(IAlignable::AlignType alignType, const QString &identifier, qreal pos);
|
void addButton(IAlignable::AlignType alignType, const QString &identifier, qreal pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IAlignable *m_alignable = 0;
|
IAlignable *m_alignable = nullptr;
|
||||||
QList<AlignButtonItem *> m_alignItems;
|
QList<AlignButtonItem *> m_alignItems;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public:
|
|||||||
Vertical
|
Vertical
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit AlignLineItem(Direction direction, QGraphicsItem *parent = 0);
|
explicit AlignLineItem(Direction direction, QGraphicsItem *parent = nullptr);
|
||||||
~AlignLineItem() override;
|
~AlignLineItem() override;
|
||||||
|
|
||||||
void setLine(qreal pos);
|
void setLine(qreal pos);
|
||||||
@@ -45,11 +45,11 @@ public:
|
|||||||
|
|
||||||
QRectF boundingRect() const override;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
QWidget *widget = 0) override;
|
QWidget *widget = nullptr) override;
|
||||||
|
|
||||||
Direction m_direction = Horizontal;
|
Direction m_direction = Horizontal;
|
||||||
QGraphicsLineItem *m_alignLine = 0;
|
QGraphicsLineItem *m_alignLine = nullptr;
|
||||||
QGraphicsLineItem *m_highlightLine = 0;
|
QGraphicsLineItem *m_highlightLine = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ public:
|
|||||||
} else if (m_arrowItem) {
|
} else if (m_arrowItem) {
|
||||||
m_arrowItem->scene()->removeItem(m_arrowItem);
|
m_arrowItem->scene()->removeItem(m_arrowItem);
|
||||||
delete m_arrowItem;
|
delete m_arrowItem;
|
||||||
m_arrowItem = 0;
|
m_arrowItem = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasDiamond) {
|
if (hasDiamond) {
|
||||||
@@ -217,7 +217,7 @@ public:
|
|||||||
} else if (m_diamondItem) {
|
} else if (m_diamondItem) {
|
||||||
m_diamondItem->scene()->removeItem(m_diamondItem);
|
m_diamondItem->scene()->removeItem(m_diamondItem);
|
||||||
delete m_diamondItem;
|
delete m_diamondItem;
|
||||||
m_diamondItem = 0;
|
m_diamondItem = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,8 +225,8 @@ private:
|
|||||||
ArrowItem::Head m_head = ArrowItem::HeadNone;
|
ArrowItem::Head m_head = ArrowItem::HeadNone;
|
||||||
double m_arrowSize = 10.0;
|
double m_arrowSize = 10.0;
|
||||||
double m_diamondSize = 15.0;
|
double m_diamondSize = 15.0;
|
||||||
QGraphicsPathItem *m_arrowItem = 0;
|
QGraphicsPathItem *m_arrowItem = nullptr;
|
||||||
QGraphicsPathItem *m_diamondItem = 0;
|
QGraphicsPathItem *m_diamondItem = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ArrowItem::GraphicsShaftItem : public QGraphicsPathItem
|
class ArrowItem::GraphicsShaftItem : public QGraphicsPathItem
|
||||||
@@ -438,7 +438,7 @@ void ArrowItem::deleteHead(QGraphicsItem **headItem)
|
|||||||
if ((*headItem)->scene())
|
if ((*headItem)->scene())
|
||||||
(*headItem)->scene()->removeItem(*headItem);
|
(*headItem)->scene()->removeItem(*headItem);
|
||||||
delete *headItem;
|
delete *headItem;
|
||||||
*headItem = 0;
|
*headItem = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,7 +449,8 @@ void ArrowItem::updateHead(QGraphicsItem **headItem, Head head, const Style *sty
|
|||||||
} else if (head == HeadCustom) {
|
} else if (head == HeadCustom) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
} else {
|
} else {
|
||||||
QTC_ASSERT(*headItem == 0 || dynamic_cast<GraphicsHeadItem *>(*headItem) != 0, return);
|
QTC_ASSERT(headItem, return);
|
||||||
|
QTC_ASSERT(!*headItem || dynamic_cast<GraphicsHeadItem *>(*headItem), return);
|
||||||
GraphicsHeadItem *item;
|
GraphicsHeadItem *item;
|
||||||
if (!*headItem) {
|
if (!*headItem) {
|
||||||
item = new GraphicsHeadItem(this);
|
item = new GraphicsHeadItem(this);
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ public:
|
|||||||
HeadFilledDiamondFilledTriangle
|
HeadFilledDiamondFilledTriangle
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit ArrowItem(QGraphicsItem *parent = 0);
|
explicit ArrowItem(QGraphicsItem *parent = nullptr);
|
||||||
explicit ArrowItem(const ArrowItem &rhs, QGraphicsItem *parent = 0);
|
explicit ArrowItem(const ArrowItem &rhs, QGraphicsItem *parent = nullptr);
|
||||||
~ArrowItem() override;
|
~ArrowItem() override;
|
||||||
|
|
||||||
void setShaft(Shaft shaft);
|
void setShaft(Shaft shaft);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace qmt {
|
|||||||
class ContextLabelItem : public QGraphicsSimpleTextItem
|
class ContextLabelItem : public QGraphicsSimpleTextItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ContextLabelItem(QGraphicsItem *parent = 0);
|
explicit ContextLabelItem(QGraphicsItem *parent = nullptr);
|
||||||
~ContextLabelItem() override;
|
~ContextLabelItem() override;
|
||||||
|
|
||||||
void setMaxWidth(double maxWidth);
|
void setMaxWidth(double maxWidth);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class DiagramSceneModel;
|
|||||||
class CustomIconItem : public QGraphicsItem
|
class CustomIconItem : public QGraphicsItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit CustomIconItem(DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
|
explicit CustomIconItem(DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = nullptr);
|
||||||
~CustomIconItem() override;
|
~CustomIconItem() override;
|
||||||
|
|
||||||
void setStereotypeIconId(const QString &stereotypeIconId);
|
void setStereotypeIconId(const QString &stereotypeIconId);
|
||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DiagramSceneModel *m_diagramSceneModel = 0;
|
DiagramSceneModel *m_diagramSceneModel = nullptr;
|
||||||
QString m_stereotypeIconId;
|
QString m_stereotypeIconId;
|
||||||
StereotypeIcon m_stereotypeIcon;
|
StereotypeIcon m_stereotypeIcon;
|
||||||
QSizeF m_baseSize;
|
QSizeF m_baseSize;
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PathSelectionItem *m_owner = 0;
|
PathSelectionItem *m_owner = nullptr;
|
||||||
int m_pointIndex = -1;
|
int m_pointIndex = -1;
|
||||||
QSizeF m_pointSize;
|
QSizeF m_pointSize;
|
||||||
Selection m_selection = NotSelected;
|
Selection m_selection = NotSelected;
|
||||||
@@ -210,7 +210,7 @@ void PathSelectionItem::setPoints(const QList<QPointF> &points)
|
|||||||
QMT_ASSERT(points.size() >= 2, return);
|
QMT_ASSERT(points.size() >= 2, return);
|
||||||
prepareGeometryChange();
|
prepareGeometryChange();
|
||||||
|
|
||||||
GraphicsHandleItem *focusEndBItem = 0;
|
GraphicsHandleItem *focusEndBItem = nullptr;
|
||||||
if (!m_handles.isEmpty() && m_focusHandleItem == m_handles.last()) {
|
if (!m_handles.isEmpty() && m_focusHandleItem == m_handles.last()) {
|
||||||
focusEndBItem = m_focusHandleItem;
|
focusEndBItem = m_focusHandleItem;
|
||||||
m_handles.removeLast();
|
m_handles.removeLast();
|
||||||
@@ -222,7 +222,7 @@ void PathSelectionItem::setPoints(const QList<QPointF> &points)
|
|||||||
handle = focusEndBItem;
|
handle = focusEndBItem;
|
||||||
handle->setPointIndex(pointIndex);
|
handle->setPointIndex(pointIndex);
|
||||||
m_handles.insert(pointIndex, handle);
|
m_handles.insert(pointIndex, handle);
|
||||||
focusEndBItem = 0;
|
focusEndBItem = nullptr;
|
||||||
} else if (pointIndex >= m_handles.size()) {
|
} else if (pointIndex >= m_handles.size()) {
|
||||||
handle = new GraphicsHandleItem(pointIndex, this);
|
handle = new GraphicsHandleItem(pointIndex, this);
|
||||||
handle->setPointSize(m_pointSize);
|
handle->setPointSize(m_pointSize);
|
||||||
@@ -297,7 +297,7 @@ void PathSelectionItem::moveHandle(int pointIndex, const QPointF &deltaMove, Han
|
|||||||
m_windable->setHandlePos(pointIndex, newPos);
|
m_windable->setHandlePos(pointIndex, newPos);
|
||||||
if (handleStatus == Release) {
|
if (handleStatus == Release) {
|
||||||
m_windable->dropHandle(pointIndex, RASTER_WIDTH, RASTER_HEIGHT);
|
m_windable->dropHandle(pointIndex, RASTER_WIDTH, RASTER_HEIGHT);
|
||||||
m_focusHandleItem = 0;
|
m_focusHandleItem = nullptr;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class PathSelectionItem : public QGraphicsItem
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PathSelectionItem(IWindable *windable, QGraphicsItem *parent = 0);
|
explicit PathSelectionItem(IWindable *windable, QGraphicsItem *parent = nullptr);
|
||||||
~PathSelectionItem() override;
|
~PathSelectionItem() override;
|
||||||
|
|
||||||
QRectF boundingRect() const override;
|
QRectF boundingRect() const override;
|
||||||
@@ -72,11 +72,11 @@ private:
|
|||||||
HandleQualifier handleQualifier);
|
HandleQualifier handleQualifier);
|
||||||
void keyPressed(int pointIndex, QKeyEvent *event, const QPointF &pos);
|
void keyPressed(int pointIndex, QKeyEvent *event, const QPointF &pos);
|
||||||
|
|
||||||
IWindable *m_windable = 0;
|
IWindable *m_windable = nullptr;
|
||||||
QSizeF m_pointSize;
|
QSizeF m_pointSize;
|
||||||
bool m_isSecondarySelected = false;
|
bool m_isSecondarySelected = false;
|
||||||
QList<GraphicsHandleItem *> m_handles;
|
QList<GraphicsHandleItem *> m_handles;
|
||||||
GraphicsHandleItem *m_focusHandleItem = 0;
|
GraphicsHandleItem *m_focusHandleItem = nullptr;
|
||||||
QPointF m_originalHandlePos;
|
QPointF m_originalHandlePos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RectangularSelectionItem *m_owner = 0;
|
RectangularSelectionItem *m_owner = nullptr;
|
||||||
RectangularSelectionItem::Handle m_handle = RectangularSelectionItem::HandleNone;
|
RectangularSelectionItem::Handle m_handle = RectangularSelectionItem::HandleNone;
|
||||||
bool m_isSecondarySelected = false;
|
bool m_isSecondarySelected = false;
|
||||||
QPointF m_startPos;
|
QPointF m_startPos;
|
||||||
@@ -220,7 +220,7 @@ void RectangularSelectionItem::update()
|
|||||||
if (m_borderItem->scene())
|
if (m_borderItem->scene())
|
||||||
m_borderItem->scene()->removeItem(m_borderItem);
|
m_borderItem->scene()->removeItem(m_borderItem);
|
||||||
delete m_borderItem;
|
delete m_borderItem;
|
||||||
m_borderItem = 0;
|
m_borderItem = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public:
|
|||||||
FreedomKeepRatio
|
FreedomKeepRatio
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit RectangularSelectionItem(IResizable *itemResizer, QGraphicsItem *parent = 0);
|
explicit RectangularSelectionItem(IResizable *itemResizer, QGraphicsItem *parent = nullptr);
|
||||||
~RectangularSelectionItem() override;
|
~RectangularSelectionItem() override;
|
||||||
|
|
||||||
QRectF boundingRect() const override;
|
QRectF boundingRect() const override;
|
||||||
@@ -99,14 +99,14 @@ private:
|
|||||||
void moveHandle(Handle handle, const QPointF &deltaMove, HandleStatus handleStatus,
|
void moveHandle(Handle handle, const QPointF &deltaMove, HandleStatus handleStatus,
|
||||||
HandleQualifier handleQualifier);
|
HandleQualifier handleQualifier);
|
||||||
|
|
||||||
IResizable *m_itemResizer = 0;
|
IResizable *m_itemResizer = nullptr;
|
||||||
QRectF m_rect;
|
QRectF m_rect;
|
||||||
QSizeF m_pointSize;
|
QSizeF m_pointSize;
|
||||||
QVector<GraphicsHandleItem *> m_points;
|
QVector<GraphicsHandleItem *> m_points;
|
||||||
QPointF m_originalResizePos;
|
QPointF m_originalResizePos;
|
||||||
QRectF m_originalResizeRect;
|
QRectF m_originalResizeRect;
|
||||||
bool m_showBorder = false;
|
bool m_showBorder = false;
|
||||||
QGraphicsRectItem *m_borderItem = 0;
|
QGraphicsRectItem *m_borderItem = nullptr;
|
||||||
Freedom m_freedom = FreedomAny;
|
Freedom m_freedom = FreedomAny;
|
||||||
bool m_isSecondarySelected = false;
|
bool m_isSecondarySelected = false;
|
||||||
Handle m_activeHandle = HandleNone;
|
Handle m_activeHandle = HandleNone;
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ void RelationStarter::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
m_currentPreviewArrowIntermediatePoints);
|
m_currentPreviewArrowIntermediatePoints);
|
||||||
m_currentPreviewArrow->scene()->removeItem(m_currentPreviewArrow);
|
m_currentPreviewArrow->scene()->removeItem(m_currentPreviewArrow);
|
||||||
delete m_currentPreviewArrow;
|
delete m_currentPreviewArrow;
|
||||||
m_currentPreviewArrow = 0;
|
m_currentPreviewArrow = nullptr;
|
||||||
m_currentPreviewArrowIntermediatePoints.clear();
|
m_currentPreviewArrowIntermediatePoints.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -157,7 +157,7 @@ void RelationStarter::focusOutEvent(QFocusEvent *event)
|
|||||||
if (m_currentPreviewArrow) {
|
if (m_currentPreviewArrow) {
|
||||||
m_currentPreviewArrow->scene()->removeItem(m_currentPreviewArrow);
|
m_currentPreviewArrow->scene()->removeItem(m_currentPreviewArrow);
|
||||||
delete m_currentPreviewArrow;
|
delete m_currentPreviewArrow;
|
||||||
m_currentPreviewArrow = 0;
|
m_currentPreviewArrow = nullptr;
|
||||||
m_currentPreviewArrowIntermediatePoints.clear();
|
m_currentPreviewArrowIntermediatePoints.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,12 +40,12 @@ class RelationStarter : public QGraphicsRectItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RelationStarter(IRelationable *owner, DiagramSceneModel *diagramSceneModel,
|
RelationStarter(IRelationable *owner, DiagramSceneModel *diagramSceneModel,
|
||||||
QGraphicsItem *parent = 0);
|
QGraphicsItem *parent = nullptr);
|
||||||
~RelationStarter() override;
|
~RelationStarter() override;
|
||||||
|
|
||||||
QRectF boundingRect() const override;
|
QRectF boundingRect() const override;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
QWidget *widget = 0) override;
|
QWidget *widget = nullptr) override;
|
||||||
|
|
||||||
void addArrow(const QString &id, ArrowItem::Shaft shaft, ArrowItem::Head startHead,
|
void addArrow(const QString &id, ArrowItem::Shaft shaft, ArrowItem::Head startHead,
|
||||||
ArrowItem::Head endHead,
|
ArrowItem::Head endHead,
|
||||||
@@ -61,11 +61,11 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void updateCurrentPreviewArrow(const QPointF &headPoint);
|
void updateCurrentPreviewArrow(const QPointF &headPoint);
|
||||||
|
|
||||||
IRelationable *m_owner = 0;
|
IRelationable *m_owner = nullptr;
|
||||||
DiagramSceneModel *m_diagramSceneModel = 0;
|
DiagramSceneModel *m_diagramSceneModel = nullptr;
|
||||||
QList<ArrowItem *> m_arrows;
|
QList<ArrowItem *> m_arrows;
|
||||||
QHash<ArrowItem *, QString> m_arrowIds;
|
QHash<ArrowItem *, QString> m_arrowIds;
|
||||||
ArrowItem *m_currentPreviewArrow = 0;
|
ArrowItem *m_currentPreviewArrow = nullptr;
|
||||||
QString m_currentPreviewArrowId;
|
QString m_currentPreviewArrowId;
|
||||||
QList<QPointF> m_currentPreviewArrowIntermediatePoints;
|
QList<QPointF> m_currentPreviewArrowIntermediatePoints;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace qmt {
|
|||||||
class StereotypesItem : public QGraphicsSimpleTextItem
|
class StereotypesItem : public QGraphicsSimpleTextItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit StereotypesItem(QGraphicsItem *parent = 0);
|
explicit StereotypesItem(QGraphicsItem *parent = nullptr);
|
||||||
~StereotypesItem() override;
|
~StereotypesItem() override;
|
||||||
|
|
||||||
void setStereotypes(const QList<QString> &stereotypes);
|
void setStereotypes(const QList<QString> &stereotypes);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace qmt {
|
|||||||
class TemplateParameterBox : public QGraphicsRectItem
|
class TemplateParameterBox : public QGraphicsRectItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit TemplateParameterBox(QGraphicsItem *parent = 0);
|
explicit TemplateParameterBox(QGraphicsItem *parent = nullptr);
|
||||||
~TemplateParameterBox() override;
|
~TemplateParameterBox() override;
|
||||||
|
|
||||||
void setFont(const QFont &font);
|
void setFont(const QFont &font);
|
||||||
@@ -46,7 +46,7 @@ private:
|
|||||||
|
|
||||||
QList<QString> m_templateParameters;
|
QList<QString> m_templateParameters;
|
||||||
bool m_breakLines = false;
|
bool m_breakLines = false;
|
||||||
QGraphicsSimpleTextItem *m_parametersText = 0;
|
QGraphicsSimpleTextItem *m_parametersText = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -65,11 +65,11 @@ DiagramsManager::ManagedDiagram::~ManagedDiagram()
|
|||||||
|
|
||||||
DiagramsManager::DiagramsManager(QObject *parent)
|
DiagramsManager::DiagramsManager(QObject *parent)
|
||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
m_diagramsView(0),
|
m_diagramsView(nullptr),
|
||||||
m_diagramController(0),
|
m_diagramController(nullptr),
|
||||||
m_diagramSceneController(0),
|
m_diagramSceneController(nullptr),
|
||||||
m_styleController(0),
|
m_styleController(nullptr),
|
||||||
m_stereotypeController(0)
|
m_stereotypeController(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ DiagramsManager::~DiagramsManager()
|
|||||||
void DiagramsManager::setModel(TreeModel *model)
|
void DiagramsManager::setModel(TreeModel *model)
|
||||||
{
|
{
|
||||||
if (m_model)
|
if (m_model)
|
||||||
connect(m_model, 0, this, 0);
|
connect(m_model, nullptr, this, nullptr);
|
||||||
m_model = model;
|
m_model = model;
|
||||||
if (model) {
|
if (model) {
|
||||||
connect(model, &QAbstractItemModel::dataChanged,
|
connect(model, &QAbstractItemModel::dataChanged,
|
||||||
@@ -97,7 +97,7 @@ void DiagramsManager::setDiagramsView(DiagramsViewInterface *diagramsView)
|
|||||||
void DiagramsManager::setDiagramController(DiagramController *diagramController)
|
void DiagramsManager::setDiagramController(DiagramController *diagramController)
|
||||||
{
|
{
|
||||||
if (m_diagramController)
|
if (m_diagramController)
|
||||||
connect(m_diagramController, 0, this, 0);
|
connect(m_diagramController, nullptr, this, nullptr);
|
||||||
m_diagramController = diagramController;
|
m_diagramController = diagramController;
|
||||||
if (diagramController) {
|
if (diagramController) {
|
||||||
connect(diagramController, &DiagramController::diagramAboutToBeRemoved,
|
connect(diagramController, &DiagramController::diagramAboutToBeRemoved,
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class QMT_EXPORT DiagramsManager : public QObject
|
|||||||
class ManagedDiagram;
|
class ManagedDiagram;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DiagramsManager(QObject *parent = 0);
|
explicit DiagramsManager(QObject *parent = nullptr);
|
||||||
~DiagramsManager() override;
|
~DiagramsManager() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ IMoveable *SceneInspector::moveable(const DElement *element, const MDiagram *dia
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
QMT_CHECK(false);
|
QMT_CHECK(false);
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
IResizable *SceneInspector::resizable(const DElement *element, const MDiagram *diagram) const
|
IResizable *SceneInspector::resizable(const DElement *element, const MDiagram *diagram) const
|
||||||
@@ -102,7 +102,7 @@ IResizable *SceneInspector::resizable(const DElement *element, const MDiagram *d
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
QMT_CHECK(false);
|
QMT_CHECK(false);
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace qmt
|
} // namespace qmt
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class DiagramsManager;
|
|||||||
class QMT_EXPORT SceneInspector : public QObject, public ISceneInspector
|
class QMT_EXPORT SceneInspector : public QObject, public ISceneInspector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit SceneInspector(QObject *parent = 0);
|
explicit SceneInspector(QObject *parent = nullptr);
|
||||||
~SceneInspector() override;
|
~SceneInspector() override;
|
||||||
|
|
||||||
void setDiagramsManager(DiagramsManager *diagramsManager);
|
void setDiagramsManager(DiagramsManager *diagramsManager);
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ MDiagram *DiagramsView::diagram(int tabIndex) const
|
|||||||
MDiagram *DiagramsView::diagram(DiagramView *diagramView) const
|
MDiagram *DiagramsView::diagram(DiagramView *diagramView) const
|
||||||
{
|
{
|
||||||
if (!diagramView || diagramView->diagramSceneModel())
|
if (!diagramView || diagramView->diagramSceneModel())
|
||||||
return 0;
|
return nullptr;
|
||||||
return diagramView->diagramSceneModel()->diagram();
|
return diagramView->diagramSceneModel()->diagram();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class QMT_EXPORT DiagramsView : public QTabWidget, public DiagramsViewInterface
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DiagramsView(QWidget *parent = 0);
|
explicit DiagramsView(QWidget *parent = nullptr);
|
||||||
~DiagramsView() override;
|
~DiagramsView() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ DiagramSceneModel *DiagramView::diagramSceneModel() const
|
|||||||
|
|
||||||
void DiagramView::setDiagramSceneModel(DiagramSceneModel *diagramSceneModel)
|
void DiagramView::setDiagramSceneModel(DiagramSceneModel *diagramSceneModel)
|
||||||
{
|
{
|
||||||
setScene(0);
|
setScene(nullptr);
|
||||||
m_diagramSceneModel = diagramSceneModel;
|
m_diagramSceneModel = diagramSceneModel;
|
||||||
if (diagramSceneModel) {
|
if (diagramSceneModel) {
|
||||||
setScene(m_diagramSceneModel->graphicsScene());
|
setScene(m_diagramSceneModel->graphicsScene());
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ MDiagram *StackedDiagramsView::diagram(int tabIndex) const
|
|||||||
MDiagram *StackedDiagramsView::diagram(DiagramView *diagramView) const
|
MDiagram *StackedDiagramsView::diagram(DiagramView *diagramView) const
|
||||||
{
|
{
|
||||||
if (!diagramView || !diagramView->diagramSceneModel())
|
if (!diagramView || !diagramView->diagramSceneModel())
|
||||||
return 0;
|
return nullptr;
|
||||||
return diagramView->diagramSceneModel()->diagram();
|
return diagramView->diagramSceneModel()->diagram();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class QMT_EXPORT StackedDiagramsView : public QStackedWidget, public DiagramsVie
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StackedDiagramsView(QWidget *parent = 0);
|
explicit StackedDiagramsView(QWidget *parent = nullptr);
|
||||||
~StackedDiagramsView() override;
|
~StackedDiagramsView() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -273,8 +273,8 @@ MDiagram *DocumentController::findOrCreateRootDiagram()
|
|||||||
void DocumentController::createNewProject(const QString &fileName)
|
void DocumentController::createNewProject(const QString &fileName)
|
||||||
{
|
{
|
||||||
m_diagramsManager->removeAllDiagrams();
|
m_diagramsManager->removeAllDiagrams();
|
||||||
m_treeModel->setModelController(0);
|
m_treeModel->setModelController(nullptr);
|
||||||
m_modelController->setRootPackage(0);
|
m_modelController->setRootPackage(nullptr);
|
||||||
m_undoController->reset();
|
m_undoController->reset();
|
||||||
|
|
||||||
m_projectController->newProject(fileName);
|
m_projectController->newProject(fileName);
|
||||||
@@ -286,8 +286,8 @@ void DocumentController::createNewProject(const QString &fileName)
|
|||||||
void DocumentController::loadProject(const QString &fileName)
|
void DocumentController::loadProject(const QString &fileName)
|
||||||
{
|
{
|
||||||
m_diagramsManager->removeAllDiagrams();
|
m_diagramsManager->removeAllDiagrams();
|
||||||
m_treeModel->setModelController(0);
|
m_treeModel->setModelController(nullptr);
|
||||||
m_modelController->setRootPackage(0);
|
m_modelController->setRootPackage(nullptr);
|
||||||
m_undoController->reset();
|
m_undoController->reset();
|
||||||
|
|
||||||
m_projectController->newProject(fileName);
|
m_projectController->newProject(fileName);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class QMT_EXPORT DocumentController : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DocumentController(QObject *parent = 0);
|
explicit DocumentController(QObject *parent = nullptr);
|
||||||
~DocumentController() override;
|
~DocumentController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ namespace qmt {
|
|||||||
class QMT_EXPORT ContextMenuAction : public QAction
|
class QMT_EXPORT ContextMenuAction : public QAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ContextMenuAction(const QString &label, const QString &id, QObject *parent = 0);
|
ContextMenuAction(const QString &label, const QString &id, QObject *parent = nullptr);
|
||||||
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 = nullptr);
|
||||||
~ContextMenuAction() override;
|
~ContextMenuAction() override;
|
||||||
|
|
||||||
QString id() const { return m_id; }
|
QString id() const { return m_id; }
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
static QLineF stretch(const QLineF &line, double p1Extension, double p2Extension);
|
static QLineF stretch(const QLineF &line, double p1Extension, double p2Extension);
|
||||||
static bool intersect(const QPolygonF &polygon, const QLineF &line,
|
static bool intersect(const QPolygonF &polygon, const QLineF &line,
|
||||||
QPointF *intersectionPoint, QLineF *intersectionLine = 0);
|
QPointF *intersectionPoint, QLineF *intersectionLine = nullptr);
|
||||||
static bool placeRectAtLine(const QRectF &rect, const QLineF &line, double lineOffset,
|
static bool placeRectAtLine(const QRectF &rect, const QLineF &line, double lineOffset,
|
||||||
double distance, const QLineF &intersectionLine, QPointF *placement,
|
double distance, const QLineF &intersectionLine, QPointF *placement,
|
||||||
Side *horizontalAlignedSide);
|
Side *horizontalAlignedSide);
|
||||||
|
|||||||
@@ -42,13 +42,13 @@ public:
|
|||||||
Handle(const Handle<U> &rhs) : m_uid(rhs.uid()), m_target(rhs.target()) { }
|
Handle(const Handle<U> &rhs) : m_uid(rhs.uid()), m_target(rhs.target()) { }
|
||||||
|
|
||||||
bool isNull() const { return !m_uid.isValid(); }
|
bool isNull() const { return !m_uid.isValid(); }
|
||||||
bool hasTarget() const { return m_target != 0; }
|
bool hasTarget() const { return m_target != nullptr; }
|
||||||
Uid uid() const { return m_uid; }
|
Uid uid() const { return m_uid; }
|
||||||
T *target() const { return m_target; }
|
T *target() const { return m_target; }
|
||||||
|
|
||||||
void setUid(const Uid &uid)
|
void setUid(const Uid &uid)
|
||||||
{
|
{
|
||||||
QMT_CHECK(m_target != 0 ? (m_target->uid() == uid) : true);
|
QMT_CHECK(m_target ? (m_target->uid() == uid) : true);
|
||||||
m_uid = uid;
|
m_uid = uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,14 +61,14 @@ public:
|
|||||||
void clear()
|
void clear()
|
||||||
{
|
{
|
||||||
m_uid = Uid();
|
m_uid = Uid();
|
||||||
m_target = 0;
|
m_target = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearTarget() { m_target = 0; }
|
void clearTarget() { m_target = nullptr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Uid m_uid;
|
Uid m_uid;
|
||||||
T *m_target = 0;
|
T *m_target = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public:
|
|||||||
if (handle.uid() == uid)
|
if (handle.uid() == uid)
|
||||||
return handle.target();
|
return handle.target();
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
T *at(int index) const
|
T *at(int index) const
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ class QCompressedDevice : public QIODevice
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit QCompressedDevice(QObject *parent = 0);
|
explicit QCompressedDevice(QObject *parent = nullptr);
|
||||||
explicit QCompressedDevice(QIODevice *targetDevice, QObject *parent = 0);
|
explicit QCompressedDevice(QIODevice *targetDevice, QObject *parent = nullptr);
|
||||||
~QCompressedDevice() override;
|
~QCompressedDevice() override;
|
||||||
|
|
||||||
QIODevice *targetDevice() const { return m_targetDevice; }
|
QIODevice *targetDevice() const { return m_targetDevice; }
|
||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
qint64 flush();
|
qint64 flush();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QIODevice *m_targetDevice = 0;
|
QIODevice *m_targetDevice = nullptr;
|
||||||
QByteArray m_buffer;
|
QByteArray m_buffer;
|
||||||
qint64 m_bytesInBuffer = 0;
|
qint64 m_bytesInBuffer = 0;
|
||||||
qint64 m_indexInBuffer = 0;
|
qint64 m_indexInBuffer = 0;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ DElement *MDiagram::findDiagramElement(const Uid &key) const
|
|||||||
if (element->uid() == key)
|
if (element->uid() == key)
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MDiagram::setDiagramElements(const QList<DElement *> &elements)
|
void MDiagram::setDiagramElements(const QList<DElement *> &elements)
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Uid m_uid;
|
Uid m_uid;
|
||||||
MObject *m_owner = 0;
|
MObject *m_owner = nullptr;
|
||||||
MExpansion *m_expansion = 0;
|
MExpansion *m_expansion = nullptr;
|
||||||
QList<QString> m_stereotypes;
|
QList<QString> m_stereotypes;
|
||||||
Flags m_flags = 0;
|
Flags m_flags = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ void MObject::addChild(const Uid &uid)
|
|||||||
void MObject::addChild(MObject *child)
|
void MObject::addChild(MObject *child)
|
||||||
{
|
{
|
||||||
QMT_ASSERT(child, return);
|
QMT_ASSERT(child, return);
|
||||||
QMT_ASSERT(child->owner() == 0, return);
|
QMT_ASSERT(!child->owner(), return);
|
||||||
m_children.add(child);
|
m_children.add(child);
|
||||||
child->setOwner(this);
|
child->setOwner(this);
|
||||||
}
|
}
|
||||||
@@ -96,7 +96,7 @@ void MObject::insertChild(int beforeIndex, const Uid &uid)
|
|||||||
void MObject::insertChild(int beforeIndex, MObject *child)
|
void MObject::insertChild(int beforeIndex, MObject *child)
|
||||||
{
|
{
|
||||||
QMT_ASSERT(child, return);
|
QMT_ASSERT(child, return);
|
||||||
QMT_ASSERT(child->owner() == 0, return);
|
QMT_ASSERT(!child->owner(), return);
|
||||||
m_children.insert(beforeIndex, child);
|
m_children.insert(beforeIndex, child);
|
||||||
child->setOwner(this);
|
child->setOwner(this);
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ void MObject::removeChild(const Uid &uid)
|
|||||||
QMT_ASSERT(m_children.contains(uid), return);
|
QMT_ASSERT(m_children.contains(uid), return);
|
||||||
MObject *child = m_children.find(uid);
|
MObject *child = m_children.find(uid);
|
||||||
if (child)
|
if (child)
|
||||||
child->setOwner(0);
|
child->setOwner(nullptr);
|
||||||
m_children.remove(uid);
|
m_children.remove(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ void MObject::removeChild(MObject *child)
|
|||||||
{
|
{
|
||||||
QMT_ASSERT(child, return);
|
QMT_ASSERT(child, return);
|
||||||
QMT_ASSERT(m_children.contains(child), return);
|
QMT_ASSERT(m_children.contains(child), return);
|
||||||
child->setOwner(0);
|
child->setOwner(nullptr);
|
||||||
m_children.remove(child);
|
m_children.remove(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ void MObject::decontrolChild(const Uid &uid)
|
|||||||
QMT_ASSERT(m_children.contains(uid), return);
|
QMT_ASSERT(m_children.contains(uid), return);
|
||||||
MObject *child = m_children.find(uid);
|
MObject *child = m_children.find(uid);
|
||||||
if (child)
|
if (child)
|
||||||
child->setOwner(0);
|
child->setOwner(nullptr);
|
||||||
m_children.take(uid);
|
m_children.take(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ void MObject::decontrolChild(MObject *child)
|
|||||||
{
|
{
|
||||||
QMT_ASSERT(child, return);
|
QMT_ASSERT(child, return);
|
||||||
QMT_ASSERT(m_children.contains(child), return);
|
QMT_ASSERT(m_children.contains(child), return);
|
||||||
child->setOwner(0);
|
child->setOwner(nullptr);
|
||||||
m_children.take(child);
|
m_children.take(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ void MObject::addRelation(const Uid &uid)
|
|||||||
void MObject::addRelation(MRelation *relation)
|
void MObject::addRelation(MRelation *relation)
|
||||||
{
|
{
|
||||||
QMT_ASSERT(relation, return);
|
QMT_ASSERT(relation, return);
|
||||||
QMT_ASSERT(relation->owner() == 0, return);
|
QMT_ASSERT(!relation->owner(), return);
|
||||||
relation->setOwner(this);
|
relation->setOwner(this);
|
||||||
m_relations.add(relation);
|
m_relations.add(relation);
|
||||||
}
|
}
|
||||||
@@ -160,7 +160,7 @@ void MObject::addRelation(MRelation *relation)
|
|||||||
void MObject::insertRelation(int beforeIndex, MRelation *relation)
|
void MObject::insertRelation(int beforeIndex, MRelation *relation)
|
||||||
{
|
{
|
||||||
QMT_ASSERT(relation, return);
|
QMT_ASSERT(relation, return);
|
||||||
QMT_ASSERT(relation->owner() == 0, return);
|
QMT_ASSERT(!relation->owner(), return);
|
||||||
relation->setOwner(this);
|
relation->setOwner(this);
|
||||||
m_relations.insert(beforeIndex, relation);
|
m_relations.insert(beforeIndex, relation);
|
||||||
}
|
}
|
||||||
@@ -168,14 +168,14 @@ void MObject::insertRelation(int beforeIndex, MRelation *relation)
|
|||||||
void MObject::removeRelation(MRelation *relation)
|
void MObject::removeRelation(MRelation *relation)
|
||||||
{
|
{
|
||||||
QMT_ASSERT(relation, return);
|
QMT_ASSERT(relation, return);
|
||||||
relation->setOwner(0);
|
relation->setOwner(nullptr);
|
||||||
m_relations.remove(relation);
|
m_relations.remove(relation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MObject::decontrolRelation(MRelation *relation)
|
void MObject::decontrolRelation(MRelation *relation)
|
||||||
{
|
{
|
||||||
QMT_ASSERT(relation, return);
|
QMT_ASSERT(relation, return);
|
||||||
relation->setOwner(0);
|
relation->setOwner(nullptr);
|
||||||
m_relations.take(relation);
|
m_relations.take(relation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
namespace qmt {
|
namespace qmt {
|
||||||
|
|
||||||
MCloneVisitor::MCloneVisitor()
|
MCloneVisitor::MCloneVisitor()
|
||||||
: m_cloned(0)
|
: m_cloned(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ void MCloneVisitor::visitMConnection(const MConnection *connection)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MCloneDeepVisitor::MCloneDeepVisitor()
|
MCloneDeepVisitor::MCloneDeepVisitor()
|
||||||
: m_cloned(0)
|
: m_cloned(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
Uid m_elementKey;
|
Uid m_elementKey;
|
||||||
Uid m_ownerKey;
|
Uid m_ownerKey;
|
||||||
int m_indexOfElement = -1;
|
int m_indexOfElement = -1;
|
||||||
MElement *m_clonedElement = 0;
|
MElement *m_clonedElement = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModelController::UpdateObjectCommand : public UndoCommand
|
class ModelController::UpdateObjectCommand : public UndoCommand
|
||||||
@@ -121,8 +121,8 @@ private:
|
|||||||
m_modelController->verifyModelIntegrity();
|
m_modelController->verifyModelIntegrity();
|
||||||
}
|
}
|
||||||
|
|
||||||
ModelController *m_modelController = 0;
|
ModelController *m_modelController = nullptr;
|
||||||
MObject *m_object = 0;
|
MObject *m_object = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModelController::UpdateRelationCommand :
|
class ModelController::UpdateRelationCommand :
|
||||||
@@ -191,8 +191,8 @@ private:
|
|||||||
m_modelController->verifyModelIntegrity();
|
m_modelController->verifyModelIntegrity();
|
||||||
}
|
}
|
||||||
|
|
||||||
ModelController *m_modelController = 0;
|
ModelController *m_modelController = nullptr;
|
||||||
MRelation *m_relation = 0;
|
MRelation *m_relation = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModelController::AddElementsCommand : public UndoCommand
|
class ModelController::AddElementsCommand : public UndoCommand
|
||||||
@@ -239,7 +239,7 @@ public:
|
|||||||
QMT_CHECK(object);
|
QMT_CHECK(object);
|
||||||
m_modelController->mapObject(object);
|
m_modelController->mapObject(object);
|
||||||
owner->insertChild(clone.m_indexOfElement, object);
|
owner->insertChild(clone.m_indexOfElement, object);
|
||||||
clone.m_clonedElement = 0;
|
clone.m_clonedElement = nullptr;
|
||||||
emit m_modelController->endInsertObject(clone.m_indexOfElement, owner);
|
emit m_modelController->endInsertObject(clone.m_indexOfElement, owner);
|
||||||
inserted = true;
|
inserted = true;
|
||||||
break;
|
break;
|
||||||
@@ -251,7 +251,7 @@ public:
|
|||||||
QMT_CHECK(relation);
|
QMT_CHECK(relation);
|
||||||
m_modelController->mapRelation(relation);
|
m_modelController->mapRelation(relation);
|
||||||
owner->insertRelation(clone.m_indexOfElement, relation);
|
owner->insertRelation(clone.m_indexOfElement, relation);
|
||||||
clone.m_clonedElement = 0;
|
clone.m_clonedElement = nullptr;
|
||||||
emit m_modelController->endInsertRelation(clone.m_indexOfElement, owner);
|
emit m_modelController->endInsertRelation(clone.m_indexOfElement, owner);
|
||||||
inserted = true;
|
inserted = true;
|
||||||
break;
|
break;
|
||||||
@@ -321,7 +321,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ModelController *m_modelController = 0;
|
ModelController *m_modelController = nullptr;
|
||||||
QList<ModelController::Clone> m_clonedElements;
|
QList<ModelController::Clone> m_clonedElements;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ public:
|
|||||||
QMT_CHECK(object);
|
QMT_CHECK(object);
|
||||||
m_modelController->mapObject(object);
|
m_modelController->mapObject(object);
|
||||||
owner->insertChild(clone.m_indexOfElement, object);
|
owner->insertChild(clone.m_indexOfElement, object);
|
||||||
clone.m_clonedElement = 0;
|
clone.m_clonedElement = nullptr;
|
||||||
emit m_modelController->endInsertObject(clone.m_indexOfElement, owner);
|
emit m_modelController->endInsertObject(clone.m_indexOfElement, owner);
|
||||||
inserted = true;
|
inserted = true;
|
||||||
break;
|
break;
|
||||||
@@ -447,7 +447,7 @@ public:
|
|||||||
QMT_CHECK(relation);
|
QMT_CHECK(relation);
|
||||||
m_modelController->mapRelation(relation);
|
m_modelController->mapRelation(relation);
|
||||||
owner->insertRelation(clone.m_indexOfElement, relation);
|
owner->insertRelation(clone.m_indexOfElement, relation);
|
||||||
clone.m_clonedElement = 0;
|
clone.m_clonedElement = nullptr;
|
||||||
emit m_modelController->endInsertRelation(clone.m_indexOfElement, owner);
|
emit m_modelController->endInsertRelation(clone.m_indexOfElement, owner);
|
||||||
inserted = true;
|
inserted = true;
|
||||||
break;
|
break;
|
||||||
@@ -464,7 +464,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ModelController *m_modelController = 0;
|
ModelController *m_modelController = nullptr;
|
||||||
QList<ModelController::Clone> m_clonedElements;
|
QList<ModelController::Clone> m_clonedElements;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -518,7 +518,7 @@ private:
|
|||||||
m_modelController->verifyModelIntegrity();
|
m_modelController->verifyModelIntegrity();
|
||||||
}
|
}
|
||||||
|
|
||||||
ModelController *m_modelController = 0;
|
ModelController *m_modelController = nullptr;
|
||||||
Uid m_objectKey;
|
Uid m_objectKey;
|
||||||
Uid m_ownerKey;
|
Uid m_ownerKey;
|
||||||
int m_indexOfElement = -1;
|
int m_indexOfElement = -1;
|
||||||
@@ -574,7 +574,7 @@ private:
|
|||||||
m_modelController->verifyModelIntegrity();
|
m_modelController->verifyModelIntegrity();
|
||||||
}
|
}
|
||||||
|
|
||||||
ModelController *m_modelController = 0;
|
ModelController *m_modelController = nullptr;
|
||||||
Uid m_relationKey;
|
Uid m_relationKey;
|
||||||
Uid m_ownerKey;
|
Uid m_ownerKey;
|
||||||
int m_indexOfElement = -1;
|
int m_indexOfElement = -1;
|
||||||
@@ -582,8 +582,8 @@ private:
|
|||||||
|
|
||||||
ModelController::ModelController(QObject *parent)
|
ModelController::ModelController(QObject *parent)
|
||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
m_rootPackage(0),
|
m_rootPackage(nullptr),
|
||||||
m_undoController(0),
|
m_undoController(nullptr),
|
||||||
m_isResettingModel(false)
|
m_isResettingModel(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -622,7 +622,7 @@ MElement *ModelController::findElement(const Uid &key)
|
|||||||
return object;
|
return object;
|
||||||
else if (MRelation *relation = findRelation(key))
|
else if (MRelation *relation = findRelation(key))
|
||||||
return relation;
|
return relation;
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelController::startResetModel()
|
void ModelController::startResetModel()
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class QMT_EXPORT ModelController : public QObject
|
|||||||
class MoveRelationCommand;
|
class MoveRelationCommand;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ModelController(QObject *parent = 0);
|
explicit ModelController(QObject *parent = nullptr);
|
||||||
~ModelController() override;
|
~ModelController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class QMT_EXPORT SortedTreeModel : public QSortFilterProxyModel
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SortedTreeModel(QObject *parent = 0);
|
explicit SortedTreeModel(QObject *parent = nullptr);
|
||||||
~SortedTreeModel() override;
|
~SortedTreeModel() override;
|
||||||
|
|
||||||
TreeModel *treeModel() const { return m_treeModel; }
|
TreeModel *treeModel() const { return m_treeModel; }
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class QMT_EXPORT StereotypesController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StereotypesController(QObject *parent = 0);
|
explicit StereotypesController(QObject *parent = nullptr);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void parseError(const QString &stereotypes);
|
void parseError(const QString &stereotypes);
|
||||||
|
|||||||
@@ -199,8 +199,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TreeModel *m_treeModel = 0;
|
TreeModel *m_treeModel = nullptr;
|
||||||
TreeModel::ModelItem *m_item = 0;
|
TreeModel::ModelItem *m_item = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TreeModel::ItemUpdater : public MConstVisitor
|
class TreeModel::ItemUpdater : public MConstVisitor
|
||||||
@@ -304,8 +304,8 @@ private:
|
|||||||
void updateObjectLabel(const MObject *object);
|
void updateObjectLabel(const MObject *object);
|
||||||
void updateRelationLabel(const MRelation *relation);
|
void updateRelationLabel(const MRelation *relation);
|
||||||
|
|
||||||
TreeModel *m_treeModel = 0;
|
TreeModel *m_treeModel = nullptr;
|
||||||
TreeModel::ModelItem *m_item = 0;
|
TreeModel::ModelItem *m_item = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
void TreeModel::ItemUpdater::updateObjectLabel(const MObject *object)
|
void TreeModel::ItemUpdater::updateObjectLabel(const MObject *object)
|
||||||
@@ -339,7 +339,7 @@ void TreeModel::setModelController(ModelController *modelController)
|
|||||||
{
|
{
|
||||||
if (m_modelController != modelController) {
|
if (m_modelController != modelController) {
|
||||||
if (m_modelController)
|
if (m_modelController)
|
||||||
disconnect(m_modelController, 0, this, 0);
|
disconnect(m_modelController, nullptr, this, nullptr);
|
||||||
m_modelController = modelController;
|
m_modelController = modelController;
|
||||||
if (m_modelController) {
|
if (m_modelController) {
|
||||||
connect(m_modelController, &ModelController::beginResetModel,
|
connect(m_modelController, &ModelController::beginResetModel,
|
||||||
@@ -401,7 +401,7 @@ MElement *TreeModel::element(const QModelIndex &index) const
|
|||||||
{
|
{
|
||||||
QMT_CHECK(index.isValid());
|
QMT_CHECK(index.isValid());
|
||||||
|
|
||||||
MElement *element = 0;
|
MElement *element = nullptr;
|
||||||
QStandardItem *item = itemFromIndex(index);
|
QStandardItem *item = itemFromIndex(index);
|
||||||
if (item) {
|
if (item) {
|
||||||
if (item->parent()) {
|
if (item->parent()) {
|
||||||
@@ -736,7 +736,7 @@ void TreeModel::onModelDataChanged(const QModelIndex &topleft, const QModelIndex
|
|||||||
void TreeModel::clear()
|
void TreeModel::clear()
|
||||||
{
|
{
|
||||||
QStandardItemModel::clear();
|
QStandardItemModel::clear();
|
||||||
m_rootItem = 0;
|
m_rootItem = nullptr;
|
||||||
m_objectToItemMap.clear();
|
m_objectToItemMap.clear();
|
||||||
m_itemToObjectMap.clear();
|
m_itemToObjectMap.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public:
|
|||||||
RoleItemType = Qt::UserRole + 1
|
RoleItemType = Qt::UserRole + 1
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit TreeModel(QObject *parent = 0);
|
explicit TreeModel(QObject *parent = nullptr);
|
||||||
~TreeModel() override;
|
~TreeModel() override;
|
||||||
|
|
||||||
ModelController *modelController() const { return m_modelController; }
|
ModelController *modelController() const { return m_modelController; }
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ bool TreeModelManager::isRootPackageSelected() const
|
|||||||
|
|
||||||
MObject *TreeModelManager::selectedObject() const
|
MObject *TreeModelManager::selectedObject() const
|
||||||
{
|
{
|
||||||
MObject *object = 0;
|
MObject *object = nullptr;
|
||||||
if (m_modelTreeView->currentSourceModelIndex().isValid()) {
|
if (m_modelTreeView->currentSourceModelIndex().isValid()) {
|
||||||
MElement *element = m_treeModel->element(m_modelTreeView->currentSourceModelIndex());
|
MElement *element = m_treeModel->element(m_modelTreeView->currentSourceModelIndex());
|
||||||
if (element)
|
if (element)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class QMT_EXPORT TreeModelManager : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TreeModelManager(QObject *parent = 0);
|
explicit TreeModelManager(QObject *parent = nullptr);
|
||||||
~TreeModelManager() override;
|
~TreeModelManager() override;
|
||||||
|
|
||||||
TreeModel *treeModel() const { return m_treeModel; }
|
TreeModel *treeModel() const { return m_treeModel; }
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class QMT_EXPORT ClassMembersEdit : public QPlainTextEdit
|
|||||||
class ClassMembersEditPrivate;
|
class ClassMembersEditPrivate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ClassMembersEdit(QWidget *parent = 0);
|
explicit ClassMembersEdit(QWidget *parent = nullptr);
|
||||||
~ClassMembersEdit() override;
|
~ClassMembersEdit() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class QMT_EXPORT ModelTreeView : public QTreeView, public ModelTreeViewInterface
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ModelTreeView(QWidget *parent = 0);
|
explicit ModelTreeView(QWidget *parent = nullptr);
|
||||||
~ModelTreeView() override;
|
~ModelTreeView() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class QMT_EXPORT PaletteBox : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PaletteBox(QWidget *parent = 0);
|
explicit PaletteBox(QWidget *parent = nullptr);
|
||||||
~PaletteBox() override;
|
~PaletteBox() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ namespace qmt {
|
|||||||
|
|
||||||
PropertiesView::PropertiesView(QObject *parent)
|
PropertiesView::PropertiesView(QObject *parent)
|
||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
m_modelController(0),
|
m_modelController(nullptr),
|
||||||
m_diagramController(0),
|
m_diagramController(nullptr),
|
||||||
m_stereotypeController(0),
|
m_stereotypeController(nullptr),
|
||||||
m_styleController(0),
|
m_styleController(nullptr),
|
||||||
m_viewFactory([=](PropertiesView *propertiesView) { return new MView(propertiesView); }),
|
m_viewFactory([=](PropertiesView *propertiesView) { return new MView(propertiesView); }),
|
||||||
m_selectedDiagram(0),
|
m_selectedDiagram(nullptr),
|
||||||
m_widget(0)
|
m_widget(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ void PropertiesView::setModelController(ModelController *modelController)
|
|||||||
{
|
{
|
||||||
if (m_modelController != modelController) {
|
if (m_modelController != modelController) {
|
||||||
if (m_modelController)
|
if (m_modelController)
|
||||||
disconnect(m_modelController, 0, this, 0);
|
disconnect(m_modelController, nullptr, this, nullptr);
|
||||||
m_modelController = modelController;
|
m_modelController = modelController;
|
||||||
if (m_modelController) {
|
if (m_modelController) {
|
||||||
connect(m_modelController, &ModelController::beginResetModel,
|
connect(m_modelController, &ModelController::beginResetModel,
|
||||||
@@ -109,8 +109,8 @@ void PropertiesView::setDiagramController(DiagramController *diagramController)
|
|||||||
{
|
{
|
||||||
if (m_diagramController != diagramController) {
|
if (m_diagramController != diagramController) {
|
||||||
if (m_diagramController) {
|
if (m_diagramController) {
|
||||||
disconnect(m_diagramController, 0, this, 0);
|
disconnect(m_diagramController, nullptr, this, nullptr);
|
||||||
m_diagramController = 0;
|
m_diagramController = nullptr;
|
||||||
}
|
}
|
||||||
m_diagramController = diagramController;
|
m_diagramController = diagramController;
|
||||||
if (diagramController) {
|
if (diagramController) {
|
||||||
@@ -162,7 +162,7 @@ void PropertiesView::setSelectedModelElements(const QList<MElement *> &modelElem
|
|||||||
if (m_selectedModelElements != modelElements) {
|
if (m_selectedModelElements != modelElements) {
|
||||||
m_selectedModelElements = modelElements;
|
m_selectedModelElements = modelElements;
|
||||||
m_selectedDiagramElements.clear();
|
m_selectedDiagramElements.clear();
|
||||||
m_selectedDiagram = 0;
|
m_selectedDiagram = nullptr;
|
||||||
m_mview.reset(m_viewFactory(this));
|
m_mview.reset(m_viewFactory(this));
|
||||||
m_mview->update(m_selectedModelElements);
|
m_mview->update(m_selectedModelElements);
|
||||||
m_widget = m_mview->topLevelWidget();
|
m_widget = m_mview->topLevelWidget();
|
||||||
@@ -188,9 +188,9 @@ void PropertiesView::clearSelection()
|
|||||||
{
|
{
|
||||||
m_selectedModelElements.clear();
|
m_selectedModelElements.clear();
|
||||||
m_selectedDiagramElements.clear();
|
m_selectedDiagramElements.clear();
|
||||||
m_selectedDiagram = 0;
|
m_selectedDiagram = nullptr;
|
||||||
m_mview.reset();
|
m_mview.reset();
|
||||||
m_widget = 0;
|
m_widget = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *PropertiesView::widget() const
|
QWidget *PropertiesView::widget() const
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class QMT_EXPORT PropertiesView : public QObject
|
|||||||
public:
|
public:
|
||||||
class MView;
|
class MView;
|
||||||
|
|
||||||
explicit PropertiesView(QObject *parent = 0);
|
explicit PropertiesView(QObject *parent = nullptr);
|
||||||
~PropertiesView() override;
|
~PropertiesView() override;
|
||||||
|
|
||||||
ModelController *modelController() const { return m_modelController; }
|
ModelController *modelController() const { return m_modelController; }
|
||||||
|
|||||||
@@ -285,50 +285,50 @@ static DAnnotation::VisualRole translateIndexToAnnotationVisualRole(int index)
|
|||||||
|
|
||||||
PropertiesView::MView::MView(PropertiesView *propertiesView)
|
PropertiesView::MView::MView(PropertiesView *propertiesView)
|
||||||
: m_propertiesView(propertiesView),
|
: m_propertiesView(propertiesView),
|
||||||
m_diagram(0),
|
m_diagram(nullptr),
|
||||||
m_stereotypesController(new StereotypesController(this)),
|
m_stereotypesController(new StereotypesController(this)),
|
||||||
m_topWidget(0),
|
m_topWidget(nullptr),
|
||||||
m_topLayout(0),
|
m_topLayout(nullptr),
|
||||||
m_stereotypeElement(StereotypeIcon::ElementAny),
|
m_stereotypeElement(StereotypeIcon::ElementAny),
|
||||||
m_classNameLabel(0),
|
m_classNameLabel(nullptr),
|
||||||
m_stereotypeComboBox(0),
|
m_stereotypeComboBox(nullptr),
|
||||||
m_reverseEngineeredLabel(0),
|
m_reverseEngineeredLabel(nullptr),
|
||||||
m_elementNameLineEdit(0),
|
m_elementNameLineEdit(nullptr),
|
||||||
m_childrenLabel(0),
|
m_childrenLabel(nullptr),
|
||||||
m_relationsLabel(0),
|
m_relationsLabel(nullptr),
|
||||||
m_namespaceLineEdit(0),
|
m_namespaceLineEdit(nullptr),
|
||||||
m_templateParametersLineEdit(0),
|
m_templateParametersLineEdit(nullptr),
|
||||||
m_classMembersStatusLabel(0),
|
m_classMembersStatusLabel(nullptr),
|
||||||
m_classMembersParseButton(0),
|
m_classMembersParseButton(nullptr),
|
||||||
m_classMembersEdit(0),
|
m_classMembersEdit(nullptr),
|
||||||
m_diagramsLabel(0),
|
m_diagramsLabel(nullptr),
|
||||||
m_itemVarietyEdit(0),
|
m_itemVarietyEdit(nullptr),
|
||||||
m_endALabel(0),
|
m_endALabel(nullptr),
|
||||||
m_endBLabel(0),
|
m_endBLabel(nullptr),
|
||||||
m_directionSelector(0),
|
m_directionSelector(nullptr),
|
||||||
m_endAEndName(0),
|
m_endAEndName(nullptr),
|
||||||
m_endACardinality(0),
|
m_endACardinality(nullptr),
|
||||||
m_endANavigable(0),
|
m_endANavigable(nullptr),
|
||||||
m_endAKind(0),
|
m_endAKind(nullptr),
|
||||||
m_endBEndName(0),
|
m_endBEndName(nullptr),
|
||||||
m_endBCardinality(0),
|
m_endBCardinality(nullptr),
|
||||||
m_endBNavigable(0),
|
m_endBNavigable(nullptr),
|
||||||
m_endBKind(0),
|
m_endBKind(nullptr),
|
||||||
m_separatorLine(0),
|
m_separatorLine(nullptr),
|
||||||
m_styleElementType(StyleEngine::TypeOther),
|
m_styleElementType(StyleEngine::TypeOther),
|
||||||
m_posRectLabel(0),
|
m_posRectLabel(nullptr),
|
||||||
m_autoSizedCheckbox(0),
|
m_autoSizedCheckbox(nullptr),
|
||||||
m_visualPrimaryRoleSelector(0),
|
m_visualPrimaryRoleSelector(nullptr),
|
||||||
m_visualSecondaryRoleSelector(0),
|
m_visualSecondaryRoleSelector(nullptr),
|
||||||
m_visualEmphasizedCheckbox(0),
|
m_visualEmphasizedCheckbox(nullptr),
|
||||||
m_stereotypeDisplaySelector(0),
|
m_stereotypeDisplaySelector(nullptr),
|
||||||
m_depthLabel(0),
|
m_depthLabel(nullptr),
|
||||||
m_templateDisplaySelector(0),
|
m_templateDisplaySelector(nullptr),
|
||||||
m_showAllMembersCheckbox(0),
|
m_showAllMembersCheckbox(nullptr),
|
||||||
m_plainShapeCheckbox(0),
|
m_plainShapeCheckbox(nullptr),
|
||||||
m_itemShapeEdit(0),
|
m_itemShapeEdit(nullptr),
|
||||||
m_annotationAutoWidthCheckbox(0),
|
m_annotationAutoWidthCheckbox(nullptr),
|
||||||
m_annotationVisualRoleSelector(0)
|
m_annotationVisualRoleSelector(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,7 +342,7 @@ void PropertiesView::MView::update(QList<MElement *> &modelElements)
|
|||||||
|
|
||||||
m_modelElements = modelElements;
|
m_modelElements = modelElements;
|
||||||
m_diagramElements.clear();
|
m_diagramElements.clear();
|
||||||
m_diagram = 0;
|
m_diagram = nullptr;
|
||||||
modelElements.at(0)->accept(this);
|
modelElements.at(0)->accept(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,7 +365,7 @@ void PropertiesView::MView::update(QList<DElement *> &diagramElements, MDiagram
|
|||||||
}
|
}
|
||||||
if (!appendedMelement) {
|
if (!appendedMelement) {
|
||||||
// ensure that indices within m_diagramElements match indices into m_modelElements
|
// ensure that indices within m_diagramElements match indices into m_modelElements
|
||||||
m_modelElements.append(0);
|
m_modelElements.append(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diagramElements.at(0)->accept(this);
|
diagramElements.at(0)->accept(this);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class QMT_EXPORT ProjectController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ProjectController(QObject *parent = 0);
|
explicit ProjectController(QObject *parent = nullptr);
|
||||||
~ProjectController() override;
|
~ProjectController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ QList<T *> cloneAll(const QList<T *> &rhs)
|
|||||||
{
|
{
|
||||||
QList<T *> result;
|
QList<T *> result;
|
||||||
foreach (T *t, rhs)
|
foreach (T *t, rhs)
|
||||||
result.append(t != 0 ? t->clone() : 0);
|
result.append(t ? t->clone() : nullptr);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,10 +75,10 @@ public:
|
|||||||
|
|
||||||
PathShape *IconShape::IconShapePrivate::activePath()
|
PathShape *IconShape::IconShapePrivate::activePath()
|
||||||
{
|
{
|
||||||
PathShape *pathShape = 0;
|
PathShape *pathShape = nullptr;
|
||||||
if (m_shapes.count() > 0)
|
if (m_shapes.count() > 0)
|
||||||
pathShape = dynamic_cast<PathShape *>(m_shapes.last());
|
pathShape = dynamic_cast<PathShape *>(m_shapes.last());
|
||||||
if (pathShape == 0) {
|
if (!pathShape) {
|
||||||
pathShape = new PathShape();
|
pathShape = new PathShape();
|
||||||
m_shapes.append(pathShape);
|
m_shapes.append(pathShape);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class QMT_EXPORT StereotypeController : public QObject
|
|||||||
class StereotypeControllerPrivate;
|
class StereotypeControllerPrivate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StereotypeController(QObject *parent = 0);
|
explicit StereotypeController(QObject *parent = nullptr);
|
||||||
~StereotypeController() override;
|
~StereotypeController() override;
|
||||||
|
|
||||||
QList<StereotypeIcon> stereotypeIcons() const;
|
QList<StereotypeIcon> stereotypeIcons() const;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StyleController *m_styleController = 0;
|
StyleController *m_styleController = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
StyleController::StyleController(QObject *parent)
|
StyleController::StyleController(QObject *parent)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class QMT_EXPORT StyleController : public QObject
|
|||||||
class Parameters;
|
class Parameters;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StyleController(QObject *parent = 0);
|
explicit StyleController(QObject *parent = nullptr);
|
||||||
~StyleController() override;
|
~StyleController() override;
|
||||||
|
|
||||||
bool suppressGradients() const { return m_suppressGradients; }
|
bool suppressGradients() const { return m_suppressGradients; }
|
||||||
|
|||||||
@@ -49,9 +49,9 @@
|
|||||||
namespace qmt {
|
namespace qmt {
|
||||||
|
|
||||||
AlignOnRasterVisitor::AlignOnRasterVisitor()
|
AlignOnRasterVisitor::AlignOnRasterVisitor()
|
||||||
: m_diagramController(0),
|
: m_diagramController(nullptr),
|
||||||
m_sceneInspector(0),
|
m_sceneInspector(nullptr),
|
||||||
m_diagram(0)
|
m_diagram(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,8 +144,8 @@ void DiagramSceneController::setModelController(ModelController *modelController
|
|||||||
if (m_modelController == modelController)
|
if (m_modelController == modelController)
|
||||||
return;
|
return;
|
||||||
if (m_modelController) {
|
if (m_modelController) {
|
||||||
disconnect(m_modelController, 0, this, 0);
|
disconnect(m_modelController, nullptr, this, nullptr);
|
||||||
m_modelController = 0;
|
m_modelController = nullptr;
|
||||||
}
|
}
|
||||||
if (modelController)
|
if (modelController)
|
||||||
m_modelController = modelController;
|
m_modelController = modelController;
|
||||||
@@ -156,8 +156,8 @@ void DiagramSceneController::setDiagramController(DiagramController *diagramCont
|
|||||||
if (m_diagramController == diagramController)
|
if (m_diagramController == diagramController)
|
||||||
return;
|
return;
|
||||||
if (m_diagramController) {
|
if (m_diagramController) {
|
||||||
disconnect(m_diagramController, 0, this, 0);
|
disconnect(m_diagramController, nullptr, this, nullptr);
|
||||||
m_diagramController = 0;
|
m_diagramController = nullptr;
|
||||||
}
|
}
|
||||||
if (diagramController)
|
if (diagramController)
|
||||||
m_diagramController = diagramController;
|
m_diagramController = diagramController;
|
||||||
@@ -396,7 +396,7 @@ void DiagramSceneController::dropNewElement(const QString &newElementId, const Q
|
|||||||
emit newElementCreated(swimlane, diagram);
|
emit newElementCreated(swimlane, diagram);
|
||||||
} else {
|
} else {
|
||||||
MPackage *parentPackage = findSuitableParentPackage(topMostElementAtPos, diagram);
|
MPackage *parentPackage = findSuitableParentPackage(topMostElementAtPos, diagram);
|
||||||
MObject *newObject = 0;
|
MObject *newObject = nullptr;
|
||||||
QString newName;
|
QString newName;
|
||||||
if (newElementId == QLatin1String(ELEMENT_TYPE_PACKAGE)) {
|
if (newElementId == QLatin1String(ELEMENT_TYPE_PACKAGE)) {
|
||||||
auto package = new MPackage();
|
auto package = new MPackage();
|
||||||
@@ -447,7 +447,7 @@ void DiagramSceneController::dropNewModelElement(MObject *modelObject, MPackage
|
|||||||
|
|
||||||
MPackage *DiagramSceneController::findSuitableParentPackage(DElement *topmostDiagramElement, MDiagram *diagram)
|
MPackage *DiagramSceneController::findSuitableParentPackage(DElement *topmostDiagramElement, MDiagram *diagram)
|
||||||
{
|
{
|
||||||
MPackage *parentPackage = 0;
|
MPackage *parentPackage = nullptr;
|
||||||
if (auto diagramPackage = dynamic_cast<DPackage *>(topmostDiagramElement)) {
|
if (auto diagramPackage = dynamic_cast<DPackage *>(topmostDiagramElement)) {
|
||||||
parentPackage = m_modelController->findObject<MPackage>(diagramPackage->modelUid());
|
parentPackage = m_modelController->findObject<MPackage>(diagramPackage->modelUid());
|
||||||
} else if (auto diagramObject = dynamic_cast<DObject *>(topmostDiagramElement)) {
|
} else if (auto diagramObject = dynamic_cast<DObject *>(topmostDiagramElement)) {
|
||||||
@@ -455,9 +455,9 @@ MPackage *DiagramSceneController::findSuitableParentPackage(DElement *topmostDia
|
|||||||
if (modelObject)
|
if (modelObject)
|
||||||
parentPackage = dynamic_cast<MPackage *>(modelObject->owner());
|
parentPackage = dynamic_cast<MPackage *>(modelObject->owner());
|
||||||
}
|
}
|
||||||
if (parentPackage == 0 && diagram != 0)
|
if (!parentPackage && diagram)
|
||||||
parentPackage = dynamic_cast<MPackage *>(diagram->owner());
|
parentPackage = dynamic_cast<MPackage *>(diagram->owner());
|
||||||
if (parentPackage == 0)
|
if (!parentPackage)
|
||||||
parentPackage = m_modelController->rootPackage();
|
parentPackage = m_modelController->rootPackage();
|
||||||
return parentPackage;
|
return parentPackage;
|
||||||
}
|
}
|
||||||
@@ -473,7 +473,7 @@ MDiagram *DiagramSceneController::findDiagramBySearchId(MPackage *package, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@@ -671,7 +671,7 @@ void DiagramSceneController::alignOnRaster(DElement *element, MDiagram *diagram)
|
|||||||
|
|
||||||
DElement *DiagramSceneController::addModelElement(const Uid &modelElementKey, const QPointF &pos, MDiagram *diagram)
|
DElement *DiagramSceneController::addModelElement(const Uid &modelElementKey, const QPointF &pos, MDiagram *diagram)
|
||||||
{
|
{
|
||||||
DElement *element = 0;
|
DElement *element = nullptr;
|
||||||
if (MObject *modelObject = m_modelController->findObject(modelElementKey)) {
|
if (MObject *modelObject = m_modelController->findObject(modelElementKey)) {
|
||||||
element = addObject(modelObject, pos, diagram);
|
element = addObject(modelObject, pos, diagram);
|
||||||
} else if (MRelation *modelRelation = m_modelController->findRelation(modelElementKey)) {
|
} else if (MRelation *modelRelation = m_modelController->findRelation(modelElementKey)) {
|
||||||
@@ -687,7 +687,7 @@ DObject *DiagramSceneController::addObject(MObject *modelObject, const QPointF &
|
|||||||
QMT_ASSERT(modelObject, return nullptr);
|
QMT_ASSERT(modelObject, return nullptr);
|
||||||
|
|
||||||
if (m_diagramController->hasDelegate(modelObject, diagram))
|
if (m_diagramController->hasDelegate(modelObject, diagram))
|
||||||
return 0;
|
return nullptr;
|
||||||
|
|
||||||
m_diagramController->undoController()->beginMergeSequence(tr("Add Element"));
|
m_diagramController->undoController()->beginMergeSequence(tr("Add Element"));
|
||||||
|
|
||||||
@@ -749,7 +749,7 @@ DRelation *DiagramSceneController::addRelation(MRelation *modelRelation, const Q
|
|||||||
QMT_ASSERT(modelRelation, return nullptr);
|
QMT_ASSERT(modelRelation, return nullptr);
|
||||||
|
|
||||||
if (m_diagramController->hasDelegate(modelRelation, diagram))
|
if (m_diagramController->hasDelegate(modelRelation, diagram))
|
||||||
return 0;
|
return nullptr;
|
||||||
|
|
||||||
DFactory factory;
|
DFactory factory;
|
||||||
modelRelation->accept(&factory);
|
modelRelation->accept(&factory);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class QMT_EXPORT DiagramSceneController : public QObject
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DiagramSceneController(QObject *parent = 0);
|
explicit DiagramSceneController(QObject *parent = nullptr);
|
||||||
~DiagramSceneController() override;
|
~DiagramSceneController() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@@ -95,10 +95,10 @@ public:
|
|||||||
const QList<QPointF> &intermediatePoints, MDiagram *diagram);
|
const QList<QPointF> &intermediatePoints, MDiagram *diagram);
|
||||||
void createAssociation(DClass *endAClass, DClass *endBClass,
|
void createAssociation(DClass *endAClass, DClass *endBClass,
|
||||||
const QList<QPointF> &intermediatePoints, MDiagram *diagram,
|
const QList<QPointF> &intermediatePoints, MDiagram *diagram,
|
||||||
std::function<void (MAssociation*, DAssociation*)> custom = 0);
|
std::function<void (MAssociation*, DAssociation*)> custom = nullptr);
|
||||||
void createConnection(const QString &customRelationId, DObject *endAObject, DObject *endBObject,
|
void createConnection(const QString &customRelationId, DObject *endAObject, DObject *endBObject,
|
||||||
const QList<QPointF> &intermediatePoints, MDiagram *diagram,
|
const QList<QPointF> &intermediatePoints, MDiagram *diagram,
|
||||||
std::function<void (MConnection*, DConnection*)> custom = 0);
|
std::function<void (MConnection*, DConnection*)> custom = nullptr);
|
||||||
bool relocateRelationEndA(DRelation *relation, DObject *targetObject);
|
bool relocateRelationEndA(DRelation *relation, DObject *targetObject);
|
||||||
bool relocateRelationEndB(DRelation *relation, DObject *targetObject);
|
bool relocateRelationEndB(DRelation *relation, DObject *targetObject);
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user