umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <umlscene.h>
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 *) |
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 | |
UMLScenePrivate * | m_d |
UMLView * | m_view |
The view to which this scene is related. More... | |
UMLFolder * | m_pFolder |
The folder in which this UMLView is contained. More... | |
IDChangeLog * | m_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... | |
UMLDoc * | m_doc |
Pointer to the UMLDoc. More... | |
UMLViewImageExporter * | m_pImageExporter |
Used to export the view. More... | |
LayoutGrid * | m_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 |
UMLScene instances represent diagrams. The UMLScene class inherits from QGraphicsScene and it owns the objects displayed (see m_WidgetList.)
Constructor.
|
virtual |
Destructor.
void UMLScene::activate | ( | ) |
Activate all the objects and associations after a load from the clipboard
void UMLScene::activateAfterLoad | ( | bool | bUseLog = false | ) |
Activate the view after a load a new file
UMLView * UMLScene::activeView | ( | ) | const |
Returns the active view associated with this scene.
bool UMLScene::addAssociation | ( | AssociationWidget * | pAssoc, |
bool | isPasteOperation = false |
||
) |
Adds an association to the view from the given data. Use this method when pasting.
void UMLScene::addFloatingTextWidget | ( | FloatingTextWidget * | pWidget | ) |
Adds a floating text widget to the view
void UMLScene::addObject | ( | UMLObject * | object | ) |
Add an object to the application, and update the view.
void UMLScene::addWidgetCmd | ( | AssociationWidget * | widget | ) |
void UMLScene::addWidgetCmd | ( | UMLWidget * | widget | ) |
|
slot |
Bottom Alignment
|
slot |
Horizontal Distribute Alignment
|
slot |
Horizontal Middle Alignment
|
slot |
Left Alignment
|
slot |
Right Alignment
|
slot |
Top Alignment
|
slot |
Vertical Distribute Alignment
|
slot |
Vertical Middle Alignment
void UMLScene::applyLayout | ( | const QString & | variant | ) |
Apply an automatic layout.
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.
AssociationWidgetList UMLScene::associationList | ( | ) | const |
Returns the association list.
bool UMLScene::autoIncrementSequence | ( | ) | const |
Return the state of the auto increment sequence
QString UMLScene::autoIncrementSequenceValue | ( | ) |
Return the next auto increment sequence value
const QColor & UMLScene::backgroundColor | ( | ) | const |
Returns background color
void UMLScene::beginPartialWidgetPaste | ( | ) |
void UMLScene::checkMessages | ( | ObjectWidget * | w | ) |
Sees if a message is relevant to the given widget. If it does delete it.
w | The widget to check messages against. |
void UMLScene::clearDiagram | ( | ) |
Asks for confirmation and clears everything on the diagram. Called from menus.
void UMLScene::clearSelected | ( | ) |
Clear the selected widgets list.
UMLSceneItemList UMLScene::collisions | ( | const QPointF & | p, |
int | delta = 3 |
||
) |
|
protectedvirtual |
Event handler for context menu events.
void UMLScene::copyAsImage | ( | QPixmap *& | pix | ) |
Returns the PNG picture of the paste operation.
void UMLScene::createAutoAssociations | ( | 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.
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.
void UMLScene::createAutoAttributeAssociations2 | ( | UMLWidget * | widget | ) |
|
private |
void UMLScene::createAutoConstraintAssociations | ( | UMLWidget * | widget | ) |
void UMLScene::deleteSelection | ( | ) |
Delete the selected widgets list and the widgets in it.
|
protected |
Gets the smallest area to print.
QString UMLScene::documentation | ( | ) | const |
Return the documentation of the diagram.
|
protected |
Override standard method.
|
protected |
Override standard method.
|
protectedvirtual |
Overrides standard method from QGraphicsScene drawing the background.
|
protected |
Override standard method.
void UMLScene::endPartialWidgetPaste | ( | ) |
void UMLScene::fileLoaded | ( | ) |
Changes the zoom to the currently set level (now loaded from file) Called from UMLApp::slotUpdateViews()
const QColor & UMLScene::fillColor | ( | ) | const |
Returns the fill color to use.
AssociationWidget * UMLScene::findAssocWidget | ( | Uml::AssociationType::Enum | at, |
UMLWidget * | pWidgetA, | ||
UMLWidget * | pWidgetB | ||
) |
Finds an association widget with the given type and widgets.
at | The AssociationType of the widget to find. |
pWidgetA | Pointer to the UMLWidget of role A. |
pWidgetB | Pointer to the UMLWidget of role B. |
AssociationWidget * UMLScene::findAssocWidget | ( | Uml::ID::Type | id | ) |
Finds an association widget with the given ID.
id | The ID of the widget to find. |
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.
pWidgetA | Pointer to the UMLWidget of role A. |
pWidgetB | Pointer to the UMLWidget of role B. |
roleNameB | Name at the B side of the association (the attribute name) |
|
protected |
Find the maximum bounding rectangle of FloatingTextWidget widgets. Auxiliary to copyAsImage().
ft | Pointer to the FloatingTextWidget widget to consider. |
px | X 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. |
py | Y 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. |
qx | X 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. |
qy | Y 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. |
UMLWidget * UMLScene::findWidget | ( | Uml::ID::Type | id | ) |
Finds a widget with the given ID. Search both our UMLWidget AND MessageWidget lists.
id | The ID of the widget to find. |
qreal UMLScene::fixX | ( | ) | const |
Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622
qreal UMLScene::fixY | ( | ) | const |
Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622
QFont UMLScene::font | ( | ) | const |
Returns the font to use
|
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.
int UMLScene::generateCollaborationId | ( | ) |
Used for creating unique name of collaboration messages.
bool UMLScene::getCreateObject | ( | ) | const |
Return whether we are currently creating an object.
void UMLScene::getDiagram | ( | QPainter & | painter, |
const QRectF & | source, | ||
const QRectF & | target = QRectF() |
||
) |
Paint diagram to the paint device
painter | the QPainter to which the diagram is painted |
source | the area of the diagram to copy |
target | the rect where to paint into |
void UMLScene::getDiagram | ( | QPixmap & | diagram, |
const QRectF & | rect | ||
) |
Returns the PNG picture of the paste operation.
diagram | the class to store PNG picture of the paste operation. |
rect | the area of the diagram to copy |
UMLWidget * UMLScene::getFirstMultiSelectedWidget | ( | ) | const |
Return pointer to the first selected widget (for multi-selection)
UMLViewImageExporter * UMLScene::getImageExporter | ( | ) |
Returns the imageExporter used to export the view.
bool UMLScene::getPaste | ( | ) | const |
Returns the status on whether in a paste state.
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.
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.
void UMLScene::getWidgetAssocs | ( | UMLObject * | Obj, |
AssociationWidgetList & | Associations | ||
) |
Fills Associations with all the associations that includes a widget related to object
const QColor & UMLScene::gridDotColor | ( | ) | const |
return grid dot color
void UMLScene::hideEvent | ( | QHideEvent * | he | ) |
Overrides the standard operation.
Uml::ID::Type UMLScene::ID | ( | ) | const |
Returns the ID of the diagram.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool UMLScene::isOpen | ( | ) | const |
Returns the open state.
bool UMLScene::isSavedInSeparateFile | ( | ) |
Returns true if this diagram resides in an externalized folder. CHECK: It is probably cleaner to move this to the UMLListViewItem.
|
inline |
bool UMLScene::isShowDocumentationIndicator | ( | ) | const |
Returns whether to show documentation indicator.
bool UMLScene::isSnapGridVisible | ( | ) | const |
Returns whether to show snap grid or not.
|
inline |
|
inline |
const QColor & UMLScene::lineColor | ( | ) | const |
Returns the line color to use.
uint UMLScene::lineWidth | ( | ) | const |
Returns the line width to use.
|
protected |
|
virtual |
Loads the "diagram" tag.
|
protected |
bool UMLScene::loadUISDiagram | ( | QDomElement & | qElement | ) |
Loads the "UISDiagram" tag of Unisys.IntegratePlus.2 generated files.
|
protected |
UMLWidget * UMLScene::loadWidgetFromXMI | ( | QDomElement & | widgetElement | ) |
Loads a "widget" element from XMI, used by loadFromXMI() and the clipboard.
|
protected |
|
protected |
Calls setSelected on the given UMLWidget and enters it into the m_selectedList while making sure it is there only once.
|
inline |
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.
MessageWidgetList UMLScene::messageList | ( | ) | const |
Returns the message list.
|
protected |
Override standard method. Calls the same method in the current tool bar state.
|
protected |
Overrides the standard operation. Calls the same method in the current tool bar state.
|
protected |
Override standard method. Calls the same method in the current tool bar state.
|
protected |
Overrides the standard operation. Calls the same method in the current tool bar state.
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
dX | The distance to move horizontally. |
dY | The distance to move vertically. |
QString UMLScene::name | ( | ) | const |
Return the name of the diagram.
ObjectWidget * UMLScene::onWidgetDestructionBox | ( | const QPointF & | point | ) | const |
Determine whether on a sequence diagram we have clicked on the destruction box of an Object.
ObjectWidget * UMLScene::onWidgetLine | ( | const QPointF & | point | ) | const |
Determine whether on a sequence diagram we have clicked on a line of an Object.
Settings::OptionState & UMLScene::optionState | ( | ) |
Returns the options being used.
QPointF UMLScene::pos | ( | ) | const |
Returns the position of the diagram.
void UMLScene::print | ( | QPrinter * | pPrinter, |
QPainter & | pPainter | ||
) |
Contains the implementation for printing functionality.
void UMLScene::removeAllAssociations | ( | ) |
Removes All the associations of the diagram
void UMLScene::removeAllWidgets | ( | ) |
Removes All the widgets of the diagram
void UMLScene::removeAssociations | ( | UMLWidget * | widget | ) |
Removes all the associations related to Widget.
widget | Pointer to the widget to remove. |
void UMLScene::removeAssocInViewAndDoc | ( | AssociationWidget * | a | ) |
Removes an AssociationWidget from the association list and removes the corresponding UMLAssociation from the current UMLDoc.
|
private |
Remove all widgets that have given widget as owner.
o | The owner widget that will be removed. |
void UMLScene::removeWidget | ( | AssociationWidget * | w | ) |
Remove an associationwidget from view (undo command)
w | The associationwidget to remove. |
void UMLScene::removeWidget | ( | UMLWidget * | o | ) |
Remove a widget from view (undo command)
o | The widget to remove. |
void UMLScene::removeWidgetCmd | ( | AssociationWidget * | pAssoc | ) |
Removes an AssociationWidget from a diagram Physically deletes the AssociationWidget passed in.
pAssoc | Pointer to the AssociationWidget. |
void UMLScene::removeWidgetCmd | ( | UMLWidget * | o | ) |
Remove a widget from view.
o | The widget to remove. |
void UMLScene::resetPastePoint | ( | ) |
Reset the paste point.
void UMLScene::resetToolbar | ( | ) |
Reset the toolbar.
void UMLScene::resizeSelection | ( | ) |
resize selected widgets
|
virtual |
Creates the "diagram" tag and fills it with the contents of the diagram.
void UMLScene::selectAll | ( | ) |
Selects all widgets
void UMLScene::selectAssociations | ( | bool | bSelect | ) |
Sets each association as selected if the widgets it associates are selected
bSelect | True to select, false for unselect |
AssociationWidgetList UMLScene::selectedAssociationWidgets | ( | ) | const |
Returns a list of selected association widgets
AssociationWidgetList UMLScene::selectedAssocs | ( | ) |
Returns a list with all the selected associations from the diagram
int UMLScene::selectedCount | ( | bool | filterText = false | ) | const |
Return the amount of widgets selected.
filterText | When true, do NOT count floating text widgets that belong to other widgets (i.e. only count TextRole::Floating.) Default: Count all widgets. |
UMLWidgetList UMLScene::selectedMessageWidgets | ( | ) | const |
Returns a list of selected message widgets
UMLWidgetList UMLScene::selectedWidgets | ( | ) | const |
Returns a list of selected widgets
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.
filterText | Don't append the text unless their role is TextRole::Floating |
void UMLScene::selectionSetFillColor | ( | const QColor & | color | ) |
Set the fill color for all the currently selected items.
void UMLScene::selectionSetFont | ( | const QFont & | font | ) |
Set the font for all the currently selected items.
void UMLScene::selectionSetLineColor | ( | const QColor & | color | ) |
Set the line color for all the currently selected items.
void UMLScene::selectionSetLineWidth | ( | uint | width | ) |
Set the line width for all the currently selected items.
void UMLScene::selectionSetVisualProperty | ( | ClassifierWidget::VisualProperty | property, |
bool | value | ||
) |
Set or unset the visual property (show ..) setting of all selected items.
void UMLScene::selectionUseFillColor | ( | bool | useFC | ) |
Set the useFillColor variable to all selected widgets
useFC | The state to set the widget to. |
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.
void UMLScene::selectWidgets | ( | qreal | px, |
qreal | py, | ||
qreal | qx, | ||
qreal | qy | ||
) |
Selects all the widgets within an internally kept rectangle.
void UMLScene::selectWidgets | ( | UMLWidgetList & | widgets | ) |
Selects all the widgets from a list.
void UMLScene::selectWidgetsOfAssoc | ( | AssociationWidget * | a | ) |
Selects all the widgets of the given association widget.
void UMLScene::setAutoIncrementSequence | ( | bool | state | ) |
void UMLScene::setClassWidgetOptions | ( | ClassOptionsPage * | page | ) |
Sets some options for all the ClassifierWidget on the view.
void UMLScene::setCreateObject | ( | bool | bCreate | ) |
Set whether we are currently creating an object.
void UMLScene::setDocumentation | ( | const QString & | doc | ) |
Set the documentation of the diagram.
void UMLScene::setFillColor | ( | const QColor & | color | ) |
Set the background color.
color | The color to use. |
void UMLScene::setFolder | ( | UMLFolder * | folder | ) |
void UMLScene::setFont | ( | QFont | font, |
bool | changeAllWidgets = false |
||
) |
Sets the font for the view and optionally all the widgets on the view.
void UMLScene::setGridDotColor | ( | const QColor & | color | ) |
set grid dot color
color | grid dot color |
void UMLScene::setID | ( | Uml::ID::Type | id | ) |
Sets the ID of the diagram.
void UMLScene::setIsOpen | ( | bool | isOpen | ) |
Sets the flag 'isOpen'.
isOpen | flag indicating that the diagram is shown to the user |
void UMLScene::setLineColor | ( | const QColor & | color | ) |
Sets the line color.
color | The color to use. |
void UMLScene::setLineWidth | ( | uint | width | ) |
Sets the line width.
width | The width to use. |
void UMLScene::setMenu | ( | const QPoint & | pos | ) |
void UMLScene::setName | ( | const QString & | name | ) |
Set the name of the diagram.
void UMLScene::setOptionState | ( | const Settings::OptionState & | options | ) |
Sets the options to be used.
void UMLScene::setPaste | ( | bool | paste | ) |
Sets the status on whether in a paste state.
void UMLScene::setPos | ( | const QPointF & | pos | ) |
Sets the position of the diagram.
void UMLScene::setShowDocumentationIndicator | ( | bool | bShow | ) |
sets whether to show documentation indicator.
void UMLScene::setShowOpSig | ( | bool | bShowOpSig | ) |
Sets whether to show operation signatures.
void UMLScene::setSnapComponentSizeToGrid | ( | bool | bSnap | ) |
Sets whether to snap to grid for component size.
void UMLScene::setSnapGridVisible | ( | bool | bShow | ) |
Sets whether to show snap grid.
Sets the grid size in x and y.
void UMLScene::setSnapToGrid | ( | bool | bSnap | ) |
Sets whether to snap to grid.
void UMLScene::setStartedCut | ( | ) |
Called by the view or any of its children when they start a cut operation.
void UMLScene::setTextColor | ( | const QColor & | color | ) |
Sets the text color.
color | The color to use. |
void UMLScene::setType | ( | Uml::DiagramType::Enum | type | ) |
Set the type of diagram.
void UMLScene::setupNewWidget | ( | UMLWidget * | w, |
bool | setPosition = true |
||
) |
Initialize and announce a newly created widget. Auxiliary to contentsMouseReleaseEvent().
void UMLScene::setUseFillColor | ( | bool | ufc | ) |
Sets whether to use the fill/background color
void UMLScene::setWidgetLink | ( | WidgetBase * | w | ) |
void UMLScene::showEvent | ( | QShowEvent * | se | ) |
Overrides the standard operation.
bool UMLScene::showOpSig | ( | ) | const |
Returns whether to show operation signatures.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
slot |
makes this view the active view by asking the document to show us
|
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.
|
slot |
When a menu selection has been made on the menu that this view created, this method gets called.
|
slot |
Slot called when an object is created.
o | created UML object |
|
slot |
Slot called when an object is removed.
o | removed UML object |
|
slot |
Called by menu when to show the instance of the view.
|
slot |
Changes the current tool to the selected tool. The current tool is cleaned and the selected tool initialized.
bool UMLScene::snapComponentSizeToGrid | ( | ) | const |
Return whether to use snap to grid for component size.
qreal UMLScene::snappedX | ( | qreal | _x | ) |
Returns the input coordinate with possible grid-snap applied.
qreal UMLScene::snappedY | ( | qreal | _y | ) |
Returns the input coordinate with possible grid-snap applied.
bool UMLScene::snapToGrid | ( | ) | const |
Return whether to use snap to grid.
int UMLScene::snapX | ( | ) | const |
Returns the x grid size.
int UMLScene::snapY | ( | ) | const |
Returns the y grid size.
const QColor & UMLScene::textColor | ( | ) | const |
Returns the text color to use.
void UMLScene::toggleShowGrid | ( | ) |
Changes show grid boolean. Called from menus.
void UMLScene::toggleSnapComponentSizeToGrid | ( | ) |
Changes snap to grid for component size boolean. Called from menus.
void UMLScene::toggleSnapToGrid | ( | ) |
Changes snap to grid boolean. Called from menus.
void UMLScene::triggerToolbarButton | ( | WorkToolBar::ToolBar_Buttons | button | ) |
DiagramType::Enum UMLScene::type | ( | ) | const |
Returns the type of the diagram.
|
private |
Unselect child widgets when their owner is already selected.
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().
x | If value is less than m_minX then m_minX is set to this value. |
y | If value is less than m_minY then m_minY is set to this value. |
w | If x plus this value is greater than m_maxX then m_maxX is set to their sum. |
h | If y plus this value is greater than m_maxY then m_maxY is set to their sum. |
|
protected |
Updates the size of all components in this view.
void UMLScene::updateContainment | ( | UMLCanvasObject * | self | ) |
Refreshes containment association, i.e. removes possible old containment and adds new containment association if applicable.
self | Pointer to the contained object for which the association to the containing object is recomputed. |
bool UMLScene::useFillColor | ( | ) | const |
Returns whether to use the fill/background color
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.
p | Point in scene coordinates to search for |
WidgetBase * UMLScene::widgetLink | ( | ) |
UMLWidgetList UMLScene::widgetList | ( | ) | const |
Returns the widget list.
UMLWidget * UMLScene::widgetOnDiagram | ( | Uml::ID::Type | id | ) |
Returns whether a widget is already on the diagram.
id | The id of the widget to check for. |
UMLWidget * UMLScene::widgetOnDiagram | ( | WidgetBase::WidgetType | type | ) |
Returns whether a widget is already on the diagram.
type | The type of the widget to check for. |
|
friend |
|
friend |
|
private |
state of auto increment sequence
|
protected |
|
protected |
|
protected |
|
private |
Status of a popupmenu on view. True - a popup is on view.
|
protected |
Flag if view/children started cut operation.
|
protected |
Flag to use snap to grid for component size. The default is off.
|
protected |
Flag to use snap to grid. The default is off.
|
private |
|
protected |
The documentation of the diagram.
|
private |
Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622.
|
private |
Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622.
|
private |
True if the view was activated after the deserialization(load).
|
protected |
Flag is set to true when diagram is open, i.e. shown to the user.
|
private |
layout grid in the background
|
private |
|
private |
Gather data for estimating required canvas size (used during loadFromXMI)
|
private |
|
private |
Gather data for estimating required canvas size (used during loadFromXMI)
|
protected |
The name of the diagram.
|
protected |
Used for creating unique name of collaboration messages.
|
protected |
The ID of the view. Allocated by UMLDoc.
|
protected |
Contains the unique ID to allocate to a widget that needs an ID for the view. ObjectWidget is an example of this.
|
protected |
Options used by view.
|
private |
The offset at which to paste the clipboard.
|
private |
LocalID Changes Log for paste actions.
|
private |
Used to export the view.
|
protected |
|
protected |
The type of diagram to represent.
|
private |
The view to which this scene is related.
|
staticprivate |
The default height of a diagram in pixels.
|
staticprivate |
The default width of a diagram in pixels.
|
staticprivate |
The maximum supported canvas size.
|
staticprivate |
Status of documentation indicator.