umbrello 25.07.80
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
ObjectWidget Class Reference

Displays an instance of a Concept. More...

#include <objectwidget.h>

Inheritance diagram for ObjectWidget:
Collaboration diagram for ObjectWidget:

Public Slots

void slotMenuSelection (QAction *action)
virtual void slotFillColorChanged (Uml::ID::Type viewID)
void slotMessageMoved ()
Public Slots inherited from UMLWidget
virtual void updateWidget ()
virtual void slotMenuSelection (QAction *action)
virtual void slotWidgetMoved (Uml::ID::Type id)
virtual void slotFillColorChanged (Uml::ID::Type viewID)
virtual void slotLineColorChanged (Uml::ID::Type viewID)
virtual void slotTextColorChanged (Uml::ID::Type viewID)
virtual void slotLineWidthChanged (Uml::ID::Type viewID)
void slotSnapToGrid ()
Public Slots inherited from WidgetBase
virtual void slotMenuSelection (QAction *trigger)

Public Member Functions

 ObjectWidget (UMLScene *scene, UMLObject *o)
virtual ~ObjectWidget ()
virtual void setX (qreal x)
virtual void setY (qreal y)
qreal centerX ()
void setMultipleInstance (bool multiple)
bool multipleInstance () const
void setSelected (bool state)
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr)
bool activate (IDChangeLog *ChangeLog=nullptr)
void cleanup ()
virtual bool showPropertiesDialog ()
void setDrawAsActor (bool drawAsActor)
bool drawAsActor () const
void setShowDestruction (bool bShow)
bool showDestruction () const
int topMargin ()
void setEndLine (int yPosition)
int getEndLineY ()
void messageAdded (MessageWidget *message)
void messageRemoved (MessageWidget *message)
bool canTabUp ()
bool messageOverlap (qreal y, MessageWidget *messageWidget)
virtual void setLineColorCmd (const QColor &color)
SeqLineWidgetsequentialLine () const
virtual void resizeWidget (qreal newW, qreal newH)
virtual void saveToXMI (QXmlStreamWriter &writer)
virtual bool loadFromXMI (QDomElement &qElement)
Public Member Functions inherited from UMLWidget
 UMLWidget (UMLScene *scene, WidgetType type=wt_UMLWidget, UMLObject *o=nullptr)
 UMLWidget (UMLScene *scene, WidgetType type=wt_UMLWidget, Uml::ID::Type id=Uml::ID::None)
virtual ~UMLWidget ()
UMLWidgetoperator= (const UMLWidget &other)
bool operator== (const UMLWidget &other) const
void setMinimumSize (const QSizeF &size)
virtual QSizeF maximumSize ()
void setMaximumSize (const QSizeF &size)
virtual void setUseFillColor (bool fc)
void setUseFillColorCmd (bool fc)
virtual void setTextColor (const QColor &color)
void setTextColorCmd (const QColor &color)
virtual void setLineColor (const QColor &color)
virtual void setLineWidth (uint width)
void setLineWidthCmd (uint width)
virtual void setFillColor (const QColor &color)
void setFillColorCmd (const QColor &color)
void setSelectedFlag (bool _select)
void setScene (UMLScene *scene)
void setPenFromSettings (QPainter &p)
void setPenFromSettings (QPainter *p)
virtual void setFont (const QFont &font)
void setFontCmd (const QFont &font)
bool getStartMove () const
virtual qreal getX () const
virtual qreal getY () const
virtual QPointF getPos () const
qreal height () const
qreal width () const
void setSize (qreal width, qreal height)
void setSize (const QSizeF &size)
virtual void notifyParentResize ()
bool getIgnoreSnapToGrid () const
void setIgnoreSnapToGrid (bool to)
virtual bool isLocatedIn (const UMLWidget *other) const
void moveByLocal (qreal dx, qreal dy)
virtual void removeAssoc (AssociationWidget *pAssoc)
virtual void addAssoc (AssociationWidget *pAssoc)
AssociationWidgetListassociationWidgetList () const
bool isInstance () const
void setIsInstance (bool isInstance)
void setInstanceName (const QString &instanceName)
QString instanceName () const
Uml::ShowStereoType::Enum showStereotype () const
virtual void setShowStereotype (Uml::ShowStereoType::Enum flag)
QString tags () const
virtual void adjustAssocs (qreal dx, qreal dy)
virtual void adjustUnselectedAssocs (qreal dx, qreal dy)
bool isActivated () const
void setActivated (bool active=true)
void updateGeometry (bool withAssocs=true)
void clipSize ()
void forceUpdateFontMetrics (QPainter *painter)
void forceUpdateFontMetrics (QFont &font, QPainter *painter)
QPointF startMovePosition () const
void setStartMovePosition (const QPointF &position)
QSizeF startResizeSize () const
virtual QSizeF calculateSize (bool withExtensions=true) const
void resize ()
bool fixedAspectRatio () const
void setFixedAspectRatio (bool state)
bool resizable () const
void setResizable (bool state)
virtual void setDefaultFontMetrics (QFont &font, UMLWidget::FontType fontType)
virtual void setDefaultFontMetrics (QFont &font, UMLWidget::FontType fontType, QPainter &painter)
QFontMetrics & getFontMetrics (UMLWidget::FontType fontType) const
void setFontMetrics (UMLWidget::FontType fontType, QFontMetrics fm)
void setupFontType (QFont &font, UMLWidget::FontType fontType)
Public Member Functions inherited from WidgetBase
 WidgetBase (UMLScene *scene, WidgetType type=wt_UMLWidget, Uml::ID::Type id=Uml::ID::None)
virtual ~WidgetBase ()
UMLObjectumlObject () const
virtual void setUMLObject (UMLObject *obj)
Uml::ID::Type id () const
void setID (Uml::ID::Type id)
void setLocalID (Uml::ID::Type id)
Uml::ID::Type localID () const
virtual UMLWidgetwidgetWithID (Uml::ID::Type id)
WidgetType baseType () const
void setBaseType (const WidgetType &baseType)
QLatin1String baseTypeStr () const
QString baseTypeStrWithoutPrefix () const
UMLSceneumlScene () const
UMLDocumlDoc () const
QString documentation () const
bool hasDocumentation () const
virtual void setDocumentation (const QString &doc)
QString name () const
virtual void setName (const QString &strName)
QColor lineColor () const
uint lineWidth () const
QColor textColor () const
QColor fillColor () const
bool usesDiagramLineColor () const
void setUsesDiagramLineColor (bool state)
bool usesDiagramLineWidth () const
void setUsesDiagramLineWidth (bool state)
bool useFillColor () const
bool usesDiagramTextColor () const
void setUsesDiagramTextColor (bool state)
bool usesDiagramFillColor () const
void setUsesDiagramFillColor (bool state)
bool usesDiagramUseFillColor () const
void setUsesDiagramUseFillColor (bool state)
virtual QFont font () const
bool autoResize () const
void setAutoResize (bool state)
bool changesShape () const
void setChangesShape (bool state)
WidgetBaseoperator= (const WidgetBase &other)
QRectF rect () const
void setRect (const QRectF &rect)
void setRect (qreal x, qreal y, qreal width, qreal height)
virtual QRectF boundingRect () const
virtual UMLWidgetonWidget (const QPointF &p)
bool isActivityWidget () const
bool isActorWidget () const
bool isArtifactWidget () const
bool isAssociationWidget () const
bool isBoxWidget () const
bool isCategoryWidget () const
bool isClassWidget () const
bool isCombinedFragmentWidget () const
bool isComponentWidget () const
bool isDatatypeWidget () const
bool isEntityWidget () const
bool isEnumWidget () const
bool isFloatingDashLineWidget () const
bool isForkJoinWidget () const
bool isInterfaceWidget () const
bool isMessageWidget () const
bool isNodeWidget () const
bool isNoteWidget () const
bool isObjectNodeWidget () const
bool isObjectWidget () const
bool isPackageWidget () const
bool isPinWidget () const
bool isPortWidget () const
bool isPreconditionWidget () const
bool isRegionWidget () const
bool isSignalWidget () const
bool isStateWidget () const
bool isTextWidget () const
bool isUseCaseWidget () const
ActivityWidgetasActivityWidget ()
ActorWidgetasActorWidget ()
ArtifactWidgetasArtifactWidget ()
AssociationWidgetasAssociationWidget ()
BoxWidgetasBoxWidget ()
CategoryWidgetasCategoryWidget ()
ClassifierWidgetasClassifierWidget ()
CombinedFragmentWidgetasCombinedFragmentWidget ()
ComponentWidgetasComponentWidget ()
DatatypeWidgetasDatatypeWidget ()
EntityWidgetasEntityWidget ()
EnumWidgetasEnumWidget ()
FloatingDashLineWidgetasFloatingDashLineWidget ()
ForkJoinWidgetasForkJoinWidget ()
InterfaceWidgetasInterfaceWidget ()
MessageWidgetasMessageWidget ()
NodeWidgetasNodeWidget ()
NoteWidgetasNoteWidget ()
ObjectNodeWidgetasObjectNodeWidget ()
ObjectWidgetasObjectWidget ()
PackageWidgetasPackageWidget ()
PinWidgetasPinWidget ()
PinPortBaseasPinPortBase ()
PortWidgetasPortWidget ()
PreconditionWidgetasPreconditionWidget ()
RegionWidgetasRegionWidget ()
SignalWidgetasSignalWidget ()
StateWidgetasStateWidget ()
FloatingTextWidgetasFloatingTextWidget ()
UseCaseWidgetasUseCaseWidget ()
UMLWidgetasUMLWidget ()
const ActivityWidgetasActivityWidget () const
const ActorWidgetasActorWidget () const
const ArtifactWidgetasArtifactWidget () const
const AssociationWidgetasAssociationWidget () const
const BoxWidgetasBoxWidget () const
const CategoryWidgetasCategoryWidget () const
const ClassifierWidgetasClassifierWidget () const
const CombinedFragmentWidgetasCombinedFragmentWidget () const
const ComponentWidgetasComponentWidget () const
const DatatypeWidgetasDatatypeWidget () const
const EntityWidgetasEntityWidget () const
const EnumWidgetasEnumWidget () const
const FloatingDashLineWidgetasFloatingDashLineWidget () const
const ForkJoinWidgetasForkJoinWidget () const
const InterfaceWidgetasInterfaceWidget () const
const MessageWidgetasMessageWidget () const
const NodeWidgetasNodeWidget () const
const NoteWidgetasNoteWidget () const
const ObjectNodeWidgetasObjectNodeWidget () const
const ObjectWidgetasObjectWidget () const
const PackageWidgetasPackageWidget () const
const PinWidgetasPinWidget () const
const PinPortBaseasPinPortBase () const
const PortWidgetasPortWidget () const
const PreconditionWidgetasPreconditionWidget () const
const RegionWidgetasRegionWidget () const
const SignalWidgetasSignalWidget () const
const StateWidgetasStateWidget () const
const FloatingTextWidgetasFloatingTextWidget () const
const UseCaseWidgetasUseCaseWidget () const
const UMLWidgetasUMLWidget () const
Public Member Functions inherited from DiagramProxyWidget
 DiagramProxyWidget (UMLWidget *widget, qreal borderWidth=5)
virtual ~DiagramProxyWidget ()
Uml::ID::Type diagramLink () const
UMLScenelinkedDiagram () const
bool setDiagramLink (const Uml::ID::Type &id)
const QRectF & clientRect () const
const QRectF & sceneRect () const
void setClientRect (const QRectF &rect)
bool isProxyWidget () const
UMLWidgetgetProxiedWidget (const QPointF &p) const
QPointF mapFromClient (const QPointF &p) const
QRectF mapFromClient (const QRectF &r) const
QPointF mapToClient (const QPointF &pos) const
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr)
bool showLinkedDiagram () const
void setShowLinkedDiagram (bool showLinkedDiagram)
QRectF iconRect () const
void setIconRect (const QRectF &iconRect)

Protected Member Functions

virtual void mousePressEvent (QGraphicsSceneMouseEvent *me)
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *me)
QSizeF minimumSize () const
virtual void moveEvent (QGraphicsSceneMouseEvent *event)
virtual void moveWidgetBy (qreal diffX, qreal diffY)
virtual void constrainMovementForAllWidgets (qreal &diffX, qreal &diffY)
virtual QCursor resizeCursor () const
void paintActor (QPainter *p)
void paintObject (QPainter *p)
Protected Member Functions inherited from UMLWidget
virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
virtual void constrain (qreal &width, qreal &height)
virtual bool isInResizeArea (QGraphicsSceneMouseEvent *me)
void selectSingle (QGraphicsSceneMouseEvent *me)
void selectMultiple (QGraphicsSceneMouseEvent *me)
void deselect (QGraphicsSceneMouseEvent *me)
void setSelectionBounds ()
void resize (QGraphicsSceneMouseEvent *me)
bool wasSizeChanged ()
bool wasPositionChanged ()
virtual void toForeground ()
void addConnectedWidget (UMLWidget *widget, Uml::AssociationType::Enum type=Uml::AssociationType::Association, AddWidgetOptions options=Default)
void addConnectedUMLObject (UMLObject::ObjectType otype, Uml::AssociationType::Enum type)
void addWidget (UMLWidget *widget, bool showProperties=true)
Protected Member Functions inherited from QGraphicsObjectWrapper
QVariant itemChange (GraphicsItemChange change, const QVariant &value)
Protected Member Functions inherited from DiagramProxyWidget
DiagramProxyWidgetoperator= (const DiagramProxyWidget &other)
bool activate (IDChangeLog *changeLog=nullptr)
bool loadFromXMI (QDomElement &qElement)
void saveToXMI (QXmlStreamWriter &writer)
void setupEvent (QGraphicsSceneMouseEvent &e, const QGraphicsSceneMouseEvent *event, const QPointF &pos) const
void setupEvent (QGraphicsSceneContextMenuEvent &e, const QGraphicsSceneContextMenuEvent *event, const QPointF &pos) const
void slotMenuSelection (QAction *action)

Private Member Functions

void tabUp ()
void tabDown ()
void moveDestructionBy (qreal diffY)

Private Attributes

SeqLineWidgetm_pLine
bool m_multipleInstance
 draw an object as a multiple object
bool m_drawAsActor
 object should be drawn as an Actor or an Object
bool m_showDestruction
 show object destruction on sequence diagram line
bool m_isOnDestructionBox
 true when a click occurred on the destruction box
MessageWidgetList m_messages
 message widgets with an end on this widget

Friends

class SeqLineWidget

Additional Inherited Members

Public Types inherited from UMLWidget
enum  FontType {
  FT_NORMAL = 0 , FT_BOLD = 1 , FT_ITALIC = 2 , FT_UNDERLINE = 3 ,
  FT_BOLD_ITALIC = 4 , FT_BOLD_UNDERLINE = 5 , FT_ITALIC_UNDERLINE = 6 , FT_BOLD_ITALIC_UNDERLINE = 7 ,
  FT_INVALID = 8
}
enum  AddWidgetOption {
  NoOption = 0 , SetupSize = 1 , SwitchDirection = 2 , ShowProperties = 4 ,
  Default = SetupSize | ShowProperties
}
Public Types inherited from WidgetBase
enum  WidgetType {
  wt_Min = 299 , wt_UMLWidget , wt_Actor , wt_UseCase ,
  wt_Class , wt_Interface , wt_Datatype , wt_Enum ,
  wt_Entity , wt_Package , wt_Object , wt_Note ,
  wt_Box , wt_Message , wt_Text , wt_State ,
  wt_Activity , wt_Component , wt_Artifact , wt_Node ,
  wt_Association , wt_ForkJoin , wt_Precondition , wt_CombinedFragment ,
  wt_FloatingDashLine , wt_Signal , wt_Pin , wt_ObjectNode ,
  wt_Region , wt_Category , wt_Port , wt_Instance ,
  wt_Max
}
Signals inherited from UMLWidget
void sigWidgetMoved (Uml::ID::Type id)
Static Public Member Functions inherited from WidgetBase
static QString toString (WidgetType wt)
static QString toI18nString (WidgetType wt)
static Icon_Utils::IconType toIcon (WidgetType wt)
static bool widgetHasUMLObject (WidgetBase::WidgetType type)
Static Public Attributes inherited from UMLWidget
static const QSizeF DefaultMinimumSize
static const QSizeF DefaultMaximumSize
static const int defaultMargin = 5
static const int selectionMarkerSize = 4
static const int resizeMarkerLineCount = 3
Protected Attributes inherited from UMLWidget
QString m_instanceName
 instance name (used if on a deployment diagram)
bool m_isInstance
 holds whether this widget is a component instance (i.e. on a deployment diagram)
Uml::ShowStereoType::Enum m_showStereotype
 if and how the stereotype should be displayed
bool m_startMove
QPointF m_startMovePostion
QSizeF m_startResizeSize
int m_nPosX
UMLDocm_doc
 shortcut for UMLApp::app()->document()
bool m_resizable
QFontMetrics * m_pFontMetrics [FT_INVALID]
QSizeF m_minimumSize
QSizeF m_maximumSize
bool m_activated
 true if the activate function has been called for this class instance
bool m_ignoreSnapToGrid
bool m_ignoreSnapComponentSizeToGrid
bool m_fixedAspectRatio
QString m_oldStatusBarMsg
 The text in the status bar when the cursor was pressed.
QPointF m_pressOffset
QPointF m_oldPos
 The X/Y position the widget had when the movement started.
qreal m_oldW
 The width/height the widget had when the resize started.
qreal m_oldH
bool m_shiftPressed
 If shift or control button were pressed in mouse press event.
bool m_inMoveArea
bool m_inResizeArea
bool m_moved
bool m_resized
Protected Attributes inherited from WidgetBase
UMLScenem_scene
QPointer< UMLObjectm_umlObject
QString m_Doc
 Only used if m_umlObject is not set.
QString m_Text
QRectF m_rect
 Widget size. In this rectangle, the x and y coordinates are always 0.
Uml::ID::Type m_nId
Uml::ID::Type m_nLocalID
QColor m_textColor
 Color of the text of the widget. Is saved to XMI.
QColor m_lineColor
 Color of the lines of the widget. Is saved to XMI.
QColor m_fillColor
 color of the background of the widget
QBrush m_brush
QFont m_font
uint m_lineWidth
 Width of the lines of the widget. Is saved to XMI.
bool m_useFillColor
 flag indicates if the UMLWidget uses the Diagram FillColour
bool m_usesDiagramFillColor
bool m_usesDiagramLineColor
bool m_usesDiagramLineWidth
bool m_usesDiagramTextColor
bool m_usesDiagramUseFillColor
bool m_autoResize
bool m_changesShape
 The widget changes its shape when the number of connections or their positions are changed.
Protected Attributes inherited from QGraphicsObjectWrapper
bool m_calledFromItemChange {false}

Detailed Description

Displays an instance of a Concept.

Displays an instance UMLObject of a concept.

The local ID is needed as it can represent a class that has many objects representing it.

Author
Paul Hensgen phens.nosp@m.gen@.nosp@m.techi.nosp@m.e.co.nosp@m.m
See also
UMLWidget Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

Constructor & Destructor Documentation

◆ ObjectWidget()

ObjectWidget::ObjectWidget ( UMLScene * scene,
UMLObject * o )

Creates an ObjectWidget.

Parameters
sceneThe parent to this object.
oThe object it will be representing.
Here is the call graph for this function:

◆ ~ObjectWidget()

ObjectWidget::~ObjectWidget ( )
virtual

Destructor.

Here is the call graph for this function:

Member Function Documentation

◆ activate()

bool ObjectWidget::activate ( IDChangeLog * ChangeLog = nullptr)
virtual

Activate the object after serializing it from a QDataStream

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ canTabUp()

bool ObjectWidget::canTabUp ( )

Returns whether or not the widget can be moved vertically up.

Returns
True if widget can be moved upwards vertically.
Here is the call graph for this function:

◆ centerX()

qreal ObjectWidget::centerX ( )

Return the x coordinate of the widgets center.

Returns
The x-coordinate of the widget center.
Here is the call graph for this function:

◆ cleanup()

void ObjectWidget::cleanup ( )
virtual

Used to cleanup any other widget it may need to delete.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ constrainMovementForAllWidgets()

void ObjectWidget::constrainMovementForAllWidgets ( qreal & diffX,
qreal & diffY )
protectedvirtual

Overridden from UMLWidget. Modifies the value of the diffX and diffY variables used to move the widgets. All the widgets are constrained to be moved only in X axis (diffY is set to 0).

Parameters
diffXThe difference between current X position and new X position.
diffYThe difference between current Y position and new Y position.

Reimplemented from UMLWidget.

◆ drawAsActor()

bool ObjectWidget::drawAsActor ( ) const

Returns whether to draw as an Actor or not.

Returns
True if widget is drawn as an actor.

◆ getEndLineY()

int ObjectWidget::getEndLineY ( )

Returns the end Y co-ord of the sequence line.

Returns
Y coordinate of the endpoint of the sequence line.
Here is the call graph for this function:

◆ loadFromXMI()

bool ObjectWidget::loadFromXMI ( QDomElement & qElement)
virtual

Loads from a "objectwidget" XMI element.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ messageAdded()

void ObjectWidget::messageAdded ( MessageWidget * message)

Add a message widget to the list.

Parameters
messagePointer to the MessageWidget to add.
Here is the call graph for this function:

◆ messageOverlap()

bool ObjectWidget::messageOverlap ( qreal y,
MessageWidget * messageWidget )

Returns whether a message is overlapping with another message. Used by MessageWidget::paint() methods.

Parameters
ytop of your message
messageWidgetpointer to your message so it doesn't check against itself

◆ messageRemoved()

void ObjectWidget::messageRemoved ( MessageWidget * message)

Remove a message widget from the list.

Parameters
messagePointer to the MessageWidget to remove.
Here is the call graph for this function:

◆ minimumSize()

QSizeF ObjectWidget::minimumSize ( ) const
protectedvirtual

Overrides method from UMLWidget

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ mouseMoveEvent()

void ObjectWidget::mouseMoveEvent ( QGraphicsSceneMouseEvent * me)
protectedvirtual

Overrides the standard operation.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ mousePressEvent()

void ObjectWidget::mousePressEvent ( QGraphicsSceneMouseEvent * me)
protectedvirtual

Overrides the standard operation.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ moveDestructionBy()

void ObjectWidget::moveDestructionBy ( qreal diffY)
private

Moves the destruction Box to a new position using the difference between the current position and the new position. The destruction box is only moved along Y axis.

Parameters
diffYThe difference between current Y position and new Y position
Here is the call graph for this function:

◆ moveEvent()

void ObjectWidget::moveEvent ( QGraphicsSceneMouseEvent * event)
protectedvirtual

Overrides the standard operation.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ moveWidgetBy()

void ObjectWidget::moveWidgetBy ( qreal diffX,
qreal diffY )
protectedvirtual

Overridden from UMLWidget. Moves the widget to a new position using the difference between the current position and the new position. Y position is ignored, and widget is only moved along X axis.

Parameters
diffXThe difference between current X position and new X position.
diffYThe difference between current Y position and new Y position (isn't used).

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ multipleInstance()

bool ObjectWidget::multipleInstance ( ) const

Returns whether object is representing a multi-object.

Returns
True if object is representing a multi-object.

◆ paint()

void ObjectWidget::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget = nullptr )
virtual

Override default method.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ paintActor()

void ObjectWidget::paintActor ( QPainter * painter)
protected

Draw the object as an actor.

Here is the call graph for this function:

◆ paintObject()

void ObjectWidget::paintObject ( QPainter * painter)
protected

Draw the object as an object (default).

Here is the call graph for this function:

◆ resizeCursor()

QCursor ObjectWidget::resizeCursor ( ) const
protectedvirtual

Overridden from UMLWidget. Returns the cursor to be shown when resizing the widget. The cursor shown is KCursor::sizeHorCursor().

Returns
The cursor to be shown when resizing the widget.

Reimplemented from UMLWidget.

◆ resizeWidget()

void ObjectWidget::resizeWidget ( qreal newW,
qreal newH )
virtual

Overridden from UMLWidget. Resizes the width of the object widget. Object widgets can only be resized horizontally, so height isn't modified.

Parameters
newWThe new width for the widget.
newHThe new height for the widget (isn't used).

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ saveToXMI()

void ObjectWidget::saveToXMI ( QXmlStreamWriter & writer)
virtual

Saves to the "objectwidget" XMI element.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ sequentialLine()

SeqLineWidget * ObjectWidget::sequentialLine ( ) const

Return the SeqLineWidget. Returns a non NULL pointer if this ObjectWidget is part of a sequence diagram.

Here is the call graph for this function:

◆ setDrawAsActor()

void ObjectWidget::setDrawAsActor ( bool drawAsActor)

Sets whether to draw as an Actor.

Parameters
drawAsActorTrue if widget shall be drawn as an actor.
Here is the call graph for this function:

◆ setEndLine()

void ObjectWidget::setEndLine ( int yPosition)

Sets the y position of the bottom of the vertical line.

Parameters
yPositionThe y coordinate for the bottom of the line.

◆ setLineColorCmd()

void ObjectWidget::setLineColorCmd ( const QColor & color)
virtual

Overridden from UMLWidget Set color of object widget and sequence line on sequence diagrams.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ setMultipleInstance()

void ObjectWidget::setMultipleInstance ( bool multiple)

Sets whether representing a multi-instance object.

Parameters
multipleObject state. true- multi, false - single.
Here is the call graph for this function:

◆ setSelected()

void ObjectWidget::setSelected ( bool _select)
virtual

Sets the state of whether the widget is selected.

Parameters
_selectThe state of whether the widget is selected.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ setShowDestruction()

void ObjectWidget::setShowDestruction ( bool bShow)

Sets whether to show deconstruction on sequence line.

Parameters
bShowTrue if destruction on line shall be shown.

◆ setX()

void ObjectWidget::setX ( qreal x)
virtual

Sets the x-coordinate. Reimplements the method from UMLWidget.

Parameters
xThe x-coordinate to be set.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ setY()

void ObjectWidget::setY ( qreal y)
virtual

Sets the y-coordinate. Reimplements the method from UMLWidget.

Parameters
yThe y-coordinate to be set.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ showDestruction()

bool ObjectWidget::showDestruction ( ) const

Returns whether to show deconstruction on sequence line.

Returns
True if destruction on sequence line is shown.

◆ showPropertiesDialog()

bool ObjectWidget::showPropertiesDialog ( )
virtual

Show a properties dialog for an ObjectWidget.

Reimplemented from UMLWidget.

Here is the call graph for this function:

◆ slotFillColorChanged

void ObjectWidget::slotFillColorChanged ( Uml::ID::Type viewID)
virtualslot

Handles a color change signal.

Here is the call graph for this function:

◆ slotMenuSelection

void ObjectWidget::slotMenuSelection ( QAction * action)
slot

Handles a popup menu selection.

Here is the call graph for this function:

◆ slotMessageMoved

void ObjectWidget::slotMessageMoved ( )
slot

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.

◆ tabDown()

void ObjectWidget::tabDown ( )
private

Move the object down on a sequence diagram.

Here is the call graph for this function:

◆ tabUp()

void ObjectWidget::tabUp ( )
private

Move the object up on a sequence diagram.

Here is the call graph for this function:

◆ topMargin()

int ObjectWidget::topMargin ( )

Returns the top margin constant (Y axis value)

Returns
Y coordinate of the space between the diagram top and the upper edge of the ObjectWidget.
Here is the call graph for this function:

◆ SeqLineWidget

friend class SeqLineWidget
friend

Member Data Documentation

◆ m_drawAsActor

bool ObjectWidget::m_drawAsActor
private

object should be drawn as an Actor or an Object

◆ m_isOnDestructionBox

bool ObjectWidget::m_isOnDestructionBox
private

true when a click occurred on the destruction box

◆ m_messages

MessageWidgetList ObjectWidget::m_messages
private

message widgets with an end on this widget

◆ m_multipleInstance

bool ObjectWidget::m_multipleInstance
private

draw an object as a multiple object

◆ m_pLine

SeqLineWidget* ObjectWidget::m_pLine
private

◆ m_showDestruction

bool ObjectWidget::m_showDestruction
private

show object destruction on sequence diagram line


The documentation for this class was generated from the following files: