umbrello API Documentation

ActivityWidget Class Reference

This class is the graphical version of a UML Activity. A graphical version of a UML Activity. More...

#include <activitywidget.h>

Inheritance diagram for ActivityWidget:

UMLWidget WidgetBase List of all members.

Public Types

enum  ActivityType { Initial = 0, Normal, End, Branch }

Public Slots

void slotMenuSelection (int sel)
 Captures any popup menu signals for menus it created.

Public Member Functions

 ActivityWidget (UMLView *view, ActivityType activityType=Normal, Uml::IDType id=Uml::id_None)
 Creates a Activity widget.
virtual ~ActivityWidget ()
 destructor
void draw (QPainter &p, int offsetX, int offsetY)
 Overrides the standard paint event.
void constrain (int &width, int &height)
 Overrides Method from UMLWidget.
ActivityType getActivityType () const
 Returns the type of activity.
void setActivityType (ActivityType activityType)
 Sets the type of activity.
void showProperties ()
 Show a properties dialog for an ActivityWidget.
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
 Saves the widget to the <activitywidget> XMI element.
bool loadFromXMI (QDomElement &qElement)
 Loads the widget from the <activitywidget> XMI element.

Static Public Member Functions

static bool isActivity (WorkToolBar::ToolBar_Buttons tbb, ActivityType &resultType)
 Determines whether a toolbar button represents an Activity.

Protected Member Functions

QSize calculateSize ()
 Overrides method from UMLWidget.

Protected Attributes

ActivityType m_ActivityType
 Type of activity.

Detailed Description

This class is the graphical version of a UML Activity. A 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.

Author:
Paul Hensgen <phensgen@techie.com> Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 34 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 31 of file activitywidget.cpp.

References setActivityType(), WidgetBase::setBaseType(), and UMLWidget::updateComponentSize().

ActivityWidget::~ActivityWidget  )  [virtual]
 

destructor

Definition at line 39 of file activitywidget.cpp.


Member Function Documentation

void ActivityWidget::draw QPainter &  p,
int  offsetX,
int  offsetY
[virtual]
 

Overrides the standard paint event.

Implements UMLWidget.

Definition at line 41 of file activitywidget.cpp.

References UMLWidget::drawSelected(), UMLWidget::getFontMetrics(), UMLWidget::getName(), m_ActivityType, and UMLWidget::setPen().

void ActivityWidget::constrain int &  width,
int &  height
[virtual]
 

Overrides Method from UMLWidget.

Reimplemented from UMLWidget.

Definition at line 96 of file activitywidget.cpp.

References calculateSize(), and m_ActivityType.

ActivityWidget::ActivityType ActivityWidget::getActivityType  )  const
 

Returns the type of activity.

Definition at line 145 of file activitywidget.cpp.

References m_ActivityType.

Referenced by AssocRules::allowAssociation().

void ActivityWidget::setActivityType ActivityType  activityType  ) 
 

Sets the type of activity.

Definition at line 149 of file activitywidget.cpp.

References m_ActivityType.

Referenced by ActivityWidget(), and loadFromXMI().

void ActivityWidget::showProperties  )  [virtual]
 

Show a properties dialog for an ActivityWidget.

Reimplemented from UMLWidget.

Definition at line 178 of file activitywidget.cpp.

References ActivityDialog::getChangesMade(), UMLApp::getDocument(), UMLApp::getDocWindow(), UMLDoc::setModified(), DocWindow::showDocumentation(), and DocWindow::updateDocumentation().

Referenced by slotMenuSelection().

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 189 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 213 of file activitywidget.cpp.

References m_ActivityType.

bool ActivityWidget::loadFromXMI QDomElement &  qElement  )  [virtual]
 

Loads the widget from the <activitywidget> XMI element.

Reimplemented from UMLWidget.

Definition at line 222 of file activitywidget.cpp.

References setActivityType().

QSize ActivityWidget::calculateSize  )  [protected, virtual]
 

Overrides method from UMLWidget.

Reimplemented from UMLWidget.

Definition at line 128 of file activitywidget.cpp.

References UMLWidget::getFontMetrics(), UMLWidget::getName(), and m_ActivityType.

Referenced by constrain().

void ActivityWidget::slotMenuSelection int  sel  )  [virtual, slot]
 

Captures any popup menu signals for menus it created.

Reimplemented from UMLWidget.

Definition at line 154 of file activitywidget.cpp.

References showProperties(), and UMLWidget::slotMenuSelection().


Member Data Documentation

ActivityType ActivityWidget::m_ActivityType [protected]
 

Type of activity.

Definition at line 117 of file activitywidget.h.

Referenced by calculateSize(), constrain(), draw(), getActivityType(), saveToXMI(), and setActivityType().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:03 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003