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 --- libkdegames/kgame/kgamepropertyarray.h | 72 +++++++++++++++++----------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'libkdegames/kgame/kgamepropertyarray.h') diff --git a/libkdegames/kgame/kgamepropertyarray.h b/libkdegames/kgame/kgamepropertyarray.h index f91bd75c..0bb1d1a1 100644 --- a/libkdegames/kgame/kgamepropertyarray.h +++ b/libkdegames/kgame/kgamepropertyarray.h @@ -21,7 +21,7 @@ #ifndef __KGAMEPROPERTYARRAY_H_ #define __KGAMEPROPERTYARRAY_H_ -#include +#include #include #include "kgamemessage.h" @@ -30,10 +30,10 @@ template -class KGamePropertyArray : public QMemArray, public KGamePropertyBase +class KGamePropertyArray : public TQMemArray, public KGamePropertyBase { public: - KGamePropertyArray() :QMemArray(), KGamePropertyBase() + KGamePropertyArray() :TQMemArray(), KGamePropertyBase() { //kdDebug(11001) << "KGamePropertyArray init" << endl; } @@ -43,17 +43,17 @@ public: resize(size); } - KGamePropertyArray( const KGamePropertyArray &a ) : QMemArray(a) + KGamePropertyArray( const KGamePropertyArray &a ) : TQMemArray(a) { } bool resize( uint size ) { - if (size!=QMemArray::size()) + if (size!=TQMemArray::size()) { bool a=true; - QByteArray b; - QDataStream s(b, IO_WriteOnly); + TQByteArray b; + TQDataStream s(b, IO_WriteOnly); KGameMessage::createPropertyCommand(s,KGamePropertyBase::IdCommand,id(),CmdResize); s << size ; if (policy()==PolicyClean || policy()==PolicyDirty) @@ -66,7 +66,7 @@ public: if (policy()==PolicyLocal || policy()==PolicyDirty) { extractProperty(b); -// a=QMemArray::resize(size);// FIXME: return value! +// a=TQMemArray::resize(size);// FIXME: return value! } return a; } @@ -75,8 +75,8 @@ public: void setAt(uint i,type data) { - QByteArray b; - QDataStream s(b, IO_WriteOnly); + TQByteArray b; + TQDataStream s(b, IO_WriteOnly); KGameMessage::createPropertyCommand(s,KGamePropertyBase::IdCommand,id(),CmdAt); s << i ; s << data; @@ -96,12 +96,12 @@ public: type at( uint i ) const { - return QMemArray::at(i); + return TQMemArray::at(i); } type operator[]( int i ) const { - return QMemArray::at(i); + return TQMemArray::at(i); } KGamePropertyArray &operator=(const KGamePropertyArray &a) @@ -117,8 +117,8 @@ public: bool fill( const type &data, int size = -1 ) { bool r=true; - QByteArray b; - QDataStream s(b, IO_WriteOnly); + TQByteArray b; + TQDataStream s(b, IO_WriteOnly); KGameMessage::createPropertyCommand(s,KGamePropertyBase::IdCommand,id(),CmdFill); s << data; s << size ; @@ -132,7 +132,7 @@ public: if (policy()==PolicyLocal || policy()==PolicyDirty) { extractProperty(b); -// r=QMemArray::fill(data,size);//FIXME: return value! +// r=TQMemArray::fill(data,size);//FIXME: return value! } return r; } @@ -146,7 +146,7 @@ public: } if (policy()==PolicyLocal || policy()==PolicyDirty) { - QMemArray::assign(a); + TQMemArray::assign(a); } return *this; } @@ -158,7 +158,7 @@ public: } if (policy()==PolicyLocal || policy()==PolicyDirty) { - QMemArray::assign(a,n); + TQMemArray::assign(a,n); } return *this; } @@ -170,7 +170,7 @@ public: } if (policy()==PolicyLocal || policy()==PolicyDirty) { - QMemArray::duplicate(a); + TQMemArray::duplicate(a); } return *this; } @@ -182,7 +182,7 @@ public: } if (policy()==PolicyLocal || policy()==PolicyDirty) { - QMemArray::duplicate(a,n); + TQMemArray::duplicate(a,n); } return *this; } @@ -194,14 +194,14 @@ public: } if (policy()==PolicyLocal || policy()==PolicyDirty) { - QMemArray::setRawData(a,n); + TQMemArray::setRawData(a,n); } return *this; } void sort() { - QByteArray b; - QDataStream s(b, IO_WriteOnly); + TQByteArray b; + TQDataStream s(b, IO_WriteOnly); KGameMessage::createPropertyCommand(s,KGamePropertyBase::IdCommand,id(),CmdSort); if (policy()==PolicyLocal || policy()==PolicyDirty) { @@ -216,30 +216,30 @@ public: } } - void load(QDataStream& s) + void load(TQDataStream& s) { //kdDebug(11001) << "KGamePropertyArray load " << id() << endl; type data; - for (unsigned int i=0; i::size(); i++) + for (unsigned int i=0; i::size(); i++) { s >> data; - QMemArray::at(i)=data; + TQMemArray::at(i)=data; } if (isEmittingSignal()) { emitSignal(); } } - void save(QDataStream &s) + void save(TQDataStream &s) { //kdDebug(11001) << "KGamePropertyArray save "<::size(); i++) + for (unsigned int i=0; i::size(); i++) { s << at(i); } } - void command(QDataStream &s,int cmd,bool) + void command(TQDataStream &s,int cmd,bool) { KGamePropertyBase::command(s, cmd); //kdDebug(11001) << "Array id="<> i >> data; - QMemArray::at(i)=data; + TQMemArray::at(i)=data; //kdDebug(11001) << "CmdAt:id="<