summaryrefslogtreecommitdiffstats
path: root/atlantik/libatlantikui/portfolioview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /atlantik/libatlantikui/portfolioview.cpp
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'atlantik/libatlantikui/portfolioview.cpp')
-rw-r--r--atlantik/libatlantikui/portfolioview.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/atlantik/libatlantikui/portfolioview.cpp b/atlantik/libatlantikui/portfolioview.cpp
index 6725cbca..83d2b0d2 100644
--- a/atlantik/libatlantikui/portfolioview.cpp
+++ b/atlantik/libatlantikui/portfolioview.cpp
@@ -40,7 +40,7 @@
#define PE_MARGINH 2
#define ICONSIZE 48
-PortfolioView::PortfolioView(AtlanticCore *core, Player *player, TQColor activeColor, TQColor inactiveColor, TQWidget *parent, const char *name) : TQWidget(parent, name)
+PortfolioView::PortfolioView(AtlanticCore *core, Player *player, TQColor activeColor, TQColor inactiveColor, TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
{
m_atlanticCore = core;
m_player = player;
@@ -52,7 +52,7 @@ PortfolioView::PortfolioView(AtlanticCore *core, Player *player, TQColor activeC
b_recreate = true;
m_portfolioEstates.setAutoDelete(true);
- setBackgroundColor(Qt::white);
+ setBackgroundColor(TQt::white);
setMinimumHeight(ICONSIZE);
// Init icon
@@ -196,26 +196,26 @@ void PortfolioView::paintEvent(TQPaintEvent *)
qpixmap = new TQPixmap(width(), height());
TQPainter painter;
- painter.begin(qpixmap, this);
+ painter.tqbegin(TQT_TQPAINTDEVICE(qpixmap), this);
- painter.setPen(Qt::white);
- painter.setBrush(Qt::white);
+ painter.setPen(TQt::white);
+ painter.setBrush(TQt::white);
painter.drawRect(rect());
- painter.setPen(m_player->hasTurn() ? m_activeColor : Qt::black);
- painter.setBrush(m_player->hasTurn() ? m_activeColor : Qt::black);
+ painter.setPen(m_player->hasTurn() ? m_activeColor : TQt::black);
+ painter.setBrush(m_player->hasTurn() ? m_activeColor : TQt::black);
painter.drawRect(0, 0, width(), 20);
if (m_image)
{
- painter.setPen(Qt::black);
- painter.setBrush(Qt::white);
+ painter.setPen(TQt::black);
+ painter.setBrush(TQt::white);
painter.drawRect(0, 0, ICONSIZE, ICONSIZE);
painter.drawPixmap(0, 0, *m_image);
}
- painter.setPen(Qt::white);
+ painter.setPen(TQt::white);
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Bold));
painter.drawText(ICONSIZE + KDialog::marginHint(), 15, m_player->name());
@@ -223,8 +223,8 @@ void PortfolioView::paintEvent(TQPaintEvent *)
painter.drawText(width() - 50, 15, TQString::number(m_player->money()));
else
{
- painter.setPen(Qt::black);
- painter.setBrush(Qt::white);
+ painter.setPen(TQt::black);
+ painter.setBrush(TQt::white);
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal));
painter.drawText(ICONSIZE + KDialog::marginHint(), 30, m_player->host());
@@ -252,7 +252,7 @@ void PortfolioView::mousePressEvent(TQMouseEvent *e)
{
Player *playerSelf = m_atlanticCore->playerSelf();
- if ( e->button()==RightButton && (m_player != playerSelf) )
+ if ( e->button()==Qt::RightButton && (m_player != playerSelf) )
{
KPopupMenu *rmbMenu = new KPopupMenu(this);
rmbMenu->insertTitle(m_player->name());
@@ -260,12 +260,12 @@ void PortfolioView::mousePressEvent(TQMouseEvent *e)
if ( m_portfolioEstates.count() )
{
// Start trade
- rmbMenu->insertItem(i18n("Request Trade with %1").arg(m_player->name()), 0);
+ rmbMenu->insertItem(i18n("Request Trade with %1").tqarg(m_player->name()), 0);
}
else
{
// Kick player
- rmbMenu->insertItem(i18n("Boot Player %1 to Lounge").arg(m_player->name()), 0);
+ rmbMenu->insertItem(i18n("Boot Player %1 to Lounge").tqarg(m_player->name()), 0);
rmbMenu->setItemEnabled( 0, m_atlanticCore->selfIsMaster() );
}