umbrello/umbrello
umldragdata.cpp
Go to the documentation of this file.
56 UMLDragData::UMLDragData(UMLObjectList& objects, UMLViewList& diagrams, QWidget* dragSource /* = 0 */)
191 void UMLDragData::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, AssociationWidgetList& associations,
297 bool UMLDragData::decodeClip2(const QMimeData* mimeData, UMLObjectList& objects, UMLViewList& diagrams)
510 dType = Uml::DiagramType::fromInt(root.attribute(QLatin1String("diagramtype"), QLatin1String("0")).toInt());
671 bool UMLDragData::decodeObjects(QDomNode& objectsNode, UMLObjectList& objects, bool skipIfObjectExists)
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
QObject * child(const char *objName, const char *inheritsClass, bool recursiveSearch) const
Definition: umldragdata.h:64
static bool decodeClip1(const QMimeData *mimeData, UMLObjectList &objects)
For use when the user selects only UML Objects from the ListView but no diagrams to be copied...
Definition: umldragdata.cpp:256
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
Definition: widgetbase.h:64
void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves the listview item to a "listitem" tag.
Definition: umllistviewitem.cpp:864
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
Uml::ID::Type findNewID(Uml::ID::Type OldID)
Returns the new assigned ID of the object that had OldID as its previous id.
Definition: idchangelog.cpp:62
QByteArray data(const QString &mimeType) const
virtual bool loadFromXMI(QDomElement &element)
This method loads the generic parts of the XMI common to most model classes.
Definition: umlobject.cpp:912
Definition: cmd_createUMLObject.h:22
Classifiers (classes, interfaces) have lists of operations, attributes, templates and others...
Definition: classifierlistitem.h:29
A graphical version of a UML Precondition (new in UML 2.0).
Definition: preconditionwidget.h:32
QDomNode appendChild(const QDomNode &newChild)
QString attribute(const QString &name, const QString &defValue) const
virtual bool hasFormat(const QString &mimeType) const
static bool decodeClip2(const QMimeData *mimeData, UMLObjectList &objects, UMLViewList &diagrams)
For use when the user selects UML Object and Diagrams from the ListView to be copied, decodes Mime type = "application/x-uml-clip2.
Definition: umldragdata.cpp:297
QString toString(int indent) const
void setDiagramLink(Uml::ID::Type viewID)
Set the ID of the diagram hyperlinked to this note.
Definition: notewidget.cpp:164
This class contains all the ID translations done for each UMLObject pasted.
Definition: idchangelog.h:26
UMLListViewItem * findFolderForDiagram(Uml::DiagramType::Enum dt)
Find the parent folder for a diagram.
Definition: umllistview.cpp:790
Definition: cmd_createWidget.h:22
virtual bool loadFromXMI(QDomElement &qElement)
Loads the "diagram" tag.
Definition: umlscene.cpp:3613
UMLListViewItem * determineParentItem(UMLObject *object) const
Determine the parent ListViewItem given an UMLObject.
Definition: umllistview.cpp:849
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
void resolveObjectWidget(IDChangeLog *log)
Resolve references of this message so they reference the correct new object widgets after paste...
Definition: messagewidget.cpp:864
QDomNodeList childNodes() const
static bool getClip3TypeAndID(const QMimeData *mimeData, LvTypeAndID_List &typeAndIdList)
Return just the LvTypeAndID of a Clip3.
Definition: umldragdata.cpp:349
QDomNode nextSibling() const
This class represents an association inside a diagram.
Definition: associationwidget.h:50
QDomElement toElement() const
void resize(int size)
bool loadFromXMI(QDomElement &qElement, const UMLWidgetList &widgets, const MessageWidgetList *messages)
Uses the supplied widgetList for resolving the role A and role B widgets.
Definition: associationwidget.cpp:4099
void append(const T &value)
QString fromUtf8(const char *str, int size)
virtual bool resolveRef()
Resolve referenced objects (if any.) Needs to be called after all UML objects are loaded from file...
Definition: umlobject.cpp:707
UMLDragData(UMLObjectList &Objects, QWidget *dragSource=0)
Constructor.
Definition: umldragdata.cpp:45
void executeCommand(QUndoCommand *cmd)
Execute a command and push it in the stack.
Definition: uml.cpp:3227
bool setUMLPackage(UMLPackage *pPkg)
Sets the UMLPackage in which this class is located.
Definition: umlobject.cpp:543
void setAttribute(const QString &name, const QString &value)
int toInt(bool *ok, int base) const
Definition: umlobject.h:70
static int getCodingType(const QMimeData *mimeData)
Converts application/x-uml-clip[1-5] clip type to an integer.
Definition: umldragdata.cpp:820
static bool decodeClip3(const QMimeData *mimeData, UMLListViewItemList ¨ListViewItems, const UMLListView *parentListView=0)
For use when the user selects UMLObjects from the ListView to be copied, decodes Mime * type = "appli...
Definition: umldragdata.cpp:411
Uml::ID::Type assignNewID(Uml::ID::Type oldID)
Assigns a New ID to an Object, and also logs the assignment to its internal ChangeLog.
Definition: umldoc.cpp:2788
void setImageData(const QVariant &image)
QDomNode removeChild(const QDomNode &oldChild)
int numBytes() const
bool isNull() const
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves this widget to the "assocwidget" XMI element.
Definition: associationwidget.cpp:4027
UMLObject * findObjectById(Uml::ID::Type id)
Used to find a reference to a UMLObject by its ID.
Definition: umldoc.cpp:782
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Creates the "diagram" tag and fills it with the contents of the diagram.
Definition: umlscene.cpp:3541
Enum fromInt(int item)
Convert an integer item into DiagramType representation.
Definition: basictypes.cpp:253
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
A virtual method to save the properties of this widget into a QDomElement i.e xml.
Definition: umlwidget.cpp:1810
QDomNode firstChild() const
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)=0
This sub-class adds copyInto and clone to the QList base class.
Definition: umlobjectlist.h:26
UMLObject * makeObjectFromXMI(const QString &xmiTag, const QString &stereoID)
Make a new UMLObject according to the given XMI tag.
Definition: object_factory.cpp:355
static bool decodeClip4(const QMimeData *mimeData, UMLObjectList &objects, UMLWidgetList &widgets, AssociationWidgetList &associations, Uml::DiagramType::Enum &dType)
For use when the user selects UML Objects from a Diagram.
Definition: umldragdata.cpp:479
virtual UMLClassifierListItem * makeChildObject(const QString &xmiTag)
utility functions to allow easy determination of what classifiers are "owned" by the current one via ...
Definition: classifier.cpp:1501
UMLPackage * treeViewGetPackageFromCurrent()
Return the UMLPackage if the current item in the tree view is a package.
Definition: model_utils.cpp:400
bool loadFromXMI(QDomElement &qElement)
Loads a "listitem" tag, this is only used by the clipboard currently.
Definition: umllistviewitem.cpp:907
Definition: widgetbase.h:55
void resolveObjectWidget(IDChangeLog *log)
Resolve references of this precondition so it references the correct new object widget after paste...
Definition: preconditionwidget.cpp:173
QString tagName() const
void setData(const QString &mimeType, const QByteArray &data)
Definition: widgetbase.h:52
QImage toImage() const
uint length() const
virtual void setID(Uml::ID::Type NewID)
Assigns a new Id to the object.
Definition: umlobject.cpp:158
QDomElement createElement(const QString &tagName)
static bool decodeClip5(const QMimeData *mimeData, UMLObjectList &objects, UMLClassifier *newParent)
For use when the user selects only Attributes and/or Operations from the ListView * copied...
Definition: umldragdata.cpp:604
int size() const
virtual IDChangeLog * changeLog()
Read property of IDChangeLog* m_pChangeLog.
Definition: umldoc.cpp:2752
QObject * parent() const
UMLWidget * loadWidgetFromXMI(QDomElement &widgetElement)
Loads a "widget" element from XMI, used by loadFromXMI() and the clipboard.
Definition: umlscene.cpp:3752
QDomNode at(int index) const
bool setContent(const QByteArray &data, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)
void signalUMLObjectCreated(UMLObject *o)
Signal that a UMLObject has been created.
Definition: umldoc.cpp:1649
QByteArray toUtf8() const
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.