diff --git a/umbrello/umlwidgets/activitywidget.cpp b/umbrello/umlwidgets/activitywidget.cpp --- a/umbrello/umlwidgets/activitywidget.cpp +++ b/umbrello/umlwidgets/activitywidget.cpp @@ -76,6 +76,55 @@ m_activityType = activityType; updateGeometry(); UMLWidget::m_resizable = true; + + switch (activityType) { + case Initial: + setToolTip(i18n("Initial State" + "

An Initial State represents a starting " + "point for a Region; it is the point from " + "which execution of its contained behavior commences " + "when the Region is entered via default activation. " + "It is the source for no more than one Transition, which " + "may have an associated effect Behavior, but not an " + "associated trigger or guard. There can be no more than one " + "Initial State in a Region.

")); + break; + case Normal: + setToolTip(i18n("Activity" + "

An Activity/Action is the fundamental unit of " + "behavior specification in UML. An Action may take " + "a set of inputs and produce a set of outputs, " + "though either or both of these sets may be empty.

" + )); + break; + case End: + setToolTip(i18n("End State" + "

An End State describes that the object " + "has fulfilled its duty in this state and " + "is not necessary anymore.

")); + break; + case Final: + setToolTip(i18n("Final State" + "

Entering a terminate Pseudostate implies that " + "the execution of the StateMachine is terminated " + "immediately. The StateMachine does not exit any " + "States nor does it perform any exit Behaviors. " + "Any executing doActivity Behaviors are automatically " + "aborted. Entering a terminate Pseudostate is equivalent " + "to invoking a DestroyObjectAction.

")); + break; + case Branch: + setToolTip(i18n("Fork/Join" + "

Fork Pseudostates serve to split an incoming Transition " + "into two or more Transitions terminating on Vertices in " + "orthogonal Regions of a composite State. Join Pseudostates " + "perform a synchronization function, whereby all incoming Transitions " + "have to complete before execution can continue through an outgoing Transition.

")); + break; + default: + break; + } + } /** diff --git a/umbrello/umlwidgets/actorwidget.cpp b/umbrello/umlwidgets/actorwidget.cpp --- a/umbrello/umlwidgets/actorwidget.cpp +++ b/umbrello/umlwidgets/actorwidget.cpp @@ -16,6 +16,10 @@ #include "debug_utils.h" #include "umlview.h" +// kde includes +#include + + DEBUG_REGISTER_DISABLED(ActorWidget) /** @@ -28,6 +32,12 @@ : UMLWidget(scene, WidgetBase::wt_Actor, a) { setFixedAspectRatio(true); + + setToolTip(i18n("Actor" + "

An actor defines a coherent set of roles that it " + "can play when interacting with the entities. An actor " + "can play different roles with regard to each " + "use case with which it communicates.

")); } /** diff --git a/umbrello/umlwidgets/artifactwidget.cpp b/umbrello/umlwidgets/artifactwidget.cpp --- a/umbrello/umlwidgets/artifactwidget.cpp +++ b/umbrello/umlwidgets/artifactwidget.cpp @@ -17,6 +17,11 @@ #include "umlscene.h" #include "umlview.h" +// kde includes +#include + + + DEBUG_REGISTER_DISABLED(ArtifactWidget) /** @@ -29,6 +34,13 @@ : UMLWidget(scene, WidgetBase::wt_Artifact, a) { setSize(100, 30); + + setToolTip(i18n("Artifact" + "

A piece of information that is used " + "or produced by a software development pro-" + "cess, such as an external document or a " + "work product. An artifact can be a model, " + "description, or software.

")); } /** diff --git a/umbrello/umlwidgets/associationline.cpp b/umbrello/umlwidgets/associationline.cpp --- a/umbrello/umlwidgets/associationline.cpp +++ b/umbrello/umlwidgets/associationline.cpp @@ -19,6 +19,9 @@ #include "umldoc.h" #include "umlwidget.h" +// kde includes +#include + // qt includes #include #include @@ -149,7 +152,7 @@ * Includes start and end points. * @return number of points in the AssociationLine */ -int AssociationLine::count() const +int AssociationLine::count() const { return m_points.size(); } @@ -524,58 +527,214 @@ void AssociationLine::reconstructSymbols() { switch( m_associationWidget->associationType() ) { - case Uml::AssociationType::Exception: - setLayout(Uml::LayoutType::Polyline); - case Uml::AssociationType::State: - case Uml::AssociationType::Activity: - case Uml::AssociationType::UniAssociation: + case Uml::AssociationType::Generalization: + setToolTip(i18n("Generalization" + "

A Generalization is an inheritance link indicating " + "one class is a superclass of the other and has a triangle pointing " + "to the superclass.

")); + setStartSymbol(Symbol::None); + setEndSymbol(Symbol::ClosedArrow); + removeSubsetSymbol(); + removeCollaborationLine(); + break; + + case Uml::AssociationType::Aggregation: + setToolTip(i18n("Aggregation" + "

An Aggregation is an association in which one " + "class belongs to a collection. An aggregation has a diamond " + "end pointing to the part containing the whole and can " + "have either one-to-many or many-to-many multiplicity

")); + setStartSymbol(Symbol::Diamond); + setEndSymbol(Symbol::None); + removeSubsetSymbol(); + removeCollaborationLine(); + break; + case Uml::AssociationType::Dependency: + setToolTip(i18n("Dependency" + "

A relationship between two elements in " + "which a change to one element (the supplier) " + "may affect or supply information needed by " + "the other element (the client). This is a " + "term of convenience that groups together " + "several different kinds of modeling relationships.

")); + setLayout(Uml::LayoutType::Polyline); setStartSymbol(Symbol::None); setEndSymbol(Symbol::OpenArrow); removeSubsetSymbol(); removeCollaborationLine(); break; - case Uml::AssociationType::Relationship: + case Uml::AssociationType::Association: + setToolTip(i18n("Association" + "

An Association represents a relationship between instances " + "of the two classes. There is an association between two classes if an " + "instance of one class must know about the other in order to perform its " + "work. In a diagram, an association is a link connecting two classes.

")); + break; + + case Uml::AssociationType::Association_Self: + setToolTip(i18n("Self Association" + "

A stereotype of an association end (including link " + "end and the end of an association role), specifying a " + "pseudolink from an object to itself for the purpose of " + "calling an operation on the same object within an " + "interaction. It does not imply an actual data structure.

")); + break; + + case Uml::AssociationType::Coll_Message_Asynchronous: setStartSymbol(Symbol::None); - setEndSymbol(Symbol::CrowFeet); + setEndSymbol(Symbol::None); removeSubsetSymbol(); - removeCollaborationLine(); + createCollaborationLine(); break; - case Uml::AssociationType::Generalization: - case Uml::AssociationType::Realization: + case Uml::AssociationType::Seq_Message: + setToolTip(i18n("Sequence Message" + "

On a Sequence Diagram, a message is shown as a solid " + "arrow from the lifeline of one object (the sender) to the " + "lifeline of another object (the target). If the arrow is " + "perpendicular to the lifelines, the message transmission is " + "regarded as instantaneous or at least fast, compared with " + "external messages. If the arrow is slanted, then the message " + "transmission is regarded as having duration, during which other " + "messages might be sent. In case of a message from an object to " + "itself, the arrow may start and finish on the same lifeline.

")); + break; + + case Uml::AssociationType::Coll_Message_Self: + setToolTip(i18n("Call Message" + "

A transition in which the source state " + "and the target state are the same. It is " + "considered a state change. When it fires, " + "the source state is exited and reentered so " + "exit actions and entry actions are invoked. " + "It is not equivalent to an internal transition, " + "in which no change of state occurs.

")); setStartSymbol(Symbol::None); - setEndSymbol(Symbol::ClosedArrow); + setEndSymbol(Symbol::None); + removeSubsetSymbol(); + createCollaborationLine(); + break; + + case Uml::AssociationType::Seq_Message_Self: + setToolTip(i18n("Sequence Self Message ")); + break; + + case Uml::AssociationType::Containment: + setToolTip(i18n("Containment" + "

An object that exists to contain other " + "objects, and which provides operations to " + "access or iterate over its contents, or a " + "class describing such objects. For example, " + "arrays, lists, and sets.

")); + setStartSymbol(Symbol::Circle); + setEndSymbol(Symbol::None); removeSubsetSymbol(); removeCollaborationLine(); break; case Uml::AssociationType::Composition: - case Uml::AssociationType::Aggregation: + setToolTip(i18n("Composition" + "

A form of aggregation association with strong " + "ownership and coincident lifetime of parts by the " + "whole. A part may belong to only one composite.

")); setStartSymbol(Symbol::Diamond); setEndSymbol(Symbol::None); removeSubsetSymbol(); removeCollaborationLine(); break; - case Uml::AssociationType::Containment: - setStartSymbol(Symbol::Circle); - setEndSymbol(Symbol::None); + case Uml::AssociationType::Realization: + setToolTip(i18n("Realization" + "

The relationship between a specification " + "and its implementation; an indication of the " + "inheritance of behavior without the inheritance " + "of structure.

")); + setStartSymbol(Symbol::None); + setEndSymbol(Symbol::ClosedArrow); removeSubsetSymbol(); removeCollaborationLine(); break; + case Uml::AssociationType::UniAssociation: + setToolTip(i18n("UniAssociation" + "

Is a single directed arrow from a single source " + "and terminating on a single target. The association " + "only runs one direction.

")); + setLayout(Uml::LayoutType::Polyline); + setStartSymbol(Symbol::None); + setEndSymbol(Symbol::OpenArrow); + removeSubsetSymbol(); + removeCollaborationLine(); + break; + + case Uml::AssociationType::Anchor: + setToolTip(i18n("Anchor" + "

An anchor association that allows the modeller to tie or " + "associate a note object with another object.

")); + break; + + case Uml::AssociationType::State: + setToolTip(i18n("State Transition" + "

A Transition is a single directed arrow " + "originating from a single source and " + "terminating on a single target

")); + setLayout(Uml::LayoutType::Polyline); + setStartSymbol(Symbol::None); + setEndSymbol(Symbol::OpenArrow); + removeSubsetSymbol(); + removeCollaborationLine(); + break; + + case Uml::AssociationType::Activity: + setToolTip(i18n("Activity" + "

An activity is a coordinated " + "set of actions

")); + setLayout(Uml::LayoutType::Polyline); + setStartSymbol(Symbol::None); + setEndSymbol(Symbol::OpenArrow); + removeSubsetSymbol(); + removeCollaborationLine(); + break; + + case Uml::AssociationType::Exception: + setToolTip(i18n("Exception" + "

A signal raised in response to behavioral " + "faults by the underlying execution machinery.

")); + setLayout(Uml::LayoutType::Polyline); + setStartSymbol(Symbol::None); + setEndSymbol(Symbol::OpenArrow); + removeSubsetSymbol(); + removeCollaborationLine(); + break; + + case Uml::AssociationType::Category2Parent: + setToolTip(i18n("Category to Parent" + "

An anchor line between a category and its parent.

")); + break; + case Uml::AssociationType::Child2Category: + setToolTip(i18n("Child to Category" + "

An anchor line between a child object and its parent category.

")); setStartSymbol(Symbol::None); setEndSymbol(Symbol::None); createSubsetSymbol(); removeCollaborationLine(); break; + case Uml::AssociationType::Relationship: + setToolTip(i18n("Relationship" + "

An abstract semantic connection among model elements. " + "Kinds of relationships include association, generalization, " + "metarelationship, flow, and several kinds grouped under dependency.

")); + setStartSymbol(Symbol::None); + setEndSymbol(Symbol::CrowFeet); + removeSubsetSymbol(); + removeCollaborationLine(); + break; + case Uml::AssociationType::Coll_Message_Synchronous: - case Uml::AssociationType::Coll_Message_Asynchronous: - case Uml::AssociationType::Coll_Message_Self: setStartSymbol(Symbol::None); setEndSymbol(Symbol::None); removeSubsetSymbol(); @@ -869,7 +1028,7 @@ QPointF c1, c2; QPointF p1 = m_points.first(); // start point QPointF p2 = m_points.last(); // end point - + if (m_autoLayoutSpline) { qreal dx = p2.x() - p1.x(); qreal dy = p2.y() - p1.y(); @@ -893,7 +1052,7 @@ c2dx = 0; c2dy = -oneHalfY; } - + c1 = QPointF(p1.x() + c1dx, // control point 1 p1.y() + c1dy); c2 = QPointF(p2.x() + c2dx, // control point 2 @@ -901,12 +1060,12 @@ } else { //c1 = m_points[1]; //c2 = m_points[2]; - + //c1dx = c1.x() - p1.x(); //c1dy = c1.y() - p1.y(); //c2dx = c2.x() - p2.x(); //c2dy = c2.y() - p2.y(); - + c1 = QPointF(p1.x() + c1dx, // control point 1 p1.y() + c1dy); c2 = QPointF(p2.x() + c2dx, // control point 2 @@ -1074,10 +1233,10 @@ painter->drawRect(circle); } } - + //circle.moveCenter(savedStart); //painter->drawRect(circle); - + // draw bezier handles if (m_layout == Uml::LayoutType::Spline) { for (int i = 2; i < sz-1; ++i) { @@ -1085,12 +1244,12 @@ // if(m_layout == Uml::LayoutType::Spline) { QLineF mysegmentLine(savedStart, m_points[i-1]); painter->drawLine(mysegmentLine); - + QLineF mysegmentLine2(m_points[i], savedEnd); painter->drawLine(mysegmentLine2); - } + } } - + circle.moveCenter(savedEnd); painter->drawRect(circle); @@ -1111,7 +1270,7 @@ painter->drawLine(segmentLine); } } - + // debug info if (Tracer::instance()->isEnabled(QString::fromLatin1(metaObject()->className()))) { QPen p(Qt::green); diff --git a/umbrello/umlwidgets/associationwidget.cpp b/umbrello/umlwidgets/associationwidget.cpp --- a/umbrello/umlwidgets/associationwidget.cpp +++ b/umbrello/umlwidgets/associationwidget.cpp @@ -2404,10 +2404,10 @@ return QPointF(-1, -1); // never reached, just keep compilers happy } -/** +/** * Calculates the intersection (PS) between line P1P2 and a perpendicular line containing * P3, the result is returned in ResultingPoint. and result value represents the distance - * between ResultingPoint and P3; if this value is negative an error occurred. + * between ResultingPoint and P3; if this value is negative an error occurred. */ float AssociationWidget::perpendicularProjection(const QPointF& P1, const QPointF& P2, const QPointF& P3, QPointF& ResultingPoint) @@ -2957,7 +2957,7 @@ case ListPopupMenu::mt_Delete_Point: checkRemovePoint(m_eventScenePos); break; - + case ListPopupMenu::mt_Auto_Layout_Spline: checkAutoLayoutSpline(); break; diff --git a/umbrello/umlwidgets/boxwidget.cpp b/umbrello/umlwidgets/boxwidget.cpp --- a/umbrello/umlwidgets/boxwidget.cpp +++ b/umbrello/umlwidgets/boxwidget.cpp @@ -16,6 +16,9 @@ #include "uml.h" #include "umldoc.h" +// kde includes +#include + // qt includes #include @@ -35,6 +38,12 @@ m_usesDiagramLineColor = false; // boxes be black setLineColor(QColor("black")); setZValue(-10); + + setToolTip(i18n("Box" + "

A Box is a boundary object " + "that represents the interactions " + "between the actors and the system " + "of related use cases, objects, etc.

")); } /** diff --git a/umbrello/umlwidgets/categorywidget.cpp b/umbrello/umlwidgets/categorywidget.cpp --- a/umbrello/umlwidgets/categorywidget.cpp +++ b/umbrello/umlwidgets/categorywidget.cpp @@ -17,6 +17,9 @@ #include "umlview.h" #include "listpopupmenu.h" +// kde includes +#include + // qt includes #include @@ -32,6 +35,14 @@ : UMLWidget(scene, WidgetBase::wt_Category, o) { m_fixedAspectRatio = true; + + setToolTip(i18n("Category" + "

A derived Entity is said to be a Category when it represents a " + "collection of objects that is a subset of Union of the distinct " + "entity types. A Category is modelled when the need arises for a " + "single superclass/subclass relationship with more than one superclass, " + "where the superclasses represent different entity types. ( Much like " + "multiple inheritance in Object Oriented Programming ).

")); } /** diff --git a/umbrello/umlwidgets/classifierwidget.cpp b/umbrello/umlwidgets/classifierwidget.cpp --- a/umbrello/umlwidgets/classifierwidget.cpp +++ b/umbrello/umlwidgets/classifierwidget.cpp @@ -30,6 +30,9 @@ #include "umlview.h" #include "widget_utils.h" +// kde includes +#include + // qt includes #include @@ -89,6 +92,38 @@ m_visualProperties = ShowAttributes; updateSignatureTypes(); } + + if (m_umlObject->baseType() == UMLObject::ot_Class) { + setToolTip(i18n("Class" + "

A class is an abstraction of a set of objects; at " + "the same time it also acts as an abstract container for " + "the methods that operate on those objects.

")); + } + + if (m_umlObject->baseType() == UMLObject::ot_Interface) { + setToolTip(i18n("Interface" + "

Interfaces define types in an abstract " + "form as a collection of methods or other " + "types that form the blueprint for a class " + "of that type.

")); + } + + if (m_umlObject->baseType() == UMLObject::ot_Instance) { + setToolTip(i18n("Instance" + "

An individual entity with its own identity and " + "value. A descriptor specifies the form and behavior " + "of a set of instances with similar properties. An " + "instance has identity and values that are consistent " + "with the specification in the descriptor. Instances " + "appear in models mainly as examples consistent with " + "descriptor-level models.

")); + } + if (m_umlObject->baseType() == UMLObject::ot_Operation) { + setToolTip(i18n("Operation" + "

An operation is an abstraction of a set of methods. " + "Better abstraction is achieved by giving an operation " + "fewer parameters.

")); + } } /** @@ -1012,8 +1047,10 @@ font.setItalic(false); const QFontMetrics &fm = getFontMetrics(FT_BOLD); const int fontHeight = fm.lineSpacing(); - painter->drawRect(0, 0, 50, fontHeight); + setToolTip(i18n("Package" + "

To simplify complex class diagrams, you can group classes into " + "packages. A package is a collection of logically related UML elements.

")); if (m_umlObject->stereotype() == QLatin1String("subsystem")) { const int fHalf = fontHeight / 2; const int symY = fHalf; @@ -1022,6 +1059,14 @@ painter->drawLine(symX + 8, symY, symX + 8, symY + fHalf - 2); // right leg painter->drawLine(symX, symY, symX + 8, symY); // waist painter->drawLine(symX + 4, symY, symX + 4, symY - fHalf + 2); // head + + setToolTip(i18n("Subsystem" + "

A Subsystem is a package of elements treated as a unit, " + "including a specification of the behavior of the entire package " + "that is treated as a unit. A subsystem is modeled " + "both as a package and as a class while having " + "interfaces that describe its relationship to the rest of the " + "system and the circumstances under which it can be used.

")); } painter->drawRect(0, fontHeight - 1, w, h - fontHeight); @@ -1151,6 +1196,13 @@ */ void ClassifierWidget::setDrawAsCircle(bool drawAsCircle) { + setToolTip(i18n("Interface Socket" + "

An interface may also be displayed as a small circle with " + "the name of the interface placed below the symbol. The circle " + "may be attached by a solid line to classes (or to other elements) " + "that support it. It may also be attached to higher-level " + "containers, such as packages, that contain the classes.

")); + setVisualPropertyCmd(DrawAsCircle, drawAsCircle); const int circleSize = CIRCLE_SIZE + SOCKET_INCREMENT; if (drawAsCircle) { diff --git a/umbrello/umlwidgets/combinedfragmentwidget.cpp b/umbrello/umlwidgets/combinedfragmentwidget.cpp --- a/umbrello/umlwidgets/combinedfragmentwidget.cpp +++ b/umbrello/umlwidgets/combinedfragmentwidget.cpp @@ -235,6 +235,96 @@ m_dashLines.push_back(new FloatingDashLineWidget(m_scene, Uml::ID::None, this)); m_scene->addWidgetCmd(m_dashLines.back()); } + + switch (combinedfragmentType) { + case Ref: + setToolTip(i18n("Reference" + "

A ref Combined Fragment allows you to name the diagram.

")); + break; + case Opt: + setToolTip(i18n("Option" + "

opt represents a choice of behavior where " + "either the (sole) operand happens or nothing happens. " + "An option is semantically equivalent to an alternative " + "Combined Fragment where there is one operand with " + "non-empty content and the second operand is empty.

")); + break; + case Break: + setToolTip(i18n("Break" + "

break represents a breaking " + "scenario in the sense that the operand is a scenario that is " + "performed instead of the remainder of the enclosing Fragment. " + "A break operator with a guard is chosen when the guard is true " + "and the rest of the enclosing Interaction Fragment is ignored. " + "When the guard of the break operand is false, the break operand " + "is ignored and the rest of the enclosing Fragment is chosen. " + "The choice between a break operand without a guard and the rest " + "of the enclosing Interaction Fragment is done non-deterministically. " + "A Combined Fragment with break should cover all Lifelines of the " + "enclosing InteractionFragment.

")); + break; + case Loop: + setToolTip(i18n("Loop" + "

The loop operand will be repeated a number of times. " + "The Guard may include a lower and an upper number of iterations of the loop " + "as well as a Boolean expression. The semantics is such that a loop will " + "iterate the ‘minint’ number of times (given by the iteration expression " + "in the guard) and at most the ‘maxint’ number of times. After the minimum " + "number of iterations have executed and the Boolean expression is false the " + "loop will terminate. The loop construct represents a recursive application " + "of the seq operator where the loop operand is sequenced after the result of " + "earlier iterations.

")); + break; + case Neg: + setToolTip(i18n("Negative" + "

neg represents " + "traces that are defined to be invalid. " + "The set of traces that defined a Combined Fragment with " + "negative is equal to the set of traces given by its (sole) operand, only that " + "this set is a set of invalid rather than valid traces. All Interaction Fragments " + "that are different from Negative are considered positive meaning that they " + "describe traces that are valid and should be possible.

")); + break; + case Crit: + setToolTip(i18n("Critical" + "

critical represents a critical region. A " + "critical region means that the traces of the region " + "cannot be interleaved by other Occurrence Specifications " + "(on those Lifelines covered by the region). This means " + "that the region is treated atomically by the enclosing " + "fragment when determining the set of valid traces. Even " + "though enclosing Combined Fragments may imply that some " + "Occurrence Specifications may interleave into the region, " + "such as with par-operator, this is prevented by defining " + "a region.

")); + break; + case Ass: + setToolTip(i18n("Assertion" + "

assert represents an assertion. The sequences " + "of the operand of the assertion are the only valid " + "continuations. All other continuations result in an " + "invalid trace.

" + )); + break; + case Alt: + setToolTip(i18n("Alternative" + "

alt represents a choice or " + "alternatives of behavior. At most one of the " + "operands will be chosen. The chosen operand " + "must have an explicit or implicit guard expression " + "that evaluates to true at this point in the " + "interaction.

")); + break; + case Par: + setToolTip(i18n("Parallel" + "

parallel represents a parallel merge between " + "the behaviors of the operands. The Occurrence Specifications " + "of the different operands can be interleaved in any way as " + "long as the ordering imposed by each operand as such is preserved.

")); + break; + default: + break; + } } /** diff --git a/umbrello/umlwidgets/componentwidget.cpp b/umbrello/umlwidgets/componentwidget.cpp --- a/umbrello/umlwidgets/componentwidget.cpp +++ b/umbrello/umlwidgets/componentwidget.cpp @@ -21,6 +21,9 @@ #include "package.h" #include "portwidget.h" +// kde includes +#include + DEBUG_REGISTER_DISABLED(ComponentWidget) /** @@ -39,6 +42,10 @@ const Settings::OptionState& ops = m_scene->optionState(); m_showStereotype = ops.classState.showStereoType; } + + setToolTip(i18n("Component" + "

A component is a code module. Component diagrams are physical " + "analogs of a class diagram.

")); } /** diff --git a/umbrello/umlwidgets/datatypewidget.cpp b/umbrello/umlwidgets/datatypewidget.cpp --- a/umbrello/umlwidgets/datatypewidget.cpp +++ b/umbrello/umlwidgets/datatypewidget.cpp @@ -20,6 +20,9 @@ #include "umlscene.h" #include "umlview.h" +// kde includes +#include + // qt includes #include @@ -31,10 +34,17 @@ * @param scene The parent of this DatatypeWidget. * @param d The UMLClassifier this will be representing. */ -DatatypeWidget::DatatypeWidget(UMLScene *scene, UMLClassifier *d) +DatatypeWidget::DatatypeWidget(UMLScene *scene, UMLClassifier *d) : UMLWidget(scene, WidgetBase::wt_Datatype, d) { setSize(100, 30); + + setToolTip(i18n("Data Type" + "

A data type is an abstraction in the " + "context of a programming language. A " + "data type has a unique name that " + "distinguishes it from other data " + "types.

")); } /** diff --git a/umbrello/umlwidgets/diagramproxywidget.cpp b/umbrello/umlwidgets/diagramproxywidget.cpp --- a/umbrello/umlwidgets/diagramproxywidget.cpp +++ b/umbrello/umlwidgets/diagramproxywidget.cpp @@ -24,6 +24,9 @@ #include "umlwidget.h" #include "selectdiagramdialog.h" +// kde includes +#include + DEBUG_REGISTER_DISABLED(DiagramProxyWidget) DiagramProxyWidget::DiagramProxyWidget(UMLWidget *widget, qreal borderWidth) @@ -33,6 +36,12 @@ , m_borderWidth(borderWidth) , m_showLinkedDiagram(true) { + widget->setToolTip(i18n("State" + "

A State models a situation in the execution of " + "a StateMachine Behavior during which some invariant " + "condition holds. In most cases this condition is not " + "explicitly defined, but is implied, usually through the " + "name associated with the State.

")); } Uml::ID::Type DiagramProxyWidget::diagramLink() const diff --git a/umbrello/umlwidgets/entitywidget.cpp b/umbrello/umlwidgets/entitywidget.cpp --- a/umbrello/umlwidgets/entitywidget.cpp +++ b/umbrello/umlwidgets/entitywidget.cpp @@ -27,6 +27,9 @@ #include "umlview.h" #include "uniqueconstraint.h" +// kde includes +#include + DEBUG_REGISTER_DISABLED(EntityWidget) /** @@ -39,6 +42,10 @@ : UMLWidget(scene, WidgetBase::wt_Entity, o) { setSize(100, 30); + + setToolTip(i18n("Entity" + "

Entity objects represent the persistent " + "information tracked by the system.

")); } /** diff --git a/umbrello/umlwidgets/enumwidget.cpp b/umbrello/umlwidgets/enumwidget.cpp --- a/umbrello/umlwidgets/enumwidget.cpp +++ b/umbrello/umlwidgets/enumwidget.cpp @@ -25,6 +25,9 @@ #include "umlscene.h" #include "umlview.h" +// kde includes +#include + DEBUG_REGISTER_DISABLED(EnumWidget) /** @@ -47,6 +50,11 @@ // For completeness only. Not supposed to happen. m_showPackage = false; } + + setToolTip(i18n("Enum" + "

An enumeration, by the keyword enum and " + "followed by a type name is a set of integer " + "constants represented by identifiers.

")); } /** diff --git a/umbrello/umlwidgets/floatingdashlinewidget.cpp b/umbrello/umlwidgets/floatingdashlinewidget.cpp --- a/umbrello/umlwidgets/floatingdashlinewidget.cpp +++ b/umbrello/umlwidgets/floatingdashlinewidget.cpp @@ -43,6 +43,8 @@ const QFontMetrics &fm = getFontMetrics(FT_NORMAL); const int fontHeight = fm.lineSpacing(); setSize(10, fontHeight); + + setToolTip(i18n("Floating Dashed Line")); } /** diff --git a/umbrello/umlwidgets/floatingtextwidget.cpp b/umbrello/umlwidgets/floatingtextwidget.cpp --- a/umbrello/umlwidgets/floatingtextwidget.cpp +++ b/umbrello/umlwidgets/floatingtextwidget.cpp @@ -70,6 +70,16 @@ m_Text = text; m_resizable = false; setZValue(10); //make sure always on top. + + setToolTip(i18n("Floating Text" + "

This is a multipurpose item. In " + "its simplest form it will display a " + "line of text. It can also be setup to " + "be the text for an operation with " + "regard to the MessageWidget on the " + "sequence diagram. It is also used " + "for the text required for an " + "association.

")); } /** diff --git a/umbrello/umlwidgets/forkjoinwidget.cpp b/umbrello/umlwidgets/forkjoinwidget.cpp --- a/umbrello/umlwidgets/forkjoinwidget.cpp +++ b/umbrello/umlwidgets/forkjoinwidget.cpp @@ -17,6 +17,9 @@ #include "umldoc.h" #include "listpopupmenu.h" +// kde includes +#include + // qt includes #include @@ -36,6 +39,12 @@ setSize(10, 40); m_usesDiagramFillColor = false; setFillColorCmd(QColor("black")); + setToolTip(i18n("Fork Join" + "

A Fork is a complex transition in which one source state is " + "replaced by two or more target states, resulting in an increase in the " + "number of active states. A Join is the reverse of a Fork, in " + "which two source states are combined into one target state.

" + )); } /** diff --git a/umbrello/umlwidgets/messagewidget.cpp b/umbrello/umlwidgets/messagewidget.cpp --- a/umbrello/umlwidgets/messagewidget.cpp +++ b/umbrello/umlwidgets/messagewidget.cpp @@ -865,6 +865,32 @@ // Position the floating text accordingly setTextPosition(); + switch (m_sequenceMessageType) { + case Uml::SequenceMessage::Lost: + setToolTip(i18n("Lost Message")); + break; + case Uml::SequenceMessage::Found: + setToolTip(i18n("Found Message")); + break; + case Uml::SequenceMessage::Creation: + setToolTip(i18n("Creation Message" + "

The instantiation and initialization of an object " + "or other instance (such as a use case instance)

")); + break; + case Uml::SequenceMessage::Synchronous: + setToolTip(i18n("Synchronous Message" + "

A sent message where the sending object pauses to " + "wait for a response; a call.

")); + break; + case Uml::SequenceMessage::Asynchronous: + setToolTip(i18n("Asynchronous Message" + "

A message sent where the sending object does not " + "wait for results or reply.

")); + break; + default: + break; + } + emit sigMessageMoved(); return true; } diff --git a/umbrello/umlwidgets/nodewidget.cpp b/umbrello/umlwidgets/nodewidget.cpp --- a/umbrello/umlwidgets/nodewidget.cpp +++ b/umbrello/umlwidgets/nodewidget.cpp @@ -17,6 +17,9 @@ #include "umlscene.h" #include "umlview.h" +// kde includes +#include + // qt includes #include #include @@ -34,6 +37,10 @@ { setSize(100, 30); setZValue(1); // above box but below UMLWidget because may embed widgets + + setToolTip(i18n("Node" + "

The physical hardware is made up of nodes. Each " + "component belongs on a node.

")); } /** diff --git a/umbrello/umlwidgets/notewidget.cpp b/umbrello/umlwidgets/notewidget.cpp --- a/umbrello/umlwidgets/notewidget.cpp +++ b/umbrello/umlwidgets/notewidget.cpp @@ -141,6 +141,33 @@ void NoteWidget::setNoteType(NoteType noteType) { m_noteType = noteType; + + switch(m_noteType) { + case NoteWidget::Normal : + setToolTip(i18n("Note" + "

A comment may be attached to a model element, " + "a presentation element, or a set of elements. It " + "provides a text description of arbitrary information, " + "but it has no semantic impact

")); + break; + case NoteWidget::PreCondition : + setToolTip(i18n("PreCondition" + "

A precondition is a predicate that " + "must be true before an operation is " + "invoked

")); + break; + case NoteWidget::PostCondition : + setToolTip(i18n("PostCondition" + "

A postcondition is a predicate that " + "must be true after an operation is " + "invoked

")); + break; + case NoteWidget::Transformation : + setToolTip(i18n("Transformation")); + break; + default: + break; + } } /** diff --git a/umbrello/umlwidgets/objectnodewidget.cpp b/umbrello/umlwidgets/objectnodewidget.cpp --- a/umbrello/umlwidgets/objectnodewidget.cpp +++ b/umbrello/umlwidgets/objectnodewidget.cpp @@ -178,9 +178,9 @@ */ ObjectNodeWidget::ObjectNodeType ObjectNodeWidget::toObjectNodeType(const QString& type) { - if (type == QLatin1String("Central buffer")) + if (type == QLatin1String("Central Buffer")) return ObjectNodeWidget::Buffer; - if (type == QLatin1String("Data store")) + if (type == QLatin1String("Data Store")) return ObjectNodeWidget::Data; if (type == QLatin1String("Object Flow")) return ObjectNodeWidget::Flow; @@ -196,6 +196,32 @@ { m_objectNodeType = objectNodeType; UMLWidget::m_resizable = true; + + switch (m_objectNodeType) { + case ObjectNodeWidget::Normal : + setToolTip(i18n("Object Node" + "

A node is a run-time physical object that " + "represents a computational resource, which " + "generally has at least a memory and often " + "processing capability. Run-time objects and " + "run-time component instances may reside on nodes.

")); + break; + case ObjectNodeType::Buffer : + setToolTip(i18n("Buffer Object Node")); + break; + case ObjectNodeWidget::Data : + setToolTip(i18n("Data Object Node")); + break; + case Flow: + setToolTip(i18n("Flow Object Node" + "

A variety of control flow that represents " + "the relationship between an object and the " + "object, operation, or transition that creates " + "it (as an output) or uses it (as an input).

")); + break; + default : + break; + } } /** @@ -306,8 +332,8 @@ bool pressedOK = false; int current = 0; const QStringList list = QStringList() - << QLatin1String("Central buffer") - << QLatin1String("Data store") + << QLatin1String("Central Buffer") + << QLatin1String("Data Store") << QLatin1String("Object Flow"); #if QT_VERSION >= 0x050000 @@ -321,9 +347,9 @@ if (pressedOK) { targetWidget->asObjectNodeWidget()->setObjectNodeType(type); - if (type == QLatin1String("Data store")) + if (type == QLatin1String("Data Store")) Dialog_Utils::askNameForWidget(targetWidget, i18n("Enter the name of the data store node"), i18n("Enter the name of the data store node"), i18n("data store name")); - if (type == QLatin1String("Central buffer")) + if (type == QLatin1String("Central Buffer")) Dialog_Utils::askNameForWidget(targetWidget, i18n("Enter the name of the buffer node"), i18n("Enter the name of the buffer"), i18n("centralBuffer")); if (type == QLatin1String("Object Flow")) { Dialog_Utils::askNameForWidget(targetWidget, i18n("Enter the name of the object flow"), i18n("Enter the name of the object flow"), i18n("object flow")); diff --git a/umbrello/umlwidgets/objectwidget.cpp b/umbrello/umlwidgets/objectwidget.cpp --- a/umbrello/umlwidgets/objectwidget.cpp +++ b/umbrello/umlwidgets/objectwidget.cpp @@ -66,6 +66,12 @@ } else { m_pLine = 0; } + + setToolTip(i18n("Object" + "

An object is the instance " + "of a class and contains the " + "attributes that the class " + "defines.

")); } /** diff --git a/umbrello/umlwidgets/pinwidget.cpp b/umbrello/umlwidgets/pinwidget.cpp --- a/umbrello/umlwidgets/pinwidget.cpp +++ b/umbrello/umlwidgets/pinwidget.cpp @@ -45,6 +45,12 @@ m_pName->setText(name()); // to get geometry update m_pName->activate(); setVisible(true); + setToolTip(i18n("Pin Port" + "

A Pin Port interface may also be displayed as a small circle " + "with the name of the interface placed below the symbol. The circle may be " + "attached by a solid line to classifiers that support it. This indicates " + "that the class provides all of the operations in the interface type (and " + "possibly more).

")); } /** diff --git a/umbrello/umlwidgets/portwidget.cpp b/umbrello/umlwidgets/portwidget.cpp --- a/umbrello/umlwidgets/portwidget.cpp +++ b/umbrello/umlwidgets/portwidget.cpp @@ -42,7 +42,10 @@ PortWidget::PortWidget(UMLScene *scene, UMLPort *d, UMLWidget *owner) : PinPortBase(scene, WidgetBase::wt_Port, owner, d) { - setToolTip(d->name()); + //setToolTip(d->name()); + + setToolTip(i18n("Port" + "

This is a port.

")); } /** diff --git a/umbrello/umlwidgets/preconditionwidget.cpp b/umbrello/umlwidgets/preconditionwidget.cpp --- a/umbrello/umlwidgets/preconditionwidget.cpp +++ b/umbrello/umlwidgets/preconditionwidget.cpp @@ -59,6 +59,14 @@ connect(m_objectWidget, SIGNAL(sigWidgetMoved(Uml::ID::Type)), this, SLOT(slotWidgetMoved(Uml::ID::Type))); calculateDimensions(); + + if(isPreconditionWidget()) { + setToolTip(i18n("Precondition" + "

A precondition is a Boolean expression " + "that must be true when an operation is called. " + "It is the responsibility of the caller to satisfy " + "the condition.

")); + } } /** diff --git a/umbrello/umlwidgets/regionwidget.cpp b/umbrello/umlwidgets/regionwidget.cpp --- a/umbrello/umlwidgets/regionwidget.cpp +++ b/umbrello/umlwidgets/regionwidget.cpp @@ -33,6 +33,11 @@ RegionWidget::RegionWidget(UMLScene* scene, Uml::ID::Type id) : UMLWidget(scene, WidgetBase::wt_Region, id) { + setToolTip(i18n("Region" + "

A Region denotes a behavior fragment " + "that may execute concurrently with its " + "orthogonal Regions.

" + )); } /** diff --git a/umbrello/umlwidgets/seqlinewidget.cpp b/umbrello/umlwidgets/seqlinewidget.cpp --- a/umbrello/umlwidgets/seqlinewidget.cpp +++ b/umbrello/umlwidgets/seqlinewidget.cpp @@ -18,6 +18,9 @@ #include "umlscene.h" #include "umlview.h" +// kde includes +#include + //qt includes #include @@ -41,6 +44,16 @@ m_DestructionBox.line1 = 0; m_nLengthY = 250; setupDestructionBox(); + + setToolTip(i18n("Sequence Line" + "

A dashed line is drawn from the object symbol " + "to the point at which the object is destroyed (if " + "that happens during the time shown by the diagram). " + "This line is called the lifeline. A large X is " + "placed at the point at which the object ceases to " + "exist, either at the head of the arrow for the " + "message that destroys the object or at the point at " + "which the object destroys itself.

")); } /** diff --git a/umbrello/umlwidgets/signalwidget.cpp b/umbrello/umlwidgets/signalwidget.cpp --- a/umbrello/umlwidgets/signalwidget.cpp +++ b/umbrello/umlwidgets/signalwidget.cpp @@ -155,8 +155,8 @@ m_pName->setVisible((m_pName->text().length() > 0)); m_pName->updateGeometry(); } - break; + default: uWarning() << "Unknown signal type:" << m_signalType; break; @@ -225,6 +225,29 @@ void SignalWidget::setSignalType(SignalType signalType) { m_signalType = signalType; + + if(signalType == SignalWidget::Send) { + setToolTip(i18n("Send Signal" + "

A Signal is a specification of a kind of " + "communication between objects in which a " + "reaction is asynchronously triggered in " + "the receiver without a reply.

")); + } + if(signalType == SignalWidget::Accept) { + setToolTip(i18n("Accept Signal" + "

A Receiver specifies that its owning Class or " + "Interface is prepared to react to the receipt of " + "a Signal. A Receiver matches a Signal if the " + "received Signal is a specialization of the " + "Receiver's signal.

")); + } + if(signalType == SignalWidget::Time) { + setToolTip(i18n("Time Signal" + "

A Receiver specifies that its owning Class or " + "Interface is prepared to react to the receipt of " + "a Time Signal.

")); + } + } /** diff --git a/umbrello/umlwidgets/statewidget.cpp b/umbrello/umlwidgets/statewidget.cpp --- a/umbrello/umlwidgets/statewidget.cpp +++ b/umbrello/umlwidgets/statewidget.cpp @@ -131,6 +131,12 @@ painter->drawEllipse(3, 3, w - 6, h - 6); break; case StateWidget::Fork: + { + painter->setPen(Qt::black); + painter->setBrush(Qt::black); + painter->drawRect(rect()); + } + break; case StateWidget::Join: { painter->setPen(Qt::black); @@ -414,6 +420,71 @@ setAutoResize(false); setResizable(false); } + + switch (stateType) { + case StateWidget::Initial: + setToolTip(i18n("Initial State" + "

Objects begin their lifecycle in " + "an initial state. In a method State-" + "chart, the initial state marks the " + "beginning of the method.

")); + break; + case StateWidget::End: + setToolTip(i18n("End State" + "

An End State describes that the object " + "has fulfilled its duty in this state and " + "is not necessary anymore.

")); + break; + case StateWidget::Fork: + setToolTip(i18n("Fork" + "

A Fork must have exactly one incoming " + "Transition and exactly two outgoing " + "Transitions.

")); + break; + case StateWidget::Join: + setToolTip(i18n("Join" + "

A Join must have at least two " + "incoming Transitions and exactly one " + "outgoing Transition.

")); + break; + case StateWidget::Junction: + setToolTip(i18n("Junction" + "

A junction state is a pseudostate that makes it possible to " + "build a single overall transition from a series of transition " + "fragments. A junction state may have one or more incoming " + "transition segments and one or more outgoing transition segments. " + "It may not have an internal activity, a submachine, or any outgoing " + "transitions with event triggers. It is a dummy state to structure " + "transitions and not a state that can be active for any finite time.

")); + break; + case StateWidget::DeepHistory: + setToolTip(i18n("Deep History" + "

Deep History represents the full " + "state configuration of the most recent " + "visit to the containing Region.

")); + break; + case StateWidget::ShallowHistory: + setToolTip(i18n("Shallow History" + "

Shallow History represents a return " + "to only the topmost substate of the most " + "recent state configuration, which is " + "entered using the default entry rule.

" + )); + break; + case StateWidget::Choice: + setToolTip(i18n("Choice" + "

An element in a state machine in which a single " + "trigger leads to more than one possible outcome, " + "each with its own guard condition.

")); + break; + case StateWidget::Combined: + setToolTip(i18n("Combined State" + "

A state that consists of either concurrent " + "(orthogonal) substates or sequential (disjoint) substates.

")); + break; + default: + break; + } } /** @@ -606,4 +677,3 @@ break; } } - diff --git a/umbrello/umlwidgets/usecasewidget.cpp b/umbrello/umlwidgets/usecasewidget.cpp --- a/umbrello/umlwidgets/usecasewidget.cpp +++ b/umbrello/umlwidgets/usecasewidget.cpp @@ -16,6 +16,9 @@ #include "usecase.h" #include "umlview.h" +// kde includes +#include + DEBUG_REGISTER_DISABLED(UseCaseWidget) /** @@ -26,6 +29,11 @@ UseCaseWidget::UseCaseWidget(UMLScene * scene, UMLUseCase *o) : UMLWidget(scene, WidgetBase::wt_UseCase, o) { + setToolTip(i18n("Use Case" + "

A use case specifies all possible " + "scenarios for a given piece of " + "functionality. A use case is " + "initiated by an actor.

")); } /**