umbrello API Documentation

EnumWidget Class Reference

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

#include <enumwidget.h>

Inheritance diagram for EnumWidget:

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

 EnumWidget (UMLView *view, UMLObject *o)
 Constructs an EnumWidget.
 ~EnumWidget ()
 Standard deconstructor.
void init ()
 Initializes key variables of the class.
bool getShowPackage () const
 Returns the status of whether to show Package.
void toggleShowPackage ()
 Toggles the status of whether to show package.
void setShowPackage (bool _status)
 Set the status of whether to show Package.
void draw (QPainter &p, int offsetX, int offsetY)
 Draws the enum as a rectangle with a box underneith with a list of literals.
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
 Saves to the <enumwidget> XMI element.
bool loadFromXMI (QDomElement &qElement)
 Loads from an <enumwidget> XMI element.

Protected Member Functions

QSize calculateSize ()
 Overrides method from UMLWidget.

Protected Attributes

bool m_bShowPackage

Detailed Description

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

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 enumwidget.h.


Constructor & Destructor Documentation

EnumWidget::EnumWidget UMLView view,
UMLObject o
 

Constructs an EnumWidget.

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

Definition at line 32 of file enumwidget.cpp.

References init().

EnumWidget::~EnumWidget  ) 
 

Standard deconstructor.

Definition at line 53 of file enumwidget.cpp.


Member Function Documentation

void EnumWidget::init  ) 
 

Initializes key variables of the class.

Reimplemented from UMLWidget.

Definition at line 36 of file enumwidget.cpp.

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

Referenced by EnumWidget().

bool EnumWidget::getShowPackage  )  const
 

Returns the status of whether to show Package.

Returns:
True if package is shown.

Definition at line 188 of file enumwidget.cpp.

void EnumWidget::toggleShowPackage  ) 
 

Toggles the status of whether to show package.

Definition at line 211 of file enumwidget.cpp.

References UMLWidget::updateComponentSize().

void EnumWidget::setShowPackage bool  _status  ) 
 

Set the status of whether to show Package.

Parameters:
_status True if package shall be shown.

Definition at line 182 of file enumwidget.cpp.

References UMLWidget::updateComponentSize().

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

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

Implements UMLWidget.

Definition at line 55 of file enumwidget.cpp.

References UMLWidget::drawSelected(), UMLClassifier::getFilteredList(), UMLWidget::getFont(), UMLWidget::getFontMetrics(), UMLObject::getFullyQualifiedName(), UMLObject::getName(), UMLWidget::getName(), UMLObject::getStereotype(), UMLWidget::getUseFillColour(), and UMLWidget::setPen().

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

Saves to the <enumwidget> XMI element.

Reimplemented from UMLWidget.

Definition at line 192 of file enumwidget.cpp.

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

Loads from an <enumwidget> XMI element.

Reimplemented from UMLWidget.

Definition at line 200 of file enumwidget.cpp.

QSize EnumWidget::calculateSize  )  [protected, virtual]
 

Overrides method from UMLWidget.

Reimplemented from UMLWidget.

Definition at line 115 of file enumwidget.cpp.

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

void EnumWidget::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 170 of file enumwidget.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