From 576eb4299a00bc053db35414406f46372a0f70f2 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:42:31 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- atlantik/libatlantikui/token.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'atlantik/libatlantikui/token.cpp') 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 -#include -#include -#include +#include +#include +#include #include @@ -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; } -- cgit v1.2.1