diff options
Diffstat (limited to 'libkdegames/kgame/kgamepropertylist.h')
-rw-r--r-- | libkdegames/kgame/kgamepropertylist.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/libkdegames/kgame/kgamepropertylist.h b/libkdegames/kgame/kgamepropertylist.h index 3a304e70..df8eb604 100644 --- a/libkdegames/kgame/kgamepropertylist.h +++ b/libkdegames/kgame/kgamepropertylist.h @@ -21,7 +21,7 @@ #ifndef __KGAMEPROPERTYLIST_H_ #define __KGAMEPROPERTYLIST_H_ -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdebug.h> @@ -32,20 +32,20 @@ // AB: also see README.LIB! template<class type> -class KGamePropertyList : public QValueList<type>, public KGamePropertyBase +class KGamePropertyList : public TQValueList<type>, public KGamePropertyBase { public: /** * Typedefs */ - typedef QValueListIterator<type> Iterator; - typedef QValueListConstIterator<type> ConstIterator; + typedef TQValueListIterator<type> Iterator; + typedef TQValueListConstIterator<type> ConstIterator; - KGamePropertyList() :QValueList<type>(), KGamePropertyBase() + KGamePropertyList() :TQValueList<type>(), KGamePropertyBase() { } - KGamePropertyList( const KGamePropertyList<type> &a ) : QValueList<type>(a) + KGamePropertyList( const KGamePropertyList<type> &a ) : TQValueList<type>(a) { } @@ -66,10 +66,10 @@ public: Iterator insert( Iterator it, const type& d ) { - it=QValueList<type>::insert(it,d); + it=TQValueList<type>::insert(it,d); - QByteArray b; - QDataStream s(b, IO_WriteOnly); + TQByteArray b; + TQDataStream s(b, IO_WriteOnly); KGameMessage::createPropertyCommand(s,KGamePropertyBase::IdCommand,id(),CmdInsert); int i=findIterator(it); s << i; @@ -92,8 +92,8 @@ public: void append( const type& d ) { - QByteArray b; - QDataStream s(b, IO_WriteOnly); + TQByteArray b; + TQDataStream s(b, IO_WriteOnly); KGameMessage::createPropertyCommand(s,KGamePropertyBase::IdCommand,id(),CmdAppend); s << d; if (policy() == PolicyClean || policy() == PolicyDirty) @@ -111,8 +111,8 @@ public: Iterator erase( Iterator it ) { - QByteArray b; - QDataStream s(b, IO_WriteOnly); + TQByteArray b; + TQDataStream s(b, IO_WriteOnly); KGameMessage::createPropertyCommand(s,KGamePropertyBase::IdCommand,id(),CmdRemove); int i=findIterator(it); s << i; @@ -128,7 +128,7 @@ public: extractProperty(b); } //TODO: return value - is it correct for PolicyLocal|PolicyDirty? -// return QValueList<type>::remove(it); +// return TQValueList<type>::remove(it); return it; } @@ -145,8 +145,8 @@ public: void clear() { - QByteArray b; - QDataStream s(b, IO_WriteOnly); + TQByteArray b; + TQDataStream s(b, IO_WriteOnly); KGameMessage::createPropertyCommand(s,KGamePropertyBase::IdCommand,id(),CmdClear); if (policy() == PolicyClean || policy() == PolicyDirty) { @@ -161,10 +161,10 @@ public: } } - void load(QDataStream& s) + void load(TQDataStream& s) { kdDebug(11001) << "KGamePropertyList load " << id() << endl; - QValueList<type>::clear(); + TQValueList<type>::clear(); uint size; type data; s >> size; @@ -172,12 +172,12 @@ public: for (unsigned int i=0;i<size;i++) { s >> data; - QValueList<type>::append(data); + TQValueList<type>::append(data); } if (isEmittingSignal()) emitSignal(); } - void save(QDataStream &s) + void save(TQDataStream &s) { kdDebug(11001) << "KGamePropertyList save "<<id() << endl; type data; @@ -191,7 +191,7 @@ public: } } - void command(QDataStream &s,int cmd,bool) + void command(TQDataStream &s,int cmd,bool) { KGamePropertyBase::command(s, cmd); kdDebug(11001) << "---> LIST id="<<id()<<" got command ("<<cmd<<") !!!" <<endl; @@ -204,7 +204,7 @@ public: type data; s >> i >> data; it=this->at(i); - QValueList<type>::insert(it,data); + TQValueList<type>::insert(it,data); // kdDebug(11001) << "CmdInsert:id="<<id()<<" i="<<i<<" data="<<data <<endl; if (isEmittingSignal()) emitSignal(); break; @@ -213,7 +213,7 @@ public: { type data; s >> data; - QValueList<type>::append(data); + TQValueList<type>::append(data); // kdDebug(11001) << "CmdAppend:id=" << id() << " data=" << data << endl; if (isEmittingSignal()) emitSignal(); break; @@ -223,14 +223,14 @@ public: uint i; s >> i; it=this->at(i); - QValueList<type>::remove(it); + TQValueList<type>::remove(it); kdDebug(11001) << "CmdRemove:id="<<id()<<" i="<<i <<endl; if (isEmittingSignal()) emitSignal(); break; } case CmdClear: { - QValueList<type>::clear(); + TQValueList<type>::clear(); kdDebug(11001) << "CmdClear:id="<<id()<<endl; if (isEmittingSignal()) emitSignal(); break; @@ -241,11 +241,11 @@ public: } protected: - void extractProperty(const QByteArray& b) + void extractProperty(const TQByteArray& b) // this is called for Policy[Dirty|Local] after putting the stuff into the // stream { - QDataStream s(b, IO_ReadOnly); + TQDataStream s(b, IO_ReadOnly); int cmd; int propId; KGameMessage::extractPropertyHeader(s, propId); |