summaryrefslogtreecommitdiffstats
path: root/kpat/cardmaps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpat/cardmaps.cpp')
-rw-r--r--kpat/cardmaps.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kpat/cardmaps.cpp b/kpat/cardmaps.cpp
index 5a2decae..563f4bfe 100644
--- a/kpat/cardmaps.cpp
+++ b/kpat/cardmaps.cpp
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <unistd.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kconfig.h>
@@ -35,7 +35,7 @@
#include <klocale.h>
#include "version.h"
#include <kstaticdeleter.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kimageeffect.h>
#include <kcarddialog.h>
#include <kglobalsettings.h>
@@ -44,7 +44,7 @@
cardMap *cardMap::_self = 0;
static KStaticDeleter<cardMap> cms;
-cardMap::cardMap(const QColor &dim) : dimcolor(dim)
+cardMap::cardMap(const TQColor &dim) : dimcolor(dim)
{
assert(!_self);
@@ -55,17 +55,17 @@ cardMap::cardMap(const QColor &dim) : dimcolor(dim)
KConfig *config = kapp->config();
KConfigGroupSaver cs(config, settings_group );
- QString bg = config->readEntry( "Back", KCardDialog::getDefaultDeck());
+ TQString bg = config->readEntry( "Back", KCardDialog::getDefaultDeck());
setBackSide( bg, false);
- QString dir = config->readEntry("Cards", KCardDialog::getDefaultCardDir());
+ TQString dir = config->readEntry("Cards", KCardDialog::getDefaultCardDir());
setCardDir( dir );
cms.setObject(_self, this);
// kdDebug(11111) << "card " << CARDX << " " << CARDY << endl;
}
-bool cardMap::setCardDir( const QString &dir)
+bool cardMap::setCardDir( const TQString &dir)
{
KConfig *config = kapp->config();
KConfigGroupSaver cs(config, settings_group );
@@ -74,13 +74,13 @@ bool cardMap::setCardDir( const QString &dir)
// may take a while (approx. 3 seconds on my AMD K6PR200)
bool animate = config->readBoolEntry( "Animation", true);
- QWidget* w = 0;
- QPainter p;
- QTime t1, t2;
+ TQWidget* w = 0;
+ TQPainter p;
+ TQTime t1, t2;
- QString imgname = KCardDialog::getCardPath(dir, 11);
+ TQString imgname = KCardDialog::getCardPath(dir, 11);
- QImage image;
+ TQImage image;
image.load(imgname);
if( image.isNull()) {
kdDebug(11111) << "cannot load card pixmap \"" << imgname << "\" in " << dir << "\n";
@@ -96,15 +96,15 @@ bool cardMap::setCardDir( const QString &dir)
card_height = image.height();
const int diff_x_between_cards = QMAX(card_width / 9, 1);
- QString wait_message = i18n("please wait, loading cards...");
- QString greeting = i18n("KPatience - a Solitaire game");
+ TQString wait_message = i18n("please wait, loading cards...");
+ TQString greeting = i18n("KPatience - a Solitaire game");
const int greeting_width = 20 + diff_x_between_cards * 52 + card_width;
if( animate ) {
- t1 = QTime::currentTime();
- w = new QWidget( 0, "", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool );
- QRect dg = KGlobalSettings::splashScreenDesktopGeometry();
+ t1 = TQTime::currentTime();
+ w = new TQWidget( 0, "", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool );
+ TQRect dg = KGlobalSettings::splashScreenDesktopGeometry();
w->setBackgroundColor( Qt::darkGreen );
w->setGeometry( dg.left() + ( dg.width() - greeting_width ) / 2, dg.top() + ( dg.height() - 180 ) / 2, greeting_width, 180);
w->show();
@@ -114,11 +114,11 @@ bool cardMap::setCardDir( const QString &dir)
p.drawText(0, 150, greeting_width, 20, Qt::AlignCenter,
wait_message );
- p.setFont(QFont("Times", 24));
+ p.setFont(TQFont("Times", 24));
p.drawText(0, 0, greeting_width, 40, Qt::AlignCenter,
greeting);
- p.setPen(QPen(QColor(0, 0, 0), 4));
+ p.setPen(TQPen(TQColor(0, 0, 0), 4));
p.setBrush(Qt::NoBrush);
p.drawRect(0, 0, greeting_width, 180);
p.flush();
@@ -181,7 +181,7 @@ bool cardMap::setCardDir( const QString &dir)
{
const int time_to_see = 900;
p.end();
- t2 = QTime::currentTime();
+ t2 = TQTime::currentTime();
if(t1.msecsTo(t2) < time_to_see)
usleep((time_to_see-t1.msecsTo(t2))*1000);
delete w;
@@ -190,7 +190,7 @@ bool cardMap::setCardDir( const QString &dir)
return true;
}
-bool cardMap::setBackSide( const QPixmap &pm, bool scale )
+bool cardMap::setBackSide( const TQPixmap &pm, bool scale )
{
if (pm.isNull())
return false;
@@ -202,7 +202,7 @@ bool cardMap::setBackSide( const QPixmap &pm, bool scale )
{
kdDebug(11111) << "scaling back!!\n";
// scale to fit size
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale(((float)(card_width))/back.width(),
((float)(card_height))/back.height());
back = back.xForm(wm);
@@ -219,12 +219,12 @@ int cardMap::CARDY() {
return self()->card_height; // 96;
}
-QPixmap cardMap::backSide() const
+TQPixmap cardMap::backSide() const
{
return back;
}
-QPixmap cardMap::image( Card::Rank _rank, Card::Suit _suit, bool inverted) const
+TQPixmap cardMap::image( Card::Rank _rank, Card::Suit _suit, bool inverted) const
{
if( 1 <= _rank && _rank <= 13
&& 1 <= _suit && _suit <= 4 )