summaryrefslogtreecommitdiffstats
path: root/knights/pgn.h
diff options
context:
space:
mode:
Diffstat (limited to 'knights/pgn.h')
-rw-r--r--knights/pgn.h123
1 files changed, 62 insertions, 61 deletions
diff --git a/knights/pgn.h b/knights/pgn.h
index eeff9d8..a2dc58d 100644
--- a/knights/pgn.h
+++ b/knights/pgn.h
@@ -21,13 +21,13 @@
#include <klocale.h>
#include <ktempfile.h>
#include <kio/netaccess.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qpainter.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqpainter.h>
#include "definitions.h"
#include "resource.h"
#include "knightsmap.h"
@@ -40,59 +40,60 @@
typedef struct Annotation
{
int RAV;
- QString text;
+ TQString text;
};
-typedef QValueList<ChessMove> MoveList;
+typedef TQValueList<ChessMove> MoveList;
typedef KnightsMap<int, Annotation*> Annotations;
class tab_pgnView;
-class pgn : public QObject
+class pgn : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/* Standard PGN Tags */
- QString TAG_Event;
- QString TAG_Site;
- QString TAG_Date;
- QString TAG_Round;
- QString TAG_White;
- QString TAG_Black;
- QString TAG_Result;
- QString TAG_EventDate;
- QString TAG_EventSponsor;
- QString TAG_Section;
- QString TAG_Stage;
- QString TAG_Board;
- QString TAG_WhiteTitle;
- QString TAG_WhiteElo;
- QString TAG_WhiteUSCF;
- QString TAG_WhiteNA;
- QString TAG_WhiteType;
- QString TAG_BlackTitle;
- QString TAG_BlackElo;
- QString TAG_BlackUSCF;
- QString TAG_BlackNA;
- QString TAG_BlackType;
- QString TAG_Opening;
- QString TAG_Variation;
- QString TAG_SubVariation;
- QString TAG_ECO;
- QString TAG_NIC;
- QString TAG_Time;
- QString TAG_UTCTime;
- QString TAG_UTCDate;
- QString TAG_TimeControl;
- QString TAG_SetUp;
- QString TAG_FEN;
- QString TAG_Termination;
- QString TAG_Annotator;
- QString TAG_Mode;
- QString TAG_PlyCount;
+ TQString TAG_Event;
+ TQString TAG_Site;
+ TQString TAG_Date;
+ TQString TAG_Round;
+ TQString TAG_White;
+ TQString TAG_Black;
+ TQString TAG_Result;
+ TQString TAG_EventDate;
+ TQString TAG_EventSponsor;
+ TQString TAG_Section;
+ TQString TAG_Stage;
+ TQString TAG_Board;
+ TQString TAG_WhiteTitle;
+ TQString TAG_WhiteElo;
+ TQString TAG_WhiteUSCF;
+ TQString TAG_WhiteNA;
+ TQString TAG_WhiteType;
+ TQString TAG_BlackTitle;
+ TQString TAG_BlackElo;
+ TQString TAG_BlackUSCF;
+ TQString TAG_BlackNA;
+ TQString TAG_BlackType;
+ TQString TAG_Opening;
+ TQString TAG_Variation;
+ TQString TAG_SubVariation;
+ TQString TAG_ECO;
+ TQString TAG_NIC;
+ TQString TAG_Time;
+ TQString TAG_UTCTime;
+ TQString TAG_UTCDate;
+ TQString TAG_TimeControl;
+ TQString TAG_SetUp;
+ TQString TAG_FEN;
+ TQString TAG_Termination;
+ TQString TAG_Annotator;
+ TQString TAG_Mode;
+ TQString TAG_PlyCount;
int File_Position; // Used to scan PGN file
- QStringList Move_Data;
+ TQStringList Move_Data;
/* The match_param */
match_param *Param;
@@ -103,11 +104,11 @@ class pgn : public QObject
TCPList whiteTCP;
TCPList blackTCP;
- QString CurrentURL;
+ TQString CurrentURL;
MoveList Moves;
Annotations RAV;
Annotations annotations;
- QStringList Positions;
+ TQStringList Positions;
unsigned int currentIndex;
pgn( resource *Rsrc=0, match_param *param=NULL );
@@ -116,13 +117,13 @@ class pgn : public QObject
void init( void );
int scan( void );
bool load( const int pos=0 );
- bool save( QString URL );
- bool open( const QString& URL );
+ bool save( TQString URL );
+ bool open( const TQString& URL );
void print( void );
- QStringList* notation( const int format=1 );
+ TQStringList* notation( const int format=1 );
void close( void );
- static QString getNAG( int num );
- QString caption( void );
+ static TQString getNAG( int num );
+ TQString caption( void );
signals:
void processMove( ChessMove );
@@ -136,13 +137,13 @@ class pgn : public QObject
private:
resource *Resource;
tab_pgnView *pgnView;
- QString tempFile;
- QString currentLine;
- QFile File;
- QTextStream Input;
+ TQString tempFile;
+ TQString currentLine;
+ TQFile File;
+ TQTextStream Input;
- QChar getch( void );
- QString getword( void );
+ TQChar getch( void );
+ TQString getword( void );
void clearTags( void );
void parseTag( void );
void parseAnnotation( const int fromRAVnum=0 );