summaryrefslogtreecommitdiffstats
path: root/kwin4
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /kwin4
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin4')
-rw-r--r--kwin4/kwin4/kspritecache.cpp180
-rw-r--r--kwin4/kwin4/kspritecache.h104
-rw-r--r--kwin4/kwin4/kwin4.cpp136
-rw-r--r--kwin4/kwin4/kwin4.h10
-rw-r--r--kwin4/kwin4/kwin4doc.cpp114
-rw-r--r--kwin4/kwin4/kwin4doc.h24
-rw-r--r--kwin4/kwin4/kwin4player.cpp24
-rw-r--r--kwin4/kwin4/kwin4proc.cpp38
-rw-r--r--kwin4/kwin4/kwin4proc.h8
-rw-r--r--kwin4/kwin4/kwin4view.cpp106
-rw-r--r--kwin4/kwin4/kwin4view.h18
-rw-r--r--kwin4/kwin4/main.cpp2
-rw-r--r--kwin4/kwin4/scorewidget.cpp72
-rw-r--r--kwin4/kwin4/scorewidget.h34
14 files changed, 435 insertions, 435 deletions
diff --git a/kwin4/kwin4/kspritecache.cpp b/kwin4/kwin4/kspritecache.cpp
index 5be5538d..d293911b 100644
--- a/kwin4/kwin4/kspritecache.cpp
+++ b/kwin4/kwin4/kspritecache.cpp
@@ -18,22 +18,22 @@
#include "kspritecache.h"
#include <kconfig.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qwmatrix.h>
-#include <qdir.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqwmatrix.h>
+#include <tqdir.h>
#include <kdebug.h>
// KSprite
#include <math.h>
-KSpriteCache::KSpriteCache(QString grafixdir, QObject* parent,const char * name)
- : QObject(parent,name)
+KSpriteCache::KSpriteCache(TQString grafixdir, TQObject* parent,const char * name)
+ : TQObject(parent,name)
{
kdDebug(11002) << "KSpriteCache:: grafixdir=" << grafixdir << endl;
mConfig=0;
mCanvas=0;
- setRcFile(QString("grafix.rc"));
+ setRcFile(TQString("grafix.rc"));
setGrafixDir(grafixdir);
kdDebug(11002) << "Grafixdir=" << grafixDir() << " rcfile=" << rcFile() << endl;
reset();
@@ -47,18 +47,18 @@ KSpriteCache::~KSpriteCache()
delete mConfig;
}
-void KSpriteCache::setRcFile(QString name)
+void KSpriteCache::setRcFile(TQString name)
{
mRcFile=name;
}
-bool KSpriteCache::setGrafixDir(QString name)
+bool KSpriteCache::setGrafixDir(TQString name)
{
delete mConfig;
- QDir dir(name);
- QString d;
- d=dir.absPath()+QString("/");
- QString file=d+rcFile();
+ TQDir dir(name);
+ TQString d;
+ d=dir.absPath()+TQString("/");
+ TQString file=d+rcFile();
// TODO check for filename
kdDebug(11002) << "Opening config " << file << endl;
@@ -78,19 +78,19 @@ void KSpriteCache::reset()
void KSpriteCache::deleteAllItems()
{
- QDictIterator<QCanvasItem> it( mItemDict );
+ TQDictIterator<TQCanvasItem> it( mItemDict );
//kdDebug(11002) << "KSpriteCache::deleteAllItems items in cache=" << mItemDict.size() << endl;
while ( it.current() )
{
- QCanvasItem *item=it.current();
+ TQCanvasItem *item=it.current();
mItemDict.remove(it.currentKey());
delete item;
}
}
-void KSpriteCache::deleteItem(QString s,int no)
+void KSpriteCache::deleteItem(TQString s,int no)
{
- QCanvasItem *item;
- QString name=s+QString("_%1").arg(no);
+ TQCanvasItem *item;
+ TQString name=s+TQString("_%1").arg(no);
//kdDebug(11002) << "KSpriteCache::deleteItem name=" << name << endl;
item=mItemDict[name];
if (item)
@@ -101,9 +101,9 @@ void KSpriteCache::deleteItem(QString s,int no)
}
}
-void KSpriteCache::deleteItem(QCanvasItem *item)
+void KSpriteCache::deleteItem(TQCanvasItem *item)
{
- QDictIterator<QCanvasItem> it( mItemDict );
+ TQDictIterator<TQCanvasItem> it( mItemDict );
while ( it.current() )
{
if (item==it.current())
@@ -119,11 +119,11 @@ void KSpriteCache::deleteItem(QCanvasItem *item)
-QCanvasItem *KSpriteCache::getItem(QString name,int no)
+TQCanvasItem *KSpriteCache::getItem(TQString name,int no)
{
- QString dictname=name+QString("_%1").arg(no);
- QCanvasItem *item=mItemDict[dictname];
+ TQString dictname=name+TQString("_%1").arg(no);
+ TQCanvasItem *item=mItemDict[dictname];
//kdDebug(11002) << " -> getItem("<<name<<","<<no<<") =>"<<dictname<<endl;
// Directly found item
if (item)
@@ -155,9 +155,9 @@ QCanvasItem *KSpriteCache::getItem(QString name,int no)
return item;
}
-QPixmap * KSpriteCache::loadPixmap(QString file,QString mask,QString dir)
+TQPixmap * KSpriteCache::loadPixmap(TQString file,TQString mask,TQString dir)
{
- QPixmap *newP=new QPixmap;
+ TQPixmap *newP=new QPixmap;
bool result1=false;
bool result2=false;
if (dir.isNull()) dir=grafixDir(); // default dir
@@ -167,8 +167,8 @@ QPixmap * KSpriteCache::loadPixmap(QString file,QString mask,QString dir)
}
if (result1 && !mask.isNull())
{
- QBitmap bitmask;
- if (mask==QString("auto")) // self mask..slow but quick to create
+ TQBitmap bitmask;
+ if (mask==TQString("auto")) // self mask..slow but quick to create
{
newP->setMask( newP->createHeuristicMask() );
result2=true;
@@ -185,52 +185,52 @@ QPixmap * KSpriteCache::loadPixmap(QString file,QString mask,QString dir)
-QCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,QString name)
+TQCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,TQString name)
{
config->setGroup(name);
- QPoint defaultoffset=QPoint(0,0);
+ TQPoint defaultoffset=TQPoint(0,0);
// offset for the sprite
- QPoint offset=config->readPointEntry("offset",&defaultoffset);
+ TQPoint offset=config->readPointEntry("offset",&defaultoffset);
// operatins to perform. Can be ommited if you want only one operation
- QStringList operationList=config->readListEntry("pixmaps");
+ TQStringList operationList=config->readListEntry("pixmaps");
// Append default entry (empty string)
if (operationList.count()==0)
{
- operationList.append(QString::null);
+ operationList.append(TQString::null);
}
// Prepare for the reading of the pixmaps
- QPixmap *pixmap=0;
- QPtrList<QPixmap> pixlist;
+ TQPixmap *pixmap=0;
+ TQPtrList<TQPixmap> pixlist;
pixlist.setAutoDelete(true);
- QPtrList<QPoint> hotlist;
+ TQPtrList<TQPoint> hotlist;
hotlist.setAutoDelete(true);
// work through the operations list and create pixmaps
- for ( QStringList::Iterator it = operationList.begin(); it !=operationList.end(); ++it )
+ for ( TQStringList::Iterator it = operationList.begin(); it !=operationList.end(); ++it )
{
- QString name=*it;
+ TQString name=*it;
// Try to find out what we want to do, e.g. load, scale, ...
- QString type=config->readEntry(name+"method");
- if (type.isNull()) type=QString("load"); // default load
+ TQString type=config->readEntry(name+"method");
+ if (type.isNull()) type=TQString("load"); // default load
//kdDebug(11002) << " Processing operation " << (name.isNull()?"default":name) << "type="<<type << endl;
unsigned int number=config->readNumEntry(name+"number",1);
//kdDebug(11002) << " Reading " << number << " frames " << endl;
- QString pixfile=config->readPathEntry(name+"file");
- QString maskfile=config->readPathEntry(name+"mask");
+ TQString pixfile=config->readPathEntry(name+"file");
+ TQString maskfile=config->readPathEntry(name+"mask");
// Load a given set of images or replace a %d by a sequence if there are
// less image names than number given
- if (type==QString("load"))
+ if (type==TQString("load"))
{
// Read images
for (unsigned int i=0;i<number;i++)
{
- QString tmpfile,tmpmask;
+ TQString tmpfile,tmpmask;
tmpfile.sprintf(pixfile.latin1(),i);
tmpmask.sprintf(maskfile.latin1(),i);
@@ -241,13 +241,13 @@ QCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,QString name
applyFilter(pixmap,config,name);
pixlist.append(pixmap);
- QPoint *copyoffset=new QPoint(-offset);
+ TQPoint *copyoffset=new TQPoint(-offset);
hotlist.append(copyoffset);
}
}
}
// Scale some images in given axis
- else if (type==QString("scale"))
+ else if (type==TQString("scale"))
{
// scale images
int axis=config->readNumEntry(name+"axis",0);
@@ -260,7 +260,7 @@ QCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,QString name
pixmap=loadPixmap(pixfile,maskfile);
for (unsigned int j=0;j<(unsigned int)number;j++)
{
- QWMatrix matrix;
+ TQWMatrix matrix;
double sc=1.0-(double)(j)*step;
// scale it
@@ -268,12 +268,12 @@ QCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,QString name
else if (axis==2) matrix.scale(1.0,sc);
else matrix.scale(sc,sc);
- QPixmap *copypixmap=new QPixmap(pixmap->xForm(matrix));
+ TQPixmap *copypixmap=new TQPixmap(pixmap->xForm(matrix));
applyFilter(copypixmap,config,name);
pixlist.append(copypixmap);
- QPoint *copyoffset=new QPoint((-pixmap->width()+copypixmap->width())/2,(-pixmap->height()+copypixmap->height())/2);
+ TQPoint *copyoffset=new TQPoint((-pixmap->width()+copypixmap->width())/2,(-pixmap->height()+copypixmap->height())/2);
hotlist.append(copyoffset);
}
delete pixmap;
@@ -288,15 +288,15 @@ QCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,QString name
//kdDebug(11002) <<"Pixarray count="<<pixlist.count()<<endl;
if (pixlist.count()<1) return 0;
- QCanvasPixmapArray *pixmaparray=new QCanvasPixmapArray(pixlist,hotlist);
+ TQCanvasPixmapArray *pixmaparray=new TQCanvasPixmapArray(pixlist,hotlist);
return pixmaparray;
}
-void KSpriteCache::applyFilter(QPixmap *pixmap,KConfig *config,QString name)
+void KSpriteCache::applyFilter(TQPixmap *pixmap,KConfig *config,TQString name)
{
- QValueList<int> filterList;
+ TQValueList<int> filterList;
filterList=config->readIntListEntry(name+"colorfilter");
- QValueList<int> transformList;
+ TQValueList<int> transformList;
transformList=config->readIntListEntry(name+"transformfilter");
// apply transformation filter
@@ -304,13 +304,13 @@ void KSpriteCache::applyFilter(QPixmap *pixmap,KConfig *config,QString name)
{
if (transformList[0]==1 && transformList.count()==2) // rotate
{
- QWMatrix rotate;
+ TQWMatrix rotate;
rotate.rotate(transformList[1]);
*pixmap=pixmap->xForm(rotate);
}
else if (transformList[0]==2 && transformList.count()==3) // scale
{
- QWMatrix scale;
+ TQWMatrix scale;
scale.scale((double)transformList[1]/100.0,(double)transformList[2]/100.0);
*pixmap=pixmap->xForm(scale);
}
@@ -326,22 +326,22 @@ void KSpriteCache::applyFilter(QPixmap *pixmap,KConfig *config,QString name)
}
}
-void KSpriteCache::changeHSV(QPixmap *pixmap,int dh,int ds,int dv)
+void KSpriteCache::changeHSV(TQPixmap *pixmap,int dh,int ds,int dv)
{
if (!pixmap || (dh==0 && ds==0 && dv==0)) return ;
if (pixmap->isNull()) return ;
if (pixmap->width()==0 && pixmap->height()==0) return ;
int h,s,v;
- QColor black=QColor(0,0,0);
- QImage img=pixmap->convertToImage(); // slow
+ TQColor black=TQColor(0,0,0);
+ TQImage img=pixmap->convertToImage(); // slow
for (int y=0;y<img.height();y++)
{
for (int x=0;x<img.width();x++)
{
QRgb pix=img.pixel(x,y);
- QColor col(pix);
+ TQColor col(pix);
col.hsv(&h,&s,&v);
if (col==black) continue; // speed up?
h=((unsigned int)(h+dh))%360;
@@ -353,13 +353,13 @@ void KSpriteCache::changeHSV(QPixmap *pixmap,int dh,int ds,int dv)
}
pixmap->convertFromImage(img); // slow
}
-void KSpriteCache::changeGrey(QPixmap *pixmap,int lighter)
+void KSpriteCache::changeGrey(TQPixmap *pixmap,int lighter)
{
if (!pixmap) return ;
if (pixmap->isNull()) return ;
if (pixmap->width()==0 && pixmap->height()==0) return ;
- QImage img=pixmap->convertToImage(); // slow
+ TQImage img=pixmap->convertToImage(); // slow
for (int y=0;y<img.height();y++)
{
@@ -367,7 +367,7 @@ void KSpriteCache::changeGrey(QPixmap *pixmap,int lighter)
{
QRgb pix=img.pixel(x,y);
int gray=qGray(qRed(pix),qGreen(pix),qBlue(pix));
- QColor col(gray,gray,gray);
+ TQColor col(gray,gray,gray);
if (lighter>0) col=col.light(lighter);
if (lighter<0) col=col.dark(-lighter);
img.setPixel(x,y,qRgba(col.red(),col.green(),col.blue(),qAlpha(pix)));
@@ -376,30 +376,30 @@ void KSpriteCache::changeGrey(QPixmap *pixmap,int lighter)
pixmap->convertFromImage(img); // slow
}
-QCanvasItem *KSpriteCache::loadItem(KConfig *config,QString name)
+TQCanvasItem *KSpriteCache::loadItem(KConfig *config,TQString name)
{
if (!config) return 0;
int rtti=config->readNumEntry("rtti",0);
- QCanvasItem *item=0;
+ TQCanvasItem *item=0;
switch(rtti)
{
- case QCanvasItem::Rtti_Text:
+ case TQCanvasItem::Rtti_Text:
{
- QCanvasText *sprite=new QCanvasText(canvas());
+ TQCanvasText *sprite=new TQCanvasText(canvas());
//kdDebug(11002) << "new CanvasText =" << sprite << endl;
- QString text=config->readEntry("text");
+ TQString text=config->readEntry("text");
sprite->setText(text);
- QColor color=config->readColorEntry("color");
+ TQColor color=config->readColorEntry("color");
sprite->setColor(color);
- QFont font=config->readFontEntry("font");
+ TQFont font=config->readFontEntry("font");
sprite->setFont(font);
- item=(QCanvasItem *)sprite;
+ item=(TQCanvasItem *)sprite;
configureCanvasItem(config,item);
}
break;
case 32:
{
- QCanvasPixmapArray *pixmaps=createPixmapArray(config,name);
+ TQCanvasPixmapArray *pixmaps=createPixmapArray(config,name);
KSprite *sprite=new KSprite(pixmaps,canvas());
//kdDebug(11002) << "new sprite =" << sprite << endl;
double speed=config->readDoubleNumEntry("speed",0.0);
@@ -407,7 +407,7 @@ QCanvasItem *KSpriteCache::loadItem(KConfig *config,QString name)
//kdDebug(11002) << "speed=" << sprite->speed() << endl;
createAnimations(config,sprite);
- item=(QCanvasItem *)sprite;
+ item=(TQCanvasItem *)sprite;
configureCanvasItem(config,item);
}
@@ -421,32 +421,32 @@ QCanvasItem *KSpriteCache::loadItem(KConfig *config,QString name)
return item;
}
-QCanvasItem *KSpriteCache::cloneItem(QCanvasItem *original)
+TQCanvasItem *KSpriteCache::cloneItem(TQCanvasItem *original)
{
if (!original) return 0;
int rtti=original->rtti();
- QCanvasItem *item=0;
+ TQCanvasItem *item=0;
switch(rtti)
{
- case QCanvasItem::Rtti_Text:
+ case TQCanvasItem::Rtti_Text:
{
- QCanvasText *sprite=(QCanvasText *)original;
- QCanvasText *copy=new QCanvasText(canvas());
- configureCanvasItem(original,(QCanvasItem *)copy);
+ TQCanvasText *sprite=(TQCanvasText *)original;
+ TQCanvasText *copy=new TQCanvasText(canvas());
+ configureCanvasItem(original,(TQCanvasItem *)copy);
copy->setText(sprite->text());
copy->setColor(sprite->color());
copy->setFont(sprite->font());
- item=(QCanvasItem *)copy;
+ item=(TQCanvasItem *)copy;
}
break;
case 32:
{
KSprite *sprite=(KSprite *)original;
KSprite *copy=new KSprite(sprite->images(),canvas());
- configureCanvasItem(original,(QCanvasItem *)copy);
+ configureCanvasItem(original,(TQCanvasItem *)copy);
copy->setSpeed(sprite->speed());
createAnimations(sprite,copy);
- item=(QCanvasItem *)copy;
+ item=(TQCanvasItem *)copy;
}
break;
default:
@@ -459,7 +459,7 @@ QCanvasItem *KSpriteCache::cloneItem(QCanvasItem *original)
}
-void KSpriteCache::configureCanvasItem(KConfig *config, QCanvasItem *sprite)
+void KSpriteCache::configureCanvasItem(KConfig *config, TQCanvasItem *sprite)
{
double x=config->readDoubleNumEntry("x",0.0);
double y=config->readDoubleNumEntry("y",0.0);
@@ -472,7 +472,7 @@ void KSpriteCache::configureCanvasItem(KConfig *config, QCanvasItem *sprite)
//kdDebug(11002) << "z=" << sprite->z() << endl;
}
-void KSpriteCache::configureCanvasItem(QCanvasItem *original, QCanvasItem *copy)
+void KSpriteCache::configureCanvasItem(TQCanvasItem *original, TQCanvasItem *copy)
{
copy->setX(original->x());
copy->setY(original->y());
@@ -496,11 +496,11 @@ void KSpriteCache::createAnimations(KConfig *config,KSprite *sprite)
if (!sprite) return ;
for (int i=0;i<1000;i++)
{
- QString anim=QString("anim%1").arg(i);
+ TQString anim=TQString("anim%1").arg(i);
if (config->hasKey(anim))
{
//kdDebug(11002) << "Found animation key " << anim << endl;
- QValueList<int> animList=config->readIntListEntry(anim);
+ TQValueList<int> animList=config->readIntListEntry(anim);
if (animList.count()!=4)
{
kdWarning(11002) << "KSpriteCache::createAnimations:: warning animation parameter " << anim << " needs four arguments" << endl;
@@ -519,8 +519,8 @@ void KSpriteCache::createAnimations(KConfig *config,KSprite *sprite)
// ----------------------- KSPRITE --------------------------------
-KSprite::KSprite(QCanvasPixmapArray* array, QCanvas* canvas)
- :QCanvasSprite(array,canvas)
+KSprite::KSprite(TQCanvasPixmapArray* array, TQCanvas* canvas)
+ :TQCanvasSprite(array,canvas)
{
mImages=array;
mSpeed=0.0;
@@ -670,7 +670,7 @@ void KSprite::advance(int stage)
if (mNotify && emitsignal)
{
//kdDebug(11002) << " ADVANCE emits signal " << emitsignal << " for item "<< this << endl;
- mNotify->emitSignal((QCanvasItem *)this,emitsignal);
+ mNotify->emitSignal((TQCanvasItem *)this,emitsignal);
}
}
@@ -732,13 +732,13 @@ void KSprite::emitNotify(int mode)
{
if (!mNotify) return ;
//kdDebug(11002) << " ADVANCE emits DIRECT signal " << mode << " for item "<< this << endl;
- mNotify->emitSignal((QCanvasItem *)this,mode);
+ mNotify->emitSignal((TQCanvasItem *)this,mode);
}
-QObject *KSprite::createNotify()
+TQObject *KSprite::createNotify()
{
if (!mNotify) mNotify=new KSpriteNotify;
mNotify->incRefCnt();
- return (QObject *)mNotify;
+ return (TQObject *)mNotify;
}
void KSprite::deleteNotify()
diff --git a/kwin4/kwin4/kspritecache.h b/kwin4/kwin4/kspritecache.h
index 628ff5e6..9d762a13 100644
--- a/kwin4/kwin4/kspritecache.h
+++ b/kwin4/kwin4/kspritecache.h
@@ -17,15 +17,15 @@
#ifndef _KSPRITECACHE_H
#define _KSPRITECACHE_H
-#include <qcanvas.h>
-#include <qdict.h>
+#include <tqcanvas.h>
+#include <tqdict.h>
class KConfig;
class KSprite;
/**
- * this is an internal class to provide a @ref QObject to emit
+ * this is an internal class to provide a @ref TQObject to emit
* a signal from a sprite if a notify object is created
* You do not need this directly.
* TODO: Can be part of the KSprite class
@@ -35,13 +35,13 @@ class KSprite;
Q_OBJECT
public:
- KSpriteNotify() :QObject(0,0) {mRefCnt=0;}
- void emitSignal(QCanvasItem *parent,int mode) {emit signalNotify(parent,mode);}
+ KSpriteNotify() :TQObject(0,0) {mRefCnt=0;}
+ void emitSignal(TQCanvasItem *parent,int mode) {emit signalNotify(parent,mode);}
void incRefCnt() {mRefCnt++;}
void decRefCnt() {mRefCnt--;}
int refCnt() {return mRefCnt;}
signals:
- void signalNotify(QCanvasItem *,int);
+ void signalNotify(TQCanvasItem *,int);
private:
int mRefCnt;
};
@@ -56,10 +56,10 @@ class KSprite;
};
/**
- * The KSprite class is an advance QCanvasSprite class which
+ * The KSprite class is an advance TQCanvasSprite class which
* is usable with the @ref KSpriteCache. It furthermore contains a
* few useful functions like advanced movement and animations which
- * go beyond the QCanvasSprite versions of them. Also it provides
+ * go beyond the TQCanvasSprite versions of them. Also it provides
* a signal which is emitted when movement or animation are finished.
*
* @short The main KDE game object
@@ -76,7 +76,7 @@ class KSprite : public QCanvasSprite
* @param array - the frames of the sprite
* @param canvas - the canvas the sprites lives on
**/
- KSprite(QCanvasPixmapArray* array, QCanvas* canvas);
+ KSprite(TQCanvasPixmapArray* array, TQCanvas* canvas);
/**
* Destructs the sprite
@@ -92,7 +92,7 @@ class KSprite : public QCanvasSprite
* returns a pointer to the pixmap array which holds the
* frames of the sprite.
**/
- QCanvasPixmapArray* images() const {return mImages;}
+ TQCanvasPixmapArray* images() const {return mImages;}
/**
* Moves the sprite to the given position with the given speed.
@@ -132,10 +132,10 @@ class KSprite : public QCanvasSprite
double speed() {return mSpeed;}
/**
- * returns the notification QObject. You probably do not need this but
+ * returns the notification TQObject. You probably do not need this but
* @ref createNotify instead
**/
- QObject *notify() {return (QObject *)mNotify;}
+ TQObject *notify() {return (TQObject *)mNotify;}
/**
* Directly emits the notification signal with the given parameter
@@ -146,21 +146,21 @@ class KSprite : public QCanvasSprite
/**
* Creates a notification object. You can connect to it and it will emit
- * the signal signalNotify(QCanvasItem *parent, intmode) when a move or
+ * the signal signalNotify(TQCanvasItem *parent, intmode) when a move or
* animation is finished.
* Example:
* <pre>
- * connect(sprite->createNotify(),SIGNAL(signalNotify(QCanvasItem *,int)),
- * this,SLOT(moveDone(QCanvasItem *,int)));
+ * connect(sprite->createNotify(),TQT_SIGNAL(signalNotify(TQCanvasItem *,int)),
+ * this,TQT_SLOT(moveDone(TQCanvasItem *,int)));
* </pre>
* In the move done function you best delete the notify again with
* @ref deleteNotify
**/
- QObject *createNotify();
+ TQObject *createNotify();
/**
* Deletes the sprite notify if it is no longer used. The notify keeps a
- * reference count which deletes the QObject when no reference to it is in
+ * reference count which deletes the TQObject when no reference to it is in
* use.
**/
void deleteNotify();
@@ -173,7 +173,7 @@ class KSprite : public QCanvasSprite
* @param startframe - the first frame of the animation
* @param endframe - the last frame of the animation
* @param mode - the mode of the animation see @ref creaetAnimation
- * @param delay - the delay in QCanvas animation cycles between two frames
+ * @param delay - the delay in TQCanvas animation cycles between two frames
**/
void getAnimation(int no,int &startframe,int &endframe,int &mode,int &delay);
@@ -217,11 +217,11 @@ class KSprite : public QCanvasSprite
private:
KSpriteNotify *mNotify;
- QCanvasPixmapArray* mImages;
- QByteArray mAnimFrom;
- QByteArray mAnimTo;
- QByteArray mAnimDirection;
- QByteArray mAnimDelay;
+ TQCanvasPixmapArray* mImages;
+ TQByteArray mAnimFrom;
+ TQByteArray mAnimTo;
+ TQByteArray mAnimDirection;
+ TQByteArray mAnimDelay;
double mTargetX,mTargetY;
double mSpeed;
@@ -275,7 +275,7 @@ class KSprite : public QCanvasSprite
* </pre>
*
* @todo Support single sprites (only one copy in memory)
- * Support more sprite types (currently KSprite and QCanvasText)
+ * Support more sprite types (currently KSprite and TQCanvasText)
*
* @short The main KDE game object
* @author Martin Heni <martin@heni-online.de>
@@ -291,7 +291,7 @@ class KSpriteCache : public QObject
*
* @param grafixdir - the directory where the configuration file and the graphics reside
**/
- KSpriteCache(QString grafixdir, QObject* parent=0,const char * name=0);
+ KSpriteCache(TQString grafixdir, TQObject* parent=0,const char * name=0);
/**
* Delete the sprite cache
@@ -303,34 +303,34 @@ class KSpriteCache : public QObject
*
* @todo this does not flush the cache or so...
**/
- bool setGrafixDir(QString dir); // dir and load config
+ bool setGrafixDir(TQString dir); // dir and load config
/**
* Change the name of the config file. Its default is <em>grafix.rc</em>
**/
- void setRcFile(QString file);
+ void setRcFile(TQString file);
/**
* return the graphics directory
**/
- QString grafixDir() {return mGrafixDir;}
+ TQString grafixDir() {return mGrafixDir;}
/**
* return the rc/configuration file
**/
- QString rcFile() {return mRcFile;}
+ TQString rcFile() {return mRcFile;}
/**
* returns the canvas which belongs to the cache
**/
- QCanvas *canvas() const {return mCanvas;}
+ TQCanvas *canvas() const {return mCanvas;}
/**
* sets the canvas belonging to the cache
*
* @todo could be done in the constructor
**/
- void setCanvas(QCanvas *c) {mCanvas=c;}
+ void setCanvas(TQCanvas *c) {mCanvas=c;}
/**
* returns the @ref KConfig configuration file where thegraphical data is
@@ -363,24 +363,24 @@ class KSpriteCache : public QObject
* @todo support loading of frame sequence via one big pixmap
*
**/
- QCanvasItem *getItem(QString name, int no);
+ TQCanvasItem *getItem(TQString name, int no);
/**
* This function loads a pixmap from the given file. Optional you can also
* provide a mask file. Also optinal you can provide the directory. Default
* is the directory which is set with this @ref KSpriteCache
**/
- QPixmap * loadPixmap(QString file,QString mask=QString::null,QString dir=QString::null);
+ TQPixmap * loadPixmap(TQString file,TQString mask=TQString::null,TQString dir=TQString::null);
/**
* Deletes a item form the sprite cache given as a pointer to it
**/
- void deleteItem(QCanvasItem *item);
+ void deleteItem(TQCanvasItem *item);
/**
* Same as above but delete the item with the name and number
**/
- void deleteItem(QString s,int no);
+ void deleteItem(TQString s,int no);
/**
* Deletes all items in the cache
@@ -397,46 +397,46 @@ class KSpriteCache : public QObject
* z=(double)
* </pre>
**/
- void configureCanvasItem(KConfig *config,QCanvasItem *item);
+ void configureCanvasItem(KConfig *config,TQCanvasItem *item);
/**
* Copies the default properties for all QCanvasItems from another sprite.
* Same as above.
**/
- void configureCanvasItem(QCanvasItem *original,QCanvasItem *item);
+ void configureCanvasItem(TQCanvasItem *original,TQCanvasItem *item);
/**
* Loads an item with the given name form the given config file. From the
* rtti entry it is determined what type it is and then it is loaded.
**/
- virtual QCanvasItem *loadItem(KConfig *config,QString name);
+ virtual TQCanvasItem *loadItem(KConfig *config,TQString name);
/**
* Clone the sprite from another sprite, mostly from the copy stored in the
* cache.
**/
- virtual QCanvasItem *cloneItem(QCanvasItem *original);
+ virtual TQCanvasItem *cloneItem(TQCanvasItem *original);
/**
* Creates a pixmap array for a @ref KSprite from the given config file
* for the sprite with the given name (is the name necessary?).
* Parameters are
* <pre>
- * offset=(QPoint) : The sprites offset (where 0,0 is)
- * pixmaps=(QStringList) : List of operations to create frames (TODO * rename)
+ * offset=(TQPoint) : The sprites offset (where 0,0 is)
+ * pixmaps=(TQStringList) : List of operations to create frames (TODO * rename)
* if ommited one operation without name is used
* </pre>
* All following calls have to be preceded by every given string of the
* pixmaps section. If this section is not supplied they can be used without
* prefix but only one frame sequence is created.
* <pre>
- * method=(QString) : load, scale (default=load)
+ * method=(TQString) : load, scale (default=load)
* load: loads number frames from file
* scale: scales number frames from one loaded file
* number=(int) : how many frames to generate
* file=(Qstring) : the filename to load (can contain printf format args
* as %d which are replaced, e.g. file=hello_%d.png
- * mask=(QString) : Same for the mask of the pixmaps
+ * mask=(TQString) : Same for the mask of the pixmaps
* axis=(int) : (scale only): scale axis (1=x,2=y,3=x+y)
* final=(double) : final scale in percent (default 0.0, i.e. complete scaling)
* colorfilter=1,h,s,v: make a HSV transform of all sprite images
@@ -444,7 +444,7 @@ class KSpriteCache : public QObject
* colorfilter=2,g : make it gray and lighter (positiv) or darker (negative)
* </pre>
**/
- virtual QCanvasPixmapArray *createPixmapArray(KConfig *config,QString name);
+ virtual TQCanvasPixmapArray *createPixmapArray(KConfig *config,TQString name);
/**
* Reads the animations from the config file and calls the corresponding
@@ -474,18 +474,18 @@ class KSpriteCache : public QObject
* than 100 the pixmap is made lighter and if it less then 100 it is
* made darker too
**/
- virtual void changeGrey(QPixmap *pixmap,int lighter=100);
+ virtual void changeGrey(TQPixmap *pixmap,int lighter=100);
/**
* Change the HAS value of the pixmap by dH, dS and dV
**/
- virtual void changeHSV(QPixmap *pixmap,int dh,int ds,int dv);
+ virtual void changeHSV(TQPixmap *pixmap,int dh,int ds,int dv);
/**
* Apply the filters as defined in the config file to the sprite name
* (TODO is this argument needed) to the pixmap.
*/
- virtual void applyFilter(QPixmap *pixmap,KConfig *config,QString name);
+ virtual void applyFilter(TQPixmap *pixmap,KConfig *config,TQString name);
/**
* resets the cache (?)
@@ -493,13 +493,13 @@ class KSpriteCache : public QObject
void reset();
protected:
- QDict<QCanvasItem> mItemDict; // Spritename lookup
- QDict<QCanvasItem> mCloneDict; // clone Items lookup
+ TQDict<TQCanvasItem> mItemDict; // Spritename lookup
+ TQDict<TQCanvasItem> mCloneDict; // clone Items lookup
- QString mGrafixDir;
- QString mRcFile;
+ TQString mGrafixDir;
+ TQString mRcFile;
KConfig *mConfig;
- QCanvas *mCanvas;
+ TQCanvas *mCanvas;
};
diff --git a/kwin4/kwin4/kwin4.cpp b/kwin4/kwin4/kwin4.cpp
index fb66e687..16b37da5 100644
--- a/kwin4/kwin4/kwin4.cpp
+++ b/kwin4/kwin4/kwin4.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
// include files for QT
-#include <qstring.h>
-#include <qlayout.h>
-#include <qhgroupbox.h>
-#include <qvbox.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
-#include <qlcdnumber.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqhgroupbox.h>
+#include <tqvbox.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
+#include <tqlcdnumber.h>
// include files for KDE
#include <kapplication.h>
@@ -35,7 +35,7 @@
#include <kdebug.h>
#include <kstdaction.h>
#include <kaction.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kstatusbar.h>
#include <kconfigdialog.h>
@@ -63,26 +63,26 @@
* Constructor for the chat widget. This widget
* is derived from the libkdegames chat widget
*/
-ChatDlg::ChatDlg(KGame *game,QWidget *parent)
+ChatDlg::ChatDlg(KGame *game,TQWidget *parent)
: KDialogBase(Plain,i18n("Chat Dlg"),Ok,Ok,parent,0,false,true),mChat(0), mChatDlg(0)
{
- setMinimumSize(QSize(200,200));
+ setMinimumSize(TQSize(200,200));
- QGridLayout* mGridLayout=new QGridLayout(plainPage());
- QHBoxLayout* h = new QHBoxLayout(plainPage());
- QHGroupBox* b = new QHGroupBox(i18n("Chat"), plainPage());
+ TQGridLayout* mGridLayout=new TQGridLayout(plainPage());
+ TQHBoxLayout* h = new TQHBoxLayout(plainPage());
+ TQHGroupBox* b = new TQHGroupBox(i18n("Chat"), plainPage());
mChat = new KGameChat(game, 10000, b);
h->addWidget(b, 1);
h->addSpacing(10);
mGridLayout->addLayout(h,0,0);
- QPushButton *mButton=new QPushButton(i18n("Configure..."),plainPage());
+ TQPushButton *mButton=new TQPushButton(i18n("Configure..."),plainPage());
mGridLayout->addWidget(mButton,1,1);
adjustSize();
mChatDlg=new KChatDialog(mChat,plainPage(),true);
- connect(mButton,SIGNAL(clicked()),mChatDlg,SLOT(show()));
+ connect(mButton,TQT_SIGNAL(clicked()),mChatDlg,TQT_SLOT(show()));
}
/**
@@ -107,7 +107,7 @@ void ChatDlg::setPlayer(Kwin4Player *p)
/**
* Construct the main application window
*/
-Kwin4App::Kwin4App(QWidget *parent, const char *name) : KMainWindow(parent,name), view(0), doc(0), mChat(0), mMyChatDlg(0)
+Kwin4App::Kwin4App(TQWidget *parent, const char *name) : KMainWindow(parent,name), view(0), doc(0), mChat(0), mMyChatDlg(0)
{
initGUI();
initStatusBar();
@@ -188,50 +188,50 @@ void Kwin4App::checkMenus(CheckFlags menu)
*/
void Kwin4App::initGUI()
{
- KStdGameAction::gameNew(this, SLOT(newGame()), actionCollection(), "new_game");
+ KStdGameAction::gameNew(this, TQT_SLOT(newGame()), actionCollection(), "new_game");
ACTION("new_game")->setStatusText(i18n("Start a new game"));
- KStdGameAction::load(this, SLOT(slotOpenGame()), actionCollection(), "open");
+ KStdGameAction::load(this, TQT_SLOT(slotOpenGame()), actionCollection(), "open");
ACTION("open")->setStatusText(i18n("Open a saved game..."));
- KStdGameAction::save(this, SLOT(slotSaveGame()), actionCollection(), "save");
+ KStdGameAction::save(this, TQT_SLOT(slotSaveGame()), actionCollection(), "save");
ACTION("save")->setStatusText(i18n("Save a game..."));
- KStdGameAction::end(this, SLOT(endGame()), actionCollection(), "end_game");
+ KStdGameAction::end(this, TQT_SLOT(endGame()), actionCollection(), "end_game");
ACTION("end_game")->setStatusText(i18n("Ending the current game..."));
ACTION("end_game")->setWhatsThis(i18n("Aborts a currently played game. No winner will be declared."));
- new KAction(i18n("&Network Configuration..."),0, this, SLOT(slotInitNetwork()),
+ new KAction(i18n("&Network Configuration..."),0, this, TQT_SLOT(slotInitNetwork()),
actionCollection(), "network_conf");
- new KAction(i18n("Network Chat..."),0, this, SLOT(slotChat()),
+ new KAction(i18n("Network Chat..."),0, this, TQT_SLOT(slotChat()),
actionCollection(), "network_chat");
if (global_debug>0)
- new KAction(i18n("Debug KGame"), 0, this, SLOT(slotDebugKGame()),
+ new KAction(i18n("Debug KGame"), 0, this, TQT_SLOT(slotDebugKGame()),
actionCollection(), "file_debug");
new KAction(i18n("&Show Statistics"),"flag", 0, this,
- SLOT(showStatistics()), actionCollection(), "statistics");
+ TQT_SLOT(showStatistics()), actionCollection(), "statistics");
ACTION("statistics")->setStatusText(i18n("Show statistics."));
- KStdGameAction::hint(doc, SLOT(calcHint()), actionCollection(), "hint");
+ KStdGameAction::hint(doc, TQT_SLOT(calcHint()), actionCollection(), "hint");
ACTION("hint")->setStatusText(i18n("Shows a hint on how to move."));
- KStdGameAction::quit(this, SLOT(close()), actionCollection(), "game_exit");
+ KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection(), "game_exit");
ACTION("game_exit")->setStatusText(i18n("Quits the program."));
- KStdGameAction::undo(this, SLOT(slotUndo()), actionCollection(), "edit_undo");
+ KStdGameAction::undo(this, TQT_SLOT(slotUndo()), actionCollection(), "edit_undo");
ACTION("edit_undo")->setStatusText(i18n("Undo last move."));
- KStdGameAction::redo(this, SLOT(slotRedo()), actionCollection(), "edit_redo");
+ KStdGameAction::redo(this, TQT_SLOT(slotRedo()), actionCollection(), "edit_redo");
ACTION("edit_redo")->setStatusText(i18n("Redo last move."));
actionCollection()->setHighlightingEnabled(true);
- connect(actionCollection(), SIGNAL(actionStatusText(const QString &)), SLOT(slotStatusMsg(const QString &)));
- connect(actionCollection(), SIGNAL(clearStatusText()), SLOT(slotClearStatusText()));
+ connect(actionCollection(), TQT_SIGNAL(actionStatusText(const TQString &)), TQT_SLOT(slotStatusMsg(const TQString &)));
+ connect(actionCollection(), TQT_SIGNAL(clearStatusText()), TQT_SLOT(slotClearStatusText()));
- KStdAction::preferences(this, SLOT(showSettings()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(showSettings()), actionCollection());
}
/**
@@ -263,17 +263,17 @@ void Kwin4App::initDocument()
{
doc = new Kwin4Doc(this);
// Game Over signal
- connect(doc,SIGNAL(signalGameOver(int, KPlayer *,KGame *)),
- this,SLOT(slotGameOver(int, KPlayer *,KGame *)));
- connect(doc,SIGNAL(signalMoveDone(int, int)),
- this,SLOT(slotMoveDone(int, int)));
- connect(doc,SIGNAL(signalClientLeftGame(int, int,KGame *)),
- this,SLOT(slotNetworkBroken(int, int, KGame *)));
- connect(doc,SIGNAL(signalNextPlayer()),
- this,SLOT(slotStatusNames()));
+ connect(doc,TQT_SIGNAL(signalGameOver(int, KPlayer *,KGame *)),
+ this,TQT_SLOT(slotGameOver(int, KPlayer *,KGame *)));
+ connect(doc,TQT_SIGNAL(signalMoveDone(int, int)),
+ this,TQT_SLOT(slotMoveDone(int, int)));
+ connect(doc,TQT_SIGNAL(signalClientLeftGame(int, int,KGame *)),
+ this,TQT_SLOT(slotNetworkBroken(int, int, KGame *)));
+ connect(doc,TQT_SIGNAL(signalNextPlayer()),
+ this,TQT_SLOT(slotStatusNames()));
- connect(doc,SIGNAL(signalGameRun()),
- this,SLOT(slotNewGame()));
+ connect(doc,TQT_SIGNAL(signalGameRun()),
+ this,TQT_SLOT(slotNewGame()));
}
void Kwin4App::changeAction(const char *action, bool enable){
@@ -290,7 +290,7 @@ void Kwin4App::changeAction(const char *action, bool enable){
*/
void Kwin4App::saveProperties(KConfig *cfg)
{
- QString tempfile = kapp->tempSaveName(QDir::currentDirPath()+"kwin4");
+ TQString tempfile = kapp->tempSaveName(TQDir::currentDirPath()+"kwin4");
cfg->writePathEntry("filename", tempfile );
doc->save(tempfile);
}
@@ -300,7 +300,7 @@ void Kwin4App::saveProperties(KConfig *cfg)
*/
void Kwin4App::readProperties(KConfig* cfg)
{
- QString filename = cfg->readPathEntry("filename");
+ TQString filename = cfg->readPathEntry("filename");
if(!filename.isEmpty())
doc->load(filename);
}
@@ -310,9 +310,9 @@ void Kwin4App::readProperties(KConfig* cfg)
*/
void Kwin4App::slotOpenGame()
{
- QString dir(":<kwin4>");
- QString filter("*");
- QString file("/tmp/kwin.save");
+ TQString dir(":<kwin4>");
+ TQString filter("*");
+ TQString file("/tmp/kwin.save");
if (global_debug < 10)
file=KFileDialog::getOpenFileName(dir,filter,this);
doc->load(file,true);
@@ -324,9 +324,9 @@ void Kwin4App::slotOpenGame()
*/
void Kwin4App::slotSaveGame()
{
- QString dir(":<kwin4>");
- QString filter("*");
- QString file("/tmp/kwin.save");
+ TQString dir(":<kwin4>");
+ TQString filter("*");
+ TQString file("/tmp/kwin.save");
if (global_debug < 10)
file=KFileDialog::getSaveFileName(dir,filter,this);
doc->save(file);
@@ -384,7 +384,7 @@ void Kwin4App::showStatistics()
dlg->p2_aborted->display(doc->QueryStat(Rot, TBrk));
dlg->p2_sum->display(doc->QueryStat(Rot, TSum));
- if(dlg->exec() == QDialog::Rejected)
+ if(dlg->exec() == TQDialog::Rejected)
doc->ResetStat();
}
@@ -419,7 +419,7 @@ void Kwin4App::slotRedo()
* Set the given text into the statusbar
* change status message permanently
*/
-void Kwin4App::slotStatusMsg(const QString &text)
+void Kwin4App::slotStatusMsg(const TQString &text)
{
statusBar()->clear();
statusBar()->changeItem(text, ID_STATUS_MSG);
@@ -430,7 +430,7 @@ void Kwin4App::slotStatusMsg(const QString &text)
* the player currently moving
* change status mover permanently
*/
-void Kwin4App::slotStatusMover(const QString &text)
+void Kwin4App::slotStatusMover(const TQString &text)
{
statusBar()->clear();
statusBar()->changeItem(text, ID_STATUS_MOVER);
@@ -452,13 +452,13 @@ void Kwin4App::EndGame(TABLE mode)
* Set the names in the mover field
*/
void Kwin4App::slotStatusNames(){
- QString msg;
+ TQString msg;
if (!(doc->gameStatus()==KGame::Run))
msg=i18n("No game ");
else if (doc->QueryCurrentPlayer()==Gelb)
- msg=QString(" ")+doc->QueryName(Gelb)+ i18n(" - Yellow ");
+ msg=TQString(" ")+doc->QueryName(Gelb)+ i18n(" - Yellow ");
else if (doc->QueryCurrentPlayer())
- msg=QString(" ")+doc->QueryName(Rot)+ i18n(" - Red ");
+ msg=TQString(" ")+doc->QueryName(Rot)+ i18n(" - Red ");
else
msg=i18n("Nobody ");
slotStatusMover(msg);
@@ -509,13 +509,13 @@ void Kwin4App::slotGameOver(int status, KPlayer * p, KGame * /*me*/)
EndGame(TWin);
else
EndGame(TLost);
- QString msg=i18n("%1 won the game. Please restart next round.").arg(doc->QueryName(((FARBE)p->userId())));
+ TQString msg=i18n("%1 won the game. Please restart next round.").arg(doc->QueryName(((FARBE)p->userId())));
slotStatusMsg(msg);
}
else if (status==2) // Abort
{
EndGame(TBrk);
- QString m=i18n(" Game aborted. Please restart next round.");
+ TQString m=i18n(" Game aborted. Please restart next round.");
slotStatusMsg(m);
}
else
@@ -529,7 +529,7 @@ void Kwin4App::slotInitNetwork()
{
if (doc->gameStatus()==Kwin4Doc::Intro) doc->setGameStatus(Kwin4Doc::Pause);
- QString host = Prefs::host();
+ TQString host = Prefs::host();
int port=Prefs::port();
// just for testing - should be non-modal
@@ -538,15 +538,15 @@ void Kwin4App::slotInitNetwork()
dlg.networkConfig()->setDefaultNetworkInfo(host, port);
dlg.networkConfig()->setDiscoveryInfo("_kwin4._tcp",Prefs::gamename());
- QVBox *box=dlg.configPage(KGameDialog::NetworkConfig);
- QVBoxLayout *l=(QVBoxLayout *)(box->layout());
+ TQVBox *box=dlg.configPage(KGameDialog::NetworkConfig);
+ TQVBoxLayout *l=(TQVBoxLayout *)(box->layout());
- mColorGroup=new QVButtonGroup(box);
- connect(mColorGroup, SIGNAL(clicked(int)), this, SLOT(slotRemoteChanged(int)));
- connect(dlg.networkConfig(), SIGNAL(signalServerTypeChanged(int)), this, SLOT(slotServerTypeChanged(int)));
+ mColorGroup=new TQVButtonGroup(box);
+ connect(mColorGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotRemoteChanged(int)));
+ connect(dlg.networkConfig(), TQT_SIGNAL(signalServerTypeChanged(int)), this, TQT_SLOT(slotServerTypeChanged(int)));
- new QRadioButton(i18n("Yellow should be played by remote"), mColorGroup);
- new QRadioButton(i18n("Red should be played by remote"), mColorGroup);
+ new TQRadioButton(i18n("Yellow should be played by remote"), mColorGroup);
+ new TQRadioButton(i18n("Red should be played by remote"), mColorGroup);
l->addWidget(mColorGroup);
mColorGroup->setButton(0);
slotRemoteChanged(0);
@@ -590,8 +590,8 @@ void Kwin4App::slotChat()
mMyChatDlg->setPlayer(doc->getPlayer(Gelb));
else
mMyChatDlg->setPlayer(doc->getPlayer(Rot));
- connect(doc,SIGNAL(signalChatChanged(Kwin4Player *)),
- mMyChatDlg,SLOT(setPlayer(Kwin4Player *)));
+ connect(doc,TQT_SIGNAL(signalChatChanged(Kwin4Player *)),
+ mMyChatDlg,TQT_SLOT(setPlayer(Kwin4Player *)));
}
if (mMyChatDlg->isHidden())
@@ -619,7 +619,7 @@ void Kwin4App::showSettings(){
KConfigDialog *dialog = new KConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
Settings *general = new Settings(0, "General");
dialog->addPage(general, i18n("General"), "package_settings");
- connect(dialog, SIGNAL(settingsChanged()), doc, SLOT(loadSettings()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), doc, TQT_SLOT(loadSettings()));
dialog->show();
}
diff --git a/kwin4/kwin4/kwin4.h b/kwin4/kwin4/kwin4.h
index 572381f1..bca0a4f0 100644
--- a/kwin4/kwin4/kwin4.h
+++ b/kwin4/kwin4/kwin4.h
@@ -39,7 +39,7 @@ class KDE_EXPORT ChatDlg : public KDialogBase
{
Q_OBJECT
public:
- ChatDlg(KGame *game,QWidget* parent=0);
+ ChatDlg(KGame *game,TQWidget* parent=0);
public slots:
void setPlayer(Kwin4Player *p);
@@ -58,7 +58,7 @@ class Kwin4App : public KMainWindow
Q_OBJECT
public:
- Kwin4App(QWidget *parent=0, const char *name=0);
+ Kwin4App(TQWidget *parent=0, const char *name=0);
protected:
void EndGame(TABLE mode);
@@ -105,14 +105,14 @@ public slots:
void slotUndo();
void slotRedo();
- void slotStatusMover(const QString &text);
- void slotStatusMsg(const QString &text);
+ void slotStatusMover(const TQString &text);
+ void slotStatusMsg(const TQString &text);
private:
Kwin4View *view;
Kwin4Doc *doc;
- QVButtonGroup *mColorGroup;
+ TQVButtonGroup *mColorGroup;
KGameChat *mChat;
ChatDlg *mMyChatDlg;
diff --git a/kwin4/kwin4/kwin4doc.cpp b/kwin4/kwin4/kwin4doc.cpp
index 4c85f70e..cfc99c63 100644
--- a/kwin4/kwin4/kwin4doc.cpp
+++ b/kwin4/kwin4/kwin4doc.cpp
@@ -18,8 +18,8 @@
#include "kwin4doc.h"
// include files for Qt
-#include <qdir.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqtimer.h>
// include files for KDE
#include <klocale.h>
@@ -36,10 +36,10 @@
#include "prefs.h"
#include "statuswidget.h"
-Kwin4Doc::Kwin4Doc(QWidget *parent, const char *) : KGame(1234,parent), pView(0), mHintProcess(0)
+Kwin4Doc::Kwin4Doc(TQWidget *parent, const char *) : KGame(1234,parent), pView(0), mHintProcess(0)
{
- connect(this,SIGNAL(signalPropertyChanged(KGamePropertyBase *,KGame *)),
- this,SLOT(slotPropertyChanged(KGamePropertyBase *,KGame *)));
+ connect(this,TQT_SIGNAL(signalPropertyChanged(KGamePropertyBase *,KGame *)),
+ this,TQT_SLOT(slotPropertyChanged(KGamePropertyBase *,KGame *)));
dataHandler()->Debug();
//kdDebug(12010) << "Property 7 policy=" << dataHandler()->find(7)->policy() << endl;
@@ -62,25 +62,25 @@ Kwin4Doc::Kwin4Doc(QWidget *parent, const char *) : KGame(1234,parent), pView(0)
// The field array needs not be updated as any move will change it
// Careful only in new ResetGame! Maybe unlocal it there!
// mField.setPolicy(KGamePropertyBase::PolicyLocal);
- mField.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mField"));
+ mField.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mField"));
mFieldFilled.resize(7);
mHistory.resize(43);
- mHistory.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mHistory"));
-
- mAmzug.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mAmzug"));
- mCurrentMove.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mCurrentMove"));
- mMaxMove.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mMaxMove"));
- mFieldFilled.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mFieldFilled"));
- mHistoryCnt.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mHistoryCnt"));
- mLastColumn.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mLastColumn"));
- mLastHint.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mLastHint"));
- mLastColour.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mLastColour"));
- mScore.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,QString("mScore"));
+ mHistory.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mHistory"));
+
+ mAmzug.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mAmzug"));
+ mCurrentMove.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mCurrentMove"));
+ mMaxMove.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mMaxMove"));
+ mFieldFilled.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mFieldFilled"));
+ mHistoryCnt.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mHistoryCnt"));
+ mLastColumn.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mLastColumn"));
+ mLastHint.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mLastHint"));
+ mLastColour.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mLastColour"));
+ mScore.registerData(dataHandler(),KGamePropertyBase::PolicyLocal,TQString("mScore"));
// game startup parameter
mStartPlayer=Gelb;
- mStartPlayer.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,QString("mStartPlayer"));
+ mStartPlayer.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mStartPlayer"));
SetCurrentPlayer((FARBE)mStartPlayer.value());
if (global_debug>1) kdDebug(12010) << "amZug policy=" << mAmzug.policy() << endl;
@@ -93,14 +93,14 @@ Kwin4Doc::Kwin4Doc(QWidget *parent, const char *) : KGame(1234,parent), pView(0)
setGameStatus(Intro);
// Listen to network
- connect(this,SIGNAL(signalMessageUpdate(int,Q_UINT32,Q_UINT32)),
- this,SLOT(slotMessageUpdate(int, Q_UINT32,Q_UINT32)));
- connect(this,SIGNAL(signalClientJoinedGame(Q_UINT32,KGame *)),
- this,SLOT(slotClientConnected(Q_UINT32, KGame *)));
+ connect(this,TQT_SIGNAL(signalMessageUpdate(int,Q_UINT32,Q_UINT32)),
+ this,TQT_SLOT(slotMessageUpdate(int, Q_UINT32,Q_UINT32)));
+ connect(this,TQT_SIGNAL(signalClientJoinedGame(Q_UINT32,KGame *)),
+ this,TQT_SLOT(slotClientConnected(Q_UINT32, KGame *)));
// Debug only
- connect(this,SIGNAL(signalGameOver(int, KPlayer *,KGame *)),
- this,SLOT(slotGameOver(int, KPlayer *,KGame *)));
+ connect(this,TQT_SIGNAL(signalGameOver(int, KPlayer *,KGame *)),
+ this,TQT_SLOT(slotGameOver(int, KPlayer *,KGame *)));
// Change global KGame policy
//dataHandler()->setPolicy(KGamePropertyBase::PolicyDirty,false);
@@ -232,7 +232,7 @@ void Kwin4Doc::EndGame(TABLE mode)
// switch start player
}
-void Kwin4Doc::moveDone(QCanvasItem *item,int )
+void Kwin4Doc::moveDone(TQCanvasItem *item,int )
{
//kdDebug(12010) << "########################## SPRITE MOVE DONE ################# " << endl;
//Debug();
@@ -398,14 +398,14 @@ bool Kwin4Doc::RedoMove(){
/**
* Set the name of col
*/
-void Kwin4Doc::SetName(FARBE i, const QString &n){
+void Kwin4Doc::SetName(FARBE i, const TQString &n){
getPlayer(i)->setName(n);
}
/**
* Query the name of i
*/
-QString Kwin4Doc::QueryName(FARBE i){
+TQString Kwin4Doc::QueryName(FARBE i){
return getPlayer(i)->name();
}
@@ -777,24 +777,24 @@ int Kwin4Doc::QueryHistoryCnt()
/**
* Return the name of the computer player process
*/
-QString Kwin4Doc::QueryProcessName()
+TQString Kwin4Doc::QueryProcessName()
{
// First try a local dir override
- QDir dir;
- QString filename=dir.path()+QString("/kwin4/kwin4proc");
- QFile flocal(filename);
+ TQDir dir;
+ TQString filename=dir.path()+TQString("/kwin4/kwin4proc");
+ TQFile flocal(filename);
if (flocal.exists())
{
if (global_debug>1) kdDebug(12010) << " Found local process " << filename << endl;
return filename;
}
- QString path=kapp->dirs()->findExe("kwin4proc");
+ TQString path=kapp->dirs()->findExe("kwin4proc");
if (!path.isNull())
{
if (global_debug>1) kdDebug(12010) << " Found system process " << path << endl;
return path;
}
- QString empty;
+ TQString empty;
kdError() << "Could not locate the computer player" << endl;
return empty;
}
@@ -813,8 +813,8 @@ KPlayer *Kwin4Doc::createPlayer(int /*rtti*/,int io,bool isvirtual)
if (!isvirtual)
createIO(player,(KGameIO::IOMode)io);
- connect(player,SIGNAL(signalPropertyChanged(KGamePropertyBase *, KPlayer *)),
- this,SLOT(slotPlayerPropertyChanged(KGamePropertyBase *, KPlayer *)));
+ connect(player,TQT_SIGNAL(signalPropertyChanged(KGamePropertyBase *, KPlayer *)),
+ this,TQT_SLOT(slotPlayerPropertyChanged(KGamePropertyBase *, KPlayer *)));
((Kwin4Player *)player)->setWidget(pView->statusWidget());
return player;
}
@@ -823,12 +823,12 @@ KPlayer *Kwin4Doc::createPlayer(int /*rtti*/,int io,bool isvirtual)
* Called when a player input is received from the KGame object
* this is e-.g. a mouse event
*/
-bool Kwin4Doc::playerInput(QDataStream &msg, KPlayer * /*player*/)
+bool Kwin4Doc::playerInput(TQDataStream &msg, KPlayer * /*player*/)
{
int move, pl;
msg >> pl >> move;
if (!Move(move,pl))
- QTimer::singleShot(0, this,SLOT(slotRepeatMove()));
+ TQTimer::singleShot(0, this,TQT_SLOT(slotRepeatMove()));
return false;
}
@@ -907,24 +907,24 @@ void Kwin4Doc::createIO(KPlayer *player,KGameIO::IOMode io)
input=new KGameMouseIO(pView);
if (global_debug>1) kdDebug(12010) << "MOUSE IO added " << endl;
// Connect mouse input to a function to process the actual input
- connect(input,SIGNAL(signalMouseEvent(KGameIO *,QDataStream &,QMouseEvent *,bool *)),
- pView,SLOT(slotMouseInput(KGameIO *,QDataStream &,QMouseEvent *,bool *)));
+ connect(input,TQT_SIGNAL(signalMouseEvent(KGameIO *,TQDataStream &,TQMouseEvent *,bool *)),
+ pView,TQT_SLOT(slotMouseInput(KGameIO *,TQDataStream &,TQMouseEvent *,bool *)));
player->addGameIO(input);
}
else if (io&KGameIO::ProcessIO)
{
- QString file=QueryProcessName();
+ TQString file=QueryProcessName();
if (global_debug>1) kdDebug(12010) << "Creating PROCESS IO " << file << endl;
KGameProcessIO *input;
// We want a computer player
input=new KGameProcessIO(file);
// Connect computer player to the setTurn
- connect(input,SIGNAL(signalPrepareTurn(QDataStream &,bool,KGameIO *,bool *)),
- this,SLOT(slotPrepareTurn(QDataStream &,bool,KGameIO *,bool *)));
+ connect(input,TQT_SIGNAL(signalPrepareTurn(TQDataStream &,bool,KGameIO *,bool *)),
+ this,TQT_SLOT(slotPrepareTurn(TQDataStream &,bool,KGameIO *,bool *)));
- connect(input,SIGNAL(signalProcessQuery(QDataStream &,KGameProcessIO *)),
- this,SLOT(slotProcessQuery(QDataStream &,KGameProcessIO *)));
+ connect(input,TQT_SIGNAL(signalProcessQuery(TQDataStream &,KGameProcessIO *)),
+ this,TQT_SLOT(slotProcessQuery(TQDataStream &,KGameProcessIO *)));
player->addGameIO(input);
}
else if (io&KGameIO::KeyIO)
@@ -934,8 +934,8 @@ void Kwin4Doc::createIO(KPlayer *player,KGameIO::IOMode io)
KGameKeyIO *input;
input=new KGameKeyIO(pView->parentWidget());
// Connect keys input to a function to process the actual input
- connect((KGameKeyIO *)input,SIGNAL(signalKeyEvent(KGameIO *,QDataStream &,QKeyEvent *,bool *)),
- pView,SLOT(slotKeyInput(KGameIO *,QDataStream &,QKeyEvent *,bool *)));
+ connect((KGameKeyIO *)input,TQT_SIGNAL(signalKeyEvent(KGameIO *,TQDataStream &,TQKeyEvent *,bool *)),
+ pView,TQT_SLOT(slotKeyInput(KGameIO *,TQDataStream &,TQKeyEvent *,bool *)));
player->addGameIO(input);
}
}
@@ -943,7 +943,7 @@ void Kwin4Doc::createIO(KPlayer *player,KGameIO::IOMode io)
/**
* This slot is called when a computer move should be generated
*/
-void Kwin4Doc::slotPrepareTurn(QDataStream &stream,bool b,KGameIO *input,bool *sendit)
+void Kwin4Doc::slotPrepareTurn(TQDataStream &stream,bool b,KGameIO *input,bool *sendit)
{
if (global_debug>1)
kdDebug(12010) << " Kwin4Doc::slotPrepareTurn b="<<b << endl;
@@ -968,7 +968,7 @@ void Kwin4Doc::slotPrepareTurn(QDataStream &stream,bool b,KGameIO *input,bool *s
* Careful: The data needs to be the same than the computer
* player reading on the other side
**/
-void Kwin4Doc::prepareGameMessage(QDataStream &stream, Q_INT32 pl)
+void Kwin4Doc::prepareGameMessage(TQDataStream &stream, Q_INT32 pl)
{
if (global_debug>1) kdDebug(12010) << " sending col=" << pl << endl;
stream << pl ;
@@ -1000,7 +1000,7 @@ void Kwin4Doc::prepareGameMessage(QDataStream &stream, Q_INT32 pl)
stream << (Q_INT32)421256;
}
-void Kwin4Doc::slotProcessQuery(QDataStream &in,KGameProcessIO * /*me*/)
+void Kwin4Doc::slotProcessQuery(TQDataStream &in,KGameProcessIO * /*me*/)
{
Q_INT8 cid;
in >> cid;
@@ -1098,18 +1098,18 @@ void Kwin4Doc::calcHint()
// We allocate the hint process only if it is needed
if (!mHintProcess)
{
- QString file=QueryProcessName();
+ TQString file=QueryProcessName();
if (global_debug>1) kdDebug(12010) << "Creating HINT PROCESS IO " << endl;
// We want a computer player
mHintProcess=new KGameProcessIO(file);
- connect(mHintProcess,SIGNAL(signalProcessQuery(QDataStream &,KGameProcessIO *)),
- this,SLOT(slotProcessHint(QDataStream &,KGameProcessIO *)));
+ connect(mHintProcess,TQT_SIGNAL(signalProcessQuery(TQDataStream &,KGameProcessIO *)),
+ this,TQT_SLOT(slotProcessHint(TQDataStream &,KGameProcessIO *)));
}
Q_INT32 pl;
- QByteArray buffer;
- QDataStream stream(buffer,IO_WriteOnly);
+ TQByteArray buffer;
+ TQDataStream stream(buffer,IO_WriteOnly);
pl=QueryCurrentPlayer();
prepareGameMessage(stream,pl);
mHintProcess->sendMessage(stream,2,0,gameId());
@@ -1119,7 +1119,7 @@ void Kwin4Doc::calcHint()
* The compute rprocess sent a hint which we show in the
* game board
**/
-void Kwin4Doc::slotProcessHint(QDataStream &in,KGameProcessIO * /*me*/)
+void Kwin4Doc::slotProcessHint(TQDataStream &in,KGameProcessIO * /*me*/)
{
Q_INT8 cid;
in >> cid;
@@ -1223,7 +1223,7 @@ void Kwin4Doc::slotGameOver(int status, KPlayer * p, KGame * /*me*/)
* when a game is loaded. This can either be via a networ
* connect or via a real load from file
**/
-bool Kwin4Doc::loadgame(QDataStream &stream,bool network,bool reset)
+bool Kwin4Doc::loadgame(TQDataStream &stream,bool network,bool reset)
{
if (global_debug>1)
kdDebug () << "loadgame() network=" << network << " reset="<< reset << endl;
@@ -1273,7 +1273,7 @@ bool Kwin4Doc::loadgame(QDataStream &stream,bool network,bool reset)
* what is local
* This function is only called in the Admin.
*/
-void Kwin4Doc::newPlayersJoin(KGamePlayerList * /*oldList*/,KGamePlayerList *newList,QValueList<int> &inactivate)
+void Kwin4Doc::newPlayersJoin(KGamePlayerList * /*oldList*/,KGamePlayerList *newList,TQValueList<int> &inactivate)
{
if (global_debug>1)
kdDebug(12010) << "newPlayersJoin: START"<<endl;
diff --git a/kwin4/kwin4/kwin4doc.h b/kwin4/kwin4/kwin4doc.h
index 9ab2b55a..7679dc05 100644
--- a/kwin4/kwin4/kwin4doc.h
+++ b/kwin4/kwin4/kwin4doc.h
@@ -50,7 +50,7 @@ class Kwin4Doc : public KGame
Q_OBJECT
public:
- Kwin4Doc(QWidget *parent, const char *name=0);
+ Kwin4Doc(TQWidget *parent, const char *name=0);
~Kwin4Doc();
/** adds a view to the document which represents the document contents. Usually this is your main view. */
@@ -58,7 +58,7 @@ public:
/** initializes the players */
void initPlayers();
/** saves the document under filename and format.*/
- bool loadgame(QDataStream &stream, bool network, bool reset);
+ bool loadgame(TQDataStream &stream, bool network, bool reset);
int QueryLastHint();
int QueryHeight(int x);
@@ -67,8 +67,8 @@ public:
int CheckGameOver(int x, FARBE col);
FARBE QueryPlayerColour(int player);
int QueryStat(FARBE i, TABLE mode);
- QString QueryName(FARBE i);
- void SetName(FARBE i, const QString &n);
+ TQString QueryName(FARBE i);
+ void SetName(FARBE i, const TQString &n);
/**
* Set and query the IO mode of player Gelb/Rot
@@ -112,21 +112,21 @@ public:
void SetCurrentMove(int ); // 0..42
int QueryMaxMove(); // 0..42
int QueryHistoryCnt(); // 0..42
- QString QueryProcessName();
+ TQString QueryProcessName();
KPlayer *createPlayer(int rtti, int io, bool isvirtual);
KPlayer * nextPlayer(KPlayer *last, bool exclusive=true);
- void newPlayersJoin(KGamePlayerList *,KGamePlayerList *,QValueList<int> &);
+ void newPlayersJoin(KGamePlayerList *,KGamePlayerList *,TQValueList<int> &);
protected:
bool Move(int x,int id);
/** Check whether the field has a game over situation */
int checkGameOver(KPlayer *);
/** Send to the computer player */
- void prepareGameMessage(QDataStream &stream, Q_INT32 pl);
+ void prepareGameMessage(TQDataStream &stream, Q_INT32 pl);
/** Main function to do player input */
- bool playerInput(QDataStream &msg,KPlayer *player);
+ bool playerInput(TQDataStream &msg,KPlayer *player);
/** Set the IO devices new */
void recalcIO();
/** Set the turn of the current player to true */
@@ -138,12 +138,12 @@ public slots:
void slotPropertyChanged(KGamePropertyBase *,KGame *);
void slotPlayerPropertyChanged(KGamePropertyBase *,KPlayer *);
- void moveDone(QCanvasItem *,int);
+ void moveDone(TQCanvasItem *,int);
void slotMessageUpdate(int,Q_UINT32,Q_UINT32);
- void slotPrepareTurn(QDataStream &stream,bool b,KGameIO *input,bool *eatevent);
+ void slotPrepareTurn(TQDataStream &stream,bool b,KGameIO *input,bool *eatevent);
void slotClientConnected(Q_UINT32,KGame *);
- void slotProcessQuery(QDataStream &,KGameProcessIO *);
- void slotProcessHint(QDataStream &,KGameProcessIO *);
+ void slotProcessQuery(TQDataStream &,KGameProcessIO *);
+ void slotProcessHint(TQDataStream &,KGameProcessIO *);
void slotGameOver(int status, KPlayer * p, KGame * me);
void slotRepeatMove();
void loadSettings();
diff --git a/kwin4/kwin4/kwin4player.cpp b/kwin4/kwin4/kwin4player.cpp
index 65a7947c..5c35d0c6 100644
--- a/kwin4/kwin4/kwin4player.cpp
+++ b/kwin4/kwin4/kwin4player.cpp
@@ -27,24 +27,24 @@
Kwin4Player::Kwin4Player() : KPlayer(), sWidget(0)
{
int id;
- id=mWin.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,QString("mWin"));
- id=mRemis.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,QString("mRemis"));
- id=mLost.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,QString("mLost"));
- id=mBrk.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,QString("mBrk"));
- id=mAllWin.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,QString("mAllWin"));
- id=mAllRemis.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,QString("mAllRemis"));
- id=mAllLost.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,QString("mAllLost"));
- id=mAllBrk.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,QString("mAllBrk"));
+ id=mWin.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mWin"));
+ id=mRemis.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mRemis"));
+ id=mLost.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mLost"));
+ id=mBrk.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mBrk"));
+ id=mAllWin.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mAllWin"));
+ id=mAllRemis.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mAllRemis"));
+ id=mAllLost.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mAllLost"));
+ id=mAllBrk.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mAllBrk"));
dataHandler()->setPolicy(KGamePropertyBase::PolicyDirty,false);
resetStats();
- connect(this,SIGNAL(signalPropertyChanged(KGamePropertyBase *,KPlayer *)),
- this,SLOT(slotPlayerPropertyChanged(KGamePropertyBase *,KPlayer *)));
+ connect(this,TQT_SIGNAL(signalPropertyChanged(KGamePropertyBase *,KPlayer *)),
+ this,TQT_SLOT(slotPlayerPropertyChanged(KGamePropertyBase *,KPlayer *)));
}
-#include <qlabel.h>
-#include <qlcdnumber.h>
+#include <tqlabel.h>
+#include <tqlcdnumber.h>
void Kwin4Player::slotPlayerPropertyChanged(KGamePropertyBase *prop, KPlayer * /*player*/)
{
diff --git a/kwin4/kwin4/kwin4proc.cpp b/kwin4/kwin4/kwin4proc.cpp
index 604600ec..6a655f25 100644
--- a/kwin4/kwin4/kwin4proc.cpp
+++ b/kwin4/kwin4/kwin4proc.cpp
@@ -38,7 +38,7 @@
#define START_REK 1 // (0) 1:Nur Stellungsbewertung bei Level 1
// 0:Level 1 schon eine Rekursion
-KComputer::KComputer() : QObject(0,0)
+KComputer::KComputer() : TQObject(0,0)
{
InitField();
@@ -51,31 +51,31 @@ KComputer::KComputer() : QObject(0,0)
for (i=0;i<strlen(s2);i++)
startofrow[i]=s2[i]-'0';
- connect(&proc,SIGNAL(signalCommand(QDataStream &,int ,int ,int )),
- this,SLOT(slotCommand(QDataStream & ,int ,int ,int )));
- connect(&proc,SIGNAL(signalInit(QDataStream &,int)),
- this,SLOT(slotInit(QDataStream & ,int )));
- connect(&proc,SIGNAL(signalTurn(QDataStream &,bool )),
- this,SLOT(slotTurn(QDataStream & ,bool )));
+ connect(&proc,TQT_SIGNAL(signalCommand(TQDataStream &,int ,int ,int )),
+ this,TQT_SLOT(slotCommand(TQDataStream & ,int ,int ,int )));
+ connect(&proc,TQT_SIGNAL(signalInit(TQDataStream &,int)),
+ this,TQT_SLOT(slotInit(TQDataStream & ,int )));
+ connect(&proc,TQT_SIGNAL(signalTurn(TQDataStream &,bool )),
+ this,TQT_SLOT(slotTurn(TQDataStream & ,bool )));
fprintf(stderr, "----------------->\nKComputer::Computer\n");
}
-void KComputer::slotInit(QDataStream &in,int id)
+void KComputer::slotInit(TQDataStream &in,int id)
{
fprintf(stderr,"----------------->\nKComputer::slotInit\nid:%d\n",id);
/*
- QByteArray buffer;
- QDataStream out(buffer,IO_WriteOnly);
+ TQByteArray buffer;
+ TQDataStream out(buffer,IO_WriteOnly);
int msgid=KGameMessage::IdProcessQuery;
out << (int)1;
proc.sendSystemMessage(out,msgid,0);
*/
}
-void KComputer::slotTurn(QDataStream &in,bool turn)
+void KComputer::slotTurn(TQDataStream &in,bool turn)
{
- QByteArray buffer;
- QDataStream out(buffer,IO_WriteOnly);
+ TQByteArray buffer;
+ TQDataStream out(buffer,IO_WriteOnly);
fprintf(stderr,"----------------->\nKComputer::slotTurn\nturn:%d\n",turn);
if (turn)
{
@@ -91,13 +91,13 @@ void KComputer::sendValue(long value)
{
Q_INT8 cid=1; // notifies our KGameIO that this is a value message
int id=KGameMessage::IdProcessQuery;
- QByteArray buffer;
- QDataStream out(buffer,IO_WriteOnly);
+ TQByteArray buffer;
+ TQDataStream out(buffer,IO_WriteOnly);
out << cid << value;
proc.sendSystemMessage(out,id,0);
}
-long KComputer::think(QDataStream &in,QDataStream &out,bool hint)
+long KComputer::think(TQDataStream &in,TQDataStream &out,bool hint)
{
Q_INT32 pl;
Q_INT32 move;
@@ -174,11 +174,11 @@ long KComputer::think(QDataStream &in,QDataStream &out,bool hint)
return aktwert;
}
-void KComputer::slotCommand(QDataStream &in,int msgid,int receiver,int sender)
+void KComputer::slotCommand(TQDataStream &in,int msgid,int receiver,int sender)
{
fprintf(stderr,"----------------->\nKComputer::slotCommand\nMsgid:%d\n",msgid);
- QByteArray buffer;
- QDataStream out(buffer,IO_WriteOnly);
+ TQByteArray buffer;
+ TQDataStream out(buffer,IO_WriteOnly);
switch(msgid)
{
case 2: // hint
diff --git a/kwin4/kwin4/kwin4proc.h b/kwin4/kwin4/kwin4proc.h
index b865b5cb..d18f5bf3 100644
--- a/kwin4/kwin4/kwin4proc.h
+++ b/kwin4/kwin4/kwin4proc.h
@@ -39,14 +39,14 @@ public:
KGameProcess proc;
public slots:
- void slotCommand(QDataStream &, int msgid,int receiver,int sender);
- void slotInit(QDataStream &, int id);
- void slotTurn(QDataStream &, bool turn);
+ void slotCommand(TQDataStream &, int msgid,int receiver,int sender);
+ void slotInit(TQDataStream &, int id);
+ void slotTurn(TQDataStream &, bool turn);
protected:
void sendValue(long value);
long random(long max);
- long think(QDataStream &in,QDataStream &out,bool hint);
+ long think(TQDataStream &in,TQDataStream &out,bool hint);
// Old computer stuff
Farbe SwitchPlayer(Farbe amZug=Niemand);
diff --git a/kwin4/kwin4/kwin4view.cpp b/kwin4/kwin4/kwin4view.cpp
index 20d83dee..1a3e11f9 100644
--- a/kwin4/kwin4/kwin4view.cpp
+++ b/kwin4/kwin4/kwin4view.cpp
@@ -30,15 +30,15 @@
#include "statuswidget.h"
#include "kspritecache.h"
-#include <qlabel.h>
-#include <qlcdnumber.h>
+#include <tqlabel.h>
+#include <tqlcdnumber.h>
-#define COL_STATUSLIGHT QColor(210,210,255)
-#define COL_STATUSFIELD QColor(130,130,255)
-#define COL_STATUSDARK QColor(0,0,65)
+#define COL_STATUSLIGHT TQColor(210,210,255)
+#define COL_STATUSFIELD TQColor(130,130,255)
+#define COL_STATUSDARK TQColor(0,0,65)
#define COL_STATUSBORDER black
-#define COL_PLAYER QColor(255,255,0)
+#define COL_PLAYER TQColor(255,255,0)
#define COL_RED red
#define COL_YELLOW yellow
@@ -101,15 +101,15 @@ private:
};
-Kwin4View::Kwin4View(Kwin4Doc *theDoc, QWidget *parent, const char *name)
- : QCanvasView(0,parent, name), doc(theDoc)
+Kwin4View::Kwin4View(Kwin4Doc *theDoc, TQWidget *parent, const char *name)
+ : TQCanvasView(0,parent, name), doc(theDoc)
{
mLastArrow=-1;
// localise data file
- QString file="kwin4/grafix/default/grafix.rc";
- QString mGrafix=kapp->dirs()->findResourceDir("data",file);
+ TQString file="kwin4/grafix/default/grafix.rc";
+ TQString mGrafix=kapp->dirs()->findResourceDir("data",file);
if (mGrafix.isNull())
mGrafix="grafix/default/";
else
@@ -127,19 +127,19 @@ Kwin4View::Kwin4View(Kwin4Doc *theDoc, QWidget *parent, const char *name)
setHScrollBarMode(AlwaysOff);
//setBackgroundMode(PaletteBase);
- setBackgroundColor(QColor(0,0,128));
+ setBackgroundColor(TQColor(0,0,128));
- mCanvas=new QCanvas(parent);
+ mCanvas=new TQCanvas(parent);
mCanvas->resize(parent->width(),parent->height());
mCanvas->setDoubleBuffering(true);
- mCanvas->setBackgroundColor(QColor(0,0,128));
+ mCanvas->setBackgroundColor(TQColor(0,0,128));
setCanvas(mCanvas);
mCache=new KSpriteCache(mGrafix,this);
mCache->setCanvas(mCanvas);
KConfig *config=mCache->config();
- QPoint pnt;
+ TQPoint pnt;
config->setGroup("game");
pnt=config->readPointEntry("scorewidget");
@@ -150,10 +150,10 @@ Kwin4View::Kwin4View(Kwin4Doc *theDoc, QWidget *parent, const char *name)
pnt=config->readPointEntry("statuswidget");
mStatusWidget=new StatusWidget(this);
mStatusWidget->move(pnt);
- QPalette pal;
- pal.setColor(QColorGroup::Light, COL_STATUSLIGHT);
- pal.setColor(QColorGroup::Mid, COL_STATUSFIELD);
- pal.setColor(QColorGroup::Dark, COL_STATUSDARK);
+ TQPalette pal;
+ pal.setColor(TQColorGroup::Light, COL_STATUSLIGHT);
+ pal.setColor(TQColorGroup::Mid, COL_STATUSFIELD);
+ pal.setColor(TQColorGroup::Dark, COL_STATUSDARK);
mStatusWidget->setPalette(pal);
mStatusWidget->setBackgroundColor(COL_STATUSFIELD);
@@ -198,11 +198,11 @@ void Kwin4View::initView(bool deleteall)
mSpreadY=config->readNumEntry("spread_y",0);
//kdDebug(12010) << "Spread : x=" << mSpreadX << " y=" << mSpreadY << endl;
- QPixmap *pixmap=loadPixmap("background.png");
+ TQPixmap *pixmap=loadPixmap("background.png");
if (pixmap)
mCanvas->setBackgroundPixmap(*pixmap);
else
- mCanvas->setBackgroundColor(QColor(0,0,128));
+ mCanvas->setBackgroundColor(TQColor(0,0,128));
delete pixmap;
if (doc->gameStatus()==KGame::Intro)
@@ -249,7 +249,7 @@ void Kwin4View::initView(bool deleteall)
clearError();
}
-QPixmap *Kwin4View::loadPixmap(QString name)
+TQPixmap *Kwin4View::loadPixmap(TQString name)
{
if (!mCache)
return 0;
@@ -316,12 +316,12 @@ void Kwin4View::hideIntro()
sprite=(KSprite *)(mCache->getItem("win4about",2));
if (sprite) sprite->hide();
- QCanvasText *text;
- text=(QCanvasText *)(mCache->getItem("intro1",1));
+ TQCanvasText *text;
+ text=(TQCanvasText *)(mCache->getItem("intro1",1));
if (text) text->hide();
- text=(QCanvasText *)(mCache->getItem("intro2",1));
+ text=(TQCanvasText *)(mCache->getItem("intro2",1));
if (text) text->hide();
- text=(QCanvasText *)(mCache->getItem("intro3",1));
+ text=(TQCanvasText *)(mCache->getItem("intro3",1));
if (text) text->hide();
}
@@ -343,20 +343,20 @@ void Kwin4View::drawIntro(bool /*remove*/)
sprite->show();
}
- QCanvasText *text;
- text=(QCanvasText *)(mCache->getItem("intro1",1));
+ TQCanvasText *text;
+ text=(TQCanvasText *)(mCache->getItem("intro1",1));
if (text)
{
text->setText(i18n("1. intro line, welcome to win4","Welcome"));
text->show();
}
- text=(QCanvasText *)(mCache->getItem("intro2",1));
+ text=(TQCanvasText *)(mCache->getItem("intro2",1));
if (text)
{
text->setText(i18n("2. intro line, welcome to win4","to"));
text->show();
}
- text=(QCanvasText *)(mCache->getItem("intro3",1));
+ text=(TQCanvasText *)(mCache->getItem("intro3",1));
if (text)
{
text->setText(i18n("3. intro line, welcome to win4","KWin4"));
@@ -371,8 +371,8 @@ void Kwin4View::drawIntro(bool /*remove*/)
if (sprite)
{
KIntroMove *move=new KIntroMove;
- connect(sprite->createNotify(),SIGNAL(signalNotify(QCanvasItem *,int)),
- this,SLOT(introMoveDone(QCanvasItem *,int)));
+ connect(sprite->createNotify(),TQT_SIGNAL(signalNotify(TQCanvasItem *,int)),
+ this,TQT_SLOT(introMoveDone(TQCanvasItem *,int)));
sprite->setMoveObject(move);
if (no%2==0)
{
@@ -402,7 +402,7 @@ void Kwin4View::drawIntro(bool /*remove*/)
/**
* received after the movment of an intro sprite is finished
**/
-void Kwin4View::introMoveDone(QCanvasItem *item,int )
+void Kwin4View::introMoveDone(TQCanvasItem *item,int )
{
KSprite *sprite=(KSprite *)item;
sprite->deleteNotify();
@@ -531,8 +531,8 @@ void Kwin4View::setPiece(int x,int y,int color,int no,bool animation)
mBoardY-sprite->height()-mSpreadY);
sprite->moveTo(sprite->x(),
sprite->y()+y*(sprite->height()+mSpreadY)+mBoardY);
- connect(sprite->createNotify(),SIGNAL(signalNotify(QCanvasItem *,int)),
- doc,SLOT(moveDone(QCanvasItem *,int)));
+ connect(sprite->createNotify(),TQT_SIGNAL(signalNotify(TQCanvasItem *,int)),
+ doc,TQT_SLOT(moveDone(TQCanvasItem *,int)));
}
else
{
@@ -541,8 +541,8 @@ void Kwin4View::setPiece(int x,int y,int color,int no,bool animation)
y*(sprite->height()+mSpreadY)+mBoardY);
// Prevent moving (== speed =0)
sprite->moveTo(sprite->x(),sprite->y());
- connect(sprite->createNotify(),SIGNAL(signalNotify(QCanvasItem *,int)),
- doc,SLOT(moveDone(QCanvasItem *,int)));
+ connect(sprite->createNotify(),TQT_SIGNAL(signalNotify(TQCanvasItem *,int)),
+ doc,TQT_SLOT(moveDone(TQCanvasItem *,int)));
sprite->emitNotify(3);
}
@@ -600,16 +600,16 @@ bool Kwin4View::wrongPlayer(KPlayer *player,KGameIO::IOMode io)
clearError();
int rnd=(kapp->random()%4) +1;
- QString m;
- m=QString("text%1").arg(rnd);
- QString ms;
+ TQString m;
+ m=TQString("text%1").arg(rnd);
+ TQString ms;
if (rnd==1) ms=i18n("Hold on... the other player has not been yet...");
else if (rnd==2) ms=i18n("Hold your horses...");
else if (rnd==3) ms=i18n("Ah ah ah... only one go at a time...");
else ms=i18n("Please wait... it is not your turn.");
// TODO MH can be unique
- QCanvasText *text=(QCanvasText *)(mCache->getItem(m,1));
+ TQCanvasText *text=(TQCanvasText *)(mCache->getItem(m,1));
if (text)
{
text->setText(ms);
@@ -624,7 +624,7 @@ bool Kwin4View::wrongPlayer(KPlayer *player,KGameIO::IOMode io)
**/
// This is analogous to the mouse event only it is called when a key is
// pressed
-void Kwin4View::slotKeyInput(KGameIO *input,QDataStream &stream,QKeyEvent *e,bool *eatevent)
+void Kwin4View::slotKeyInput(KGameIO *input,TQDataStream &stream,TQKeyEvent *e,bool *eatevent)
{
// Ignore non running
if (!doc->isRunning())
@@ -632,7 +632,7 @@ void Kwin4View::slotKeyInput(KGameIO *input,QDataStream &stream,QKeyEvent *e,boo
// kdDebug(12010) << "KEY EVENT" << e->ascii() << endl;
// Ignore non key press
- if (e->type() != QEvent::KeyPress) return ;
+ if (e->type() != TQEvent::KeyPress) return ;
// Our player
KPlayer *player=input->player();
@@ -661,14 +661,14 @@ void Kwin4View::slotKeyInput(KGameIO *input,QDataStream &stream,QKeyEvent *e,boo
* This slot is called when a mouse key is pressed. As the mouse is used as
* input for all players
* this slot is called to generate a player move out of a mouse input, i.e.
- * it converts a QMouseEvent into a move for the game. We do here some
+ * it converts a TQMouseEvent into a move for the game. We do here some
* simple nonsense and use the position of the mouse to generate
* moves containing the keycodes
*/
-void Kwin4View::slotMouseInput(KGameIO *input,QDataStream &stream,QMouseEvent *mouse,bool *eatevent)
+void Kwin4View::slotMouseInput(KGameIO *input,TQDataStream &stream,TQMouseEvent *mouse,bool *eatevent)
{
// Only react to key pressed not released
- if (mouse->type() != QEvent::MouseButtonPress ) return ;
+ if (mouse->type() != TQEvent::MouseButtonPress ) return ;
if (!doc->isRunning())
return;
@@ -683,10 +683,10 @@ void Kwin4View::slotMouseInput(KGameIO *input,QDataStream &stream,QMouseEvent *m
if (mouse->button()!=LeftButton) return ;
//if (!doc->IsRunning()) return ;
- QPoint point;
+ TQPoint point;
int x,y;
- point=mouse->pos() - QPoint(15,40) - QPoint(20,20);
+ point=mouse->pos() - TQPoint(15,40) - TQPoint(20,20);
if (point.x()<0) return ;
x=point.x()/FIELD_SPACING;
@@ -709,19 +709,19 @@ void Kwin4View::slotMouseInput(KGameIO *input,QDataStream &stream,QMouseEvent *m
*/
void Kwin4View::clearError()
{
- QCanvasText *text;
+ TQCanvasText *text;
- text=(QCanvasText *)(mCache->getItem("text1",1));
+ text=(TQCanvasText *)(mCache->getItem("text1",1));
if (text) text->hide();
- text=(QCanvasText *)(mCache->getItem("text2",1));
+ text=(TQCanvasText *)(mCache->getItem("text2",1));
if (text) text->hide();
- text=(QCanvasText *)(mCache->getItem("text3",1));
+ text=(TQCanvasText *)(mCache->getItem("text3",1));
if (text) text->hide();
- text=(QCanvasText *)(mCache->getItem("text4",1));
+ text=(TQCanvasText *)(mCache->getItem("text4",1));
if (text) text->hide();
}
-void Kwin4View::resizeEvent(QResizeEvent *e)
+void Kwin4View::resizeEvent(TQResizeEvent *e)
{
if (mCanvas) mCanvas->resize(e->size().width(),e->size().height());
}
diff --git a/kwin4/kwin4/kwin4view.h b/kwin4/kwin4/kwin4view.h
index 48b60706..775aee1c 100644
--- a/kwin4/kwin4/kwin4view.h
+++ b/kwin4/kwin4/kwin4view.h
@@ -18,7 +18,7 @@
#ifndef KWIN4VIEW_H
#define KWIN4VIEW_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
#include <kgameio.h>
class Kwin4Doc;
@@ -34,7 +34,7 @@ class Kwin4View : public QCanvasView
Q_OBJECT
public:
- Kwin4View(Kwin4Doc *theDoc, QWidget *parent = 0, const char *name=0);
+ Kwin4View(Kwin4Doc *theDoc, TQWidget *parent = 0, const char *name=0);
void initView(bool deleteall=true);
void drawBoard(bool remove=false);
@@ -51,20 +51,20 @@ public:
void EndGame();
public slots:
- void slotMouseInput(KGameIO *input,QDataStream &stream,QMouseEvent *e,bool *eatevent);
- void slotKeyInput(KGameIO *input,QDataStream &stream,QKeyEvent *e,bool *eatevent);
- void introMoveDone(QCanvasItem *item,int mode);
+ void slotMouseInput(KGameIO *input,TQDataStream &stream,TQMouseEvent *e,bool *eatevent);
+ void slotKeyInput(KGameIO *input,TQDataStream &stream,TQKeyEvent *e,bool *eatevent);
+ void introMoveDone(TQCanvasItem *item,int mode);
protected:
- QPixmap *loadPixmap(QString name);
- void resizeEvent(QResizeEvent *e);
+ TQPixmap *loadPixmap(TQString name);
+ void resizeEvent(TQResizeEvent *e);
bool wrongPlayer(KPlayer *player,KGameIO::IOMode io);
private:
Kwin4Doc *doc;
- QCanvas *mCanvas; // our drawing canvas
+ TQCanvas *mCanvas; // our drawing canvas
KSpriteCache *mCache; // The sprite cache
- QString mGrafix; // grafix dir
+ TQString mGrafix; // grafix dir
int mLastArrow; // last drawn arrow
int mLastX; // last piece
diff --git a/kwin4/kwin4/main.cpp b/kwin4/kwin4/main.cpp
index 8f0ddaa5..acf2f551 100644
--- a/kwin4/kwin4/main.cpp
+++ b/kwin4/kwin4/main.cpp
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
if (args->isSet("debug"))
{
- global_debug=QString(args->getOption("debug")).toInt();
+ global_debug=TQString(args->getOption("debug")).toInt();
kdDebug(12010) << "Debug level set to " << global_debug << endl;
}
args->clear();
diff --git a/kwin4/kwin4/scorewidget.cpp b/kwin4/kwin4/scorewidget.cpp
index 7d0586fb..2d2551e8 100644
--- a/kwin4/kwin4/scorewidget.cpp
+++ b/kwin4/kwin4/scorewidget.cpp
@@ -19,22 +19,22 @@
#include "prefs.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qsizepolicy.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqsizepolicy.h>
#include <kdebug.h>
#include <klocale.h>
#define COL_STATUSBORDER black
-#define COL_STATUSFIELD QColor(130,130,255)
-#define COL_STATUSDARK QColor(0,0,65)
-#define COL_STATUSLIGHT QColor(210,210,255)
+#define COL_STATUSFIELD TQColor(130,130,255)
+#define COL_STATUSDARK TQColor(0,0,65)
+#define COL_STATUSLIGHT TQColor(210,210,255)
-ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl )
- : QFrame( parent, name, fl )
+ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl )
+ : TQFrame( parent, name, fl )
{
- setFrameStyle( QFrame::Box | QFrame::Raised );
+ setFrameStyle( TQFrame::Box | TQFrame::Raised );
setLineWidth( 2 );
setMidLineWidth( 4 );
@@ -44,47 +44,47 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl )
int row=0;
setCaption( i18n( "Form1" ) );
- //LayoutB = new QGridLayout( this,4,3,15,5 );
- LayoutB = new QGridLayout( this);
+ //LayoutB = new TQGridLayout( this,4,3,15,5 );
+ LayoutB = new TQGridLayout( this);
LayoutB->setSpacing( 3 );
LayoutB->setMargin( 15 );
- TextLabel7 = new QLabel( this, "TextLabel7" );
+ TextLabel7 = new TQLabel( this, "TextLabel7" );
setPlayer("-----",0);
TextLabel7->setBackgroundColor( COL_STATUSFIELD );
TextLabel7->setAlignment(Qt::AlignHCenter);
LayoutB->addMultiCellWidget( TextLabel7, row, row,0,2 );
row++;
- TextLabel8 = new QLabel( this, "TextLabel8" );
+ TextLabel8 = new TQLabel( this, "TextLabel8" );
TextLabel8->setText( i18n( "vs" ) );
TextLabel8->setBackgroundColor( COL_STATUSFIELD );
TextLabel8->setAlignment(Qt::AlignHCenter);
LayoutB->addMultiCellWidget( TextLabel8, row, row,0,2 );
row++;
- TextLabel9 = new QLabel( this, "TextLabel9" );
+ TextLabel9 = new TQLabel( this, "TextLabel9" );
setPlayer("-----",1);
- // TextLabel9->setFrameShape(QFrame::Box );
+ // TextLabel9->setFrameShape(TQFrame::Box );
// TextLabel9->setLineWidth(5);
TextLabel9->setBackgroundColor( COL_STATUSFIELD );
TextLabel9->setAlignment(Qt::AlignHCenter);
LayoutB->addMultiCellWidget( TextLabel9, row, row,0,2 );
row++;
- QSpacerItem *Spacer2=new QSpacerItem(0,16,QSizePolicy::Preferred,QSizePolicy::Preferred);
+ TQSpacerItem *Spacer2=new TQSpacerItem(0,16,TQSizePolicy::Preferred,TQSizePolicy::Preferred);
LayoutB->addMultiCell( Spacer2, row, row,0,2 );
row++;
- QSpacerItem *Spacer1=new QSpacerItem(25,0,QSizePolicy::Preferred,QSizePolicy::Preferred);
+ TQSpacerItem *Spacer1=new TQSpacerItem(25,0,TQSizePolicy::Preferred,TQSizePolicy::Preferred);
LayoutB->addMultiCell( Spacer1, row, row+2,1,1 );
- TextLabel1 = new QLabel( this, "Level" );
+ TextLabel1 = new TQLabel( this, "Level" );
TextLabel1->setText( i18n( "Level" ) );
TextLabel1->setBackgroundColor( COL_STATUSFIELD );
LayoutB->addWidget( TextLabel1, row, 0 );
- TextLabel4 = new QLabel( this, "L" );
+ TextLabel4 = new TQLabel( this, "L" );
setLevel(Prefs::level());
TextLabel4->setAlignment(Qt::AlignRight);
TextLabel4->setBackgroundColor( COL_STATUSFIELD );
@@ -93,12 +93,12 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl )
row++;
- TextLabel2 = new QLabel( this, "Move" );
+ TextLabel2 = new TQLabel( this, "Move" );
TextLabel2->setText( i18n("number of MOVE in game", "Move" ) );
TextLabel2->setBackgroundColor( COL_STATUSFIELD );
LayoutB->addWidget( TextLabel2, row, 0 );
- TextLabel5 = new QLabel( this, "M" );
+ TextLabel5 = new TQLabel( this, "M" );
setMove(0);
TextLabel5->setAlignment(Qt::AlignRight);
TextLabel5->setBackgroundColor( COL_STATUSFIELD );
@@ -107,12 +107,12 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl )
row++;
- TextLabel3 = new QLabel( this, "Chance" );
+ TextLabel3 = new TQLabel( this, "Chance" );
TextLabel3->setText( i18n( "Chance" ) );
TextLabel3->setBackgroundColor( COL_STATUSFIELD );
LayoutB->addWidget( TextLabel3, row, 0 );
- TextLabel6 = new QLabel( this, "C" );
+ TextLabel6 = new TQLabel( this, "C" );
setChance(0);
TextLabel6->setAlignment(Qt::AlignRight);
TextLabel6->setBackgroundColor( COL_STATUSFIELD );
@@ -120,7 +120,7 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl )
row++;
- QSpacerItem *Spacer3=new QSpacerItem(0,8,QSizePolicy::Preferred,QSizePolicy::Preferred);
+ TQSpacerItem *Spacer3=new TQSpacerItem(0,8,TQSizePolicy::Preferred,TQSizePolicy::Preferred);
LayoutB->addMultiCell( Spacer3, row, row,0,2 );
row++;
@@ -129,31 +129,31 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl )
adjustSize();
}
-void ScoreWidget::paintEvent( QPaintEvent * p)
+void ScoreWidget::paintEvent( TQPaintEvent * p)
{
- QPainter paint( this );
+ TQPainter paint( this );
paint.setClipRect(p->rect());
Paint( &paint, p->rect() );
}
-void ScoreWidget::Paint(QPainter *p,QRect /*cliprect*/)
+void ScoreWidget::Paint(TQPainter *p,TQRect /*cliprect*/)
{
- QPalette pal;
- pal.setColor(QColorGroup::Light, COL_STATUSLIGHT);
- pal.setColor(QColorGroup::Mid, COL_STATUSFIELD);
- pal.setColor(QColorGroup::Dark, COL_STATUSDARK);
+ TQPalette pal;
+ pal.setColor(TQColorGroup::Light, COL_STATUSLIGHT);
+ pal.setColor(TQColorGroup::Mid, COL_STATUSFIELD);
+ pal.setColor(TQColorGroup::Dark, COL_STATUSDARK);
setPalette(pal);
drawFrame(p);
}
void ScoreWidget::setMove(int i)
{
- TextLabel5->setText( QString("%1").arg(i));
+ TextLabel5->setText( TQString("%1").arg(i));
}
void ScoreWidget::setLevel(int i)
{
- TextLabel4->setText( QString("%1").arg(i));
+ TextLabel4->setText( TQString("%1").arg(i));
}
void ScoreWidget::setChance(int i)
@@ -165,10 +165,10 @@ void ScoreWidget::setChance(int i)
else if (i<=-999)
TextLabel6->setText(i18n("Loser"));
else
- TextLabel6->setText(QString("%1").arg(i));
+ TextLabel6->setText(TQString("%1").arg(i));
}
-void ScoreWidget::setPlayer(QString s,int no)
+void ScoreWidget::setPlayer(TQString s,int no)
{
if (no==0) TextLabel7->setText(s);
else TextLabel9->setText(s);
diff --git a/kwin4/kwin4/scorewidget.h b/kwin4/kwin4/scorewidget.h
index 82648b2c..7814467b 100644
--- a/kwin4/kwin4/scorewidget.h
+++ b/kwin4/kwin4/scorewidget.h
@@ -1,7 +1,7 @@
#ifndef _SCOREWIDGET_H
#define _SCOREWIDGET_H
-#include <qframe.h>
+#include <tqframe.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
@@ -13,32 +13,32 @@ class ScoreWidget : public QFrame
Q_OBJECT
public:
- ScoreWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ScoreWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
void setMove(int i);
void setLevel(int i);
void setChance(int i);
- void setPlayer(QString s,int no);
+ void setPlayer(TQString s,int no);
void setTurn(int i);
protected:
- QGroupBox* GroupBox1;
- QLabel* TextLabel4;
- QLabel* TextLabel5;
- QLabel* TextLabel6;
- QLabel* TextLabel1;
- QLabel* TextLabel2;
- QLabel* TextLabel3;
- QLabel* TextLabel7;
- QLabel* TextLabel8;
- QLabel* TextLabel9;
+ TQGroupBox* GroupBox1;
+ TQLabel* TextLabel4;
+ TQLabel* TextLabel5;
+ TQLabel* TextLabel6;
+ TQLabel* TextLabel1;
+ TQLabel* TextLabel2;
+ TQLabel* TextLabel3;
+ TQLabel* TextLabel7;
+ TQLabel* TextLabel8;
+ TQLabel* TextLabel9;
protected:
- void paintEvent( QPaintEvent * );
- void Paint(QPainter *p,QRect rect);
- void drawBorder(QPainter *p,QRect rect,int offset,int width,int mode);
+ void paintEvent( TQPaintEvent * );
+ void Paint(TQPainter *p,TQRect rect);
+ void drawBorder(TQPainter *p,TQRect rect,int offset,int width,int mode);
protected:
- QGridLayout* LayoutB;
+ TQGridLayout* LayoutB;
};
#endif // _SCOREWIDGET_H