|
umbrello 2.32.3
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
Common implementation for class widget and interface widget. More...
#include <classifierwidget.h>
Public Slots | |
| virtual void | slotMenuSelection (QAction *action) |
Public Slots inherited from UMLWidget | |
| virtual void | updateWidget () |
| virtual void | slotMenuSelection (QAction *action) |
| virtual void | slotWidgetMoved (Uml::ID::Type id) |
| virtual void | slotFillColorChanged (Uml::ID::Type viewID) |
| virtual void | slotLineColorChanged (Uml::ID::Type viewID) |
| virtual void | slotTextColorChanged (Uml::ID::Type viewID) |
| virtual void | slotLineWidthChanged (Uml::ID::Type viewID) |
| void | slotSnapToGrid () |
Public Slots inherited from WidgetBase | |
| virtual void | slotMenuSelection (QAction *trigger) |
Public Member Functions | |
| ClassifierWidget (UMLScene *scene, UMLClassifier *umlc) | |
| ClassifierWidget (UMLScene *scene, UMLInstance *umli) | |
| ClassifierWidget (UMLScene *scene, UMLPackage *o) | |
| virtual | ~ClassifierWidget () |
| UMLClassifier * | classifier () const |
| void | setShowStereotype (Uml::ShowStereoType::Enum flag) |
| VisualProperties | visualProperties () const |
| void | setVisualProperties (VisualProperties properties) |
| bool | visualProperty (VisualProperty property) const |
| void | setVisualProperty (VisualProperty property, bool enable=true) |
| void | setVisualPropertyCmd (VisualProperty property, bool enable=true) |
| void | toggleVisualProperty (VisualProperty property) |
| int | displayedAttributes () const |
| int | displayedOperations () const |
| Uml::SignatureType::Enum | attributeSignature () const |
| void | setAttributeSignature (Uml::SignatureType::Enum sig) |
| Uml::SignatureType::Enum | operationSignature () const |
| void | setOperationSignature (Uml::SignatureType::Enum sig) |
| void | setShowAttSigs (bool _show) |
| void | toggleShowAttSigs () |
| bool | getDrawAsCircle () const |
| void | setDrawAsCircle (bool drawAsCircle) |
| void | toggleDrawAsCircle () |
| void | changeToClass () |
| void | changeToInterface () |
| void | changeToPackage () |
| AssociationWidget * | classAssociationWidget () const |
| void | setClassAssociationWidget (AssociationWidget *assocwidget) |
| UMLWidget * | onWidget (const QPointF &p) |
| UMLWidget * | widgetWithID (Uml::ID::Type id) |
| virtual void | setDocumentation (const QString &doc) |
| QSizeF | calculateSize (bool withExtensions=true) const |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| virtual QPainterPath | shape () const |
| virtual void | saveToXMI1 (QXmlStreamWriter &writer) |
| virtual bool | loadFromXMI1 (QDomElement &qElement) |
| virtual bool | showPropertiesDialog () |
| void | setUMLObject (UMLObject *obj) |
Public Member Functions inherited from UMLWidget | |
| UMLWidget (UMLScene *scene, WidgetType type=wt_UMLWidget, UMLObject *o=0) | |
| UMLWidget (UMLScene *scene, WidgetType type=wt_UMLWidget, Uml::ID::Type id=Uml::ID::None) | |
| virtual | ~UMLWidget () |
| UMLWidget & | operator= (const UMLWidget &other) |
| bool | operator== (const UMLWidget &other) const |
| virtual QSizeF | minimumSize () const |
| void | setMinimumSize (const QSizeF &size) |
| virtual QSizeF | maximumSize () |
| void | setMaximumSize (const QSizeF &size) |
| virtual void | setUseFillColor (bool fc) |
| void | setUseFillColorCmd (bool fc) |
| virtual void | setTextColor (const QColor &color) |
| void | setTextColorCmd (const QColor &color) |
| virtual void | setLineColor (const QColor &color) |
| virtual void | setLineColorCmd (const QColor &color) |
| virtual void | setLineWidth (uint width) |
| void | setLineWidthCmd (uint width) |
| virtual void | setFillColor (const QColor &color) |
| void | setFillColorCmd (const QColor &color) |
| void | setSelectedFlag (bool _select) |
| virtual void | setSelected (bool _select) |
| void | setScene (UMLScene *scene) |
| virtual bool | activate (IDChangeLog *changeLog=0) |
| void | setPenFromSettings (QPainter &p) |
| void | setPenFromSettings (QPainter *p) |
| virtual void | setFont (const QFont &font) |
| void | setFontCmd (const QFont &font) |
| bool | getStartMove () const |
| virtual qreal | getX () const |
| virtual qreal | getY () const |
| virtual QPointF | getPos () const |
| virtual void | setX (qreal x) |
| virtual void | setY (qreal y) |
| qreal | height () const |
| qreal | width () const |
| void | setSize (qreal width, qreal height) |
| void | setSize (const QSizeF &size) |
| virtual void | resizeWidget (qreal newW, qreal newH) |
| virtual void | notifyParentResize () |
| bool | getIgnoreSnapToGrid () const |
| void | setIgnoreSnapToGrid (bool to) |
| void | moveByLocal (qreal dx, qreal dy) |
| virtual void | removeAssoc (AssociationWidget *pAssoc) |
| virtual void | addAssoc (AssociationWidget *pAssoc) |
| AssociationWidgetList & | associationWidgetList () const |
| bool | isInstance () const |
| void | setIsInstance (bool isInstance) |
| void | setInstanceName (const QString &instanceName) |
| QString | instanceName () const |
| Uml::ShowStereoType::Enum | showStereotype () const |
| virtual void | setShowStereotype (Uml::ShowStereoType::Enum flag) |
| QString | tags () const |
| virtual bool | showPropertiesDialog () |
| virtual void | adjustAssocs (qreal dx, qreal dy) |
| virtual void | adjustUnselectedAssocs (qreal dx, qreal dy) |
| bool | isActivated () const |
| void | setActivated (bool active=true) |
| virtual void | cleanup () |
| void | updateGeometry (bool withAssocs=true) |
| void | clipSize () |
| void | forceUpdateFontMetrics (QPainter *painter) |
| void | forceUpdateFontMetrics (QFont &font, QPainter *painter) |
| virtual bool | loadFromXMI1 (QDomElement &qElement) |
| virtual void | saveToXMI1 (QXmlStreamWriter &writer) |
| QPointF | startMovePosition () const |
| void | setStartMovePosition (const QPointF &position) |
| QSizeF | startResizeSize () const |
| virtual QSizeF | calculateSize (bool withExtensions=true) const |
| void | resize () |
| bool | fixedAspectRatio () const |
| void | setFixedAspectRatio (bool state) |
| bool | resizable () const |
| void | setResizable (bool state) |
| virtual void | setDefaultFontMetrics (QFont &font, UMLWidget::FontType fontType) |
| virtual void | setDefaultFontMetrics (QFont &font, UMLWidget::FontType fontType, QPainter &painter) |
| QFontMetrics & | getFontMetrics (UMLWidget::FontType fontType) const |
| void | setFontMetrics (UMLWidget::FontType fontType, QFontMetrics fm) |
| void | setupFontType (QFont &font, UMLWidget::FontType fontType) |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
Public Member Functions inherited from WidgetBase | |
| WidgetBase (UMLScene *scene, WidgetType type=wt_UMLWidget, Uml::ID::Type id=Uml::ID::None) | |
| virtual | ~WidgetBase () |
| UMLObject * | umlObject () const |
| virtual void | setUMLObject (UMLObject *obj) |
| Uml::ID::Type | id () const |
| void | setID (Uml::ID::Type id) |
| void | setLocalID (Uml::ID::Type id) |
| Uml::ID::Type | localID () const |
| virtual UMLWidget * | widgetWithID (Uml::ID::Type id) |
| WidgetType | baseType () const |
| void | setBaseType (const WidgetType &baseType) |
| QLatin1String | baseTypeStr () const |
| QString | baseTypeStrWithoutPrefix () const |
| virtual void | setSelected (bool select) |
| UMLScene * | umlScene () const |
| UMLDoc * | umlDoc () const |
| QString | documentation () const |
| bool | hasDocumentation () |
| virtual void | setDocumentation (const QString &doc) |
| QString | name () const |
| virtual void | setName (const QString &strName) |
| QColor | lineColor () const |
| virtual void | setLineColor (const QColor &color) |
| uint | lineWidth () const |
| virtual void | setLineWidth (uint width) |
| QColor | textColor () const |
| virtual void | setTextColor (const QColor &color) |
| QColor | fillColor () const |
| virtual void | setFillColor (const QColor &color) |
| bool | usesDiagramLineColor () const |
| void | setUsesDiagramLineColor (bool state) |
| bool | usesDiagramLineWidth () const |
| void | setUsesDiagramLineWidth (bool state) |
| bool | useFillColor () |
| virtual void | setUseFillColor (bool state) |
| bool | usesDiagramTextColor () const |
| void | setUsesDiagramTextColor (bool state) |
| bool | usesDiagramFillColor () const |
| void | setUsesDiagramFillColor (bool state) |
| bool | usesDiagramUseFillColor () const |
| void | setUsesDiagramUseFillColor (bool state) |
| virtual QFont | font () const |
| virtual void | setFont (const QFont &font) |
| bool | autoResize () |
| void | setAutoResize (bool state) |
| bool | changesShape () |
| void | setChangesShape (bool state) |
| virtual bool | showPropertiesDialog () |
| virtual bool | loadFromXMI1 (QDomElement &qElement) |
| virtual void | saveToXMI1 (QXmlStreamWriter &writer) |
| virtual void | removeAssoc (AssociationWidget *pAssoc) |
| virtual void | addAssoc (AssociationWidget *pAssoc) |
| WidgetBase & | operator= (const WidgetBase &other) |
| QRectF | rect () const |
| void | setRect (const QRectF &rect) |
| void | setRect (qreal x, qreal y, qreal width, qreal height) |
| virtual QRectF | boundingRect () const |
| virtual UMLWidget * | onWidget (const QPointF &p) |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| bool | isActivityWidget () const |
| bool | isActorWidget () const |
| bool | isArtifactWidget () const |
| bool | isAssociationWidget () const |
| bool | isBoxWidget () const |
| bool | isCategoryWidget () const |
| bool | isClassWidget () const |
| bool | isCombinedFragmentWidget () const |
| bool | isComponentWidget () const |
| bool | isDatatypeWidget () const |
| bool | isEntityWidget () const |
| bool | isEnumWidget () const |
| bool | isFloatingDashLineWidget () const |
| bool | isForkJoinWidget () const |
| bool | isInterfaceWidget () const |
| bool | isMessageWidget () const |
| bool | isNodeWidget () const |
| bool | isNoteWidget () const |
| bool | isObjectNodeWidget () const |
| bool | isObjectWidget () const |
| bool | isPackageWidget () const |
| bool | isPinWidget () const |
| bool | isPortWidget () const |
| bool | isPreconditionWidget () const |
| bool | isRegionWidget () const |
| bool | isSignalWidget () const |
| bool | isStateWidget () const |
| bool | isTextWidget () const |
| bool | isUseCaseWidget () const |
| ActivityWidget * | asActivityWidget () |
| ActorWidget * | asActorWidget () |
| ArtifactWidget * | asArtifactWidget () |
| AssociationWidget * | asAssociationWidget () |
| BoxWidget * | asBoxWidget () |
| CategoryWidget * | asCategoryWidget () |
| ClassifierWidget * | asClassifierWidget () |
| CombinedFragmentWidget * | asCombinedFragmentWidget () |
| ComponentWidget * | asComponentWidget () |
| DatatypeWidget * | asDatatypeWidget () |
| EntityWidget * | asEntityWidget () |
| EnumWidget * | asEnumWidget () |
| FloatingDashLineWidget * | asFloatingDashLineWidget () |
| ForkJoinWidget * | asForkJoinWidget () |
| InterfaceWidget * | asInterfaceWidget () |
| MessageWidget * | asMessageWidget () |
| NodeWidget * | asNodeWidget () |
| NoteWidget * | asNoteWidget () |
| ObjectNodeWidget * | asObjectNodeWidget () |
| ObjectWidget * | asObjectWidget () |
| PackageWidget * | asPackageWidget () |
| PinWidget * | asPinWidget () |
| PinPortBase * | asPinPortBase () |
| PortWidget * | asPortWidget () |
| PreconditionWidget * | asPreconditionWidget () |
| RegionWidget * | asRegionWidget () |
| SignalWidget * | asSignalWidget () |
| StateWidget * | asStateWidget () |
| FloatingTextWidget * | asFloatingTextWidget () |
| UseCaseWidget * | asUseCaseWidget () |
| UMLWidget * | asUMLWidget () |
| virtual bool | activate (IDChangeLog *changeLog=0) |
| virtual void | setSelected (bool state) |
Public Member Functions inherited from DiagramProxyWidget | |
| DiagramProxyWidget (UMLWidget *widget, qreal borderWidth=5) | |
| virtual | ~DiagramProxyWidget () |
| Uml::ID::Type | diagramLink () const |
| UMLScene * | linkedDiagram () const |
| bool | setDiagramLink (const Uml::ID::Type &id) |
| const QRectF & | clientRect () |
| const QRectF & | sceneRect () |
| void | setClientRect (const QRectF &rect) |
| bool | isProxyWidget () |
| UMLWidget * | getProxiedWidget (const QPointF &p) |
| QPointF | mapFromClient (const QPointF &p) |
| QRectF | mapFromClient (const QRectF &r) |
| QPointF | mapToClient (const QPointF &pos) |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| bool | showLinkedDiagram () const |
| void | setShowLinkedDiagram (bool showLinkedDiagram) |
| QRectF | iconRect () const |
| void | setIconRect (const QRectF &iconRect) |
Protected Member Functions | |
| virtual void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) |
Protected Member Functions inherited from UMLWidget | |
| virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
| virtual void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | moveEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | moveWidgetBy (qreal diffX, qreal diffY) |
| virtual void | constrainMovementForAllWidgets (qreal &diffX, qreal &diffY) |
| virtual void | constrain (qreal &width, qreal &height) |
| virtual bool | isInResizeArea (QGraphicsSceneMouseEvent *me) |
| virtual QCursor | resizeCursor () const |
| void | selectSingle (QGraphicsSceneMouseEvent *me) |
| void | selectMultiple (QGraphicsSceneMouseEvent *me) |
| void | deselect (QGraphicsSceneMouseEvent *me) |
| void | setSelectionBounds () |
| void | resize (QGraphicsSceneMouseEvent *me) |
| bool | wasSizeChanged () |
| bool | wasPositionChanged () |
| virtual void | toForeground () |
| void | addConnectedWidget (UMLWidget *widget, Uml::AssociationType::Enum type=Uml::AssociationType::Association, AddWidgetOptions options=Default) |
| void | addConnectedUMLObject (UMLObject::ObjectType otype, Uml::AssociationType::Enum type) |
| void | addWidget (UMLWidget *widget, bool showProperties=true) |
| virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
Protected Member Functions inherited from QGraphicsObjectWrapper | |
| QVariant | itemChange (GraphicsItemChange change, const QVariant &value) |
Protected Member Functions inherited from DiagramProxyWidget | |
| DiagramProxyWidget & | operator= (const DiagramProxyWidget &other) |
| bool | activate (IDChangeLog *changeLog=0) |
| bool | loadFromXMI1 (QDomElement &qElement) |
| void | saveToXMI1 (QXmlStreamWriter &writer) |
| void | setupEvent (QGraphicsSceneMouseEvent &e, QGraphicsSceneMouseEvent *event, const QPointF &pos) |
| void | setupEvent (QGraphicsSceneContextMenuEvent &e, QGraphicsSceneContextMenuEvent *event, const QPointF &pos) |
| virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
| virtual void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| void | slotMenuSelection (QAction *action) |
Private Slots | |
| void | slotShowAttributes (bool state) |
| void | slotShowOperations (bool state) |
Private Member Functions | |
| void | updateSignatureTypes () |
| QSize | calculateTemplatesBoxSize () const |
| QSizeF | minimumSize () const |
| void | drawAsCircle (QPainter *p, const QStyleOptionGraphicsItem *option) |
| QSize | calculateAsCircleSize () const |
| void | drawAsPackage (QPainter *painter, const QStyleOptionGraphicsItem *option) |
| QSize | calculateAsPackageSize () const |
| int | displayedMembers (UMLObject::ObjectType ot) const |
| void | drawMembers (QPainter *painter, UMLObject::ObjectType ot, Uml::SignatureType::Enum sigType, int x, int y, int textWidth, int fontHeight) |
Private Attributes | |
| VisualProperties | m_visualProperties |
| Uml::SignatureType::Enum | m_attributeSignature |
| Loaded/saved item. More... | |
| Uml::SignatureType::Enum | m_operationSignature |
| Loaded/saved item. More... | |
| AssociationWidget * | m_pAssocWidget |
| related AssociationWidget in case this classifier acts as an association class More... | |
| QPointer< FloatingTextWidget > | m_pInterfaceName |
| Separate widget for name in case of interface drawn as circle. More... | |
Static Private Attributes | |
| static const int | CIRCLE_SIZE = 30 |
| size of circle when interface is rendered as such More... | |
| static const int | SOCKET_INCREMENT = 10 |
| augmentation of circle for socket (required interface) More... | |
Additional Inherited Members | |
Signals inherited from UMLWidget | |
| void | sigWidgetMoved (Uml::ID::Type id) |
Static Public Member Functions inherited from WidgetBase | |
| static QString | toString (WidgetType wt) |
| static QString | toI18nString (WidgetType wt) |
| static Icon_Utils::IconType | toIcon (WidgetType wt) |
| static bool | widgetHasUMLObject (WidgetBase::WidgetType type) |
Static Public Attributes inherited from UMLWidget | |
| static const QSizeF | DefaultMinimumSize |
| static const QSizeF | DefaultMaximumSize |
| static const int | defaultMargin = 5 |
| static const int | selectionMarkerSize = 4 |
| static const int | resizeMarkerLineCount = 3 |
Protected Attributes inherited from UMLWidget | |
| QString | m_instanceName |
| instance name (used if on a deployment diagram) More... | |
| bool | m_isInstance |
| holds whether this widget is a component instance (i.e. on a deployment diagram) More... | |
| Uml::ShowStereoType::Enum | m_showStereotype |
| if and how the stereotype should be displayed More... | |
| bool | m_startMove |
| QPointF | m_startMovePostion |
| QSizeF | m_startResizeSize |
| int | m_nPosX |
| UMLDoc * | m_doc |
| shortcut for UMLApp::app()->document() More... | |
| bool | m_resizable |
| QFontMetrics * | m_pFontMetrics [FT_INVALID] |
| QSizeF | m_minimumSize |
| QSizeF | m_maximumSize |
| bool | m_activated |
| true if the activate function has been called for this class instance More... | |
| bool | m_ignoreSnapToGrid |
| bool | m_ignoreSnapComponentSizeToGrid |
| bool | m_fixedAspectRatio |
| QString | m_oldStatusBarMsg |
| The text in the status bar when the cursor was pressed. More... | |
| QPointF | m_pressOffset |
| QPointF | m_oldPos |
| The X/Y position the widget had when the movement started. More... | |
| qreal | m_oldW |
| The width/height the widget had when the resize started. More... | |
| qreal | m_oldH |
| bool | m_shiftPressed |
| If shift or control button were pressed in mouse press event. More... | |
| bool | m_inMoveArea |
| bool | m_inResizeArea |
| bool | m_moved |
| bool | m_resized |
Protected Attributes inherited from WidgetBase | |
| UMLScene * | m_scene |
| QPointer< UMLObject > | m_umlObject |
| QString | m_Doc |
| Only used if m_umlObject is not set. More... | |
| QString | m_Text |
| QRectF | m_rect |
| widget size More... | |
| Uml::ID::Type | m_nId |
| Uml::ID::Type | m_nLocalID |
| QColor | m_textColor |
| Color of the text of the widget. Is saved to XMI. More... | |
| QColor | m_lineColor |
| Color of the lines of the widget. Is saved to XMI. More... | |
| QColor | m_fillColor |
| color of the background of the widget More... | |
| QBrush | m_brush |
| QFont | m_font |
| uint | m_lineWidth |
| Width of the lines of the widget. Is saved to XMI. More... | |
| bool | m_useFillColor |
| flag indicates if the UMLWidget uses the Diagram FillColour More... | |
| bool | m_usesDiagramFillColor |
| bool | m_usesDiagramLineColor |
| bool | m_usesDiagramLineWidth |
| bool | m_usesDiagramTextColor |
| bool | m_usesDiagramUseFillColor |
| bool | m_autoResize |
| bool | m_changesShape |
| The widget changes its shape when the number of connections or their positions are changed. More... | |
Protected Attributes inherited from QGraphicsObjectWrapper | |
| bool | m_calledFromItemChange {false} |
Common implementation for class widget and interface widget.
This enumeration lists the visual properties that can be easily set, reset and toggled and all these operate on an integer which stores all the flag status.
| ClassifierWidget::ClassifierWidget | ( | UMLScene * | scene, |
| UMLClassifier * | umlc | ||
| ) |
Constructs a ClassifierWidget for a UMLClassifier.
| scene | The parent of this ClassifierWidget. |
| umlc | The UMLClassifier to represent. |
| ClassifierWidget::ClassifierWidget | ( | UMLScene * | scene, |
| UMLInstance * | umli | ||
| ) |
Constructs a ClassifierWidget for a UMLInstance.
| scene | The parent of this ClassifierWidget. |
| umli | The UMLInstance to represent. |
| ClassifierWidget::ClassifierWidget | ( | UMLScene * | scene, |
| UMLPackage * | o | ||
| ) |
Constructs a ClassifierWidget for a UMLPackage.
| scene | The parent of this ClassifierWidget. |
| o | The UMLPackage to represent. |
|
virtual |
Destructor.
| Uml::SignatureType::Enum ClassifierWidget::attributeSignature | ( | ) | const |
Returns whether to show attribute signatures. Only applies when m_umlObject->getBaseType() is ot_Class.
|
private |
Calculates the size of the object when drawn as a circle. Only applies when m_umlObject->getBaseType() is ot_Interface.
|
private |
|
virtual |
|
private |
Calculcates the size of the templates box in the top left if it exists, returns QSize(0, 0) if it doesn't.
| void ClassifierWidget::changeToClass | ( | ) |
Changes this classifier from an interface to a class. Attributes and stereotype visibility is got from the view OptionState. This widget is also updated.
| void ClassifierWidget::changeToInterface | ( | ) |
Changes this classifier from a class to an interface. Attributes are hidden and stereotype is shown. This widget is also updated.
| void ClassifierWidget::changeToPackage | ( | ) |
Changes this classifier from an "class-or-package" to a package. This widget is also updated.
| AssociationWidget * ClassifierWidget::classAssociationWidget | ( | ) | const |
Return the AssociationWidget when this classifier acts as an association class (else return NULL.)
| UMLClassifier * ClassifierWidget::classifier | ( | ) | const |
Return the UMLClassifier which this ClassifierWidget represents.
| int ClassifierWidget::displayedAttributes | ( | ) | const |
Return the number of displayed attributes.
|
private |
Return the number of displayed members of the given ObjectType. Takes into consideration m_showPublicOnly but not other settings.
| int ClassifierWidget::displayedOperations | ( | ) | const |
Return the number of displayed operations.
|
private |
Draws the interface as a circle. Only applies when m_umlObject->getBaseType() is ot_Interface.
|
private |
|
private |
Auxiliary method for draw() of child classes: Draw the attributes or operations.
| p | QPainter to paint to. |
| ot | Object type to draw, either ot_Attribute or ot_Operation. |
| sigType | Governs details of the member display. |
| x | X coordinate at which to draw the texts. |
| y | Y coordinate at which text drawing commences. |
| width | The text width. |
| height | The text height. |
| bool ClassifierWidget::getDrawAsCircle | ( | ) | const |
Returns whether to draw as circle. Only applies when m_umlObject->getBaseType() is ot_Interface.
|
virtual |
Loads the "classwidget" or "interfacewidget" XML element.
Reimplemented from UMLWidget.
|
privatevirtual |
|
protectedvirtual |
Event handler for mouse double click events.
| event | the QGraphicsSceneMouseEvent event. |
Reimplemented from UMLWidget.
|
virtual |
Override method from UMLWidget in order to additionally check m_pInterfaceName.
| p | Point to be checked. |
Reimplemented from WidgetBase.
| Uml::SignatureType::Enum ClassifierWidget::operationSignature | ( | ) | const |
|
virtual |
Overrides standard method. Auxiliary to reimplementations in the derived classes.
Reimplemented from UMLWidget.
|
virtual |
Creates the "classwidget" or "interfacewidget" XML element.
Reimplemented from UMLWidget.
| void ClassifierWidget::setAttributeSignature | ( | Uml::SignatureType::Enum | sig | ) |
Sets the type of signature to display for an attribute. Only applies when m_umlObject->getBaseType() is ot_Class.
| sig | Type of signature to display for an attribute. |
| void ClassifierWidget::setClassAssociationWidget | ( | AssociationWidget * | assocwidget | ) |
Set the AssociationWidget when this ClassWidget acts as an association class.
|
virtual |
Used by some child classes to set documentation.
| doc | The documentation to be set in the UMLObject (if m_umlObject is set.) |
Reimplemented from WidgetBase.
| void ClassifierWidget::setDrawAsCircle | ( | bool | drawAsCircle | ) |
Sets whether to draw as circle. Only applies when m_umlObject->getBaseType() is ot_Interface.
| drawAsCircle | True if widget shall be drawn as circle. |
| void ClassifierWidget::setOperationSignature | ( | Uml::SignatureType::Enum | sig | ) |
Set the type of signature to display for an Operation
| sig | Type of signature to display for an operation. |
| void ClassifierWidget::setShowAttSigs | ( | bool | _status | ) |
Sets whether to show attribute signature Only applies when m_umlObject->getBaseType() is ot_Class.
| _status | True if attribute signatures shall be shown. |
|
virtual |
|
virtual |
Overriding the method from WidgetBase because we need to do something extra in case this ClassifierWidget represents an interface widget used in component diagrams.
Reimplemented from WidgetBase.
| void ClassifierWidget::setVisualProperties | ( | VisualProperties | properties | ) |
Set an OR combination of properties stored in properties on this widget.
| void ClassifierWidget::setVisualProperty | ( | VisualProperty | property, |
| bool | enable = true |
||
| ) |
A convenient method to set and reset individual VisualProperty
Undo command.
| property | The property to be set/reset. |
| enable | True/false to set/reset. (default = true) |
| void ClassifierWidget::setVisualPropertyCmd | ( | VisualProperty | property, |
| bool | enable = true |
||
| ) |
A convenient method to set and reset individual VisualProperty
| property | The property to be set/reset. |
| enable | True/false to set/reset. (default = true) |
|
virtual |
|
virtual |
Show a properties dialog for a ClassifierWidget
Reimplemented from UMLWidget.
|
virtualslot |
Will be called when a menu selection has been made from the popup menu.
| action | The action that has been selected. |
|
privateslot |
Slot to show/hide attributes based on state.
|
privateslot |
Slot to show/hide operations based on state.
| void ClassifierWidget::toggleDrawAsCircle | ( | ) |
Toggles whether to draw as circle. Only applies when m_umlObject->getBaseType() is ot_Interface.
| void ClassifierWidget::toggleShowAttSigs | ( | ) |
Toggles whether to show attribute signatures. Only applies when m_umlObject->getBaseType() is ot_Class.
| void ClassifierWidget::toggleVisualProperty | ( | VisualProperty | property | ) |
A convenient method to toggle individual VisualProperty of this widget.
| property | The property to be toggled. |
|
private |
Updates m_operationSignature to match m_showVisibility.
| ClassifierWidget::VisualProperties ClassifierWidget::visualProperties | ( | ) | const |
| bool ClassifierWidget::visualProperty | ( | VisualProperty | property | ) | const |
|
virtual |
Reimplement function from UMLWidget.
Reimplemented from WidgetBase.
|
staticprivate |
size of circle when interface is rendered as such
|
private |
Loaded/saved item.
|
private |
Loaded/saved item.
|
private |
related AssociationWidget in case this classifier acts as an association class
|
private |
Separate widget for name in case of interface drawn as circle.
|
private |
|
staticprivate |
augmentation of circle for socket (required interface)