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

umbrello/umbrello

UMLWidget Class Reference

#include <umlwidget.h>

Inheritance diagram for UMLWidget:

Inheritance graph
[legend]

List of all members.


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


Public Slots

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

Signals

void sigWidgetMoved (Uml::IDType id)

Public Member Functions

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

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

Protected Attributes

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

Friends

class UMLWidgetController

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

UMLWidget::~UMLWidget (  )  [virtual]

Standard deconstructor.

Definition at line 80 of file umlwidget.cpp.

UMLWidget::UMLWidget ( const UMLWidget &  other  ) 

Copy constructor.


Member Function Documentation

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

Assignment operator.

Definition at line 86 of file umlwidget.cpp.

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

Overload '==' operator.

Definition at line 125 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 213 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 433 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 437 of file umlwidget.cpp.

bool UMLWidget::getUseFillColour (  )  const [inline]

Read property of bool m_bUseFillColour.

Definition at line 116 of file umlwidget.h.

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

Overrides the method from WidgetBase.

Reimplemented from WidgetBase.

Definition at line 448 of file umlwidget.cpp.

void UMLWidget::setLineColorcmd ( const QColor &  colour  ) 

Overrides the method from WidgetBase.

Definition at line 443 of file umlwidget.cpp.

QColor UMLWidget::getLineColor (  ) 

get line color attribute.

Definition at line 452 of file umlwidget.cpp.

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

Overrides the method from WidgetBase.

Reimplemented from WidgetBase.

Definition at line 456 of file umlwidget.cpp.

void UMLWidget::setFillColour ( const QColor &  colour  ) 

Sets the background fill colour.

Parameters:
colour the new fill colour

Definition at line 461 of file umlwidget.cpp.

void UMLWidget::setFillColourcmd ( const QColor &  colour  ) 

Sets the background fill colour.

Parameters:
colour the new fill colour

Definition at line 465 of file umlwidget.cpp.

QColor UMLWidget::getFillColor (  ) 

get fill color attribute.

Definition at line 471 of file umlwidget.cpp.

QColor UMLWidget::getFillColour (  )  const [inline]

Read property of QColor m_FillColour.

Definition at line 161 of file umlwidget.h.

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

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 179 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 706 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 195 of file umlwidget.h.

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

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

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 497 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 677 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::setPen ( QPainter &  p  ) 

Set the pen.

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

QFont UMLWidget::getFont (  )  const [virtual]

Returns the font the widget is to use.

Definition at line 928 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 262 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, ObjectWidget, and SignalWidget.

Definition at line 762 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 769 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 776 of file umlwidget.cpp.

int UMLWidget::getX (  )  const [inline]

Gets the x-coordinate.

Definition at line 294 of file umlwidget.h.

int UMLWidget::getY (  )  const [inline]

Gets the y-coordinate.

Definition at line 301 of file umlwidget.h.

int UMLWidget::getZ (  )  const [inline]

Gets the z-coordinate.

Definition at line 308 of file umlwidget.h.

int UMLWidget::getHeight (  )  const [inline]

Returns the height of widget.

Definition at line 315 of file umlwidget.h.

int UMLWidget::getWidth (  )  const [inline]

Returns the width of the widget.

Definition at line 322 of file umlwidget.h.

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

void UMLWidget::setIgnoreSnapToGrid ( bool  to  ) 

Set m_bIgnoreSnapToGrid.

Definition at line 822 of file umlwidget.cpp.

bool UMLWidget::getIgnoreSnapToGrid (  )  const

Return the value of m_bIgnoreSnapToGrid.

Definition at line 826 of file umlwidget.cpp.

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

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

Definition at line 690 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 575 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 569 of file umlwidget.cpp.

AssociationWidgetList& UMLWidget::getAssocList (  )  [inline]

Returns the list of associations connected to this widget.

Definition at line 364 of file umlwidget.h.

bool UMLWidget::getUsesDiagramFillColour (  )  const [inline]

Returns m_bUsesDiagramFillColour.

Definition at line 371 of file umlwidget.h.

bool UMLWidget::getUsesDiagramUseFillColour (  )  const [inline]

Returns m_bUsesDiagramUseFillColour.

Definition at line 378 of file umlwidget.h.

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

Sets m_bUsesDiagramFillColour.

Definition at line 385 of file umlwidget.h.

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

Sets m_bUsesDiagramUseFillColour.

Definition at line 392 of file umlwidget.h.

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

Write property of bool m_bIsInstance.

Definition at line 399 of file umlwidget.h.

bool UMLWidget::getIsInstance (  )  const [inline]

Read property of bool m_bIsInstance.

Definition at line 406 of file umlwidget.h.

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

Write property of m_instanceName.

Reimplemented in ObjectWidget.

Definition at line 413 of file umlwidget.h.

QString UMLWidget::getInstanceName (  )  const [inline]

Read property of m_instanceName.

Reimplemented in ObjectWidget.

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

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

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

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

Definition at line 790 of file umlwidget.cpp.

ListPopupMenu * UMLWidget::setupPopupMenu (  )  [virtual]

Starts the popup menu.

Reimplemented in MessageWidget.

Definition at line 636 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 581 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 607 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 565 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 796 of file umlwidget.cpp.

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

Returns whether the widget type has an associated UMLObject.

Definition at line 804 of file umlwidget.cpp.

void UMLWidget::updateComponentSize (  ) 

Update the size of this widget.

Definition at line 848 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 940 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::moveEvent ( QMoveEvent *  me  )  [virtual]

Overrides the standard operation.

Parameters:
me The move event.

Reimplemented in ObjectWidget.

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

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

UMLWidgetController * UMLWidget::getWidgetController (  ) 

Returns the UMLWdigetController for this widget.

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

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

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

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

Definition at line 909 of file umlwidget.cpp.

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

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

set the font metric to use

Definition at line 923 of file umlwidget.cpp.

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

Definition at line 863 of file umlwidget.cpp.

void UMLWidget::init (  )  [protected]

Initializes key attributes of the class.

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

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

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

When a widget changes this slot captures that signal.

Definition at line 182 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 261 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 403 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 405 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 422 of file umlwidget.cpp.

void UMLWidget::slotClearAllSelected (  )  [slot]

Captures a sigClearAllSelected signal sent by UMLView.

Definition at line 744 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 799 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.


Friends And Related Function Documentation

friend class UMLWidgetController [friend]

Definition at line 49 of file umlwidget.h.


Member Data Documentation

bool UMLWidget::m_bUseFillColour [protected]

This flag indicates if the UMLWidget uses the Diagram FillColour.

Definition at line 614 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 620 of file umlwidget.h.

bool UMLWidget::m_bUsesDiagramUseFillColour [protected]

Definition at line 621 of file umlwidget.h.

QColor UMLWidget::m_FillColour [protected]

Color of the background of the widget.

Definition at line 626 of file umlwidget.h.

AssociationWidgetList UMLWidget::m_Assocs [protected]

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

Definition at line 631 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 638 of file umlwidget.h.

QFont UMLWidget::m_Font [protected]

The font the widget will use.

Definition at line 643 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 648 of file umlwidget.h.

QString UMLWidget::m_instanceName [protected]

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

Definition at line 653 of file umlwidget.h.

bool UMLWidget::m_bShowStereotype [protected]

Should the stereotype be displayed.

Definition at line 658 of file umlwidget.h.

bool UMLWidget::m_bSelected [protected]

Definition at line 662 of file umlwidget.h.

bool UMLWidget::m_bStartMove [protected]

Definition at line 662 of file umlwidget.h.

int UMLWidget::m_nPosX [protected]

Definition at line 664 of file umlwidget.h.

int UMLWidget::m_origZ [protected]

Definition at line 664 of file umlwidget.h.

ListPopupMenu* UMLWidget::m_pMenu [protected]

Definition at line 665 of file umlwidget.h.

UMLDoc* UMLWidget::m_pDoc [protected]

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

Definition at line 666 of file umlwidget.h.

bool UMLWidget::m_bResizable [protected]

Definition at line 667 of file umlwidget.h.

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

Definition at line 668 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_bIgnoreSnapToGrid [protected]

Change Widget Behaviour.

Definition at line 679 of file umlwidget.h.

bool UMLWidget::m_bIgnoreSnapComponentSizeToGrid [protected]

Definition at line 680 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"
  • kate
  •     kate
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.4
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