summaryrefslogtreecommitdiffstats
path: root/kicker-applets/math/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kicker-applets/math/parser.cpp')
-rw-r--r--kicker-applets/math/parser.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kicker-applets/math/parser.cpp b/kicker-applets/math/parser.cpp
index 7d99c87..8a58064 100644
--- a/kicker-applets/math/parser.cpp
+++ b/kicker-applets/math/parser.cpp
@@ -136,7 +136,7 @@ double Parser::anglemode()
{ return m_anglemode;
}
-double Parser::eval(QString str)
+double Parser::eval(TQString str)
{ double erg;
stack=new double [stacksize];
@@ -235,7 +235,7 @@ int Parser::getNextIndex()
return ix;
}
-int Parser::addfkt(QString str)
+int Parser::addfkt(TQString str)
{
int ix;
@@ -250,11 +250,11 @@ int Parser::addfkt(QString str)
//insert '*' when it is needed
for(int i=p1+3; i < (int) str.length();i++)
{
- if( (str.at(i).isNumber() || str.at(i).category()==QChar::Letter_Uppercase )&& ( str.at(i-1).isLetter() || str.at(i-1) == ')' ) )
+ if( (str.at(i).isNumber() || str.at(i).category()==TQChar::Letter_Uppercase )&& ( str.at(i-1).isLetter() || str.at(i-1) == ')' ) )
{
str.insert(i,'*');
}
- else if( (str.at(i).isNumber() || str.at(i) == ')' || str.at(i).category()==QChar::Letter_Uppercase) && ( str.at(i+1).isLetter() || str.at(i+1) == '(' ) )
+ else if( (str.at(i).isNumber() || str.at(i) == ')' || str.at(i).category()==TQChar::Letter_Uppercase) && ( str.at(i+1).isLetter() || str.at(i+1) == '(' ) )
{
str.insert(i+1,'*');
i++;
@@ -316,7 +316,7 @@ int Parser::addfkt(QString str)
}
-int Parser::delfkt(QString name)
+int Parser::delfkt(TQString name)
{ int ix;
ix=getfix(name);
@@ -333,7 +333,7 @@ int Parser::delfkt(int ix)
}
-double Parser::fkt(QString name, double x)
+double Parser::fkt(TQString name, double x)
{ int ix;
ix=getfix(name);
@@ -632,7 +632,7 @@ int Parser::chkfix(int ix)
}
-int Parser::getfkt(int ix, QString& name, QString& str)
+int Parser::getfkt(int ix, TQString& name, TQString& str)
{ if(ix<0 || ix>=ufanz) return -1; // ungltiger Index
if(ufkt[ix].fname.isEmpty()) return -1; // keine Funktion
name=ufkt[ix].fname.copy();
@@ -641,7 +641,7 @@ int Parser::getfkt(int ix, QString& name, QString& str)
}
-int Parser::getfix(QString name)
+int Parser::getfix(TQString name)
{ int ix;
err=0;
@@ -656,41 +656,41 @@ int Parser::getfix(QString name)
int Parser::errmsg()
{ switch(err)
{ case 1: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Syntax error").arg(QString::number(errpos)), i18n("Math Expression Evaluator"));
+ "Syntax error").arg(TQString::number(errpos)), i18n("Math Expression Evaluator"));
break;
case 2: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Missing parenthesis").arg(QString::number(errpos)), i18n("Math Expression Evaluator"));
+ "Missing parenthesis").arg(TQString::number(errpos)), i18n("Math Expression Evaluator"));
break;
case 3: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Function name unknown").arg(QString::number(errpos)), i18n("Math Expression Evaluator"));
+ "Function name unknown").arg(TQString::number(errpos)), i18n("Math Expression Evaluator"));
break;
case 4: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Void function variable").arg(QString::number(errpos)), i18n("Math Expression Evaluator"));
+ "Void function variable").arg(TQString::number(errpos)), i18n("Math Expression Evaluator"));
break;
case 5: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Too many functions").arg(QString::number(errpos)), i18n("Math Expression Evaluator"));
+ "Too many functions").arg(TQString::number(errpos)), i18n("Math Expression Evaluator"));
break;
case 6: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Token-memory overflow").arg(QString::number(errpos)), i18n("Math Expression Evaluator"));
+ "Token-memory overflow").arg(TQString::number(errpos)), i18n("Math Expression Evaluator"));
break;
case 7: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Stack overflow").arg(QString::number(errpos)), i18n("Math Expression Evaluator"));
+ "Stack overflow").arg(TQString::number(errpos)), i18n("Math Expression Evaluator"));
break;
case 8: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Name of function not free").arg(QString::number(errpos)), i18n("Math Expression Evaluator"));
+ "Name of function not free").arg(TQString::number(errpos)), i18n("Math Expression Evaluator"));
break;
case 9: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "recursive function not allowed").arg(QString::number(errpos)), i18n("Math Expression Evaluator"));
+ "recursive function not allowed").arg(TQString::number(errpos)), i18n("Math Expression Evaluator"));
break;
- case 10: KMessageBox::error(0, i18n("Could not find a defined constant at position %1" ).arg(QString::number(errpos)),
+ case 10: KMessageBox::error(0, i18n("Could not find a defined constant at position %1" ).arg(TQString::number(errpos)),
i18n("Math Expression Evaluator"));
break;
case 11: KMessageBox::error(0, i18n("Empty function"), i18n("Math Expression Evaluator"));