ModelEditor: Introduce swimlanes

Change-Id: I9ac9c51eabc00c6912fd47fbf51b50b2938846ae
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jochen Becher
2017-07-15 15:37:19 +02:00
parent c562dce322
commit 4c469e0111
50 changed files with 852 additions and 28 deletions

View File

@@ -1046,6 +1046,9 @@ void ModelEditor::initToolbars()
} else if (tool.m_elementType == QLatin1String(qmt::ELEMENT_TYPE_BOUNDARY)) {
iconPath = QStringLiteral(":/modelinglib/48x48/boundary.png");
styleEngineElementType = qmt::StyleEngine::TypeBoundary;
} else if (tool.m_elementType == QLatin1String(qmt::ELEMENT_TYPE_SWIMLANE)) {
iconPath = QStringLiteral(":/modelinglib/48x48/swimlane.png");
styleEngineElementType = qmt::StyleEngine::TypeSwimlane;
}
QIcon icon;
if (!tool.m_stereotype.isEmpty() && stereotypeIconElement != qmt::StereotypeIcon::ElementAny) {
@@ -1110,6 +1113,10 @@ void ModelEditor::initToolbars()
new DragTool(QIcon(QStringLiteral(":/modelinglib/48x48/boundary.png")),
tr("Boundary"), QLatin1String(qmt::ELEMENT_TYPE_BOUNDARY),
QString(), toolBar));
toolBarLayout->addWidget(
new DragTool(QIcon(QStringLiteral(":/modelinglib/48x48/swimlane.png")),
tr("Swimlane"), QLatin1String(qmt::ELEMENT_TYPE_SWIMLANE),
QString(), toolBar));
}
// add stretch to all layouts and calculate width of tool bar