summaryrefslogtreecommitdiffstats
path: root/kmplot/kmplot/xparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmplot/kmplot/xparser.cpp')
-rw-r--r--kmplot/kmplot/xparser.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kmplot/kmplot/xparser.cpp b/kmplot/kmplot/xparser.cpp
index 18d9a3b3..6e1204fa 100644
--- a/kmplot/kmplot/xparser.cpp
+++ b/kmplot/kmplot/xparser.cpp
@@ -50,13 +50,13 @@ bool XParser::getext( Ufkt *item, const TQString fstr )
int p1, p2, p3, pe;
TQString tstr;
pe = fstr.length();
- if ( fstr.find( 'N' ) != -1 )
+ if ( fstr.tqfind( 'N' ) != -1 )
item->f_mode = false;
else
{
- if ( fstr.find( "A1" ) != -1 )
+ if ( fstr.tqfind( "A1" ) != -1 )
item->f1_mode = true;
- if ( fstr.find( "A2" ) != -1 )
+ if ( fstr.tqfind( "A2" ) != -1 )
item->f2_mode = true;
}
switch ( fstr[0].latin1() )
@@ -67,13 +67,13 @@ bool XParser::getext( Ufkt *item, const TQString fstr )
item->f1_mode = item->f2_mode = false;
}
- p1 = fstr.find( "D[" );
+ p1 = fstr.tqfind( "D[" );
if ( p1 != -1 )
{
p1 += 2;
const TQString str = fstr.mid( p1, pe - p1);
- p2 = str.find(',');
- p3 = str.find(']');
+ p2 = str.tqfind(',');
+ p3 = str.tqfind(']');
if ( p2 > 0 && p2 < p3 )
{
tstr = str.left( p2 );
@@ -90,16 +90,16 @@ bool XParser::getext( Ufkt *item, const TQString fstr )
else
errflg = true;
}
- p1 = fstr.find( "P[" );
+ p1 = fstr.tqfind( "P[" );
if ( p1 != -1 )
{
int i = 0;
p1 += 2;
TQString str = fstr.mid( p1, 1000);
- p3 = str.find( ']' );
+ p3 = str.tqfind( ']' );
do
{
- p2 = str.find( ',' );
+ p2 = str.tqfind( ',' );
if ( p2 == -1 || p2 > p3 )
p2 = p3;
tstr = str.left( p2++ );
@@ -148,7 +148,7 @@ void XParser::findFunctionName(TQString &function_name, int const id, int const
for (bool ok=true; last_character<'x'; ++last_character)
{
if ( pos==0 && last_character == 'r') continue;
- function_name.at(pos)=last_character;
+ function_name.tqat(pos)=last_character;
for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
if (it == ufkt.begin() && it->fname.isEmpty() ) continue;
@@ -162,7 +162,7 @@ void XParser::findFunctionName(TQString &function_name, int const id, int const
}
ok = true;
}
- function_name.at(pos)='f';
+ function_name.tqat(pos)='f';
function_name.append('f');
}
function_name = "e"; //this should never happen
@@ -179,8 +179,8 @@ void XParser::fixFunctionName( TQString &str, int const type, int const id)
str.prepend( function_name );
}
- int p1=str.find('(');
- int p2=str.find(')');
+ int p1=str.tqfind('(');
+ int p2=str.tqfind(')');
if( p1>=0 && str.at(p2+1)=='=')
{
if ( type == XParser::Polar && str.at(0)!='r' )
@@ -242,7 +242,7 @@ double XParser::euler_method(const double x, const TQValueVector<Ufkt>::iterator
return y;
}
-QRgb XParser::defaultColor(int function)
+TQRgb XParser::defaultColor(int function)
{
switch ( function%10 )
{
@@ -641,14 +641,14 @@ bool XParser::functionRemoveParameter(const TQString &remove_parameter, uint id)
int XParser::addFunction(const TQString &f_str)
{
TQString added_function(f_str);
- int const pos = added_function.find(';');
+ int const pos = added_function.tqfind(';');
if (pos!=-1)
added_function = added_function.left(pos);
fixFunctionName(added_function);
if ( added_function.at(0)== 'x' || added_function.at(0)== 'y') //TODO: Make it possible to define parametric functions
return -1;
- if ( added_function.contains('y') != 0)
+ if ( added_function.tqcontains('y') != 0)
return -1;
int const id = addfkt( added_function );
if (id==-1)
@@ -664,10 +664,10 @@ int XParser::addFunction(const TQString &f_str)
return id;
}
-bool XParser::addFunction(const TQString &fstr_const, bool f_mode, bool f1_mode, bool f2_mode, bool integral_mode, bool integral_use_precision, int linewidth, int f1_linewidth, int f2_linewidth, int integral_linewidth, const TQString &str_dmin, const TQString &str_dmax, const TQString &str_startx, const TQString &str_starty, double integral_precision, QRgb color, QRgb f1_color, QRgb f2_color, QRgb integral_color, TQStringList str_parameter, int use_slider)
+bool XParser::addFunction(const TQString &fstr_const, bool f_mode, bool f1_mode, bool f2_mode, bool integral_mode, bool integral_use_precision, int linewidth, int f1_linewidth, int f2_linewidth, int integral_linewidth, const TQString &str_dmin, const TQString &str_dmax, const TQString &str_startx, const TQString &str_starty, double integral_precision, TQRgb color, TQRgb f1_color, TQRgb f2_color, TQRgb integral_color, TQStringList str_parameter, int use_slider)
{
TQString fstr(fstr_const);
- switch ( fstr.at(0).latin1() )
+ switch ( fstr.tqat(0).latin1() )
{
case 'r':
{
@@ -745,7 +745,7 @@ bool XParser::setFunctionExpression(const TQString &f_str, uint id)
return false;
Ufkt *tmp_ufkt = &ufkt[ix];
TQString const old_fstr = tmp_ufkt->fstr;
- TQString const fstr_begin = tmp_ufkt->fstr.left(tmp_ufkt->fstr.find('=')+1);
+ TQString const fstr_begin = tmp_ufkt->fstr.left(tmp_ufkt->fstr.tqfind('=')+1);
tmp_ufkt->fstr = fstr_begin+f_str;
reparse(tmp_ufkt);
if ( parserError(false) != 0)
@@ -801,7 +801,7 @@ bool XParser::sendFunction(int id, const TQString &dcopclient_target)
arg << item->fstr << item->f_mode << item->f1_mode << item->f2_mode << item->integral_mode << item->integral_use_precision << item->linewidth << item->f1_linewidth << item->f2_linewidth << item->integral_linewidth << str_dmin << str_dmax << item->str_startx << item->str_starty << item->integral_precision << item->color << item->f1_color << item->f2_color << item->integral_color << str_parameters << item->use_slider;
TQByteArray replay_data;
TQCString replay_type;
- bool ok = kapp->dcopClient()->call( str_result.utf8(), "Parser", "addFunction(TQString,bool,bool,bool,bool,bool,int,int,int,int,TQString,TQString,TQString,TQString,double,QRgb,QRgb,QRgb,QRgb,TQStringList,int)", parameters, replay_type, replay_data, false);
+ bool ok = kapp->dcopClient()->call( str_result.utf8(), "Parser", "addFunction(TQString,bool,bool,bool,bool,bool,int,int,int,int,TQString,TQString,TQString,TQString,double,TQRgb,TQRgb,TQRgb,TQRgb,TQStringList,int)", parameters, replay_type, replay_data, false);
if (!ok)
{
KMessageBox::error(0, i18n("An error appeared during the transfer"));