summaryrefslogtreecommitdiffstats
path: root/atlantik/libatlantikui
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
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')
-rw-r--r--atlantik/libatlantikui/auction_widget.cpp8
-rw-r--r--atlantik/libatlantikui/auction_widget.h5
-rw-r--r--atlantik/libatlantikui/board.cpp18
-rw-r--r--atlantik/libatlantikui/board.h5
-rw-r--r--atlantik/libatlantikui/estatedetails.cpp32
-rw-r--r--atlantik/libatlantikui/estatedetails.h7
-rw-r--r--atlantik/libatlantikui/estateview.cpp28
-rw-r--r--atlantik/libatlantikui/estateview.h5
-rw-r--r--atlantik/libatlantikui/kwrappedlistviewitem.cpp20
-rw-r--r--atlantik/libatlantikui/kwrappedlistviewitem.h7
-rw-r--r--atlantik/libatlantikui/portfolioestate.cpp6
-rw-r--r--atlantik/libatlantikui/portfolioestate.h5
-rw-r--r--atlantik/libatlantikui/portfolioview.cpp30
-rw-r--r--atlantik/libatlantikui/portfolioview.h5
-rw-r--r--atlantik/libatlantikui/token.cpp18
-rw-r--r--atlantik/libatlantikui/token.h5
-rw-r--r--atlantik/libatlantikui/trade_widget.cpp12
-rw-r--r--atlantik/libatlantikui/trade_widget.h7
18 files changed, 116 insertions, 107 deletions
diff --git a/atlantik/libatlantikui/auction_widget.cpp b/atlantik/libatlantikui/auction_widget.cpp
index 219c8b2b..2bb582fe 100644
--- a/atlantik/libatlantikui/auction_widget.cpp
+++ b/atlantik/libatlantikui/auction_widget.cpp
@@ -33,7 +33,7 @@
#include "auction_widget.moc"
-AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *parent, const char *name) : TQWidget(parent, name)
+AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
{
m_atlanticCore = atlanticCore;
@@ -47,7 +47,7 @@ AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWid
// Player list
Estate *estate = auction->estate();
- m_playerGroupBox = new TQVGroupBox(estate ? i18n("Auction: %1").arg(estate->name()) : i18n("Auction"), this, "groupBox");
+ m_playerGroupBox = new TQVGroupBox(estate ? i18n("Auction: %1").tqarg(estate->name()) : i18n("Auction"), this, "groupBox");
m_mainLayout->addWidget(m_playerGroupBox);
m_playerList = new KListView(m_playerGroupBox);
@@ -80,7 +80,7 @@ AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWid
KPushButton *bidButton = new KPushButton(i18n("Make Bid"), bidBox, "bidButton");
connect(bidButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBidButtonClicked()));
- // Status label
+ // tqStatus label
m_statusLabel = new TQLabel(this, "statusLabel");
m_mainLayout->addWidget(m_statusLabel);
}
@@ -103,7 +103,7 @@ void AuctionWidget::auctionChanged()
break;
default:
- status = TQString::null;
+ status = TQString();
}
m_statusLabel->setText(status);
}
diff --git a/atlantik/libatlantikui/auction_widget.h b/atlantik/libatlantikui/auction_widget.h
index 92e20c5c..5a21c95b 100644
--- a/atlantik/libatlantikui/auction_widget.h
+++ b/atlantik/libatlantikui/auction_widget.h
@@ -33,12 +33,13 @@ class AtlanticCore;
class Player;
class Auction;
-class AuctionWidget : public QWidget
+class AuctionWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *parent, const char *name=0);
+ AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *tqparent, const char *name=0);
private slots:
void auctionChanged();
diff --git a/atlantik/libatlantikui/board.cpp b/atlantik/libatlantikui/board.cpp
index 1b9ae0b5..6b48b40d 100644
--- a/atlantik/libatlantikui/board.cpp
+++ b/atlantik/libatlantikui/board.cpp
@@ -35,7 +35,7 @@
#include "board.h"
#include "board.moc"
-AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *parent, const char *name) : TQWidget(parent, name)
+AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
{
m_atlanticCore = atlanticCore;
m_maxEstates = maxEstates;
@@ -351,13 +351,13 @@ TQPoint AtlantikBoard::calculateTokenDestination(Token *token, Estate *eDest)
int x = 0, y = 0;
if (token->player()->inJail())
{
- x = evDest->geometry().right() - token->width() - 2;
- y = evDest->geometry().top();
+ x = evDest->tqgeometry().right() - token->width() - 2;
+ y = evDest->tqgeometry().top();
}
else
{
- x = evDest->geometry().center().x() - (token->width()/2);
- y = evDest->geometry().center().y() - (token->height()/2);
+ x = evDest->tqgeometry().center().x() - (token->width()/2);
+ y = evDest->tqgeometry().center().y() - (token->height()/2);
/*
// Re-center because of EstateView headers
@@ -394,8 +394,8 @@ void AtlantikBoard::slotMoveToken()
}
// Where are we?
- int xCurrent = m_movingToken->geometry().x();
- int yCurrent = m_movingToken->geometry().y();
+ int xCurrent = m_movingToken->tqgeometry().x();
+ int yCurrent = m_movingToken->tqgeometry().y();
// Where do we want to go today?
Estate *eDest = m_atlanticCore->estateAfter(m_movingToken->location());
@@ -560,7 +560,7 @@ void AtlantikBoard::prependEstateDetails(Estate *estate)
if (m_displayQueue.getFirst() == m_lastServerDisplay)
{
- eDetails = new EstateDetails(estate, TQString::null, this);
+ eDetails = new EstateDetails(estate, TQString(), this);
m_displayQueue.prepend(eDetails);
connect(eDetails, TQT_SIGNAL(buttonCommand(TQString)), this, TQT_SIGNAL(buttonCommand(TQString)));
@@ -572,7 +572,7 @@ void AtlantikBoard::prependEstateDetails(Estate *estate)
if (eDetails)
{
eDetails->setEstate(estate);
- eDetails->setText( TQString::null );
+ eDetails->setText( TQString() );
// eDetails->clearButtons();
}
else
diff --git a/atlantik/libatlantikui/board.h b/atlantik/libatlantikui/board.h
index 11194336..6240568d 100644
--- a/atlantik/libatlantikui/board.h
+++ b/atlantik/libatlantikui/board.h
@@ -32,14 +32,15 @@ class Token;
class EstateView;
-class LIBATLANTIKUI_EXPORT AtlantikBoard : public QWidget
+class LIBATLANTIKUI_EXPORT AtlantikBoard : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum DisplayMode { Play, Edit };
- AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *parent, const char *name=0);
+ AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *tqparent, const char *name=0);
~AtlantikBoard();
void reset();
diff --git a/atlantik/libatlantikui/estatedetails.cpp b/atlantik/libatlantikui/estatedetails.cpp
index 3a71f25a..d2690a91 100644
--- a/atlantik/libatlantikui/estatedetails.cpp
+++ b/atlantik/libatlantikui/estatedetails.cpp
@@ -39,7 +39,7 @@
#include "estatedetails.h"
#include "kwrappedlistviewitem.h"
-EstateDetails::EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name) : TQWidget(parent, name)
+EstateDetails::EstateDetails(Estate *estate, TQString text, TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
{
m_pixmap = 0;
m_quartzBlocks = 0;
@@ -114,11 +114,11 @@ void EstateDetails::paintEvent(TQPaintEvent *)
TQColor greenHouse(0, 255, 0);
TQColor redHotel(255, 51, 51);
TQPainter painter;
- painter.begin(m_pixmap, this);
+ painter.tqbegin(TQT_TQPAINTDEVICE(m_pixmap), this);
- painter.setPen(Qt::black);
+ painter.setPen(TQt::black);
- painter.setBrush(m_estate ? m_estate->bgColor() : Qt::white);
+ painter.setBrush(m_estate ? m_estate->bgColor() : TQt::white);
painter.drawRect(rect());
/*
@@ -136,7 +136,7 @@ void EstateDetails::paintEvent(TQPaintEvent *)
quartzBuffer->resize(25, (height()/4)-2);
TQPainter quartzPainter;
- quartzPainter.begin(quartzBuffer, this);
+ quartzPainter.tqbegin(TQT_TQPAINTDEVICE(quartzBuffer), this);
painter.setBrush(titleColor);
painter.drawRect(0, 0, width(), titleHeight);
@@ -173,15 +173,15 @@ void EstateDetails::paintEvent(TQPaintEvent *)
// TODO: steal blur code from kicker/taskbar/taskcontainer.cpp
// Estate name
- painter.setPen(Qt::white);
+ painter.setPen(TQt::white);
int fontSize = KGlobalSettings::generalFont().pointSize();
if (fontSize == -1)
fontSize = KGlobalSettings::generalFont().pixelSize();
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.drawText(KDialog::marginHint(), KDialog::marginHint(), width()-KDialog::marginHint(), titleHeight, TQt::AlignJustify, m_estate->name());
- painter.setPen(Qt::black);
+ painter.setPen(TQt::black);
int xText = 0;
@@ -190,7 +190,7 @@ void EstateDetails::paintEvent(TQPaintEvent *)
{
xText = titleHeight - fontSize - KDialog::marginHint();
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize, TQFont::Bold));
- painter.drawText(5, xText, width()-10, titleHeight, Qt::AlignRight, m_estate->estateGroup()->name().upper());
+ painter.drawText(5, xText, width()-10, titleHeight, TQt::AlignRight, m_estate->estateGroup()->name().upper());
}
xText = titleHeight + fontSize + 5;
@@ -217,22 +217,22 @@ void EstateDetails::addDetails()
// Price
if (m_estate->price())
{
- infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").arg(m_estate->price()));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").tqarg(m_estate->price()));
infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
}
// Owner, houses, isMortgaged
if (m_estate && m_estate->canBeOwned())
{
- infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").arg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").tqarg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned")));
infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
if (m_estate->isOwned())
{
- infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").arg(m_estate->houses()));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").tqarg(m_estate->houses()));
infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
- infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").arg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").tqarg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No")));
infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
}
}
@@ -250,7 +250,7 @@ void EstateDetails::addButton(TQString command, TQString caption, bool enabled)
{
TQColor bgColor, fgColor;
bgColor = m_estate->bgColor().light(110);
- fgColor = ( bgColor.red() + bgColor.green() + bgColor.blue() < 255 ) ? Qt::white : Qt::black;
+ fgColor = ( bgColor.red() + bgColor.green() + bgColor.blue() < 255 ) ? TQt::white : TQt::black;
button->setPaletteForegroundColor( fgColor );
button->setPaletteBackgroundColor( bgColor );
@@ -298,7 +298,7 @@ void EstateDetails::appendText(TQString text)
KWrappedListViewItem *infoText = new KWrappedListViewItem(m_infoListView, m_infoListView->lastItem(), text);
- if ( text.find( TQRegExp("rolls") ) != -1 )
+ if ( text.tqfind( TQRegExp("rolls") ) != -1 )
infoText->setPixmap(0, TQPixmap(SmallIcon("roll")));
else
infoText->setPixmap(0, TQPixmap(SmallIcon("atlantik")));
@@ -321,7 +321,7 @@ void EstateDetails::clearButtons()
void EstateDetails::buttonPressed()
{
- emit buttonCommand(TQString(m_buttonCommandMap[(TQObject *)TQObject::sender()]));
+ emit buttonCommand(TQString(m_buttonCommandMap[(TQObject *)TQT_BASE_OBJECT_NAME::sender()]));
}
#include "estatedetails.moc"
diff --git a/atlantik/libatlantikui/estatedetails.h b/atlantik/libatlantikui/estatedetails.h
index 6659055a..315bfa5f 100644
--- a/atlantik/libatlantikui/estatedetails.h
+++ b/atlantik/libatlantikui/estatedetails.h
@@ -32,12 +32,13 @@ class KPushButton;
class Player;
class Estate;
-class EstateDetails : public QWidget
+class EstateDetails : public TQWidget
{
-Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
public:
- EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name = 0);
+ EstateDetails(Estate *estate, TQString text, TQWidget *tqparent, const char *name = 0);
~EstateDetails();
Estate *estate() { return m_estate; }
diff --git a/atlantik/libatlantikui/estateview.cpp b/atlantik/libatlantikui/estateview.cpp
index 4755ccd3..19eec4d5 100644
--- a/atlantik/libatlantikui/estateview.cpp
+++ b/atlantik/libatlantikui/estateview.cpp
@@ -36,7 +36,7 @@
#include "estateview.moc"
#include "config.h"
-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)
+EstateView::EstateView(Estate *estate, EstateOrientation orientation, const TQString &_icon, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, TQWidget *tqparent, const char *name) : TQWidget(tqparent, name, WResizeNoErase)
{
m_estate = estate;
m_orientation = orientation;
@@ -72,20 +72,20 @@ void EstateView::updateToolTip()
TQString toolTip = m_estate->name();
if ( m_estate->isOwned() )
{
- toolTip.append( "\n" + i18n("Owner: %1").arg( m_estate->owner()->name() ) );
+ toolTip.append( "\n" + i18n("Owner: %1").tqarg( m_estate->owner()->name() ) );
if ( m_estate->isMortgaged() )
- toolTip.append( "\n" + i18n("Unmortgage Price: %1").arg( m_estate->unmortgagePrice() ) );
+ toolTip.append( "\n" + i18n("Unmortgage Price: %1").tqarg( m_estate->unmortgagePrice() ) );
else
- toolTip.append( "\n" + i18n("Mortgage Value: %1").arg( m_estate->mortgagePrice() ) );
+ toolTip.append( "\n" + i18n("Mortgage Value: %1").tqarg( m_estate->mortgagePrice() ) );
if ( m_estate->canSellHouses() )
- toolTip.append( "\n" + i18n("House Value: %1").arg( m_estate->houseSellPrice() ) );
+ toolTip.append( "\n" + i18n("House Value: %1").tqarg( m_estate->houseSellPrice() ) );
if ( m_estate->canBuyHouses() )
- toolTip.append( "\n" + i18n("House Price: %1").arg( m_estate->housePrice() ) );
+ toolTip.append( "\n" + i18n("House Price: %1").tqarg( m_estate->housePrice() ) );
}
else if ( m_estate->canBeOwned() )
- toolTip.append( "\n" + i18n("Price: %1").arg( m_estate->price() ) );
+ toolTip.append( "\n" + i18n("Price: %1").tqarg( m_estate->price() ) );
else if ( m_estate->money() )
- toolTip.append( "\n" + i18n("Money: %1").arg( m_estate->money() ) );
+ toolTip.append( "\n" + i18n("Money: %1").tqarg( m_estate->money() ) );
TQToolTip::add( this, toolTip );
}
@@ -255,9 +255,9 @@ void EstateView::paintEvent(TQPaintEvent *)
TQColor greenHouse(0, 255, 0);
TQColor redHotel(255, 51, 51);
TQPainter painter;
- painter.begin(qpixmap, this);
+ painter.tqbegin(TQT_TQPAINTDEVICE(qpixmap), this);
- painter.setPen(Qt::black);
+ painter.setPen(TQt::black);
if (m_darkenMortgaged==true && m_estate->isMortgaged())
painter.setBrush(m_estate->bgColor().light(10));
@@ -281,7 +281,7 @@ void EstateView::paintEvent(TQPaintEvent *)
quartzBuffer->resize(m_titleWidth-2, 25);
TQPainter quartzPainter;
- quartzPainter.begin(quartzBuffer, this);
+ quartzPainter.tqbegin(TQT_TQPAINTDEVICE(quartzBuffer), this);
painter.setBrush(m_estate->color());
switch(m_orientation)
@@ -432,7 +432,7 @@ void EstateView::resizeEvent(TQResizeEvent *)
void EstateView::mousePressEvent(TQMouseEvent *e)
{
- if (e->button()==RightButton && m_estate->isOwned())
+ if (e->button()==Qt::RightButton && m_estate->isOwned())
{
KPopupMenu *rmbMenu = new KPopupMenu(this);
rmbMenu->insertTitle(m_estate->name());
@@ -477,7 +477,7 @@ void EstateView::mousePressEvent(TQMouseEvent *e)
{
// Request trade
if (Player *player = m_estate->owner())
- rmbMenu->insertItem(i18n("Request Trade with %1").arg(player->name()), 3);
+ rmbMenu->insertItem(i18n("Request Trade with %1").tqarg(player->name()), 3);
}
KPopupMenu *pm = dynamic_cast<KPopupMenu *>(rmbMenu);
@@ -488,7 +488,7 @@ void EstateView::mousePressEvent(TQMouseEvent *e)
rmbMenu->exec(g);
delete rmbMenu;
}
- else if (e->button()==LeftButton)
+ else if (e->button()==Qt::LeftButton)
emit LMBClicked(m_estate);
}
diff --git a/atlantik/libatlantikui/estateview.h b/atlantik/libatlantikui/estateview.h
index 7e1d8cdc..a24d6888 100644
--- a/atlantik/libatlantikui/estateview.h
+++ b/atlantik/libatlantikui/estateview.h
@@ -29,12 +29,13 @@ enum EstateOrientation { North=0, East=1, South=2, West=3 };
class Player;
class Estate;
-class EstateView : public QWidget
+class EstateView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- EstateView(Estate *estate, EstateOrientation orientation, const TQString &, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, TQWidget *parent, const char *name = 0);
+ EstateView(Estate *estate, EstateOrientation orientation, const TQString &, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, TQWidget *tqparent, const char *name = 0);
void setViewProperties(bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects);
Estate *estate() { return m_estate; }
void updatePE();
diff --git a/atlantik/libatlantikui/kwrappedlistviewitem.cpp b/atlantik/libatlantikui/kwrappedlistviewitem.cpp
index 38c0d636..81f06dd7 100644
--- a/atlantik/libatlantikui/kwrappedlistviewitem.cpp
+++ b/atlantik/libatlantikui/kwrappedlistviewitem.cpp
@@ -31,16 +31,16 @@
#include "kwrappedlistviewitem.h"
-KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQString text, TQString t2 )
-: TQObject(), KListViewItem( parent )
+KWrappedListViewItem::KWrappedListViewItem( TQListView *tqparent, TQString text, TQString t2 )
+: TQObject(), KListViewItem( tqparent )
{
- init( parent, text, t2 );
+ init( tqparent, text, t2 );
}
-KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQListViewItem *after, TQString text, TQString t2 )
-: TQObject(), KListViewItem( parent, after )
+KWrappedListViewItem::KWrappedListViewItem( TQListView *tqparent, TQListViewItem *after, TQString text, TQString t2 )
+: TQObject(), KListViewItem( tqparent, after )
{
- init( parent, text, t2 );
+ init( tqparent, text, t2 );
}
void KWrappedListViewItem::setup()
@@ -83,7 +83,7 @@ void KWrappedListViewItem::wrapColumn( int c )
KWordWrap *wrap = KWordWrap::formatText( fm, rect, 0, m_origText );
setText( c, wrap->wrappedString() );
- int lc = text(c).contains( TQChar( '\n' ) ) + 1;
+ int lc = text(c).tqcontains( 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( TQListView *parent, TQString text, TQString t2 )
+void KWrappedListViewItem::init( TQListView *tqparent, TQString text, TQString t2 )
{
m_wrapColumn = 0;
setMultiLinesEnabled( true );
- parent->setResizeMode( TQListView::LastColumn );
+ tqparent->setResizeMode( TQListView::LastColumn );
m_origText = text;
@@ -110,7 +110,7 @@ void KWrappedListViewItem::init( TQListView *parent, TQString text, TQString t2
wrapColumn( m_wrapColumn );
- connect( parent->header(), TQT_SIGNAL(sizeChange(int, int, int)), this, TQT_SLOT(wrapColumn(int)));
+ connect( tqparent->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 ceda1afe..0107fef3 100644
--- a/atlantik/libatlantikui/kwrappedlistviewitem.h
+++ b/atlantik/libatlantikui/kwrappedlistviewitem.h
@@ -35,10 +35,11 @@ class KWordWrap;
class KWrappedListViewItem : public TQObject, public KListViewItem
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWrappedListViewItem( TQListView *parent, TQString text, QString=TQString::null );
- KWrappedListViewItem( TQListView *parent, TQListViewItem *after, TQString text, QString=TQString::null );
+ KWrappedListViewItem( TQListView *tqparent, TQString text, TQString=TQString() );
+ KWrappedListViewItem( TQListView *tqparent, TQListViewItem *after, TQString text, TQString=TQString() );
void setup();
// int width(const TQFontMetrics& fm, const TQListView* lv, int c) const;
@@ -46,7 +47,7 @@ private slots:
void wrapColumn( int c );
private:
- void init( TQListView *parent, TQString text, QString=TQString::null );
+ void init( TQListView *tqparent, TQString text, TQString=TQString() );
TQString m_origText;
int m_wrapColumn;
};
diff --git a/atlantik/libatlantikui/portfolioestate.cpp b/atlantik/libatlantikui/portfolioestate.cpp
index 3bfed677..9b55b565 100644
--- a/atlantik/libatlantikui/portfolioestate.cpp
+++ b/atlantik/libatlantikui/portfolioestate.cpp
@@ -21,7 +21,7 @@
#include "portfolioestate.moc"
#include "estate.h"
-PortfolioEstate::PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *parent, const char *name) : TQWidget(parent, name)
+PortfolioEstate::PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
{
m_estate = estate;
m_player = player;
@@ -55,7 +55,7 @@ TQPixmap PortfolioEstate::drawPixmap(Estate *estate, Player *player, bool always
for (int y=5;y<=13;y+=2)
painter.drawLine(2, y, 10, y);
- painter.setPen(Qt::white);
+ painter.setPen(TQt::white);
painter.drawPoint(8, 5);
painter.drawPoint(8, 7);
painter.drawPoint(8, 9);
@@ -89,6 +89,6 @@ void PortfolioEstate::paintEvent(TQPaintEvent *)
void PortfolioEstate::mousePressEvent(TQMouseEvent *e)
{
- if (e->button()==LeftButton)
+ if (e->button()==Qt::LeftButton)
emit estateClicked(m_estate);
}
diff --git a/atlantik/libatlantikui/portfolioestate.h b/atlantik/libatlantikui/portfolioestate.h
index fb1dc8d3..93ddde8d 100644
--- a/atlantik/libatlantikui/portfolioestate.h
+++ b/atlantik/libatlantikui/portfolioestate.h
@@ -26,12 +26,13 @@
class Estate;
class Player;
-class PortfolioEstate : public QWidget
+class PortfolioEstate : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *parent, const char *name = 0);
+ PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *tqparent, const char *name = 0);
Estate *estate() { return m_estate; }
static TQPixmap drawPixmap(Estate *estate, Player *player = 0, bool alwaysOwned = true);
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() );
}
diff --git a/atlantik/libatlantikui/portfolioview.h b/atlantik/libatlantikui/portfolioview.h
index 524f568f..d07aacda 100644
--- a/atlantik/libatlantikui/portfolioview.h
+++ b/atlantik/libatlantikui/portfolioview.h
@@ -30,12 +30,13 @@ class AtlanticCore;
class Player;
class Estate;
-class LIBATLANTIKUI_EXPORT PortfolioView : public QWidget
+class LIBATLANTIKUI_EXPORT PortfolioView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PortfolioView(AtlanticCore *core, Player *_player, TQColor activeColor, TQColor inactiveColor, TQWidget *parent, const char *name = 0);
+ PortfolioView(AtlanticCore *core, Player *_player, TQColor activeColor, TQColor inactiveColor, TQWidget *tqparent, const char *name = 0);
~PortfolioView();
void buildPortfolio();
diff --git a/atlantik/libatlantikui/token.cpp b/atlantik/libatlantikui/token.cpp
index c77aeadb..0a4f5193 100644
--- a/atlantik/libatlantikui/token.cpp
+++ b/atlantik/libatlantikui/token.cpp
@@ -33,11 +33,11 @@
#define TOKEN_ICONSIZE 32
-Token::Token(Player *player, AtlantikBoard *parent, const char *name) : TQWidget(parent, name)
+Token::Token(Player *player, AtlantikBoard *tqparent, const char *name) : TQWidget(tqparent, name)
{
setBackgroundMode(NoBackground); // avoid flickering
- m_parentBoard = parent;
+ m_parentBoard = tqparent;
m_player = player;
connect(m_player, TQT_SIGNAL(changed(Player *)), this, TQT_SLOT(playerChanged()));
@@ -127,24 +127,24 @@ void Token::paintEvent(TQPaintEvent *)
qpixmap = new TQPixmap(width(), height());
TQPainter painter;
- painter.begin(qpixmap, this);
+ painter.tqbegin(TQT_TQPAINTDEVICE(qpixmap), this);
if (m_image)
{
- painter.setPen(Qt::black);
- painter.setBrush(Qt::white);
+ painter.setPen(TQt::black);
+ painter.setBrush(TQt::white);
painter.drawRect(0, 0, TOKEN_ICONSIZE, TOKEN_ICONSIZE);
painter.drawPixmap(0, 0, *m_image);
}
- painter.setPen(Qt::black);
- painter.setBrush(Qt::black);
+ painter.setPen(TQt::black);
+ painter.setBrush(TQt::black);
painter.drawRect(0, TOKEN_ICONSIZE, width(), KGlobalSettings::generalFont().pointSize());
- painter.setPen(Qt::white);
+ painter.setPen(TQt::white);
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::DemiBold));
- painter.drawText(1, height()-1, (m_player ? m_player->name() : TQString::null));
+ painter.drawText(1, height()-1, (m_player ? m_player->name() : TQString()));
b_recreate = false;
}
diff --git a/atlantik/libatlantikui/token.h b/atlantik/libatlantikui/token.h
index 30d43c61..ea45888d 100644
--- a/atlantik/libatlantikui/token.h
+++ b/atlantik/libatlantikui/token.h
@@ -25,12 +25,13 @@ class Player;
class Estate;
class AtlantikBoard;
-class Token : public QWidget
+class Token : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Token (Player *player, AtlantikBoard *parent, const char *name = 0);
+ Token (Player *player, AtlantikBoard *tqparent, const char *name = 0);
~Token();
Player *player();
void setLocation(Estate *estate);
diff --git a/atlantik/libatlantikui/trade_widget.cpp b/atlantik/libatlantikui/trade_widget.cpp
index be8b2749..bf4eeac6 100644
--- a/atlantik/libatlantikui/trade_widget.cpp
+++ b/atlantik/libatlantikui/trade_widget.cpp
@@ -44,15 +44,15 @@
#include "trade_widget.moc"
-TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *parent, const char *name)
- : TQWidget(parent, name,
+TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name,
WType_Dialog | WStyle_Customize | WStyle_DialogBorder | WStyle_Title |
WStyle_Minimize | WStyle_ContextHelp )
{
m_trade = trade;
m_atlanticCore = atlanticCore;
- setCaption(i18n("Trade %1").arg(trade->tradeId()));
+ setCaption(i18n("Trade %1").tqarg(trade->tradeId()));
TQVBoxLayout *listCompBox = new TQVBoxLayout(this, KDialog::marginHint());
@@ -143,7 +143,7 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *p
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 ) ) );
+ m_status->setText( i18n( "%1 out of %2 players accept current trade proposal." ).tqarg( m_trade->count( true ) ).tqarg( m_trade->count( false ) ) );
// mPlayerList->header()->hide();
// mPlayerList->setRootIsDecorated(true);
@@ -216,7 +216,7 @@ void TradeDisplay::tradeChanged()
{
// TODO: add notification whether playerSelf has accepted or not and
// enable/disable accept button based on that
- m_status->setText( i18n( "%1 out of %2 players accept current trade proposal." ).arg( m_trade->count( true ) ).arg( m_trade->count( false ) ) );
+ m_status->setText( i18n( "%1 out of %2 players accept current trade proposal." ).tqarg( m_trade->count( true ) ).tqarg( m_trade->count( false ) ) );
}
void TradeDisplay::playerChanged(Player *player)
@@ -232,7 +232,7 @@ void TradeDisplay::playerChanged(Player *player)
void TradeDisplay::tradeRejected(Player *player)
{
if (player)
- m_status->setText(i18n("Trade proposal was rejected by %1.").arg(player->name()));
+ m_status->setText(i18n("Trade proposal was rejected by %1.").tqarg(player->name()));
else
m_status->setText(i18n("Trade proposal was rejected."));
diff --git a/atlantik/libatlantikui/trade_widget.h b/atlantik/libatlantikui/trade_widget.h
index 73842a91..ebaba426 100644
--- a/atlantik/libatlantikui/trade_widget.h
+++ b/atlantik/libatlantikui/trade_widget.h
@@ -36,12 +36,13 @@ class Player;
class Trade;
class TradeItem;
-class LIBATLANTIKUI_EXPORT TradeDisplay : public QWidget
+class LIBATLANTIKUI_EXPORT TradeDisplay : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *parent=0, const char *name = 0);
+ TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *tqparent=0, const char *name = 0);
Trade *trade() { return mTrade; }
@@ -86,7 +87,7 @@ private:
Trade *mTrade, *m_trade;
TradeItem *m_contextTradeItem;
- // TODO: Wouldn't QPair make more sense here?
+ // TODO: Wouldn't TQPair make more sense here?
TQMap<TradeItem *, KListViewItem *> m_componentMap;
TQMap<KListViewItem *, TradeItem *> m_componentRevMap;
TQMap<int, Estate *> m_estateMap;