summaryrefslogtreecommitdiffstats
path: root/kenolaba/EvalDlgImpl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /kenolaba/EvalDlgImpl.cpp
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kenolaba/EvalDlgImpl.cpp')
-rw-r--r--kenolaba/EvalDlgImpl.cpp142
1 files changed, 71 insertions, 71 deletions
diff --git a/kenolaba/EvalDlgImpl.cpp b/kenolaba/EvalDlgImpl.cpp
index a5903429..70662629 100644
--- a/kenolaba/EvalDlgImpl.cpp
+++ b/kenolaba/EvalDlgImpl.cpp
@@ -3,12 +3,12 @@
*
*/
-#include <qvalidator.h>
-#include <qlineedit.h>
-#include <qlcdnumber.h>
+#include <tqvalidator.h>
+#include <tqlineedit.h>
+#include <tqlcdnumber.h>
#include <klineeditdlg.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <klocale.h>
@@ -19,20 +19,20 @@
#include "Board.h"
#include "EvalScheme.h"
-EvalDlgImpl::EvalDlgImpl(QWidget* parent, Board* board)
+EvalDlgImpl::EvalDlgImpl(TQWidget* parent, Board* board)
:EvalDlg(parent)
{
_board = board;
_origScheme = board->evalScheme();
_scheme = new EvalScheme(*_origScheme);
- connect( evalDelete, SIGNAL( clicked() ), this, SLOT( deleteEntry() ) );
- connect( evalSaveAs, SIGNAL( clicked() ), this, SLOT( saveas() ) );
- connect( evalList, SIGNAL( highlighted(int) ), this, SLOT( select(int) ) );
+ connect( evalDelete, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteEntry() ) );
+ connect( evalSaveAs, TQT_SIGNAL( clicked() ), this, TQT_SLOT( saveas() ) );
+ connect( evalList, TQT_SIGNAL( highlighted(int) ), this, TQT_SLOT( select(int) ) );
KConfig* config = kapp->config();
config->setGroup("General");
- QStringList list = config->readListEntry("EvalSchemes");
+ TQStringList list = config->readListEntry("EvalSchemes");
evalList->insertItem( i18n("Current") );
evalList->insertItem( i18n("Default") );
for(int i=0;i<list.count();i++)
@@ -52,33 +52,33 @@ EvalDlgImpl::~EvalDlgImpl()
void EvalDlgImpl::connectEditLines()
{
- connect( moveEval1, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval6, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval7, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval8, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval9, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( posEval1, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( posEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( posEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( posEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( posEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( diffEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( diffEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( diffEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( diffEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( rowEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateInARow()) );
- connect( rowEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateInARow()) );
- connect( rowEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateInARow()) );
- connect( rowEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateInARow()) );
- connect( countEval1, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
- connect( countEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
- connect( countEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
- connect( countEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
- connect( countEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
+ connect( moveEval1, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval6, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval7, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval8, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval9, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( posEval1, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( posEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( posEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( posEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( posEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( diffEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( diffEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( diffEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( diffEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( rowEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateInARow()) );
+ connect( rowEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateInARow()) );
+ connect( rowEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateInARow()) );
+ connect( rowEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateInARow()) );
+ connect( countEval1, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
+ connect( countEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
+ connect( countEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
+ connect( countEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
+ connect( countEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
}
void EvalDlgImpl::disconnectEditLines()
@@ -115,40 +115,40 @@ void EvalDlgImpl::disconnectEditLines()
void EvalDlgImpl::updateWidgets()
{
// Moves
- moveEval1->setText( QString::number(_scheme->moveValue(Move::move1)) );
- moveEval2->setText( QString::number(_scheme->moveValue(Move::move2)) );
- moveEval3->setText( QString::number(_scheme->moveValue(Move::move3)) );
- moveEval4->setText( QString::number(_scheme->moveValue(Move::push1with2)) );
- moveEval5->setText( QString::number(_scheme->moveValue(Move::push1with3)) );
- moveEval6->setText( QString::number(_scheme->moveValue(Move::push2)) );
- moveEval7->setText( QString::number(_scheme->moveValue(Move::out1with2)) );
- moveEval8->setText( QString::number(_scheme->moveValue(Move::out1with3)) );
- moveEval9->setText( QString::number(_scheme->moveValue(Move::out2)) );
+ moveEval1->setText( TQString::number(_scheme->moveValue(Move::move1)) );
+ moveEval2->setText( TQString::number(_scheme->moveValue(Move::move2)) );
+ moveEval3->setText( TQString::number(_scheme->moveValue(Move::move3)) );
+ moveEval4->setText( TQString::number(_scheme->moveValue(Move::push1with2)) );
+ moveEval5->setText( TQString::number(_scheme->moveValue(Move::push1with3)) );
+ moveEval6->setText( TQString::number(_scheme->moveValue(Move::push2)) );
+ moveEval7->setText( TQString::number(_scheme->moveValue(Move::out1with2)) );
+ moveEval8->setText( TQString::number(_scheme->moveValue(Move::out1with3)) );
+ moveEval9->setText( TQString::number(_scheme->moveValue(Move::out2)) );
// Position
- posEval1->setText( QString::number(_scheme->ringValue(0)) );
- posEval2->setText( QString::number(_scheme->ringValue(1)) );
- posEval3->setText( QString::number(_scheme->ringValue(2)) );
- posEval4->setText( QString::number(_scheme->ringValue(3)) );
- posEval5->setText( QString::number(_scheme->ringValue(4)) );
+ posEval1->setText( TQString::number(_scheme->ringValue(0)) );
+ posEval2->setText( TQString::number(_scheme->ringValue(1)) );
+ posEval3->setText( TQString::number(_scheme->ringValue(2)) );
+ posEval4->setText( TQString::number(_scheme->ringValue(3)) );
+ posEval5->setText( TQString::number(_scheme->ringValue(4)) );
- diffEval2->setText( QString::number(_scheme->ringDiff(1)) );
- diffEval3->setText( QString::number(_scheme->ringDiff(2)) );
- diffEval4->setText( QString::number(_scheme->ringDiff(3)) );
- diffEval5->setText( QString::number(_scheme->ringDiff(4)) );
+ diffEval2->setText( TQString::number(_scheme->ringDiff(1)) );
+ diffEval3->setText( TQString::number(_scheme->ringDiff(2)) );
+ diffEval4->setText( TQString::number(_scheme->ringDiff(3)) );
+ diffEval5->setText( TQString::number(_scheme->ringDiff(4)) );
// InARow
- rowEval2->setText( QString::number(_scheme->inARowValue(0)) );
- rowEval3->setText( QString::number(_scheme->inARowValue(1)) );
- rowEval4->setText( QString::number(_scheme->inARowValue(2)) );
- rowEval5->setText( QString::number(_scheme->inARowValue(3)) );
+ rowEval2->setText( TQString::number(_scheme->inARowValue(0)) );
+ rowEval3->setText( TQString::number(_scheme->inARowValue(1)) );
+ rowEval4->setText( TQString::number(_scheme->inARowValue(2)) );
+ rowEval5->setText( TQString::number(_scheme->inARowValue(3)) );
// Count
- countEval1->setText( QString::number(_scheme->stoneValue(1)) );
- countEval2->setText( QString::number(_scheme->stoneValue(2)) );
- countEval3->setText( QString::number(_scheme->stoneValue(3)) );
- countEval4->setText( QString::number(_scheme->stoneValue(4)) );
- countEval5->setText( QString::number(_scheme->stoneValue(5)) );
+ countEval1->setText( TQString::number(_scheme->stoneValue(1)) );
+ countEval2->setText( TQString::number(_scheme->stoneValue(2)) );
+ countEval3->setText( TQString::number(_scheme->stoneValue(3)) );
+ countEval4->setText( TQString::number(_scheme->stoneValue(4)) );
+ countEval5->setText( TQString::number(_scheme->stoneValue(5)) );
updateEval();
}
@@ -232,12 +232,12 @@ void EvalDlgImpl::deleteEntry()
// You cannot delete Pseudo Items 0 (Current) and 1 (Default)
if (i>1) {
- QString name = evalList->text(i);
+ TQString name = evalList->text(i);
evalList->removeItem(i);
KConfig* config = kapp->config();
config->setGroup("General");
- QStringList list = config->readListEntry("EvalSchemes");
+ TQStringList list = config->readListEntry("EvalSchemes");
list.remove(name);
config->writeEntry("EvalSchemes", list);
config->sync();
@@ -246,15 +246,15 @@ void EvalDlgImpl::deleteEntry()
void EvalDlgImpl::saveas()
{
- KLineEditDlg dlg(i18n("Name for scheme:"), QString::null, this);
+ KLineEditDlg dlg(i18n("Name for scheme:"), TQString::null, this);
dlg.setCaption(i18n("Save Scheme"));
if (dlg.exec()) {
- QString name=dlg.text();
+ TQString name=dlg.text();
KConfig* config = kapp->config();
config->setGroup("General");
- QStringList list = config->readListEntry("EvalSchemes");
- QListBoxItem *it = evalList->findItem(name);
+ TQStringList list = config->readListEntry("EvalSchemes");
+ TQListBoxItem *it = evalList->findItem(name);
if (!it) {
evalList->insertItem(name);
it = evalList->findItem(name);
@@ -272,7 +272,7 @@ void EvalDlgImpl::saveas()
void EvalDlgImpl::select(int i)
{
- QString name = evalList->text(i);
+ TQString name = evalList->text(i);
delete _scheme;
_scheme = 0;