diff options
Diffstat (limited to 'kenolaba/EvalScheme.cpp')
-rw-r--r-- | kenolaba/EvalScheme.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kenolaba/EvalScheme.cpp b/kenolaba/EvalScheme.cpp index 18ba5b43..d884f398 100644 --- a/kenolaba/EvalScheme.cpp +++ b/kenolaba/EvalScheme.cpp @@ -24,7 +24,7 @@ static int defaultInARowValue[InARowCounter::inARowCount]= { 2, 5, 4, 3 }; /** * Constructor: Set Default values */ -EvalScheme::EvalScheme(QString n) +EvalScheme::EvalScheme(TQString n) { _name = n; setDefaults(); @@ -76,11 +76,11 @@ void EvalScheme::setDefaults() void EvalScheme::read(KConfig *config) { - QString confSection = QString("%1 Evaluation Scheme").arg(_name); + TQString confSection = TQString("%1 Evaluation Scheme").arg(_name); config->setGroup(confSection); - QStringList list; - QString tmp; + TQStringList list; + TQString tmp; list = config->readListEntry("StoneValues"); if (list.count()>0) { @@ -117,10 +117,10 @@ void EvalScheme::read(KConfig *config) void EvalScheme::save(KConfig* config) { - QString confSection = QString("%1 Evaluation Scheme").arg(_name); + TQString confSection = TQString("%1 Evaluation Scheme").arg(_name); config->setGroup(confSection); - QString entry; + TQString entry; entry.sprintf("%d,%d,%d,%d,%d", _stoneValue[1], _stoneValue[2], _stoneValue[3], _stoneValue[4], _stoneValue[5]); @@ -128,12 +128,12 @@ void EvalScheme::save(KConfig* config) entry.sprintf("%d", _moveValue[0]); for(int i=1;i<Move::typeCount;i++) - entry += QString(", %1").arg( _moveValue[i] ); + entry += TQString(", %1").arg( _moveValue[i] ); config->writeEntry("MoveValues", entry); entry.sprintf("%d", _inARowValue[0]); for(int i=1;i<InARowCounter::inARowCount;i++) - entry += QString(", %1").arg( _inARowValue[i] ); + entry += TQString(", %1").arg( _inARowValue[i] ); config->writeEntry("InARowValues", entry); entry.sprintf("%d,%d,%d,%d,%d", _ringValue[0], _ringValue[1], @@ -182,7 +182,7 @@ void EvalScheme::setInARowValue(int stones, int value) * */ -EvalScheme* EvalScheme::create(QString scheme) +EvalScheme* EvalScheme::create(TQString scheme) { int pos = scheme.find('='); if (pos<0) return 0; @@ -190,7 +190,7 @@ EvalScheme* EvalScheme::create(QString scheme) EvalScheme* evalScheme = new EvalScheme( scheme.left(pos) ); evalScheme->setDefaults(); - QStringList list = QStringList::split( QString(","), scheme.right(pos+1) ); + TQStringList list = TQStringList::split( TQString(","), scheme.right(pos+1) ); int i=0; while(i<list.count()) { @@ -210,22 +210,22 @@ EvalScheme* EvalScheme::create(QString scheme) return evalScheme; } -QString EvalScheme::ascii() +TQString EvalScheme::ascii() { - QString res; + TQString res; int i; res.sprintf("%s=%d", _name.ascii(), _stoneValue[1]); for(i=1;i<6;i++) - res += QString(",%1").arg( _stoneValue[i] ); + res += TQString(",%1").arg( _stoneValue[i] ); for(i=0;i<Move::typeCount;i++) - res += QString(",%1").arg( _moveValue[i] ); + res += TQString(",%1").arg( _moveValue[i] ); for(i=0;i<InARowCounter::inARowCount;i++) - res += QString(",%1").arg( _inARowValue[i] ); + res += TQString(",%1").arg( _inARowValue[i] ); for(i=0;i<5;i++) - res += QString(",%1").arg( _ringValue[i] ); + res += TQString(",%1").arg( _ringValue[i] ); for(i=0;i<5;i++) - res += QString(",%1").arg( _ringDiff[i] ); + res += TQString(",%1").arg( _ringDiff[i] ); return res; } |