forked from qt-creator/qt-creator
ModelEditor: Refactor relationables into common parent class
Change-Id: Id863a5004cb903cbc2929745e818e5810ff70dd2 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -217,23 +217,6 @@ QList<ILatchable::Latch> ComponentItem::verticalLatches(ILatchable::Action actio
|
||||
return ObjectItem::verticalLatches(action, grabbedItem);
|
||||
}
|
||||
|
||||
QPointF ComponentItem::relationStartPos() const
|
||||
{
|
||||
return pos();
|
||||
}
|
||||
|
||||
void ComponentItem::relationDrawn(const QString &id, const QPointF &toScenePos, const QList<QPointF> &intermediatePoints)
|
||||
{
|
||||
DElement *targetElement = diagramSceneModel()->findTopmostElement(toScenePos);
|
||||
if (targetElement) {
|
||||
if (id == QStringLiteral("dependency")) {
|
||||
auto dependantObject = dynamic_cast<DObject *>(targetElement);
|
||||
if (dependantObject)
|
||||
diagramSceneModel()->diagramSceneController()->createDependency(object(), dependantObject, intermediatePoints, diagramSceneModel()->diagram());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ComponentItem::hasPlainShape() const
|
||||
{
|
||||
auto diagramComponent = dynamic_cast<DComponent *>(object());
|
||||
|
||||
Reference in New Issue
Block a user