diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:58:53 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:58:53 -0600 |
commit | 84ace1135cac57993b72fee7105b92def1638d32 (patch) | |
tree | b8871eb76e3db4a062731b0ce7c99c24fac119e8 /twin4 | |
parent | 97d1732e257f8700488d7ca1660ae7eba8fc6065 (diff) | |
download | tdegames-84ace1135cac57993b72fee7105b92def1638d32.tar.gz tdegames-84ace1135cac57993b72fee7105b92def1638d32.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 97d1732e257f8700488d7ca1660ae7eba8fc6065.
Diffstat (limited to 'twin4')
-rw-r--r-- | twin4/twin4/kspritecache.cpp | 6 | ||||
-rw-r--r-- | twin4/twin4/scorewidget.cpp | 20 | ||||
-rw-r--r-- | twin4/twin4/settings.ui | 4 | ||||
-rw-r--r-- | twin4/twin4/statistics.ui | 18 | ||||
-rw-r--r-- | twin4/twin4/statuswidget.ui | 14 | ||||
-rw-r--r-- | twin4/twin4/twin4.cpp | 22 | ||||
-rw-r--r-- | twin4/twin4/twin4doc.cpp | 14 | ||||
-rw-r--r-- | twin4/twin4/twin4view.cpp | 10 |
8 files changed, 54 insertions, 54 deletions
diff --git a/twin4/twin4/kspritecache.cpp b/twin4/twin4/kspritecache.cpp index 9e3abddc..bd55c418 100644 --- a/twin4/twin4/kspritecache.cpp +++ b/twin4/twin4/kspritecache.cpp @@ -90,7 +90,7 @@ void KSpriteCache::deleteAllItems() void KSpriteCache::deleteItem(TQString s,int no) { TQCanvasItem *item; - TQString name=s+TQString("_%1").arg(no); + TQString name=s+TQString("_%1").tqarg(no); //kdDebug(11002) << "KSpriteCache::deleteItem name=" << name << endl; item=mItemDict[name]; if (item) @@ -122,7 +122,7 @@ void KSpriteCache::deleteItem(TQCanvasItem *item) TQCanvasItem *KSpriteCache::getItem(TQString name,int no) { - TQString dictname=name+TQString("_%1").arg(no); + TQString dictname=name+TQString("_%1").tqarg(no); TQCanvasItem *item=mItemDict[dictname]; //kdDebug(11002) << " -> getItem("<<name<<","<<no<<") =>"<<dictname<<endl; // Directly found item @@ -496,7 +496,7 @@ void KSpriteCache::createAnimations(KConfig *config,KSprite *sprite) if (!sprite) return ; for (int i=0;i<1000;i++) { - TQString anim=TQString("anim%1").arg(i); + TQString anim=TQString("anim%1").tqarg(i); if (config->hasKey(anim)) { //kdDebug(11002) << "Found animation key " << anim << endl; diff --git a/twin4/twin4/scorewidget.cpp b/twin4/twin4/scorewidget.cpp index 53c295b4..7a070322 100644 --- a/twin4/twin4/scorewidget.cpp +++ b/twin4/twin4/scorewidget.cpp @@ -20,7 +20,7 @@ #include "prefs.h" #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqsizepolicy.h> #include <kdebug.h> @@ -52,14 +52,14 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl ) TextLabel7 = new TQLabel( this, "TextLabel7" ); setPlayer("-----",0); TextLabel7->setBackgroundColor( COL_STATUSFIELD ); - TextLabel7->setAlignment(TQt::AlignHCenter); + TextLabel7->tqsetAlignment(TQt::AlignHCenter); LayoutB->addMultiCellWidget( TextLabel7, row, row,0,2 ); row++; TextLabel8 = new TQLabel( this, "TextLabel8" ); TextLabel8->setText( i18n( "vs" ) ); TextLabel8->setBackgroundColor( COL_STATUSFIELD ); - TextLabel8->setAlignment(TQt::AlignHCenter); + TextLabel8->tqsetAlignment(TQt::AlignHCenter); LayoutB->addMultiCellWidget( TextLabel8, row, row,0,2 ); row++; @@ -68,7 +68,7 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl ) // TextLabel9->setFrameShape(TQFrame::Box ); // TextLabel9->setLineWidth(5); TextLabel9->setBackgroundColor( COL_STATUSFIELD ); - TextLabel9->setAlignment(TQt::AlignHCenter); + TextLabel9->tqsetAlignment(TQt::AlignHCenter); LayoutB->addMultiCellWidget( TextLabel9, row, row,0,2 ); row++; @@ -86,7 +86,7 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl ) TextLabel4 = new TQLabel( this, "L" ); setLevel(Prefs::level()); - TextLabel4->setAlignment(TQt::AlignRight); + TextLabel4->tqsetAlignment(TQt::AlignRight); TextLabel4->setBackgroundColor( COL_STATUSFIELD ); LayoutB->addWidget( TextLabel4, row, 2 ); @@ -100,7 +100,7 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl ) TextLabel5 = new TQLabel( this, "M" ); setMove(0); - TextLabel5->setAlignment(TQt::AlignRight); + TextLabel5->tqsetAlignment(TQt::AlignRight); TextLabel5->setBackgroundColor( COL_STATUSFIELD ); LayoutB->addWidget( TextLabel5, row, 2 ); @@ -114,7 +114,7 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl ) TextLabel6 = new TQLabel( this, "C" ); setChance(0); - TextLabel6->setAlignment(TQt::AlignRight); + TextLabel6->tqsetAlignment(TQt::AlignRight); TextLabel6->setBackgroundColor( COL_STATUSFIELD ); LayoutB->addWidget( TextLabel6, row, 2 ); @@ -148,12 +148,12 @@ void ScoreWidget::Paint(TQPainter *p,TQRect /*cliprect*/) void ScoreWidget::setMove(int i) { - TextLabel5->setText( TQString("%1").arg(i)); + TextLabel5->setText( TQString("%1").tqarg(i)); } void ScoreWidget::setLevel(int i) { - TextLabel4->setText( TQString("%1").arg(i)); + TextLabel4->setText( TQString("%1").tqarg(i)); } void ScoreWidget::setChance(int i) @@ -165,7 +165,7 @@ void ScoreWidget::setChance(int i) else if (i<=-999) TextLabel6->setText(i18n("Loser")); else - TextLabel6->setText(TQString("%1").arg(i)); + TextLabel6->setText(TQString("%1").tqarg(i)); } void ScoreWidget::setPlayer(TQString s,int no) diff --git a/twin4/twin4/settings.ui b/twin4/twin4/settings.ui index 7b0568de..c64677c6 100644 --- a/twin4/twin4/settings.ui +++ b/twin4/twin4/settings.ui @@ -81,7 +81,7 @@ <property name="text"> <string>Hard</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -235,7 +235,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> diff --git a/twin4/twin4/statistics.ui b/twin4/twin4/statistics.ui index 06385444..b02e8be6 100644 --- a/twin4/twin4/statistics.ui +++ b/twin4/twin4/statistics.ui @@ -43,7 +43,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -70,7 +70,7 @@ <property name="text"> <string>Name</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -81,7 +81,7 @@ <property name="text"> <string>Won</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -97,7 +97,7 @@ <property name="text"> <string>Lost</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -118,7 +118,7 @@ <property name="text"> <string>Sum</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -129,13 +129,13 @@ <property name="text"> <string>Aborted</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> <widget class="TQLayoutWidget" row="6" column="0" rowspan="1" colspan="6"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -159,7 +159,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>20</height> @@ -201,7 +201,7 @@ <property name="text"> <string>Drawn</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> diff --git a/twin4/twin4/statuswidget.ui b/twin4/twin4/statuswidget.ui index a7d2fa6e..41d6bef5 100644 --- a/twin4/twin4/statuswidget.ui +++ b/twin4/twin4/statuswidget.ui @@ -38,7 +38,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -55,7 +55,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>90</width> <height>20</height> @@ -69,7 +69,7 @@ <property name="text"> <string>W</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -80,7 +80,7 @@ <property name="text"> <string>D</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -91,7 +91,7 @@ <property name="text"> <string>L</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -102,7 +102,7 @@ <property name="text"> <string>No</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -113,7 +113,7 @@ <property name="text"> <string>Bk</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> diff --git a/twin4/twin4/twin4.cpp b/twin4/twin4/twin4.cpp index aa8df6c5..8500c2e6 100644 --- a/twin4/twin4/twin4.cpp +++ b/twin4/twin4/twin4.cpp @@ -17,7 +17,7 @@ // include files for QT #include <tqstring.h> -#include <layout.h> +#include <tqlayout.h> #include <tqhgroupbox.h> #include <tqvbox.h> #include <tqradiobutton.h> @@ -138,7 +138,7 @@ Kwin4App::Kwin4App(TQWidget *parent, const char *name) : KMainWindow(parent,name void Kwin4App::checkMenus(CheckFlags menu) { bool localgame=(!doc->isNetwork()); - bool isRunning = (doc->gameStatus()==KGame::Run); + bool isRunning = (doc->gametqStatus()==KGame::Run); if (!menu || (menu&CheckFileMenu)) { changeAction("hint", !(!isRunning && localgame)); @@ -338,11 +338,11 @@ void Kwin4App::slotSaveGame() void Kwin4App::newGame() { // End the intro if it is running - doc->setGameStatus(Kwin4Doc::End); + doc->setGametqStatus(Kwin4Doc::End); // Init the board and Clear the old game out - doc->setGameStatus(Kwin4Doc::Init); + doc->setGametqStatus(Kwin4Doc::Init); // Run it - doc->setGameStatus(Kwin4Doc::Run); + doc->setGametqStatus(Kwin4Doc::Run); } /** @@ -360,7 +360,7 @@ void Kwin4App::slotNewGame() */ void Kwin4App::endGame() { - doc->setGameStatus(Kwin4Doc::Abort); + doc->setGametqStatus(Kwin4Doc::Abort); } /** @@ -453,7 +453,7 @@ void Kwin4App::EndGame(TABLE mode) */ void Kwin4App::slotStatusNames(){ TQString msg; - if (!(doc->gameStatus()==KGame::Run)) + if (!(doc->gametqStatus()==KGame::Run)) msg=i18n("No game "); else if (doc->QueryCurrentPlayer()==Gelb) msg=TQString(" ")+doc->QueryName(Gelb)+ i18n(" - Yellow "); @@ -480,7 +480,7 @@ void Kwin4App::slotNetworkBroken(int /*id*/, int oldstatus ,KGame * /*game */) doc->getPlayer(doc->QueryCurrentPlayer())->setTurn(true,true); KMessageBox::information(this,i18n("The network game ended!\n")); - doc->setGameStatus(oldstatus); + doc->setGametqStatus(oldstatus); } /** @@ -509,7 +509,7 @@ void Kwin4App::slotGameOver(int status, KPlayer * p, KGame * /*me*/) EndGame(TWin); else EndGame(TLost); - TQString msg=i18n("%1 won the game. Please restart next round.").arg(doc->QueryName(((FARBE)p->userId()))); + TQString msg=i18n("%1 won the game. Please restart next round.").tqarg(doc->QueryName(((FARBE)p->userId()))); slotStatusMsg(msg); } else if (status==2) // Abort @@ -527,7 +527,7 @@ void Kwin4App::slotGameOver(int status, KPlayer * p, KGame * /*me*/) void Kwin4App::slotInitNetwork() { - if (doc->gameStatus()==Kwin4Doc::Intro) doc->setGameStatus(Kwin4Doc::Pause); + if (doc->gametqStatus()==Kwin4Doc::Intro) doc->setGametqStatus(Kwin4Doc::Pause); TQString host = Prefs::host(); int port=Prefs::port(); @@ -539,7 +539,7 @@ void Kwin4App::slotInitNetwork() dlg.networkConfig()->setDiscoveryInfo("_twin4._tcp",Prefs::gamename()); TQVBox *box=dlg.configPage(KGameDialog::NetworkConfig); - TQVBoxLayout *l=(TQVBoxLayout *)(box->layout()); + TQVBoxLayout *l=(TQVBoxLayout *)(box->tqlayout()); mColorGroup=new TQVButtonGroup(box); connect(mColorGroup, TQT_SIGNAL(clicked(int)), TQT_TQOBJECT(this), TQT_SLOT(slotRemoteChanged(int))); diff --git a/twin4/twin4/twin4doc.cpp b/twin4/twin4/twin4doc.cpp index 0d09767c..303fd776 100644 --- a/twin4/twin4/twin4doc.cpp +++ b/twin4/twin4/twin4doc.cpp @@ -90,7 +90,7 @@ Kwin4Doc::Kwin4Doc(TQWidget *parent, const char *) : KGame(1234,TQT_TQOBJECT(par // last in init ResetGame(false); - setGameStatus(Intro); + setGametqStatus(Intro); // Listen to network connect(this,TQT_SIGNAL(signalMessageUpdate(int,TQ_UINT32,TQ_UINT32)), @@ -203,7 +203,7 @@ void Kwin4Doc::preparePlayerTurn() */ void Kwin4Doc::EndGame(TABLE mode) { - setGameStatus(End); + setGametqStatus(End); pView->clearError(); pView->EndGame(); Kwin4Player *yellow=getPlayer(Gelb); @@ -1181,20 +1181,20 @@ void Kwin4Doc::slotPropertyChanged(KGamePropertyBase *prop,KGame *) if (global_debug>1) kdDebug(12010) << "Amzug changed to " << mAmzug.value()<<endl; pView->scoreWidget()->setTurn(mAmzug); } - else if (prop->id()==KGamePropertyBase::IdGameStatus) + else if (prop->id()==KGamePropertyBase::IdGametqStatus) { - if (gameStatus()==Abort) + if (gametqStatus()==Abort) { if (global_debug>1) kdDebug(12010) << "PropertyChanged::status signal game abort +++" << endl; emit signalGameOver(2,getPlayer(QueryCurrentPlayer()),0); // 2 indicates Abort } - else if (gameStatus()==Run) + else if (gametqStatus()==Run) { if (global_debug>1) kdDebug(12010) << "PropertyChanged::status signal game run +++" << endl; preparePlayerTurn(); // Set the current player to play emit signalGameRun(); } - else if (gameStatus()==Init) + else if (gametqStatus()==Init) { if (global_debug>1) kdDebug(12010) << "PropertyChanged::status signal game INIT +++" << endl; ResetGame(true); @@ -1227,7 +1227,7 @@ bool Kwin4Doc::loadgame(TQDataStream &stream,bool network,bool reset) { if (global_debug>1) kdDebug () << "loadgame() network=" << network << " reset="<< reset << endl; - if (!network) setGameStatus(End); + if (!network) setGametqStatus(End); // Clear out the old game if (global_debug>1) kdDebug(12010)<<"loadgame wants to reset the game"<<endl; diff --git a/twin4/twin4/twin4view.cpp b/twin4/twin4/twin4view.cpp index 6ee09cc4..c425f90f 100644 --- a/twin4/twin4/twin4view.cpp +++ b/twin4/twin4/twin4view.cpp @@ -200,12 +200,12 @@ void Kwin4View::initView(bool deleteall) TQPixmap *pixmap=loadPixmap("background.png"); if (pixmap) - mCanvas->setBackgroundPixmap(*pixmap); + mCanvas->tqsetBackgroundPixmap(*pixmap); else mCanvas->setBackgroundColor(TQColor(0,0,128)); delete pixmap; - if (doc->gameStatus()==KGame::Intro) + if (doc->gametqStatus()==KGame::Intro) { mScoreWidget->hide(); mStatusWidget->hide(); @@ -481,7 +481,7 @@ void Kwin4View::setSprite(int no, int x, int col, bool enable) { KSprite *sprite; sprite=(KSprite *)(mCache->getItem("piece",no)); - if (sprite) sprite->setVisible(enable); + if (sprite) sprite->tqsetVisible(enable); setArrow(x,col); } @@ -497,7 +497,7 @@ void Kwin4View::setHint(int x,int y,bool enabled) sprite->move(x*(sprite->width()+mSpreadX)+mBoardX, y*(sprite->height()+mSpreadY)+mBoardY); } - sprite->setVisible(enabled); + sprite->tqsetVisible(enabled); } } @@ -601,7 +601,7 @@ bool Kwin4View::wrongPlayer(KPlayer *player,KGameIO::IOMode io) clearError(); int rnd=(kapp->random()%4) +1; TQString m; - m=TQString("text%1").arg(rnd); + m=TQString("text%1").tqarg(rnd); TQString ms; if (rnd==1) ms=i18n("Hold on... the other player has not been yet..."); else if (rnd==2) ms=i18n("Hold your horses..."); |