umbrello: umbrello/clipboard/umldragdata.h Source File

umbrello 2.32.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

umldragdata.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLDRAGDATA_H
12 #define UMLDRAGDATA_H
13
14 #include "associationwidgetlist.h"
15 #include "basictypes.h"
16 #include "umllistviewitem.h"
17 #include "umllistviewitemlist.h"
18 #include "umlobjectlist.h"
19 #include "umlviewlist.h"
20 #include "umlwidgetlist.h"
21
22 #include <QList>
23 #include <QMimeData>
24
25 class UMLClassifier;
26 class UMLListView;
27 class UMLScene;
28 class QPixmap;
29
37 class UMLDragData : public QMimeData
38 {
39 Q_OBJECT
40 public:
41
42 explicit UMLDragData(UMLObjectList& Objects, QWidget* dragSource = 0);
43
44 UMLDragData(UMLObjectList &Objects, UMLViewList& Diagrams, QWidget * dragSource = 0);
45
46 explicit UMLDragData(UMLListViewItemList& UMLListViewItems, QWidget* dragSource = 0);
47
48 UMLDragData(UMLObjectList& Objects, UMLWidgetList& Widgets, AssociationWidgetList& Associations,
49 QPixmap& PngImage, UMLScene *scene, QWidget* dragSource = 0);
50
51 UMLDragData(UMLObjectList& Objects, int, QWidget* dragSource = 0);
52
53 explicit UMLDragData(QWidget* dragSource = 0);
54
55 ~UMLDragData();
56
57 static bool decodeClip1(const QMimeData* mimeData, UMLObjectList& objects);
58
59 static bool decodeClip2(const QMimeData* mimeData, UMLObjectList& objects, UMLViewList& diagrams);
60
61 static bool decodeClip3(const QMimeData* mimeData,
62 UMLListViewItemList& umlListViewItems,
63 const UMLListView* parentListView=0);
64
65 struct LvTypeAndID {
66 UMLListViewItem::ListViewType type;
67 Uml::ID::Type id;
68 };
69 typedef QList<LvTypeAndID*> LvTypeAndID_List;
70 typedef QListIterator<LvTypeAndID*> LvTypeAndID_It;
71
72 static bool getClip3TypeAndID(const QMimeData* mimeData,
73 LvTypeAndID_List& typeAndIdList);
74
75 static bool decodeClip4(const QMimeData* mimeData, UMLObjectList& objects,
76 UMLWidgetList& widgets,
77 AssociationWidgetList& associations,
78 Uml::DiagramType::Enum & dType);
79
80 static bool decodeClip5(const QMimeData* mimeData, UMLObjectList& objects,
81 UMLClassifier *newParent);
82
83 static int getCodingType(const QMimeData* mimeData);
84
85 private:
86
87 void setUMLDataClip1(UMLObjectList& Objects);
88
89 void setUMLDataClip2(UMLObjectList& Objects, UMLViewList& Diagrams);
90
91 void setUMLDataClip3(UMLListViewItemList& UMLListViewItems);
92
93 void setUMLDataClip4(UMLObjectList& Objects,
94 UMLWidgetList& WidgetDatas,
95 AssociationWidgetList& Associations, QPixmap& PngImage,
96 UMLScene *scene);
97
98 void setUMLDataClip5(UMLObjectList& Objects);
99
100 static void executeCreateWidgetCommand(UMLWidget* widget);
101
102 static bool decodeObjects(QDomNode& objectsNode, UMLObjectList& objects,
103 bool skipIfObjectExists = false);
104
105 static bool decodeViews(QDomNode& umlviewsNode, UMLViewList& diagrams);
106 };
107
108 #endif
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition: associationwidgetlist.h:19
basictypes.h
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLDragData
Definition: umldragdata.h:38
UMLDragData::executeCreateWidgetCommand
static void executeCreateWidgetCommand(UMLWidget *widget)
Definition: umldragdata.cpp:729
UMLDragData::LvTypeAndID_List
QList< LvTypeAndID * > LvTypeAndID_List
Definition: umldragdata.h:69
UMLDragData::decodeClip4
static bool decodeClip4(const QMimeData *mimeData, UMLObjectList &objects, UMLWidgetList &widgets, AssociationWidgetList &associations, Uml::DiagramType::Enum &dType)
Definition: umldragdata.cpp:488
UMLDragData::decodeClip5
static bool decodeClip5(const QMimeData *mimeData, UMLObjectList &objects, UMLClassifier *newParent)
Definition: umldragdata.cpp:670
UMLDragData::getCodingType
static int getCodingType(const QMimeData *mimeData)
Definition: umldragdata.cpp:886
UMLDragData::LvTypeAndID_It
QListIterator< LvTypeAndID * > LvTypeAndID_It
Definition: umldragdata.h:70
UMLDragData::setUMLDataClip3
void setUMLDataClip3(UMLListViewItemList &UMLListViewItems)
Definition: umldragdata.cpp:173
UMLDragData::decodeClip2
static bool decodeClip2(const QMimeData *mimeData, UMLObjectList &objects, UMLViewList &diagrams)
Definition: umldragdata.cpp:306
UMLDragData::decodeObjects
static bool decodeObjects(QDomNode &objectsNode, UMLObjectList &objects, bool skipIfObjectExists=false)
Definition: umldragdata.cpp:737
UMLDragData::decodeClip3
static bool decodeClip3(const QMimeData *mimeData, UMLListViewItemList &umlListViewItems, const UMLListView *parentListView=0)
Definition: umldragdata.cpp:420
UMLDragData::getClip3TypeAndID
static bool getClip3TypeAndID(const QMimeData *mimeData, LvTypeAndID_List &typeAndIdList)
Definition: umldragdata.cpp:358
UMLDragData::setUMLDataClip2
void setUMLDataClip2(UMLObjectList &Objects, UMLViewList &Diagrams)
Definition: umldragdata.cpp:143
UMLDragData::decodeClip1
static bool decodeClip1(const QMimeData *mimeData, UMLObjectList &objects)
Definition: umldragdata.cpp:265
UMLDragData::~UMLDragData
~UMLDragData()
Definition: umldragdata.cpp:112
UMLDragData::decodeViews
static bool decodeViews(QDomNode &umlviewsNode, UMLViewList &diagrams)
Definition: umldragdata.cpp:842
UMLDragData::setUMLDataClip5
void setUMLDataClip5(UMLObjectList &Objects)
Definition: umldragdata.cpp:243
UMLDragData::UMLDragData
UMLDragData(UMLObjectList &Objects, QWidget *dragSource=0)
Definition: umldragdata.cpp:47
UMLDragData::setUMLDataClip1
void setUMLDataClip1(UMLObjectList &Objects)
Definition: umldragdata.cpp:120
UMLDragData::setUMLDataClip4
void setUMLDataClip4(UMLObjectList &Objects, UMLWidgetList &WidgetDatas, AssociationWidgetList &Associations, QPixmap &PngImage, UMLScene *scene)
Definition: umldragdata.cpp:195
UMLListViewItem::ListViewType
ListViewType
Definition: umllistviewitem.h:44
UMLListView
Displays the list view for the program.
Definition: umllistview.h:48
UMLObjectList
Definition: umlobjectlist.h:29
UMLScene
Definition: umlscene.h:70
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
Uml::DiagramType::Enum
Enum
Definition: basictypes.h:77
Uml::ID::Type
std::string Type
Definition: basictypes.h:385
UMLDragData::LvTypeAndID
Definition: umldragdata.h:65
UMLDragData::LvTypeAndID::id
Uml::ID::Type id
Definition: umldragdata.h:67
UMLDragData::LvTypeAndID::type
UMLListViewItem::ListViewType type
Definition: umldragdata.h:66
umllistviewitem.h
umllistviewitemlist.h
UMLListViewItemList
QList< UMLListViewItem * > UMLListViewItemList
Definition: umllistviewitemlist.h:24
umlobjectlist.h
umlviewlist.h
UMLViewList
QList< QPointer< UMLView > > UMLViewList
Definition: umlviewlist.h:26
umlwidgetlist.h
UMLWidgetList
QList< QPointer< UMLWidget > > UMLWidgetList
Definition: umlwidgetlist.h:17