summaryrefslogtreecommitdiffstats
path: root/libksirtet/lib/types.h
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 /libksirtet/lib/types.h
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 'libksirtet/lib/types.h')
-rw-r--r--libksirtet/lib/types.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/libksirtet/lib/types.h b/libksirtet/lib/types.h
index 2ccdcba0..ee5867fa 100644
--- a/libksirtet/lib/types.h
+++ b/libksirtet/lib/types.h
@@ -1,9 +1,9 @@
#ifndef MTYPES_H
#define MTYPES_H
-#include <qstring.h>
-#include <qbuffer.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqbuffer.h>
+#include <tqvaluelist.h>
#include "miscui.h"
@@ -13,28 +13,28 @@ class cId
{
public:
cId() {}
- cId(const QString &gameName, const QString &gameId);
+ cId(const TQString &gameName, const TQString &gameId);
enum State { Accepted, LibIdClash, GameNameClash, GameIdClash };
void check(const cId &id);
bool accepted() const { return state==Accepted; }
- QString errorMessage(const cId &id) const;
+ TQString errorMessage(const cId &id) const;
- friend QDataStream &operator << (QDataStream &s, const cId &id);
- friend QDataStream &operator >> (QDataStream &s, cId &id);
+ friend TQDataStream &operator << (TQDataStream &s, const cId &id);
+ friend TQDataStream &operator >> (TQDataStream &s, cId &id);
private:
- QString libId, gameName, gameId;
+ TQString libId, gameName, gameId;
State state;
};
-QDataStream &operator << (QDataStream &s, const cId &id);
-QDataStream &operator >> (QDataStream &s, cId &id);
+TQDataStream &operator << (TQDataStream &s, const cId &id);
+TQDataStream &operator >> (TQDataStream &s, cId &id);
/** Flags used for the netmeeting. */
enum MeetingMsgFlag
{ IdFlag = 0, EndFlag, NewFlag, DelFlag, Mod_TextFlag, Mod_TypeFlag, Mod_OptFlag, PlayFlag };
-QDataStream &operator << (QDataStream &s, const MeetingMsgFlag &f);
-QDataStream &operator >> (QDataStream &s, MeetingMsgFlag &f);
+TQDataStream &operator << (TQDataStream &s, const MeetingMsgFlag &f);
+TQDataStream &operator >> (TQDataStream &s, MeetingMsgFlag &f);
/** Internal class : used in netmeeting to transport text line. */
class TextInfo
@@ -43,20 +43,20 @@ class TextInfo
TextInfo() {}
uint i;
- QString text;
+ TQString text;
};
-QDataStream &operator << (QDataStream &s, const TextInfo &ti);
-QDataStream &operator >> (QDataStream &s, TextInfo &ti);
+TQDataStream &operator << (TQDataStream &s, const TextInfo &ti);
+TQDataStream &operator >> (TQDataStream &s, TextInfo &ti);
/** Internal class : used in netmeeting to transport readiness status. */
typedef struct {
uint i;
MeetingCheckBox::Type type;
} TypeInfo;
-QDataStream &operator << (QDataStream &s, const MeetingCheckBox::Type &t);
-QDataStream &operator >> (QDataStream &s, MeetingCheckBox::Type &t);
-QDataStream &operator << (QDataStream &s, const TypeInfo &ti);
-QDataStream &operator >> (QDataStream &s, TypeInfo &ti);
+TQDataStream &operator << (TQDataStream &s, const MeetingCheckBox::Type &t);
+TQDataStream &operator >> (TQDataStream &s, MeetingCheckBox::Type &t);
+TQDataStream &operator << (TQDataStream &s, const TypeInfo &ti);
+TQDataStream &operator >> (TQDataStream &s, TypeInfo &ti);
/* Internal class : store game data. */
class BoardData
@@ -64,27 +64,27 @@ class BoardData
public:
BoardData() {}
- QString name;
+ TQString name;
PlayerComboBox::Type type;
};
-QDataStream &operator <<(QDataStream &, const BoardData &);
-QDataStream &operator >>(QDataStream &, BoardData &);
+TQDataStream &operator <<(TQDataStream &, const BoardData &);
+TQDataStream &operator >>(TQDataStream &, BoardData &);
/* Internal class : store extended game data (used in netmeeting). */
class ExtData
{
public:
ExtData() {}
- ExtData(const QValueList<BoardData> &_bds, const QString &_text,
+ ExtData(const TQValueList<BoardData> &_bds, const TQString &_text,
MeetingCheckBox::Type _type)
: bds(_bds), text(_text), type(_type) {}
- QValueList<BoardData> bds;
- QString text;
+ TQValueList<BoardData> bds;
+ TQString text;
MeetingCheckBox::Type type;
};
-QDataStream &operator << (QDataStream &s, const ExtData &ed);
-QDataStream &operator >> (QDataStream &s, ExtData &ed);
+TQDataStream &operator << (TQDataStream &s, const ExtData &ed);
+TQDataStream &operator >> (TQDataStream &s, ExtData &ed);
/* Internal class : store meeting line data (in netmeeting). */
class MeetingLineData
@@ -95,8 +95,8 @@ class MeetingLineData
ExtData ed;
bool own;
};
-QDataStream &operator << (QDataStream &s, const MeetingLineData &pld);
-QDataStream &operator >> (QDataStream &s, MeetingLineData &pld);
+TQDataStream &operator << (TQDataStream &s, const MeetingLineData &pld);
+TQDataStream &operator >> (TQDataStream &s, MeetingLineData &pld);
/* Internal class : store remote host data. */
class Socket;
@@ -107,7 +107,7 @@ class RemoteHostData
RemoteHostData() : socket(0) {}
Socket *socket;
- QValueList<BoardData> bds;
+ TQValueList<BoardData> bds;
};
/* Internal class : store connection data (used by config. wizard). */
@@ -122,36 +122,36 @@ class ConnectionData
/** Flags used for network communication. */
enum MetaFlag { MF_Ask = 0, MF_Data };
-QDataStream &operator << (QDataStream &s, const MetaFlag &f);
-QDataStream &operator >> (QDataStream &s, MetaFlag &f);
+TQDataStream &operator << (TQDataStream &s, const MetaFlag &f);
+TQDataStream &operator >> (TQDataStream &s, MetaFlag &f);
-/** Internal class : encapsulate read/write QBuffer. */
+/** Internal class : encapsulate read/write TQBuffer. */
class Stream : public QDataStream
{
public:
Stream(int mode);
void clear();
- void setArray(QByteArray a);
+ void setArray(TQByteArray a);
- QByteArray buffer() const { return buf.buffer(); }
+ TQByteArray buffer() const { return buf.buffer(); }
uint size() const { return buf.buffer().size(); }
protected:
- QBuffer buf;
+ TQBuffer buf;
private:
int mode;
};
-/** Internal class : encapsulate write QBuffer. */
+/** Internal class : encapsulate write TQBuffer. */
class WritingStream : public Stream
{
public:
WritingStream() : Stream(IO_WriteOnly) {}
};
-/** Internal class : encapsulate read QBuffer. */
+/** Internal class : encapsulate read TQBuffer. */
class ReadingStream : public Stream
{
public:
@@ -187,11 +187,11 @@ class BufferArray
IOBuffer *operator [](uint i) const { return a[i]; }
private:
- QMemArray<IOBuffer *> a;
+ TQMemArray<IOBuffer *> a;
void clear(uint nb);
};
-QDataStream &operator <<(QDataStream &s, const BufferArray &b);
-QDataStream &operator >>(QDataStream &s, BufferArray &b);
+TQDataStream &operator <<(TQDataStream &s, const BufferArray &b);
+TQDataStream &operator >>(TQDataStream &s, BufferArray &b);
#endif // MTYPES_H