ObjectWidget Class Reference
Displays an instance UMLObject of a concept. Displays an instance of a Concept. More...
#include <objectwidget.h>
Inheritance diagram for ObjectWidget:

Public Slots | |
| void | slotMenuSelection (int sel) |
| Handles a popup menu selection. | |
| virtual void | slotColorChanged (Uml::IDType viewID) |
| Handles a color change signal. | |
| void | slotMessageMoved () |
| Called when a message widget with an end on this object has moved up or down. | |
Public Member Functions | |
| ObjectWidget (UMLView *view, UMLObject *o, Uml::IDType lid=Uml::id_None) | |
| Creates an ObjectWidget. | |
| virtual | ~ObjectWidget () |
| destructor | |
| virtual void | setX (int x) |
| Sets the x-coordinate. | |
| virtual void | setY (int y) |
| Sets the y-coordinate. | |
| Uml::IDType | getLocalID () const |
| Returns the local ID for this object. | |
| QString | getInstanceName () const |
| Returns the instance name. | |
| void | setInstanceName (const QString &name) |
| Sets the instance name. | |
| bool | getMultipleInstance () const |
| Returns whether object is representing a multi-object. | |
| void | setMultipleInstance (bool multiple) |
| Sets whether representing a multi-instance object. | |
| void | setLocalID (Uml::IDType id) |
| Sets the local id of the object. | |
| bool | activate (IDChangeLog *ChangeLog=0) |
| Activate the object after serializing it from a QDataStream. | |
| void | draw (QPainter &p, int offsetX, int offsetY) |
| Override default method. | |
| virtual void | moveEvent (QMoveEvent *) |
| Overrides the standard operation. | |
| void | cleanup () |
| Used to cleanup any other widget it may need to delete. | |
| void | showProperties () |
| Show a properties dialog for an ObjectWidget. | |
| bool | getDrawAsActor () const |
| Returns whether to draw as an Actor or not. | |
| void | setDrawAsActor (bool drawAsActor) |
| Sets whether to draw as an Actor. | |
| void | setShowDestruction (bool bShow) |
| Sets whether to show deconstruction on sequence line. | |
| bool | getShowDestruction () const |
| Returns whether to show deconstruction on sequence line. | |
| int | topMargin () |
| Returns the top margin constant (Y axis value). | |
| int | getEndLineY () |
| Returns the end Y co-ord of the seq. | |
| void | messageAdded (MessageWidget *message) |
| Add a message widget to the list. | |
| void | messageRemoved (MessageWidget *message) |
| Remove a message widget from the list. | |
| bool | canTabUp () |
| Returns whether or not the widget can be moved vertically up. | |
| bool | messageOverlap (int y, MessageWidget *messageWidget) |
| Returns whether a message is overlapping with another message. | |
| SeqLineWidget * | getSeqLine () |
| Return the SeqLineWidget. | |
| void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
| Saves to the <objectwidget> XMI element. | |
| bool | loadFromXMI (QDomElement &qElement) |
| Loads from a <objectwidget> XMI element. | |
Protected Member Functions | |
| QSize | calculateSize () |
| Overrides method from UMLWidget. | |
| void | drawActor (QPainter &p, int offsetX, int offsetY) |
| Draw the object as an actor. | |
| void | drawObject (QPainter &p, int offsetX, int offsetY) |
| Draw the object as an object (default). | |
| void | tabUp () |
| Move the object up on a sequence diagram. | |
| void | tabDown () |
| Move the object down on a sequence diagram. | |
Protected Attributes | |
| SeqLineWidget * | m_pLine |
| QString | m_InstanceName |
| Instance name of object. | |
| Uml::IDType | m_nLocalID |
| Local ID used on views. | |
| bool | m_bMultipleInstance |
| Determines whether to draw an object as a multiple object instance. | |
| bool | m_bDrawAsActor |
| Determines whether the object should be drawn as an Actor or an Object. | |
| bool | m_bShowDestruction |
| Determines whether to show object destruction on sequence diagram line. | |
Detailed Description
Displays an instance UMLObject of a concept. Displays an instance of a Concept.
- Author:
- Paul Hensgen <phensgen@techie.com>
- See also:
- UMLWidget Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
Definition at line 35 of file objectwidget.h.
Constructor & Destructor Documentation
|
||||||||||||||||
|
Creates an ObjectWidget.
Definition at line 40 of file objectwidget.cpp. References UMLWidget::init(), and m_nLocalID. |
|
|
destructor
Definition at line 69 of file objectwidget.cpp. |
Member Function Documentation
|
|
Sets the x-coordinate. Reimplements the method from UMLWidget.
Reimplemented from UMLWidget. Definition at line 174 of file objectwidget.cpp. References moveEvent(), and UMLWidget::setX(). |
|
|
Sets the y-coordinate. Reimplements the method from UMLWidget.
Reimplemented from UMLWidget. Definition at line 179 of file objectwidget.cpp. References moveEvent(), and UMLWidget::setY(). Referenced by MessageWidget::MessageWidget(), tabDown(), and tabUp(). |
|
|
Returns the local ID for this object. This ID is used so that many objects of the same UMLObject instance can be on the same diagram.
Definition at line 75 of file objectwidget.h. References m_nLocalID. Referenced by UMLView::onWidgetLine(), AssociationWidget::operator==(), and MessageWidget::slotWidgetMoved(). |
|
|
Returns the instance name.
Reimplemented from UMLWidget. Definition at line 84 of file objectwidget.h. References m_InstanceName. |
|
|
Sets the instance name.
Reimplemented from UMLWidget. Definition at line 93 of file objectwidget.h. References m_InstanceName. |
|
|
Returns whether object is representing a multi-object.
Definition at line 102 of file objectwidget.h. References m_bMultipleInstance. |
|
|
Sets whether representing a multi-instance object.
Definition at line 156 of file objectwidget.cpp. References m_bMultipleInstance, and UMLWidget::updateComponentSize(). |
|
|
Sets the local id of the object.
Definition at line 118 of file objectwidget.h. References m_nLocalID. |
|
|
Activate the object after serializing it from a QDataStream.
Reimplemented from UMLWidget. Definition at line 165 of file objectwidget.cpp. References m_bShowDestruction, moveEvent(), and SeqLineWidget::setupDestructionBox(). |
|
||||||||||||||||
|
Override default method.
Implements UMLWidget. Definition at line 71 of file objectwidget.cpp. References drawActor(), drawObject(), UMLWidget::drawSelected(), m_bDrawAsActor, and UMLWidget::setPen(). Referenced by loadFromXMI(). |
|
|
Overrides the standard operation.
Reimplemented from UMLWidget. Definition at line 184 of file objectwidget.cpp. References UMLWidget::getX(), UMLWidget::getY(), m_nLocalID, SeqLineWidget::setStartPoint(), and UMLWidget::sigWidgetMoved(). Referenced by activate(), setX(), setY(), slotMenuSelection(), tabDown(), and tabUp(). |
|
|
Used to cleanup any other widget it may need to delete.
Reimplemented from UMLWidget. Definition at line 203 of file objectwidget.cpp. References UMLWidget::cleanup(). |
|
|
Show a properties dialog for an ObjectWidget.
Reimplemented from UMLWidget. Definition at line 212 of file objectwidget.cpp. References UMLApp::getDocument(), UMLApp::getDocWindow(), UMLDoc::setModified(), DocWindow::showDocumentation(), and DocWindow::updateDocumentation(). Referenced by slotMenuSelection(). |
|
|
Returns whether to draw as an Actor or not.
Definition at line 152 of file objectwidget.h. References m_bDrawAsActor. |
|
|
Sets whether to draw as an Actor.
Definition at line 151 of file objectwidget.cpp. References m_bDrawAsActor, and UMLWidget::updateComponentSize(). Referenced by Widget_Factory::createWidget(). |
|
|
Sets whether to show deconstruction on sequence line.
Definition at line 309 of file objectwidget.cpp. References m_bShowDestruction. |
|
|
Returns whether to show deconstruction on sequence line.
Definition at line 175 of file objectwidget.h. References m_bShowDestruction. Referenced by SeqLineWidget::setupDestructionBox(). |
|
|
Returns the top margin constant (Y axis value).
Definition at line 299 of file objectwidget.cpp. Referenced by canTabUp(), Widget_Factory::createWidget(), and tabUp(). |
|
|
Returns the end Y co-ord of the seq. line.
Definition at line 315 of file objectwidget.cpp. References UMLWidget::getHeight(), UMLWidget::getY(), and m_bShowDestruction. Referenced by UMLView::getDiagramRect(), and MessageWidget::getMaxY(). |
|
|
Add a message widget to the list.
Definition at line 324 of file objectwidget.cpp. |
|
|
Remove a message widget from the list.
Definition at line 334 of file objectwidget.cpp. Referenced by MessageWidget::cleanup(). |
|
|
Returns whether or not the widget can be moved vertically up.
Definition at line 303 of file objectwidget.cpp. References UMLWidget::getY(), and topMargin(). |
|
||||||||||||
|
Returns whether a message is overlapping with another message. Used by MessageWidget::draw() methods.
Definition at line 357 of file objectwidget.cpp. References UMLWidget::getHeight(), and UMLWidget::getY(). |
|
|
Return the SeqLineWidget. Returns a non NULL pointer if this ObjectWidget is part of a sequence diagram. Definition at line 371 of file objectwidget.cpp. Referenced by UMLView::onWidgetLine(). |
|
||||||||||||
|
Saves to the <objectwidget> XMI element.
Reimplemented from UMLWidget. Definition at line 375 of file objectwidget.cpp. References m_bDrawAsActor, m_bMultipleInstance, m_bShowDestruction, m_InstanceName, and m_nLocalID. |
|
|
Loads from a <objectwidget> XMI element.
Reimplemented from UMLWidget. Definition at line 386 of file objectwidget.cpp. References draw(), m_bDrawAsActor, m_bMultipleInstance, m_bShowDestruction, m_InstanceName, and m_nLocalID. |
|
|
Handles a popup menu selection.
Reimplemented from UMLWidget. Definition at line 82 of file objectwidget.cpp. References UMLApp::getDocument(), m_InstanceName, moveEvent(), UMLDoc::setModified(), showProperties(), UMLWidget::slotMenuSelection(), tabDown(), tabUp(), and UMLWidget::updateComponentSize(). |
|
|
Handles a color change signal.
Reimplemented from UMLWidget. Definition at line 195 of file objectwidget.cpp. References UMLView::getFillColor(), UMLView::getLineColor(), UMLWidget::setFillColour(), UMLWidget::setLineColor(), and UMLWidget::setPen(). |
|
|
Called when a message widget with an end on this object has moved up or down. Sets the bottom of the line to a nice position. Definition at line 343 of file objectwidget.cpp. References UMLWidget::getHeight(), UMLWidget::getY(), and SeqLineWidget::setEndOfLine(). |
|
|
Overrides method from UMLWidget.
Reimplemented from UMLWidget. Definition at line 128 of file objectwidget.cpp. References UMLWidget::getFontMetrics(), UMLObject::getName(), m_bDrawAsActor, m_bMultipleInstance, and m_InstanceName. |
|
||||||||||||||||
|
Draw the object as an actor.
Definition at line 254 of file objectwidget.cpp. References UMLWidget::getFontMetrics(), UMLWidget::getName(), m_InstanceName, and UMLWidget::setPen(). Referenced by draw(). |
|
||||||||||||||||
|
Draw the object as an object (default).
Definition at line 223 of file objectwidget.cpp. References UMLWidget::getFont(), UMLWidget::getName(), UMLWidget::getUseFillColour(), m_bMultipleInstance, m_InstanceName, and UMLWidget::setPen(). Referenced by draw(). |
|
|
Move the object up on a sequence diagram.
Definition at line 283 of file objectwidget.cpp. References UMLWidget::adjustAssocs(), UMLWidget::getX(), UMLWidget::getY(), moveEvent(), setY(), and topMargin(). Referenced by slotMenuSelection(). |
|
|
Move the object down on a sequence diagram.
Definition at line 292 of file objectwidget.cpp. References UMLWidget::adjustAssocs(), UMLWidget::getX(), UMLWidget::getY(), moveEvent(), and setY(). Referenced by slotMenuSelection(). |
Member Data Documentation
|
|
Instance name of object.
Definition at line 293 of file objectwidget.h. Referenced by calculateSize(), drawActor(), drawObject(), getInstanceName(), loadFromXMI(), saveToXMI(), setInstanceName(), and slotMenuSelection(). |
|
|
Local ID used on views. Needed as a it can represent a class that has many objects representing it. Definition at line 299 of file objectwidget.h. Referenced by getLocalID(), loadFromXMI(), moveEvent(), ObjectWidget(), saveToXMI(), and setLocalID(). |
|
|
Determines whether to draw an object as a multiple object instance.
Definition at line 305 of file objectwidget.h. Referenced by calculateSize(), drawObject(), getMultipleInstance(), loadFromXMI(), saveToXMI(), and setMultipleInstance(). |
|
|
Determines whether the object should be drawn as an Actor or an Object.
Definition at line 311 of file objectwidget.h. Referenced by calculateSize(), draw(), getDrawAsActor(), loadFromXMI(), saveToXMI(), and setDrawAsActor(). |
|
|
Determines whether to show object destruction on sequence diagram line.
Definition at line 317 of file objectwidget.h. Referenced by activate(), getEndLineY(), getShowDestruction(), loadFromXMI(), saveToXMI(), and setShowDestruction(). |
The documentation for this class was generated from the following files:
