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

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
UMLDragData Class Reference

`#include <umldragdata.h>`

Inheritance diagram for UMLDragData:

## Classes

struct | LvTypeAndID

## Public Types

typedef QList< LvTypeAndID * > | LvTypeAndID_List
typedef QListIterator< LvTypeAndID * > | LvTypeAndID_It

## Public Member Functions

| UMLDragData (UMLObjectList &Objects, QWidget *dragSource=nullptr)
| UMLDragData (UMLObjectList &Objects, UMLViewList &Diagrams, QWidget *dragSource=nullptr)
| UMLDragData (UMLListViewItemList &UMLListViewItems, QWidget *dragSource=nullptr)
| UMLDragData (UMLObjectList &Objects, UMLWidgetList &Widgets, AssociationWidgetList &Associations, QPixmap &PngImage, UMLScene *scene, QWidget *dragSource=nullptr)
| UMLDragData (UMLObjectList &Objects, int, QWidget *dragSource=nullptr)
| UMLDragData (QWidget *dragSource=nullptr)
| ~UMLDragData ()

## Static Public Member Functions

static bool | decodeClip1 (const QMimeData *mimeData, UMLObjectList &objects)
static bool | decodeClip2 (const QMimeData *mimeData, UMLObjectList &objects, UMLViewList &diagrams)
static bool | decodeClip3 (const QMimeData *mimeData, UMLListViewItemList &umlListViewItems, const UMLListView *parentListView=nullptr)
static bool | getClip3TypeAndID (const QMimeData *mimeData, LvTypeAndID_List &typeAndIdList)
static bool | decodeClip4 (const QMimeData *mimeData, UMLObjectList &objects, UMLWidgetList &widgets, AssociationWidgetList &associations, Uml::DiagramType::Enum &dType)
static bool | decodeClip5 (const QMimeData *mimeData, UMLObjectList &objects, UMLClassifier *newParent)
static int | getCodingType (const QMimeData *mimeData)

## Private Member Functions

void | setUMLDataClip1 (UMLObjectList &Objects)
void | setUMLDataClip2 (UMLObjectList &Objects, UMLViewList &Diagrams)
void | setUMLDataClip3 (UMLListViewItemList &UMLListViewItems)
void | setUMLDataClip4 (UMLObjectList &Objects, UMLWidgetList &WidgetDatas, AssociationWidgetList &Associations, QPixmap &PngImage, UMLScene *scene)
void | setUMLDataClip5 (UMLObjectList &Objects)

## Static Private Member Functions

static void | executeCreateWidgetCommand (UMLWidget *widget)
static bool | decodeObjects (QDomNode &objectsNode, UMLObjectList &objects, bool skipIfObjectExists=false)
static bool | decodeViews (QDomNode &umlviewsNode, UMLViewList &diagrams)

## Detailed Description

This class provides encoding and decoding for the uml data that will be used in a drag and drop operation or in a copy or paste operation.

Author
  Gustavo Madrigal, Jonathan Riddell (XMI conversion) Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

## Member Typedef Documentation

## ◆ LvTypeAndID_It

typedef QListIterator<LvTypeAndID*> UMLDragData::LvTypeAndID_It

## ◆ LvTypeAndID_List

typedef QList<LvTypeAndID*> UMLDragData::LvTypeAndID_List

## Constructor & Destructor Documentation

## ◆ UMLDragData() [1/6]

UMLDragData::UMLDragData | ( | UMLObjectList & | objects,
|  | QWidget * | dragSource = `nullptr`
| ) |  |

explicit

Constructor.

## ◆ UMLDragData() [2/6]

UMLDragData::UMLDragData | ( | UMLObjectList & | objects,
|  | UMLViewList & | diagrams,
|  | QWidget * | dragSource = `nullptr`
| ) |  |

For use when the user selects UML Object and Diagrams from the ListView to be copied, Mime type = "application/x-uml-clip2

## ◆ UMLDragData() [3/6]

UMLDragData::UMLDragData | ( | UMLListViewItemList & | umlListViewItems,
|  | QWidget * | dragSource = `nullptr`
| ) |  |

explicit

Constructor.

## ◆ UMLDragData() [4/6]

UMLDragData::UMLDragData | ( | UMLObjectList & | objects,
|  | UMLWidgetList & | widgets,
|  | AssociationWidgetList & | associationDatas,
|  | QPixmap & | pngImage,
|  | UMLScene * | scene,
|  | QWidget * | dragSource = `nullptr`
| ) |  |

For use when the user selects UMLObjects from a Diagram. The Selected widgets and the relationships between only selected widgets will be copied and also its respective ListView Items, Mime type = "application/x-uml-clip4

## ◆ UMLDragData() [5/6]

UMLDragData::UMLDragData | ( | UMLObjectList & | objects,
|  | int | ,
|  | QWidget * | dragSource = `nullptr`
| ) |  |

For use when the user selects only Operations and/or Attributes from the ListView, Mime type = "application/x-uml-clip5

## ◆ UMLDragData() [6/6]

UMLDragData::UMLDragData | ( | QWidget * | dragSource = `nullptr` | ) |

explicit

Constructor.

## ◆ ~UMLDragData()

UMLDragData::~UMLDragData | ( |  | ) |

Deconstructor.

## Member Function Documentation

## ◆ decodeClip1()

bool UMLDragData::decodeClip1 | ( | const QMimeData * | mimeData,
|  | UMLObjectList & | objects
| ) |  |

static

For use when the user selects only UML Objects from the ListView but no diagrams to be copied, decodes Mime type = "application/x-uml-clip1

## ◆ decodeClip2()

bool UMLDragData::decodeClip2 | ( | const QMimeData * | mimeData,
|  | UMLObjectList & | objects,
|  | UMLViewList & | diagrams
| ) |  |

static

For use when the user selects UML Object and Diagrams from the ListView to be copied, decodes Mime type = "application/x-uml-clip2

## ◆ decodeClip3()

bool UMLDragData::decodeClip3 | ( | const QMimeData * | mimeData,
|  | UMLListViewItemList & | umlListViewItems,
|  | const UMLListView * | parentListView = `nullptr`
| ) |  |

static

For use when the user selects UMLObjects from the ListView to be copied, decodes Mime type = "application/x-uml-clip3

## ◆ decodeClip4()

bool UMLDragData::decodeClip4 | ( | const QMimeData * | mimeData,
|  | UMLObjectList & | objects,
|  | UMLWidgetList & | widgets,
|  | AssociationWidgetList & | associations,
|  | Uml::DiagramType::Enum & | dType
| ) |  |

static

For use when the user selects UML Objects from a Diagram. The Selected widgets and the relationships between only selected widgets will be copied

decodes Mime type = "application/x-uml-clip4"

## ◆ decodeClip5()

bool UMLDragData::decodeClip5 | ( | const QMimeData * | mimeData,
|  | UMLObjectList & | objects,
|  | UMLClassifier * | newParent
| ) |  |

static

For use when the user selects only Attributes and/or Operations from the ListView * copied, decodes Mime type = "application/x-uml-clip5

## ◆ decodeObjects()

bool UMLDragData::decodeObjects | ( | QDomNode & | objectsNode,
|  | UMLObjectList & | objects,
|  | bool | skipIfObjectExists = `false`
| ) |  |

static private

Decode UMLObjects from clip

## ◆ decodeViews()

bool UMLDragData::decodeViews | ( | QDomNode & | umlviewsNode,
|  | UMLViewList & | diagrams
| ) |  |

static private

Decode views from clip

## ◆ executeCreateWidgetCommand()

void UMLDragData::executeCreateWidgetCommand | ( | UMLWidget * | widget | ) |

static private

Execute the CmdCreateWidget undo command

## ◆ getClip3TypeAndID()

bool UMLDragData::getClip3TypeAndID | ( | const QMimeData * | mimeData,
|  | LvTypeAndID_List & | typeAndIdList
| ) |  |

static

Return just the LvTypeAndID of a Clip3.

Parameters

  mimeData | The encoded source.
  typeAndIdList | The LvTypeAndID_List decoded from the source.

Returns
  True if decoding was successful.

## ◆ getCodingType()

int UMLDragData::getCodingType | ( | const QMimeData * | mimeData | ) |

static

Converts application/x-uml-clip[1-5] clip type to an integer

## ◆ setUMLDataClip1()

void UMLDragData::setUMLDataClip1 | ( | UMLObjectList & | objects | ) |

private

For use when the user selects only UMLObjects from the ListView but no diagrams to be copied

## ◆ setUMLDataClip2()

void UMLDragData::setUMLDataClip2 | ( | UMLObjectList & | objects,
|  | UMLViewList & | diagrams
| ) |  |

private

For use when the user selects UML Object and Diagrams from the ListView to be copied

## ◆ setUMLDataClip3()

void UMLDragData::setUMLDataClip3 | ( | UMLListViewItemList & | umlListViewItems | ) |

private

For use when the user selects only empty folders from the ListView to be copied.

## ◆ setUMLDataClip4()

void UMLDragData::setUMLDataClip4 | ( | UMLObjectList & | objects,
|  | UMLWidgetList & | widgets,
|  | AssociationWidgetList & | associations,
|  | QPixmap & | pngImage,
|  | UMLScene * | scene
| ) |  |

private

For use when the user selects UML Objects from a Diagram. The Selected widgets and the relationships between only selected widgets will be copied and also its respective ListView Items

## ◆ setUMLDataClip5()

void UMLDragData::setUMLDataClip5 | ( | UMLObjectList & | objects | ) |

private

For use when the user selects only Attributes and/or Operation from the ListView

The documentation for this class was generated from the following files:

- umbrello/clipboard/umldragdata.h
- umbrello/clipboard/umldragdata.cpp