umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
UMLScene Class Reference

#include <umlscene.h>

Inheritance diagram for UMLScene:
Collaboration diagram for UMLScene:

Public Slots

void slotToolBarChanged (int c)
 
void slotObjectCreated (UMLObject *o)
 
void slotObjectRemoved (UMLObject *o)
 
void slotMenuSelection (QAction *action)
 
void slotActivate ()
 
void slotCutSuccessful ()
 
void slotShowView ()
 
void alignLeft ()
 
void alignRight ()
 
void alignTop ()
 
void alignBottom ()
 
void alignVerticalMiddle ()
 
void alignHorizontalMiddle ()
 
void alignVerticalDistribute ()
 
void alignHorizontalDistribute ()
 

Signals

void sigResetToolBar ()
 
void sigFillColorChanged (Uml::ID::Type)
 
void sigGridColorChanged (Uml::ID::Type)
 
void sigLineColorChanged (Uml::ID::Type)
 
void sigTextColorChanged (Uml::ID::Type)
 
void sigLineWidthChanged (Uml::ID::Type)
 
void sigSnapToGridToggled (bool)
 
void sigSnapComponentSizeToGridToggled (bool)
 
void sigShowGridToggled (bool)
 
void sigAssociationRemoved (AssociationWidget *)
 
void sigWidgetRemoved (UMLWidget *)
 

Public Member Functions

 UMLScene (UMLFolder *parentFolder, UMLView *view=0)
 
virtual ~UMLScene ()
 
UMLViewactiveView () const
 
UMLFolderfolder () const
 
void setFolder (UMLFolder *folder)
 
QString documentation () const
 
void setDocumentation (const QString &doc)
 
bool autoIncrementSequence () const
 
void setAutoIncrementSequence (bool state)
 
QString autoIncrementSequenceValue ()
 
QString name () const
 
void setName (const QString &name)
 
Uml::DiagramType::Enum type () const
 
void setType (Uml::DiagramType::Enum type)
 
Uml::ID::Type ID () const
 
void setID (Uml::ID::Type id)
 
QPointF pos () const
 
void setPos (const QPointF &pos)
 
const QColor & fillColor () const
 
void setFillColor (const QColor &color)
 
const QColor & lineColor () const
 
void setLineColor (const QColor &color)
 
uint lineWidth () const
 
void setLineWidth (uint width)
 
const QColor & textColor () const
 
void setTextColor (const QColor &color)
 
const QColor & gridDotColor () const
 
void setGridDotColor (const QColor &color)
 
const QColor & backgroundColor () const
 
bool snapToGrid () const
 
void setSnapToGrid (bool bSnap)
 
bool snapComponentSizeToGrid () const
 
void setSnapComponentSizeToGrid (bool bSnap)
 
int snapX () const
 
int snapY () const
 
void setSnapSpacing (int x, int y)
 
qreal snappedX (qreal x)
 
qreal snappedY (qreal y)
 
bool isSnapGridVisible () const
 
void setSnapGridVisible (bool bShow)
 
bool isShowDocumentationIndicator () const
 
void setShowDocumentationIndicator (bool bShow)
 
bool useFillColor () const
 
void setUseFillColor (bool ufc)
 
QFont font () const
 
void setFont (QFont font, bool changeAllWidgets=false)
 
bool showOpSig () const
 
void setShowOpSig (bool bShowOpSig)
 
Settings::OptionStateoptionState ()
 
void setOptionState (const Settings::OptionState &options)
 
AssociationWidgetList associationList () const
 
MessageWidgetList messageList () const
 
UMLWidgetList widgetList () const
 
void addWidgetCmd (UMLWidget *widget)
 
void addWidgetCmd (AssociationWidget *widget)
 
bool isOpen () const
 
void setIsOpen (bool isOpen)
 
void print (QPrinter *pPrinter, QPainter &pPainter)
 
void hideEvent (QHideEvent *he)
 
void showEvent (QShowEvent *se)
 
void checkMessages (ObjectWidget *w)
 
UMLWidgetfindWidget (Uml::ID::Type id)
 
AssociationWidgetfindAssocWidget (Uml::ID::Type id)
 
AssociationWidgetfindAssocWidget (Uml::AssociationType::Enum at, UMLWidget *pWidgetA, UMLWidget *pWidgetB)
 
AssociationWidgetfindAssocWidget (UMLWidget *pWidgetA, UMLWidget *pWidgetB, const QString &roleNameB)
 
void removeWidget (UMLWidget *o)
 
void removeWidget (AssociationWidget *w)
 
void removeWidgetCmd (UMLWidget *o)
 
UMLWidgetList selectedWidgets () const
 
AssociationWidgetList selectedAssociationWidgets () const
 
UMLWidgetList selectedMessageWidgets () const
 
void clearSelected ()
 
void moveSelectedBy (qreal dX, qreal dY)
 
int selectedCount (bool filterText=false) const
 
void selectionUseFillColor (bool useFC)
 
void selectionSetFont (const QFont &font)
 
void selectionSetLineColor (const QColor &color)
 
void selectionSetLineWidth (uint width)
 
void selectionSetFillColor (const QColor &color)
 
void selectionSetVisualProperty (ClassifierWidget::VisualProperty property, bool value)
 
void deleteSelection ()
 
void resizeSelection ()
 
void selectAll ()
 
UMLWidgetwidgetOnDiagram (Uml::ID::Type id)
 
UMLWidgetwidgetOnDiagram (WidgetBase::WidgetType type)
 
bool isSavedInSeparateFile ()
 
void setMenu (const QPoint &pos)
 
void resetToolbar ()
 
void triggerToolbarButton (WorkToolBar::ToolBar_Buttons button)
 
bool getPaste () const
 
void setPaste (bool paste)
 
void activate ()
 
AssociationWidgetList selectedAssocs ()
 
UMLWidgetList selectedWidgetsExt (bool filterText=true)
 
void activateAfterLoad (bool bUseLog=false)
 
void endPartialWidgetPaste ()
 
void beginPartialWidgetPaste ()
 
void removeWidgetCmd (AssociationWidget *pAssoc)
 
void removeAssociations (UMLWidget *pWidget)
 
void selectAssociations (bool bSelect)
 
void getWidgetAssocs (UMLObject *Obj, AssociationWidgetList &Associations)
 
void removeAllAssociations ()
 
void removeAllWidgets ()
 
void getDiagram (QPixmap &diagram, const QRectF &rect)
 
void getDiagram (QPainter &painter, const QRectF &source, const QRectF &target=QRectF())
 
void copyAsImage (QPixmap *&pix)
 
UMLViewImageExportergetImageExporter ()
 
bool addAssociation (AssociationWidget *pAssoc, bool isPasteOperation=false)
 
void removeAssocInViewAndDoc (AssociationWidget *assoc)
 
void addFloatingTextWidget (FloatingTextWidget *pWidget)
 
QPointF getPastePoint ()
 
void resetPastePoint ()
 
void setStartedCut ()
 
void createAutoAssociations (UMLWidget *widget)
 
void createAutoAttributeAssociations (UMLWidget *widget)
 
void createAutoConstraintAssociations (UMLWidget *widget)
 
void createAutoAttributeAssociations2 (UMLWidget *widget)
 
void updateContainment (UMLCanvasObject *self)
 
void setClassWidgetOptions (ClassOptionsPage *page)
 
WidgetBase::WidgetType getUniqueSelectionType ()
 
void clearDiagram ()
 
void applyLayout (const QString &actionText)
 
void toggleSnapToGrid ()
 
void toggleSnapComponentSizeToGrid ()
 
void toggleShowGrid ()
 
void fileLoaded ()
 
virtual void saveToXMI (QXmlStreamWriter &writer)
 
virtual bool loadFromXMI (QDomElement &qElement)
 
bool loadUISDiagram (QDomElement &qElement)
 
UMLWidgetloadWidgetFromXMI (QDomElement &widgetElement)
 
void addObject (UMLObject *object)
 
void selectWidgets (qreal px, qreal py, qreal qx, qreal qy)
 
void selectWidgets (UMLWidgetList &widgets)
 
void selectWidget (UMLWidget *widget, QRectF *rect=0)
 
void selectWidgetsOfAssoc (AssociationWidget *a)
 
ObjectWidgetonWidgetLine (const QPointF &point) const
 
ObjectWidgetonWidgetDestructionBox (const QPointF &point) const
 
UMLWidgetgetFirstMultiSelectedWidget () const
 
UMLWidgetwidgetAt (const QPointF &p)
 
AssociationWidgetassociationAt (const QPointF &p)
 
MessageWidgetmessageAt (const QPointF &p)
 
void setupNewWidget (UMLWidget *w, bool setPosition=true)
 
bool getCreateObject () const
 
void setCreateObject (bool bCreate)
 
int generateCollaborationId ()
 
UMLSceneItemList collisions (const QPointF &p, int delta=3)
 
bool isClassDiagram () const
 
bool isUseCaseDiagram () const
 
bool isSequenceDiagram () const
 
bool isCollaborationDiagram () const
 
bool isStateDiagram () const
 
bool isActivityDiagram () const
 
bool isComponentDiagram () const
 
bool isDeploymentDiagram () const
 
bool isEntityRelationshipDiagram () const
 
bool isObjectDiagram () const
 
void setWidgetLink (WidgetBase *w)
 
WidgetBasewidgetLink ()
 
qreal maxCanvasSize ()
 
void updateCanvasSizeEstimate (qreal x, qreal y, qreal w, qreal h)
 
qreal fixX () const
 
qreal fixY () const
 

Protected Member Functions

bool loadWidgetsFromXMI (QDomElement &qElement)
 
bool loadMessagesFromXMI (QDomElement &qElement)
 
bool loadAssociationsFromXMI (QDomElement &qElement)
 
bool loadUisDiagramPresentation (QDomElement &qElement)
 
void dragEnterEvent (QGraphicsSceneDragDropEvent *enterEvent)
 
void dragMoveEvent (QGraphicsSceneDragDropEvent *moveEvent)
 
void dropEvent (QGraphicsSceneDragDropEvent *dropEvent)
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
void mousePressEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
 
QRectF diagramRect ()
 
void makeSelected (UMLWidget *uw)
 
void updateComponentSizes ()
 
void findMaxBoundingRectangle (const FloatingTextWidget *ft, qreal &px, qreal &py, qreal &qx, qreal &qy)
 
void forceUpdateWidgetFontMetrics (QPainter *painter)
 
virtual void drawBackground (QPainter *painter, const QRectF &rect)
 

Protected Attributes

Uml::ID::Type m_nLocalID
 
Uml::ID::Type m_nID
 The ID of the view. Allocated by UMLDoc. More...
 
Uml::DiagramType::Enum m_Type
 The type of diagram to represent. More...
 
QString m_Name
 The name of the diagram. More...
 
QString m_Documentation
 The documentation of the diagram. More...
 
Settings::OptionState m_Options
 Options used by view. More...
 
bool m_bUseSnapToGrid
 Flag to use snap to grid. The default is off. More...
 
bool m_bUseSnapComponentSizeToGrid
 Flag to use snap to grid for component size. The default is off. More...
 
bool m_isOpen
 Flag is set to true when diagram is open, i.e. shown to the user. More...
 
int m_nCollaborationId
 Used for creating unique name of collaboration messages. More...
 
QPointF m_pos
 
bool m_bCreateObject
 
bool m_bDrawSelectedOnly
 
bool m_bPaste
 
bool m_bStartedCut
 Flag if view/children started cut operation. More...
 

Private Member Functions

void removeOwnedWidgets (UMLWidget *o)
 
void unselectChildrenOfSelectedWidgets ()
 
void createAutoAttributeAssociation (UMLClassifier *type, UMLAttribute *attr, UMLWidget *widget)
 
void createAutoConstraintAssociation (UMLEntity *refEntity, UMLForeignKeyConstraint *fkConstraint, UMLWidget *widget)
 

Private Attributes

UMLScenePrivatem_d
 
UMLViewm_view
 The view to which this scene is related. More...
 
UMLFolderm_pFolder
 The folder in which this UMLView is contained. More...
 
IDChangeLogm_pIDChangesLog
 LocalID Changes Log for paste actions. More...
 
bool m_isActivated
 True if the view was activated after the deserialization(load). More...
 
bool m_bPopupShowing
 Status of a popupmenu on view. True - a popup is on view. More...
 
QPointF m_PastePoint
 The offset at which to paste the clipboard. More...
 
UMLDocm_doc
 Pointer to the UMLDoc. More...
 
UMLViewImageExporterm_pImageExporter
 Used to export the view. More...
 
LayoutGridm_layoutGrid
 layout grid in the background More...
 
bool m_autoIncrementSequence
 state of auto increment sequence More...
 
qreal m_minX
 
qreal m_minY
 Gather data for estimating required canvas size (used during loadFromXMI) More...
 
qreal m_maxX
 
qreal m_maxY
 Gather data for estimating required canvas size (used during loadFromXMI) More...
 
qreal m_fixX
 Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622. More...
 
qreal m_fixY
 Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622. More...
 

Static Private Attributes

static const qreal s_defaultCanvasWidth = 1100
 The default width of a diagram in pixels. More...
 
static const qreal s_defaultCanvasHeight = 800
 The default height of a diagram in pixels. More...
 
static const qreal s_maxCanvasSize = 100000.0
 The maximum supported canvas size. More...
 
static bool s_showDocumentationIndicator = false
 Status of documentation indicator. More...
 

Friends

class UMLViewImageExporterModel
 
class DiagramProxyWidget
 

Detailed Description

UMLScene instances represent diagrams. The UMLScene class inherits from QGraphicsScene and it owns the objects displayed (see m_WidgetList.)

Constructor & Destructor Documentation

◆ UMLScene()

UMLScene::UMLScene ( UMLFolder parentFolder,
UMLView view = 0 
)
explicit

Constructor.

Here is the call graph for this function:

◆ ~UMLScene()

UMLScene::~UMLScene ( )
virtual

Destructor.

Here is the call graph for this function:

Member Function Documentation

◆ activate()

void UMLScene::activate ( )

Activate all the objects and associations after a load from the clipboard

Here is the call graph for this function:

◆ activateAfterLoad()

void UMLScene::activateAfterLoad ( bool  bUseLog = false)

Activate the view after a load a new file

Here is the call graph for this function:

◆ activeView()

UMLView * UMLScene::activeView ( ) const

Returns the active view associated with this scene.

◆ addAssociation()

bool UMLScene::addAssociation ( AssociationWidget pAssoc,
bool  isPasteOperation = false 
)

Adds an association to the view from the given data. Use this method when pasting.

Here is the call graph for this function:

◆ addFloatingTextWidget()

void UMLScene::addFloatingTextWidget ( FloatingTextWidget pWidget)

Adds a floating text widget to the view

Here is the call graph for this function:

◆ addObject()

void UMLScene::addObject ( UMLObject object)

Add an object to the application, and update the view.

Here is the call graph for this function:

◆ addWidgetCmd() [1/2]

void UMLScene::addWidgetCmd ( AssociationWidget widget)

◆ addWidgetCmd() [2/2]

void UMLScene::addWidgetCmd ( UMLWidget widget)
Here is the call graph for this function:

◆ alignBottom

void UMLScene::alignBottom ( )
slot

Bottom Alignment

Here is the call graph for this function:

◆ alignHorizontalDistribute

void UMLScene::alignHorizontalDistribute ( )
slot

Horizontal Distribute Alignment

Here is the call graph for this function:

◆ alignHorizontalMiddle

void UMLScene::alignHorizontalMiddle ( )
slot

Horizontal Middle Alignment

Here is the call graph for this function:

◆ alignLeft

void UMLScene::alignLeft ( )
slot

Left Alignment

Here is the call graph for this function:

◆ alignRight

void UMLScene::alignRight ( )
slot

Right Alignment

Here is the call graph for this function:

◆ alignTop

void UMLScene::alignTop ( )
slot

Top Alignment

Here is the call graph for this function:

◆ alignVerticalDistribute

void UMLScene::alignVerticalDistribute ( )
slot

Vertical Distribute Alignment

Here is the call graph for this function:

◆ alignVerticalMiddle

void UMLScene::alignVerticalMiddle ( )
slot

Vertical Middle Alignment

Here is the call graph for this function:

◆ applyLayout()

void UMLScene::applyLayout ( const QString &  variant)

Apply an automatic layout.

Here is the call graph for this function:

◆ associationAt()

AssociationWidget * UMLScene::associationAt ( const QPointF &  p)

Tests the given point against all associations and returns the association widget for which the point is on the line. Returns NULL if the point is not inside any association. CHECK: This is the same method as in ToolBarState.

Here is the call graph for this function:

◆ associationList()

AssociationWidgetList UMLScene::associationList ( ) const

Returns the association list.

◆ autoIncrementSequence()

bool UMLScene::autoIncrementSequence ( ) const

Return the state of the auto increment sequence

◆ autoIncrementSequenceValue()

QString UMLScene::autoIncrementSequenceValue ( )

Return the next auto increment sequence value

Here is the call graph for this function:

◆ backgroundColor()

const QColor & UMLScene::backgroundColor ( ) const

Returns background color

◆ beginPartialWidgetPaste()

void UMLScene::beginPartialWidgetPaste ( )

◆ checkMessages()

void UMLScene::checkMessages ( ObjectWidget w)

Sees if a message is relevant to the given widget. If it does delete it.

Parameters
wThe widget to check messages against.
Here is the call graph for this function:

◆ clearDiagram()

void UMLScene::clearDiagram ( )

Asks for confirmation and clears everything on the diagram. Called from menus.

Here is the call graph for this function:

◆ clearSelected()

void UMLScene::clearSelected ( )

Clear the selected widgets list.

Here is the call graph for this function:

◆ collisions()

UMLSceneItemList UMLScene::collisions ( const QPointF &  p,
int  delta = 3 
)

◆ contextMenuEvent()

void UMLScene::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
protectedvirtual

Event handler for context menu events.

Here is the call graph for this function:

◆ copyAsImage()

void UMLScene::copyAsImage ( QPixmap *&  pix)

Returns the PNG picture of the paste operation.

Here is the call graph for this function:

◆ createAutoAssociations()

void UMLScene::createAutoAssociations ( UMLWidget widget)

Creates automatically any Associations that the given UMLWidget may have on any diagram. This method is used when you just add the UMLWidget to a diagram.

Here is the call graph for this function:

◆ createAutoAttributeAssociation()

void UMLScene::createAutoAttributeAssociation ( UMLClassifier type,
UMLAttribute attr,
UMLWidget widget 
)
private

Create an association with the attribute attr associated with the UMLWidget widget if the UMLClassifier type is present on the current diagram.

Here is the call graph for this function:

◆ createAutoAttributeAssociations()

void UMLScene::createAutoAttributeAssociations ( UMLWidget widget)

If the m_Type of the given widget is WidgetBase::wt_Class then iterate through the class' attributes and create an association to each attribute type widget that is present on the current diagram.

Here is the call graph for this function:

◆ createAutoAttributeAssociations2()

void UMLScene::createAutoAttributeAssociations2 ( UMLWidget widget)
Here is the call graph for this function:

◆ createAutoConstraintAssociation()

void UMLScene::createAutoConstraintAssociation ( UMLEntity refEntity,
UMLForeignKeyConstraint fkConstraint,
UMLWidget widget 
)
private
Here is the call graph for this function:

◆ createAutoConstraintAssociations()

void UMLScene::createAutoConstraintAssociations ( UMLWidget widget)
Here is the call graph for this function:

◆ deleteSelection()

void UMLScene::deleteSelection ( )

Delete the selected widgets list and the widgets in it.

Here is the call graph for this function:

◆ diagramRect()

QRectF UMLScene::diagramRect ( )
protected

Gets the smallest area to print.

Returns
Returns the smallest area to print.

◆ documentation()

QString UMLScene::documentation ( ) const

Return the documentation of the diagram.

◆ dragEnterEvent()

void UMLScene::dragEnterEvent ( QGraphicsSceneDragDropEvent *  e)
protected

Override standard method.

Here is the call graph for this function:

◆ dragMoveEvent()

void UMLScene::dragMoveEvent ( QGraphicsSceneDragDropEvent *  e)
protected

Override standard method.

◆ drawBackground()

void UMLScene::drawBackground ( QPainter *  painter,
const QRectF &  rect 
)
protectedvirtual

Overrides standard method from QGraphicsScene drawing the background.

Here is the call graph for this function:

◆ dropEvent()

void UMLScene::dropEvent ( QGraphicsSceneDragDropEvent *  e)
protected

Override standard method.

Here is the call graph for this function:

◆ endPartialWidgetPaste()

void UMLScene::endPartialWidgetPaste ( )

◆ fileLoaded()

void UMLScene::fileLoaded ( )

Changes the zoom to the currently set level (now loaded from file) Called from UMLApp::slotUpdateViews()

Here is the call graph for this function:

◆ fillColor()

const QColor & UMLScene::fillColor ( ) const

Returns the fill color to use.

◆ findAssocWidget() [1/3]

AssociationWidget * UMLScene::findAssocWidget ( Uml::AssociationType::Enum  at,
UMLWidget pWidgetA,
UMLWidget pWidgetB 
)

Finds an association widget with the given type and widgets.

Parameters
atThe AssociationType of the widget to find.
pWidgetAPointer to the UMLWidget of role A.
pWidgetBPointer to the UMLWidget of role B.
Returns
Returns the widget found, returns 0 if no widget found.
Here is the call graph for this function:

◆ findAssocWidget() [2/3]

AssociationWidget * UMLScene::findAssocWidget ( Uml::ID::Type  id)

Finds an association widget with the given ID.

Parameters
idThe ID of the widget to find.
Returns
Returns the widget found, returns 0 if no widget found.
Here is the call graph for this function:

◆ findAssocWidget() [3/3]

AssociationWidget * UMLScene::findAssocWidget ( UMLWidget pWidgetA,
UMLWidget pWidgetB,
const QString &  roleNameB 
)

Finds an association widget with the given widgets and the given role B name. Considers the following association types: at_Association, at_UniAssociation, at_Composition, at_Aggregation This is used for seeking an attribute association.

Parameters
pWidgetAPointer to the UMLWidget of role A.
pWidgetBPointer to the UMLWidget of role B.
roleNameBName at the B side of the association (the attribute name)
Returns
Returns the widget found, returns 0 if no widget found.
Here is the call graph for this function:

◆ findMaxBoundingRectangle()

void UMLScene::findMaxBoundingRectangle ( const FloatingTextWidget ft,
qreal &  px,
qreal &  py,
qreal &  qx,
qreal &  qy 
)
protected

Find the maximum bounding rectangle of FloatingTextWidget widgets. Auxiliary to copyAsImage().

Parameters
ftPointer to the FloatingTextWidget widget to consider.
pxX coordinate of lower left corner. This value will be updated if the X coordinate of the lower left corner of ft is smaller than the px value passed in.
pyY coordinate of lower left corner. This value will be updated if the Y coordinate of the lower left corner of ft is smaller than the py value passed in.
qxX coordinate of upper right corner. This value will be updated if the X coordinate of the upper right corner of ft is larger than the qx value passed in.
qyY coordinate of upper right corner. This value will be updated if the Y coordinate of the upper right corner of ft is larger than the qy value passed in.
Here is the call graph for this function:

◆ findWidget()

UMLWidget * UMLScene::findWidget ( Uml::ID::Type  id)

Finds a widget with the given ID. Search both our UMLWidget AND MessageWidget lists.

Parameters
idThe ID of the widget to find.
Returns
Returns the widget found, returns 0 if no widget found.
Here is the call graph for this function:

◆ fixX()

qreal UMLScene::fixX ( ) const

Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622

◆ fixY()

qreal UMLScene::fixY ( ) const

Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622

◆ folder()

UMLFolder * UMLScene::folder ( ) const

Return the UMLFolder in which this diagram lives.

◆ font()

QFont UMLScene::font ( ) const

Returns the font to use

◆ forceUpdateWidgetFontMetrics()

void UMLScene::forceUpdateWidgetFontMetrics ( QPainter *  painter)
protected

Force the widget font metrics to be updated next time the widgets are drawn. This is necessary because the widget size might depend on the font metrics and the font metrics might change for different QPainter, i.e. font metrics for Display font and Printer font are usually different. Call this when you change the QPainter.

Here is the call graph for this function:

◆ generateCollaborationId()

int UMLScene::generateCollaborationId ( )

Used for creating unique name of collaboration messages.

◆ getCreateObject()

bool UMLScene::getCreateObject ( ) const

Return whether we are currently creating an object.

◆ getDiagram() [1/2]

void UMLScene::getDiagram ( QPainter &  painter,
const QRectF &  source,
const QRectF &  target = QRectF() 
)

Paint diagram to the paint device

Parameters
painterthe QPainter to which the diagram is painted
sourcethe area of the diagram to copy
targetthe rect where to paint into
Here is the call graph for this function:

◆ getDiagram() [2/2]

void UMLScene::getDiagram ( QPixmap &  diagram,
const QRectF &  rect 
)

Returns the PNG picture of the paste operation.

Parameters
diagramthe class to store PNG picture of the paste operation.
rectthe area of the diagram to copy
Here is the call graph for this function:

◆ getFirstMultiSelectedWidget()

UMLWidget * UMLScene::getFirstMultiSelectedWidget ( ) const

Return pointer to the first selected widget (for multi-selection)

Here is the call graph for this function:

◆ getImageExporter()

UMLViewImageExporter * UMLScene::getImageExporter ( )

Returns the imageExporter used to export the view.

Returns
The imageExporter used to export the view.

◆ getPaste()

bool UMLScene::getPaste ( ) const

Returns the status on whether in a paste state.

Returns
Returns the status on whether in a paste state.

◆ getPastePoint()

QPointF UMLScene::getPastePoint ( )

Returns the offset point at which to place the paste from clipboard. Just add the amount to your co-ords. Only call this straight after the event, the value won't stay valid. Should only be called by Assoc widgets at the moment. no one else needs it.

◆ getUniqueSelectionType()

WidgetBase::WidgetType UMLScene::getUniqueSelectionType ( )

Returns the type of the selected widget or widgets.

If multiple widgets of different types are selected then WidgetType wt_UMLWidget is returned.

Here is the call graph for this function:

◆ getWidgetAssocs()

void UMLScene::getWidgetAssocs ( UMLObject Obj,
AssociationWidgetList Associations 
)

Fills Associations with all the associations that includes a widget related to object

Here is the call graph for this function:

◆ gridDotColor()

const QColor & UMLScene::gridDotColor ( ) const

return grid dot color

Returns
Color
Here is the call graph for this function:

◆ hideEvent()

void UMLScene::hideEvent ( QHideEvent *  he)

Overrides the standard operation.

Here is the call graph for this function:

◆ ID()

Uml::ID::Type UMLScene::ID ( ) const

Returns the ID of the diagram.

◆ isActivityDiagram()

bool UMLScene::isActivityDiagram ( ) const
inline
Here is the call graph for this function:

◆ isClassDiagram()

bool UMLScene::isClassDiagram ( ) const
inline
Here is the call graph for this function:

◆ isCollaborationDiagram()

bool UMLScene::isCollaborationDiagram ( ) const
inline
Here is the call graph for this function:

◆ isComponentDiagram()

bool UMLScene::isComponentDiagram ( ) const
inline
Here is the call graph for this function:

◆ isDeploymentDiagram()

bool UMLScene::isDeploymentDiagram ( ) const
inline
Here is the call graph for this function:

◆ isEntityRelationshipDiagram()

bool UMLScene::isEntityRelationshipDiagram ( ) const
inline
Here is the call graph for this function:

◆ isObjectDiagram()

bool UMLScene::isObjectDiagram ( ) const
inline
Here is the call graph for this function:

◆ isOpen()

bool UMLScene::isOpen ( ) const

Returns the open state.

Returns
when true diagram is shown to the user

◆ isSavedInSeparateFile()

bool UMLScene::isSavedInSeparateFile ( )

Returns true if this diagram resides in an externalized folder. CHECK: It is probably cleaner to move this to the UMLListViewItem.

Here is the call graph for this function:

◆ isSequenceDiagram()

bool UMLScene::isSequenceDiagram ( ) const
inline
Here is the call graph for this function:

◆ isShowDocumentationIndicator()

bool UMLScene::isShowDocumentationIndicator ( ) const

Returns whether to show documentation indicator.

◆ isSnapGridVisible()

bool UMLScene::isSnapGridVisible ( ) const

Returns whether to show snap grid or not.

Here is the call graph for this function:

◆ isStateDiagram()

bool UMLScene::isStateDiagram ( ) const
inline
Here is the call graph for this function:

◆ isUseCaseDiagram()

bool UMLScene::isUseCaseDiagram ( ) const
inline
Here is the call graph for this function:

◆ lineColor()

const QColor & UMLScene::lineColor ( ) const

Returns the line color to use.

◆ lineWidth()

uint UMLScene::lineWidth ( ) const

Returns the line width to use.

◆ loadAssociationsFromXMI()

bool UMLScene::loadAssociationsFromXMI ( QDomElement &  qElement)
protected
Here is the call graph for this function:

◆ loadFromXMI()

bool UMLScene::loadFromXMI ( QDomElement &  qElement)
virtual

Loads the "diagram" tag.

Here is the call graph for this function:

◆ loadMessagesFromXMI()

bool UMLScene::loadMessagesFromXMI ( QDomElement &  qElement)
protected
Here is the call graph for this function:

◆ loadUISDiagram()

bool UMLScene::loadUISDiagram ( QDomElement &  qElement)

Loads the "UISDiagram" tag of Unisys.IntegratePlus.2 generated files.

Here is the call graph for this function:

◆ loadUisDiagramPresentation()

bool UMLScene::loadUisDiagramPresentation ( QDomElement &  qElement)
protected
Here is the call graph for this function:

◆ loadWidgetFromXMI()

UMLWidget * UMLScene::loadWidgetFromXMI ( QDomElement &  widgetElement)

Loads a "widget" element from XMI, used by loadFromXMI() and the clipboard.

Here is the call graph for this function:

◆ loadWidgetsFromXMI()

bool UMLScene::loadWidgetsFromXMI ( QDomElement &  qElement)
protected
Here is the call graph for this function:

◆ makeSelected()

void UMLScene::makeSelected ( UMLWidget uw)
protected

Calls setSelected on the given UMLWidget and enters it into the m_selectedList while making sure it is there only once.

Here is the call graph for this function:

◆ maxCanvasSize()

qreal UMLScene::maxCanvasSize ( )
inline

◆ messageAt()

MessageWidget * UMLScene::messageAt ( const QPointF &  p)

Tests the given point against all associations and returns the association widget for which the point is on the line. Returns NULL if the point is not inside any association.

Here is the call graph for this function:

◆ messageList()

MessageWidgetList UMLScene::messageList ( ) const

Returns the message list.

◆ mouseDoubleClickEvent()

void UMLScene::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protected

Override standard method. Calls the same method in the current tool bar state.

Here is the call graph for this function:

◆ mouseMoveEvent()

void UMLScene::mouseMoveEvent ( QGraphicsSceneMouseEvent *  ome)
protected

Overrides the standard operation. Calls the same method in the current tool bar state.

Here is the call graph for this function:

◆ mousePressEvent()

void UMLScene::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected

Override standard method. Calls the same method in the current tool bar state.

Here is the call graph for this function:

◆ mouseReleaseEvent()

void UMLScene::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  ome)
protected

Overrides the standard operation. Calls the same method in the current tool bar state.

Here is the call graph for this function:

◆ moveSelectedBy()

void UMLScene::moveSelectedBy ( qreal  dX,
qreal  dY 
)

Move all the selected widgets by a relative X and Y offset. TODO: Only used in UMLApp::handleCursorKeyReleaseEvent

Parameters
dXThe distance to move horizontally.
dYThe distance to move vertically.
Here is the call graph for this function:

◆ name()

QString UMLScene::name ( ) const

Return the name of the diagram.

◆ onWidgetDestructionBox()

ObjectWidget * UMLScene::onWidgetDestructionBox ( const QPointF &  point) const

Determine whether on a sequence diagram we have clicked on the destruction box of an Object.

Returns
The widget owning the destruction box which was clicked. Returns 0 if no destruction box was clicked on.
Here is the call graph for this function:

◆ onWidgetLine()

ObjectWidget * UMLScene::onWidgetLine ( const QPointF &  point) const

Determine whether on a sequence diagram we have clicked on a line of an Object.

Returns
The widget owning the line which was clicked. Returns 0 if no line was clicked on.
Here is the call graph for this function:

◆ optionState()

Settings::OptionState & UMLScene::optionState ( )

Returns the options being used.

◆ pos()

QPointF UMLScene::pos ( ) const

Returns the position of the diagram.

◆ print()

void UMLScene::print ( QPrinter *  pPrinter,
QPainter &  pPainter 
)

Contains the implementation for printing functionality.

Here is the call graph for this function:

◆ removeAllAssociations()

void UMLScene::removeAllAssociations ( )

Removes All the associations of the diagram

Here is the call graph for this function:

◆ removeAllWidgets()

void UMLScene::removeAllWidgets ( )

Removes All the widgets of the diagram

Here is the call graph for this function:

◆ removeAssociations()

void UMLScene::removeAssociations ( UMLWidget widget)

Removes all the associations related to Widget.

Parameters
widgetPointer to the widget to remove.
Here is the call graph for this function:

◆ removeAssocInViewAndDoc()

void UMLScene::removeAssocInViewAndDoc ( AssociationWidget a)

Removes an AssociationWidget from the association list and removes the corresponding UMLAssociation from the current UMLDoc.

Here is the call graph for this function:

◆ removeOwnedWidgets()

void UMLScene::removeOwnedWidgets ( UMLWidget o)
private

Remove all widgets that have given widget as owner.

Parameters
oThe owner widget that will be removed.
Here is the call graph for this function:

◆ removeWidget() [1/2]

void UMLScene::removeWidget ( AssociationWidget w)

Remove an associationwidget from view (undo command)

Parameters
wThe associationwidget to remove.
Here is the call graph for this function:

◆ removeWidget() [2/2]

void UMLScene::removeWidget ( UMLWidget o)

Remove a widget from view (undo command)

Parameters
oThe widget to remove.
Here is the call graph for this function:

◆ removeWidgetCmd() [1/2]

void UMLScene::removeWidgetCmd ( AssociationWidget pAssoc)

Removes an AssociationWidget from a diagram Physically deletes the AssociationWidget passed in.

Parameters
pAssocPointer to the AssociationWidget.
Here is the call graph for this function:

◆ removeWidgetCmd() [2/2]

void UMLScene::removeWidgetCmd ( UMLWidget o)

Remove a widget from view.

Parameters
oThe widget to remove.
Here is the call graph for this function:

◆ resetPastePoint()

void UMLScene::resetPastePoint ( )

Reset the paste point.

◆ resetToolbar()

void UMLScene::resetToolbar ( )

Reset the toolbar.

◆ resizeSelection()

void UMLScene::resizeSelection ( )

resize selected widgets

Here is the call graph for this function:

◆ saveToXMI()

void UMLScene::saveToXMI ( QXmlStreamWriter &  writer)
virtual

Creates the "diagram" tag and fills it with the contents of the diagram.

Here is the call graph for this function:

◆ selectAll()

void UMLScene::selectAll ( )

Selects all widgets

Here is the call graph for this function:

◆ selectAssociations()

void UMLScene::selectAssociations ( bool  bSelect)

Sets each association as selected if the widgets it associates are selected

Parameters
bSelectTrue to select, false for unselect
Here is the call graph for this function:

◆ selectedAssociationWidgets()

AssociationWidgetList UMLScene::selectedAssociationWidgets ( ) const

Returns a list of selected association widgets

Returns
list of selected widgets based on class AssociationWidget

◆ selectedAssocs()

AssociationWidgetList UMLScene::selectedAssocs ( )

Returns a list with all the selected associations from the diagram

Here is the call graph for this function:

◆ selectedCount()

int UMLScene::selectedCount ( bool  filterText = false) const

Return the amount of widgets selected.

Parameters
filterTextWhen true, do NOT count floating text widgets that belong to other widgets (i.e. only count TextRole::Floating.) Default: Count all widgets.
Returns
Number of widgets selected.
Here is the call graph for this function:

◆ selectedMessageWidgets()

UMLWidgetList UMLScene::selectedMessageWidgets ( ) const

Returns a list of selected message widgets

Returns
list of selected widgets based on class MessageWidget
Here is the call graph for this function:

◆ selectedWidgets()

UMLWidgetList UMLScene::selectedWidgets ( ) const

Returns a list of selected widgets

Returns
list of selected widgets based on class UMLWidget
Note
This method returns widgets including message widgets, but no association widgets

◆ selectedWidgetsExt()

UMLWidgetList UMLScene::selectedWidgetsExt ( bool  filterText = true)

Fills the List with all the selected widgets from the diagram The list can be filled with all the selected widgets, or be filtered to prevent text widgets other than tr_Floating to be append.

Parameters
filterTextDon't append the text unless their role is TextRole::Floating
Returns
The UMLWidgetList to fill.
Here is the call graph for this function:

◆ selectionSetFillColor()

void UMLScene::selectionSetFillColor ( const QColor &  color)

Set the fill color for all the currently selected items.

Here is the call graph for this function:

◆ selectionSetFont()

void UMLScene::selectionSetFont ( const QFont &  font)

Set the font for all the currently selected items.

Here is the call graph for this function:

◆ selectionSetLineColor()

void UMLScene::selectionSetLineColor ( const QColor &  color)

Set the line color for all the currently selected items.

Here is the call graph for this function:

◆ selectionSetLineWidth()

void UMLScene::selectionSetLineWidth ( uint  width)

Set the line width for all the currently selected items.

Here is the call graph for this function:

◆ selectionSetVisualProperty()

void UMLScene::selectionSetVisualProperty ( ClassifierWidget::VisualProperty  property,
bool  value 
)

Set or unset the visual property (show ..) setting of all selected items.

Here is the call graph for this function:

◆ selectionUseFillColor()

void UMLScene::selectionUseFillColor ( bool  useFC)

Set the useFillColor variable to all selected widgets

Parameters
useFCThe state to set the widget to.
Here is the call graph for this function:

◆ selectWidget()

void UMLScene::selectWidget ( UMLWidget widget,
QRectF *  rect = 0 
)

Select a single widget

If QRectF* rect is provided, the selection is only made if the widget is visible within the rectangle.

Here is the call graph for this function:

◆ selectWidgets() [1/2]

void UMLScene::selectWidgets ( qreal  px,
qreal  py,
qreal  qx,
qreal  qy 
)

Selects all the widgets within an internally kept rectangle.

Here is the call graph for this function:

◆ selectWidgets() [2/2]

void UMLScene::selectWidgets ( UMLWidgetList widgets)

Selects all the widgets from a list.

Here is the call graph for this function:

◆ selectWidgetsOfAssoc()

void UMLScene::selectWidgetsOfAssoc ( AssociationWidget a)

Selects all the widgets of the given association widget.

Here is the call graph for this function:

◆ setAutoIncrementSequence()

void UMLScene::setAutoIncrementSequence ( bool  state)

◆ setClassWidgetOptions()

void UMLScene::setClassWidgetOptions ( ClassOptionsPage page)

Sets some options for all the ClassifierWidget on the view.

Here is the call graph for this function:

◆ setCreateObject()

void UMLScene::setCreateObject ( bool  bCreate)

Set whether we are currently creating an object.

◆ setDocumentation()

void UMLScene::setDocumentation ( const QString &  doc)

Set the documentation of the diagram.

◆ setFillColor()

void UMLScene::setFillColor ( const QColor &  color)

Set the background color.

Parameters
colorThe color to use.
Here is the call graph for this function:

◆ setFolder()

void UMLScene::setFolder ( UMLFolder folder)

Set the UMLFolder in which this diagram lives.

Here is the call graph for this function:

◆ setFont()

void UMLScene::setFont ( QFont  font,
bool  changeAllWidgets = false 
)

Sets the font for the view and optionally all the widgets on the view.

Here is the call graph for this function:

◆ setGridDotColor()

void UMLScene::setGridDotColor ( const QColor &  color)

set grid dot color

Parameters
colorgrid dot color
Here is the call graph for this function:

◆ setID()

void UMLScene::setID ( Uml::ID::Type  id)

Sets the ID of the diagram.

◆ setIsOpen()

void UMLScene::setIsOpen ( bool  isOpen)

Sets the flag 'isOpen'.

Parameters
isOpenflag indicating that the diagram is shown to the user
Here is the call graph for this function:

◆ setLineColor()

void UMLScene::setLineColor ( const QColor &  color)

Sets the line color.

Parameters
colorThe color to use.
Here is the call graph for this function:

◆ setLineWidth()

void UMLScene::setLineWidth ( uint  width)

Sets the line width.

Parameters
widthThe width to use.
Here is the call graph for this function:

◆ setMenu()

void UMLScene::setMenu ( const QPoint &  pos)

◆ setName()

void UMLScene::setName ( const QString &  name)

Set the name of the diagram.

Here is the call graph for this function:

◆ setOptionState()

void UMLScene::setOptionState ( const Settings::OptionState options)

Sets the options to be used.

Here is the call graph for this function:

◆ setPaste()

void UMLScene::setPaste ( bool  paste)

Sets the status on whether in a paste state.

◆ setPos()

void UMLScene::setPos ( const QPointF &  pos)

Sets the position of the diagram.

Here is the call graph for this function:

◆ setShowDocumentationIndicator()

void UMLScene::setShowDocumentationIndicator ( bool  bShow)

sets whether to show documentation indicator.

◆ setShowOpSig()

void UMLScene::setShowOpSig ( bool  bShowOpSig)

Sets whether to show operation signatures.

◆ setSnapComponentSizeToGrid()

void UMLScene::setSnapComponentSizeToGrid ( bool  bSnap)

Sets whether to snap to grid for component size.

Here is the call graph for this function:

◆ setSnapGridVisible()

void UMLScene::setSnapGridVisible ( bool  bShow)

Sets whether to show snap grid.

Here is the call graph for this function:

◆ setSnapSpacing()

void UMLScene::setSnapSpacing ( int  x,
int  y 
)

Sets the grid size in x and y.

Here is the call graph for this function:

◆ setSnapToGrid()

void UMLScene::setSnapToGrid ( bool  bSnap)

Sets whether to snap to grid.

Here is the call graph for this function:

◆ setStartedCut()

void UMLScene::setStartedCut ( )

Called by the view or any of its children when they start a cut operation.

◆ setTextColor()

void UMLScene::setTextColor ( const QColor &  color)

Sets the text color.

Parameters
colorThe color to use.
Here is the call graph for this function:

◆ setType()

void UMLScene::setType ( Uml::DiagramType::Enum  type)

Set the type of diagram.

Here is the call graph for this function:

◆ setupNewWidget()

void UMLScene::setupNewWidget ( UMLWidget w,
bool  setPosition = true 
)

Initialize and announce a newly created widget. Auxiliary to contentsMouseReleaseEvent().

Here is the call graph for this function:

◆ setUseFillColor()

void UMLScene::setUseFillColor ( bool  ufc)

Sets whether to use the fill/background color

◆ setWidgetLink()

void UMLScene::setWidgetLink ( WidgetBase w)

◆ showEvent()

void UMLScene::showEvent ( QShowEvent *  se)

Overrides the standard operation.

Here is the call graph for this function:

◆ showOpSig()

bool UMLScene::showOpSig ( ) const

Returns whether to show operation signatures.

◆ sigAssociationRemoved

void UMLScene::sigAssociationRemoved ( AssociationWidget _t1)
signal

◆ sigFillColorChanged

void UMLScene::sigFillColorChanged ( Uml::ID::Type  _t1)
signal

◆ sigGridColorChanged

void UMLScene::sigGridColorChanged ( Uml::ID::Type  _t1)
signal

◆ sigLineColorChanged

void UMLScene::sigLineColorChanged ( Uml::ID::Type  _t1)
signal

◆ sigLineWidthChanged

void UMLScene::sigLineWidthChanged ( Uml::ID::Type  _t1)
signal

◆ sigResetToolBar

void UMLScene::sigResetToolBar ( )
signal

◆ sigShowGridToggled

void UMLScene::sigShowGridToggled ( bool  _t1)
signal

◆ sigSnapComponentSizeToGridToggled

void UMLScene::sigSnapComponentSizeToGridToggled ( bool  _t1)
signal

◆ sigSnapToGridToggled

void UMLScene::sigSnapToGridToggled ( bool  _t1)
signal

◆ sigTextColorChanged

void UMLScene::sigTextColorChanged ( Uml::ID::Type  _t1)
signal

◆ sigWidgetRemoved

void UMLScene::sigWidgetRemoved ( UMLWidget _t1)
signal

◆ slotActivate

void UMLScene::slotActivate ( )
slot

makes this view the active view by asking the document to show us

Here is the call graph for this function:

◆ slotCutSuccessful

void UMLScene::slotCutSuccessful ( )
slot

Connects to the signal that UMLApp emits when a cut operation is successful. If the view or a child started the operation the flag m_bStartedCut will be set and we can carry out any operation that is needed, like deleting the selected widgets for the cut operation.

Here is the call graph for this function:

◆ slotMenuSelection

void UMLScene::slotMenuSelection ( QAction *  action)
slot

When a menu selection has been made on the menu that this view created, this method gets called.

◆ slotObjectCreated

void UMLScene::slotObjectCreated ( UMLObject o)
slot

Slot called when an object is created.

Parameters
ocreated UML object
Here is the call graph for this function:

◆ slotObjectRemoved

void UMLScene::slotObjectRemoved ( UMLObject o)
slot

Slot called when an object is removed.

Parameters
oremoved UML object
Here is the call graph for this function:

◆ slotShowView

void UMLScene::slotShowView ( )
slot

Called by menu when to show the instance of the view.

Here is the call graph for this function:

◆ slotToolBarChanged

void UMLScene::slotToolBarChanged ( int  c)
slot

Changes the current tool to the selected tool. The current tool is cleaned and the selected tool initialized.

Here is the call graph for this function:

◆ snapComponentSizeToGrid()

bool UMLScene::snapComponentSizeToGrid ( ) const

Return whether to use snap to grid for component size.

◆ snappedX()

qreal UMLScene::snappedX ( qreal  _x)

Returns the input coordinate with possible grid-snap applied.

Here is the call graph for this function:

◆ snappedY()

qreal UMLScene::snappedY ( qreal  _y)

Returns the input coordinate with possible grid-snap applied.

Here is the call graph for this function:

◆ snapToGrid()

bool UMLScene::snapToGrid ( ) const

Return whether to use snap to grid.

◆ snapX()

int UMLScene::snapX ( ) const

Returns the x grid size.

Here is the call graph for this function:

◆ snapY()

int UMLScene::snapY ( ) const

Returns the y grid size.

Here is the call graph for this function:

◆ textColor()

const QColor & UMLScene::textColor ( ) const

Returns the text color to use.

◆ toggleShowGrid()

void UMLScene::toggleShowGrid ( )

Changes show grid boolean. Called from menus.

Here is the call graph for this function:

◆ toggleSnapComponentSizeToGrid()

void UMLScene::toggleSnapComponentSizeToGrid ( )

Changes snap to grid for component size boolean. Called from menus.

Here is the call graph for this function:

◆ toggleSnapToGrid()

void UMLScene::toggleSnapToGrid ( )

Changes snap to grid boolean. Called from menus.

Here is the call graph for this function:

◆ triggerToolbarButton()

void UMLScene::triggerToolbarButton ( WorkToolBar::ToolBar_Buttons  button)
Here is the call graph for this function:

◆ type()

DiagramType::Enum UMLScene::type ( ) const

Returns the type of the diagram.

◆ unselectChildrenOfSelectedWidgets()

void UMLScene::unselectChildrenOfSelectedWidgets ( )
private

Unselect child widgets when their owner is already selected.

Here is the call graph for this function:

◆ updateCanvasSizeEstimate()

void UMLScene::updateCanvasSizeEstimate ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
)

Unfortunately the XMI attributes "canvaswidth" and "canvasheight" cannot be relied on, in versions before 2.34 they sometimes contain bogus values. We work around this problem by gathering the minimum and maximum values of the widgets x, x+width, y, y+height into the variables m_minX, m_maxX, m_minY, m_maxY. These values are gathered, and the new scene rectangle is set if required, during loadFromXMI().

Parameters
xIf value is less than m_minX then m_minX is set to this value.
yIf value is less than m_minY then m_minY is set to this value.
wIf x plus this value is greater than m_maxX then m_maxX is set to their sum.
hIf y plus this value is greater than m_maxY then m_maxY is set to their sum.

◆ updateComponentSizes()

void UMLScene::updateComponentSizes ( )
protected

Updates the size of all components in this view.

Here is the call graph for this function:

◆ updateContainment()

void UMLScene::updateContainment ( UMLCanvasObject self)

Refreshes containment association, i.e. removes possible old containment and adds new containment association if applicable.

Parameters
selfPointer to the contained object for which the association to the containing object is recomputed.
Here is the call graph for this function:

◆ useFillColor()

bool UMLScene::useFillColor ( ) const

Returns whether to use the fill/background color

◆ widgetAt()

UMLWidget * UMLScene::widgetAt ( const QPointF &  p)

Checks the specified point against all widgets and returns the widget for which the point is within its bounding box.

Parameters
pPoint in scene coordinates to search for
Returns
Returns the first widget of type UMLWidget returned by QGraphicsScene::items() for multiple matches
Returns NULL if the point is not inside any widget.

◆ widgetLink()

WidgetBase * UMLScene::widgetLink ( )

◆ widgetList()

UMLWidgetList UMLScene::widgetList ( ) const

Returns the widget list.

Here is the call graph for this function:

◆ widgetOnDiagram() [1/2]

UMLWidget * UMLScene::widgetOnDiagram ( Uml::ID::Type  id)

Returns whether a widget is already on the diagram.

Parameters
idThe id of the widget to check for.
Returns
Returns pointer to the widget if it is on the diagram, NULL if not.
Here is the call graph for this function:

◆ widgetOnDiagram() [2/2]

UMLWidget * UMLScene::widgetOnDiagram ( WidgetBase::WidgetType  type)

Returns whether a widget is already on the diagram.

Parameters
typeThe type of the widget to check for.
Returns
Returns pointer to the widget if it is on the diagram, NULL if not.
Here is the call graph for this function:

Friends And Related Function Documentation

◆ DiagramProxyWidget

friend class DiagramProxyWidget
friend

◆ UMLViewImageExporterModel

friend class UMLViewImageExporterModel
friend

Member Data Documentation

◆ m_autoIncrementSequence

bool UMLScene::m_autoIncrementSequence
private

state of auto increment sequence

◆ m_bCreateObject

bool UMLScene::m_bCreateObject
protected

◆ m_bDrawSelectedOnly

bool UMLScene::m_bDrawSelectedOnly
protected

◆ m_bPaste

bool UMLScene::m_bPaste
protected

◆ m_bPopupShowing

bool UMLScene::m_bPopupShowing
private

Status of a popupmenu on view. True - a popup is on view.

◆ m_bStartedCut

bool UMLScene::m_bStartedCut
protected

Flag if view/children started cut operation.

◆ m_bUseSnapComponentSizeToGrid

bool UMLScene::m_bUseSnapComponentSizeToGrid
protected

Flag to use snap to grid for component size. The default is off.

◆ m_bUseSnapToGrid

bool UMLScene::m_bUseSnapToGrid
protected

Flag to use snap to grid. The default is off.

◆ m_d

UMLScenePrivate* UMLScene::m_d
private

◆ m_doc

UMLDoc* UMLScene::m_doc
private

Pointer to the UMLDoc.

◆ m_Documentation

QString UMLScene::m_Documentation
protected

The documentation of the diagram.

◆ m_fixX

qreal UMLScene::m_fixX
private

Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622.

◆ m_fixY

qreal UMLScene::m_fixY
private

Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622.

◆ m_isActivated

bool UMLScene::m_isActivated
private

True if the view was activated after the deserialization(load).

◆ m_isOpen

bool UMLScene::m_isOpen
protected

Flag is set to true when diagram is open, i.e. shown to the user.

◆ m_layoutGrid

LayoutGrid* UMLScene::m_layoutGrid
private

layout grid in the background

◆ m_maxX

qreal UMLScene::m_maxX
private

◆ m_maxY

qreal UMLScene::m_maxY
private

Gather data for estimating required canvas size (used during loadFromXMI)

◆ m_minX

qreal UMLScene::m_minX
private

◆ m_minY

qreal UMLScene::m_minY
private

Gather data for estimating required canvas size (used during loadFromXMI)

◆ m_Name

QString UMLScene::m_Name
protected

The name of the diagram.

◆ m_nCollaborationId

int UMLScene::m_nCollaborationId
protected

Used for creating unique name of collaboration messages.

◆ m_nID

Uml::ID::Type UMLScene::m_nID
protected

The ID of the view. Allocated by UMLDoc.

◆ m_nLocalID

Uml::ID::Type UMLScene::m_nLocalID
protected

Contains the unique ID to allocate to a widget that needs an ID for the view. ObjectWidget is an example of this.

◆ m_Options

Settings::OptionState UMLScene::m_Options
protected

Options used by view.

◆ m_PastePoint

QPointF UMLScene::m_PastePoint
private

The offset at which to paste the clipboard.

◆ m_pFolder

UMLFolder* UMLScene::m_pFolder
private

The folder in which this UMLView is contained.

◆ m_pIDChangesLog

IDChangeLog* UMLScene::m_pIDChangesLog
private

LocalID Changes Log for paste actions.

◆ m_pImageExporter

UMLViewImageExporter* UMLScene::m_pImageExporter
private

Used to export the view.

◆ m_pos

QPointF UMLScene::m_pos
protected

◆ m_Type

Uml::DiagramType::Enum UMLScene::m_Type
protected

The type of diagram to represent.

◆ m_view

UMLView* UMLScene::m_view
private

The view to which this scene is related.

◆ s_defaultCanvasHeight

const qreal UMLScene::s_defaultCanvasHeight = 800
staticprivate

The default height of a diagram in pixels.

◆ s_defaultCanvasWidth

const qreal UMLScene::s_defaultCanvasWidth = 1100
staticprivate

The default width of a diagram in pixels.

◆ s_maxCanvasSize

const qreal UMLScene::s_maxCanvasSize = 100000.0
staticprivate

The maximum supported canvas size.

◆ s_showDocumentationIndicator

bool UMLScene::s_showDocumentationIndicator = false
staticprivate

Status of documentation indicator.


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