Changeset View
Changeset View
Standalone View
Standalone View
umbrello/umlwidgets/classifierwidget.cpp
Context not available. | |||||
89 | m_visualProperties = ShowAttributes; | 89 | m_visualProperties = ShowAttributes; | ||
---|---|---|---|---|---|
90 | updateSignatureTypes(); | 90 | updateSignatureTypes(); | ||
91 | } | 91 | } | ||
92 | | ||||
93 | if (m_umlObject->baseType() == UMLObject::ot_Class) { | ||||
94 | setToolTip(QLatin1String("<b>Class</b>" | ||||
95 | "<p>A class is an abstraction of a set of objects; at " | ||||
96 | "the same time it also acts as an abstract container for " | ||||
97 | "the methods that operate on those objects.</p>")); | ||||
98 | } | ||||
99 | if (m_umlObject->baseType() == UMLObject::ot_Interface) { | ||||
100 | setToolTip(QLatin1String("<b>Interface</b>" | ||||
101 | "<p>Interfaces define types in an abstract " | ||||
102 | "form as a collection of methods or other " | ||||
103 | "types that form the blueprint for a class " | ||||
104 | "of that type.</p>")); | ||||
105 | } | ||||
106 | if (m_umlObject->baseType() == UMLObject::ot_Instance) { | ||||
107 | setToolTip(QLatin1String("<b>Instance</b>" | ||||
108 | "<p>An individual entity with its own identity and " | ||||
109 | "value. A descriptor specifies the form and behavior " | ||||
110 | "of a set of instances with similar properties. An " | ||||
111 | "instance has identity and values that are consistent " | ||||
112 | "with the specification in the descriptor. Instances " | ||||
113 | "appear in models mainly as examples consistent with " | ||||
114 | "descriptor-level models.</p>")); | ||||
115 | } | ||||
116 | if (m_umlObject->baseType() == UMLObject::ot_Operation) { | ||||
117 | setToolTip(QLatin1String("<b>Operation</b>" | ||||
118 | "<p>An operation is an abstraction of a set of methods. " | ||||
119 | "Better abstraction is achieved by giving an operation " | ||||
120 | "fewer parameters.</p>")); | ||||
121 | } | ||||
92 | } | 122 | } | ||
93 | 123 | | |||
94 | /** | 124 | /** | ||
Context not available. | |||||
948 | const qreal cX = center.x(); | 978 | const qreal cX = center.x(); | ||
949 | const qreal cY = center.y(); | 979 | const qreal cY = center.y(); | ||
950 | 980 | | |||
981 | setToolTip(QLatin1String("<b>Interface Socket</b>" | ||||
982 | "<p>An interface may also be displayed as a small circle with " | ||||
983 | "the name of the interface placed below the symbol. The circle " | ||||
984 | "may be attached by a solid line to classes (or to other elements) " | ||||
985 | "that support it. It may also be attached to higher-level " | ||||
986 | "containers, such as packages, that contain the classes.</p>")); | ||||
987 | | ||||
951 | foreach (AssociationWidget *aw, requiredAssocs) { | 988 | foreach (AssociationWidget *aw, requiredAssocs) { | ||
952 | AssociationLine *assocLine = aw->associationLine(); | 989 | AssociationLine *assocLine = aw->associationLine(); | ||
953 | const QPointF p(assocLine->endPoint()); | 990 | const QPointF p(assocLine->endPoint()); | ||
Context not available. | |||||
1012 | font.setItalic(false); | 1049 | font.setItalic(false); | ||
1013 | const QFontMetrics &fm = getFontMetrics(FT_BOLD); | 1050 | const QFontMetrics &fm = getFontMetrics(FT_BOLD); | ||
1014 | const int fontHeight = fm.lineSpacing(); | 1051 | const int fontHeight = fm.lineSpacing(); | ||
1015 | | ||||
1016 | painter->drawRect(0, 0, 50, fontHeight); | 1052 | painter->drawRect(0, 0, 50, fontHeight); | ||
1053 | setToolTip(QLatin1String("<b>Package</b>" | ||||
1054 | "<p>To simplify complex class diagrams, you can group classes into " | ||||
1055 | "packages. A package is a collection of logically related UML elements.</p>")); | ||||
1017 | if (m_umlObject->stereotype() == QLatin1String("subsystem")) { | 1056 | if (m_umlObject->stereotype() == QLatin1String("subsystem")) { | ||
1018 | const int fHalf = fontHeight / 2; | 1057 | const int fHalf = fontHeight / 2; | ||
1019 | const int symY = fHalf; | 1058 | const int symY = fHalf; | ||
Context not available. | |||||
1022 | painter->drawLine(symX + 8, symY, symX + 8, symY + fHalf - 2); // right leg | 1061 | painter->drawLine(symX + 8, symY, symX + 8, symY + fHalf - 2); // right leg | ||
1023 | painter->drawLine(symX, symY, symX + 8, symY); // waist | 1062 | painter->drawLine(symX, symY, symX + 8, symY); // waist | ||
1024 | painter->drawLine(symX + 4, symY, symX + 4, symY - fHalf + 2); // head | 1063 | painter->drawLine(symX + 4, symY, symX + 4, symY - fHalf + 2); // head | ||
1064 | | ||||
1065 | setToolTip(QLatin1String("<b>Subsystem</b>" | ||||
1066 | "<p>A <b>Subsystem</b> is a package of elements treated as a unit, " | ||||
1067 | "including a specification of the behavior of the entire package " | ||||
1068 | "that is treated as a unit. A subsystem is modeled " | ||||
1069 | "both as a package and as a class while having " | ||||
1070 | "interfaces that describe its relationship to the rest of the " | ||||
1071 | "system and the circumstances under which it can be used.</p>")); | ||||
1025 | } | 1072 | } | ||
1026 | painter->drawRect(0, fontHeight - 1, w, h - fontHeight); | 1073 | painter->drawRect(0, fontHeight - 1, w, h - fontHeight); | ||
1027 | 1074 | | |||
Context not available. |