umbrello/umbrello
objectnodewidget.cpp
Go to the documentation of this file.
45 ObjectNodeWidget::ObjectNodeWidget(UMLScene * scene, ObjectNodeType objectNodeType, Uml::ID::Type id)
62 void ObjectNodeWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
89 painter->drawText(OBJECTNODE_MARGIN, (textStartY/2), w - OBJECTNODE_MARGIN * 2, fontHeight, Qt::AlignHCenter, "<< centralBuffer >>");
90 painter->drawText(OBJECTNODE_MARGIN, (textStartY/2) + fontHeight + 5, w - OBJECTNODE_MARGIN * 2, fontHeight, Qt::AlignHCenter, name());
96 painter->drawText(OBJECTNODE_MARGIN, (textStartY/2), w - OBJECTNODE_MARGIN * 2, fontHeight, Qt::AlignHCenter, "<< datastore >>");
97 painter->drawText(OBJECTNODE_MARGIN, (textStartY/2) + fontHeight + 5, w - OBJECTNODE_MARGIN * 2, fontHeight, Qt::AlignHCenter, name());
115 painter->drawText(OBJECTNODE_MARGIN, textStartY/2 - OBJECTNODE_MARGIN, w - OBJECTNODE_MARGIN * 2, fontHeight, Qt::AlignHCenter, name());
116 painter->drawText(OBJECTNODE_MARGIN, textStartY/2 + textStartY + OBJECTNODE_MARGIN, w - OBJECTNODE_MARGIN * 2, fontHeight, Qt::AlignHCenter, objectflow_value);
309 QString type = KInputDialog::getItem (i18n("Select Object node type"), i18n("Select the object node type"), list, current, false, &pressedOK, UMLApp::app());
315 Dialog_Utils::askNameForWidget(targetWidget, i18n("Enter the name of the data store node"), i18n("Enter the name of the data store node"), i18n("data store name"));
317 Dialog_Utils::askNameForWidget(targetWidget, i18n("Enter the name of the buffer node"), i18n("Enter the name of the buffer"), i18n("centralBuffer"));
319 Dialog_Utils::askNameForWidget(targetWidget, i18n("Enter the name of the object flow"), i18n("Enter the name of the object flow"), i18n("object flow"));
336 QString state = KInputDialog::getText(i18n("Enter Object Flow State"), i18n("Enter State (keep '-' if there is no state for the object) "), i18n("-"), &pressedOK, UMLApp::app());
This class is the graphical version of a UML Object Node.
Definition: objectnodewidget.h:28
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Overrides the standard paint event.
Definition: objectnodewidget.cpp:62
void slotMenuSelection(QAction *action)
Captures any popup menu signals for menus it created.
Definition: objectnodewidget.cpp:230
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Draws the UMLWidget on the given paint device.
Definition: umlwidget.cpp:1565
void showDocumentation(UMLObject *object, bool overwrite=false)
Called when a widget wishes to display its documentation in the doc window.
Definition: docwindow.cpp:87
Definition: objectnodewidget.h:36
void askNameForWidget(UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
Helper function for requesting a name for an UMLWidget using a dialog.
Definition: dialog_utils.cpp:64
virtual void showPropertiesDialog()
Show a properties dialog for an ObjectNodeWidget.
Definition: objectnodewidget.cpp:259
Definition: umlwidget.h:220
Definition: listpopupmenu.h:157
void updateDocumentation(bool clear=false, bool startup=false)
Call when you wish move changes in the doc window back into the members documentation.
Definition: docwindow.cpp:205
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType)
Returns the font metric used by this object for Text which uses bold/italic fonts.
Definition: umlwidget.cpp:1619
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:872
QString name() const
Gets the name from the corresponding UMLObject if this widget has an underlying UMLObject; if it does...
Definition: widgetbase.cpp:197
virtual bool loadFromXMI(QDomElement &qElement)
Loads the widget from the "objectnodewidget" XMI element.
Definition: objectnodewidget.cpp:288
virtual void slotMenuSelection(QAction *action)
This is usually called synchronously after menu.exec() and trigger's parent is always the ListPopupMe...
Definition: umlwidget.cpp:707
void setName(const QString &strName)
Sets the name in the corresponding UMLObject.
Definition: widgetbase.cpp:210
void askStateForWidget()
Open a dialog box to input the state of the widget.
Definition: objectnodewidget.cpp:333
ObjectNodeWidget(UMLScene *scene, ObjectNodeType objectNodeType=Normal, Uml::ID::Type id=Uml::ID::None)
Creates a Object Node widget.
Definition: objectnodewidget.cpp:45
virtual bool loadFromXMI(QDomElement &qElement)
A virtual method to load the properties of this widget from a QDomElement into this widget...
Definition: umlwidget.cpp:1726
void setModified(bool modified=true)
Sets the modified flag for the document after a modifying action on the view connected to the documen...
Definition: umldoc.cpp:2607
Definition: objectnodewidget.h:35
virtual void cleanup()
Used to cleanup any other widget it may need to delete.
Definition: umlwidget.cpp:1391
void askForObjectNodeType(UMLWidget *&targetWidget)
Open a dialog box to select the objectNode type (Data, Buffer or Flow).
Definition: objectnodewidget.cpp:303
Definition: objectnodewidget.h:38
Definition: objectnodewidget.h:37
void setObjectNodeType(ObjectNodeType objectNodeType)
Sets the type of object node.
Definition: objectnodewidget.cpp:196
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
A virtual method to save the properties of this widget into a QDomElement i.e xml.
Definition: umlwidget.cpp:1707
Definition: listpopupmenu.h:156
ObjectNodeType objectNodeType() const
Returns the type of object node.
Definition: objectnodewidget.cpp:171
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves the widget to the "objectnodewidget" XMI element.
Definition: objectnodewidget.cpp:274
static MenuType typeFromAction(QAction *action)
Convenience method to extract the ListPopupMenu type from an action.
Definition: listpopupmenu.cpp:1122
void setState(const QString &state)
Sets the state of an object node when it's an objectflow.
Definition: objectnodewidget.cpp:213
virtual QFont font() const
Returns the font used for diaplaying any text.
Definition: widgetbase.cpp:431
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.