• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdesdk
  • Sitemap
  • Contact Us
 

umbrello/umbrello

UMLWidget Class Reference

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

#include <umlwidget.h>

Inheritance diagram for UMLWidget:
Inheritance graph
[legend]

List of all members.

Public Slots

void slotClearAllSelected ()
virtual void slotColorChanged (Uml::IDType viewID)
virtual void slotLineWidthChanged (Uml::IDType viewID)
virtual void slotMenuSelection (QAction *action)
virtual void slotRemovePopupMenu ()
void slotSnapToGrid ()
virtual void slotWidgetMoved (Uml::IDType id)
virtual void updateWidget ()

Signals

void sigWidgetMoved (Uml::IDType id)

Public Member Functions

 UMLWidget (const UMLWidget &other)
 UMLWidget (UMLView *view, Uml::IDType id=Uml::id_None, UMLWidgetController *widgetController=0)
 UMLWidget (UMLView *view, UMLObject *o, UMLWidgetController *widgetController=0)
virtual ~UMLWidget ()
virtual bool activate (IDChangeLog *ChangeLog=0)
void addAssoc (AssociationWidget *pAssoc)
virtual void adjustAssocs (int x, int y)
void adjustUnselectedAssocs (int x, int y)
AssociationWidgetList & associationWidgetList ()
virtual void cleanup ()
virtual void draw (QPainter &p, int offsetX, int offsetY)=0
virtual QFont font () const
void forceUpdateFontMetrics (QPainter *painter)
QColor getFillColor ()
QColor getFillColour () const
int getHeight () const
bool getIgnoreSnapToGrid () const
bool getSelected () const
bool getShowStereotype () const
bool getStartMove ()
bool getUseFillColour () const
bool getUsesDiagramFillColour () const
bool getUsesDiagramUseFillColour () const
UMLWidgetController * getWidgetController ()
int getWidth () const
int getX () const
int getY () const
int getZ () const
QString instanceName () const
bool isActivated ()
bool isInstance () const
virtual bool isText ()
virtual bool loadFromXMI (QDomElement &qElement)
virtual void mouseDoubleClickEvent (QMouseEvent *me)
virtual void mouseMoveEvent (QMouseEvent *me)
virtual void mousePressEvent (QMouseEvent *me)
virtual void mouseReleaseEvent (QMouseEvent *me)
void moveByLocal (int dx, int dy)
virtual void moveEvent (QMoveEvent *me)
virtual QString name () const
virtual int onWidget (const QPoint &p)
UMLWidget & operator= (const UMLWidget &other)
bool operator== (const UMLWidget &other)
void removeAssoc (AssociationWidget *pAssoc)
virtual void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
void setActivated (bool Active=true)
void setFillColour (const QColor &colour)
void setFillColourcmd (const QColor &colour)
virtual void setFont (QFont font)
void setIgnoreSnapToGrid (bool to)
void setInstanceName (const QString &instanceName)
void setIsInstance (bool isInstance)
void setLineColor (const QColor &colour)
void setLineColorcmd (const QColor &colour)
void setLineWidth (uint width)
virtual void setName (const QString &strName)
void setPenFromSettings (QPainter &p)
virtual void setSelected (bool _select)
void setSelectedFlag (bool _select)
virtual void setShowStereotype (bool _status)
void setSize (int width, int height)
virtual ListPopupMenu * setupPopupMenu (ListPopupMenu *menu=0)
void setUseFillColour (bool fc)
void setUsesDiagramFillColour (bool usesDiagramFillColour)
void setUsesDiagramUseFillColour (bool usesDiagramUseFillColour)
void setView (UMLView *v)
virtual void setX (int x)
virtual void setY (int y)
virtual void setZ (int z)
virtual void showProperties ()
void updateComponentSize ()

Static Public Member Functions

static bool widgetHasUMLObject (Uml::Widget_Type type)

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 QSize calculateSize ()
virtual void constrain (int &width, int &height)
virtual void drawSelected (QPainter *p, int offsetX, int offsetY)
virtual void drawShape (QPainter &p)
QFontMetrics & getFontMetrics (UMLWidget::FontType fontType)
void init ()
virtual void setDefaultFontMetrics (UMLWidget::FontType fontType, QPainter &painter)
virtual void setDefaultFontMetrics (UMLWidget::FontType fontType)
void setFontMetrics (UMLWidget::FontType fontType, QFontMetrics fm)
void setupFontType (QFont &font, UMLWidget::FontType fontType)

Protected Attributes

AssociationWidgetList m_Assocs
bool m_bActivated
bool m_bIgnoreSnapComponentSizeToGrid
bool m_bIgnoreSnapToGrid
bool m_bIsInstance
bool m_bResizable
bool m_bSelected
bool m_bShowStereotype
bool m_bStartMove
bool m_bUseFillColour
bool m_bUsesDiagramFillColour
bool m_bUsesDiagramUseFillColour
QColor m_FillColour
QFont m_Font
QString m_instanceName
bool m_menuIsEmbedded
int m_nPosX
int m_origZ
UMLDoc * m_pDoc
QFontMetrics * m_pFontMetrics [FT_INVALID]
ListPopupMenu * m_pMenu
QString m_Text
UMLWidgetController * m_widgetController

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 42 of file umlwidget.h.


Member Enumeration Documentation

enum UMLWidget::FontType [protected]
Enumerator:
FT_NORMAL 
FT_BOLD 
FT_ITALIC 
FT_UNDERLINE 
FT_BOLD_ITALIC 
FT_BOLD_UNDERLINE 
FT_ITALIC_UNDERLINE 
FT_BOLD_ITALIC_UNDERLINE 
FT_INVALID 

Definition at line 578 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.
widgetController The UMLWidgetController of this UMLWidget

Definition at line 43 of file umlwidget.cpp.

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.
widgetController The UMLWidgetController of this UMLWidget

Definition at line 60 of file umlwidget.cpp.

UMLWidget::~UMLWidget (  )  [virtual]

Standard deconstructor.

Definition at line 76 of file umlwidget.cpp.

UMLWidget::UMLWidget ( const UMLWidget &  other  ) 

Copy constructor.


Member Function Documentation

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, ObjectWidget, and PreconditionWidget.

Definition at line 510 of file umlwidget.cpp.

void UMLWidget::addAssoc ( AssociationWidget *  pAssoc  ) 

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

Definition at line 585 of file umlwidget.cpp.

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

Adjusts associations with the given co-ordinates.

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

Todo:
avoid trigger of this event during load

Reimplemented in ClassifierWidget.

Definition at line 599 of file umlwidget.cpp.

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 625 of file umlwidget.cpp.

AssociationWidgetList& UMLWidget::associationWidgetList (  )  [inline]

Returns the list of associations connected to this widget.

Definition at line 357 of file umlwidget.h.

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, CategoryWidget, ClassifierWidget, CombinedFragmentWidget, ComponentWidget, DatatypeWidget, EntityWidget, EnumWidget, FloatingTextWidget, ForkJoinWidget, NodeWidget, NoteWidget, ObjectNodeWidget, ObjectWidget, PackageWidget, PinWidget, PreconditionWidget, RegionWidget, SignalWidget, StateWidget, and UseCaseWidget.

Definition at line 202 of file umlwidget.cpp.

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 838 of file umlwidget.cpp.

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 207 of file umlwidget.cpp.

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, CategoryWidget, ClassifierWidget, CombinedFragmentWidget, ComponentWidget, DatatypeWidget, EntityWidget, EnumWidget, FloatingDashLineWidget, FloatingTextWidget, ForkJoinWidget, MessageWidget, NodeWidget, NoteWidget, ObjectNodeWidget, ObjectWidget, PackageWidget, PinWidget, PreconditionWidget, RegionWidget, SignalWidget, StateWidget, and UseCaseWidget.

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 487 of file umlwidget.cpp.

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

Overrides default method.

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

Reimplemented from Q3CanvasRectangle.

Definition at line 736 of file umlwidget.cpp.

QFont UMLWidget::font (  )  const [virtual]

Returns the font the widget is to use.

Definition at line 981 of file umlwidget.cpp.

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 995 of file umlwidget.cpp.

QColor UMLWidget::getFillColor (  ) 

get fill color attribute.

Definition at line 482 of file umlwidget.cpp.

QColor UMLWidget::getFillColour (  )  const [inline]

Read property of QColor m_FillColour.

Definition at line 154 of file umlwidget.h.

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 967 of file umlwidget.cpp.

int UMLWidget::getHeight (  )  const [inline]

Returns the height of widget.

Definition at line 308 of file umlwidget.h.

bool UMLWidget::getIgnoreSnapToGrid (  )  const

Return the value of m_bIgnoreSnapToGrid.

Definition at line 872 of file umlwidget.cpp.

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 188 of file umlwidget.h.

bool UMLWidget::getShowStereotype (  )  const

Returns the status of whether to show Stereotype.

Returns:
True if stereotype is shown.

Definition at line 1019 of file umlwidget.cpp.

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 255 of file umlwidget.h.

bool UMLWidget::getUseFillColour (  )  const [inline]

Read property of bool m_bUseFillColour.

Definition at line 113 of file umlwidget.h.

bool UMLWidget::getUsesDiagramFillColour (  )  const [inline]

Returns m_bUsesDiagramFillColour.

Definition at line 364 of file umlwidget.h.

bool UMLWidget::getUsesDiagramUseFillColour (  )  const [inline]

Returns m_bUsesDiagramUseFillColour.

Definition at line 371 of file umlwidget.h.

UMLWidgetController * UMLWidget::getWidgetController (  ) 

Returns the UMLWdigetController for this widget.

Definition at line 1107 of file umlwidget.cpp.

int UMLWidget::getWidth (  )  const [inline]

Returns the width of the widget.

Definition at line 315 of file umlwidget.h.

int UMLWidget::getX (  )  const [inline]

Gets the x-coordinate.

Definition at line 287 of file umlwidget.h.

int UMLWidget::getY (  )  const [inline]

Gets the y-coordinate.

Definition at line 294 of file umlwidget.h.

int UMLWidget::getZ (  )  const [inline]

Gets the z-coordinate.

Definition at line 301 of file umlwidget.h.

void UMLWidget::init (  )  [protected]

Initializes key attributes of the class.

Reimplemented in ClassifierWidget, EntityWidget, EnumWidget, MessageWidget, PinWidget, and PreconditionWidget.

Definition at line 221 of file umlwidget.cpp.

QString UMLWidget::instanceName (  )  const [inline]

Read property of m_instanceName.

Reimplemented in ObjectWidget.

Definition at line 413 of file umlwidget.h.

bool UMLWidget::isActivated (  ) 

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

Read property of bool m_bActivated.

Returns:
The activate status.

Definition at line 575 of file umlwidget.cpp.

bool UMLWidget::isInstance (  )  const [inline]

Read property of bool m_bIsInstance.

Definition at line 399 of file umlwidget.h.

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 172 of file umlwidget.h.

bool UMLWidget::loadFromXMI ( QDomElement &  qElement  )  [virtual]

Reimplemented from WidgetBase.

Reimplemented in ActivityWidget, ClassifierWidget, CombinedFragmentWidget, DatatypeWidget, EntityWidget, EnumWidget, FloatingDashLineWidget, FloatingTextWidget, ForkJoinWidget, MessageWidget, NoteWidget, ObjectNodeWidget, ObjectWidget, PinWidget, PreconditionWidget, RegionWidget, SignalWidget, and StateWidget.

Definition at line 1057 of file umlwidget.cpp.

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 441 of file umlwidget.cpp.

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

Calls the method with the same name in UMLWidgetController.

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

Reimplemented in PinWidget, and SignalWidget.

Definition at line 173 of file umlwidget.cpp.

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 178 of file umlwidget.cpp.

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 216 of file umlwidget.cpp.

void UMLWidget::moveByLocal ( int  dx,
int  dy 
)

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

Definition at line 721 of file umlwidget.cpp.

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

Overrides the standard operation.

Parameters:
me The move event.

Reimplemented in ObjectWidget.

Definition at line 1024 of file umlwidget.cpp.

QString UMLWidget::name (  )  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 831 of file umlwidget.cpp.

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 707 of file umlwidget.cpp.

UMLWidget & UMLWidget::operator= ( const UMLWidget &  other  ) 

Assignment operator.

Definition at line 83 of file umlwidget.cpp.

bool UMLWidget::operator== ( const UMLWidget &  other  ) 

Overload '==' operator.

Definition at line 123 of file umlwidget.cpp.

void UMLWidget::removeAssoc ( AssociationWidget *  pAssoc  ) 

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

Definition at line 592 of file umlwidget.cpp.

void UMLWidget::saveToXMI ( QDomDocument &  qDoc,
QDomElement &  qElement 
) [virtual]

Reimplemented from WidgetBase.

Reimplemented in ActivityWidget, ActorWidget, ArtifactWidget, BoxWidget, CategoryWidget, ClassifierWidget, CombinedFragmentWidget, ComponentWidget, DatatypeWidget, EntityWidget, EnumWidget, FloatingDashLineWidget, FloatingTextWidget, ForkJoinWidget, MessageWidget, NodeWidget, NoteWidget, ObjectNodeWidget, ObjectWidget, PackageWidget, PinWidget, PreconditionWidget, RegionWidget, SignalWidget, StateWidget, and UseCaseWidget.

Definition at line 1028 of file umlwidget.cpp.

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 580 of file umlwidget.cpp.

void UMLWidget::setDefaultFontMetrics ( UMLWidget::FontType  fontType,
QPainter &  painter 
) [protected, virtual]

Definition at line 959 of file umlwidget.cpp.

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

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

Definition at line 906 of file umlwidget.cpp.

void UMLWidget::setFillColour ( const QColor &  colour  ) 

Sets the background fill colour.

Parameters:
colour the new fill colour

Definition at line 470 of file umlwidget.cpp.

void UMLWidget::setFillColourcmd ( const QColor &  colour  ) 

Sets the background fill colour.

Parameters:
colour the new fill colour

Definition at line 475 of file umlwidget.cpp.

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 986 of file umlwidget.cpp.

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

set the font metric to use

Definition at line 975 of file umlwidget.cpp.

void UMLWidget::setIgnoreSnapToGrid ( bool  to  ) 

Set m_bIgnoreSnapToGrid.

Definition at line 867 of file umlwidget.cpp.

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

Write property of m_instanceName.

Reimplemented in ObjectWidget.

Definition at line 406 of file umlwidget.h.

void UMLWidget::setIsInstance ( bool  isInstance  )  [inline]

Write property of bool m_bIsInstance.

Definition at line 392 of file umlwidget.h.

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

Overrides the method from WidgetBase.

Reimplemented from WidgetBase.

Definition at line 459 of file umlwidget.cpp.

void UMLWidget::setLineColorcmd ( const QColor &  colour  ) 

Overrides the method from WidgetBase.

Definition at line 453 of file umlwidget.cpp.

void UMLWidget::setLineWidth ( uint  width  )  [virtual]

Overrides the method from WidgetBase.

Reimplemented from WidgetBase.

Definition at line 464 of file umlwidget.cpp.

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 PinWidget, RegionWidget, SignalWidget, and StateWidget.

Definition at line 821 of file umlwidget.cpp.

void UMLWidget::setPenFromSettings ( QPainter &  p  ) 

Set the pen.

Definition at line 731 of file umlwidget.cpp.

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 741 of file umlwidget.cpp.

void UMLWidget::setSelectedFlag ( bool  _select  )  [inline]

Definition at line 192 of file umlwidget.h.

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 1012 of file umlwidget.cpp.

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.

Reimplemented from Q3CanvasRectangle.

Definition at line 877 of file umlwidget.cpp.

void UMLWidget::setupFontType ( QFont &  font,
UMLWidget::FontType  fontType 
) [protected]

Definition at line 912 of file umlwidget.cpp.

ListPopupMenu * UMLWidget::setupPopupMenu ( ListPopupMenu *  menu = 0  )  [virtual]

Starts the popup menu.

If menu is non zero, the widgets popup menu is embedded into another widget. The another widget is responsible for calling setupPopupMenu(), slotMenuSelection() and removePopupMenu() manually.

Returns:
pointer to the popup menu object

Reimplemented in MessageWidget.

Definition at line 656 of file umlwidget.cpp.

void UMLWidget::setUseFillColour ( bool  fc  ) 

Set the status of using fill color.

Parameters:
fc the status of using fill color.

Definition at line 446 of file umlwidget.cpp.

void UMLWidget::setUsesDiagramFillColour ( bool  usesDiagramFillColour  )  [inline]

Sets m_bUsesDiagramFillColour.

Definition at line 378 of file umlwidget.h.

void UMLWidget::setUsesDiagramUseFillColour ( bool  usesDiagramUseFillColour  )  [inline]

Sets m_bUsesDiagramUseFillColour.

Definition at line 385 of file umlwidget.h.

void UMLWidget::setView ( UMLView *  v  ) 

Sets the view the widget is on.

Parameters:
v The view the widget is on.

Definition at line 785 of file umlwidget.cpp.

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, ObjectWidget, and SignalWidget.

Definition at line 799 of file umlwidget.cpp.

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 FloatingDashLineWidget, NoteWidget, ObjectWidget, and SignalWidget.

Definition at line 807 of file umlwidget.cpp.

void UMLWidget::setZ ( int  z  )  [virtual]

Sets the z-coordinate.

Parameters:
z The z-coordinate to be set.

Definition at line 815 of file umlwidget.cpp.

void UMLWidget::showProperties (  )  [virtual]

Show a properties dialog for a UMLWidget.

Reimplemented in ActivityWidget, FloatingTextWidget, ObjectNodeWidget, ObjectWidget, SignalWidget, and StateWidget.

Definition at line 640 of file umlwidget.cpp.

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

Emit when the widget moves its' position.

Parameters:
id The id of the object behind the widget.
void UMLWidget::slotClearAllSelected (  )  [slot]

Captures a sigClearAllSelected signal sent by UMLView.

Definition at line 780 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 411 of file umlwidget.cpp.

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 429 of file umlwidget.cpp.

void UMLWidget::slotMenuSelection ( QAction *  action  )  [virtual, slot]

Captures any popup menu signals for menus it created.

Parameters:
action The action which has to be executed.

Reimplemented in ActivityWidget, CategoryWidget, ClassifierWidget, CombinedFragmentWidget, EntityWidget, EnumWidget, FloatingDashLineWidget, FloatingTextWidget, ForkJoinWidget, MessageWidget, NoteWidget, ObjectNodeWidget, ObjectWidget, PinWidget, PreconditionWidget, SignalWidget, and StateWidget.

Definition at line 266 of file umlwidget.cpp.

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 696 of file umlwidget.cpp.

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 842 of file umlwidget.cpp.

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, and PreconditionWidget.

Definition at line 409 of file umlwidget.cpp.

void UMLWidget::updateComponentSize (  ) 

Update the size of this widget.

Definition at line 895 of file umlwidget.cpp.

void UMLWidget::updateWidget (  )  [virtual, slot]

When a widget changes this slot captures that signal.

Definition at line 183 of file umlwidget.cpp.

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

Returns whether the widget type has an associated UMLObject.

Definition at line 848 of file umlwidget.cpp.


Member Data Documentation

AssociationWidgetList UMLWidget::m_Assocs [protected]

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

Definition at line 629 of file umlwidget.h.

bool UMLWidget::m_bActivated [protected]

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

Definition at line 674 of file umlwidget.h.

bool UMLWidget::m_bIgnoreSnapComponentSizeToGrid [protected]

Definition at line 680 of file umlwidget.h.

bool UMLWidget::m_bIgnoreSnapToGrid [protected]

Change Widget Behaviour.

Definition at line 679 of file umlwidget.h.

bool UMLWidget::m_bIsInstance [protected]

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

on a deployment diagram)

Definition at line 646 of file umlwidget.h.

bool UMLWidget::m_bResizable [protected]

Definition at line 667 of file umlwidget.h.

bool UMLWidget::m_bSelected [protected]

Definition at line 660 of file umlwidget.h.

bool UMLWidget::m_bShowStereotype [protected]

Should the stereotype be displayed.

Definition at line 656 of file umlwidget.h.

bool UMLWidget::m_bStartMove [protected]

Definition at line 660 of file umlwidget.h.

bool UMLWidget::m_bUseFillColour [protected]

This flag indicates if the UMLWidget uses the Diagram FillColour.

Definition at line 612 of file umlwidget.h.

bool UMLWidget::m_bUsesDiagramFillColour [protected]

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

Definition at line 618 of file umlwidget.h.

bool UMLWidget::m_bUsesDiagramUseFillColour [protected]

Definition at line 619 of file umlwidget.h.

QColor UMLWidget::m_FillColour [protected]

Color of the background of the widget.

Definition at line 624 of file umlwidget.h.

QFont UMLWidget::m_Font [protected]

The font the widget will use.

Definition at line 641 of file umlwidget.h.

QString UMLWidget::m_instanceName [protected]

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

Definition at line 651 of file umlwidget.h.

bool UMLWidget::m_menuIsEmbedded [protected]

Definition at line 665 of file umlwidget.h.

int UMLWidget::m_nPosX [protected]

Definition at line 662 of file umlwidget.h.

int UMLWidget::m_origZ [protected]

Definition at line 663 of file umlwidget.h.

UMLDoc* UMLWidget::m_pDoc [protected]

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

Definition at line 666 of file umlwidget.h.

QFontMetrics* UMLWidget::m_pFontMetrics[FT_INVALID] [protected]

Definition at line 668 of file umlwidget.h.

ListPopupMenu* UMLWidget::m_pMenu [protected]

Definition at line 664 of file umlwidget.h.

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 636 of file umlwidget.h.

UMLWidgetController* UMLWidget::m_widgetController [protected]

Controller for user interaction events.

Definition at line 685 of file umlwidget.h.


The documentation for this class was generated from the following files:
  • umlwidget.h
  • umlwidget.cpp

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdesdk

Skip menu "kdesdk"
  • kapptemplate
  • kate
  •     kate
  • kbugbuster
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal