Files
qt-creator/share/qtcreator/modeleditor/standard.def

298 lines
6.3 KiB
Modula-2
Raw Normal View History

// ModelEditor - definitions of custom shapes
//
// Language syntax and commands:
//
// Icon <name>
// Title: <a UI title. Defaults to the name of the icon.>
// Elements: <comma-separated list of element types the
// definiton applies to: class, component, package, diagram, item.
// Default applies definition to all element types.>
// Stereotype: <stereotype as a string.>
// Display: <default display of element.
// One of: none, label, decoration, icon, smart.
// Default is smart.>
// Width: <width of icon in pixels. The width defines the width of the icon as decoration.>
// Height: <height of icon in pixels. The height defines the height of the icon as decoration.>
// MinWidth: <minimum width of custom icon in pixels.>
// MinHeight: <minimum height of custom icon in pixels.>
// LockSize: <lock resizing.
// One of: none, width, height, size, ratio.
// Default is none.>
// TextAlignment: <alignment of text.
// One of: top, center, below.
// Defaults to center.>
// BaseColor: <color #rrggbb>
// Begin
// Line <x1>, <y1>, <x2>, <y2>
// Rect <x>, <y>, <width>, <height>
// RoundedRect <x>, <y>, <width>, <height>, <radius>
// Circle <center_x>, <center_y>, <radius>
// Ellipse <center_x>, <center_y>, <radius_x>, <radius_y>
// Arc <center_x>, <center_y>, <radius_x>, <radius_y>, <start_angle>, <span_angle>
// MoveTo <x>, <y>
// LineTo <x>, <y>
// ArcMoveTo <center_x>, <center_y>, <radius_x>, <radius_y>, <angle>
// ArcTo <center_x>, <center_y>, <radius_x>, <radius_y>, <angle>, <span_angle>
// Close
// End
//
// Toolbar <name>
// Priority: <priority which decides about the position of toolbar in toolbox>
// Begin
// Tool <title>, <element type>[, <stereotype>]
// Separator
// End
//
// *************
// ** Classes **
// *************
Icon Interface
Elements: class
Stereotype: 'interface'
Display: icon
Width: 20.0
Height: 20.0
LockSize: ratio
Begin
Circle 10.0, 10.0, 10.0
End
Icon Boundary
Stereotype: 'boundary'
Width: 24.0
Height: 20.0
LockSize: ratio
Begin
Circle 14.0, 10.0, 10.0
Line 0.0, 0.0, 0.0, 20.0
Line 0.0, 10.0, 4.0, 10.0
End
Icon Control
Stereotype: 'control'
Width: 20.0
Height: 20.0
LockSize: ratio
Begin
Circle 10.0, 10.0, 10.0
Line 10.0, 0.0, 14.0, -2.0
Line 10.0, 0.0, 14.0, 4.0
End
Icon Entity
Stereotype: 'entity'
Width: 20.0
Height: 20.0
LockSize: ratio
Begin
Circle 10.0, 10.0, 10.0
Line 0.0, 20.0, 20.0, 20.0
End
// ****************
// ** Components **
// ****************
Icon Database
Stereotype: 'database'
Display: icon
Width: 20.0
Height: 20.0
Begin
MoveTo 0.0, 3.0
LineTo 0.0, 17.0
ArcTo 10.0, 17.0, 10.0, 3.0, 180.0, 180.0
LineTo 20.0, 3.0
ArcTo 10.0, 3.0, 10.0, 3.0, 0.0, -180.0
Close
Arc 10.0, 3.0, 10.0, 3.0, 0.0, 180.0
End
// experimental replacement of default shape with custom shape
Icon Component
Elements: component, package, diagram
Stereotype: 'component'
Display: decoration
Width: 20.0
Height: 16.0
TextAlignment: center
Begin
Rect 0, 0, 20.0, 16.0
Rect -4.0, 2.5, 8, 4
Rect -4.0, 9.5, 8, 4
End
// ***************
// ** Use Cases **
// ***************
Icon UseCase
Title: "Use-Case"
Elements: item
Stereotype: 'usecase'
Display: icon
Width: 40
Height: 20
BaseColor: #5fb4f0
Begin
Ellipse 20, 10, 20, 10
End
Icon Actor
Elements: item
Stereotype: 'actor'
Display: icon
Width: 20
Height: 40
LockSize: ratio
BaseColor: #5fb4f0
Begin
Circle 10, 5, 5
Line 0, 15, 20, 15
Line 10, 10, 10, 25
Line 10, 25, 3, 40
Line 10, 25, 17, 40
End
// ****************
// ** Activities **
// ****************
Icon Start
Elements: item
Stereotype: 'start'
Display: icon
Width: 20
Height: 20
LockSize: ratio
BaseColor: #81d657
Begin
Circle 10, 10, 7
End
Icon Activity
Elements: item
Stereotype: 'activity'
Display: icon
Width: 40
Height: 20
BaseColor: #81d657
Begin
RoundedRect 0, 0, 40, 20, 10
End
Icon Condition
Elements: item
Stereotype: 'condition'
Display: icon
Width: 20
Height: 20
LockSize: ratio
BaseColor: #81d657
Begin
MoveTo 10, 0
LineTo 20, 10
LineTo 10, 20
LineTo 0, 10
Close
End
Icon HorizontalBar
Title: "Horizontal Bar"
Elements: item
Stereotype: 'horizontalbar'
Display: icon
Width: 20
Height: 5
MinWidth: 20
MinHeight: 5
LockSize: height
BaseColor: #000000
Begin
RoundedRect 0, 0, 20, 5, 1
End
Icon VerticalBar
Title: "Vertical Bar"
Elements: item
Stereotype: 'verticalbar'
Display: icon
Width: 5
Height: 20
MinWidth: 5
MinHeight: 20
LockSize: width
BaseColor: #000000
Begin
RoundedRect 0, 0, 5, 20, 1
End
Icon Termination
Elements: item
Stereotype: 'termination'
Display: icon
Width: 20
Height: 20
LockSize: ratio
BaseColor: #81d657
Begin
Circle 10, 10, 10
Circle 10, 10, 7
End
// **************
// ** Toolbars **
// **************
Toolbar Classes
Begin
Tool "Package", package
Tool "Class", class
Tool "Interface", class, "interface"
Tool "Control", class, "control"
Tool "Entity", class, "entity"
Tool "Boundary", class, "boundary"
Separator
Tool "Annotation", annotation
Tool "Boundary", boundary
End
Toolbar Components
Begin
Tool "Package", package
Tool "Component", component
Tool "Database", component, "database"
Separator
Tool "Annotation", annotation
Tool "Boundary", boundary
End
Toolbar UseCases
Begin
Tool "Package", package
Tool "UseCase", item, "usecase"
Tool "Actor", item, "actor"
Separator
Tool "Annotation", annotation
Tool "Boundary", boundary
End
Toolbar Activities
Begin
Tool "Start", item, "start"
Tool "Activity", item, "activity"
Tool "Condition", item, "condition"
Tool "Horiz. Bar", item, "horizontalbar"
Tool "Vert. Bar", item, "verticalbar"
Tool "Termination", item, "termination"
Separator
Tool "Annotation", annotation
Tool "Boundary", boundary
End