umbrello API Documentation

UMLWidget Class Reference

This is the base class for nearly all graphical widgets. The base class for graphical UML objects. More...

#include <umlwidget.h>

Inheritance diagram for UMLWidget:

WidgetBase ActivityWidget ActorWidget ArtifactWidget BoxWidget ClassifierWidget ComponentWidget DatatypeWidget EntityWidget EnumWidget FloatingTextWidget MessageWidget NodeWidget NoteWidget ObjectWidget PackageWidget StateWidget UseCaseWidget List of all members.

Public Slots

virtual void slotRemovePopupMenu ()
 This slot is entered when an event has occurred on the views display, most likely a mouse event.
virtual void updateWidget ()
 When a widget changes this slot captures that signal.
virtual void slotMenuSelection (int sel)
 Captures any popup menu signals for menus it created.
virtual void slotWidgetMoved (Uml::IDType id)
 Captures when another widget moves if it is link to it that signal.
virtual void slotColorChanged (Uml::IDType viewID)
 Captures a color change signal.
virtual void slotLineWidthChanged (Uml::IDType viewID)
 Captures a linewidth change signal.
void slotClearAllSelected ()
 Captures a sigClearAllSelected signal sent by UMLView.
void slotSnapToGrid ()
 Tells the widget to snap to grid.

Signals

void sigWidgetMoved (Uml::IDType id)
 Emit when the widget moves its' position.

Public Member Functions

 UMLWidget (UMLView *view, UMLObject *o, UMLWidgetController *widgetController=0)
 Creates a UMLWidget object.
 UMLWidget (UMLView *view, Uml::IDType id=Uml::id_None, UMLWidgetController *widgetController=0)
 Creates a UMLWidget object.
virtual ~UMLWidget ()
 Standard deconstructor.
 UMLWidget (const UMLWidget &other)
 Copy constructor.
virtual UMLWidgetoperator= (const UMLWidget &other)
 Assignment operator.
virtual bool operator== (const UMLWidget &other)
 Overload '==' operator.
virtual void mouseReleaseEvent (QMouseEvent *me)
 Calls the method with the same name in UMLWidgetController.
virtual void mouseDoubleClickEvent (QMouseEvent *me)
 Calls the method with the same name in UMLWidgetController.
void setUseFillColour (bool fc)
 Set the status of using fill color.
bool getUseFillColour () const
 Read property of bool m_bUseFillColour.
void setLineColor (const QColor &colour)
 Overrides the method from WidgetBase.
void setLineWidth (uint width)
 Overrides the method from WidgetBase.
void setFillColour (const QColor &colour)
 Sets the background fill colour.
QColor getFillColour () const
 Read property of QColor m_FillColour.
virtual void mouseMoveEvent (QMouseEvent *me)
 Calls the method with the same name in UMLWidgetController.
virtual bool isText ()
 Returns whether this is a line of text.
virtual void setSelected (bool _select)
 Sets the state of whether the widget is selected.
bool getSelected () const
 Returns the state of whether the widget is selected.
void setSelectedFlag (bool _select)
void setView (UMLView *v)
 Sets the view the widget is on.
virtual bool activate (IDChangeLog *ChangeLog=0)
 Activate the object after serializing it from a QDataStream.
virtual int onWidget (const QPoint &p)
 Returns 0 if the given point is not in the boundaries of the widget, else returns a number which is proportional to the size of the widget.
virtual void draw (QPainter &p, int offsetX, int offsetY)=0
 Draws the UMLWidget on the given paint device.
void setPen (QPainter &p)
 Set the pen.
virtual void setFont (QFont font)
 Sets the font the widget is to use.
virtual QFont getFont () const
 Returns the font the widget is to use.
bool getStartMove ()
 Returns whether we triggered the update of position movement.
virtual void setX (int x)
 Sets the x-coordinate.
virtual void setY (int y)
 Sets the y-coordinate.
virtual void setZ (int z)
 Sets the z-coordinate.
int getX () const
 Gets the x-coordinate.
int getY () const
 Gets the y-coordinate.
int getZ () const
 Gets the z-coordinate.
int getHeight () const
 Returns the height of widget.
int getWidth () const
 Returns the width of the widget.
void setSize (int width, int height)
 Sets the size.
void setIgnoreSnapToGrid (bool to)
 Set m_bIgnoreSnapToGrid.
bool getIgnoreSnapToGrid () const
 Return the value of m_bIgnoreSnapToGrid.
void moveBy (int dx, int dy)
 Move the widget by an X and Y offset relative to the current position.
void removeAssoc (AssociationWidget *pAssoc)
 Removes an already created association from the list of associations that include this UMLWidget.
void addAssoc (AssociationWidget *pAssoc)
 Adds an already created association to the list of associations that include this UMLWidget.
AssociationWidgetList & getAssocList ()
 Returns the list of associations connected to this widget.
bool getUsesDiagramFillColour () const
 Returns m_bUsesDiagramFillColour.
bool getUsesDiagramUseFillColour () const
 Returns m_bUsesDiagramUseFillColour.
void setUsesDiagramFillColour (bool usesDiagramFillColour)
 Sets m_bUsesDiagramFillColour.
void setUsesDiagramUseFillColour (bool usesDiagramUseFillColour)
 Sets m_bUsesDiagramUseFillColour.
void setIsInstance (bool isInstance)
 Write property of bool m_bIsInstance.
bool getIsInstance () const
 Read property of bool m_bIsInstance.
void setInstanceName (const QString &instanceName)
 Write property of m_instanceName.
QString getInstanceName () const
 Read property of m_instanceName.
bool getShowStereotype () const
 Returns the status of whether to show Stereotype.
virtual void setShowStereotype (bool _status)
 Set the status of whether to show Stereotype.
virtual void showProperties ()
 Show a properties dialog for a UMLWidget.
bool isActivated ()
 Returns true if the Activate method has been called for this instance.
virtual void setName (const QString &strName)
 Sets the name in the corresponding UMLObject.
virtual QString getName () const
 Gets the name from the corresponding UMLObject.
void startPopupMenu (const QPoint &At)
 Starts the popup menu.
virtual void adjustAssocs (int x, int y)
 Adjusts associations with the given co-ordinates.
void adjustUnselectedAssocs (int x, int y)
 Adjusts all unselected associations with the given co-ordinates.
void setActivated (bool Active=true)
 Set the m_bActivated flag of a widget but does not perform the Activate method.
virtual void cleanup ()
 Used to cleanup any other widget it may need to delete.
void updateComponentSize ()
 Update the size of this widget.
void forceUpdateFontMetrics (QPainter *painter)
virtual void mousePressEvent (QMouseEvent *me)
 Calls the method with the same name in UMLWidgetController.
virtual void moveEvent (QMoveEvent *me)
 Overrides the standard operation.
virtual void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
virtual bool loadFromXMI (QDomElement &qElement)
UMLWidgetControllergetWidgetController ()
 Returns the UMLWdigetController for this widget.

Static Public Member Functions

static bool widgetHasUMLObject (Uml::Widget_Type type)
 Returns whether the widget type has an associated UMLObject.

Protected Types

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
}

Protected Member Functions

virtual void constrain (int &width, int &height)
 Apply possible constraints to the given candidate width and height.
virtual void drawSelected (QPainter *p, int offsetX, int offsetY)
 Draws that the widget is selected.
virtual void drawShape (QPainter &p)
 Overrides default method.
virtual QSize calculateSize ()
 Compute the minimum possible width and height.
virtual void setDefaultFontMetrics (UMLWidget::FontType fontType)
 Template Method, override this to set the default font metric.
virtual void setDefaultFontMetrics (UMLWidget::FontType fontType, QPainter &painter)
QFontMetrics & getFontMetrics (UMLWidget::FontType fontType)
 Returns the font metric used by this object for Text which uses bold/italic fonts.
void setFontMetrics (UMLWidget::FontType fontType, QFontMetrics fm)
 set the font metric to use
void setupFontType (QFont &font, UMLWidget::FontType fontType)
void init ()
 Initializes key attributes of the class.

Protected Attributes

bool m_bUseFillColour
 This flag indicates if the UMLWidget uses the Diagram FillColour.
bool m_bUsesDiagramFillColour
 true by default, false if the colours have been explicitly set for this widget
bool m_bUsesDiagramUseFillColour
QColor m_FillColour
 Color of the background of the widget.
AssociationWidgetList m_Assocs
 A list of AssociationWidgets between the UMLWidget and other UMLWidgets in the diagram.
QString m_Text
 getName() returns the name from the UMLObject if this widget has an underlying UMLObject; if it does not, then getName() returns the local m_Text (notably the case for FloatingTextWidget.)
QFont m_Font
 The font the widget will use.
bool m_bIsInstance
 Holds whether this widget is a component instance (i.e.
QString m_instanceName
 The instance name (used if on a deployment diagram).
bool m_bShowStereotype
 Should it show the <<stereotype>> of the widget.
bool m_bSelected
bool m_bStartMove
int m_nPosX
int m_origZ
ListPopupMenum_pMenu
UMLDocm_pDoc
 shortcut for UMLApp::app()->getDocument()
bool m_bResizable
QFontMetrics * m_pFontMetrics [FT_INVALID]
bool m_bActivated
 It is true if the Activate Function has been called for this class instance.
bool m_bIgnoreSnapToGrid
 Change Widget Behaviour.
bool m_bIgnoreSnapComponentSizeToGrid
UMLWidgetControllerm_widgetController
 Controller for user interaction events.

Friends

class UMLWidgetController

Detailed Description

This is the base class for nearly all graphical widgets. The base class for graphical UML objects.

Author:
Paul Hensgen <phensgen@techie.com> Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 43 of file umlwidget.h.


Constructor & Destructor Documentation

UMLWidget::UMLWidget UMLView view,
UMLObject o,
UMLWidgetController widgetController = 0
 

Creates a UMLWidget object.

Parameters:
view The view to be displayed on.
o The UMLObject to represent.

Definition at line 44 of file umlwidget.cpp.

References UMLObject::getID(), init(), m_widgetController, and updateWidget().

UMLWidget::UMLWidget UMLView view,
Uml::IDType  id = Uml::id_None,
UMLWidgetController widgetController = 0
[explicit]
 

Creates a UMLWidget object.

Parameters:
view The view to be displayed on.
id The id of the widget. The default value (id_None) will prompt generation of a new ID.

Definition at line 61 of file umlwidget.cpp.

References init(), and m_widgetController.

UMLWidget::~UMLWidget  )  [virtual]
 

Standard deconstructor.

Definition at line 77 of file umlwidget.cpp.

References cleanup(), and m_widgetController.

UMLWidget::UMLWidget const UMLWidget other  ) 
 

Copy constructor.


Member Function Documentation

UMLWidget & UMLWidget::operator= const UMLWidget other  )  [virtual]
 

Assignment operator.

Definition at line 83 of file umlwidget.cpp.

References m_Assocs, m_bActivated, m_bIgnoreSnapToGrid, m_bIsInstance, m_bSelected, m_bStartMove, m_bUseFillColour, m_bUsesDiagramFillColour, WidgetBase::m_bUsesDiagramLineColour, WidgetBase::m_bUsesDiagramLineWidth, m_bUsesDiagramUseFillColour, m_FillColour, m_Font, m_instanceName, WidgetBase::m_LineColour, WidgetBase::m_LineWidth, WidgetBase::m_nId, m_nPosX, WidgetBase::m_Type, setX(), and setY().

bool UMLWidget::operator== const UMLWidget other  )  [virtual]
 

Overload '==' operator.

Definition at line 122 of file umlwidget.cpp.

References WidgetBase::getID(), and m_Assocs.

void UMLWidget::mouseReleaseEvent QMouseEvent *  me  )  [virtual]
 

Calls the method with the same name in UMLWidgetController.

See also:
UMLWidgetController::mouseReleaseEvent
Parameters:
me The QMouseEvent event.

Definition at line 201 of file umlwidget.cpp.

References m_widgetController, and UMLWidgetController::mouseReleaseEvent().

Referenced by ToolBarStateArrow::mouseReleaseWidget().

void UMLWidget::mouseDoubleClickEvent QMouseEvent *  me  )  [virtual]
 

Calls the method with the same name in UMLWidgetController.

See also:
UMLWidgetController::mouseDoubleClickEvent
Parameters:
me The QMouseEvent event.

Definition at line 423 of file umlwidget.cpp.

References m_widgetController, and UMLWidgetController::mouseDoubleClickEvent().

Referenced by ToolBarStateArrow::mouseDoubleClickWidget().

void UMLWidget::setUseFillColour bool  fc  ) 
 

Set the status of using fill color.

Parameters:
fc the status of using fill color.

Definition at line 427 of file umlwidget.cpp.

References m_bUseFillColour.

Referenced by UMLWidgetColorPage::updateUMLWidget().

bool UMLWidget::getUseFillColour  )  const [inline]
 

Read property of bool m_bUseFillColour.

Definition at line 111 of file umlwidget.h.

References m_bUseFillColour.

Referenced by StateWidget::draw(), EnumWidget::draw(), EntityWidget::draw(), ActorWidget::draw(), and ObjectWidget::drawObject().

void UMLWidget::setLineColor const QColor &  colour  )  [virtual]
 

Overrides the method from WidgetBase.

Reimplemented from WidgetBase.

Definition at line 433 of file umlwidget.cpp.

References WidgetBase::setLineColor().

Referenced by UMLView::selectionSetLineColor(), ObjectWidget::slotColorChanged(), and UMLWidgetColorPage::updateUMLWidget().

void UMLWidget::setLineWidth uint  width  )  [virtual]
 

Overrides the method from WidgetBase.

Reimplemented from WidgetBase.

Definition at line 438 of file umlwidget.cpp.

References WidgetBase::setLineWidth().

Referenced by UMLView::selectionSetLineWidth().

void UMLWidget::setFillColour const QColor &  colour  ) 
 

Sets the background fill colour.

Parameters:
colour the new fill colour

Definition at line 443 of file umlwidget.cpp.

References m_bUsesDiagramFillColour, and m_FillColour.

Referenced by ObjectWidget::slotColorChanged(), and UMLWidgetColorPage::updateUMLWidget().

QColor UMLWidget::getFillColour  )  const [inline]
 

Read property of QColor m_FillColour.

Definition at line 135 of file umlwidget.h.

References m_FillColour.

Referenced by slotMenuSelection().

void UMLWidget::mouseMoveEvent QMouseEvent *  me  )  [virtual]
 

Calls the method with the same name in UMLWidgetController.

See also:
UMLWidgetController::mouseMoveEvent
Parameters:
me The QMouseEvent event.

Definition at line 170 of file umlwidget.cpp.

References m_widgetController, and UMLWidgetController::mouseMoveEvent().

Referenced by ToolBarStateArrow::mouseMoveWidget().

virtual bool UMLWidget::isText  )  [inline, virtual]
 

Returns whether this is a line of text.

Used for transparency in printing.

Returns:
always false

Reimplemented in FloatingTextWidget.

Definition at line 153 of file umlwidget.h.

void UMLWidget::setSelected bool  _select  )  [virtual]
 

Sets the state of whether the widget is selected.

Parameters:
_select The state of whether the widget is selected.

Reimplemented in MessageWidget.

Definition at line 680 of file umlwidget.cpp.

References UMLView::getWidgetAt(), getX(), getY(), getZ(), setZ(), UMLView::showDocumentation(), UMLApp::slotCopyChanged(), and widgetHasUMLObject().

Referenced by UMLWidgetController::deselect(), UMLView::getDiagram(), UMLWidgetController::resetSelection(), UMLWidgetController::selectMultiple(), MessageWidget::setSelected(), and slotClearAllSelected().

bool UMLWidget::getSelected  )  const [inline]
 

Returns the state of whether the widget is selected.

Returns:
Returns the state of whether the widget is selected.

Definition at line 169 of file umlwidget.h.

Referenced by UMLView::deleteSelection(), FloatingTextWidgetController::moveWidgetBy(), UMLView::selectAssociations(), MessageWidget::setSelected(), and AssociationWidget::widgetMoved().

void UMLWidget::setView UMLView v  ) 
 

Sets the view the widget is on.

Parameters:
v The view the widget is on.

Definition at line 724 of file umlwidget.cpp.

References slotClearAllSelected(), slotColorChanged(), slotLineWidthChanged(), and slotRemovePopupMenu().

bool UMLWidget::activate IDChangeLog ChangeLog = 0  )  [virtual]
 

Activate the object after serializing it from a QDataStream.

Parameters:
ChangeLog 
Returns:
true for success

Reimplemented in FloatingTextWidget, MessageWidget, and ObjectWidget.

Definition at line 471 of file umlwidget.cpp.

References UMLDoc::findObjectById(), WidgetBase::getBaseType(), getHeight(), UMLView::getPaste(), FloatingTextWidget::getRole(), getWidth(), getX(), getY(), m_bActivated, m_Font, m_pDoc, setFont(), setSize(), setX(), setY(), updateComponentSize(), and widgetHasUMLObject().

Referenced by UMLView::activate().

int UMLWidget::onWidget const QPoint &  p  )  [virtual]
 

Returns 0 if the given point is not in the boundaries of the widget, else returns a number which is proportional to the size of the widget.

Parameters:
p Point to be checked.
Returns:
0 if the given point is not in the boundaries of the widget; (width()+height())/2 if the point is within the boundaries.

Reimplemented in MessageWidget.

Definition at line 651 of file umlwidget.cpp.

References getX(), and getY().

Referenced by UMLView::contentsDropEvent(), UMLView::getWidgetAt(), and MessageWidget::onWidget().

virtual void UMLWidget::draw QPainter &  p,
int  offsetX,
int  offsetY
[pure virtual]
 

Draws the UMLWidget on the given paint device.

Parameters:
p The painter for the drawing device
offsetX x position to start the drawing.
offsetY y position to start the drawing.

Implemented in ActivityWidget, ActorWidget, ArtifactWidget, BoxWidget, ClassifierWidget, ComponentWidget, DatatypeWidget, EntityWidget, EnumWidget, FloatingTextWidget, ForkJoinWidget, MessageWidget, NodeWidget, NoteWidget, ObjectWidget, PackageWidget, StateWidget, and UseCaseWidget.

Referenced by drawShape().

void UMLWidget::setPen QPainter &  p  ) 
 

Set the pen.

Definition at line 672 of file umlwidget.cpp.

Referenced by AssociationWidget::createAssocClassLine(), UseCaseWidget::draw(), StateWidget::draw(), PackageWidget::draw(), ObjectWidget::draw(), NoteWidget::draw(), NodeWidget::draw(), MessageWidget::draw(), EnumWidget::draw(), EntityWidget::draw(), DatatypeWidget::draw(), ComponentWidget::draw(), ClassifierWidget::draw(), BoxWidget::draw(), ArtifactWidget::draw(), ActorWidget::draw(), ActivityWidget::draw(), ObjectWidget::drawActor(), MessageWidget::drawArrow(), ObjectWidget::drawObject(), ToolBarStateArrow::mousePressEmpty(), ToolBarStateMessages::setFirstWidget(), and ObjectWidget::slotColorChanged().

void UMLWidget::setFont QFont  font  )  [virtual]
 

Sets the font the widget is to use.

Parameters:
font Font to be set.

Reimplemented in NoteWidget.

Definition at line 907 of file umlwidget.cpp.

References forceUpdateFontMetrics(), UMLDoc::loading(), m_Font, and m_pDoc.

Referenced by activate(), MessageWidget::activate(), MessageWidget::lwSetFont(), AssociationWidget::lwSetFont(), UMLView::setFont(), NoteWidget::setFont(), ClassPropDlg::slotApply(), slotMenuSelection(), MessageWidget::slotMenuSelection(), and FloatingTextWidget::slotMenuSelection().

QFont UMLWidget::getFont  )  const [virtual]
 

Returns the font the widget is to use.

Definition at line 903 of file umlwidget.cpp.

References m_Font.

Referenced by EnumWidget::calculateSize(), EntityWidget::calculateSize(), ClassifierWidget::calculateTemplatesBoxSize(), UseCaseWidget::draw(), StateWidget::draw(), PackageWidget::draw(), NodeWidget::draw(), EnumWidget::draw(), EntityWidget::draw(), DatatypeWidget::draw(), ComponentWidget::draw(), ClassifierWidget::draw(), ClassifierWidget::drawAsCircle(), ClassifierWidget::drawMembers(), ObjectWidget::drawObject(), NoteWidget::drawText(), slotMenuSelection(), and FloatingTextWidget::slotMenuSelection().

bool UMLWidget::getStartMove  )  [inline]
 

Returns whether we triggered the update of position movement.

If so, you probably don't want to move it.

Returns:
The moving state.

Definition at line 236 of file umlwidget.h.

void UMLWidget::setX int  x  )  [virtual]
 

Sets the x-coordinate.

Currently, the only class that reimplements this method is ObjectWidget.

Parameters:
x The x-coordinate to be set.

Reimplemented in NoteWidget, and ObjectWidget.

Definition at line 737 of file umlwidget.cpp.

References m_bIgnoreSnapToGrid, and UMLView::snappedX().

Referenced by activate(), UMLView::addWidget(), MessageWidget::calculateWidget(), Widget_Factory::createWidget(), AssociationWidget::mouseMoveEvent(), moveBy(), UMLWidgetController::moveWidgetBy(), ObjectWidgetController::moveWidgetBy(), FloatingTextWidgetController::moveWidgetBy(), operator=(), MessageWidget::setTextPosition(), ObjectWidget::setX(), NoteWidget::setX(), and slotSnapToGrid().

void UMLWidget::setY int  y  )  [virtual]
 

Sets the y-coordinate.

Currently, the only class that reimplements this method is ObjectWidget.

Parameters:
y The y-coordinate to be set.

Reimplemented in NoteWidget, and ObjectWidget.

Definition at line 744 of file umlwidget.cpp.

References m_bIgnoreSnapToGrid, and UMLView::snappedX().

Referenced by activate(), UMLView::addWidget(), MessageWidget::calculateWidget(), Widget_Factory::createWidget(), AssociationWidget::mouseMoveEvent(), moveBy(), UMLWidgetController::moveWidgetBy(), MessageWidgetController::moveWidgetBy(), FloatingTextWidgetController::moveWidgetBy(), operator=(), MessageWidget::setTextPosition(), ObjectWidget::setY(), NoteWidget::setY(), and slotSnapToGrid().

void UMLWidget::setZ int  z  )  [virtual]
 

Sets the z-coordinate.

Parameters:
z The z-coordinate to be set.

Definition at line 751 of file umlwidget.cpp.

References getZ().

Referenced by BoxWidget::BoxWidget(), FloatingTextWidget::FloatingTextWidget(), init(), NoteWidget::loadFromXMI(), ToolBarStateArrow::mousePressEmpty(), UMLWidgetController::mouseReleaseEvent(), NodeWidget::NodeWidget(), NoteWidget::NoteWidget(), and setSelected().

int UMLWidget::getX  )  const [inline]
 

Gets the x-coordinate.

Definition at line 268 of file umlwidget.h.

Referenced by activate(), MessageWidget::calculateDimensions(), MessageWidget::calculateDimensionsAsynchronous(), MessageWidget::calculateDimensionsCreation(), MessageWidget::calculateDimensionsSynchronous(), AssociationWidget::calculateEndingPoints(), FloatingTextWidgetController::constrainMovementForAllWidgets(), MessageWidget::constrainX(), MessageWidget::drawAsynchronous(), MessageWidget::drawCreation(), drawShape(), MessageWidget::drawSynchronous(), UMLWidgetController::getBiggestX(), UMLWidgetController::getPositionDifference(), UMLWidgetController::getSmallestX(), UMLWidgetController::isInResizeArea(), AssociationWidget::mouseMoveEvent(), UMLWidgetController::mouseReleaseEvent(), moveBy(), SeqLineWidget::moveDestructionBox(), ObjectWidget::moveEvent(), UMLWidgetController::moveWidgetBy(), ObjectWidgetController::moveWidgetBy(), FloatingTextWidgetController::moveWidgetBy(), onWidget(), MessageWidget::onWidget(), UMLWidgetController::resize(), UMLWidgetController::saveWidgetValues(), FloatingTextWidgetController::saveWidgetValues(), ForkJoinWidget::setDrawVertical(), setName(), StateWidget::setName(), setSelected(), MessageWidget::setTextPosition(), SeqLineWidget::setupDestructionBox(), slotSnapToGrid(), ObjectWidget::tabDown(), ObjectWidget::tabUp(), updateComponentSize(), updateWidget(), and UMLWidgetController::wasPositionChanged().

int UMLWidget::getY  )  const [inline]
 

Gets the y-coordinate.

Definition at line 275 of file umlwidget.h.

Referenced by activate(), MessageWidget::calculateDimensions(), MessageWidget::calculateDimensionsCreation(), AssociationWidget::calculateEndingPoints(), ObjectWidget::canTabUp(), MessageWidgetController::constrainMovementForAllWidgets(), FloatingTextWidgetController::constrainMovementForAllWidgets(), MessageWidget::drawAsynchronous(), MessageWidget::drawCreation(), drawShape(), MessageWidget::drawSynchronous(), UMLWidgetController::getBiggestY(), ObjectWidget::getEndLineY(), MessageWidget::getMinY(), UMLWidgetController::getPositionDifference(), UMLWidgetController::getSmallestY(), UMLWidgetController::isInResizeArea(), ObjectWidget::messageOverlap(), AssociationWidget::mouseMoveEvent(), UMLWidgetController::mouseReleaseEvent(), moveBy(), SeqLineWidget::moveDestructionBox(), ObjectWidget::moveEvent(), UMLWidgetController::moveWidgetBy(), MessageWidgetController::moveWidgetBy(), FloatingTextWidgetController::moveWidgetBy(), onWidget(), MessageWidget::onWidget(), UMLWidgetController::resize(), UMLWidgetController::saveWidgetValues(), MessageWidgetController::saveWidgetValues(), FloatingTextWidgetController::saveWidgetValues(), ForkJoinWidget::setDrawVertical(), SeqLineWidget::setEndOfLine(), setName(), StateWidget::setName(), setSelected(), MessageWidget::setTextPosition(), SeqLineWidget::setupDestructionBox(), ObjectWidget::slotMessageMoved(), slotSnapToGrid(), MessageWidget::slotWidgetMoved(), ObjectWidget::tabDown(), ObjectWidget::tabUp(), updateComponentSize(), updateWidget(), and UMLWidgetController::wasPositionChanged().

int UMLWidget::getZ  )  const [inline]
 

Gets the z-coordinate.

Definition at line 282 of file umlwidget.h.

Referenced by UMLWidgetController::mouseReleaseEvent(), setSelected(), and setZ().

int UMLWidget::getHeight  )  const [inline]
 

Returns the height of widget.

Definition at line 289 of file umlwidget.h.

Referenced by activate(), MessageWidget::calculateDimensionsCreation(), AssociationWidget::calculateEndingPoints(), MessageWidget::drawAsynchronous(), MessageWidget::drawSynchronous(), UMLWidgetController::getBiggestY(), ObjectWidget::getEndLineY(), MessageWidget::getMinY(), ObjectWidget::messageOverlap(), MessageWidget::MessageWidget(), AssociationWidget::mouseMoveEvent(), SeqLineWidget::moveDestructionBox(), MessageWidgetController::moveWidgetBy(), FloatingTextWidgetController::moveWidgetBy(), MessageWidget::onWidget(), ObjectWidgetController::resizeWidget(), SeqLineWidget::setEndOfLine(), MessageWidget::setTextPosition(), SeqLineWidget::setupDestructionBox(), ObjectWidget::slotMessageMoved(), and UMLWidgetController::wasSizeChanged().

int UMLWidget::getWidth  )  const [inline]
 

Returns the width of the widget.

Definition at line 296 of file umlwidget.h.

Referenced by activate(), MessageWidget::calculateDimensionsAsynchronous(), MessageWidget::calculateDimensionsCreation(), MessageWidget::calculateDimensionsSynchronous(), AssociationWidget::calculateEndingPoints(), MessageWidget::constrainX(), MessageWidget::drawAsynchronous(), MessageWidget::drawCreation(), MessageWidget::drawSynchronous(), UMLWidgetController::getBiggestX(), AssociationWidget::mouseMoveEvent(), SeqLineWidget::moveDestructionBox(), MessageWidget::onWidget(), MessageWidget::setTextPosition(), SeqLineWidget::setupDestructionBox(), and UMLWidgetController::wasSizeChanged().

void UMLWidget::setSize int  width,
int  height
 

Sets the size.

If m_pView->getSnapComponentSizeToGrid() is true, then set the next larger size that snaps to the grid.

Definition at line 805 of file umlwidget.cpp.

References UMLView::getSnapX(), and UMLView::getSnapY().

Referenced by activate(), ArtifactWidget::ArtifactWidget(), BoxWidget::BoxWidget(), MessageWidget::calculateDimensionsAsynchronous(), MessageWidget::calculateDimensionsCreation(), MessageWidget::calculateDimensionsSynchronous(), EnumWidget::init(), EntityWidget::init(), NodeWidget::NodeWidget(), NoteWidget::NoteWidget(), UMLWidgetController::resizeWidget(), ObjectWidgetController::resizeWidget(), MessageWidgetController::resizeWidget(), and updateComponentSize().

void UMLWidget::setIgnoreSnapToGrid bool  to  ) 
 

Set m_bIgnoreSnapToGrid.

Definition at line 797 of file umlwidget.cpp.

References m_bIgnoreSnapToGrid.

bool UMLWidget::getIgnoreSnapToGrid  )  const
 

Return the value of m_bIgnoreSnapToGrid.

Definition at line 801 of file umlwidget.cpp.

References m_bIgnoreSnapToGrid.

void UMLWidget::moveBy int  dx,
int  dy
 

Move the widget by an X and Y offset relative to the current position.

Definition at line 664 of file umlwidget.cpp.

References adjustAssocs(), getX(), getY(), setX(), and setY().

void UMLWidget::removeAssoc AssociationWidget pAssoc  ) 
 

Removes an already created association from the list of associations that include this UMLWidget.

Definition at line 545 of file umlwidget.cpp.

References m_Assocs.

Referenced by AssociationWidget::cleanup().

void UMLWidget::addAssoc AssociationWidget pAssoc  ) 
 

Adds an already created association to the list of associations that include this UMLWidget.

Definition at line 539 of file umlwidget.cpp.

References m_Assocs.

AssociationWidgetList& UMLWidget::getAssocList  )  [inline]
 

Returns the list of associations connected to this widget.

Definition at line 338 of file umlwidget.h.

References m_Assocs.

Referenced by AssocRules::allowAssociation().

bool UMLWidget::getUsesDiagramFillColour  )  const [inline]
 

Returns m_bUsesDiagramFillColour.

Definition at line 345 of file umlwidget.h.

References m_bUsesDiagramFillColour.

bool UMLWidget::getUsesDiagramUseFillColour  )  const [inline]
 

Returns m_bUsesDiagramUseFillColour.

Definition at line 352 of file umlwidget.h.

void UMLWidget::setUsesDiagramFillColour bool  usesDiagramFillColour  )  [inline]
 

Sets m_bUsesDiagramFillColour.

Definition at line 359 of file umlwidget.h.

References m_bUsesDiagramFillColour.

void UMLWidget::setUsesDiagramUseFillColour bool  usesDiagramUseFillColour  )  [inline]
 

Sets m_bUsesDiagramUseFillColour.

Definition at line 366 of file umlwidget.h.

void UMLWidget::setIsInstance bool  isInstance  )  [inline]
 

Write property of bool m_bIsInstance.

Definition at line 373 of file umlwidget.h.

References m_bIsInstance.

Referenced by Widget_Factory::createWidget().

bool UMLWidget::getIsInstance  )  const [inline]
 

Read property of bool m_bIsInstance.

Definition at line 380 of file umlwidget.h.

References m_bIsInstance.

void UMLWidget::setInstanceName const QString &  instanceName  )  [inline]
 

Write property of m_instanceName.

Reimplemented in ObjectWidget.

Definition at line 387 of file umlwidget.h.

References m_instanceName.

Referenced by ClassGenPage::updateObject().

QString UMLWidget::getInstanceName  )  const [inline]
 

Read property of m_instanceName.

Reimplemented in ObjectWidget.

Definition at line 394 of file umlwidget.h.

References m_instanceName.

Referenced by NodeWidget::calculateSize(), ComponentWidget::calculateSize(), NodeWidget::draw(), and ComponentWidget::draw().

bool UMLWidget::getShowStereotype  )  const
 

Returns the status of whether to show Stereotype.

Returns:
True if stereotype is shown.

Definition at line 937 of file umlwidget.cpp.

References m_bShowStereotype.

Referenced by ClassOptionsPage::setupPage().

void UMLWidget::setShowStereotype bool  _status  )  [virtual]
 

Set the status of whether to show Stereotype.

Parameters:
_status True if stereotype shall be shown.

Definition at line 931 of file umlwidget.cpp.

References m_bShowStereotype, and updateComponentSize().

Referenced by ClassOptionsPage::updateWidget().

void UMLWidget::showProperties  )  [virtual]
 

Show a properties dialog for a UMLWidget.

Reimplemented in ActivityWidget, FloatingTextWidget, ObjectWidget, and StateWidget.

Definition at line 596 of file umlwidget.cpp.

References UMLApp::getDocWindow(), WidgetBase::getUMLObject(), m_pDoc, UMLDoc::setModified(), DocWindow::showDocumentation(), and DocWindow::updateDocumentation().

Referenced by slotMenuSelection().

bool UMLWidget::isActivated  ) 
 

Returns true if the Activate method has been called for this instance.

Returns:
The activate status.

Definition at line 531 of file umlwidget.cpp.

References m_bActivated.

Referenced by UMLView::activate().

void UMLWidget::setName const QString &  strName  )  [virtual]
 

Sets the name in the corresponding UMLObject.

Sets the local m_Text if m_pObject is NULL.

Parameters:
strName The name to be set.

Reimplemented in StateWidget.

Definition at line 756 of file umlwidget.cpp.

References adjustAssocs(), getX(), getY(), m_Text, UMLObject::setName(), and updateComponentSize().

Referenced by FloatingTextWidget::handleRename(), and UMLView::slotMenuSelection().

QString UMLWidget::getName  )  const [virtual]
 

Gets the name from the corresponding UMLObject.

Returns the local m_Text if m_pObject is NULL.

Returns:
The currently set name.

Reimplemented in StateWidget.

Definition at line 765 of file umlwidget.cpp.

References UMLObject::getName(), and m_Text.

Referenced by UseCaseWidget::calculateSize(), EnumWidget::calculateSize(), EntityWidget::calculateSize(), ActorWidget::calculateSize(), ActivityWidget::calculateSize(), UseCaseWidget::draw(), PackageWidget::draw(), NodeWidget::draw(), EnumWidget::draw(), EntityWidget::draw(), DatatypeWidget::draw(), ComponentWidget::draw(), ClassifierWidget::draw(), ActorWidget::draw(), ActivityWidget::draw(), ObjectWidget::drawActor(), ClassifierWidget::drawAsCircle(), ObjectWidget::drawObject(), and UMLView::onWidgetLine().

void UMLWidget::startPopupMenu const QPoint &  At  ) 
 

Starts the popup menu.

Parameters:
At The Point where the diagram is to be coming up.

Definition at line 610 of file umlwidget.cpp.

References UMLApp::getGenerator(), UMLView::getSelectCount(), slotMenuSelection(), and slotRemovePopupMenu().

Referenced by UMLWidgetController::showPopupMenu().

void UMLWidget::adjustAssocs int  x,
int  y
[virtual]
 

Adjusts associations with the given co-ordinates.

Parameters:
x The x-coordinate.
y The y-coordinate.

Reimplemented in ClassifierWidget.

Definition at line 551 of file umlwidget.cpp.

References UMLDoc::loading(), m_Assocs, m_pDoc, AssociationWidget::saveIdealTextPositions(), and AssociationWidget::widgetMoved().

Referenced by ClassifierWidget::adjustAssocs(), MessageWidget::calculateDimensions(), UMLWidgetController::mouseReleaseEvent(), moveBy(), UMLWidgetController::resize(), ForkJoinWidget::setDrawVertical(), setName(), StateWidget::setName(), ObjectWidget::tabDown(), ObjectWidget::tabUp(), updateComponentSize(), and updateWidget().

void UMLWidget::adjustUnselectedAssocs int  x,
int  y
 

Adjusts all unselected associations with the given co-ordinates.

Parameters:
x The x-coordinate.
y The y-coordinate.

Definition at line 579 of file umlwidget.cpp.

References AssociationWidget::getSelected(), m_Assocs, AssociationWidget::saveIdealTextPositions(), and AssociationWidget::widgetMoved().

Referenced by UMLWidgetController::mouseMoveEvent().

void UMLWidget::setActivated bool  Active = true  ) 
 

Set the m_bActivated flag of a widget but does not perform the Activate method.

Parameters:
Active Status of activation is to be set.

Definition at line 535 of file umlwidget.cpp.

References m_bActivated.

Referenced by MessageWidget::activate(), AssociationWidget::loadFromXMI(), and AssociationWidget::setName().

void UMLWidget::cleanup  )  [virtual]
 

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

Used by child classes. This should be called before deleting a widget of a diagram.

Reimplemented in MessageWidget, and ObjectWidget.

Definition at line 771 of file umlwidget.cpp.

Referenced by ObjectWidget::cleanup(), MessageWidget::cleanup(), UMLView::loadWidgetFromXMI(), and ~UMLWidget().

bool UMLWidget::widgetHasUMLObject Uml::Widget_Type  type  )  [static]
 

Returns whether the widget type has an associated UMLObject.

Definition at line 779 of file umlwidget.cpp.

Referenced by activate(), and setSelected().

void UMLWidget::updateComponentSize  ) 
 

Update the size of this widget.

Definition at line 823 of file umlwidget.cpp.

References adjustAssocs(), calculateSize(), getX(), getY(), UMLDoc::loading(), m_pDoc, and setSize().

Referenced by activate(), ActivityWidget::ActivityWidget(), StateWidget::addActivity(), UMLView::addAssociation(), ArtifactWidget::ArtifactWidget(), FloatingTextWidget::changeTextDlg(), ClassifierWidget::changeToClass(), ClassifierWidget::changeToInterface(), FloatingTextWidget::FloatingTextWidget(), forceUpdateFontMetrics(), FloatingTextWidget::handleRename(), EnumWidget::init(), EntityWidget::init(), NodeWidget::NodeWidget(), StateWidget::removeActivity(), StateWidget::setActivities(), ClassifierWidget::setAttSignature(), ObjectWidget::setDrawAsActor(), ClassifierWidget::setDrawAsCircle(), ForkJoinWidget::setDrawVertical(), FloatingTextWidget::setMessageText(), ObjectWidget::setMultipleInstance(), setName(), StateWidget::setName(), ClassifierWidget::setOpSignature(), FloatingTextWidget::setPostText(), FloatingTextWidget::setPreText(), ClassifierWidget::setShowAtts(), ClassifierWidget::setShowAttSigs(), ClassifierWidget::setShowOps(), ClassifierWidget::setShowOpSigs(), EnumWidget::setShowPackage(), ClassifierWidget::setShowPackage(), ClassifierWidget::setShowPublicOnly(), setShowStereotype(), ClassifierWidget::setShowVisibility(), FloatingTextWidget::setText(), MessageWidget::setTextPosition(), ObjectWidget::slotMenuSelection(), ClassifierWidget::slotMenuSelection(), StateWidget::StateWidget(), ClassifierWidget::toggleDrawAsCircle(), ClassifierWidget::toggleShowAtts(), ClassifierWidget::toggleShowAttSigs(), ClassifierWidget::toggleShowOps(), ClassifierWidget::toggleShowOpSigs(), EnumWidget::toggleShowPackage(), ClassifierWidget::toggleShowPackage(), ClassifierWidget::toggleShowPublicOnly(), ClassifierWidget::toggleShowStereotype(), ClassifierWidget::toggleShowVisibility(), UMLView::updateComponentSizes(), ClassifierWidget::updateSigs(), and updateWidget().

void UMLWidget::forceUpdateFontMetrics QPainter *  painter  ) 
 

Note:
For performance Reasons, only FontMetrics for already used font types are updated. Not yet used font types will not get a font metric and will get the same font metric as if painter was zero. This behaviour is acceptable, because diagrams will always be showed on Display first before a special painter like a printer device is used.

Definition at line 915 of file umlwidget.cpp.

References setDefaultFontMetrics(), and updateComponentSize().

Referenced by UMLView::forceUpdateWidgetFontMetrics(), and setFont().

void UMLWidget::mousePressEvent QMouseEvent *  me  )  [virtual]
 

Calls the method with the same name in UMLWidgetController.

See also:
UMLWidgetController::mousePressEvent
Parameters:
me The QMouseEvent event.

Definition at line 174 of file umlwidget.cpp.

References m_widgetController, and UMLWidgetController::mousePressEvent().

Referenced by ToolBarStateArrow::mousePressWidget().

void UMLWidget::moveEvent QMoveEvent *  me  )  [virtual]
 

Overrides the standard operation.

Parameters:
me The move event.

Reimplemented in ObjectWidget.

Definition at line 941 of file umlwidget.cpp.

UMLWidgetController * UMLWidget::getWidgetController  ) 
 

Returns the UMLWdigetController for this widget.

Definition at line 1021 of file umlwidget.cpp.

References m_widgetController.

Referenced by UMLWidgetController::mouseMoveEvent().

void UMLWidget::constrain int &  width,
int &  height
[protected, virtual]
 

Apply possible constraints to the given candidate width and height.

The default implementation calls calculateSize() and assigns the returned values if they are greater than the input values.

Parameters:
width input value, may be modified by the constraint
height input value, may be modified by the constraint

Reimplemented in ActivityWidget, and ForkJoinWidget.

Definition at line 193 of file umlwidget.cpp.

References calculateSize().

Referenced by UMLWidgetController::resize().

void UMLWidget::drawSelected QPainter *  p,
int  offsetX,
int  offsetY
[protected, virtual]
 

Draws that the widget is selected.

Parameters:
p Device on which is the selection is to be drawn.
offsetX The x-coordinate for drawing.
offsetY The y-coordinate for drawing.

Reimplemented in ForkJoinWidget.

Definition at line 449 of file umlwidget.cpp.

Referenced by UseCaseWidget::draw(), StateWidget::draw(), PackageWidget::draw(), ObjectWidget::draw(), NoteWidget::draw(), NodeWidget::draw(), FloatingTextWidget::draw(), EnumWidget::draw(), EntityWidget::draw(), DatatypeWidget::draw(), ComponentWidget::draw(), ClassifierWidget::draw(), BoxWidget::draw(), ActorWidget::draw(), ActivityWidget::draw(), ClassifierWidget::drawAsCircle(), MessageWidget::drawAsynchronous(), MessageWidget::drawCreation(), and MessageWidget::drawSynchronous().

void UMLWidget::drawShape QPainter &  p  )  [protected, virtual]
 

Overrides default method.

Parameters:
p Device on which the shape has to be drawn.

Definition at line 676 of file umlwidget.cpp.

References draw(), getX(), and getY().

QSize UMLWidget::calculateSize  )  [protected, virtual]
 

Compute the minimum possible width and height.

The default implementation returns width=20, height=20.

Returns:
QSize(mininum_width, minimum_height)

Reimplemented in ActivityWidget, ActorWidget, ArtifactWidget, ClassifierWidget, ComponentWidget, DatatypeWidget, EntityWidget, EnumWidget, FloatingTextWidget, ForkJoinWidget, NodeWidget, NoteWidget, ObjectWidget, PackageWidget, StateWidget, and UseCaseWidget.

Definition at line 189 of file umlwidget.cpp.

Referenced by PackageWidget::calculateSize(), NodeWidget::calculateSize(), EnumWidget::calculateSize(), EntityWidget::calculateSize(), DatatypeWidget::calculateSize(), ClassifierWidget::calculateSize(), ArtifactWidget::calculateSize(), constrain(), and updateComponentSize().

void UMLWidget::setDefaultFontMetrics UMLWidget::FontType  fontType  )  [protected, virtual]
 

Template Method, override this to set the default font metric.

Definition at line 833 of file umlwidget.cpp.

References m_Font, and setFontMetrics().

Referenced by forceUpdateFontMetrics(), and getFontMetrics().

QFontMetrics & UMLWidget::getFontMetrics UMLWidget::FontType  fontType  )  [protected]
 

Returns the font metric used by this object for Text which uses bold/italic fonts.

Definition at line 891 of file umlwidget.cpp.

References setDefaultFontMetrics().

Referenced by ClassifierWidget::calculateAsCircleSize(), UseCaseWidget::calculateSize(), StateWidget::calculateSize(), PackageWidget::calculateSize(), ObjectWidget::calculateSize(), NodeWidget::calculateSize(), FloatingTextWidget::calculateSize(), EnumWidget::calculateSize(), EntityWidget::calculateSize(), DatatypeWidget::calculateSize(), ComponentWidget::calculateSize(), ClassifierWidget::calculateSize(), ActorWidget::calculateSize(), ActivityWidget::calculateSize(), UseCaseWidget::draw(), StateWidget::draw(), PackageWidget::draw(), NodeWidget::draw(), EnumWidget::draw(), EntityWidget::draw(), DatatypeWidget::draw(), ComponentWidget::draw(), ClassifierWidget::draw(), ActorWidget::draw(), ActivityWidget::draw(), ObjectWidget::drawActor(), ClassifierWidget::drawAsCircle(), and NoteWidget::drawText().

void UMLWidget::setFontMetrics UMLWidget::FontType  fontType,
QFontMetrics  fm
[protected]
 

set the font metric to use

Definition at line 898 of file umlwidget.cpp.

Referenced by setDefaultFontMetrics().

void UMLWidget::init  )  [protected]
 

Initializes key attributes of the class.

Reimplemented in ClassifierWidget, EntityWidget, EnumWidget, and MessageWidget.

Definition at line 205 of file umlwidget.cpp.

References UMLApp::getDocument(), UMLView::getOptionState(), m_bActivated, m_bIgnoreSnapToGrid, m_bIsInstance, m_bShowStereotype, m_bUseFillColour, m_bUsesDiagramFillColour, m_FillColour, m_Font, m_pDoc, setZ(), slotClearAllSelected(), slotColorChanged(), slotLineWidthChanged(), and slotRemovePopupMenu().

Referenced by ArtifactWidget::ArtifactWidget(), ComponentWidget::ComponentWidget(), DatatypeWidget::DatatypeWidget(), FloatingTextWidget::FloatingTextWidget(), ForkJoinWidget::ForkJoinWidget(), NoteWidget::NoteWidget(), ObjectWidget::ObjectWidget(), PackageWidget::PackageWidget(), and UMLWidget().

void UMLWidget::slotRemovePopupMenu  )  [virtual, slot]
 

This slot is entered when an event has occurred on the views display, most likely a mouse event.

Before it sends out that mouse event all children should make sure that they don't have a menu active or there could be more than one popup menu displayed.

Definition at line 643 of file umlwidget.cpp.

References slotMenuSelection().

Referenced by init(), setView(), and startPopupMenu().

void UMLWidget::updateWidget  )  [virtual, slot]
 

When a widget changes this slot captures that signal.

Definition at line 178 of file umlwidget.cpp.

References adjustAssocs(), UMLView::createAutoAttributeAssociations(), getX(), getY(), and updateComponentSize().

Referenced by UMLWidget().

void UMLWidget::slotMenuSelection int  sel  )  [virtual, slot]
 

Captures any popup menu signals for menus it created.

Parameters:
sel The command which has to be executed.

Reimplemented in ActivityWidget, ClassifierWidget, EntityWidget, EnumWidget, FloatingTextWidget, ForkJoinWidget, MessageWidget, NoteWidget, ObjectWidget, and StateWidget.

Definition at line 249 of file umlwidget.cpp.

References UMLView::addObject(), UMLObject::clone(), getFillColour(), UMLView::getFirstMultiSelectedWidget(), getFont(), WidgetBase::getLineColor(), FloatingTextWidget::handleRename(), m_bUseFillColour, m_pDoc, UMLApp::refactor(), UMLView::selectionToggleShow(), UMLView::selectionUseFillColor(), setFont(), UMLDoc::setModified(), UMLObject::showProperties(), showProperties(), and UMLApp::viewCodeDocument().

Referenced by UMLWidgetController::doMouseDoubleClick(), StateWidget::slotMenuSelection(), ObjectWidget::slotMenuSelection(), NoteWidget::slotMenuSelection(), FloatingTextWidget::slotMenuSelection(), EnumWidget::slotMenuSelection(), EntityWidget::slotMenuSelection(), ClassifierWidget::slotMenuSelection(), ActivityWidget::slotMenuSelection(), slotRemovePopupMenu(), and startPopupMenu().

void UMLWidget::slotWidgetMoved Uml::IDType  id  )  [virtual, slot]
 

Captures when another widget moves if it is link to it that signal.

Parameters:
id The id of object behind the widget.

Reimplemented in MessageWidget.

Definition at line 393 of file umlwidget.cpp.

void UMLWidget::slotColorChanged Uml::IDType  viewID  )  [virtual, slot]
 

Captures a color change signal.

Parameters:
viewID The id of the object behind the widget.

Reimplemented in ObjectWidget.

Definition at line 395 of file umlwidget.cpp.

References UMLView::getFillColor(), UMLView::getID(), UMLView::getLineColor(), UMLView::getUseFillColor(), m_bUseFillColour, m_bUsesDiagramFillColour, and m_FillColour.

Referenced by init(), and setView().

void UMLWidget::slotLineWidthChanged Uml::IDType  viewID  )  [virtual, slot]
 

Captures a linewidth change signal.

Parameters:
viewID The id of the object behind the widget.

Definition at line 412 of file umlwidget.cpp.

References UMLView::getID(), and UMLView::getLineWidth().

Referenced by init(), and setView().

void UMLWidget::slotClearAllSelected  )  [slot]
 

Captures a sigClearAllSelected signal sent by UMLView.

Definition at line 719 of file umlwidget.cpp.

References setSelected().

Referenced by init(), and setView().

void UMLWidget::slotSnapToGrid  )  [slot]
 

Tells the widget to snap to grid.

Will use the grid settings of the UMLView it belongs to.

Definition at line 774 of file umlwidget.cpp.

References getX(), getY(), setX(), and setY().

void UMLWidget::sigWidgetMoved Uml::IDType  id  )  [signal]
 

Emit when the widget moves its' position.

Parameters:
id The id of the object behind the widget.

Referenced by MessageWidget::activate(), and ObjectWidget::moveEvent().


Member Data Documentation

bool UMLWidget::m_bUseFillColour [protected]
 

This flag indicates if the UMLWidget uses the Diagram FillColour.

Definition at line 589 of file umlwidget.h.

Referenced by getUseFillColour(), init(), operator=(), setUseFillColour(), slotColorChanged(), and slotMenuSelection().

bool UMLWidget::m_bUsesDiagramFillColour [protected]
 

true by default, false if the colours have been explicitly set for this widget

Definition at line 595 of file umlwidget.h.

Referenced by getUsesDiagramFillColour(), init(), operator=(), setFillColour(), setUsesDiagramFillColour(), and slotColorChanged().

QColor UMLWidget::m_FillColour [protected]
 

Color of the background of the widget.

Definition at line 601 of file umlwidget.h.

Referenced by getFillColour(), init(), operator=(), setFillColour(), and slotColorChanged().

AssociationWidgetList UMLWidget::m_Assocs [protected]
 

A list of AssociationWidgets between the UMLWidget and other UMLWidgets in the diagram.

Definition at line 606 of file umlwidget.h.

Referenced by addAssoc(), adjustAssocs(), adjustUnselectedAssocs(), getAssocList(), operator=(), operator==(), and removeAssoc().

QString UMLWidget::m_Text [protected]
 

getName() returns the name from the UMLObject if this widget has an underlying UMLObject; if it does not, then getName() returns the local m_Text (notably the case for FloatingTextWidget.)

Definition at line 613 of file umlwidget.h.

Referenced by getName(), and setName().

QFont UMLWidget::m_Font [protected]
 

The font the widget will use.

Definition at line 618 of file umlwidget.h.

Referenced by activate(), getFont(), init(), operator=(), setDefaultFontMetrics(), and setFont().

bool UMLWidget::m_bIsInstance [protected]
 

Holds whether this widget is a component instance (i.e.

on a deployment diagram)

Definition at line 623 of file umlwidget.h.

Referenced by getIsInstance(), init(), operator=(), and setIsInstance().

QString UMLWidget::m_instanceName [protected]
 

The instance name (used if on a deployment diagram).

Definition at line 628 of file umlwidget.h.

Referenced by getInstanceName(), operator=(), and setInstanceName().

bool UMLWidget::m_bShowStereotype [protected]
 

Should it show the <<stereotype>> of the widget.

Definition at line 633 of file umlwidget.h.

Referenced by getShowStereotype(), init(), and setShowStereotype().

UMLDoc* UMLWidget::m_pDoc [protected]
 

shortcut for UMLApp::app()->getDocument()

Definition at line 641 of file umlwidget.h.

Referenced by activate(), adjustAssocs(), init(), UMLWidgetController::mouseReleaseEvent(), setFont(), showProperties(), slotMenuSelection(), and updateComponentSize().

bool UMLWidget::m_bActivated [protected]
 

It is true if the Activate Function has been called for this class instance.

Definition at line 649 of file umlwidget.h.

Referenced by activate(), init(), isActivated(), operator=(), AssociationWidget::operator=(), and setActivated().

bool UMLWidget::m_bIgnoreSnapToGrid [protected]
 

Change Widget Behaviour.

Definition at line 654 of file umlwidget.h.

Referenced by getIgnoreSnapToGrid(), init(), operator=(), setIgnoreSnapToGrid(), setX(), and setY().

UMLWidgetController* UMLWidget::m_widgetController [protected]
 

Controller for user interaction events.

Definition at line 660 of file umlwidget.h.

Referenced by getWidgetController(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), UMLWidget(), and ~UMLWidget().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:08 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003