// ModelEditor - definitions of custom shapes // // Language syntax and commands: // // Icon { // id: // title: // elements: // stereotype: // display: // width: // height: // minwidth: // minheight: // lockSize: // textAlignment: // baseColor: // Shape { // Line { x1: ; y1: ; x2:; y2: } // Rect { x: ; y: ; width: ; height: } // RoundedRect { x: ; y: ; width: ; height: ; radius: } // Circle { x: ; y: ; radius: } // Ellipse { x: ; y: ; radiusX: ; radiusY: } // Arc { x: ; y: ; radiusX: ; radiusY: ; start: ; span: } // MoveTo { x: ; y: } // LineTo { x: ; y: } // ArcMoveTo { x: ; y: ; radiusX: ; radiusY: ; angle: } // ArcTo { x: ; y: ; radiusX: ; radiusY: ; start: ; span: } // Close // } // } // // Toolbar { // id: // title: // priority: // Tools { // Tool { title: ; element: ; stereotype: } // Separator // } // } // // ************* // ** Classes ** // ************* Icon { id: Interface elements: class stereotype: 'interface' display: icon width: 20.0 height: 20.0 lockSize: ratio Shape { Circle { x: 10.0; y: 10.0; radius: 10.0 } } } Icon { id: Boundary stereotype: 'boundary' width: 24.0 height: 20.0 lockSize: ratio Shape { Circle { x: 14.0; y: 10.0; radius: 10.0 } Line { x0: 0.0; y0: 0.0; x1: 0.0; y1: 20.0 } Line { x0: 0.0; y0: 10.0; x1: 4.0; y1: 10.0 } } } Icon { id: Control stereotype: 'control' width: 20.0 height: 20.0 lockSize: ratio Shape { Circle { x: 10.0; y: 10.0; radius: 10.0 } Line { x0: 10.0; y0: 0.0; x1: 14.0; y1: -2.0 } Line { x0: 10.0; y0: 0.0; x1: 14.0; y1: 4.0 } } } Icon { id: Entity stereotype: 'entity' width: 20.0 height: 20.0 lockSize: ratio Shape { Circle { x: 10.0; y: 10.0; radius: 10.0 } Line { x0: 0.0; y0: 20.0; x1: 20.0; y1: 20.0 } } } // **************** // ** Components ** // **************** Icon { id: Database stereotype: 'database' display: icon width: 20.0 height: 20.0 Shape { MoveTo { x: 0.0; y: 3.0 } LineTo { x: 0.0; y: 17.0 } ArcTo { x: 10.0; y: 17.0; radiusX: 10.0; radiusY: 3.0; start: 180.0; span: 180.0 } LineTo { x: 20.0; y: 3.0 } ArcTo { x: 10.0; y: 3.0; radiusX: 10.0; radiusY: 3.0; start: 0.0; span: -180.0 } Close Arc { x: 10.0; y: 3.0; radiusX: 10.0; radiusY: 3.0; start: 0.0; span: 180.0 } } } // experimental replacement of default shape with custom shape Icon { id: Component elements: component, package, diagram stereotype: 'component' display: decoration width: 20.0 height: 16.0 textAlignment: center Shape { Rect { x: 0; y: 0; width: 20.0; height: 16.0 } Rect { x: -4.0; y: 2.5; width: 8; height: 4 } Rect { x: -4.0; y: 9.5; width: 8; height: 4 } } } // *************** // ** Use Cases ** // *************** Icon { id: UseCase Title: "Use-Case" elements: item stereotype: 'usecase' display: icon width: 40 height: 20 baseColor: #5fb4f0 Shape { Ellipse { x: 20; y: 10; radiusX: 20; radiusY: 10 } } } Icon { id: Actor elements: item stereotype: 'actor' display: icon width: 20 height: 40 lockSize: ratio baseColor: #5fb4f0 Shape { Circle { x: 10; y: 5; radius: 5 } Line { x0: 0; y0: 15; x1: 20; y1: 15 } Line { x0: 10; y0: 10; x1: 10; y1: 25 } Line { x0: 10; y0: 25; x1: 3; y1: 40 } Line { x0: 10; y0: 25; x1: 17; y1: 40 } } } // **************** // ** Activities ** // **************** Icon { id: Start elements: item stereotype: 'start' display: icon width: 20 height: 20 lockSize: ratio baseColor: #81d657 Shape { Circle { x: 10; y: 10; radius: 7 } } } Icon { id: Activity elements: item stereotype: 'activity' display: icon width: 40 height: 20 baseColor: #81d657 Shape { RoundedRect { x: 0; y: 0; width: 40; height: 20; radius: 10 } } } Icon { id: Condition elements: item stereotype: 'condition' display: icon width: 20 height: 20 lockSize: ratio baseColor: #81d657 Shape { MoveTo { x: 10; y: 0 } LineTo { x: 20; y: 10 } LineTo { x: 10; y: 20 } LineTo { x: 0; y: 10 } Close } } Icon { id: HorizontalBar Title: "Horizontal Bar" elements: item stereotype: 'horizontalbar' display: icon width: 20 height: 5 minWidth: 20 minHeight: 5 lockSize: height baseColor: #000000 Shape { RoundedRect { x: 0; y: 0; width: 20; height: 5; radius: 1 } } } Icon { id: VerticalBar Title: "Vertical Bar" elements: item stereotype: 'verticalbar' display: icon width: 5 height: 20 minWidth: 5 minHeight: 20 lockSize: width baseColor: #000000 Shape { RoundedRect { x: 0; y: 0; width: 5; height: 20; radius: 1 } } } Icon { id: Termination elements: item stereotype: 'termination' display: icon width: 20 height: 20 lockSize: ratio baseColor: #81d657 Shape { Circle { x: 10; y: 10; radius: 10 } Circle { x: 10; y: 10; radius: 7 } } } // ************** // ** Toolbars ** // ************** Toolbar { id: Classes Tools { Tool { title: "Package"; element: package } Tool { title: "Class"; element: class } Tool { title: "Interface"; element: class; stereotype: "interface" } Tool { title: "Control"; element: class; stereotype: "control" } Tool { title: "Entity"; element: class; stereotype: "entity" } Tool { title: "Boundary"; element: class; stereotype: "boundary" } Separator Tool { title: "Annotation"; element: annotation } Tool { title: "Boundary"; element: boundary } } } Toolbar { id: Components Tools { Tool { title: "Package"; element: package } Tool { title: "Component"; element: component } Tool { title: "Database"; element: component; stereotype: "database" } Separator Tool { title: "Annotation"; element: annotation } Tool { title: "Boundary"; element: boundary } } } Toolbar { id: UseCases Tools { Tool { title: "Package"; element: package } Tool { title: "UseCase"; element: item; stereotype: "usecase" } Tool { title: "Actor"; element: item; stereotype: "actor" } Separator Tool { title: "Annotation"; element: annotation } Tool { title: "Boundary"; element: boundary } } } Toolbar { id: Activities Tools { Tool { title: "Start"; element: item; stereotype: "start" } Tool { title: "Activity"; element: item; stereotype: "activity" } Tool { title: "Condition"; element: item; stereotype: "condition" } Tool { title: "Horiz. Bar"; element: item; stereotype: "horizontalbar" } Tool { title: "Vert. Bar"; element: item; stereotype: "verticalbar" } Tool { title: "Termination"; element: item; stereotype: "termination" } Separator Tool { title: "Annotation"; element: annotation } Tool { title: "Boundary"; element: boundary } } }