umbrello API Documentation

umlclipboard.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   copyright (C) 2002-2006                                               *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 #ifndef UMLCLIPBOARD_H
00013 #define UMLCLIPBOARD_H
00014 
00015 #include "../associationwidgetlist.h"
00016 #include "../umlobjectlist.h"
00017 #include "../umllistviewitemlist.h"
00018 #include "../umllistviewitem.h"
00019 #include "../umlviewlist.h"
00020 #include "../umlwidgetlist.h"
00021 
00022 class IDChangeLog;
00023 class QMimeSource;
00024 class UMLDrag;
00025 
00035 class UMLClipboard : public QObject {
00036 public:
00040     UMLClipboard();
00041 
00045     virtual ~UMLClipboard();
00046 
00053     bool paste(QMimeSource* Data);
00054 
00061     QMimeSource* copy(bool fromView = false);
00062 
00064     enum UMLCopyType
00065     {
00066         clip1 = 1, 
00067         clip2 = 2, 
00068         clip3 = 3, 
00069         clip4 = 4, 
00070         clip5 = 5  
00071     };
00072 
00073 private:
00080     void CleanAssociations(AssociationWidgetList& associations);
00081 
00089     bool pasteClip1(QMimeSource* data);
00090 
00098     bool pasteClip2(QMimeSource* data);
00099 
00107     bool pasteClip3(QMimeSource* data);
00108 
00116     bool pasteClip4(QMimeSource* data);
00117 
00125     bool pasteClip5(QMimeSource* data);
00126 
00136     bool checkPasteWidgets(UMLWidgetList & widgetList);
00137 
00138     UMLObjectList m_ObjectList;
00139     UMLListViewItemList m_ItemList;
00140     UMLWidgetList m_WidgetList;
00141     AssociationWidgetList m_AssociationList;
00142     UMLViewList m_ViewList;
00143     UMLCopyType m_type; 
00144 
00145 private:
00150     bool fillSelectionLists(UMLListViewItemList& SelectedItems);
00151 
00157     void setCopyType(UMLListViewItemList& SelectedItems);
00158 
00163     void checkItemForCopyType(UMLListViewItem* Item,
00164                               bool& WithDiagrams,
00165                               bool& WithObjects,
00166                               bool& OnlyAttsOps);
00167 
00171     bool insertItemChildren(UMLListViewItem* Item,
00172                             UMLListViewItemList& SelectedItems);
00173 
00180     bool insertItemChildren(UMLListViewItem* item);
00181 
00185     bool pasteChildren(UMLListViewItem* parent, IDChangeLog *chgLog);
00186 
00191     void pasteItemAlreadyExists();
00192 };
00193 
00194 #endif
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:00 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003