diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
commit | 576eb4299a00bc053db35414406f46372a0f70f2 (patch) | |
tree | 4c030922d533821db464af566188e7d40cc8848c /konquest/gamecore.cc | |
parent | 0718336b6017d1a4fc1d626544180a5a2a29ddec (diff) | |
download | tdegames-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 'konquest/gamecore.cc')
-rw-r--r-- | konquest/gamecore.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/konquest/gamecore.cc b/konquest/gamecore.cc index 843c1a92..3706cf68 100644 --- a/konquest/gamecore.cc +++ b/konquest/gamecore.cc @@ -68,7 +68,7 @@ CoreLogic::roll() Map::Map() - : QObject( 0, 0 ), freezeUpdates( false ), + : TQObject( 0, 0 ), freezeUpdates( false ), rows( BOARD_ROWS ), columns( BOARD_COLS ), hasSelectedSector( false ) { @@ -78,7 +78,7 @@ Map::Map() for( int y = 0; y < columns; y++ ) { grid[x][y] = Sector( this, x, y ); - connect( &grid[x][y], SIGNAL( update() ), this, SLOT( childSectorUpdate() )); + connect( &grid[x][y], TQT_SIGNAL( update() ), this, TQT_SLOT( childSectorUpdate() )); } } } @@ -94,13 +94,13 @@ Map::populateMap( PlayerList &players, Player *neutral, Freeze(); int index = 0; - QString names( "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*(),.<>;:[]{}/?-+\\|" ); + TQString names( "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*(),.<>;:[]{}/?-+\\|" ); // Create a planet for each player Player *plr; for( plr = players.first(); plr != 0; plr = players.next() ) { - QString newName( names.mid( index++, 1 ) ); + TQString newName( names.mid( index++, 1 ) ); Sector § = findRandomFreeSector(); Planet *plrPlanet = Planet::createPlayerPlanet( sect, plr, newName ); @@ -109,7 +109,7 @@ Map::populateMap( PlayerList &players, Player *neutral, for( int x = 0; x < numNeutralPlanets; x++ ) { - QString newName( names.mid( index++, 1 ) ); + TQString newName( names.mid( index++, 1 ) ); Sector § = findRandomFreeSector(); Planet *neutralPlanet = Planet::createNeutralPlanet( sect, neutral, newName ); @@ -242,16 +242,16 @@ const int Map::getColumns() const //--------------------------------------------------------------------------- Sector::Sector() -: QObject(0,0), planet( NULL ), parentMap(NULL ), x(0), y(0) +: TQObject(0,0), planet( NULL ), parentMap(NULL ), x(0), y(0) {} Sector::Sector( Map *newParentMap, int xPos, int yPos ) -: QObject(0,0), planet(NULL), parentMap( newParentMap ), x(xPos), y(yPos) +: TQObject(0,0), planet(NULL), parentMap( newParentMap ), x(xPos), y(yPos) { } Sector::Sector( const Sector & other ) -: QObject(0,0), planet(other.planet), parentMap(other.parentMap), x(other.x), y(other.y) +: TQObject(0,0), planet(other.planet), parentMap(other.parentMap), x(other.x), y(other.y) { } @@ -265,7 +265,7 @@ void Sector::setPlanet( Planet *newPlanet ) { planet = newPlanet; - connect( planet, SIGNAL( update() ), this, SLOT( childPlanetUpdate() ) ); + connect( planet, TQT_SIGNAL( update() ), this, TQT_SLOT( childPlanetUpdate() ) ); emit update(); } @@ -320,9 +320,9 @@ int Sector::getColumn() // class Planet //--------------------------------------------------------------------------- -Planet::Planet( QString planetName, Sector &newParentSector, Player *initialOwner, +Planet::Planet( TQString planetName, Sector &newParentSector, Player *initialOwner, int newProd, double newKillP, double newMorale ) - : QObject(0,0), name(planetName), owner(initialOwner), parentSector(newParentSector), + : TQObject(0,0), name(planetName), owner(initialOwner), parentSector(newParentSector), homeFleet( this, newProd ), killPercentage(newKillP), morale( newMorale ), productionRate(newProd) @@ -333,7 +333,7 @@ Planet::Planet( QString planetName, Sector &newParentSector, Player *initialOwne Planet::~Planet() {} Planet * -Planet::createPlayerPlanet( Sector &parentSector, Player *initialOwner, QString planetName ) +Planet::createPlayerPlanet( Sector &parentSector, Player *initialOwner, TQString planetName ) { CoreLogic clogic; @@ -344,7 +344,7 @@ Planet::createPlayerPlanet( Sector &parentSector, Player *initialOwner, QString } Planet * -Planet::createNeutralPlanet( Sector &parentSector, Player *initialOwner, QString planetName ) +Planet::createNeutralPlanet( Sector &parentSector, Player *initialOwner, TQString planetName ) { CoreLogic clogic; double morale = clogic.generateMorale(); @@ -414,7 +414,7 @@ Planet::getPlayer() const return owner; } -const QString & +const TQString & Planet::getName() const { return name; @@ -454,7 +454,7 @@ Planet::turn() //--------------------------------------------------------------------------- // class Player //--------------------------------------------------------------------------- -Player::Player( QString newName, QColor newColor, int newPlrNum, bool isAi ) : name( newName ), color( newColor ), +Player::Player( TQString newName, TQColor newColor, int newPlrNum, bool isAi ) : name( newName ), color( newColor ), playerNum( newPlrNum ), inPlay( true ), aiPlayer( isAi ), shipsBuilt(0), planetsConquered(0), fleetsLaunched(0), enemyFleetsDestroyed(0), enemyShipsDestroyed(0) { @@ -473,7 +473,7 @@ Player::operator==( const Player &otherPlayer ) const return false; } -QString & +TQString & Player::getName() { return name; @@ -482,20 +482,20 @@ Player::getName() QString Player::getColoredName() { - return QString("<font color=\"%1\">%2</font>").arg(color.name(), name); + return TQString("<font color=\"%1\">%2</font>").arg(color.name(), name); } -Player *Player::createPlayer( QString newName, QColor color, int playerNum, bool isAi ) +Player *Player::createPlayer( TQString newName, TQColor color, int playerNum, bool isAi ) { return new Player( newName, color, playerNum, isAi ); } Player *Player::createNeutralPlayer() { - return new Player( QString::null, gray, NEUTRAL_PLAYER_NUMBER, false ); + return new Player( TQString::null, gray, NEUTRAL_PLAYER_NUMBER, false ); } -QColor &Player::getColor() +TQColor &Player::getColor() { return color; } |