umbrello/umbrello
ActivityWidget Class Reference
This class is the graphical version of a UML Activity. More...
#include <activitywidget.h>

Public Types | |
| enum | ActivityType { Initial = 0, Normal, End, Final, Branch, Invok, Param } |
Public Slots | |
| void | slotMenuSelection (QAction *action) |
Public Member Functions | |
| ActivityWidget (UMLView *view, ActivityType activityType=Normal, Uml::IDType id=Uml::id_None) | |
| void | constrain (int &width, int &height) |
| void | draw (QPainter &p, int offsetX, int offsetY) |
| ActivityType | getActivityType () const |
| QString | getPostText () |
| QString | getPreText () |
| bool | loadFromXMI (QDomElement &qElement) |
| void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
| void | setActivityType (ActivityType activityType) |
| void | setPostText (const QString &) |
| void | setPreText (const QString &) |
| void | showProperties () |
| virtual | ~ActivityWidget () |
Static Public Member Functions | |
| static bool | isActivity (WorkToolBar::ToolBar_Buttons tbb, ActivityType &resultType) |
Protected Member Functions | |
| QSize | calculateSize () |
Protected Attributes | |
| ActivityType | m_ActivityType |
| bool | m_NormalActivityType |
Detailed Description
This class is the graphical version of a UML Activity.A ActivityWidget is created by a UMLView. An ActivityWidget belongs to only one UMLView instance. When the UMLView instance that this class belongs to, it will be automatically deleted.
The ActivityWidget class inherits from the UMLWidget class which adds most of the functionality to this class.
A graphical version of a UML Activity.
Definition at line 34 of file activitywidget.h.
Member Enumeration Documentation
Definition at line 40 of file activitywidget.h.
Constructor & Destructor Documentation
| ActivityWidget::ActivityWidget | ( | UMLView * | view, | |
| ActivityType | activityType = Normal, |
|||
| Uml::IDType | id = Uml::id_None | |||
| ) | [explicit] |
Creates a Activity widget.
- Parameters:
-
view The parent of the widget. activityType The type of activity. id The ID to assign (-1 will prompt a new ID.)
Definition at line 35 of file activitywidget.cpp.
| ActivityWidget::~ActivityWidget | ( | ) | [virtual] |
Member Function Documentation
| QSize ActivityWidget::calculateSize | ( | ) | [protected, virtual] |
Overrides method from UMLWidget.
Reimplemented from UMLWidget.
Definition at line 207 of file activitywidget.cpp.
| void ActivityWidget::constrain | ( | int & | width, | |
| int & | height | |||
| ) | [virtual] |
Overrides Method from UMLWidget.
Reimplemented from UMLWidget.
Definition at line 175 of file activitywidget.cpp.
| void ActivityWidget::draw | ( | QPainter & | p, | |
| int | offsetX, | |||
| int | offsetY | |||
| ) | [virtual] |
Overrides the standard paint event.
Implements UMLWidget.
Definition at line 45 of file activitywidget.cpp.
| ActivityWidget::ActivityType ActivityWidget::getActivityType | ( | ) | const |
| QString ActivityWidget::getPostText | ( | ) |
This method get the name of the postText attribute.
Definition at line 356 of file activitywidget.cpp.
| QString ActivityWidget::getPreText | ( | ) |
This method get the name of the preText attribute.
Definition at line 344 of file activitywidget.cpp.
| bool ActivityWidget::isActivity | ( | WorkToolBar::ToolBar_Buttons | tbb, | |
| ActivityType & | resultType | |||
| ) | [static] |
Determines whether a toolbar button represents an Activity.
CHECK: currently unused - can this be removed?
- Parameters:
-
tbb The toolbar button enum input value. resultType The ActivityType corresponding to tbb. This is only set if tbb is an Activity.
- Returns:
- True if tbb represents an Activity.
Definition at line 285 of file activitywidget.cpp.
| bool ActivityWidget::loadFromXMI | ( | QDomElement & | qElement | ) | [virtual] |
Loads the widget from the "activitywidget" XMI element.
Reimplemented from UMLWidget.
Definition at line 323 of file activitywidget.cpp.
| void ActivityWidget::saveToXMI | ( | QDomDocument & | qDoc, | |
| QDomElement & | qElement | |||
| ) | [virtual] |
Saves the widget to the "activitywidget" XMI element.
Reimplemented from UMLWidget.
Definition at line 312 of file activitywidget.cpp.
| void ActivityWidget::setActivityType | ( | ActivityType | activityType | ) |
| void ActivityWidget::setPostText | ( | const QString & | aPostText | ) |
This method set the name of the postText attribute.
Definition at line 349 of file activitywidget.cpp.
| void ActivityWidget::setPreText | ( | const QString & | aPreText | ) |
This method set the name of the preText attribute.
Definition at line 337 of file activitywidget.cpp.
| void ActivityWidget::showProperties | ( | ) | [virtual] |
Show a properties dialog for an ActivityWidget.
Reimplemented from UMLWidget.
Definition at line 274 of file activitywidget.cpp.
| void ActivityWidget::slotMenuSelection | ( | QAction * | action | ) | [virtual, slot] |
Captures any popup menu signals for menus it created.
Reimplemented from UMLWidget.
Definition at line 253 of file activitywidget.cpp.
Member Data Documentation
ActivityType ActivityWidget::m_ActivityType [protected] |
bool ActivityWidget::m_NormalActivityType [protected] |
Type of normal activity (Invok or not).
This function is call by the dialog box properties
Definition at line 150 of file activitywidget.h.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference