From 576eb4299a00bc053db35414406f46372a0f70f2 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:42:31 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksirtet/ksirtet/board.cpp | 2 +- ksirtet/ksirtet/board.h | 6 +++--- ksirtet/ksirtet/check_score.cpp | 2 +- ksirtet/ksirtet/field.cpp | 12 ++++++------ ksirtet/ksirtet/field.h | 2 +- ksirtet/ksirtet/main.cpp | 2 +- ksirtet/ksirtet/main.h | 8 ++++---- ksirtet/ksirtet/piece.cpp | 20 ++++++++++---------- ksirtet/ksirtet/piece.h | 6 +++--- ksirtet/ksirtet/settings.cpp | 6 +++--- 10 files changed, 33 insertions(+), 33 deletions(-) (limited to 'ksirtet') diff --git a/ksirtet/ksirtet/board.cpp b/ksirtet/ksirtet/board.cpp index 4c084f63..f50aa1a4 100644 --- a/ksirtet/ksirtet/board.cpp +++ b/ksirtet/ksirtet/board.cpp @@ -8,7 +8,7 @@ using namespace KGrid2D; -KSBoard::KSBoard(bool graphic, QWidget *parent) +KSBoard::KSBoard(bool graphic, TQWidget *parent) : Board(graphic, new GiftPool(parent), parent), filled(matrix().height()), linesRemoved(4) { diff --git a/ksirtet/ksirtet/board.h b/ksirtet/ksirtet/board.h index 90b1c231..45ec0f26 100644 --- a/ksirtet/ksirtet/board.h +++ b/ksirtet/ksirtet/board.h @@ -8,7 +8,7 @@ class KSBoard : public Board { Q_OBJECT public: - KSBoard(bool graphic, QWidget *parent); + KSBoard(bool graphic, TQWidget *parent); void copy(const GenericTetris &); void start(const GTInitData &); @@ -17,8 +17,8 @@ class KSBoard : public Board uint lastRemoved() const { return _lastRemoved; } private: - QMemArray filled; - QMemArray linesRemoved; + TQMemArray filled; + TQMemArray linesRemoved; uint addRemoved; uint _lastRemoved; diff --git a/ksirtet/ksirtet/check_score.cpp b/ksirtet/ksirtet/check_score.cpp index 71cd53be..e748c286 100644 --- a/ksirtet/ksirtet/check_score.cpp +++ b/ksirtet/ksirtet/check_score.cpp @@ -12,7 +12,7 @@ int main(int argc, char **argv) KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if ( args->count()==0 ) KCmdLineArgs::usage(); - QString s = args->arg(0); + TQString s = args->arg(0); bool ok; uint nb = s.toUInt(&ok); if ( !ok ) qFatal("The argument is not an unsigned integer."); diff --git a/ksirtet/ksirtet/field.cpp b/ksirtet/ksirtet/field.cpp index e3384a9e..46f5c4de 100644 --- a/ksirtet/ksirtet/field.cpp +++ b/ksirtet/ksirtet/field.cpp @@ -1,7 +1,7 @@ #include "field.h" #include "field.moc" -#include +#include #include #include @@ -11,11 +11,11 @@ #include "piece.h" //----------------------------------------------------------------------------- -KSField::KSField(QWidget *parent) +KSField::KSField(TQWidget *parent) : Field(parent) { const Board *b = static_cast(board); - QWhatsThis::add(b->giftPool(), i18n("Indicate the number of garbage lines you received from your opponent.")); + TQWhatsThis::add(b->giftPool(), i18n("Indicate the number of garbage lines you received from your opponent.")); } void KSField::removedUpdated() @@ -41,9 +41,9 @@ void KSField::settingsChanged() static_cast(Piece::info()).setOldRotationStyle(b); removedList->clear(); - QWhatsThis::remove(removedList); + TQWhatsThis::remove(removedList); KGameLCD *lcd = new KGameLCD(5, removedList); - QString s = (Prefs::showDetailedRemoved() ? i18n("Total:") : QString::null); + TQString s = (Prefs::showDetailedRemoved() ? i18n("Total:") : TQString::null); removedList->append(s, lcd); lcd->displayInt( board->nbRemoved() ); lcd->show(); @@ -51,7 +51,7 @@ void KSField::settingsChanged() if ( Prefs::showDetailedRemoved() ) { for (uint i=0; i<4; i++) { KGameLCD *lcd = new KGameLCD(5, removedList); - QString s = i18n("1 Line:", "%n Lines:", i+1); + TQString s = i18n("1 Line:", "%n Lines:", i+1); removedList->append(s, lcd); uint nb = static_cast(board)->nbRemovedLines(i); lcd->displayInt(nb); diff --git a/ksirtet/ksirtet/field.h b/ksirtet/ksirtet/field.h index 4af498e9..26378b28 100644 --- a/ksirtet/ksirtet/field.h +++ b/ksirtet/ksirtet/field.h @@ -9,7 +9,7 @@ class KSField : public Field { Q_OBJECT public: - KSField(QWidget *parent); + KSField(TQWidget *parent); private slots: virtual void removedUpdated(); diff --git a/ksirtet/ksirtet/main.cpp b/ksirtet/ksirtet/main.cpp index a186038e..4c66c22f 100644 --- a/ksirtet/ksirtet/main.cpp +++ b/ksirtet/ksirtet/main.cpp @@ -64,7 +64,7 @@ KSFactory::KSFactory() : CommonFactory(MAIN_DATA, BASE_BOARD_INFO, COMMON_BOARD_INFO) {} -BaseInterface *KSFactory::createInterface(QWidget *parent) +BaseInterface *KSFactory::createInterface(TQWidget *parent) { return new Interface(MP_GAME_INFO, parent); } diff --git a/ksirtet/ksirtet/main.h b/ksirtet/ksirtet/main.h index 67fe3619..05af263d 100644 --- a/ksirtet/ksirtet/main.h +++ b/ksirtet/ksirtet/main.h @@ -16,13 +16,13 @@ class KSFactory : public CommonFactory KSFactory(); protected: - virtual BaseBoard *createBoard(bool graphic, QWidget *parent) + virtual BaseBoard *createBoard(bool graphic, TQWidget *parent) { return new KSBoard(graphic, parent); } - virtual BaseField *createField(QWidget *parent) + virtual BaseField *createField(TQWidget *parent) { return new KSField(parent); } - virtual BaseInterface *createInterface(QWidget *parent); + virtual BaseInterface *createInterface(TQWidget *parent); virtual AI *createAI() { return new KSAI; } - virtual QWidget *createGameConfig() { return new KSGameConfig; } + virtual TQWidget *createGameConfig() { return new KSGameConfig; } }; //----------------------------------------------------------------------------- diff --git a/ksirtet/ksirtet/piece.cpp b/ksirtet/ksirtet/piece.cpp index 67ba2635..a77812bf 100644 --- a/ksirtet/ksirtet/piece.cpp +++ b/ksirtet/ksirtet/piece.cpp @@ -1,6 +1,6 @@ #include "piece.h" -#include +#include #include @@ -54,21 +54,21 @@ const char *KSPieceInfo::DEFAULT_COLORS[NB_FORMS+1] = { "#C8C8C8" }; -QColor KSPieceInfo::defaultColor(uint i) const +TQColor KSPieceInfo::defaultColor(uint i) const { - if ( i>=nbColors() ) return QColor(); - return QColor(DEFAULT_COLORS[i]); + if ( i>=nbColors() ) return TQColor(); + return TQColor(DEFAULT_COLORS[i]); } -void KSPieceInfo::draw(QPixmap *pixmap, uint blockType, uint, +void KSPieceInfo::draw(TQPixmap *pixmap, uint blockType, uint, bool lighted) const { - QColor col = color(blockType); + TQColor col = color(blockType); if (lighted) col = col.light(); pixmap->fill(col); - QPainter p(pixmap); - QRect r = pixmap->rect(); + TQPainter p(pixmap); + TQRect r = pixmap->rect(); p.setPen( col.light() ); p.moveTo(r.bottomLeft()); @@ -76,7 +76,7 @@ void KSPieceInfo::draw(QPixmap *pixmap, uint blockType, uint, p.lineTo(r.topRight()); p.setPen( col.dark() ); - p.moveTo(r.topRight() + QPoint(0,1)); + p.moveTo(r.topRight() + TQPoint(0,1)); p.lineTo(r.bottomRight()); - p.lineTo(r.bottomLeft() + QPoint(1,0)); + p.lineTo(r.bottomLeft() + TQPoint(1,0)); } diff --git a/ksirtet/ksirtet/piece.h b/ksirtet/ksirtet/piece.h index 25d866c4..3d772e29 100644 --- a/ksirtet/ksirtet/piece.h +++ b/ksirtet/ksirtet/piece.h @@ -31,11 +31,11 @@ class KSPieceInfo : public GPieceInfo virtual uint nbBlockModes() const { return 1; } virtual uint nbColors() const { return NB_FORMS + 1; } - virtual QString colorLabel(uint i) const { return i18n(COLOR_LABELS[i]); } - virtual QColor defaultColor(uint i) const; + virtual TQString colorLabel(uint i) const { return i18n(COLOR_LABELS[i]); } + virtual TQColor defaultColor(uint i) const; private: - virtual void draw(QPixmap *, uint blockType, uint blockMode, + virtual void draw(TQPixmap *, uint blockType, uint blockMode, bool lighted) const; private: diff --git a/ksirtet/ksirtet/settings.cpp b/ksirtet/ksirtet/settings.cpp index 96669e78..b35891b8 100644 --- a/ksirtet/ksirtet/settings.cpp +++ b/ksirtet/ksirtet/settings.cpp @@ -1,8 +1,8 @@ #include "settings.h" #include "settings.moc" -#include -#include +#include +#include #include @@ -12,6 +12,6 @@ KSGameConfig::KSGameConfig() int row = _grid->numRows(); int col = _grid->numCols(); - QCheckBox *cb = new QCheckBox(i18n("Old rotation style"), this, "kcfg_OldRotationStyle"); + TQCheckBox *cb = new TQCheckBox(i18n("Old rotation style"), this, "kcfg_OldRotationStyle"); _grid->addMultiCellWidget(cb, row, row, 0, col-1); } -- cgit v1.2.1