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:

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 UMLWidget & | operator= (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) |
| UMLWidgetController * | getWidgetController () |
| 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 |
| ListPopupMenu * | m_pMenu |
| UMLDoc * | m_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 |
| UMLWidgetController * | m_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
|
||||||||||||||||
|
Creates a UMLWidget object.
Definition at line 44 of file umlwidget.cpp. References UMLObject::getID(), init(), m_widgetController, and updateWidget(). |
|
||||||||||||||||
|
Creates a UMLWidget object.
Definition at line 61 of file umlwidget.cpp. References init(), and m_widgetController. |
|
|
Standard deconstructor.
Definition at line 77 of file umlwidget.cpp. References cleanup(), and m_widgetController. |
|
|
Copy constructor.
|
Member Function Documentation
|
|
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(). |
|
|
Overload '==' operator.
Definition at line 122 of file umlwidget.cpp. References WidgetBase::getID(), and m_Assocs. |
|
|
Calls the method with the same name in UMLWidgetController.
Definition at line 201 of file umlwidget.cpp. References m_widgetController, and UMLWidgetController::mouseReleaseEvent(). Referenced by ToolBarStateArrow::mouseReleaseWidget(). |
|
|
Calls the method with the same name in UMLWidgetController.
Definition at line 423 of file umlwidget.cpp. References m_widgetController, and UMLWidgetController::mouseDoubleClickEvent(). Referenced by ToolBarStateArrow::mouseDoubleClickWidget(). |
|
|
Set the status of using fill color.
Definition at line 427 of file umlwidget.cpp. References m_bUseFillColour. Referenced by UMLWidgetColorPage::updateUMLWidget(). |
|
|
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(). |
|
|
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(). |
|
|
Overrides the method from WidgetBase.
Reimplemented from WidgetBase. Definition at line 438 of file umlwidget.cpp. References WidgetBase::setLineWidth(). Referenced by UMLView::selectionSetLineWidth(). |
|
|
Sets the background fill colour.
Definition at line 443 of file umlwidget.cpp. References m_bUsesDiagramFillColour, and m_FillColour. Referenced by ObjectWidget::slotColorChanged(), and UMLWidgetColorPage::updateUMLWidget(). |
|
|
Read property of QColor m_FillColour.
Definition at line 135 of file umlwidget.h. References m_FillColour. Referenced by slotMenuSelection(). |
|
|
Calls the method with the same name in UMLWidgetController.
Definition at line 170 of file umlwidget.cpp. References m_widgetController, and UMLWidgetController::mouseMoveEvent(). Referenced by ToolBarStateArrow::mouseMoveWidget(). |
|
|
Returns whether this is a line of text. Used for transparency in printing.
Reimplemented in FloatingTextWidget. Definition at line 153 of file umlwidget.h. |
|
|
Sets 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(). |
|
|
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(). |
|
|
Sets the view the widget is on.
Definition at line 724 of file umlwidget.cpp. References slotClearAllSelected(), slotColorChanged(), slotLineWidthChanged(), and slotRemovePopupMenu(). |
|
|
Activate the object after serializing it from a QDataStream.
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(). |
|
|
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.
Reimplemented in MessageWidget. Definition at line 651 of file umlwidget.cpp. References getX(), and getY(). Referenced by UMLView::contentsDropEvent(), UMLView::getWidgetAt(), and MessageWidget::onWidget(). |
|
||||||||||||||||
|
Draws the UMLWidget on the given paint device.
Implemented in ActivityWidget, ActorWidget, ArtifactWidget, BoxWidget, ClassifierWidget, ComponentWidget, DatatypeWidget, EntityWidget, EnumWidget, FloatingTextWidget, ForkJoinWidget, MessageWidget, NodeWidget, NoteWidget, ObjectWidget, PackageWidget, StateWidget, and UseCaseWidget. Referenced by drawShape(). |
|
|
|
Sets the font the widget is to use.
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(). |
|
|
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(). |
|
|
Returns whether we triggered the update of position movement. If so, you probably don't want to move it.
Definition at line 236 of file umlwidget.h. |
|
|
Sets the x-coordinate. Currently, the only class that reimplements this method is ObjectWidget.
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(). |
|
|
Sets the y-coordinate. Currently, the only class that reimplements this method is ObjectWidget.
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(). |
|
|
Sets the z-coordinate.
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(). |
|
|
|
|
Gets the z-coordinate.
Definition at line 282 of file umlwidget.h. Referenced by UMLWidgetController::mouseReleaseEvent(), setSelected(), and setZ(). |
|
|
|
||||||||||||
|
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(). |
|
|
Set m_bIgnoreSnapToGrid.
Definition at line 797 of file umlwidget.cpp. References m_bIgnoreSnapToGrid. |
|
|
Return the value of m_bIgnoreSnapToGrid.
Definition at line 801 of file umlwidget.cpp. References m_bIgnoreSnapToGrid. |
|
||||||||||||
|
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(). |
|
|
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(). |
|
|
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. |
|
|
Returns the list of associations connected to this widget.
Definition at line 338 of file umlwidget.h. References m_Assocs. Referenced by AssocRules::allowAssociation(). |
|
|
Returns m_bUsesDiagramFillColour.
Definition at line 345 of file umlwidget.h. References m_bUsesDiagramFillColour. |
|
|
Returns m_bUsesDiagramUseFillColour.
Definition at line 352 of file umlwidget.h. |
|
|
Sets m_bUsesDiagramFillColour.
Definition at line 359 of file umlwidget.h. References m_bUsesDiagramFillColour. |
|
|
Sets m_bUsesDiagramUseFillColour.
Definition at line 366 of file umlwidget.h. |
|
|
Write property of bool m_bIsInstance.
Definition at line 373 of file umlwidget.h. References m_bIsInstance. Referenced by Widget_Factory::createWidget(). |
|
|
Read property of bool m_bIsInstance.
Definition at line 380 of file umlwidget.h. References m_bIsInstance. |
|
|
Write property of m_instanceName.
Reimplemented in ObjectWidget. Definition at line 387 of file umlwidget.h. References m_instanceName. Referenced by ClassGenPage::updateObject(). |
|
|
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(). |
|
|
Returns the status of whether to show Stereotype.
Definition at line 937 of file umlwidget.cpp. References m_bShowStereotype. Referenced by ClassOptionsPage::setupPage(). |
|
|
Set the status of whether to show Stereotype.
Definition at line 931 of file umlwidget.cpp. References m_bShowStereotype, and updateComponentSize(). Referenced by ClassOptionsPage::updateWidget(). |
|
|
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(). |
|
|
Returns true if the Activate method has been called for this instance.
Definition at line 531 of file umlwidget.cpp. References m_bActivated. Referenced by UMLView::activate(). |
|
|
Sets the name in the corresponding UMLObject. Sets the local m_Text if m_pObject is NULL.
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(). |
|
|
Gets the name from the corresponding UMLObject. Returns the local m_Text if m_pObject is NULL.
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(). |
|
|
Starts the popup menu.
Definition at line 610 of file umlwidget.cpp. References UMLApp::getGenerator(), UMLView::getSelectCount(), slotMenuSelection(), and slotRemovePopupMenu(). Referenced by UMLWidgetController::showPopupMenu(). |
|
||||||||||||
|
Adjusts associations with the given co-ordinates.
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(). |
|
||||||||||||
|
Adjusts all unselected associations with the given co-ordinates.
Definition at line 579 of file umlwidget.cpp. References AssociationWidget::getSelected(), m_Assocs, AssociationWidget::saveIdealTextPositions(), and AssociationWidget::widgetMoved(). Referenced by UMLWidgetController::mouseMoveEvent(). |
|
|
Set the m_bActivated flag of a widget but does not perform the Activate method.
Definition at line 535 of file umlwidget.cpp. References m_bActivated. Referenced by MessageWidget::activate(), AssociationWidget::loadFromXMI(), and AssociationWidget::setName(). |
|
|
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(). |
|
|
Returns whether the widget type has an associated UMLObject.
Definition at line 779 of file umlwidget.cpp. Referenced by activate(), and setSelected(). |
|
|
|
Definition at line 915 of file umlwidget.cpp. References setDefaultFontMetrics(), and updateComponentSize(). Referenced by UMLView::forceUpdateWidgetFontMetrics(), and setFont(). |
|
|
Calls the method with the same name in UMLWidgetController.
Definition at line 174 of file umlwidget.cpp. References m_widgetController, and UMLWidgetController::mousePressEvent(). Referenced by ToolBarStateArrow::mousePressWidget(). |
|
|
Overrides the standard operation.
Reimplemented in ObjectWidget. Definition at line 941 of file umlwidget.cpp. |
|
|
Returns the UMLWdigetController for this widget.
Definition at line 1021 of file umlwidget.cpp. References m_widgetController. Referenced by UMLWidgetController::mouseMoveEvent(). |
|
||||||||||||
|
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.
Reimplemented in ActivityWidget, and ForkJoinWidget. Definition at line 193 of file umlwidget.cpp. References calculateSize(). Referenced by UMLWidgetController::resize(). |
|
||||||||||||||||
|
Draws that the widget is selected.
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(). |
|
|
Overrides default method.
Definition at line 676 of file umlwidget.cpp. |
|
|
Compute the minimum possible width and height. The default implementation returns width=20, height=20.
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(). |
|
|
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(). |
|
|
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(). |
|
||||||||||||
|
set the font metric to use
Definition at line 898 of file umlwidget.cpp. Referenced by setDefaultFontMetrics(). |
|
|
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(). |
|
|
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(). |
|
|
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(). |
|
|
|
Captures when another widget moves if it is link to it that signal.
Reimplemented in MessageWidget. Definition at line 393 of file umlwidget.cpp. |
|
|
Captures a color change signal.
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. |
|
|
Captures a linewidth change signal.
Definition at line 412 of file umlwidget.cpp. References UMLView::getID(), and UMLView::getLineWidth(). |
|
|
Captures a sigClearAllSelected signal sent by UMLView.
Definition at line 719 of file umlwidget.cpp. References setSelected(). |
|
|
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. |
|
|
Emit when the widget moves its' position.
Referenced by MessageWidget::activate(), and ObjectWidget::moveEvent(). |
Member Data Documentation
|
|
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(). |
|
|
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(). |
|
|
Color of the background of the widget.
Definition at line 601 of file umlwidget.h. Referenced by getFillColour(), init(), operator=(), setFillColour(), and slotColorChanged(). |
|
|
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(). |
|
|
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. |
|
|
The font the widget will use.
Definition at line 618 of file umlwidget.h. Referenced by activate(), getFont(), init(), operator=(), setDefaultFontMetrics(), and setFont(). |
|
|
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(). |
|
|
The instance name (used if on a deployment diagram).
Definition at line 628 of file umlwidget.h. Referenced by getInstanceName(), operator=(), and setInstanceName(). |
|
|
Should it show the <<stereotype>> of the widget.
Definition at line 633 of file umlwidget.h. Referenced by getShowStereotype(), init(), and setShowStereotype(). |
|
|
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(). |
|
|
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(). |
|
|
Change Widget Behaviour.
Definition at line 654 of file umlwidget.h. Referenced by getIgnoreSnapToGrid(), init(), operator=(), setIgnoreSnapToGrid(), setX(), and setY(). |
|
|
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:
