summaryrefslogtreecommitdiffstats
path: root/atlantik/libatlantikui/token.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'atlantik/libatlantikui/token.cpp')
-rw-r--r--atlantik/libatlantikui/token.cpp36
1 files changed, 18 insertions, 18 deletions
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;
}