umbrello API Documentation

EntityWidget Class Reference

Defines a graphical version of the entity. A graphical version of an entity. More...

#include <entitywidget.h>

Inheritance diagram for EntityWidget:

UMLWidget WidgetBase List of all members.

Public Slots

void slotMenuSelection (int sel)
 Will be called when a menu selection has been made from the popup menu.

Public Member Functions

 EntityWidget (UMLView *view, UMLObject *o)
 Constructs an EntityWidget.
 ~EntityWidget ()
 Standard deconstructor.
void init ()
 Initializes key variables of the class.
void draw (QPainter &p, int offsetX, int offsetY)
 Draws the entity as a rectangle with a box underneith with a list of literals.
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
 Saves to the <entitywidget> XMI element.
bool loadFromXMI (QDomElement &qElement)
 Loads from an <entitywidget> XMI element.

Protected Member Functions

QSize calculateSize ()
 Overrides method from UMLWidget.

Detailed Description

Defines a graphical version of the entity. A graphical version of an entity.

Most of the functionality will come from the UMLWidget class from which class inherits from.

Author:
Jonathan Riddell
See also:
UMLWidget Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 30 of file entitywidget.h.


Constructor & Destructor Documentation

EntityWidget::EntityWidget UMLView view,
UMLObject o
 

Constructs an EntityWidget.

Parameters:
view The parent of this EntityWidget.
o The UMLObject this will be representing.

Definition at line 32 of file entitywidget.cpp.

References init().

EntityWidget::~EntityWidget  ) 
 

Standard deconstructor.

Definition at line 49 of file entitywidget.cpp.


Member Function Documentation

void EntityWidget::init  ) 
 

Initializes key variables of the class.

Reimplemented from UMLWidget.

Definition at line 36 of file entitywidget.cpp.

References UMLView::getOptionState(), WidgetBase::setBaseType(), UMLWidget::setSize(), and UMLWidget::updateComponentSize().

Referenced by EntityWidget().

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

Draws the entity as a rectangle with a box underneith with a list of literals.

Implements UMLWidget.

Definition at line 51 of file entitywidget.cpp.

References UMLWidget::drawSelected(), UMLClassifier::getFilteredList(), UMLWidget::getFont(), UMLWidget::getFontMetrics(), UMLEntityAttribute::getIndexType(), UMLObject::getName(), UMLWidget::getName(), UMLObject::getStereotype(), UMLWidget::getUseFillColour(), UMLView::setFont(), and UMLWidget::setPen().

void EntityWidget::saveToXMI QDomDocument &  qDoc,
QDomElement &  qElement
[virtual]
 

Saves to the <entitywidget> XMI element.

Reimplemented from UMLWidget.

Definition at line 192 of file entitywidget.cpp.

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

Loads from an <entitywidget> XMI element.

Reimplemented from UMLWidget.

Definition at line 198 of file entitywidget.cpp.

QSize EntityWidget::calculateSize  )  [protected, virtual]
 

Overrides method from UMLWidget.

Reimplemented from UMLWidget.

Definition at line 125 of file entitywidget.cpp.

References UMLWidget::calculateSize(), UMLClassifier::getFilteredList(), UMLWidget::getFont(), UMLWidget::getFontMetrics(), UMLObject::getName(), UMLWidget::getName(), and UMLObject::getStereotype().

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

Will be called when a menu selection has been made from the popup menu.

Parameters:
sel The selection id that has been selected.

Reimplemented from UMLWidget.

Definition at line 180 of file entitywidget.cpp.

References UMLApp::getDocument(), UMLDoc::setModified(), and UMLWidget::slotMenuSelection().


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:04 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003