diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:36 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:36 -0600 |
commit | 97d1732e257f8700488d7ca1660ae7eba8fc6065 (patch) | |
tree | 4c6397ed2c1dd6f7c3354b5b87f313547d92a35f /twin4 | |
parent | 9c27a1a03e02fd53aedc1a182444b35fd8e14967 (diff) | |
download | tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.tar.gz tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.zip |
Rename a number of old tq methods that are no longer tq specific
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 bd55c418..9e3abddc 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").tqarg(no); + TQString name=s+TQString("_%1").arg(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").tqarg(no); + TQString dictname=name+TQString("_%1").arg(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").tqarg(i); + TQString anim=TQString("anim%1").arg(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 7a070322..53c295b4 100644 --- a/twin4/twin4/scorewidget.cpp +++ b/twin4/twin4/scorewidget.cpp @@ -20,7 +20,7 @@ #include "prefs.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.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->tqsetAlignment(TQt::AlignHCenter); + TextLabel7->setAlignment(TQt::AlignHCenter); LayoutB->addMultiCellWidget( TextLabel7, row, row,0,2 ); row++; TextLabel8 = new TQLabel( this, "TextLabel8" ); TextLabel8->setText( i18n( "vs" ) ); TextLabel8->setBackgroundColor( COL_STATUSFIELD ); - TextLabel8->tqsetAlignment(TQt::AlignHCenter); + TextLabel8->setAlignment(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->tqsetAlignment(TQt::AlignHCenter); + TextLabel9->setAlignment(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->tqsetAlignment(TQt::AlignRight); + TextLabel4->setAlignment(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->tqsetAlignment(TQt::AlignRight); + TextLabel5->setAlignment(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->tqsetAlignment(TQt::AlignRight); + TextLabel6->setAlignment(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").tqarg(i)); + TextLabel5->setText( TQString("%1").arg(i)); } void ScoreWidget::setLevel(int i) { - TextLabel4->setText( TQString("%1").tqarg(i)); + TextLabel4->setText( TQString("%1").arg(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").tqarg(i)); + TextLabel6->setText(TQString("%1").arg(i)); } void ScoreWidget::setPlayer(TQString s,int no) diff --git a/twin4/twin4/settings.ui b/twin4/twin4/settings.ui index c64677c6..7b0568de 100644 --- a/twin4/twin4/settings.ui +++ b/twin4/twin4/settings.ui @@ -81,7 +81,7 @@ <property name="text"> <string>Hard</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -235,7 +235,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> diff --git a/twin4/twin4/statistics.ui b/twin4/twin4/statistics.ui index b02e8be6..06385444 100644 --- a/twin4/twin4/statistics.ui +++ b/twin4/twin4/statistics.ui @@ -43,7 +43,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>16</height> @@ -70,7 +70,7 @@ <property name="text"> <string>Name</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> @@ -81,7 +81,7 @@ <property name="text"> <string>Won</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> @@ -97,7 +97,7 @@ <property name="text"> <string>Lost</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> @@ -118,7 +118,7 @@ <property name="text"> <string>Sum</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> @@ -129,13 +129,13 @@ <property name="text"> <string>Aborted</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> <widget class="TQLayoutWidget" row="6" column="0" rowspan="1" colspan="6"> <property name="name"> - <cstring>tqlayout1</cstring> + <cstring>layout1</cstring> </property> <hbox> <property name="name"> @@ -159,7 +159,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>51</width> <height>20</height> @@ -201,7 +201,7 @@ <property name="text"> <string>Drawn</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> diff --git a/twin4/twin4/statuswidget.ui b/twin4/twin4/statuswidget.ui index 41d6bef5..a7d2fa6e 100644 --- a/twin4/twin4/statuswidget.ui +++ b/twin4/twin4/statuswidget.ui @@ -38,7 +38,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>41</height> @@ -55,7 +55,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>90</width> <height>20</height> @@ -69,7 +69,7 @@ <property name="text"> <string>W</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> @@ -80,7 +80,7 @@ <property name="text"> <string>D</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> @@ -91,7 +91,7 @@ <property name="text"> <string>L</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> @@ -102,7 +102,7 @@ <property name="text"> <string>No</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> @@ -113,7 +113,7 @@ <property name="text"> <string>Bk</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> diff --git a/twin4/twin4/twin4.cpp b/twin4/twin4/twin4.cpp index 8500c2e6..aa8df6c5 100644 --- a/twin4/twin4/twin4.cpp +++ b/twin4/twin4/twin4.cpp @@ -17,7 +17,7 @@ // include files for QT #include <tqstring.h> -#include <tqlayout.h> +#include <layout.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->gametqStatus()==KGame::Run); + bool isRunning = (doc->gameStatus()==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->setGametqStatus(Kwin4Doc::End); + doc->setGameStatus(Kwin4Doc::End); // Init the board and Clear the old game out - doc->setGametqStatus(Kwin4Doc::Init); + doc->setGameStatus(Kwin4Doc::Init); // Run it - doc->setGametqStatus(Kwin4Doc::Run); + doc->setGameStatus(Kwin4Doc::Run); } /** @@ -360,7 +360,7 @@ void Kwin4App::slotNewGame() */ void Kwin4App::endGame() { - doc->setGametqStatus(Kwin4Doc::Abort); + doc->setGameStatus(Kwin4Doc::Abort); } /** @@ -453,7 +453,7 @@ void Kwin4App::EndGame(TABLE mode) */ void Kwin4App::slotStatusNames(){ TQString msg; - if (!(doc->gametqStatus()==KGame::Run)) + if (!(doc->gameStatus()==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->setGametqStatus(oldstatus); + doc->setGameStatus(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.").tqarg(doc->QueryName(((FARBE)p->userId()))); + TQString msg=i18n("%1 won the game. Please restart next round.").arg(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->gametqStatus()==Kwin4Doc::Intro) doc->setGametqStatus(Kwin4Doc::Pause); + if (doc->gameStatus()==Kwin4Doc::Intro) doc->setGameStatus(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->tqlayout()); + TQVBoxLayout *l=(TQVBoxLayout *)(box->layout()); 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 303fd776..0d09767c 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); - setGametqStatus(Intro); + setGameStatus(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) { - setGametqStatus(End); + setGameStatus(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::IdGametqStatus) + else if (prop->id()==KGamePropertyBase::IdGameStatus) { - if (gametqStatus()==Abort) + if (gameStatus()==Abort) { if (global_debug>1) kdDebug(12010) << "PropertyChanged::status signal game abort +++" << endl; emit signalGameOver(2,getPlayer(QueryCurrentPlayer()),0); // 2 indicates Abort } - else if (gametqStatus()==Run) + else if (gameStatus()==Run) { if (global_debug>1) kdDebug(12010) << "PropertyChanged::status signal game run +++" << endl; preparePlayerTurn(); // Set the current player to play emit signalGameRun(); } - else if (gametqStatus()==Init) + else if (gameStatus()==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) setGametqStatus(End); + if (!network) setGameStatus(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 c425f90f..6ee09cc4 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->tqsetBackgroundPixmap(*pixmap); + mCanvas->setBackgroundPixmap(*pixmap); else mCanvas->setBackgroundColor(TQColor(0,0,128)); delete pixmap; - if (doc->gametqStatus()==KGame::Intro) + if (doc->gameStatus()==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->tqsetVisible(enable); + if (sprite) sprite->setVisible(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->tqsetVisible(enabled); + sprite->setVisible(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").tqarg(rnd); + m=TQString("text%1").arg(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..."); |