summaryrefslogtreecommitdiffstats
path: root/kpresenter/autoformEdit/ATFInterpreter.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kpresenter/autoformEdit/ATFInterpreter.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpresenter/autoformEdit/ATFInterpreter.cpp')
-rw-r--r--kpresenter/autoformEdit/ATFInterpreter.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kpresenter/autoformEdit/ATFInterpreter.cpp b/kpresenter/autoformEdit/ATFInterpreter.cpp
index a32ff7ea..ff2b1037 100644
--- a/kpresenter/autoformEdit/ATFInterpreter.cpp
+++ b/kpresenter/autoformEdit/ATFInterpreter.cpp
@@ -20,8 +20,8 @@
#include "ATFInterpreter.h"
-#include <qvaluestack.h>
-#include <qfile.h>
+#include <tqvaluestack.h>
+#include <tqfile.h>
const char ATFInterpreter::PNT_BG[] = "POINT {";
const char ATFInterpreter::X_BG[] = "X {";
@@ -92,10 +92,10 @@ ATFInterpreter::~ATFInterpreter()
attrLs.setAutoDelete( true );
}
-void ATFInterpreter::load(const QString & fileName)
+void ATFInterpreter::load(const TQString & fileName)
{
- QString line;
- QFile ptA(fileName);
+ TQString line;
+ TQFile ptA(fileName);
coordList.clear();
lines.clear();
@@ -112,14 +112,14 @@ void ATFInterpreter::load(const QString & fileName)
}
}
-QPointArray ATFInterpreter::getPointArray(int wid,int heig)
+TQPointArray ATFInterpreter::getPointArray(int wid,int heig)
{
unsigned int px = 0,py = 0,a = 0,b = 0,c = 0,d = 0,e = 0,f = 0;
unsigned int tmp = 0,num = 0;
bool calc = false,res = false;
char op = OP_EQUAL,var = VAR_1;
- QPtrList<Sign> slp;
- QPointArray pntArray(coordList.count());
+ TQPtrList<Sign> slp;
+ TQPointArray pntArray(coordList.count());
if (!coordList.isEmpty())
{
@@ -199,13 +199,13 @@ QPointArray ATFInterpreter::getPointArray(int wid,int heig)
if (i == 14) py = tmp;
}
}
- pntArray.setPoint(coordList.at(),px,py);
+ pntArray.setPoint(coordList.tqat(),px,py);
}
}
return pntArray;
}
-QPtrList<ATFInterpreter::AttribList> ATFInterpreter::getAttribList()
+TQPtrList<ATFInterpreter::AttribList> ATFInterpreter::getAttribList()
{
if(!attrLs.isEmpty())
return attrLs;
@@ -228,7 +228,7 @@ QPtrList<ATFInterpreter::AttribList> ATFInterpreter::getAttribList()
void ATFInterpreter::interpret()
{
- QValueStack<int> level;
+ TQValueStack<int> level;
Value value;
bool v = false;
int pw = 1;
@@ -237,9 +237,9 @@ void ATFInterpreter::interpret()
level.push(LEVEL_NULL);
- for (QStringList::Iterator it=lines.begin(); it!=lines.end(); ++it)
+ for (TQStringList::Iterator it=lines.begin(); it!=lines.end(); ++it)
{
- if (!(*it).isEmpty() && (*it).at(0) != COMMENT)
+ if (!(*it).isEmpty() && (*it).tqat(0) != COMMENT)
{
if (level.top() == LEVEL_NULL)
{
@@ -257,7 +257,7 @@ void ATFInterpreter::interpret()
level.push(LEVEL_Y);
else if ((*it) == ATTR_BG)
level.push(LEVEL_ATTR);
- else if ((*it) == QString(END))
+ else if ((*it) == TQString(END))
{
level.pop();
coordList.append(coordPtr);
@@ -265,7 +265,7 @@ void ATFInterpreter::interpret()
}
else if (level.top() == LEVEL_X || level.top() == LEVEL_Y || level.top() == LEVEL_ATTR)
{
- switch (((*it).at(0)).latin1())
+ switch (((*it).tqat(0)).latin1())
{
case VAR_1:
{
@@ -304,13 +304,13 @@ void ATFInterpreter::interpret()
} break;
case VAR_VARIA:
{
- if ((*it).find('0') != -1) v = false;
+ if ((*it).tqfind('0') != -1) v = false;
else v = true;
attrib.isVariable = (*it);
} break;
case VAR_PW:
{
- pw = 1; pw = ((*it).at(4)).latin1() - 48;
+ pw = 1; pw = ((*it).tqat(4)).latin1() - 48;
attrib.pwDiv = (*it);
} break;
case '}':
@@ -320,24 +320,24 @@ void ATFInterpreter::interpret()
case LEVEL_X:
{
coordPtr->pntX = value;
- coord.a = QString::null;
- coord.b = QString::null;
- coord.c = QString::null;
- coord.d = QString::null;
- coord.e = QString::null;
- coord.f = QString::null;
- coord.result = QString::null;
+ coord.a = TQString();
+ coord.b = TQString();
+ coord.c = TQString();
+ coord.d = TQString();
+ coord.e = TQString();
+ coord.f = TQString();
+ coord.result = TQString();
} break;
case LEVEL_Y:
{
coordPtr->pntY = value;
- coord.a = QString::null;
- coord.b = QString::null;
- coord.c = QString::null;
- coord.d = QString::null;
- coord.e = QString::null;
- coord.f = QString::null;
- coord.result = QString::null;
+ coord.a = TQString();
+ coord.b = TQString();
+ coord.c = TQString();
+ coord.d = TQString();
+ coord.e = TQString();
+ coord.f = TQString();
+ coord.result = TQString();
} break;
case LEVEL_ATTR:
{
@@ -345,7 +345,7 @@ void ATFInterpreter::interpret()
coordPtr->pwDiv = pw;
pw = 1;
v = false;
- attrib.isVariable = QString::null;
+ attrib.isVariable = TQString();
attrib.pwDiv = 1;
} break;
}
@@ -357,16 +357,16 @@ void ATFInterpreter::interpret()
}
}
-QPtrList<ATFInterpreter::Sign> ATFInterpreter::getVar(const QString &s)
+TQPtrList<ATFInterpreter::Sign> ATFInterpreter::getVar(const TQString &s)
{
- QPtrList<Sign> list;
+ TQPtrList<Sign> list;
for (unsigned int i=1; i<s.length(); ++i)
{
- if(s.at(i)==' ')
+ if(s.tqat(i)==' ')
continue;
signPtr = new Sign;
- switch (s.at(i).latin1())
+ switch (s.tqat(i).latin1())
{
case VAR_W: signPtr->type = ST_WIDTH; break;
case VAR_H: signPtr->type = ST_HEIGHT; break;
@@ -431,20 +431,20 @@ QPtrList<ATFInterpreter::Sign> ATFInterpreter::getVar(const QString &s)
signPtr->type = ST_NUMBER;
if (s.length() - 1 > i)
{
- switch (s.at(i+1).latin1())
+ switch (s.tqat(i+1).latin1())
{
case NUM_0: case NUM_1: case NUM_2: case NUM_3: case NUM_4:
case NUM_5: case NUM_6: case NUM_7: case NUM_8: case NUM_9:
{
- signPtr->num = (s.at(i).latin1() - 48) * 10 + s.at(i+1).latin1() - 48;
+ signPtr->num = (s.tqat(i).latin1() - 48) * 10 + s.tqat(i+1).latin1() - 48;
i++;
} break;
default:
- signPtr->num = s.at(i).latin1() - 48; break;
+ signPtr->num = s.tqat(i).latin1() - 48; break;
}
}
else
- signPtr->num = s.at(i).latin1() - 48;
+ signPtr->num = s.tqat(i).latin1() - 48;
} break;
}
list.append(signPtr);