summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/clipboard
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /umbrello/umbrello/clipboard
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/clipboard')
-rw-r--r--umbrello/umbrello/clipboard/idchangelog.h14
-rw-r--r--umbrello/umbrello/clipboard/umlclipboard.cpp22
-rw-r--r--umbrello/umbrello/clipboard/umlclipboard.h18
-rw-r--r--umbrello/umbrello/clipboard/umldrag.cpp258
-rw-r--r--umbrello/umbrello/clipboard/umldrag.h46
5 files changed, 179 insertions, 179 deletions
diff --git a/umbrello/umbrello/clipboard/idchangelog.h b/umbrello/umbrello/clipboard/idchangelog.h
index 1d92cd0d..bcb337bd 100644
--- a/umbrello/umbrello/clipboard/idchangelog.h
+++ b/umbrello/umbrello/clipboard/idchangelog.h
@@ -22,8 +22,8 @@
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include "../umlnamespace.h"
@@ -105,15 +105,15 @@ private:
private:
Uml::IDType m_x, m_y;
};
-class PointArray : QValueVector<Point> {
+class PointArray : TQValueVector<Point> {
public:
void setPoint(uint i, const Uml::IDType &x, const Uml::IDType &y) {
Point point(x, y);
- QValueVector<Point>::at(i) = point;
+ TQValueVector<Point>::at(i) = point;
}
- const Point& point( uint i ) const { return QValueVector<Point>::at(i); }
- uint size() const { return QValueVector<Point>::size(); }
- bool resize( uint size ) { QValueVector<Point>::resize(size); return true; }
+ const Point& point( uint i ) const { return TQValueVector<Point>::at(i); }
+ uint size() const { return TQValueVector<Point>::size(); }
+ bool resize( uint size ) { TQValueVector<Point>::resize(size); return true; }
};
PointArray m_LogArray;
diff --git a/umbrello/umbrello/clipboard/umlclipboard.cpp b/umbrello/umbrello/clipboard/umlclipboard.cpp
index c65c576e..069ba84b 100644
--- a/umbrello/umbrello/clipboard/umlclipboard.cpp
+++ b/umbrello/umbrello/clipboard/umlclipboard.cpp
@@ -41,7 +41,7 @@ UMLClipboard::UMLClipboard() {
UMLClipboard::~UMLClipboard() {
}
-QMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
+TQMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
//Clear previous copied data
m_AssociationList.clear();
m_ItemList.clear();
@@ -49,7 +49,7 @@ QMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
m_ViewList.clear();
UMLDrag *data = 0;
- QPixmap* png = 0;
+ TQPixmap* png = 0;
UMLListView * listView = UMLApp::app()->getListView();
UMLListViewItemList selectedItems;
@@ -131,10 +131,10 @@ QMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
break;
}
- return (QMimeSource*)data;
+ return (TQMimeSource*)data;
}
-bool UMLClipboard::paste(QMimeSource* data) {
+bool UMLClipboard::paste(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
bool result = false;
doc->beginPaste();
@@ -337,7 +337,7 @@ void UMLClipboard::CleanAssociations(AssociationWidgetList& associations) {
/** If clipboard has mime type application/x-uml-clip1,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip1(QMimeSource* data) {
+bool UMLClipboard::pasteClip1(TQMimeSource* data) {
UMLObjectList objects;
if (! UMLDrag::decodeClip1(data, objects)) {
return false;
@@ -364,7 +364,7 @@ bool UMLClipboard::pasteClip1(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip2,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip2(QMimeSource* data) {
+bool UMLClipboard::pasteClip2(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLListViewItemList itemdatalist;
UMLObjectList objects;
@@ -421,7 +421,7 @@ bool UMLClipboard::pasteClip2(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip3,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip3(QMimeSource* data) {
+bool UMLClipboard::pasteClip3(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLListViewItemList itemdatalist;
UMLListViewItem* item = 0;
@@ -453,7 +453,7 @@ bool UMLClipboard::pasteClip3(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip4,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip4(QMimeSource* data) {
+bool UMLClipboard::pasteClip4(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLObjectList objects;
@@ -563,7 +563,7 @@ bool UMLClipboard::pasteClip4(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip5,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip5(QMimeSource* data) {
+bool UMLClipboard::pasteClip5(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLListView *listView = UMLApp::app()->getListView();
UMLListViewItem* lvitem = dynamic_cast<UMLListViewItem *>( listView->currentItem() );
@@ -601,7 +601,7 @@ bool UMLClipboard::pasteClip5(QMimeSource* data) {
{
UMLObject *exist = parent->findChildObject(obj->getName(), Uml::ot_Attribute);
if (exist) {
- QString newName = parent->uniqChildName(Uml::ot_Attribute, obj->getName());
+ TQString newName = parent->uniqChildName(Uml::ot_Attribute, obj->getName());
obj->setName(newName);
}
UMLAttribute *att = static_cast<UMLAttribute*>(obj);
@@ -618,7 +618,7 @@ bool UMLClipboard::pasteClip5(QMimeSource* data) {
UMLOperation *op = static_cast<UMLOperation*>(obj);
UMLOperation *exist = parent->checkOperationSignature(op->getName(), op->getParmList());
if (exist) {
- QString newName = parent->uniqChildName(Uml::ot_Operation, obj->getName());
+ TQString newName = parent->uniqChildName(Uml::ot_Operation, obj->getName());
op->setName(newName);
}
if (parent->addOperation(op, idchanges)) {
diff --git a/umbrello/umbrello/clipboard/umlclipboard.h b/umbrello/umbrello/clipboard/umlclipboard.h
index 9be92111..a4da299b 100644
--- a/umbrello/umbrello/clipboard/umlclipboard.h
+++ b/umbrello/umbrello/clipboard/umlclipboard.h
@@ -31,7 +31,7 @@ class QMimeSource;
* @author Gustavo Madrigal
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLClipboard : public QObject {
+class UMLClipboard : public TQObject {
Q_OBJECT
public:
/**
@@ -50,15 +50,15 @@ public:
* @param Data Pointer to the MIME format clipboard data.
* @return True for successful operation.
*/
- bool paste(QMimeSource* Data);
+ bool paste(TQMimeSource* Data);
/**
* Copies the selected stuff from the list view or current diagram
- * to a QMimeSource ready to be put in the clipboard.
+ * to a TQMimeSource ready to be put in the clipboard.
*
* @return Pointer to the created clipboard data.
*/
- QMimeSource* copy(bool fromView = false);
+ TQMimeSource* copy(bool fromView = false);
/// Enumeration that codes the different types of UML clips.
enum UMLCopyType
@@ -86,7 +86,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip1(QMimeSource* data);
+ bool pasteClip1(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip2,
@@ -95,7 +95,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip2(QMimeSource* data);
+ bool pasteClip2(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip3,
@@ -104,7 +104,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip3(QMimeSource* data);
+ bool pasteClip3(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip4,
@@ -113,7 +113,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip4(QMimeSource* data);
+ bool pasteClip4(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip5,
@@ -122,7 +122,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip5(QMimeSource* data);
+ bool pasteClip5(TQMimeSource* data);
/**
* When pasting widgets see if they can be pasted on
diff --git a/umbrello/umbrello/clipboard/umldrag.cpp b/umbrello/umbrello/clipboard/umldrag.cpp
index f9fa6629..27f8dde2 100644
--- a/umbrello/umbrello/clipboard/umldrag.cpp
+++ b/umbrello/umbrello/clipboard/umldrag.cpp
@@ -13,7 +13,7 @@
#include "umldrag.h"
// qt/kde includes
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
// local includes
@@ -34,21 +34,21 @@
#define nfmt 4
class UMLDragPrivate {
public:
- QCString fmt[nfmt];
- QCString subtype;
- QByteArray enc[nfmt];
+ TQCString fmt[nfmt];
+ TQCString subtype;
+ TQByteArray enc[nfmt];
UMLDragPrivate() {
setSubType("clip1", 0);
}
- void setType(const QCString& st, int index) {
+ void setType(const TQCString& st, int index) {
if (index < nfmt) {
fmt[index] = st.lower();
}
}
- void setSubType(const QCString& st, int index) {
+ void setSubType(const TQCString& st, int index) {
if (index < nfmt) {
subtype = st.lower();
fmt[index] = "application/x-uml-";
@@ -64,39 +64,39 @@ public:
}
};
-UMLDrag::UMLDrag(UMLObjectList& objects, QWidget* dragSource /*= 0*/, const char* name /*= 0*/)
- : QDragObject(dragSource, name) {
+UMLDrag::UMLDrag(UMLObjectList& objects, TQWidget* dragSource /*= 0*/, const char* name /*= 0*/)
+ : TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip1(objects);
}
UMLDrag::UMLDrag(UMLObjectList& objects, UMLListViewItemList& umlListViewItems, UMLViewList& diagrams,
- QWidget* dragSource /*= 0*/, const char* name /*= 0*/ ): QDragObject(dragSource, name) {
+ TQWidget* dragSource /*= 0*/, const char* name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip2(objects, umlListViewItems, diagrams);
}
-UMLDrag::UMLDrag(UMLListViewItemList& umlListViewItems, QWidget* dragSource /*= 0*/,
- const char* name /*= 0*/ ): QDragObject(dragSource, name) {
+UMLDrag::UMLDrag(UMLListViewItemList& umlListViewItems, TQWidget* dragSource /*= 0*/,
+ const char* name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip3(umlListViewItems);
}
UMLDrag::UMLDrag(UMLObjectList& objects,
UMLWidgetList& widgets, AssociationWidgetList& associationDatas,
- QPixmap& pngImage, Uml::Diagram_Type dType, QWidget * dragSource /*= 0*/,
- const char * name /*= 0*/ ): QDragObject(dragSource, name) {
+ TQPixmap& pngImage, Uml::Diagram_Type dType, TQWidget * dragSource /*= 0*/,
+ const char * name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip4(objects, widgets, associationDatas, pngImage, dType);
}
UMLDrag::UMLDrag(UMLObjectList& objects, int,
- QWidget* /*dragSource = 0*/, const char* /*name = 0*/ ) {
+ TQWidget* /*dragSource = 0*/, const char* /*name = 0*/ ) {
data = new UMLDragPrivate;
setUMLDataClip5(objects);
}
-UMLDrag::UMLDrag(QWidget* dragSource /*= 0*/, const char * name /*= 0*/ ): QDragObject(dragSource, name) {
+UMLDrag::UMLDrag(TQWidget* dragSource /*= 0*/, const char * name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
}
@@ -104,22 +104,22 @@ UMLDrag::~UMLDrag() {
delete data;
}
-void UMLDrag::setSubType(const QCString& string, int index) {
+void UMLDrag::setSubType(const TQCString& string, int index) {
data->setSubType(string, index);
}
-void UMLDrag::setEncodedData(const QByteArray& encodedData, int index) {
+void UMLDrag::setEncodedData(const TQByteArray& encodedData, int index) {
data->enc[index] = encodedData.copy();
}
-QByteArray UMLDrag::encodedData(const char* dataName) const {
- QString str(dataName);
+TQByteArray UMLDrag::encodedData(const char* dataName) const {
+ TQString str(dataName);
for (int i = 0; i < 4; i++) {
if ( !qstricmp(dataName,data->fmt[i]) ) {
return data->enc[i];
}
}
- return QByteArray();
+ return TQByteArray();
}
const char* UMLDrag::format(int index) const {
@@ -130,10 +130,10 @@ const char* UMLDrag::format(int index) const {
void UMLDrag::setUMLDataClip1(UMLObjectList& objects) {
setSubType("clip1", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -143,7 +143,7 @@ void UMLDrag::setUMLDataClip1(UMLObjectList& objects) {
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
setEncodedData(domDoc.toString().utf8(), 0);
@@ -153,10 +153,10 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
UMLViewList& diagrams) {
setSubType("clip2", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -166,7 +166,7 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement viewsTag = domDoc.createElement("umlviews");
+ TQDomElement viewsTag = domDoc.createElement("umlviews");
xmiclip.appendChild(viewsTag);
UMLViewListIt diagram_it(diagrams);
@@ -176,7 +176,7 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
view->saveToXMI(domDoc, viewsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
UMLListViewItemListIt item_it2(umlListViewItems);
@@ -191,11 +191,11 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
void UMLDrag::setUMLDataClip3(UMLListViewItemList& umlListViewItems) {
setSubType("clip3", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
UMLListViewItemListIt item_it2(umlListViewItems);
@@ -208,14 +208,14 @@ void UMLDrag::setUMLDataClip3(UMLListViewItemList& umlListViewItems) {
}
void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, AssociationWidgetList& associations,
- QPixmap& pngImage, Uml::Diagram_Type dType ) {
+ TQPixmap& pngImage, Uml::Diagram_Type dType ) {
setSubType("clip4", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
xmiclip.setAttribute("diagramtype", dType);
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -225,7 +225,7 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement widgetsTag = domDoc.createElement("widgets");
+ TQDomElement widgetsTag = domDoc.createElement("widgets");
xmiclip.appendChild(widgetsTag);
UMLWidgetListIt widget_it(widgets);
@@ -235,7 +235,7 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
widget->saveToXMI(domDoc, widgetsTag);
}
- QDomElement associationWidgetsTag = domDoc.createElement("associations");
+ TQDomElement associationWidgetsTag = domDoc.createElement("associations");
xmiclip.appendChild(associationWidgetsTag);
AssociationWidgetListIt associations_it(associations);
@@ -245,16 +245,16 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
association->saveToXMI(domDoc, associationWidgetsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
setEncodedData(domDoc.toString().utf8(), 0);
data->setType("image/PNG", 1);
long l_size = (pngImage.convertToImage()).numBytes();
- QByteArray clipdata;
+ TQByteArray clipdata;
clipdata.resize(l_size);
- QDataStream clipstream(clipdata, IO_WriteOnly);
+ TQDataStream clipstream(clipdata, IO_WriteOnly);
clipstream << pngImage;
setEncodedData(clipdata, 1);
}
@@ -262,10 +262,10 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
void UMLDrag::setUMLDataClip5(UMLObjectList& objects) {
setSubType("clip5", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -275,32 +275,32 @@ void UMLDrag::setUMLDataClip5(UMLObjectList& objects) {
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
setEncodedData(domDoc.toString().utf8(), 0);
}
-bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects) {
+bool UMLDrag::decodeClip1(const TQMimeSource* mimeSource, UMLObjectList& objects) {
UMLDoc* doc = UMLApp::app()->getDocument();
if ( !mimeSource->provides("application/x-uml-clip1") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip1");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip1");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -312,16 +312,16 @@ bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects)
UMLListView *listView = UMLApp::app()->getListView();
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
if ( element.isNull() ) {
return false;//return ok as it means there is no umlobjects
}
UMLObject* pObject = 0;
while ( !element.isNull() ) {
pObject = 0;
- QString type = element.tagName();
+ TQString type = element.tagName();
if (type == "UML:Association") {
objectElement = objectElement.nextSibling();
element = objectElement.toElement();
@@ -354,7 +354,7 @@ bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects)
return false;
}
Uml::Object_Type type = pObject->getBaseType();
- QString newName = Model_Utils::uniqObjectName(type, pObject->getUMLPackage(),
+ TQString newName = Model_Utils::uniqObjectName(type, pObject->getUMLPackage(),
pObject->getName());
pObject->setName(newName);
/****************************************************************/
@@ -370,27 +370,27 @@ bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects)
return true;
}
-bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
+bool UMLDrag::decodeClip2(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLListViewItemList& umlListViewItems, UMLViewList& diagrams) {
if ( !mimeSource->provides("application/x-uml-clip2") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip2");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip2");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -400,16 +400,16 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
if ( element.isNull() ) {
return false;//return ok as it means there is no umlobjects
}
UMLObject* pObject = 0;
while ( !element.isNull() ) {
pObject = 0;
- QString type = element.tagName();
+ TQString type = element.tagName();
if (type != "UML:Association") {
pObject = Object_Factory::makeObjectFromXMI(type);
@@ -428,16 +428,16 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//UMLViews (diagrams)
- QDomNode umlviewsNode = objectsNode.nextSibling();
- QDomNode diagramNode = umlviewsNode.firstChild();
- QDomElement diagramElement = diagramNode.toElement();
+ TQDomNode umlviewsNode = objectsNode.nextSibling();
+ TQDomNode diagramNode = umlviewsNode.firstChild();
+ TQDomElement diagramElement = diagramNode.toElement();
if ( diagramElement.isNull() ) {
kWarning() << "no diagrams in XMI clip" << endl;
return false;
}
UMLListView *listView = UMLApp::app()->getListView();
while ( !diagramElement.isNull() ) {
- QString type = diagramElement.attribute("type", "0");
+ TQString type = diagramElement.attribute("type", "0");
Uml::Diagram_Type dt = (Uml::Diagram_Type)type.toInt();
UMLListViewItem *parent = listView->findFolderForDiagram(dt);
if (parent == NULL)
@@ -456,9 +456,9 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//listviewitems
- QDomNode listItemNode = umlviewsNode.nextSibling();
- QDomNode listItems = listItemNode.firstChild();
- QDomElement listItemElement = listItems.toElement();
+ TQDomNode listItemNode = umlviewsNode.nextSibling();
+ TQDomNode listItems = listItemNode.firstChild();
+ TQDomElement listItemElement = listItems.toElement();
if ( listItemElement.isNull() ) {
kWarning() << "no listitems in XMI clip" << endl;
return false;
@@ -480,28 +480,28 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
return true;
}
-bool UMLDrag::getClip3TypeAndID(const QMimeSource* mimeSource,
+bool UMLDrag::getClip3TypeAndID(const TQMimeSource* mimeSource,
LvTypeAndID_List& typeAndIdList)
{
if ( !mimeSource->provides("application/x-uml-clip3") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
if ( !payload.size() ) {
return false;
}
- QTextStream clipdata(payload, IO_ReadOnly);
- QString xmiClip = QString::fromUtf8(payload);
+ TQTextStream clipdata(payload, IO_ReadOnly);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "getClip3Type: Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -510,20 +510,20 @@ bool UMLDrag::getClip3TypeAndID(const QMimeSource* mimeSource,
return false;
}
- QDomNode listItemNode = xmiClipNode.firstChild();
- QDomNode listItems = listItemNode.firstChild();
- QDomElement listItemElement = listItems.toElement();
+ TQDomNode listItemNode = xmiClipNode.firstChild();
+ TQDomNode listItems = listItemNode.firstChild();
+ TQDomElement listItemElement = listItems.toElement();
if ( listItemElement.isNull() ) {
kWarning() << "getClip3Type: no listitems in XMI clip" << endl;
return false;
}
while ( !listItemElement.isNull() ) {
- QString typeStr = listItemElement.attribute( "type", "-1" );
+ TQString typeStr = listItemElement.attribute( "type", "-1" );
if (typeStr == "-1") {
kDebug() << "getClip3Type: bad type" << endl;
return false;
}
- QString idStr = listItemElement.attribute( "id", "-1" );
+ TQString idStr = listItemElement.attribute( "id", "-1" );
if (idStr == "-1") {
kDebug() << "getClip3Type: bad id" << endl;
return false;
@@ -538,27 +538,27 @@ bool UMLDrag::getClip3TypeAndID(const QMimeSource* mimeSource,
return true;
}
-bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& umlListViewItems,
+bool UMLDrag::decodeClip3(const TQMimeSource* mimeSource, UMLListViewItemList& umlListViewItems,
const UMLListView* parentListView){
if ( !mimeSource->provides("application/x-uml-clip3") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
if ( !payload.size() ) {
return false;
}
- QTextStream clipdata(payload, IO_ReadOnly);
- QString xmiClip = QString::fromUtf8(payload);
+ TQTextStream clipdata(payload, IO_ReadOnly);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -568,9 +568,9 @@ bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& um
}
//listviewitems
- QDomNode listItemNode = xmiClipNode.firstChild();
- QDomNode listItems = listItemNode.firstChild();
- QDomElement listItemElement = listItems.toElement();
+ TQDomNode listItemNode = xmiClipNode.firstChild();
+ TQDomNode listItems = listItemNode.firstChild();
+ TQDomElement listItemElement = listItems.toElement();
if ( listItemElement.isNull() ) {
kWarning() << "no listitems in XMI clip" << endl;
return false;
@@ -578,7 +578,7 @@ bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& um
while ( !listItemElement.isNull() ) {
// Get the ListView_Type beforehand so that we can construct an
// UMLListViewItem instance.
- QString type = listItemElement.attribute( "type", "-1" );
+ TQString type = listItemElement.attribute( "type", "-1" );
if (type == "-1") {
kDebug() << "Pech gehabt" << endl;
continue;
@@ -596,28 +596,28 @@ bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& um
return true;
}
-bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
+bool UMLDrag::decodeClip4(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLWidgetList& widgets,
AssociationWidgetList& associations, Uml::Diagram_Type & dType) {
if ( !mimeSource->provides("application/x-uml-clip4") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip4");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip4");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -629,12 +629,12 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
dType = (Uml::Diagram_Type)(root.attribute("diagramtype", "0").toInt());
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
while ( !element.isNull() ) {
UMLObject* pObject = 0;
- QString type = element.tagName();
+ TQString type = element.tagName();
//FIXME associations don't load
if (type == "UML:Association")
continue;
@@ -656,9 +656,9 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//widgets
- QDomNode widgetsNode = objectsNode.nextSibling();
- QDomNode widgetNode = widgetsNode.firstChild();
- QDomElement widgetElement = widgetNode.toElement();
+ TQDomNode widgetsNode = objectsNode.nextSibling();
+ TQDomNode widgetNode = widgetsNode.firstChild();
+ TQDomElement widgetElement = widgetNode.toElement();
if ( widgetElement.isNull() ) {
kWarning() << "no widgets in XMI clip" << endl;
return false;
@@ -676,9 +676,9 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//AssociationWidgets
- QDomNode associationWidgetsNode = widgetsNode.nextSibling();
- QDomNode associationWidgetNode = associationWidgetsNode.firstChild();
- QDomElement associationWidgetElement = associationWidgetNode.toElement();
+ TQDomNode associationWidgetsNode = widgetsNode.nextSibling();
+ TQDomNode associationWidgetNode = associationWidgetsNode.firstChild();
+ TQDomElement associationWidgetElement = associationWidgetNode.toElement();
while ( !associationWidgetElement.isNull() ) {
AssociationWidget* associationWidget = new AssociationWidget(view);
if (associationWidget->loadFromXMI(associationWidgetElement, widgets))
@@ -694,26 +694,26 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
return true;
}
-bool UMLDrag::decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
+bool UMLDrag::decodeClip5(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLClassifier* newParent) {
if ( !mimeSource->provides("application/x-uml-clip5") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip5");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip5");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -723,14 +723,14 @@ bool UMLDrag::decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
if ( element.isNull() ) {
return false;//return ok as it means there is no umlobjects
}
while ( !element.isNull() ) {
- QString type = element.tagName();
+ TQString type = element.tagName();
UMLClassifierListItem *pObject = newParent->makeChildObject(type);
if( !pObject ) {
kWarning() << "Given wrong type of umlobject to create:" << type << endl;
@@ -749,7 +749,7 @@ bool UMLDrag::decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
return true;
}
-int UMLDrag::getCodingType(const QMimeSource* mimeSource) {
+int UMLDrag::getCodingType(const TQMimeSource* mimeSource) {
int result = 0;
if (mimeSource->provides("application/x-uml-clip1") ) {
result = 1;
diff --git a/umbrello/umbrello/clipboard/umldrag.h b/umbrello/umbrello/clipboard/umldrag.h
index a56a138e..97cbffb5 100644
--- a/umbrello/umbrello/clipboard/umldrag.h
+++ b/umbrello/umbrello/clipboard/umldrag.h
@@ -12,9 +12,9 @@
#ifndef UMLDRAG_H
#define UMLDRAG_H
-#include <qdragobject.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqdragobject.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "../umllistviewitemlist.h"
#include "../associationwidgetlist.h"
@@ -35,7 +35,7 @@ class UMLListView;
class UMLDragPrivate;
class UMLClassifier;
-class Q_EXPORT UMLDrag : public QDragObject {
+class Q_EXPORT UMLDrag : public TQDragObject {
Q_OBJECT
UMLDragPrivate* data;
public:
@@ -45,7 +45,7 @@ public:
* the ListView but no diagrams to be copied, Mime type =
* "application/x-uml-clip1
*/
- explicit UMLDrag(UMLObjectList& Objects,QWidget* dragSource = 0, const char* name = 0 );
+ explicit UMLDrag(UMLObjectList& Objects,TQWidget* dragSource = 0, const char* name = 0 );
/**
* For use when the user selects UML Object and Diagrams
@@ -53,14 +53,14 @@ public:
* "application/x-uml-clip2
*/
UMLDrag(UMLObjectList &Objects, UMLListViewItemList& UMLListViewItems,
- UMLViewList& Diagrams, QWidget * dragSource = 0, const char * name = 0 );
+ UMLViewList& Diagrams, TQWidget * dragSource = 0, const char * name = 0 );
/**
* For use when the user selects only empty folders from
* the ListView to be copied, Mime type =
* "application/x-uml-clip3
*/
- explicit UMLDrag(UMLListViewItemList& UMLListViewItems, QWidget* dragSource = 0,
+ explicit UMLDrag(UMLListViewItemList& UMLListViewItems, TQWidget* dragSource = 0,
const char* name = 0 );
/*
@@ -71,7 +71,7 @@ public:
* "application/x-uml-clip4
*/
UMLDrag(UMLObjectList& Objects, UMLWidgetList& Widgets, AssociationWidgetList& Associations,
- QPixmap& PngImage, Uml::Diagram_Type dType, QWidget* dragSource = 0,
+ TQPixmap& PngImage, Uml::Diagram_Type dType, TQWidget* dragSource = 0,
const char* name = 0 );
/**
@@ -79,12 +79,12 @@ public:
* Attributes from the ListView, Mime type =
* "application/x-uml-clip5
*/
- UMLDrag(UMLObjectList& Objects, int, QWidget* dragSource = 0, const char* name = 0);
+ UMLDrag(UMLObjectList& Objects, int, TQWidget* dragSource = 0, const char* name = 0);
/**
* Constructor
*/
- explicit UMLDrag(QWidget* dragSource = 0, const char* name = 0);
+ explicit UMLDrag(TQWidget* dragSource = 0, const char* name = 0);
/**
* Deconstructor
@@ -118,7 +118,7 @@ public:
*/
void setUMLDataClip4(UMLObjectList& Objects,
UMLWidgetList& WidgetDatas,
- AssociationWidgetList& Associations, QPixmap& PngImage,
+ AssociationWidgetList& Associations, TQPixmap& PngImage,
Uml::Diagram_Type dType);
/**
@@ -131,12 +131,12 @@ public:
* Sets the type of the clip to "application/x-uml-" + sub
* sub should be clip[1-5]
*/
- virtual void setSubType(const QCString& sub, int index);
+ virtual void setSubType(const TQCString& sub, int index);
/**
* Sets the data in the clip
*/
- virtual void setEncodedData(const QByteArray&, int index);
+ virtual void setEncodedData(const TQByteArray&, int index);
/**
* Returns the type set by setSubType
@@ -148,7 +148,7 @@ public:
*
* @param dataName the name of the data type to return
*/
- virtual QByteArray encodedData(const char* dataName) const;
+ virtual TQByteArray encodedData(const char* dataName) const;
/**
* For use when the user selects only UML Objects
@@ -156,14 +156,14 @@ public:
* copied, decodes Mime type =
* "application/x-uml-clip1
*/
- static bool decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects);
+ static bool decodeClip1(const TQMimeSource* mimeSource, UMLObjectList& objects);
/**
* For use when the user selects UML Object and Diagrams
* from the ListView to be copied, decodes Mime type =
* "application/x-uml-clip2
*/
- static bool decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
+ static bool decodeClip2(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLListViewItemList& umlListViewItems,
UMLViewList& diagrams);
@@ -172,7 +172,7 @@ public:
* the ListView to be copied, decodes Mime * type =
* "application/x-uml-clip3
*/
- static bool decodeClip3(const QMimeSource* mimeSource,
+ static bool decodeClip3(const TQMimeSource* mimeSource,
UMLListViewItemList& umlListViewItems,
const UMLListView* parentListView=0);
@@ -180,8 +180,8 @@ public:
Uml::ListView_Type type;
Uml::IDType id;
};
- typedef QPtrList<LvTypeAndID> LvTypeAndID_List;
- typedef QPtrListIterator<LvTypeAndID> LvTypeAndID_It;
+ typedef TQPtrList<LvTypeAndID> LvTypeAndID_List;
+ typedef TQPtrListIterator<LvTypeAndID> LvTypeAndID_It;
/**
* Return just the LvTypeAndID of a Clip3.
@@ -190,7 +190,7 @@ public:
* @param typeAndIdList The LvTypeAndID_List decoded from the source.
* @return True if decoding was successful.
*/
- static bool getClip3TypeAndID(const QMimeSource* mimeSource,
+ static bool getClip3TypeAndID(const TQMimeSource* mimeSource,
LvTypeAndID_List& typeAndIdList);
/**
@@ -200,7 +200,7 @@ public:
* also its respective ListView Items, * decodes Mime
* type = "application/x-uml-clip4
*/
- static bool decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
+ static bool decodeClip4(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLWidgetList& widgets,
AssociationWidgetList& associations,
Uml::Diagram_Type & dType);
@@ -210,13 +210,13 @@ public:
* Operations from the ListView * copied, decodes Mime
* type = "application/x-uml-clip5
*/
- static bool decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
+ static bool decodeClip5(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLClassifier *newParent);
/**
* Converts application/x-uml-clip[1-5] clip type to an integer
*/
- static int getCodingType(const QMimeSource* mimeSource);
+ static int getCodingType(const TQMimeSource* mimeSource);
};