• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

umbrello/umbrello

  • sources
  • kde-4.12
  • kdesdk
  • umbrello
  • umbrello
  • widgets
objectnodewidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This program is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU General Public License as published by *
4  * the Free Software Foundation; either version 2 of the License, or *
5  * (at your option) any later version. *
6  * *
7  * copyright (C) 2002-2013 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 #ifndef OBJECTNODEWIDGET_H
12 #define OBJECTNODEWIDGET_H
13 
14 #include "umlwidget.h"
15 
28 class ObjectNodeWidget : public UMLWidget
29 {
30  Q_OBJECT
31 
32 public:
33  enum ObjectNodeType
34  {
35  Normal,
36  Data,
37  Buffer,
38  Flow
39  };
40 
41  explicit ObjectNodeWidget(UMLScene * scene, ObjectNodeType objectNodeType = Normal, Uml::ID::Type id = Uml::ID::None);
42  virtual ~ObjectNodeWidget();
43 
44  virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
45 
46  ObjectNodeType objectNodeType() const;
47  ObjectNodeType objectNodeType(const QString& type) const;
48 
49  void setObjectNodeType(ObjectNodeType objectNodeType);
50  void setObjectNodeType(const QString& type) ;
51 
52  void setState(const QString& state);
53  QString state() const;
54 
55  virtual void showPropertiesDialog();
56 
57  void askStateForWidget();
58  void askForObjectNodeType(UMLWidget* &targetWidget);
59 
60  virtual void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
61  virtual bool loadFromXMI(QDomElement& qElement);
62 
63 protected:
64  QSizeF minimumSize();
65 
66 public slots:
67  void slotMenuSelection(QAction* action);
68  void slotOk();
69 
70 private:
71  ObjectNodeType m_objectNodeType;
72  QString m_state;
73 
74 };
75 
76 #endif
ObjectNodeWidget
This class is the graphical version of a UML Object Node.
Definition: objectnodewidget.h:28
ObjectNodeWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Overrides the standard paint event.
Definition: objectnodewidget.cpp:62
ObjectNodeWidget::slotMenuSelection
void slotMenuSelection(QAction *action)
Captures any popup menu signals for menus it created.
Definition: objectnodewidget.cpp:230
ObjectNodeWidget::Data
Definition: objectnodewidget.h:36
ObjectNodeWidget::showPropertiesDialog
virtual void showPropertiesDialog()
Show a properties dialog for an ObjectNodeWidget.
Definition: objectnodewidget.cpp:259
QWidget
ObjectNodeWidget::~ObjectNodeWidget
virtual ~ObjectNodeWidget()
Destructor.
Definition: objectnodewidget.cpp:55
ObjectNodeWidget::loadFromXMI
virtual bool loadFromXMI(QDomElement &qElement)
Loads the widget from the "objectnodewidget" XMI element.
Definition: objectnodewidget.cpp:288
ObjectNodeWidget::askStateForWidget
void askStateForWidget()
Open a dialog box to input the state of the widget.
Definition: objectnodewidget.cpp:333
ObjectNodeWidget::slotOk
void slotOk()
Definition: objectnodewidget.cpp:345
umlwidget.h
ObjectNodeWidget::ObjectNodeWidget
ObjectNodeWidget(UMLScene *scene, ObjectNodeType objectNodeType=Normal, Uml::ID::Type id=Uml::ID::None)
Creates a Object Node widget.
Definition: objectnodewidget.cpp:45
ObjectNodeWidget::Normal
Definition: objectnodewidget.h:35
ObjectNodeWidget::askForObjectNodeType
void askForObjectNodeType(UMLWidget *&targetWidget)
Open a dialog box to select the objectNode type (Data, Buffer or Flow).
Definition: objectnodewidget.cpp:303
ObjectNodeWidget::Flow
Definition: objectnodewidget.h:38
ObjectNodeWidget::Buffer
Definition: objectnodewidget.h:37
Uml::ID::Type
std::string Type
Definition: basictypes.h:317
ObjectNodeWidget::setObjectNodeType
void setObjectNodeType(ObjectNodeType objectNodeType)
Sets the type of object node.
Definition: objectnodewidget.cpp:196
ObjectNodeWidget::state
QString state() const
Returns the state of object node.
Definition: objectnodewidget.cpp:222
ObjectNodeWidget::minimumSize
QSizeF minimumSize()
Overrides method from UMLWidget.
Definition: objectnodewidget.cpp:127
ObjectNodeWidget::objectNodeType
ObjectNodeType objectNodeType() const
Returns the type of object node.
Definition: objectnodewidget.cpp:171
ObjectNodeWidget::saveToXMI
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves the widget to the "objectnodewidget" XMI element.
Definition: objectnodewidget.cpp:274
ObjectNodeWidget::ObjectNodeType
ObjectNodeType
Definition: objectnodewidget.h:33
ObjectNodeWidget::setState
void setState(const QString &state)
Sets the state of an object node when it's an objectflow.
Definition: objectnodewidget.cpp:213
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:319
UMLScene
UMLScene instances represent diagrams.
Definition: umlscene.h:70
UMLWidget
This is the base class for nearly all graphical widgets.
Definition: umlwidget.h:40
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

KDE's Doxygen guidelines are available online.

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal