umbrello/petaltree2uml.cpp function umbrellify completion of statemachine statediagrams conversion:
- Local viewTagToWidget is a QMap<QString, UMLWidget*> mapping a view object's tag (number preceded by "@") to the Umbrello widget created. - In case (dt != Uml::DiagramType::Undefined) : - Local qreal maxY is initialized to 0.0 and is set to the largest Y (plus height) coordinate encountered during conversion of widgets. - Move declaration of locals `width` and `height` to inside for-loop. - Local UMLWidgetList swimlanes is an auxiliary list for adjusting the final height of swimlanes to contain all widgets. - Convert TransView to AssociationWidget with type State or Activity depending on the diagram type. - On converting Swimlane call swimlanes.append(w). - On converting StateView initialize `width` and `height` from w->width() and w->height(), respectively. - Convert DecisionView to ActivityWidget with ActivityType `Branch`. - Convert SynchronizationView to ForkJoinWidget with Qt::Orientation according to Rose attribute sync_is_horizontal. - Fill viewTagToWidget with attr->viewTag() as key and `w` (pointer to UMLWidget) as value. - After the conversion loop iterate over `swimlanes` for adjusting each swimlane's height to maxY. CCBUG: 81364
Please register or sign in to comment