umbrello/umbrello
#include <toolbarstateassociation.h>
Public Slots | |
virtual void | slotWidgetRemoved (UMLWidget *widget) |
Public Slots inherited from ToolBarState | |
virtual void | slotAssociationRemoved (AssociationWidget *association) |
virtual void | slotWidgetRemoved (UMLWidget *widget) |
Public Member Functions | |
ToolBarStateAssociation (UMLScene *umlScene) | |
virtual | ~ToolBarStateAssociation () |
virtual void | cleanBeforeChange () |
virtual void | init () |
virtual void | mouseMove (QGraphicsSceneMouseEvent *ome) |
Public Member Functions inherited from ToolBarStatePool | |
virtual | ~ToolBarStatePool () |
WorkToolBar::ToolBar_Buttons | getButton () const |
void | setButton (const WorkToolBar::ToolBar_Buttons &button) |
Public Member Functions inherited from ToolBarState | |
virtual | ~ToolBarState () |
virtual void | mouseDoubleClick (QGraphicsSceneMouseEvent *ome) |
virtual void | mousePress (QGraphicsSceneMouseEvent *ome) |
virtual void | mouseRelease (QGraphicsSceneMouseEvent *ome) |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Protected Member Functions | |
virtual void | mouseReleaseAssociation () |
virtual void | mouseReleaseEmpty () |
virtual void | mouseReleaseWidget () |
Protected Member Functions inherited from ToolBarStatePool | |
ToolBarStatePool (UMLScene *umlScene) | |
Protected Member Functions inherited from ToolBarState | |
ToolBarState (UMLScene *umlScene) | |
AssociationWidget * | associationAt (const QPointF &pos) |
virtual void | changeTool () |
virtual AssociationWidget * | currentAssociation () const |
virtual UMLWidget * | currentWidget () const |
FloatingDashLineWidget * | floatingLineAt (const QPointF &pos) |
MessageWidget * | messageAt (const QPointF &pos) |
virtual void | mouseDoubleClickAssociation () |
virtual void | mouseDoubleClickEmpty () |
virtual void | mouseDoubleClickWidget () |
virtual void | mouseMoveAssociation () |
virtual void | mouseMoveEmpty () |
virtual void | mouseMoveWidget () |
virtual void | mousePressAssociation () |
virtual void | mousePressEmpty () |
virtual void | mousePressWidget () |
virtual void | setCurrentAssociation (AssociationWidget *association) |
virtual void | setCurrentElement () |
virtual void | setCurrentWidget (UMLWidget *widget) |
void | setMouseEvent (QGraphicsSceneMouseEvent *ome, const QEvent::Type &type) |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Protected Attributes inherited from ToolBarState | |
QGraphicsSceneMouseEvent * | m_pMouseEvent |
UMLScene * | m_pUMLScene |
Properties inherited from QObject | |
objectName | |
Detailed Description
Association tool to create associations between widgets.
With association tool, two widgets are selected clicking with left button on them and an association of the needed type (depending on the association button selected) is created between the widgets. When the first widget is selected, a temporal visual association that follows the cursor movement is created until the second widget is selected or the association cancelled.
Also, association tool can create association class: a classifier widget which is linked to an association. To do this, the classifier must be selected first and then the association must be selected. The association can't be selected first.
An association can be cancelled using right button, which also returns to default tool, or with middle button, which only cancels the association without changing the tool being used.
- Todo:
- refactor with common code in ToolBarStateMessages?
Definition at line 38 of file toolbarstateassociation.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new ToolBarStateAssociation.
- Parameters
-
umlScene The UMLScene to use.
Definition at line 40 of file toolbarstateassociation.cpp.
|
virtual |
Destroys this ToolBarStateAssociation.
Deletes the association line.
Definition at line 51 of file toolbarstateassociation.cpp.
Member Function Documentation
|
virtual |
Called when the current tool is changed to use another tool.
Executes base method and cleans the association.
Reimplemented from ToolBarState.
Definition at line 69 of file toolbarstateassociation.cpp.
|
virtual |
Goes back to the initial state.
Reimplemented from ToolBarState.
Definition at line 59 of file toolbarstateassociation.cpp.
|
virtual |
Called when a mouse event happened.
It executes the base method and then updates the position of the association line, if any.
Reimplemented from ToolBarState.
Definition at line 80 of file toolbarstateassociation.cpp.
|
protectedvirtual |
Called when the release event happened on an association.
If the button pressed isn't left button, the association being created is cleaned. If it is left button, and the first widget is set and is a classifier widget, it creates an association class. Otherwise, the association being created is cleaned.
Reimplemented from ToolBarState.
Definition at line 112 of file toolbarstateassociation.cpp.
|
protectedvirtual |
Called when the release event happened on an empty space.
Cleans the association.
Reimplemented from ToolBarState.
Definition at line 159 of file toolbarstateassociation.cpp.
|
protectedvirtual |
Called when the release event happened on a widget.
If the button pressed isn't left button, the association is cleaned. If it is left button, sets the first widget or the second, depending on whether the first widget is already set or not.
Reimplemented from ToolBarState.
Definition at line 133 of file toolbarstateassociation.cpp.
|
virtualslot |
A widget was removed from the UMLScene.
If the widget removed was the current widget, the current widget is set to 0. Also, if it was the first widget, the association is cleaned.
Definition at line 96 of file toolbarstateassociation.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.