umbrello/umbrello
petaltree2uml.cpp
Go to the documentation of this file.
151 n.remove(QRegExp(QLatin1String("^.*::"))); // don't consider the scope prefix, it may contain spaces
405 //bool is_loaded = (node->findAttribute(QLatin1String("is_loaded")).string != QLatin1String("FALSE"));
658 UMLObject *o = Object_Factory::createUMLObject(UMLObject::ot_Component, name, parentPkg, false);
704 QString client_cardinality = clean(roleNode->findAttribute(QLatin1String("client_cardinality")).string);
static AssociationWidget * create(UMLScene *scene)
This constructor is really only for loading from XMI, otherwise it should not be allowed as it create...
Definition: associationwidget.cpp:110
Uml::ModelType::Enum rootFolderType(UMLObject *obj)
Return the corresponding Model_Type if the given object is one of the root folders.
Definition: umldoc.cpp:2736
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
Definition: umlobject.h:63
UMLView * createDiagram(UMLFolder *folder, Uml::DiagramType::Enum type, const QString &name, Uml::ID::Type id=Uml::ID::None)
Creates a diagram of the given type.
Definition: umldoc.cpp:1313
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
Displays a note box to allow multiple lines of text to be displayed.
Definition: notewidget.h:30
void setAssociationType(Uml::AssociationType::Enum assocType)
Sets the assocType of the UMLAssociation.
Definition: association.cpp:612
QPointF fetchLocation(const PetalNode *node, qreal width, qreal height)
Extract the location attribute from a petal node.
Definition: petaltree2uml.cpp:97
Definition: basictypes.h:215
Definition: basictypes.h:76
UMLWidget * widgetOnDiagram(Uml::ID::Type id)
Returns whether a widget is already on the diagram.
Definition: umlscene.cpp:1089
int length() const
bool isAbsolute() const
Definition: basictypes.h:41
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
Definition: umlobject.h:52
Definition: basictypes.h:216
bool isNull() const
QString documentation() const
Return the documentation from a petal node with carriage return handling and removed surrounding quot...
Definition: petalnode.cpp:105
bool isEmpty() const
void setLineColorCmd(const QColor &color)
Overrides the method from WidgetBase.
Definition: umlwidget.cpp:915
void setBaseType(UMLObject::ObjectType ot)
Reimplementation of method from class UMLObject for controlling the exact type of this classifier: cl...
Definition: classifier.cpp:82
void handleAssocView(PetalNode *attr, const PetalNode::NameValueList &parentAttrs, Uml::AssociationType::Enum assocType, UMLView *view, UMLObject *umlAssoc=0)
Definition: petaltree2uml.cpp:463
Definition: basictypes.h:115
Definition: basictypes.h:84
bool umbrellify(PetalNode *node, UMLPackage *parentPkg)
Create an Umbrello object from a PetalNode.
Definition: petaltree2uml.cpp:565
bool exists() const
QString & remove(int position, int n)
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
void chop(int n)
double toDouble(bool *ok) const
void setupNewWidget(UMLWidget *w, bool setPosition=true)
Initialize and announce a newly created widget.
Definition: umlscene.cpp:540
StringOrNode findAttribute(const QString &name) const
Find an attribute by name.
Definition: petalnode.cpp:144
Uml::ID::Type quid(const PetalNode *node)
Extract the quid attribute from a petal node and return it as a Uml::ID::Type.
Definition: petaltree2uml.cpp:73
int size() const
Definition: basictypes.h:104
bool isNull() const
This class represents an association inside a diagram.
Definition: associationwidget.h:50
This class contains the non-graphic representation of an association.
Definition: association.h:32
Definition: basictypes.h:156
void setObject(UMLObject *obj, Uml::RoleType::Enum role)
Sets the UMLObject playing the given role in the association.
Definition: association.cpp:631
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
Creates a UMLObject of the given type.
Definition: object_factory.cpp:192
QString number(int n, int base)
int count(const T &value) const
void append(const T &value)
Definition: basictypes.h:83
const qreal Rose2Qt
The Rose diagram coordinate system is roughly twice the scale of Qt.
Definition: petaltree2uml.cpp:54
void transferVisibility(const PetalNode *from, UMLObject *to)
Transfer the Rose attribute "exportControl" to the Umbrello object given.
Definition: petaltree2uml.cpp:163
bool importView(PetalNode *root, UMLPackage *parent, const QString &rootName, const QString &modelsName, const QString &firstNodeName, const QString &presentationsName)
Auxiliary function for UseCase/Component/Deployment view import.
Definition: petaltree2uml.cpp:881
bool addAssociation(AssociationWidget *pAssoc, bool isPasteOperation=false)
Adds an association to the view from the given data.
Definition: umlscene.cpp:1912
QString toString(Enum item)
Convert AssociationType item into QString representation.
Definition: basictypes.cpp:269
bool setUMLPackage(UMLPackage *pPkg)
Sets the UMLPackage in which this class is located.
Definition: umlobject.cpp:543
void setPos(const QPointF &pos)
int toInt(bool *ok, int base) const
bool isEmpty() const
Definition: umlobject.h:70
bool isEmpty() const
void setDocumentation(const QString &doc)
Used by some child classes to set documentation.
Definition: widgetbase.cpp:196
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
void setVisibilityCmd(Uml::Visibility::Enum visibility)
Method used by setVisibility: it is called by cmdSetVisibility, Don't use it!
Definition: umlobject.cpp:451
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
UMLPackage * handleControlledUnit(PetalNode *node, const QString &name, Uml::ID::Type id, UMLPackage *parentPkg)
Handle a controlled unit.
Definition: petaltree2uml.cpp:399
UMLRole * getUMLRole(Uml::RoleType::Enum role) const
Get the underlying UMLRole object for the given role.
Definition: association.cpp:586
QString toLower() const
bool contains(QChar ch, Qt::CaseSensitivity cs) const
Definition: basictypes.h:78
Definition: umlobject.h:54
Definition: umlobject.h:51
UMLObject * findObjectById(Uml::ID::Type id)
Used to find a reference to a UMLObject by its ID.
Definition: umldoc.cpp:782
QString & replace(int position, int n, QChar after)
Definition: umlobject.h:58
Definition: notewidget.h:38
QByteArray toLatin1() const
QString mid(int position, int n) const
UMLWidget * createWidget(UMLScene *scene, UMLObject *o)
Create a UMLWidget in the given view and representing the given document object.
Definition: widget_factory.cpp:68
Uml::DiagramType::Enum diagramType(QString objType)
Definition: petaltree2uml.cpp:546
void setSecondaryFallback(const QString &id)
Set the secondary ID fallback.
Definition: umlobject.cpp:675
Definition: basictypes.h:77
QString quidu(const PetalNode *node)
Extract the quidu attribute from a petal node.
Definition: petaltree2uml.cpp:85
Definition: umlobject.h:57
This class contains the non-graphic representation of an association role.
Definition: umlrole.h:24
qreal fetchInt(const PetalNode *node, const QString &attribute, int defaultValue=0)
Extract an int attribute from a petal node.
Definition: petaltree2uml.cpp:135
void setMultiplicity(const QString &multi)
Sets the multiplicity of the role.
Definition: umlrole.cpp:139
void setFillColorCmd(const QColor &color)
Sets the background fill color.
Definition: umlwidget.cpp:967
T & last()
UMLPackage * petalTree2Uml(PetalNode *root, UMLPackage *parentPkg)
Auxiliary method for loadFromMDL() loading of controlled unit.
Definition: petaltree2uml.cpp:937
int length() const
QString fromLatin1(const char *str, int size)
QString clean(const QString &s)
Return the given string without surrounding quotation marks.
Definition: petaltree2uml.cpp:60
UMLPackage * rootPackage(UMLObject *obj)
Get the root folder of the given UMLObject.
Definition: model_utils.cpp:316
Definition: umlobject.h:53
virtual void setID(Uml::ID::Type NewID)
Assigns a new Id to the object.
Definition: umlobject.cpp:158
qreal fetchDouble(const PetalNode *node, const QString &attribute, qreal defaultValue=0)
Extract a double attribute from a petal node.
Definition: petaltree2uml.cpp:124
UMLPackage * loadFromMDL(QFile &file, UMLPackage *parentPkg)
Parse a file into the PetalNode internal tree representation and then create Umbrello objects by trav...
Definition: import_rose.cpp:394
Definition: umlobject.h:55
Enum fromString(const QString &item)
Convert a string item into Visibility representation.
Definition: basictypes.cpp:119
uint toUInt(bool *ok, int base) const
bool isNull() const
UMLObject::ObjectType typeToCreate(const QString &name)
Determine the model type corresponding to a name.
Definition: petaltree2uml.cpp:148
Enum fromInt(int item)
Convert a integer item into RoleType representation.
Definition: basictypes.cpp:745
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.