summaryrefslogtreecommitdiffstats
path: root/atlantik/libatlantikui
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 /atlantik/libatlantikui
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 'atlantik/libatlantikui')
-rw-r--r--atlantik/libatlantikui/auction_widget.cpp48
-rw-r--r--atlantik/libatlantikui/auction_widget.h18
-rw-r--r--atlantik/libatlantikui/board.cpp90
-rw-r--r--atlantik/libatlantikui/board.h34
-rw-r--r--atlantik/libatlantikui/estatedetails.cpp88
-rw-r--r--atlantik/libatlantikui/estatedetails.h28
-rw-r--r--atlantik/libatlantikui/estateview.cpp60
-rw-r--r--atlantik/libatlantikui/estateview.h18
-rw-r--r--atlantik/libatlantikui/kwrappedlistviewitem.cpp32
-rw-r--r--atlantik/libatlantikui/kwrappedlistviewitem.h16
-rw-r--r--atlantik/libatlantikui/portfolioestate.cpp24
-rw-r--r--atlantik/libatlantikui/portfolioestate.h14
-rw-r--r--atlantik/libatlantikui/portfolioview.cpp50
-rw-r--r--atlantik/libatlantikui/portfolioview.h22
-rw-r--r--atlantik/libatlantikui/token.cpp36
-rw-r--r--atlantik/libatlantikui/token.h10
-rw-r--r--atlantik/libatlantikui/trade_widget.cpp104
-rw-r--r--atlantik/libatlantikui/trade_widget.h30
18 files changed, 361 insertions, 361 deletions
diff --git a/atlantik/libatlantikui/auction_widget.cpp b/atlantik/libatlantikui/auction_widget.cpp
index e7dc7fd8..219c8b2b 100644
--- a/atlantik/libatlantikui/auction_widget.cpp
+++ b/atlantik/libatlantikui/auction_widget.cpp
@@ -14,10 +14,10 @@
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.
-#include <qvgroupbox.h>
-#include <qhbox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
+#include <tqvgroupbox.h>
+#include <tqhbox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
#include <kdebug.h>
@@ -33,21 +33,21 @@
#include "auction_widget.moc"
-AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, QWidget *parent, const char *name) : QWidget(parent, name)
+AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_atlanticCore = atlanticCore;
m_auction = auction;
- connect(m_auction, SIGNAL(changed()), this, SLOT(auctionChanged()));
- connect(m_auction, SIGNAL(updateBid(Player *, int)), this, SLOT(updateBid(Player *, int)));
- connect(this, SIGNAL(bid(Auction *, int)), m_auction, SIGNAL(bid(Auction *, int)));
+ connect(m_auction, TQT_SIGNAL(changed()), this, TQT_SLOT(auctionChanged()));
+ connect(m_auction, TQT_SIGNAL(updateBid(Player *, int)), this, TQT_SLOT(updateBid(Player *, int)));
+ connect(this, TQT_SIGNAL(bid(Auction *, int)), m_auction, TQT_SIGNAL(bid(Auction *, int)));
- m_mainLayout = new QVBoxLayout(this, KDialog::marginHint());
+ m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint());
Q_CHECK_PTR(m_mainLayout);
// Player list
Estate *estate = auction->estate();
- m_playerGroupBox = new QVGroupBox(estate ? i18n("Auction: %1").arg(estate->name()) : i18n("Auction"), this, "groupBox");
+ m_playerGroupBox = new TQVGroupBox(estate ? i18n("Auction: %1").arg(estate->name()) : i18n("Auction"), this, "groupBox");
m_mainLayout->addWidget(m_playerGroupBox);
m_playerList = new KListView(m_playerGroupBox);
@@ -58,36 +58,36 @@ AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, QWidg
KListViewItem *item;
Player *player, *pSelf = m_atlanticCore->playerSelf();
- QPtrList<Player> playerList = m_atlanticCore->players();
- for (QPtrListIterator<Player> it(playerList); *it; ++it)
+ TQPtrList<Player> playerList = m_atlanticCore->players();
+ for (TQPtrListIterator<Player> it(playerList); *it; ++it)
{
if ( (player = *it) && player->game() == pSelf->game() )
{
- item = new KListViewItem(m_playerList, player->name(), QString("0"));
- item->setPixmap(0, QPixmap(SmallIcon("personal")));
+ item = new KListViewItem(m_playerList, player->name(), TQString("0"));
+ item->setPixmap(0, TQPixmap(SmallIcon("personal")));
m_playerItems[player] = item;
- connect(player, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *)));
+ connect(player, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *)));
}
}
// Bid spinbox and button
- QHBox *bidBox = new QHBox(this);
+ TQHBox *bidBox = new TQHBox(this);
m_mainLayout->addWidget(bidBox);
- m_bidSpinBox = new QSpinBox(1, 10000, 1, bidBox);
+ m_bidSpinBox = new TQSpinBox(1, 10000, 1, bidBox);
KPushButton *bidButton = new KPushButton(i18n("Make Bid"), bidBox, "bidButton");
- connect(bidButton, SIGNAL(clicked()), this, SLOT(slotBidButtonClicked()));
+ connect(bidButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBidButtonClicked()));
// Status label
- m_statusLabel = new QLabel(this, "statusLabel");
+ m_statusLabel = new TQLabel(this, "statusLabel");
m_mainLayout->addWidget(m_statusLabel);
}
void AuctionWidget::auctionChanged()
{
- QString status;
+ TQString status;
switch (m_auction->status())
{
case 1:
@@ -103,7 +103,7 @@ void AuctionWidget::auctionChanged()
break;
default:
- status = QString::null;
+ status = TQString::null;
}
m_statusLabel->setText(status);
}
@@ -113,7 +113,7 @@ void AuctionWidget::playerChanged(Player *player)
if (!player)
return;
- QListViewItem *item;
+ TQListViewItem *item;
if (!(item = m_playerItems[player]))
return;
@@ -126,11 +126,11 @@ void AuctionWidget::updateBid(Player *player, int amount)
if (!player)
return;
- QListViewItem *item;
+ TQListViewItem *item;
if (!(item = m_playerItems[player]))
return;
- item->setText(1, QString::number(amount));
+ item->setText(1, TQString::number(amount));
m_bidSpinBox->setMinValue(amount+1);
m_playerList->triggerUpdate();
}
diff --git a/atlantik/libatlantikui/auction_widget.h b/atlantik/libatlantikui/auction_widget.h
index a87b8fc4..72568615 100644
--- a/atlantik/libatlantikui/auction_widget.h
+++ b/atlantik/libatlantikui/auction_widget.h
@@ -17,9 +17,9 @@
#ifndef ATLANTIK_AUCTION_WIDGET_H
#define ATLANTIK_AUCTION_WIDGET_H
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqmap.h>
#include <klistview.h>
@@ -38,7 +38,7 @@ class AuctionWidget : public QWidget
Q_OBJECT
public:
- AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, QWidget *parent, const char *name=0);
+ AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *parent, const char *name=0);
private slots:
void auctionChanged();
@@ -50,11 +50,11 @@ signals:
void bid(Auction *auction, int amount);
private:
- QVBoxLayout *m_mainLayout;
- QVGroupBox *m_playerGroupBox;
- QSpinBox *m_bidSpinBox;
- QMap<Player *, KListViewItem *> m_playerItems;
- QLabel *m_statusLabel;
+ TQVBoxLayout *m_mainLayout;
+ TQVGroupBox *m_playerGroupBox;
+ TQSpinBox *m_bidSpinBox;
+ TQMap<Player *, KListViewItem *> m_playerItems;
+ TQLabel *m_statusLabel;
KListView *m_playerList;
diff --git a/atlantik/libatlantikui/board.cpp b/atlantik/libatlantikui/board.cpp
index a4fdf3ce..1b9ae0b5 100644
--- a/atlantik/libatlantikui/board.cpp
+++ b/atlantik/libatlantikui/board.cpp
@@ -16,8 +16,8 @@
#include <iostream>
-#include <qpainter.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
#include "board.h"
#include "board.moc"
-AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, QWidget *parent, const char *name) : QWidget(parent, name)
+AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_atlanticCore = atlanticCore;
m_maxEstates = maxEstates;
@@ -43,17 +43,17 @@ AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, Display
m_animateTokens = false;
m_lastServerDisplay = 0;
- setMinimumSize(QSize(500, 500));
+ setMinimumSize(TQSize(500, 500));
int sideLen = maxEstates/4;
// Animated token movement
m_movingToken = 0;
- m_timer = new QTimer(this);
- connect(m_timer, SIGNAL(timeout()), this, SLOT(slotMoveToken()));
+ m_timer = new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotMoveToken()));
m_resumeTimer = false;
- m_gridLayout = new QGridLayout(this, sideLen+1, sideLen+1);
+ m_gridLayout = new TQGridLayout(this, sideLen+1, sideLen+1);
for(int i=0;i<=sideLen;i++)
{
if (i==0 || i==sideLen)
@@ -68,7 +68,7 @@ AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, Display
}
}
-// spacer = new QWidget(this);
+// spacer = new TQWidget(this);
// m_gridLayout->addWidget(spacer, sideLen, sideLen); // SE
m_displayQueue.setAutoDelete(true);
@@ -101,7 +101,7 @@ void AtlantikBoard::setViewProperties(bool indicateUnowned, bool highliteUnowned
// Update EstateViews
EstateView *estateView;
- for (QPtrListIterator<EstateView> it(m_estateViews); *it; ++it)
+ for (TQPtrListIterator<EstateView> it(m_estateViews); *it; ++it)
if ((estateView = dynamic_cast<EstateView*>(*it)))
estateView->setViewProperties(indicateUnowned, highliteUnowned, darkenMortgaged, quartzEffects);
}
@@ -114,7 +114,7 @@ int AtlantikBoard::heightForWidth(int width)
EstateView *AtlantikBoard::findEstateView(Estate *estate)
{
EstateView *estateView;
- for (QPtrListIterator<EstateView> i(m_estateViews); *i; ++i)
+ for (TQPtrListIterator<EstateView> i(m_estateViews); *i; ++i)
{
estateView = dynamic_cast<EstateView*>(*i);
if (estateView && estateView->estate() == estate)
@@ -125,7 +125,7 @@ EstateView *AtlantikBoard::findEstateView(Estate *estate)
void AtlantikBoard::addEstateView(Estate *estate, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects)
{
- QString icon = QString();
+ TQString icon = TQString();
int estateId = estate->id();
EstateOrientation orientation = North;
int sideLen = m_gridLayout->numRows() - 1;
@@ -142,16 +142,16 @@ void AtlantikBoard::addEstateView(Estate *estate, bool indicateUnowned, bool hig
EstateView *estateView = new EstateView(estate, orientation, icon, indicateUnowned, highliteUnowned, darkenMortgaged, quartzEffects, this, "estateview");
m_estateViews.append(estateView);
- connect(estate, SIGNAL(changed()), estateView, SLOT(estateChanged()));
- connect(estateView, SIGNAL(estateToggleMortgage(Estate *)), estate, SIGNAL(estateToggleMortgage(Estate *)));
- connect(estateView, SIGNAL(LMBClicked(Estate *)), estate, SIGNAL(LMBClicked(Estate *)));
- connect(estateView, SIGNAL(estateHouseBuy(Estate *)), estate, SIGNAL(estateHouseBuy(Estate *)));
- connect(estateView, SIGNAL(estateHouseSell(Estate *)), estate, SIGNAL(estateHouseSell(Estate *)));
- connect(estateView, SIGNAL(newTrade(Player *)), estate, SIGNAL(newTrade(Player *)));
+ connect(estate, TQT_SIGNAL(changed()), estateView, TQT_SLOT(estateChanged()));
+ connect(estateView, TQT_SIGNAL(estateToggleMortgage(Estate *)), estate, TQT_SIGNAL(estateToggleMortgage(Estate *)));
+ connect(estateView, TQT_SIGNAL(LMBClicked(Estate *)), estate, TQT_SIGNAL(LMBClicked(Estate *)));
+ connect(estateView, TQT_SIGNAL(estateHouseBuy(Estate *)), estate, TQT_SIGNAL(estateHouseBuy(Estate *)));
+ connect(estateView, TQT_SIGNAL(estateHouseSell(Estate *)), estate, TQT_SIGNAL(estateHouseSell(Estate *)));
+ connect(estateView, TQT_SIGNAL(newTrade(Player *)), estate, TQT_SIGNAL(newTrade(Player *)));
// Designer has its own LMBClicked slot
if (m_mode == Play)
- connect(estateView, SIGNAL(LMBClicked(Estate *)), this, SLOT(prependEstateDetails(Estate *)));
+ connect(estateView, TQT_SIGNAL(LMBClicked(Estate *)), this, TQT_SLOT(prependEstateDetails(Estate *)));
if (estateId<sideLen)
m_gridLayout->addWidget(estateView, sideLen, sideLen-estateId);
@@ -167,8 +167,8 @@ void AtlantikBoard::addEstateView(Estate *estate, bool indicateUnowned, bool hig
if (m_atlanticCore)
{
Player *player = 0;
- QPtrList<Player> playerList = m_atlanticCore->players();
- for (QPtrListIterator<Player> it(playerList); (player = *it) ; ++it)
+ TQPtrList<Player> playerList = m_atlanticCore->players();
+ for (TQPtrListIterator<Player> it(playerList); (player = *it) ; ++it)
if (player->location() == estate)
addToken(player);
}
@@ -181,13 +181,13 @@ void AtlantikBoard::addAuctionWidget(Auction *auction)
m_displayQueue.prepend(auctionW);
updateCenter();
- connect(auction, SIGNAL(completed()), this, SLOT(displayDefault()));
+ connect(auction, TQT_SIGNAL(completed()), this, TQT_SLOT(displayDefault()));
}
Token *AtlantikBoard::findToken(Player *player)
{
Token *token = 0;
- for (QPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it)
+ for (TQPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it)
if (token->player() == player)
return token;
return 0;
@@ -215,12 +215,12 @@ void AtlantikBoard::addToken(Player *player)
Token *token = new Token(player, this, "token");
m_tokens.append(token);
- connect(player, SIGNAL(changed(Player *)), token, SLOT(playerChanged()));
+ connect(player, TQT_SIGNAL(changed(Player *)), token, TQT_SLOT(playerChanged()));
jumpToken(token);
// Timer to reinit the gameboard _after_ event loop
- QTimer::singleShot(100, this, SLOT(slotResizeAftermath()));
+ TQTimer::singleShot(100, this, TQT_SLOT(slotResizeAftermath()));
}
void AtlantikBoard::playerChanged(Player *player)
@@ -305,7 +305,7 @@ void AtlantikBoard::jumpToken(Token *token)
kdDebug() << "jumpToken to " << token->location()->name() << endl;
- QPoint tGeom = calculateTokenDestination(token);
+ TQPoint tGeom = calculateTokenDestination(token);
token->setGeometry(tGeom.x(), tGeom.y(), token->width(), token->height());
Player *player = token->player();
@@ -339,14 +339,14 @@ void AtlantikBoard::moveToken(Token *token)
m_timer->start(15);
}
-QPoint AtlantikBoard::calculateTokenDestination(Token *token, Estate *eDest)
+TQPoint AtlantikBoard::calculateTokenDestination(Token *token, Estate *eDest)
{
if (!eDest)
eDest = token->location();
EstateView *evDest = findEstateView(eDest);
if (!evDest)
- return QPoint(0, 0);
+ return TQPoint(0, 0);
int x = 0, y = 0;
if (token->player()->inJail())
@@ -374,7 +374,7 @@ QPoint AtlantikBoard::calculateTokenDestination(Token *token, Estate *eDest)
}
*/
}
- return QPoint(x, y);
+ return TQPoint(x, y);
}
void AtlantikBoard::slotMoveToken()
@@ -399,7 +399,7 @@ void AtlantikBoard::slotMoveToken()
// Where do we want to go today?
Estate *eDest = m_atlanticCore->estateAfter(m_movingToken->location());
- QPoint tGeom = calculateTokenDestination(m_movingToken, eDest);
+ TQPoint tGeom = calculateTokenDestination(m_movingToken, eDest);
int xDest = tGeom.x();
int yDest = tGeom.y();
@@ -442,7 +442,7 @@ void AtlantikBoard::slotMoveToken()
}
}
-void AtlantikBoard::resizeEvent(QResizeEvent *)
+void AtlantikBoard::resizeEvent(TQResizeEvent *)
{
// Stop moving tokens, slotResizeAftermath will re-enable this
if (m_timer!=0 && m_timer->isActive())
@@ -456,17 +456,17 @@ void AtlantikBoard::resizeEvent(QResizeEvent *)
int q = e->size().width() - e->size().height();
if (q > 0)
{
- QSize s(q, 0);
+ TQSize s(q, 0);
spacer->setFixedSize(s);
}
else
{
- QSize s(0, -q);
+ TQSize s(0, -q);
spacer->setFixedSize(s);
}
*/
// Timer to reinit the gameboard _after_ resizeEvent
- QTimer::singleShot(0, this, SLOT(slotResizeAftermath()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotResizeAftermath()));
}
void AtlantikBoard::slotResizeAftermath()
@@ -477,7 +477,7 @@ void AtlantikBoard::slotResizeAftermath()
// adjusted estate geometries.
Token *token = 0;
- for (QPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it)
+ for (TQPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it)
jumpToken(token);
// Restart the timer that was stopped in resizeEvent
@@ -493,7 +493,7 @@ void AtlantikBoard::displayDefault()
switch(m_displayQueue.count())
{
case 0:
- m_displayQueue.prepend(new QWidget(this));
+ m_displayQueue.prepend(new TQWidget(this));
break;
case 1:
if (EstateDetails *display = dynamic_cast<EstateDetails*>(m_lastServerDisplay))
@@ -508,7 +508,7 @@ void AtlantikBoard::displayDefault()
updateCenter();
}
-void AtlantikBoard::displayButton(QString command, QString caption, bool enabled)
+void AtlantikBoard::displayButton(TQString command, TQString caption, bool enabled)
{
if (EstateDetails *display = dynamic_cast<EstateDetails*>(m_lastServerDisplay))
display->addButton(command, caption, enabled);
@@ -521,7 +521,7 @@ void AtlantikBoard::addCloseButton()
eDetails->addCloseButton();
}
-void AtlantikBoard::insertDetails(QString text, bool clearText, bool clearButtons, Estate *estate)
+void AtlantikBoard::insertDetails(TQString text, bool clearText, bool clearButtons, Estate *estate)
{
EstateDetails *eDetails = 0;
@@ -544,8 +544,8 @@ void AtlantikBoard::insertDetails(QString text, bool clearText, bool clearButton
eDetails = new EstateDetails(estate, text, this);
m_lastServerDisplay = eDetails;
- connect(eDetails, SIGNAL(buttonCommand(QString)), this, SIGNAL(buttonCommand(QString)));
- connect(eDetails, SIGNAL(buttonClose()), this, SLOT(displayDefault()));
+ connect(eDetails, TQT_SIGNAL(buttonCommand(TQString)), this, TQT_SIGNAL(buttonCommand(TQString)));
+ connect(eDetails, TQT_SIGNAL(buttonClose()), this, TQT_SLOT(displayDefault()));
m_displayQueue.insert(0, eDetails);
updateCenter();
@@ -560,11 +560,11 @@ void AtlantikBoard::prependEstateDetails(Estate *estate)
if (m_displayQueue.getFirst() == m_lastServerDisplay)
{
- eDetails = new EstateDetails(estate, QString::null, this);
+ eDetails = new EstateDetails(estate, TQString::null, this);
m_displayQueue.prepend(eDetails);
- connect(eDetails, SIGNAL(buttonCommand(QString)), this, SIGNAL(buttonCommand(QString)));
- connect(eDetails, SIGNAL(buttonClose()), this, SLOT(displayDefault()));
+ connect(eDetails, TQT_SIGNAL(buttonCommand(TQString)), this, TQT_SIGNAL(buttonCommand(TQString)));
+ connect(eDetails, TQT_SIGNAL(buttonClose()), this, TQT_SLOT(displayDefault()));
}
else
{
@@ -572,7 +572,7 @@ void AtlantikBoard::prependEstateDetails(Estate *estate)
if (eDetails)
{
eDetails->setEstate(estate);
- eDetails->setText( QString::null );
+ eDetails->setText( TQString::null );
// eDetails->clearButtons();
}
else
@@ -590,12 +590,12 @@ void AtlantikBoard::prependEstateDetails(Estate *estate)
void AtlantikBoard::updateCenter()
{
- QWidget *center = m_displayQueue.getFirst();
+ TQWidget *center = m_displayQueue.getFirst();
m_gridLayout->addMultiCellWidget(center, 1, m_gridLayout->numRows()-2, 1, m_gridLayout->numCols()-2);
center->show();
}
-QWidget *AtlantikBoard::centerWidget()
+TQWidget *AtlantikBoard::centerWidget()
{
return m_displayQueue.getFirst();
}
diff --git a/atlantik/libatlantikui/board.h b/atlantik/libatlantikui/board.h
index deedb3d6..21c47991 100644
--- a/atlantik/libatlantikui/board.h
+++ b/atlantik/libatlantikui/board.h
@@ -17,10 +17,10 @@
#ifndef ATLANTIK_BOARD_H
#define ATLANTIK_BOARD_H
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
#include "libatlantikui_export.h"
class QPoint;
@@ -39,7 +39,7 @@ Q_OBJECT
public:
enum DisplayMode { Play, Edit };
- AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, QWidget *parent, const char *name=0);
+ AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *parent, const char *name=0);
~AtlantikBoard();
void reset();
@@ -53,7 +53,7 @@ public:
void indicateUnownedChanged();
EstateView *findEstateView(Estate *estate);
- QWidget *centerWidget();
+ TQWidget *centerWidget();
public slots:
void slotMoveToken();
@@ -62,41 +62,41 @@ public slots:
private slots:
void playerChanged(Player *player);
- void displayButton(QString command, QString caption, bool enabled);
+ void displayButton(TQString command, TQString caption, bool enabled);
void prependEstateDetails(Estate *);
- void insertDetails(QString text, bool clearText, bool clearButtons, Estate *estate = 0);
+ void insertDetails(TQString text, bool clearText, bool clearButtons, Estate *estate = 0);
void addCloseButton();
signals:
void tokenConfirmation(Estate *estate);
- void buttonCommand(QString command);
+ void buttonCommand(TQString command);
protected:
- void resizeEvent(QResizeEvent *);
+ void resizeEvent(TQResizeEvent *);
private:
Token *findToken(Player *player);
void jumpToken(Token *token);
void moveToken(Token *token);
- QPoint calculateTokenDestination(Token *token, Estate *estate = 0);
+ TQPoint calculateTokenDestination(Token *token, Estate *estate = 0);
void updateCenter();
AtlanticCore *m_atlanticCore;
DisplayMode m_mode;
- QWidget *spacer, *m_lastServerDisplay;
- QGridLayout *m_gridLayout;
+ TQWidget *spacer, *m_lastServerDisplay;
+ TQGridLayout *m_gridLayout;
Token *m_movingToken;
- QTimer *m_timer;
+ TQTimer *m_timer;
bool m_resumeTimer;
bool m_animateTokens;
int m_maxEstates;
- QPtrList<EstateView> m_estateViews;
- QPtrList<Token> m_tokens;
- QPtrList<QWidget> m_displayQueue;
+ TQPtrList<EstateView> m_estateViews;
+ TQPtrList<Token> m_tokens;
+ TQPtrList<TQWidget> m_displayQueue;
};
#endif
diff --git a/atlantik/libatlantikui/estatedetails.cpp b/atlantik/libatlantikui/estatedetails.cpp
index d143033c..3a71f25a 100644
--- a/atlantik/libatlantikui/estatedetails.cpp
+++ b/atlantik/libatlantikui/estatedetails.cpp
@@ -14,12 +14,12 @@
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qvgroupbox.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqvgroupbox.h>
#include <kdialog.h>
#include <kglobalsettings.h>
@@ -39,7 +39,7 @@
#include "estatedetails.h"
#include "kwrappedlistviewitem.h"
-EstateDetails::EstateDetails(Estate *estate, QString text, QWidget *parent, const char *name) : QWidget(parent, name)
+EstateDetails::EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_pixmap = 0;
m_quartzBlocks = 0;
@@ -51,22 +51,22 @@ EstateDetails::EstateDetails(Estate *estate, QString text, QWidget *parent, cons
m_closeButton = 0;
m_buttons.setAutoDelete(true);
- m_mainLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
Q_CHECK_PTR(m_mainLayout);
- m_mainLayout->addItem(new QSpacerItem(KDialog::spacingHint(), KDialog::spacingHint()+50, QSizePolicy::Fixed, QSizePolicy::Minimum));
+ m_mainLayout->addItem(new TQSpacerItem(KDialog::spacingHint(), KDialog::spacingHint()+50, TQSizePolicy::Fixed, TQSizePolicy::Minimum));
m_infoListView = new KListView(this, "infoListView");
- m_infoListView->addColumn(m_estate ? m_estate->name() : QString("") );
+ m_infoListView->addColumn(m_estate ? m_estate->name() : TQString("") );
m_infoListView->setSorting(-1);
m_mainLayout->addWidget(m_infoListView);
appendText(text);
- m_buttonBox = new QHBoxLayout(m_mainLayout, KDialog::spacingHint());
+ m_buttonBox = new TQHBoxLayout(m_mainLayout, KDialog::spacingHint());
m_buttonBox->setMargin(0);
- m_buttonBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ m_buttonBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
setEstate(estate);
}
@@ -78,7 +78,7 @@ EstateDetails::~EstateDetails()
delete m_infoListView;
}
-void EstateDetails::paintEvent(QPaintEvent *)
+void EstateDetails::paintEvent(TQPaintEvent *)
{
if (m_recreateQuartz)
{
@@ -109,11 +109,11 @@ void EstateDetails::paintEvent(QPaintEvent *)
if (b_recreate)
{
delete m_pixmap;
- m_pixmap = new QPixmap(width(), height());
+ m_pixmap = new TQPixmap(width(), height());
- QColor greenHouse(0, 255, 0);
- QColor redHotel(255, 51, 51);
- QPainter painter;
+ TQColor greenHouse(0, 255, 0);
+ TQColor redHotel(255, 51, 51);
+ TQPainter painter;
painter.begin(m_pixmap, this);
painter.setPen(Qt::black);
@@ -130,12 +130,12 @@ void EstateDetails::paintEvent(QPaintEvent *)
if (m_estate)
{
int titleHeight = 50;
- QColor titleColor = (m_estate->color().isValid() ? m_estate->color() : m_estate->bgColor().light(80));
+ TQColor titleColor = (m_estate->color().isValid() ? m_estate->color() : m_estate->bgColor().light(80));
KPixmap* quartzBuffer = new KPixmap;
quartzBuffer->resize(25, (height()/4)-2);
- QPainter quartzPainter;
+ TQPainter quartzPainter;
quartzPainter.begin(quartzBuffer, this);
painter.setBrush(titleColor);
@@ -178,7 +178,7 @@ void EstateDetails::paintEvent(QPaintEvent *)
if (fontSize == -1)
fontSize = KGlobalSettings::generalFont().pixelSize();
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize * 2, QFont::Bold));
+ painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize * 2, TQFont::Bold));
painter.drawText(KDialog::marginHint(), KDialog::marginHint(), width()-KDialog::marginHint(), titleHeight, Qt::AlignJustify, m_estate->name());
painter.setPen(Qt::black);
@@ -189,12 +189,12 @@ void EstateDetails::paintEvent(QPaintEvent *)
if (m_estate->estateGroup())
{
xText = titleHeight - fontSize - KDialog::marginHint();
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize, QFont::Bold));
+ painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize, TQFont::Bold));
painter.drawText(5, xText, width()-10, titleHeight, Qt::AlignRight, m_estate->estateGroup()->name().upper());
}
xText = titleHeight + fontSize + 5;
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize, QFont::Normal));
+ painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize, TQFont::Normal));
}
b_recreate = false;
@@ -202,7 +202,7 @@ void EstateDetails::paintEvent(QPaintEvent *)
bitBlt(this, 0, 0, m_pixmap);
}
-void EstateDetails::resizeEvent(QResizeEvent *)
+void EstateDetails::resizeEvent(TQResizeEvent *)
{
m_recreateQuartz = true;
b_recreate = true;
@@ -212,43 +212,43 @@ void EstateDetails::addDetails()
{
if (m_estate)
{
- QListViewItem *infoText = 0;
+ TQListViewItem *infoText = 0;
// Price
if (m_estate->price())
{
- infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").arg(m_estate->price()));
- infoText->setPixmap(0, QPixmap(SmallIcon("info")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").arg(m_estate->price()));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
}
// Owner, houses, isMortgaged
if (m_estate && m_estate->canBeOwned())
{
- infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").arg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned")));
- infoText->setPixmap(0, QPixmap(SmallIcon("info")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").arg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned")));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
if (m_estate->isOwned())
{
- infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").arg(m_estate->houses()));
- infoText->setPixmap(0, QPixmap(SmallIcon("info")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").arg(m_estate->houses()));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
- infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").arg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No")));
- infoText->setPixmap(0, QPixmap(SmallIcon("info")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").arg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No")));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
}
}
}
}
-void EstateDetails::addButton(QString command, QString caption, bool enabled)
+void EstateDetails::addButton(TQString command, TQString caption, bool enabled)
{
KPushButton *button = new KPushButton(caption, this);
m_buttons.append(button);
- m_buttonCommandMap[(QObject *)button] = command;
+ m_buttonCommandMap[(TQObject *)button] = command;
m_buttonBox->addWidget(button);
if (m_estate)
{
- QColor bgColor, fgColor;
+ TQColor bgColor, fgColor;
bgColor = m_estate->bgColor().light(110);
fgColor = ( bgColor.red() + bgColor.green() + bgColor.blue() < 255 ) ? Qt::white : Qt::black;
@@ -258,7 +258,7 @@ void EstateDetails::addButton(QString command, QString caption, bool enabled)
button->setEnabled(enabled);
button->show();
- connect(button, SIGNAL(pressed()), this, SLOT(buttonPressed()));
+ connect(button, TQT_SIGNAL(pressed()), this, TQT_SLOT(buttonPressed()));
}
void EstateDetails::addCloseButton()
@@ -268,7 +268,7 @@ void EstateDetails::addCloseButton()
m_closeButton = new KPushButton(KStdGuiItem::close(), this);
m_buttonBox->addWidget(m_closeButton);
m_closeButton->show();
- connect(m_closeButton, SIGNAL(pressed()), this, SIGNAL(buttonClose()));
+ connect(m_closeButton, TQT_SIGNAL(pressed()), this, TQT_SIGNAL(buttonClose()));
}
}
@@ -278,30 +278,30 @@ void EstateDetails::setEstate(Estate *estate)
{
m_estate = estate;
- m_infoListView->setColumnText( 0, m_estate ? m_estate->name() : QString("") );
+ m_infoListView->setColumnText( 0, m_estate ? m_estate->name() : TQString("") );
b_recreate = true;
update();
}
}
-void EstateDetails::setText(QString text)
+void EstateDetails::setText(TQString text)
{
m_infoListView->clear();
appendText(text);
}
-void EstateDetails::appendText(QString text)
+void EstateDetails::appendText(TQString text)
{
if ( text.isEmpty() )
return;
KWrappedListViewItem *infoText = new KWrappedListViewItem(m_infoListView, m_infoListView->lastItem(), text);
- if ( text.find( QRegExp("rolls") ) != -1 )
- infoText->setPixmap(0, QPixmap(SmallIcon("roll")));
+ if ( text.find( TQRegExp("rolls") ) != -1 )
+ infoText->setPixmap(0, TQPixmap(SmallIcon("roll")));
else
- infoText->setPixmap(0, QPixmap(SmallIcon("atlantik")));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("atlantik")));
m_infoListView->ensureItemVisible( infoText );
}
@@ -321,7 +321,7 @@ void EstateDetails::clearButtons()
void EstateDetails::buttonPressed()
{
- emit buttonCommand(QString(m_buttonCommandMap[(QObject *)QObject::sender()]));
+ emit buttonCommand(TQString(m_buttonCommandMap[(TQObject *)TQObject::sender()]));
}
#include "estatedetails.moc"
diff --git a/atlantik/libatlantikui/estatedetails.h b/atlantik/libatlantikui/estatedetails.h
index b8264a51..6c8a7640 100644
--- a/atlantik/libatlantikui/estatedetails.h
+++ b/atlantik/libatlantikui/estatedetails.h
@@ -17,7 +17,7 @@
#ifndef ATLANTIK_ESTATEDETAILS_H
#define ATLANTIK_ESTATEDETAILS_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QPixmap;
class QString;
@@ -37,41 +37,41 @@ class EstateDetails : public QWidget
Q_OBJECT
public:
- EstateDetails(Estate *estate, QString text, QWidget *parent, const char *name = 0);
+ EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name = 0);
~EstateDetails();
Estate *estate() { return m_estate; }
void addDetails();
- void addButton(const QString command, const QString caption, bool enabled);
+ void addButton(const TQString command, const TQString caption, bool enabled);
void addCloseButton();
void setEstate(Estate *estate);
- void setText(QString text);
- void appendText(QString text);
+ void setText(TQString text);
+ void appendText(TQString text);
void clearButtons();
protected:
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
private slots:
void buttonPressed();
signals:
- void buttonCommand(QString);
+ void buttonCommand(TQString);
void buttonClose();
private:
Estate *m_estate;
- QPixmap *m_pixmap;
+ TQPixmap *m_pixmap;
KPixmap *m_quartzBlocks;
KListView *m_infoListView;
KPushButton *m_closeButton;
bool b_recreate, m_recreateQuartz;
- QVBoxLayout *m_mainLayout;
- QHBoxLayout *m_buttonBox;
- QVGroupBox *m_textGroupBox;
- QMap <QObject *, QString> m_buttonCommandMap;
- QPtrList<KPushButton> m_buttons;
+ TQVBoxLayout *m_mainLayout;
+ TQHBoxLayout *m_buttonBox;
+ TQVGroupBox *m_textGroupBox;
+ TQMap <TQObject *, TQString> m_buttonCommandMap;
+ TQPtrList<KPushButton> m_buttons;
};
#endif
diff --git a/atlantik/libatlantikui/estateview.cpp b/atlantik/libatlantikui/estateview.cpp
index b8c3f38c..4755ccd3 100644
--- a/atlantik/libatlantikui/estateview.cpp
+++ b/atlantik/libatlantikui/estateview.cpp
@@ -14,11 +14,11 @@
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qwmatrix.h>
-#include <qcursor.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqwmatrix.h>
+#include <tqcursor.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -36,7 +36,7 @@
#include "estateview.moc"
#include "config.h"
-EstateView::EstateView(Estate *estate, EstateOrientation orientation, const QString &_icon, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, QWidget *parent, const char *name) : QWidget(parent, name, WResizeNoErase)
+EstateView::EstateView(Estate *estate, EstateOrientation orientation, const TQString &_icon, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, TQWidget *parent, const char *name) : TQWidget(parent, name, WResizeNoErase)
{
m_estate = estate;
m_orientation = orientation;
@@ -57,7 +57,7 @@ EstateView::EstateView(Estate *estate, EstateOrientation orientation, const QStr
pe = 0;
updatePE();
- icon = new QPixmap(locate("data", "atlantik/pics/" + _icon));
+ icon = new TQPixmap(locate("data", "atlantik/pics/" + _icon));
icon = rotatePixmap(icon);
updateToolTip();
@@ -65,11 +65,11 @@ EstateView::EstateView(Estate *estate, EstateOrientation orientation, const QStr
void EstateView::updateToolTip()
{
- QToolTip::remove(this);
+ TQToolTip::remove(this);
if ( m_estate )
{
- QString toolTip = m_estate->name();
+ TQString toolTip = m_estate->name();
if ( m_estate->isOwned() )
{
toolTip.append( "\n" + i18n("Owner: %1").arg( m_estate->owner()->name() ) );
@@ -87,7 +87,7 @@ void EstateView::updateToolTip()
else if ( m_estate->money() )
toolTip.append( "\n" + i18n("Money: %1").arg( m_estate->money() ) );
- QToolTip::add( this, toolTip );
+ TQToolTip::add( this, toolTip );
}
}
@@ -123,12 +123,12 @@ void EstateView::setViewProperties(bool indicateUnowned, bool highliteUnowned, b
update();
}
-QPixmap *EstateView::rotatePixmap(QPixmap *p)
+TQPixmap *EstateView::rotatePixmap(TQPixmap *p)
{
if (p==0 || p->isNull())
return 0;
- QWMatrix m;
+ TQWMatrix m;
switch(m_orientation)
{
@@ -152,7 +152,7 @@ KPixmap *EstateView::rotatePixmap(KPixmap *p)
if (p==0 || p->isNull())
return 0;
- QWMatrix m;
+ TQWMatrix m;
switch(m_orientation)
{
@@ -217,7 +217,7 @@ void EstateView::repositionPortfolioEstate()
}
}
-void EstateView::paintEvent(QPaintEvent *)
+void EstateView::paintEvent(TQPaintEvent *)
{
m_titleHeight = height()/4;
m_titleWidth = width()/4;
@@ -250,11 +250,11 @@ void EstateView::paintEvent(QPaintEvent *)
if (b_recreate)
{
delete qpixmap;
- qpixmap = new QPixmap(width(), height());
+ qpixmap = new TQPixmap(width(), height());
- QColor greenHouse(0, 255, 0);
- QColor redHotel(255, 51, 51);
- QPainter painter;
+ TQColor greenHouse(0, 255, 0);
+ TQColor redHotel(255, 51, 51);
+ TQPainter painter;
painter.begin(qpixmap, this);
painter.setPen(Qt::black);
@@ -280,7 +280,7 @@ void EstateView::paintEvent(QPaintEvent *)
else
quartzBuffer->resize(m_titleWidth-2, 25);
- QPainter quartzPainter;
+ TQPainter quartzPainter;
quartzPainter.begin(quartzBuffer, this);
painter.setBrush(m_estate->color());
@@ -401,15 +401,15 @@ void EstateView::paintEvent(QPaintEvent *)
delete quartzBuffer;
}
- QFont font = QFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Normal );
+ TQFont font = TQFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal );
painter.setFont(font);
- QString estateName = m_estate->name();
+ TQString estateName = m_estate->name();
#if defined(KDE_MAKE_VERSION)
#if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0)
if ( m_estate->color().isValid() && ( m_orientation == West || m_orientation == East ) )
- estateName = KStringHandler::rPixelSqueeze( m_estate->name(), QFontMetrics( font ), 3*width()/4 );
+ estateName = KStringHandler::rPixelSqueeze( m_estate->name(), TQFontMetrics( font ), 3*width()/4 );
else
- estateName = KStringHandler::rPixelSqueeze( m_estate->name(), QFontMetrics( font ), width() );
+ estateName = KStringHandler::rPixelSqueeze( m_estate->name(), TQFontMetrics( font ), width() );
#endif
#endif
if (m_estate->color().isValid() && m_orientation == West)
@@ -422,15 +422,15 @@ void EstateView::paintEvent(QPaintEvent *)
bitBlt(this, 0, 0, qpixmap);
}
-void EstateView::resizeEvent(QResizeEvent *)
+void EstateView::resizeEvent(TQResizeEvent *)
{
m_recreateQuartz = true;
b_recreate = true;
- QTimer::singleShot(0, this, SLOT(slotResizeAftermath()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotResizeAftermath()));
}
-void EstateView::mousePressEvent(QMouseEvent *e)
+void EstateView::mousePressEvent(TQMouseEvent *e)
{
if (e->button()==RightButton && m_estate->isOwned())
{
@@ -482,9 +482,9 @@ void EstateView::mousePressEvent(QMouseEvent *e)
KPopupMenu *pm = dynamic_cast<KPopupMenu *>(rmbMenu);
if (pm) {
- connect(pm, SIGNAL(activated(int)), this, SLOT(slotMenuAction(int)));
+ connect(pm, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuAction(int)));
}
- QPoint g = QCursor::pos();
+ TQPoint g = TQCursor::pos();
rmbMenu->exec(g);
delete rmbMenu;
}
@@ -521,9 +521,9 @@ void EstateView::slotMenuAction(int item)
// Kudos to Gallium <gallium@kde.org> for writing the Quartz KWin style and
// letting me use the ultra slick algorithm!
-void EstateView::drawQuartzBlocks(KPixmap *pi, KPixmap &p, const QColor &c1, const QColor &c2)
+void EstateView::drawQuartzBlocks(KPixmap *pi, KPixmap &p, const TQColor &c1, const TQColor &c2)
{
- QPainter px;
+ TQPainter px;
if (pi==0 || pi->isNull())
return;
diff --git a/atlantik/libatlantikui/estateview.h b/atlantik/libatlantikui/estateview.h
index 864c8983..7e1d8cdc 100644
--- a/atlantik/libatlantikui/estateview.h
+++ b/atlantik/libatlantikui/estateview.h
@@ -17,8 +17,8 @@
#ifndef ATLANTIK_ESTATEVIEW_H
#define ATLANTIK_ESTATEVIEW_H
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include <kpixmap.h>
@@ -34,7 +34,7 @@ class EstateView : public QWidget
Q_OBJECT
public:
- EstateView(Estate *estate, EstateOrientation orientation, const QString &, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, QWidget *parent, const char *name = 0);
+ EstateView(Estate *estate, EstateOrientation orientation, const TQString &, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, TQWidget *parent, const char *name = 0);
void setViewProperties(bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects);
Estate *estate() { return m_estate; }
void updatePE();
@@ -51,20 +51,20 @@ Q_OBJECT
void LMBClicked(Estate *estate);
protected:
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
- void mousePressEvent(QMouseEvent *);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void mousePressEvent(TQMouseEvent *);
private:
void updateToolTip();
- QPixmap *rotatePixmap(QPixmap *);
+ TQPixmap *rotatePixmap(TQPixmap *);
KPixmap *rotatePixmap(KPixmap *);
- void drawQuartzBlocks(KPixmap *pi, KPixmap &p, const QColor &c1, const QColor &c2);
+ void drawQuartzBlocks(KPixmap *pi, KPixmap &p, const TQColor &c1, const TQColor &c2);
void repositionPortfolioEstate();
Estate *m_estate;
- QPixmap *qpixmap, *icon;
+ TQPixmap *qpixmap, *icon;
KPixmap *m_quartzBlocks;
bool m_indicateUnowned, m_highliteUnowned, m_darkenMortgaged, m_quartzEffects;
bool b_recreate, m_recreateQuartz;
diff --git a/atlantik/libatlantikui/kwrappedlistviewitem.cpp b/atlantik/libatlantikui/kwrappedlistviewitem.cpp
index 7bd9e2cf..38c0d636 100644
--- a/atlantik/libatlantikui/kwrappedlistviewitem.cpp
+++ b/atlantik/libatlantikui/kwrappedlistviewitem.cpp
@@ -22,8 +22,8 @@
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
-#include <qheader.h>
-#include <qstring.h>
+#include <tqheader.h>
+#include <tqstring.h>
#include <kglobalsettings.h>
#include <klistview.h>
@@ -31,14 +31,14 @@
#include "kwrappedlistviewitem.h"
-KWrappedListViewItem::KWrappedListViewItem( QListView *parent, QString text, QString t2 )
-: QObject(), KListViewItem( parent )
+KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQString text, TQString t2 )
+: TQObject(), KListViewItem( parent )
{
init( parent, text, t2 );
}
-KWrappedListViewItem::KWrappedListViewItem( QListView *parent, QListViewItem *after, QString text, QString t2 )
-: QObject(), KListViewItem( parent, after )
+KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQListViewItem *after, TQString text, TQString t2 )
+: TQObject(), KListViewItem( parent, after )
{
init( parent, text, t2 );
}
@@ -49,7 +49,7 @@ void KWrappedListViewItem::setup()
}
/*
-int KWrappedListViewItem::width( const QFontMetrics&, const QListView*, int ) const
+int KWrappedListViewItem::width( const TQFontMetrics&, const TQListView*, int ) const
{
return m_wrap->boundingRect().width();
}
@@ -60,12 +60,12 @@ void KWrappedListViewItem::wrapColumn( int c )
if ( c != m_wrapColumn )
return;
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
- QFont font = QFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Normal );
- QFontMetrics fm = QFontMetrics( font );
+ TQFont font = TQFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal );
+ TQFontMetrics fm = TQFontMetrics( font );
int wrapWidth = lv->width();
for ( int i = 0 ; i < m_wrapColumn ; i++ )
@@ -74,16 +74,16 @@ void KWrappedListViewItem::wrapColumn( int c )
if ( pixmap(c) )
wrapWidth -= ( pixmap( c )->width() + lv->itemMargin() );
- QScrollBar *scrollBar = lv->verticalScrollBar();
+ TQScrollBar *scrollBar = lv->verticalScrollBar();
if ( !scrollBar->isHidden() )
wrapWidth -= scrollBar->width();
- QRect rect = QRect( 0, 0, wrapWidth - 20, -1 );
+ TQRect rect = TQRect( 0, 0, wrapWidth - 20, -1 );
KWordWrap *wrap = KWordWrap::formatText( fm, rect, 0, m_origText );
setText( c, wrap->wrappedString() );
- int lc = text(c).contains( QChar( '\n' ) ) + 1;
+ int lc = text(c).contains( TQChar( '\n' ) ) + 1;
setHeight( wrap->boundingRect().height() + lc*lv->itemMargin() );
widthChanged( c );
@@ -91,11 +91,11 @@ void KWrappedListViewItem::wrapColumn( int c )
delete wrap;
}
-void KWrappedListViewItem::init( QListView *parent, QString text, QString t2 )
+void KWrappedListViewItem::init( TQListView *parent, TQString text, TQString t2 )
{
m_wrapColumn = 0;
setMultiLinesEnabled( true );
- parent->setResizeMode( QListView::LastColumn );
+ parent->setResizeMode( TQListView::LastColumn );
m_origText = text;
@@ -110,7 +110,7 @@ void KWrappedListViewItem::init( QListView *parent, QString text, QString t2 )
wrapColumn( m_wrapColumn );
- connect( parent->header(), SIGNAL(sizeChange(int, int, int)), this, SLOT(wrapColumn(int)));
+ connect( parent->header(), TQT_SIGNAL(sizeChange(int, int, int)), this, TQT_SLOT(wrapColumn(int)));
}
#include "kwrappedlistviewitem.moc"
diff --git a/atlantik/libatlantikui/kwrappedlistviewitem.h b/atlantik/libatlantikui/kwrappedlistviewitem.h
index 056cef6d..ceda1afe 100644
--- a/atlantik/libatlantikui/kwrappedlistviewitem.h
+++ b/atlantik/libatlantikui/kwrappedlistviewitem.h
@@ -25,29 +25,29 @@
#ifndef KWRAPPEDLISTVIEWITEM_H
#define KWRAPPEDLISTVIEWITEM_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <klistview.h>
class KWordWrap;
-class KWrappedListViewItem : public QObject, public KListViewItem
+class KWrappedListViewItem : public TQObject, public KListViewItem
{
Q_OBJECT
public:
- KWrappedListViewItem( QListView *parent, QString text, QString=QString::null );
- KWrappedListViewItem( QListView *parent, QListViewItem *after, QString text, QString=QString::null );
+ KWrappedListViewItem( TQListView *parent, TQString text, QString=TQString::null );
+ KWrappedListViewItem( TQListView *parent, TQListViewItem *after, TQString text, QString=TQString::null );
void setup();
-// int width(const QFontMetrics& fm, const QListView* lv, int c) const;
+// int width(const TQFontMetrics& fm, const TQListView* lv, int c) const;
private slots:
void wrapColumn( int c );
private:
- void init( QListView *parent, QString text, QString=QString::null );
- QString m_origText;
+ void init( TQListView *parent, TQString text, QString=TQString::null );
+ TQString m_origText;
int m_wrapColumn;
};
diff --git a/atlantik/libatlantikui/portfolioestate.cpp b/atlantik/libatlantikui/portfolioestate.cpp
index 625fb055..3bfed677 100644
--- a/atlantik/libatlantikui/portfolioestate.cpp
+++ b/atlantik/libatlantikui/portfolioestate.cpp
@@ -14,20 +14,20 @@
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.
-#include <qcolor.h>
-#include <qpainter.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
+#include <tqrect.h>
#include "portfolioestate.moc"
#include "estate.h"
-PortfolioEstate::PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, QWidget *parent, const char *name) : QWidget(parent, name)
+PortfolioEstate::PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_estate = estate;
m_player = player;
m_alwaysOwned = alwaysOwned;
- QSize s(PE_WIDTH, PE_HEIGHT);
+ TQSize s(PE_WIDTH, PE_HEIGHT);
setFixedSize(s);
b_recreate = true;
@@ -39,16 +39,16 @@ void PortfolioEstate::estateChanged()
update();
}
-QPixmap PortfolioEstate::drawPixmap(Estate *estate, Player *player, bool alwaysOwned)
+TQPixmap PortfolioEstate::drawPixmap(Estate *estate, Player *player, bool alwaysOwned)
{
- QColor lightGray(204, 204, 204), darkGray(153, 153, 153);
- QPixmap qpixmap(PE_WIDTH, PE_HEIGHT);
- QPainter painter;
+ TQColor lightGray(204, 204, 204), darkGray(153, 153, 153);
+ TQPixmap qpixmap(PE_WIDTH, PE_HEIGHT);
+ TQPainter painter;
painter.begin(&qpixmap);
painter.setPen(lightGray);
painter.setBrush(white);
- painter.drawRect(QRect(0, 0, PE_WIDTH, PE_HEIGHT));
+ painter.drawRect(TQRect(0, 0, PE_WIDTH, PE_HEIGHT));
if (alwaysOwned || (estate && estate->isOwned() && player == estate->owner()))
{
painter.setPen(darkGray);
@@ -77,7 +77,7 @@ QPixmap PortfolioEstate::drawPixmap(Estate *estate, Player *player, bool alwaysO
return qpixmap;
}
-void PortfolioEstate::paintEvent(QPaintEvent *)
+void PortfolioEstate::paintEvent(TQPaintEvent *)
{
if (b_recreate)
{
@@ -87,7 +87,7 @@ void PortfolioEstate::paintEvent(QPaintEvent *)
bitBlt(this, 0, 0, &m_pixmap);
}
-void PortfolioEstate::mousePressEvent(QMouseEvent *e)
+void PortfolioEstate::mousePressEvent(TQMouseEvent *e)
{
if (e->button()==LeftButton)
emit estateClicked(m_estate);
diff --git a/atlantik/libatlantikui/portfolioestate.h b/atlantik/libatlantikui/portfolioestate.h
index 65bd5db3..fb1dc8d3 100644
--- a/atlantik/libatlantikui/portfolioestate.h
+++ b/atlantik/libatlantikui/portfolioestate.h
@@ -17,8 +17,8 @@
#ifndef ATLANTIK_PORTFOLIOESTATE_H
#define ATLANTIK_PORTFOLIOESTATE_H
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
#define PE_WIDTH 13
#define PE_HEIGHT 16
@@ -31,13 +31,13 @@ class PortfolioEstate : public QWidget
Q_OBJECT
public:
- PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, QWidget *parent, const char *name = 0);
+ PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *parent, const char *name = 0);
Estate *estate() { return m_estate; }
- static QPixmap drawPixmap(Estate *estate, Player *player = 0, bool alwaysOwned = true);
+ static TQPixmap drawPixmap(Estate *estate, Player *player = 0, bool alwaysOwned = true);
protected:
- void paintEvent(QPaintEvent *);
- void mousePressEvent(QMouseEvent *);
+ void paintEvent(TQPaintEvent *);
+ void mousePressEvent(TQMouseEvent *);
private slots:
void estateChanged();
@@ -48,7 +48,7 @@ signals:
private:
Estate *m_estate;
Player *m_player;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
bool b_recreate, m_alwaysOwned;
};
diff --git a/atlantik/libatlantikui/portfolioview.cpp b/atlantik/libatlantikui/portfolioview.cpp
index c07d426b..6725cbca 100644
--- a/atlantik/libatlantikui/portfolioview.cpp
+++ b/atlantik/libatlantikui/portfolioview.cpp
@@ -14,8 +14,8 @@
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <kdebug.h>
#include <kdialogbase.h>
@@ -40,7 +40,7 @@
#define PE_MARGINH 2
#define ICONSIZE 48
-PortfolioView::PortfolioView(AtlanticCore *core, Player *player, QColor activeColor, QColor inactiveColor, QWidget *parent, const char *name) : QWidget(parent, name)
+PortfolioView::PortfolioView(AtlanticCore *core, Player *player, TQColor activeColor, TQColor inactiveColor, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_atlanticCore = core;
m_player = player;
@@ -79,14 +79,14 @@ void PortfolioView::buildPortfolio()
clearPortfolio();
// Loop through estate groups in order
- QPtrList<EstateGroup> estateGroups = m_atlanticCore->estateGroups();
+ TQPtrList<EstateGroup> estateGroups = m_atlanticCore->estateGroups();
PortfolioEstate *lastPE = 0, *firstPEprevGroup = 0;
int x = 100, y = 25, marginHint = 5, bottom;
bottom = ICONSIZE - PE_HEIGHT - marginHint;
EstateGroup *estateGroup;
- for (QPtrListIterator<EstateGroup> it(estateGroups); *it; ++it)
+ for (TQPtrListIterator<EstateGroup> it(estateGroups); *it; ++it)
{
if ((estateGroup = *it))
{
@@ -94,9 +94,9 @@ void PortfolioView::buildPortfolio()
lastPE = 0;
// Loop through estates
- QPtrList<Estate> estates = m_atlanticCore->estates();
+ TQPtrList<Estate> estates = m_atlanticCore->estates();
Estate *estate;
- for (QPtrListIterator<Estate> it(estates); *it; ++it)
+ for (TQPtrListIterator<Estate> it(estates); *it; ++it)
{
if ((estate = *it) && estate->estateGroup() == estateGroup)
{
@@ -104,7 +104,7 @@ void PortfolioView::buildPortfolio()
PortfolioEstate *portfolioEstate = new PortfolioEstate(estate, m_player, false, this, "portfolioestate");
m_portfolioEstates.append(portfolioEstate);
- connect(portfolioEstate, SIGNAL(estateClicked(Estate *)), this, SIGNAL(estateClicked(Estate *)));
+ connect(portfolioEstate, TQT_SIGNAL(estateClicked(Estate *)), this, TQT_SIGNAL(estateClicked(Estate *)));
if (lastPE)
{
x = lastPE->x() + 2;
@@ -130,7 +130,7 @@ void PortfolioView::buildPortfolio()
portfolioEstate->setGeometry(x, y, portfolioEstate->width(), portfolioEstate->height());
portfolioEstate->show();
- connect(estate, SIGNAL(changed()), portfolioEstate, SLOT(estateChanged()));
+ connect(estate, TQT_SIGNAL(changed()), portfolioEstate, TQT_SLOT(estateChanged()));
lastPE = portfolioEstate;
}
@@ -159,9 +159,9 @@ void PortfolioView::loadIcon()
if (!m_imageName.isEmpty())
{
- QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
+ TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
if (KStandardDirs::exists(filename))
- m_image = new QPixmap(filename);
+ m_image = new TQPixmap(filename);
}
if (!m_image)
@@ -171,31 +171,31 @@ void PortfolioView::loadIcon()
/*
m_imageName = "hamburger.png";
- QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
+ TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
if (KStandardDirs::exists(filename))
- m_image = new QPixmap(filename);
+ m_image = new TQPixmap(filename);
*/
}
else if (ICONSIZE > minimumHeight())
setMinimumHeight(ICONSIZE);
- QWMatrix m;
+ TQWMatrix m;
m.scale(double(ICONSIZE) / m_image->width(), double(ICONSIZE) / m_image->height());
- QPixmap *scaledPixmap = new QPixmap(ICONSIZE, ICONSIZE);
+ TQPixmap *scaledPixmap = new TQPixmap(ICONSIZE, ICONSIZE);
*scaledPixmap = m_image->xForm(m);
delete m_image;
m_image = scaledPixmap;
}
-void PortfolioView::paintEvent(QPaintEvent *)
+void PortfolioView::paintEvent(TQPaintEvent *)
{
if (b_recreate)
{
delete qpixmap;
- qpixmap = new QPixmap(width(), height());
+ qpixmap = new TQPixmap(width(), height());
- QPainter painter;
+ TQPainter painter;
painter.begin(qpixmap, this);
painter.setPen(Qt::white);
@@ -216,17 +216,17 @@ void PortfolioView::paintEvent(QPaintEvent *)
}
painter.setPen(Qt::white);
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Bold));
+ painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Bold));
painter.drawText(ICONSIZE + KDialog::marginHint(), 15, m_player->name());
if ( m_portfolioEstates.count() )
- painter.drawText(width() - 50, 15, QString::number(m_player->money()));
+ painter.drawText(width() - 50, 15, TQString::number(m_player->money()));
else
{
painter.setPen(Qt::black);
painter.setBrush(Qt::white);
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Normal));
+ painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal));
painter.drawText(ICONSIZE + KDialog::marginHint(), 30, m_player->host());
}
@@ -235,7 +235,7 @@ void PortfolioView::paintEvent(QPaintEvent *)
bitBlt(this, 0, 0, qpixmap);
}
-void PortfolioView::resizeEvent(QResizeEvent *)
+void PortfolioView::resizeEvent(TQResizeEvent *)
{
b_recreate = true;
}
@@ -248,7 +248,7 @@ void PortfolioView::playerChanged()
update();
}
-void PortfolioView::mousePressEvent(QMouseEvent *e)
+void PortfolioView::mousePressEvent(TQMouseEvent *e)
{
Player *playerSelf = m_atlanticCore->playerSelf();
@@ -269,8 +269,8 @@ void PortfolioView::mousePressEvent(QMouseEvent *e)
rmbMenu->setItemEnabled( 0, m_atlanticCore->selfIsMaster() );
}
- connect(rmbMenu, SIGNAL(activated(int)), this, SLOT(slotMenuAction(int)));
- QPoint g = QCursor::pos();
+ connect(rmbMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuAction(int)));
+ TQPoint g = TQCursor::pos();
rmbMenu->exec(g);
}
}
diff --git a/atlantik/libatlantikui/portfolioview.h b/atlantik/libatlantikui/portfolioview.h
index 26317e2b..d1443a3e 100644
--- a/atlantik/libatlantikui/portfolioview.h
+++ b/atlantik/libatlantikui/portfolioview.h
@@ -17,9 +17,9 @@
#ifndef ATLANTIK_PORTFOLIOVIEW_H
#define ATLANTIK_PORTFOLIOVIEW_H
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
#include "portfolioestate.h"
#include "libatlantikui_export.h"
@@ -35,7 +35,7 @@ class LIBATLANTIKUI_EXPORT PortfolioView : public QWidget
Q_OBJECT
public:
- PortfolioView(AtlanticCore *core, Player *_player, QColor activeColor, QColor inactiveColor, QWidget *parent, const char *name = 0);
+ PortfolioView(AtlanticCore *core, Player *_player, TQColor activeColor, TQColor inactiveColor, TQWidget *parent, const char *name = 0);
~PortfolioView();
void buildPortfolio();
@@ -44,9 +44,9 @@ public:
Player *player();
protected:
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
- void mousePressEvent(QMouseEvent *);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void mousePressEvent(TQMouseEvent *);
signals:
void newTrade(Player *player);
@@ -63,11 +63,11 @@ private:
AtlanticCore *m_atlanticCore;
Player *m_player;
PortfolioEstate *m_lastPE;
- QColor m_activeColor, m_inactiveColor;
- QPixmap *qpixmap, *m_image;
- QString m_imageName;
+ TQColor m_activeColor, m_inactiveColor;
+ TQPixmap *qpixmap, *m_image;
+ TQString m_imageName;
bool b_recreate;
- QPtrList<PortfolioEstate> m_portfolioEstates;
+ TQPtrList<PortfolioEstate> m_portfolioEstates;
};
#endif
diff --git a/atlantik/libatlantikui/token.cpp b/atlantik/libatlantikui/token.cpp
index 6f13333f..c77aeadb 100644
--- a/atlantik/libatlantikui/token.cpp
+++ b/atlantik/libatlantikui/token.cpp
@@ -16,9 +16,9 @@
#include <iostream>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qfont.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqfont.h>
#include <kdebug.h>
@@ -33,14 +33,14 @@
#define TOKEN_ICONSIZE 32
-Token::Token(Player *player, AtlantikBoard *parent, const char *name) : QWidget(parent, name)
+Token::Token(Player *player, AtlantikBoard *parent, const char *name) : TQWidget(parent, name)
{
setBackgroundMode(NoBackground); // avoid flickering
m_parentBoard = parent;
m_player = player;
- connect(m_player, SIGNAL(changed(Player *)), this, SLOT(playerChanged()));
+ connect(m_player, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged()));
m_inJail = m_player->inJail();
m_location = m_player->location();
@@ -53,7 +53,7 @@ Token::Token(Player *player, AtlantikBoard *parent, const char *name) : QWidget(
m_image = 0;
loadIcon();
- setFixedSize(QSize(TOKEN_ICONSIZE, TOKEN_ICONSIZE + KGlobalSettings::generalFont().pointSize()));
+ setFixedSize(TQSize(TOKEN_ICONSIZE, TOKEN_ICONSIZE + KGlobalSettings::generalFont().pointSize()));
}
Token::~Token()
@@ -96,37 +96,37 @@ void Token::loadIcon()
if (!m_imageName.isEmpty())
{
- QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
+ TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
if (KStandardDirs::exists(filename))
- m_image = new QPixmap(filename);
+ m_image = new TQPixmap(filename);
}
if (!m_image)
{
m_imageName = "hamburger.png";
- QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
+ TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName);
if (KStandardDirs::exists(filename))
- m_image = new QPixmap(filename);
+ m_image = new TQPixmap(filename);
}
- QWMatrix m;
+ TQWMatrix m;
m.scale(double(TOKEN_ICONSIZE) / m_image->width(), double(TOKEN_ICONSIZE) / m_image->height());
- QPixmap *scaledPixmap = new QPixmap(TOKEN_ICONSIZE, TOKEN_ICONSIZE);
+ TQPixmap *scaledPixmap = new TQPixmap(TOKEN_ICONSIZE, TOKEN_ICONSIZE);
*scaledPixmap = m_image->xForm(m);
delete m_image;
m_image = scaledPixmap;
}
-void Token::paintEvent(QPaintEvent *)
+void Token::paintEvent(TQPaintEvent *)
{
if (b_recreate)
{
delete qpixmap;
- qpixmap = new QPixmap(width(), height());
+ qpixmap = new TQPixmap(width(), height());
- QPainter painter;
+ TQPainter painter;
painter.begin(qpixmap, this);
if (m_image)
@@ -143,15 +143,15 @@ void Token::paintEvent(QPaintEvent *)
painter.drawRect(0, TOKEN_ICONSIZE, width(), KGlobalSettings::generalFont().pointSize());
painter.setPen(Qt::white);
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::DemiBold));
- painter.drawText(1, height()-1, (m_player ? m_player->name() : QString::null));
+ painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::DemiBold));
+ painter.drawText(1, height()-1, (m_player ? m_player->name() : TQString::null));
b_recreate = false;
}
bitBlt(this, 0, 0, qpixmap);
}
-void Token::resizeEvent(QResizeEvent *)
+void Token::resizeEvent(TQResizeEvent *)
{
b_recreate = true;
}
diff --git a/atlantik/libatlantikui/token.h b/atlantik/libatlantikui/token.h
index f0e52f2b..81408501 100644
--- a/atlantik/libatlantikui/token.h
+++ b/atlantik/libatlantikui/token.h
@@ -17,7 +17,7 @@
#ifndef ATLANTIK_TOKEN_H
#define ATLANTIK_TOKEN_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QPixmap;
@@ -44,8 +44,8 @@ Q_OBJECT
void playerChanged();
protected:
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
private:
void loadIcon();
@@ -55,8 +55,8 @@ private:
bool m_inJail;
AtlantikBoard *m_parentBoard;
bool b_recreate;
- QPixmap *qpixmap, *m_image;
- QString m_imageName;
+ TQPixmap *qpixmap, *m_image;
+ TQString m_imageName;
};
#endif
diff --git a/atlantik/libatlantikui/trade_widget.cpp b/atlantik/libatlantikui/trade_widget.cpp
index b2658abb..be8b2749 100644
--- a/atlantik/libatlantikui/trade_widget.cpp
+++ b/atlantik/libatlantikui/trade_widget.cpp
@@ -16,15 +16,15 @@
#include <iostream>
-#include <qlayout.h>
-#include <qhgroupbox.h>
-#include <qheader.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
-#include <qvalidator.h>
-#include <qmap.h>
-#include <qlabel.h>
-#include <qspinbox.h>
+#include <tqlayout.h>
+#include <tqhgroupbox.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
+#include <tqvalidator.h>
+#include <tqmap.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
#include <klocale.h>
#include <klistview.h>
@@ -44,8 +44,8 @@
#include "trade_widget.moc"
-TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *parent, const char *name)
- : QWidget(parent, name,
+TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *parent, const char *name)
+ : TQWidget(parent, name,
WType_Dialog | WStyle_Customize | WStyle_DialogBorder | WStyle_Title |
WStyle_Minimize | WStyle_ContextHelp )
{
@@ -54,21 +54,21 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa
setCaption(i18n("Trade %1").arg(trade->tradeId()));
- QVBoxLayout *listCompBox = new QVBoxLayout(this, KDialog::marginHint());
+ TQVBoxLayout *listCompBox = new TQVBoxLayout(this, KDialog::marginHint());
- m_updateComponentBox = new QHGroupBox(i18n("Add Component"), this);
+ m_updateComponentBox = new TQHGroupBox(i18n("Add Component"), this);
listCompBox->addWidget(m_updateComponentBox);
m_editTypeCombo = new KComboBox(m_updateComponentBox);
m_editTypeCombo->insertItem(i18n("Estate"));
m_editTypeCombo->insertItem(i18n("Money"));
- connect(m_editTypeCombo, SIGNAL(activated(int)), this, SLOT(setTypeCombo(int)));
+ connect(m_editTypeCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setTypeCombo(int)));
m_estateCombo = new KComboBox(m_updateComponentBox);
- QPtrList<Estate> estateList = m_atlanticCore->estates();
+ TQPtrList<Estate> estateList = m_atlanticCore->estates();
Estate *estate;
- for (QPtrListIterator<Estate> it(estateList); *it; ++it)
+ for (TQPtrListIterator<Estate> it(estateList); *it; ++it)
{
if ((estate = *it) && estate->isOwned())
{
@@ -78,22 +78,22 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa
}
}
- connect(m_estateCombo, SIGNAL(activated(int)), this, SLOT(setEstateCombo(int)));
+ connect(m_estateCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setEstateCombo(int)));
- m_moneyBox = new QSpinBox(0, 10000, 1, m_updateComponentBox);
+ m_moneyBox = new TQSpinBox(0, 10000, 1, m_updateComponentBox);
- QPtrList<Player> playerList = m_atlanticCore->players();
+ TQPtrList<Player> playerList = m_atlanticCore->players();
Player *player, *pSelf = m_atlanticCore->playerSelf();
- m_fromLabel = new QLabel(m_updateComponentBox);
+ m_fromLabel = new TQLabel(m_updateComponentBox);
m_fromLabel->setText(i18n("From"));
m_playerFromCombo = new KComboBox(m_updateComponentBox);
- m_toLabel = new QLabel(m_updateComponentBox);
+ m_toLabel = new TQLabel(m_updateComponentBox);
m_toLabel->setText(i18n("To"));
m_playerTargetCombo = new KComboBox(m_updateComponentBox);
- for (QPtrListIterator<Player> it(playerList); *it; ++it)
+ for (TQPtrListIterator<Player> it(playerList); *it; ++it)
{
if ((player = *it) && player->game() == pSelf->game())
{
@@ -105,14 +105,14 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa
m_playerTargetMap[m_playerTargetCombo->count() - 1] = player;
m_playerTargetRevMap[player] = m_playerTargetCombo->count() - 1;
- connect(player, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *)));
+ connect(player, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged(Player *)));
}
}
m_updateButton = new KPushButton(i18n("Update"), m_updateComponentBox);
m_updateButton->setEnabled(false);
- connect(m_updateButton, SIGNAL(clicked()), this, SLOT(updateComponent()));
+ connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateComponent()));
m_componentList = new KListView(this, "componentList");
listCompBox->addWidget(m_componentList);
@@ -122,26 +122,26 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa
m_componentList->addColumn(i18n("Player"));
m_componentList->addColumn(i18n("Item"));
- connect(m_componentList, SIGNAL(contextMenu(KListView*, QListViewItem *, const QPoint&)), SLOT(contextMenu(KListView *, QListViewItem *, const QPoint&)));
- connect(m_componentList, SIGNAL(clicked(QListViewItem *)), this, SLOT(setCombos(QListViewItem *)));
+ connect(m_componentList, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem *, const TQPoint&)), TQT_SLOT(contextMenu(KListView *, TQListViewItem *, const TQPoint&)));
+ connect(m_componentList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(setCombos(TQListViewItem *)));
- QHBoxLayout *actionBox = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *actionBox = new TQHBoxLayout(this, 0, KDialog::spacingHint());
listCompBox->addItem(actionBox);
- actionBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ actionBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
m_rejectButton = new KPushButton(BarIcon("cancel", KIcon::SizeSmall), i18n("Reject"), this);
actionBox->addWidget(m_rejectButton);
- connect(m_rejectButton, SIGNAL(clicked()), this, SLOT(reject()));
+ connect(m_rejectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()));
m_acceptButton = new KPushButton(BarIcon("ok", KIcon::SizeSmall), i18n("Accept"), this);
// m_acceptButton->setEnabled(false);
actionBox->addWidget(m_acceptButton);
- connect(m_acceptButton, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(m_acceptButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()));
- m_status = new QLabel(this);
+ m_status = new TQLabel(this);
listCompBox->addWidget(m_status);
m_status->setText( i18n( "%1 out of %2 players accept current trade proposal." ).arg( m_trade->count( true ) ).arg( m_trade->count( false ) ) );
@@ -149,14 +149,14 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa
// mPlayerList->setRootIsDecorated(true);
// mPlayerList->setResizeMode(KListView::AllColumns);
- connect(m_trade, SIGNAL(itemAdded(TradeItem *)), this, SLOT(tradeItemAdded(TradeItem *)));
- connect(m_trade, SIGNAL(itemRemoved(TradeItem *)), this, SLOT(tradeItemRemoved(TradeItem *)));
- connect(m_trade, SIGNAL(changed(Trade *)), this, SLOT(tradeChanged()));
- connect(m_trade, SIGNAL(rejected(Player *)), this, SLOT(tradeRejected(Player *)));
- connect(this, SIGNAL(updateEstate(Trade *, Estate *, Player *)), m_trade, SIGNAL(updateEstate(Trade *, Estate *, Player *)));
- connect(this, SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *)), m_trade, SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *)));
- connect(this, SIGNAL(reject(Trade *)), m_trade, SIGNAL(reject(Trade *)));
- connect(this, SIGNAL(accept(Trade *)), m_trade, SIGNAL(accept(Trade *)));
+ connect(m_trade, TQT_SIGNAL(itemAdded(TradeItem *)), this, TQT_SLOT(tradeItemAdded(TradeItem *)));
+ connect(m_trade, TQT_SIGNAL(itemRemoved(TradeItem *)), this, TQT_SLOT(tradeItemRemoved(TradeItem *)));
+ connect(m_trade, TQT_SIGNAL(changed(Trade *)), this, TQT_SLOT(tradeChanged()));
+ connect(m_trade, TQT_SIGNAL(rejected(Player *)), this, TQT_SLOT(tradeRejected(Player *)));
+ connect(this, TQT_SIGNAL(updateEstate(Trade *, Estate *, Player *)), m_trade, TQT_SIGNAL(updateEstate(Trade *, Estate *, Player *)));
+ connect(this, TQT_SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *)), m_trade, TQT_SIGNAL(updateMoney(Trade *, unsigned int, Player *, Player *)));
+ connect(this, TQT_SIGNAL(reject(Trade *)), m_trade, TQT_SIGNAL(reject(Trade *)));
+ connect(this, TQT_SIGNAL(accept(Trade *)), m_trade, TQT_SIGNAL(accept(Trade *)));
setTypeCombo(m_editTypeCombo->currentItem());
setEstateCombo(m_estateCombo->currentItem());
@@ -164,7 +164,7 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *pa
m_contextTradeItem = 0;
}
-void TradeDisplay::closeEvent(QCloseEvent *e)
+void TradeDisplay::closeEvent(TQCloseEvent *e)
{
// Don't send network event when trade is already rejected
if (m_trade->isRejected())
@@ -177,11 +177,11 @@ void TradeDisplay::closeEvent(QCloseEvent *e)
void TradeDisplay::tradeItemAdded(TradeItem *tradeItem)
{
- KListViewItem *item = new KListViewItem(m_componentList, (tradeItem->from() ? tradeItem->from()->name() : QString("?")), i18n("gives is transitive ;)", "gives"), (tradeItem->to() ? tradeItem->to()->name() : QString("?")), tradeItem->text());
- connect(tradeItem, SIGNAL(changed(TradeItem *)), this, SLOT(tradeItemChanged(TradeItem *)));
+ KListViewItem *item = new KListViewItem(m_componentList, (tradeItem->from() ? tradeItem->from()->name() : TQString("?")), i18n("gives is transitive ;)", "gives"), (tradeItem->to() ? tradeItem->to()->name() : TQString("?")), tradeItem->text());
+ connect(tradeItem, TQT_SIGNAL(changed(TradeItem *)), this, TQT_SLOT(tradeItemChanged(TradeItem *)));
- item->setPixmap(0, QPixmap(SmallIcon("personal")));
- item->setPixmap(2, QPixmap(SmallIcon("personal")));
+ item->setPixmap(0, TQPixmap(SmallIcon("personal")));
+ item->setPixmap(2, TQPixmap(SmallIcon("personal")));
if (TradeEstate *tradeEstate = dynamic_cast<TradeEstate*>(tradeItem))
item->setPixmap(3, PortfolioEstate::drawPixmap(tradeEstate->estate()));
@@ -204,10 +204,10 @@ void TradeDisplay::tradeItemChanged(TradeItem *t)
KListViewItem *item = m_componentMap[t];
if (item)
{
- item->setText(0, t->from() ? t->from()->name() : QString("?"));
- item->setPixmap(0, QPixmap(SmallIcon("personal")));
- item->setText(2, t->to() ? t->to()->name() : QString("?"));
- item->setPixmap(2, QPixmap(SmallIcon("personal")));
+ item->setText(0, t->from() ? t->from()->name() : TQString("?"));
+ item->setPixmap(0, TQPixmap(SmallIcon("personal")));
+ item->setText(2, t->to() ? t->to()->name() : TQString("?"));
+ item->setPixmap(2, TQPixmap(SmallIcon("personal")));
item->setText(3, t->text());
}
}
@@ -225,7 +225,7 @@ void TradeDisplay::playerChanged(Player *player)
m_playerTargetCombo->changeItem(player->name(), m_playerTargetRevMap[player]);
TradeItem *item = 0;
- for (QMap<KListViewItem *, TradeItem *>::Iterator it=m_componentRevMap.begin() ; it != m_componentRevMap.end() && (item = *it) ; ++it)
+ for (TQMap<KListViewItem *, TradeItem *>::Iterator it=m_componentRevMap.begin() ; it != m_componentRevMap.end() && (item = *it) ; ++it)
tradeItemChanged(item);
}
@@ -291,7 +291,7 @@ void TradeDisplay::setEstateCombo(int index)
m_playerFromCombo->setCurrentItem( m_playerFromRevMap[estate->owner()] );
}
-void TradeDisplay::setCombos(QListViewItem *i)
+void TradeDisplay::setCombos(TQListViewItem *i)
{
TradeItem *item = m_componentRevMap[(KListViewItem *)(i)];
if (TradeEstate *tradeEstate = dynamic_cast<TradeEstate*>(item))
@@ -348,7 +348,7 @@ void TradeDisplay::accept()
emit accept(m_trade);
}
-void TradeDisplay::contextMenu(KListView *, QListViewItem *i, const QPoint& p)
+void TradeDisplay::contextMenu(KListView *, TQListViewItem *i, const TQPoint& p)
{
m_contextTradeItem = m_componentRevMap[(KListViewItem *)(i)];
@@ -356,7 +356,7 @@ void TradeDisplay::contextMenu(KListView *, QListViewItem *i, const QPoint& p)
// rmbMenu->insertTitle( ... );
rmbMenu->insertItem(i18n("Remove From Trade"), 0);
- connect(rmbMenu, SIGNAL(activated(int)), this, SLOT(contextMenuClicked(int)));
+ connect(rmbMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(contextMenuClicked(int)));
rmbMenu->exec(p);
}
diff --git a/atlantik/libatlantikui/trade_widget.h b/atlantik/libatlantikui/trade_widget.h
index 642cc919..5c0e0ff7 100644
--- a/atlantik/libatlantikui/trade_widget.h
+++ b/atlantik/libatlantikui/trade_widget.h
@@ -17,8 +17,8 @@
#ifndef TRADEWIDGET_H
#define TRADEWIDGET_H
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
#include "libatlantikui_export.h"
class QHGroupBox;
@@ -41,12 +41,12 @@ class LIBATLANTIKUI_EXPORT TradeDisplay : public QWidget
Q_OBJECT
public:
- TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, QWidget *parent=0, const char *name = 0);
+ TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *parent=0, const char *name = 0);
Trade *trade() { return mTrade; }
protected:
- void closeEvent(QCloseEvent *e);
+ void closeEvent(TQCloseEvent *e);
private slots:
void tradeItemAdded(TradeItem *);
@@ -58,13 +58,13 @@ private slots:
void setTypeCombo(int);
void setEstateCombo(int);
- void setCombos(QListViewItem *i);
+ void setCombos(TQListViewItem *i);
void updateComponent();
void reject();
void accept();
- void contextMenu(KListView *l, QListViewItem *i, const QPoint& p);
+ void contextMenu(KListView *l, TQListViewItem *i, const TQPoint& p);
void contextMenuClicked(int item);
signals:
@@ -74,9 +74,9 @@ signals:
void accept(Trade *trade);
private:
- QHGroupBox *m_updateComponentBox;
- QLabel *m_status, *m_fromLabel, *m_toLabel;
- QSpinBox *m_moneyBox;
+ TQHGroupBox *m_updateComponentBox;
+ TQLabel *m_status, *m_fromLabel, *m_toLabel;
+ TQSpinBox *m_moneyBox;
KComboBox *m_editTypeCombo, *m_playerFromCombo, *m_playerTargetCombo, *m_estateCombo;
KListView *m_componentList;
@@ -87,12 +87,12 @@ private:
TradeItem *m_contextTradeItem;
// TODO: Wouldn't QPair make more sense here?
- QMap<TradeItem *, KListViewItem *> m_componentMap;
- QMap<KListViewItem *, TradeItem *> m_componentRevMap;
- QMap<int, Estate *> m_estateMap;
- QMap<Estate *, int> m_estateRevMap;
- QMap<int, Player *> m_playerFromMap, m_playerTargetMap;
- QMap<Player *, int> m_playerFromRevMap, m_playerTargetRevMap;
+ TQMap<TradeItem *, KListViewItem *> m_componentMap;
+ TQMap<KListViewItem *, TradeItem *> m_componentRevMap;
+ TQMap<int, Estate *> m_estateMap;
+ TQMap<Estate *, int> m_estateRevMap;
+ TQMap<int, Player *> m_playerFromMap, m_playerTargetMap;
+ TQMap<Player *, int> m_playerFromRevMap, m_playerTargetRevMap;
};
#endif