Clipboard management class.
More...
#include <umlclipboard.h>
Clipboard management class.
This class manages the uml's interaction with the KDE Clipboard. It makes possible to copy stuff from one uml instance to another one.
- Author
- Gustavo Madrigal Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org
◆ UMLCopyType
Enumeration that codes the different types of UML clips.
Enumerator |
---|
clip1 | UMLObjects (not diagrams)
|
clip2 | UMLObjects, UMLListViewItems (not diagrams) and diagrams.
|
clip3 | UMLListViewItems (not diagrams)
|
clip4 | UMLObjects, Associations and UMLWidgets.
|
clip5 | Only Attributes, Operations, Templates and EnumLiterals.
|
◆ UMLClipboard()
UMLClipboard::UMLClipboard |
( |
| ) |
|
◆ ~UMLClipboard()
UMLClipboard::~UMLClipboard |
( |
| ) |
|
|
virtual |
◆ addRelatedWidgets()
void UMLClipboard::addRelatedWidgets |
( |
| ) |
|
|
private |
Fills object list based on a selection of widgets
- Parameters
-
◆ checkItemForCopyType()
void UMLClipboard::checkItemForCopyType |
( |
UMLListViewItem * |
item, |
|
|
bool & |
withDiagrams, |
|
|
bool & |
withObjects, |
|
|
bool & |
onlyAttsOps |
|
) |
| |
|
private |
Searches the child items of a UMLListViewItem to establish which Copy type is to be performed.
- Parameters
-
item | parent of the children |
withDiagrams | includes diagrams |
withObjects | includes objects |
onlyAttsOps | includes only attributes and/or operations |
◆ copy()
QMimeData * UMLClipboard::copy |
( |
bool |
fromView = false | ) |
|
Copy operation.
- Parameters
-
fromView | flag if it is from view |
- Returns
- the mime data
◆ fillObjectListForWidgets()
void UMLClipboard::fillObjectListForWidgets |
( |
const UMLWidgetList & |
widgets | ) |
|
|
private |
Fills object list based on a selection of widgets
- Parameters
-
widgets | the UMLWidgetList to fill |
◆ fillSelectionLists()
Fills the member lists with all the objects and other stuff to be copied to the clipboard.
- Parameters
-
selectedItems | list of selected items |
◆ insertItemChildren()
Traverse children of a UMLListViewItem and add its UMLObjects to the list
- Parameters
-
item | parent of the children to insert |
selectedItems | list of selected items |
- Returns
- success flag
◆ paste()
bool UMLClipboard::paste |
( |
const QMimeData * |
data | ) |
|
Inserts the clipboard's contents.
- Parameters
-
data | Pointer to the MIME format clipboard data. |
- Returns
- True for successful operation.
◆ pasteClip1()
bool UMLClipboard::pasteClip1 |
( |
const QMimeData * |
data | ) |
|
|
private |
If clipboard has mime type application/x-uml-clip1, Pastes the data from the clipboard into the current Doc.
- Parameters
-
◆ pasteClip2()
bool UMLClipboard::pasteClip2 |
( |
const QMimeData * |
data | ) |
|
|
private |
If clipboard has mime type application/x-uml-clip2, Pastes the data from the clipboard into the current Doc.
- Parameters
-
- Returns
- success flag
◆ pasteClip3()
bool UMLClipboard::pasteClip3 |
( |
const QMimeData * |
data | ) |
|
|
private |
If clipboard has mime type application/x-uml-clip3, Pastes the data from the clipboard into the current Doc.
Note: clip3 is only used to determine if the selected items can be dragged onto the view. Pasting only listview items makes no sense. Clip3 is implemented as a fallback-clip when clip 1, 2, 4 or 5 are not applicable. But that should never happen.
Todo: remove clip3 altogether.
- Parameters
-
- Returns
- success flag
◆ pasteClip4()
bool UMLClipboard::pasteClip4 |
( |
const QMimeData * |
data | ) |
|
|
private |
If clipboard has mime type application/x-uml-clip4, Pastes the data from the clipboard into the current Doc.
- Parameters
-
- Returns
- success flag
◆ pasteClip5()
bool UMLClipboard::pasteClip5 |
( |
const QMimeData * |
data | ) |
|
|
private |
If clipboard has mime type application/x-uml-clip5, Pastes the data from the clipboard into the current Doc.
- Parameters
-
- Returns
- success flag
◆ pasteItemAlreadyExists()
void UMLClipboard::pasteItemAlreadyExists |
( |
| ) |
|
|
private |
Gives a `sorry' message box if you're pasting an item which already exists and can't be duplicated.
◆ setCopyType()
Checks the whole list to determine the copy action type to be performed, sets the type in the m_type member variable.
- Parameters
-
selectedItems | list of selected items |
◆ m_AssociationList
◆ m_ItemList
◆ m_ObjectList
◆ m_type
Type of copy operation to perform.
◆ m_ViewList
◆ m_WidgetList
The documentation for this class was generated from the following files: