summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/umlviewimageexportermodel.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /umbrello/umbrello/umlviewimageexportermodel.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/umlviewimageexportermodel.cpp')
-rw-r--r--umbrello/umbrello/umlviewimageexportermodel.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/umbrello/umbrello/umlviewimageexportermodel.cpp b/umbrello/umbrello/umlviewimageexportermodel.cpp
index 7f34c104..d99c85f4 100644
--- a/umbrello/umbrello/umlviewimageexportermodel.cpp
+++ b/umbrello/umbrello/umlviewimageexportermodel.cpp
@@ -15,7 +15,7 @@
// system includes
#include <math.h>
-// include files for Qt
+// include files for TQt
#include <tqstringlist.h>
#include <tqrect.h>
#include <tqimage.h>
@@ -83,7 +83,7 @@ TQString UMLViewImageExporterModel::imageTypeToMimeType(const TQString& imageTyp
if (TQString("xpm") == imgType) return "image/x-xpm";
if (TQString("eps") == imgType) return "image/x-eps";
if (TQString("svg") == imgType) return "image/svg+xml";
- return TQString::null;
+ return TQString();
}
TQString UMLViewImageExporterModel::mimeTypeToImageType(const TQString& mimeType) {
@@ -97,7 +97,7 @@ TQString UMLViewImageExporterModel::mimeTypeToImageType(const TQString& mimeType
if (TQString("image/x-xpm") == mimeType) return "xpm";
if (TQString("image/x-eps") == mimeType) return "eps";
if (TQString("image/svg+xml") == mimeType) return "svg";
- return TQString::null;
+ return TQString();
}
TQStringList UMLViewImageExporterModel::exportAllViews(const TQString &imageType, const KURL &directory, bool useFolders) const {
@@ -123,7 +123,7 @@ TQStringList UMLViewImageExporterModel::exportAllViews(const TQString &imageType
TQString UMLViewImageExporterModel::exportView(UMLView* view, const TQString &imageType, const KURL &url) const {
// create the needed directories
if (!prepareDirectory(url)) {
- return i18n("Can not create directory: %1").arg(url.directory());
+ return i18n("Can not create directory: %1").tqarg(url.directory());
}
// The fileName will be used when exporting the image. If the url isn't local,
@@ -148,19 +148,19 @@ TQString UMLViewImageExporterModel::exportView(UMLView* view, const TQString &im
// exporting the view to the file
if (!exportViewTo(view, imageType, fileName)) {
tmpFile.unlink();
- return i18n("A problem occured while saving diagram in %1").arg(fileName);
+ return i18n("A problem occured while saving diagram in %1").tqarg(fileName);
}
// if the file wasn't local, upload the temp file to the target
if (!url.isLocalFile()) {
if (!KIO::NetAccess::upload(tmpFile.name(), url, UMLApp::app())) {
tmpFile.unlink();
- return i18n("There was a problem saving file: %1").arg(url.path());
+ return i18n("There was a problem saving file: %1").tqarg(url.path());
}
} //!isLocalFile
tmpFile.unlink();
- return TQString::null;
+ return TQString();
}
TQString UMLViewImageExporterModel::getDiagramFileName(UMLView *view, const TQString &imageType, bool useFolders /* = false */) const {
@@ -174,14 +174,14 @@ TQString UMLViewImageExporterModel::getDiagramFileName(UMLView *view, const TQSt
UMLListView *listView = UMLApp::app()->getListView();
UMLListViewItem* listViewItem = listView->findItem(view->getID());
// skip the name of the first item because it's the View
- listViewItem = static_cast<UMLListViewItem*>(listViewItem->parent());
+ listViewItem = static_cast<UMLListViewItem*>(listViewItem->tqparent());
// Relies on the tree structure of the UMLListView. There are a base "Views" folder
- // and five children, one for each view type (Logical, use case, components, deployment
+ // and five tqchildren, one for each view type (Logical, use case, components, deployment
// and entity relationship)
while (listView->rootView(listViewItem->getType()) == NULL) {
name.insert(0, listViewItem->getText() + '/');
- listViewItem = static_cast<UMLListViewItem*>(listViewItem->parent());
+ listViewItem = static_cast<UMLListViewItem*>(listViewItem->tqparent());
if (listViewItem == NULL)
break;
}
@@ -193,7 +193,7 @@ bool UMLViewImageExporterModel::prepareDirectory(const KURL &url) const {
KURL directory = url;
directory.setPath("");
- // creates the directory and any needed parent directories
+ // creates the directory and any needed tqparent directories
TQStringList dirs = TQStringList::split(TQDir::separator(), url.directory());
for (TQStringList::ConstIterator it = dirs.begin() ; it != dirs.end(); ++it ) {
directory.addPath(*it);
@@ -298,7 +298,7 @@ bool UMLViewImageExporterModel::fixEPS(const TQString &fileName, const TQRect& r
const int pos = rx.search(fileContent);
if (pos < 0) {
kError() << "UMLViewImageExporterModel::fixEPS(" << fileName
- << "): cannot find %%BoundingBox" << endl;
+ << "): cannot tqfind %%BoundingBox" << endl;
return false;
}
@@ -319,8 +319,8 @@ bool UMLViewImageExporterModel::fixEPS(const TQString &fileName, const TQRect& r
const int bottom = int(floor(epstop)) - rect.height() + 1;
// modify content
- fileContent.replace(pos,rx.cap(0).length(),
- TQString("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(bottom).arg(right).arg(top));
+ fileContent.tqreplace(pos,rx.cap(0).length(),
+ TQString("%%BoundingBox: %1 %2 %3 %4").tqarg(left).tqarg(bottom).tqarg(right).tqarg(top));
ts << fileContent;
epsfile.close();