summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 18:28:11 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 18:28:11 +0000
commit9ca7f795653bc31cf1d206da1e12c801a8380fa6 (patch)
treeee829debe9ad76ce8fc3b10cdc376754dba5ed03
parent98cb2d5fa21e616cfea012f80bf1d989cfe264e3 (diff)
downloadknights-9ca7f795.tar.gz
knights-9ca7f795.zip
TQt4 port knights
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knights@1238529 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--knights/Makefile.am2
-rw-r--r--knights/accel.cpp30
-rw-r--r--knights/accel.h7
-rw-r--r--knights/audio.cpp26
-rw-r--r--knights/audio.h4
-rw-r--r--knights/board_2d.cpp116
-rw-r--r--knights/board_2d.h43
-rw-r--r--knights/board_base.cpp2
-rw-r--r--knights/board_base.h7
-rw-r--r--knights/challenge_game.cpp4
-rw-r--r--knights/challenge_game.h10
-rw-r--r--knights/challenge_graph.cpp88
-rw-r--r--knights/challenge_graph.h45
-rw-r--r--knights/challenge_graph_view.cpp40
-rw-r--r--knights/challenge_graph_view.h23
-rw-r--r--knights/challenge_rectangle.cpp4
-rw-r--r--knights/challenge_rectangle.h6
-rw-r--r--knights/chessclock.cpp2
-rw-r--r--knights/chessclock.h13
-rw-r--r--knights/command.cpp6
-rw-r--r--knights/command.h14
-rw-r--r--knights/console.cpp64
-rw-r--r--knights/console.h27
-rw-r--r--knights/core.cpp108
-rw-r--r--knights/core.h25
-rw-r--r--knights/definitions.h22
-rw-r--r--knights/dlg_challenge.cpp76
-rw-r--r--knights/dlg_challenge.h53
-rw-r--r--knights/dlg_engine.cpp54
-rw-r--r--knights/dlg_engine.h33
-rw-r--r--knights/dlg_login.cpp28
-rw-r--r--knights/dlg_login.h37
-rw-r--r--knights/dlg_newmatch.cpp110
-rw-r--r--knights/dlg_newmatch.h87
-rw-r--r--knights/dlg_promote.cpp44
-rw-r--r--knights/dlg_promote.h25
-rw-r--r--knights/dlg_selectemail.cpp12
-rw-r--r--knights/dlg_selectemail.h13
-rw-r--r--knights/dlg_selectengine.cpp40
-rw-r--r--knights/dlg_selectengine.h27
-rw-r--r--knights/dlg_server.cpp82
-rw-r--r--knights/dlg_server.h49
-rw-r--r--knights/dlg_settings.cpp42
-rw-r--r--knights/dlg_settings.h23
-rw-r--r--knights/idmanager.h4
-rw-r--r--knights/io_base.cpp4
-rw-r--r--knights/io_base.h11
-rw-r--r--knights/io_engine.cpp34
-rw-r--r--knights/io_engine.h17
-rw-r--r--knights/io_internet.cpp342
-rw-r--r--knights/io_internet.h49
-rw-r--r--knights/knights.cpp288
-rw-r--r--knights/knights.h43
-rw-r--r--knights/knightsmap.h10
-rw-r--r--knights/knightspixcache.cpp6
-rw-r--r--knights/knightspixcache.h96
-rw-r--r--knights/knightstextview.cpp74
-rw-r--r--knights/knightstextview.h19
-rw-r--r--knights/list_pgn.cpp22
-rw-r--r--knights/list_pgn.h25
-rw-r--r--knights/logic.cpp26
-rw-r--r--knights/logic.h8
-rw-r--r--knights/main.cpp4
-rw-r--r--knights/match.cpp46
-rw-r--r--knights/match.h25
-rw-r--r--knights/match_param.cpp14
-rw-r--r--knights/match_param.h23
-rw-r--r--knights/pgn.cpp152
-rw-r--r--knights/pgn.h123
-rw-r--r--knights/proto_base.cpp2
-rw-r--r--knights/proto_base.h15
-rw-r--r--knights/proto_uci.cpp32
-rw-r--r--knights/proto_uci.h13
-rw-r--r--knights/proto_xboard.cpp106
-rw-r--r--knights/proto_xboard.h9
-rw-r--r--knights/resource.cpp246
-rw-r--r--knights/resource.h150
-rw-r--r--knights/setpageaudio.cpp52
-rw-r--r--knights/setpageaudio.h41
-rw-r--r--knights/setpagedisplay.cpp206
-rw-r--r--knights/setpagedisplay.h99
-rw-r--r--knights/setpageengines.cpp74
-rw-r--r--knights/setpageengines.h39
-rw-r--r--knights/setpagegeneral.cpp84
-rw-r--r--knights/setpagegeneral.h63
-rw-r--r--knights/setpageservers.cpp94
-rw-r--r--knights/setpageservers.h67
-rw-r--r--knights/splash.cpp16
-rw-r--r--knights/splash.h5
-rw-r--r--knights/tab_pgnview.cpp118
-rw-r--r--knights/tab_pgnview.h7
-rw-r--r--knights/tab_seeklist.cpp46
-rw-r--r--knights/tab_seeklist.h29
-rw-r--r--knights/tabbox.cpp74
-rw-r--r--knights/tabbox.h27
-rw-r--r--knights/tabgrip.cpp26
-rw-r--r--knights/tabgrip.h19
-rw-r--r--knights/tabmanager.cpp46
-rw-r--r--knights/tabmanager.h25
-rw-r--r--knights/tabpage.cpp60
-rw-r--r--knights/tabpage.h33
-rw-r--r--knights/thinbuttons.cpp62
-rw-r--r--knights/thinbuttons.h25
-rw-r--r--knights/wiz_setup.cpp116
-rw-r--r--knights/wiz_setup.h85
105 files changed, 2646 insertions, 2603 deletions
diff --git a/knights/Makefile.am b/knights/Makefile.am
index 4bbec46..eefa0e5 100644
--- a/knights/Makefile.am
+++ b/knights/Makefile.am
@@ -4,7 +4,7 @@ bin_PROGRAMS = knights
## INCLUDES were found outside kdevelop specific part
knights_SOURCES = board_2d.cpp board_base.cpp setpagedisplay.cpp proto_xboard.cpp dlg_selectengine.cpp thinbuttons.cpp pgn.cpp io_engine.cpp dlg_challenge.cpp idmanager.cpp challenge_graph.cpp dlg_login.cpp tabgrip.cpp tabpage.cpp tab_seeklist.cpp dlg_engine.cpp setpageaudio.cpp proto_base.cpp dlg_server.cpp core.cpp match_param.cpp knightspixcache.cpp dlg_settings.cpp console.cpp match.cpp setpagegeneral.cpp splash.cpp audio.cpp main.cpp logic.cpp list_pgn.cpp challenge_graph_view.cpp accel.cpp dlg_selectemail.cpp challenge_rectangle.cpp knightstextview.cpp tabmanager.cpp command.cpp dlg_newmatch.cpp chessclock.cpp dlg_promote.cpp resource.cpp tabbox.cpp io_internet.cpp challenge_game.cpp knights.cpp tab_pgnview.cpp io_base.cpp wiz_setup.cpp setpageservers.cpp proto_uci.cpp setpageengines.cpp
-knights_LDADD = -lqt-mt -lartskde -lkio -lkdeprint -lkdeui -lkdecore $(LIBSOCKET)
+knights_LDADD = $(LIB_QT) -lartskde -lkio -lkdeprint -lkdeui -lkdecore $(LIBSOCKET)
EXTRA_DIST = setpageengines.cpp proto_uci.cpp setpageservers.cpp wiz_setup.cpp setpageengines.h io_base.cpp knightsmap.h tab_pgnview.cpp knights.cpp challenge_game.cpp io_internet.cpp challenge_graph_view.h resource.h tabbox.cpp resource.cpp dlg_promote.cpp dlg_server.h pgn.h chessclock.cpp dlg_newmatch.cpp command.h io_internet.h challenge_rectangle.h command.cpp tabmanager.cpp dlg_promote.h definitions.h knightstextview.cpp challenge_rectangle.cpp dlg_selectemail.cpp splash.h list_pgn.h accel.cpp tabmanager.h match.h setpagedisplay.h challenge_graph_view.cpp list_pgn.cpp logic.h logic.cpp knightstextview.h main.cpp audio.cpp splash.cpp setpagegeneral.cpp match.cpp io_base.h console.h idmanager.h dlg_selectemail.h console.cpp tab_pgnview.h knights.h dlg_settings.cpp core.h knightspixcache.cpp thinbuttons.h dlg_settings.h setpageservers.h tab_seeklist.h match_param.cpp core.cpp match_param.h dlg_server.cpp pgn.desktop tabbox.h accel.h io_engine.h proto_base.cpp setpageaudio.cpp dlg_engine.cpp tab_seeklist.cpp tabpage.cpp challenge_graph.h tabgrip.cpp dlg_login.cpp challenge_graph.cpp proto_uci.h setpageaudio.h proto_base.h chessclock.h setpagegeneral.h idmanager.cpp dlg_challenge.cpp io_engine.cpp audio.h dlg_newmatch.h pgn.cpp dlg_engine.h thinbuttons.cpp wiz_setup.h dlg_selectengine.cpp challenge_game.h proto_xboard.cpp knightspixcache.h setpagedisplay.cpp tabgrip.h knights.desktop dlg_login.h proto_xboard.h dlg_challenge.h dlg_selectengine.h tabpage.h board_base.cpp board_base.h board_2d.cpp board_2d.h Makefile.am
diff --git a/knights/accel.cpp b/knights/accel.cpp
index c2ef168..e0ac9fc 100644
--- a/knights/accel.cpp
+++ b/knights/accel.cpp
@@ -18,7 +18,7 @@
#include "accel.moc"
#include <klocale.h>
-Accel::Accel( QWidget *parent, QObject *target ) : KAccel( parent )
+Accel::Accel( TQWidget *tqparent, TQObject *target ) : KAccel( tqparent )
{
insertItem( i18n("Previous Move"), "Previous Move", Key_Up, TRUE );
insertItem( i18n("Next Move"), "Next Move", Key_Down, TRUE );
@@ -42,19 +42,19 @@ Accel::~Accel()
{
writeSettings();
}
-void Accel::setTarget( QObject *target )
+void Accel::setTarget( TQObject *target )
{
- connectItem( "Board Down" , target, SIGNAL( board_down() ) );
- connectItem( "Board Up" , target, SIGNAL( board_up() ) );
- connectItem( "Previous Move" , target, SIGNAL( move_prev() ) );
- connectItem( "Next Move" , target, SIGNAL( move_next() ) );
- connectItem( "Page Up", target, SIGNAL( page_up() ) );
- connectItem( "Page Down", target, SIGNAL( page_down() ) );
- connectItem( "Last History Item", target, SIGNAL( history_prev() ) );
- connectItem( "Next History Item", target, SIGNAL( history_next() ) );
- connectItem( "Tell Reply", target, SIGNAL( reply_tell() ) );
- connectItem( "Channel Reply", target, SIGNAL( reply_channel() ) );
- connectItem( "Enter Text", target, SIGNAL( focus() ) );
- connectItem( "Kibitz", target, SIGNAL( kibitz() ) );
- connectItem( "Whisper", target, SIGNAL( whisper() ) );
+ connectItem( "Board Down" , target, TQT_SIGNAL( board_down() ) );
+ connectItem( "Board Up" , target, TQT_SIGNAL( board_up() ) );
+ connectItem( "Previous Move" , target, TQT_SIGNAL( move_prev() ) );
+ connectItem( "Next Move" , target, TQT_SIGNAL( move_next() ) );
+ connectItem( "Page Up", target, TQT_SIGNAL( page_up() ) );
+ connectItem( "Page Down", target, TQT_SIGNAL( page_down() ) );
+ connectItem( "Last History Item", target, TQT_SIGNAL( history_prev() ) );
+ connectItem( "Next History Item", target, TQT_SIGNAL( history_next() ) );
+ connectItem( "Tell Reply", target, TQT_SIGNAL( reply_tell() ) );
+ connectItem( "Channel Reply", target, TQT_SIGNAL( reply_channel() ) );
+ connectItem( "Enter Text", target, TQT_SIGNAL( focus() ) );
+ connectItem( "Kibitz", target, TQT_SIGNAL( kibitz() ) );
+ connectItem( "Whisper", target, TQT_SIGNAL( whisper() ) );
}
diff --git a/knights/accel.h b/knights/accel.h
index 6767a3e..43e4932 100644
--- a/knights/accel.h
+++ b/knights/accel.h
@@ -27,15 +27,16 @@
class Accel : public KAccel
{
Q_OBJECT
+ TQ_OBJECT
public:
- Accel( QWidget *parent=0, QObject *target=0 );
+ Accel( TQWidget *tqparent=0, TQObject *target=0 );
~Accel();
- void setTarget( QObject* );
+ void setTarget( TQObject* );
signals:
void focus( void );
- void focus( const QChar& );
+ void focus( const TQChar& );
void board_up( void );
void board_down( void );
diff --git a/knights/audio.cpp b/knights/audio.cpp
index f1b0d34..590a1e8 100644
--- a/knights/audio.cpp
+++ b/knights/audio.cpp
@@ -22,21 +22,21 @@
#include <arts/connect.h>
#include <ksimpleconfig.h>
#include <kio/netaccess.h>
-#include <qptrlist.h>
-#include <qfile.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqfile.h>
+#include <tqmap.h>
class audioPrivate
{
public:
bool enabled;
bool firstTime;
- QString theme;
+ TQString theme;
Arts::Dispatcher dispatcher;
Arts::SoundServerV2 server;
Arts::PlayObjectFactory playObjectFactory;
- QMap<int, Arts::PlayObject> audioMap;
- QPtrList<KTempFile> fileRef;
+ TQMap<int, Arts::PlayObject> audioMap;
+ TQPtrList<KTempFile> fileRef;
};
audio::audio()
@@ -67,7 +67,7 @@ void audio::play( const int snd )
if( a->firstTime || !enabled || !a->enabled )
return;
- QMap<int, Arts::PlayObject>::Iterator IT = a->audioMap.find( snd );
+ TQMap<int, Arts::PlayObject>::Iterator IT = a->audioMap.tqfind( snd );
if( IT == a->audioMap.end() )
{
@@ -102,9 +102,9 @@ void audio::play( const int snd )
current->play();
}
-void audio::setTheme( const QString &newTheme )
+void audio::setTheme( const TQString &newTheme )
{
- QString configFile;
+ TQString configFile;
KSimpleConfig *themeConfig;
if( !enabled || !a->enabled )
@@ -147,15 +147,15 @@ void audio::setTheme( const QString &newTheme )
delete themeConfig;
KIO::NetAccess::removeTempFile( configFile );
}
-void audio::prepFile( const QString &source, const int &ref )
+void audio::prepFile( const TQString &source, const int &ref )
{
Arts::PlayObject player;
KTempFile *dest;
- QString filename;
+ TQString filename;
if( source.isEmpty() )
return;
- dest = new KTempFile( QString::null, source.right(4), 700 );
+ dest = new KTempFile( TQString(), source.right(4), 700 );
dest->setAutoDelete( TRUE );
filename = dest->name();
@@ -165,7 +165,7 @@ void audio::prepFile( const QString &source, const int &ref )
delete dest;
return;
}
- player = a->playObjectFactory.createPlayObject( QFile::encodeName( dest->name() ).data() );
+ player = a->playObjectFactory.createPlayObject( TQFile::encodeName( dest->name() ).data() );
if( player.isNull() )
{
delete dest;
diff --git a/knights/audio.h b/knights/audio.h
index 1270b85..10ab8b7 100644
--- a/knights/audio.h
+++ b/knights/audio.h
@@ -50,13 +50,13 @@ class audio
audio();
~audio();
void play( const int );
- void setTheme( const QString& );
+ void setTheme( const TQString& );
bool enabled;
int volume;
ThemeHeader themeHeader;
protected:
- void prepFile( const QString&, const int& );
+ void prepFile( const TQString&, const int& );
private:
audioPrivate *a;
};
diff --git a/knights/board_2d.cpp b/knights/board_2d.cpp
index f3a9b49..4e8e0dd 100644
--- a/knights/board_2d.cpp
+++ b/knights/board_2d.cpp
@@ -20,12 +20,12 @@
#include "logic.h"
#include "knightspixcache.h"
#include <kiconeffect.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
static int MAX_STEPS = 18;
-board_2d::board_2d(QWidget *parent, const char *name, resource *Rsrc, logic *Lgc ) : board_base(parent,name,Rsrc,Lgc)
+board_2d::board_2d(TQWidget *tqparent, const char *name, resource *Rsrc, logic *Lgc ) : board_base(tqparent,name,Rsrc,Lgc)
{
updateX1 = updateY1 = 4000;
updateX2 = updateY2 = -4000;
@@ -39,12 +39,12 @@ board_2d::board_2d(QWidget *parent, const char *name, resource *Rsrc, logic *Lgc
sprites.setAutoDelete( TRUE );
/* Setup Pixmaps */
- myself.setOptimization( QPixmap::BestOptim );
+ myself.setOptimization( TQPixmap::BestOptim );
myself.resize( myResource->ThemeSize * size, myResource->ThemeSize * size);
myself.fill();
/* Setup self */
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
show();
}
board_2d::~board_2d()
@@ -55,9 +55,9 @@ board_2d::~board_2d()
// board_2d::coords
//
///////////////////////////////////////
-QPoint board_2d::coords( const int &rank, const int &file )
+TQPoint board_2d::coords( const int &rank, const int &file )
{
- QPoint tmp;
+ TQPoint tmp;
if( orientation == 0 )
{
tmp.setX( myResource->ThemeSize * file );
@@ -80,11 +80,11 @@ QPoint board_2d::coords( const int &rank, const int &file )
// board_2d::position
//
///////////////////////////////////////
-int board_2d::position( const QPoint &_point )
+int board_2d::position( const TQPoint &_point )
{
int file, rank;
int themeSize = myResource->ThemeSize;
- QPoint point( _point );
+ TQPoint point( _point );
if( myResource->ThemeBorder )
{
@@ -145,7 +145,7 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
/* Show Animation */
if( myResource->OPTION_Animate_Moves && !lastMoveWasDrag && isVisible() )
{
- QTimer::singleShot( 0, this, SLOT( updateSprites() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateSprites() ) );
sprite *spritePtr = new sprite;
spritePtr->Steps = 1;
spritePtr->Restore = FALSE;
@@ -180,15 +180,15 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
/* Draw the originating position */
drawPosition( fromPtr );
- if( QString( chessMove.SAN ).contains( "o-o", FALSE ) )
+ if( TQString( chessMove.SAN ).tqcontains( "o-o", FALSE ) )
{
/* This is a castle */
ChessMove newMove;
- strcpy( newMove.SAN, QString( "no" ).latin1() );
+ strcpy( newMove.SAN, TQString( "no" ).latin1() );
newMove.fromRank = chessMove.fromRank;
newMove.toRank = chessMove.toRank;
newMove.ManTaken = Null;
- if( QString( chessMove.SAN ).contains( "o-o-o", FALSE ) )
+ if( TQString( chessMove.SAN ).tqcontains( "o-o-o", FALSE ) )
{
/* Queenside */
newMove.fromFile = 0;
@@ -206,7 +206,7 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
}
///////////////////////////////////////
//
-// board_2d::resizeBoard( SLOT )
+// board_2d::resizeBoard( TQT_SLOT )
//
///////////////////////////////////////
void board_2d::resizeBoard( void )
@@ -237,7 +237,7 @@ void board_2d::redrawAll( void )
if( init )
return;
- /* Set Orientation */
+ /* Set Qt::Orientation */
orientation = myResource->OPTION_Board_Orientation;
if( localArmy != WHITE )
orientation = !orientation;
@@ -249,7 +249,7 @@ void board_2d::redrawAll( void )
{
if( orientation )
{
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.rotate( 180.0 );
myself = cache->Border.xForm( matrix );
}
@@ -262,7 +262,7 @@ void board_2d::redrawAll( void )
drawPosition( tmp++ );
redrawLights();
- /* Make sure everything is repainted */
+ /* Make sure everything is tqrepainted */
updateX1 = updateY1 = 0;
updateX2 = updateY2 = IMAGE_MAX * 9;
@@ -276,7 +276,7 @@ void board_2d::redrawAll( void )
void board_2d::redrawLights( void )
{
int half, four;
- QPoint black, white;
+ TQPoint black, white;
if( myResource->ThemeBorder )
{
half = myResource->ThemeSize >> 1;
@@ -297,13 +297,13 @@ void board_2d::redrawLights( void )
}
if( myLogic->OnMove != WHITE )
{
- myBlit( black, &cache->BorderLightOn, cache->BorderLightOn.rect() );
- myBlit( white, &cache->BorderLightOff, cache->BorderLightOff.rect() );
+ myBlit( black, TQT_TQPAINTDEVICE(&cache->BorderLightOn), cache->BorderLightOn.rect() );
+ myBlit( white, TQT_TQPAINTDEVICE(&cache->BorderLightOff), cache->BorderLightOff.rect() );
}
else
{
- myBlit( black, &cache->BorderLightOff, cache->BorderLightOff.rect() );
- myBlit( white, &cache->BorderLightOn, cache->BorderLightOn.rect() );
+ myBlit( black, TQT_TQPAINTDEVICE(&cache->BorderLightOff), cache->BorderLightOff.rect() );
+ myBlit( white, TQT_TQPAINTDEVICE(&cache->BorderLightOn), cache->BorderLightOn.rect() );
}
}
}
@@ -316,9 +316,9 @@ void board_2d::drawPosition( const int &pos )
{
int rank = pos >> 3;
int file = pos % 8;
- QPixmap buffer;
- QString cacheName = QString::number( myResource->ThemeSize );
- QImage tempImage;
+ TQPixmap buffer;
+ TQString cacheName = TQString::number( myResource->ThemeSize );
+ TQImage tempImage;
if( ( pos < 0 ) || ( pos > 63 ) ) return;
/*
@@ -383,14 +383,14 @@ void board_2d::drawPosition( const int &pos )
}
else
cacheName += " ";
- if( cache->find( cacheName, buffer ) )
+ if( cache->tqfind( cacheName, buffer ) )
{
/*
Cache Hit... no need to redraw
*/
if( myResource->OPTION_Show_Coord )
drawCoords( &buffer, pos );
- myBlit( coords( rank, file ), &buffer, buffer.rect() );
+ myBlit( coords( rank, file ), TQT_TQPAINTDEVICE(&buffer), buffer.rect() );
return;
}
@@ -407,41 +407,41 @@ void board_2d::drawPosition( const int &pos )
{
case NOTE_HIGHLIGHT: // Fall Through
case NOTE_SELECT:
- bitBlt( &buffer, 0, 0, &cache->HighlightSelect, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->HighlightSelect), 0, 0, -1, -1, TQt::CopyROP, FALSE);
break;
case NOTE_MOVE: // Fall Through
case NOTE_CASTLE: // Fall Through
case NOTE_PAWN_DOUBLE:
- bitBlt( &buffer, 0, 0, &cache->HighlightMove, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->HighlightMove), 0, 0, -1, -1, TQt::CopyROP, FALSE);
break;
case NOTE_ATTACK: // Fall Through
case NOTE_ENPASSANT:
- bitBlt( &buffer, 0, 0, &cache->HighlightAttack, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->HighlightAttack), 0, 0, -1, -1, TQt::CopyROP, FALSE);
break;
default:
break;
}
if( !isSprite(pos) )
{
- QPixmap chessman = getChessman( pos );
- bitBlt( &buffer, 0, 0, &chessman, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ TQPixmap chessman = getChessman( pos );
+ bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&chessman), 0, 0, -1, -1, TQt::CopyROP, FALSE);
}
/* Now add this pixmap to the cache */
cache->add( cacheName, buffer );
/* */
if( myResource->OPTION_Show_Coord )
drawCoords( &buffer, pos );
- myBlit( coords( rank, file ), &buffer, buffer.rect() );
+ myBlit( coords( rank, file ), TQT_TQPAINTDEVICE(&buffer), buffer.rect() );
}
///////////////////////////////////////
//
// board_2d::drawCoords
//
///////////////////////////////////////
-void board_2d::drawCoords( QPixmap *pic, const int &pos )
+void board_2d::drawCoords( TQPixmap *pic, const int &pos )
{
- QPainter painter;
- QString letter;
+ TQPainter painter;
+ TQString letter;
int themeSize = myResource->ThemeSize - 4;
int targetRank, targetFile;
@@ -458,29 +458,29 @@ void board_2d::drawCoords( QPixmap *pic, const int &pos )
/* Draw Rank */
if( ( pos >> 3 ) == targetRank )
{
- letter = QString( QString("abcdefgh").at( pos % 8 ) );
+ letter = TQString( TQString("abcdefgh").at( pos % 8 ) );
painter.begin( pic );
painter.setFont( myResource->FONT_Standard );
painter.setPen( myResource->COLOR_Notation_Shadow );
painter.drawText( 3, 3, themeSize, themeSize,
- Qt::AlignRight | Qt::AlignBottom, letter );
+ TQt::AlignRight | TQt::AlignBottom, letter );
painter.setPen( myResource->COLOR_Notation );
painter.drawText( 2, 2, themeSize, themeSize,
- Qt::AlignRight | Qt::AlignBottom, letter );
+ TQt::AlignRight | TQt::AlignBottom, letter );
painter.end();
}
/* Draw File */
if( ( pos % 8 ) == targetFile )
{
- letter = QString( QString("12345678").at( pos >> 3 ) );
+ letter = TQString( TQString("12345678").at( pos >> 3 ) );
painter.begin( pic );
painter.setFont( myResource->FONT_Standard );
painter.setPen( myResource->COLOR_Black );
painter.drawText( 3, 3, themeSize, themeSize,
- Qt::AlignLeft | Qt::AlignTop, letter );
+ TQt::AlignLeft | TQt::AlignTop, letter );
painter.setPen( myResource->COLOR_White );
painter.drawText( 2, 2, themeSize, themeSize,
- Qt::AlignLeft | Qt::AlignTop, letter );
+ TQt::AlignLeft | TQt::AlignTop, letter );
painter.end();
}
}
@@ -489,7 +489,7 @@ void board_2d::drawCoords( QPixmap *pic, const int &pos )
// board_2d::mouseReleaseEvent
//
///////////////////////////////////////
-void board_2d::mouseReleaseEvent( QMouseEvent *event )
+void board_2d::mouseReleaseEvent( TQMouseEvent *event )
{
event->accept();
@@ -498,7 +498,7 @@ void board_2d::mouseReleaseEvent( QMouseEvent *event )
/* Destroy any sprites being dragged */
int tmp = DragSprite->POSITION_Origin;
myBlit( DragSprite->POINT_LastUpdate,
- &DragSprite->PIXMAP_FlipFrame,
+ TQT_TQPAINTDEVICE(&DragSprite->PIXMAP_FlipFrame),
DragSprite->PIXMAP_FlipFrame.rect() );
sprites.removeRef( DragSprite );
DragSprite = NULL;
@@ -521,7 +521,7 @@ void board_2d::mouseReleaseEvent( QMouseEvent *event )
// board_2d::mousePressEvent
//
///////////////////////////////////////
-void board_2d::mousePressEvent( QMouseEvent *event )
+void board_2d::mousePressEvent( TQMouseEvent *event )
{
pressPoint = event->pos();
event->accept();
@@ -531,7 +531,7 @@ void board_2d::mousePressEvent( QMouseEvent *event )
// board_2d::mouseMoveEvent
//
///////////////////////////////////////
-void board_2d::mouseMoveEvent( QMouseEvent *event )
+void board_2d::mouseMoveEvent( TQMouseEvent *event )
{
event->accept();
if( DragSprite == NULL )
@@ -580,9 +580,9 @@ void board_2d::mouseMoveEvent( QMouseEvent *event )
// board_2d::getChessman
//
///////////////////////////////////////
-QPixmap board_2d::getChessman( const int &pos )
+TQPixmap board_2d::getChessman( const int &pos )
{
- QPixmap tmp;
+ TQPixmap tmp;
register char type, army;
if( pos == premoveTo )
@@ -668,7 +668,7 @@ void board_2d::setPremovePositions( const int &posF, const int &posT )
void board_2d::commit( void )
{
drawSprites();
- bitBlt( this, updateX1, updateY1, &myself, updateX1, updateY1, updateX2, updateY2, Qt::CopyROP );
+ bitBlt( this, updateX1, updateY1, &myself, updateX1, updateY1, updateX2, updateY2, TQt::CopyROP );
updateX1 = updateY1 = 4000;
updateX2 = updateY2 = -4000;
}
@@ -677,10 +677,10 @@ void board_2d::commit( void )
// board_2d::paintEvent
//
///////////////////////////////////////
-void board_2d::paintEvent( QPaintEvent *event )
+void board_2d::paintEvent( TQPaintEvent *event )
{
/* Paint the Widget */
- bitBlt( this, event->rect().topLeft(), &myself, event->rect(), Qt::CopyROP );
+ bitBlt( this, event->rect().topLeft(), &myself, event->rect(), TQt::CopyROP );
}
///////////////////////////////////////
//
@@ -703,7 +703,7 @@ void board_2d::drawSprites( void )
else
{
myBlit( spritePtr->POINT_LastUpdate,
- &spritePtr->PIXMAP_FlipFrame,
+ TQT_TQPAINTDEVICE(&spritePtr->PIXMAP_FlipFrame),
spritePtr->PIXMAP_FlipFrame.rect() );
}
}
@@ -723,9 +723,9 @@ void board_2d::drawSprites( void )
spritePtr->POINT_Current.y(),
spritePtr->PIXMAP_FlipFrame.width(),
spritePtr->PIXMAP_FlipFrame.height(),
- Qt::CopyROP );
+ TQt::CopyROP );
myBlit( spritePtr->POINT_Current,
- &spritePtr->PIXMAP_Sprite,
+ TQT_TQPAINTDEVICE(&spritePtr->PIXMAP_Sprite),
spritePtr->PIXMAP_Sprite.rect() );
spritePtr->POINT_LastUpdate = spritePtr->POINT_Current;
}
@@ -758,13 +758,13 @@ void board_2d::updateSprites( void )
if( spritePtr == DragSprite )
continue;
- QTimer::singleShot( 0, this, SLOT( updateSprites() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateSprites() ) );
if( spritePtr->Steps < MAX_STEPS )
{
double factor = ( 1.0 / (double)MAX_STEPS ) * (double)spritePtr->Steps;
int newX = (int)( ( spritePtr->POINT_Destination.x() - spritePtr->POINT_Origin.x() ) * factor );
int newY = (int)( ( spritePtr->POINT_Destination.y() - spritePtr->POINT_Origin.y() ) * factor );
- spritePtr->POINT_Current = spritePtr->POINT_Origin + QPoint( newX, newY );
+ spritePtr->POINT_Current = spritePtr->POINT_Origin + TQPoint( newX, newY );
spritePtr->Steps += sprites.count();
}
}
@@ -793,9 +793,9 @@ bool board_2d::isSprite( const int &pos )
// board_2d::myBlit
//
///////////////////////////////////////
-void board_2d::myBlit( const QPoint &dp, const QPaintDevice *src, const QRect &sr )
+void board_2d::myBlit( const TQPoint &dp, const TQPaintDevice *src, const TQRect &sr )
{
- bitBlt( &myself, dp.x(), dp.y(), src, sr.x(), sr.y(), sr.width(), sr.height(), Qt::CopyROP );
+ bitBlt( &myself, dp.x(), dp.y(), src, sr.x(), sr.y(), sr.width(), sr.height(), TQt::CopyROP );
if( dp.x() < updateX1 )
updateX1 = dp.x();
if( dp.y() < updateY1 )
diff --git a/knights/board_2d.h b/knights/board_2d.h
index f2291e2..43a820a 100644
--- a/knights/board_2d.h
+++ b/knights/board_2d.h
@@ -19,8 +19,8 @@
#define BOARD_2D_H
#include <board_base.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
/**
*@author The Knights Team
@@ -33,30 +33,31 @@ typedef struct sprite
int POSITION_Origin;
int POSITION_Destination;
int POSITION_TargetTaken;
- QPoint POINT_Origin;
- QPoint POINT_Current;
- QPoint POINT_LastUpdate;
- QPoint POINT_Destination;
- QPixmap PIXMAP_Sprite;
- QPixmap PIXMAP_FlipFrame;
+ TQPoint POINT_Origin;
+ TQPoint POINT_Current;
+ TQPoint POINT_LastUpdate;
+ TQPoint POINT_Destination;
+ TQPixmap PIXMAP_Sprite;
+ TQPixmap PIXMAP_FlipFrame;
};
-typedef QPtrList<sprite> SpriteList;
+typedef TQPtrList<sprite> SpriteList;
class KnightsPixCache;
class board_2d : public board_base
{
Q_OBJECT
+ TQ_OBJECT
public:
- board_2d(QWidget *parent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
+ board_2d(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
~board_2d();
virtual void drawMove( const ChessMove &chessMove, const bool &reverse=FALSE );
virtual void setPremovePositions( const int&, const int& );
virtual void redrawLights( void );
- void paintEvent( QPaintEvent *event );
- void mouseReleaseEvent( QMouseEvent *event );
- void mousePressEvent( QMouseEvent *event );
- void mouseMoveEvent( QMouseEvent *event );
+ void paintEvent( TQPaintEvent *event );
+ void mouseReleaseEvent( TQMouseEvent *event );
+ void mousePressEvent( TQMouseEvent *event );
+ void mouseMoveEvent( TQMouseEvent *event );
public slots:
virtual void resizeBoard( void );
@@ -65,13 +66,13 @@ class board_2d : public board_base
virtual void commit( void );
protected:
- void drawCoords( QPixmap *pic, const int &pos );
- QPoint coords( const int&, const int&);
- int position( const QPoint& );
+ void drawCoords( TQPixmap *pic, const int &pos );
+ TQPoint coords( const int&, const int&);
+ int position( const TQPoint& );
void drawSprites( void );
- QPixmap getChessman( const int &pos );
+ TQPixmap getChessman( const int &pos );
bool isSprite( const int &pos );
- void myBlit( const QPoint &dp, const QPaintDevice *src, const QRect &sr );
+ void myBlit( const TQPoint &dp, const TQPaintDevice *src, const TQRect &sr );
protected slots:
void updateSprites( void );
@@ -80,8 +81,8 @@ class board_2d : public board_base
SpriteList sprites;
sprite *DragSprite;
KnightsPixCache *cache;
- QPixmap myself;
- QPoint pressPoint;
+ TQPixmap myself;
+ TQPoint pressPoint;
bool orientation;
bool lastMoveWasDrag;
bool init;
diff --git a/knights/board_base.cpp b/knights/board_base.cpp
index 6370644..23fe734 100644
--- a/knights/board_base.cpp
+++ b/knights/board_base.cpp
@@ -19,7 +19,7 @@
#include "resource.h"
#include "logic.h"
-board_base::board_base(QWidget *parent, const char *name, resource *Rsrc, logic *Lgc ) : QWidget(parent,name)
+board_base::board_base(TQWidget *tqparent, const char *name, resource *Rsrc, logic *Lgc ) : TQWidget(tqparent,name)
{
/* Setup Variables */
myResource = Rsrc;
diff --git a/knights/board_base.h b/knights/board_base.h
index 305e686..451f135 100644
--- a/knights/board_base.h
+++ b/knights/board_base.h
@@ -19,7 +19,7 @@
#define BOARD_BASE_H
#include <stdlib.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "definitions.h"
/**
@@ -29,12 +29,13 @@
class resource;
class logic;
-class board_base : public QWidget
+class board_base : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- board_base(QWidget *parent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
+ board_base(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
virtual ~board_base();
virtual void drawMove( const ChessMove &chessMove, const bool &reverse=FALSE );
virtual void setPremovePositions( const int&, const int& );
diff --git a/knights/challenge_game.cpp b/knights/challenge_game.cpp
index b7d37cc..f1bd9a8 100644
--- a/knights/challenge_game.cpp
+++ b/knights/challenge_game.cpp
@@ -15,11 +15,11 @@
* *
***************************************************************************/
-#include <qapplication.h>
+#include <tqapplication.h>
#include "challenge_game.h"
-Challenge_Game::Challenge_Game(QString seeker, QString seeker_rating, QString match_kind, QString rated, QString time, QString incr, QString uid)
+Challenge_Game::Challenge_Game(TQString seeker, TQString seeker_rating, TQString match_kind, TQString rated, TQString time, TQString incr, TQString uid)
: _player(seeker), _match_type(match_kind), _is_rated(rated)
{
_id = uid.toInt();
diff --git a/knights/challenge_game.h b/knights/challenge_game.h
index 6857492..132940e 100644
--- a/knights/challenge_game.h
+++ b/knights/challenge_game.h
@@ -17,12 +17,12 @@
#ifndef GAME_H
#define GAME_H
-#include <qstring.h>
+#include <tqstring.h>
class Challenge_Game {
public:
- Challenge_Game(QString seeker, QString seeker_rating, QString match_kind, QString rated, QString time, QString incr, QString uid);
+ Challenge_Game(TQString seeker, TQString seeker_rating, TQString match_kind, TQString rated, TQString time, TQString incr, TQString uid);
public:
@@ -31,9 +31,9 @@ class Challenge_Game {
int increment() { return _increment; };
bool rated() { return _rated; };
int rating() { return _player_rating; };
- QString _player;
- QString _match_type;
- QString _is_rated;
+ TQString _player;
+ TQString _match_type;
+ TQString _is_rated;
private:
int _id;
diff --git a/knights/challenge_graph.cpp b/knights/challenge_graph.cpp
index 5d36ff1..106b4ee 100644
--- a/knights/challenge_graph.cpp
+++ b/knights/challenge_graph.cpp
@@ -23,16 +23,16 @@
#include <kstddirs.h>
#include <kpopupmenu.h>
-#include <qapplication.h>
-#include <qcanvas.h>
-#include <qlabel.h>
-#include <qpen.h>
-#include <qscrollview.h>
-#include <qwidget.h>
-#include <qrect.h>
-#include <qbrush.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqcanvas.h>
+#include <tqlabel.h>
+#include <tqpen.h>
+#include <tqscrollview.h>
+#include <tqwidget.h>
+#include <tqrect.h>
+#include <tqbrush.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include "challenge_graph.moc"
#include "challenge_graph_view.h"
@@ -50,39 +50,39 @@
// Challenge_Graph::Constructor
//
///////////////////////////////////////
-Challenge_Graph::Challenge_Graph( QWidget* parent, const char* name, resource *Rsrc )
- : QVBox(parent, name), myResource(Rsrc)
+Challenge_Graph::Challenge_Graph( TQWidget* tqparent, const char* name, resource *Rsrc )
+ : TQVBox(tqparent, name), myResource(Rsrc)
{
max_rating = 2600;
max_time = 60;
seek = FALSE;
- graph = new QCanvas( 0, "Challenge_Graph" );
- myStatusBar = new QLabel( this, "Challenge_Graph_Status_Bar" );
+ graph = new TQCanvas( 0, "Challenge_Graph" );
+ myStatusBar = new TQLabel( this, "Challenge_Graph_Status_Bar" );
myView = new Challenge_Graph_View( *graph, this, "Challenge_Graph_View", 0, myStatusBar );
- QObject::connect(myView, SIGNAL(leftClick(int)), SLOT(selectMatch(int)));
- QObject::connect(myView, SIGNAL(rightClick(Challenge_Game*, const QPoint&)), SLOT(display_menuSeek(Challenge_Game*, const QPoint&)));
+ TQT_BASE_OBJECT_NAME::connect(myView, TQT_SIGNAL(leftClick(int)), TQT_SLOT(selectMatch(int)));
+ TQT_BASE_OBJECT_NAME::connect(myView, TQT_SIGNAL(rightClick(Challenge_Game*, const TQPoint&)), TQT_SLOT(display_menuSeek(Challenge_Game*, const TQPoint&)));
/* Setup Style for myStatusBar */
- myStatusBar->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine );
- myStatusBar->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ myStatusBar->tqsetAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::SingleLine );
+ myStatusBar->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
clear();
menuSeek = new KPopupMenu( this );
menuSeek->setCheckable( TRUE );
- menuSeek->insertItem( i18n("Seek Matches"), this, SLOT( menuFunct(int) ), 0, MENU_SEEK );
+ menuSeek->insertItem( i18n("Seek Matches"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_SEEK );
menuSeek->insertSeparator();
- menuSeek->insertItem( i18n("Accept This Match"), this, SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH );
- menuSeek->insertItem( i18n("Tell..."), this, SLOT( menuFunct(int) ), 0, MENU_TELL );
- menuSeek->insertItem( i18n("Assess..."), this, SLOT( menuFunct(int) ), 0, MENU_ASSESS );
- menuSeek->insertItem( i18n("Player Info"), this, SLOT( menuFunct(int) ), 0, MENU_FINGER );
- menuSeek->insertItem( QIconSet( myResource->LoadIcon( QString("history"), KIcon::Small ) ),
- i18n("Player History"), this, SLOT( menuFunct(int) ), 0, MENU_HISTORY );
+ menuSeek->insertItem( i18n("Accept This Match"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH );
+ menuSeek->insertItem( i18n("Tell..."), this, TQT_SLOT( menuFunct(int) ), 0, MENU_TELL );
+ menuSeek->insertItem( i18n("Assess..."), this, TQT_SLOT( menuFunct(int) ), 0, MENU_ASSESS );
+ menuSeek->insertItem( i18n("Player Info"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_FINGER );
+ menuSeek->insertItem( TQIconSet( myResource->LoadIcon( TQString("history"), KIcon::Small ) ),
+ i18n("Player History"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_HISTORY );
menuSeek->insertSeparator();
- menuSeek->insertItem( i18n("Add to Friends"), this, SLOT( menuFunct(int) ), 0, MENU_NOTIFY );
- menuSeek->insertItem( i18n("Ignore This Player"), this, SLOT( menuFunct(int) ), 0, MENU_CENSOR );
+ menuSeek->insertItem( i18n("Add to Friends"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_NOTIFY );
+ menuSeek->insertItem( i18n("Ignore This Player"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_CENSOR );
menuSeek->setItemChecked( MENU_SEEK, FALSE );
}
///////////////////////////////////////
@@ -98,11 +98,11 @@ Challenge_Graph::~Challenge_Graph()
// Challenge_Graph::resizeEvent
//
///////////////////////////////////////
-void Challenge_Graph::resizeEvent( QResizeEvent *e )
+void Challenge_Graph::resizeEvent( TQResizeEvent *e )
{
if( e->size() != e->oldSize() )
{
- QSize newsize = e->size();
+ TQSize newsize = e->size();
x_size = newsize.width() - 8;
y_size = newsize.height() - myStatusBar->height();
graph->resize( x_size, y_size );
@@ -170,16 +170,16 @@ void Challenge_Graph::drawChallenge(int time_control_x, int rating_y, bool rated
if( my_x < SPACER )
my_x = SIZE;
- QCanvasPolygonalItem *item = new Challenge_Rectangle(my_x, my_y, SIZE, SIZE, graph, challenge);
+ TQCanvasPolygonalItem *item = new Challenge_Rectangle(my_x, my_y, SIZE, SIZE, graph, challenge);
item->setPen( myResource->COLOR_GraphForeground );
item->move( time_control_x, rating_y );
item->show();
if( rated )
- item->setBrush( QBrush(myResource->COLOR_GraphForeground) );
+ item->setBrush( TQBrush(myResource->COLOR_GraphForeground) );
else
- item->setBrush( QBrush(myResource->COLOR_GraphBackground, Qt::SolidPattern) );
+ item->setBrush( TQBrush(myResource->COLOR_GraphBackground, TQt::SolidPattern) );
item->show();
graph->update();
@@ -191,7 +191,7 @@ void Challenge_Graph::drawChallenge(int time_control_x, int rating_y, bool rated
///////////////////////////////////////
bool Challenge_Graph::isEmpty(int x, int y)
{
- QCanvasItemList l = graph->collisions( QRect(x, y, SIZE, SIZE) );
+ TQCanvasItemList l = graph->collisions( TQRect(x, y, SIZE, SIZE) );
if( l.count() )
return false;
@@ -278,9 +278,9 @@ bool Challenge_Graph::addTo_Nearest_Neighbour(int orig_x, int orig_y, bool rated
///////////////////////////////////////
void Challenge_Graph::createBackground( void )
{
- QPainter painter;
- QColor ink;
- QWMatrix matrix;
+ TQPainter painter;
+ TQColor ink;
+ TQWMatrix matrix;
int colorTotal;
background.resize( y_size, x_size );
@@ -311,7 +311,7 @@ void Challenge_Graph::createBackground( void )
painter.drawText( 64, y_size - 8, i18n( "Time" ) );
painter.end();
- graph->setBackgroundPixmap( background );
+ graph->tqsetBackgroundPixmap( background );
}
///////////////////////////////////////
//
@@ -321,7 +321,7 @@ void Challenge_Graph::createBackground( void )
void Challenge_Graph::selectMatch( int matchID )
{
if( matchID )
- emit sendCMD( Command( 0, CMD_Start_Match, QString::number( matchID ) ) );
+ emit sendCMD( Command( 0, CMD_Start_Match, TQString::number( matchID ) ) );
}
///////////////////////////////////////
//
@@ -339,7 +339,7 @@ void Challenge_Graph::menuFunct( int funct )
emit sendCMD( Command( 0, CMD_Player_Finger, selectedPlayerName ) );
break;
case MENU_TELL:
- emit sendCMD( Command( 0, CMD_Set_Input, QString( "tell %1 " ).arg( selectedPlayerName ) ) );
+ emit sendCMD( Command( 0, CMD_Set_Input, TQString( "tell %1 " ).tqarg( selectedPlayerName ) ) );
break;
case MENU_NOTIFY:
emit sendCMD( Command( 0, CMD_Add_Friend, selectedPlayerName ) );
@@ -351,7 +351,7 @@ void Challenge_Graph::menuFunct( int funct )
emit sendCMD( Command( 0, CMD_Player_History, selectedPlayerName ) );
break;
case MENU_ACCEPT_MATCH:
- emit sendCMD( Command( 0, CMD_Start_Match, QString::number( selectedMatchID ) ) );
+ emit sendCMD( Command( 0, CMD_Start_Match, TQString::number( selectedMatchID ) ) );
break;
case MENU_ASSESS:
emit sendCMD( Command( 0, CMD_Assess, selectedPlayerName ) );
@@ -396,9 +396,9 @@ void Challenge_Graph::updateSoughtList( void )
// Challenge_Graph::addSoughtItem
//
///////////////////////////////////////
-void Challenge_Graph::addSoughtItem( const QString &src )
+void Challenge_Graph::addSoughtItem( const TQString &src )
{
- QStringList fields = QStringList::split( QChar(' '), src, FALSE );
+ TQStringList fields = TQStringList::split( TQChar(' '), src, FALSE );
SF_01 << fields[2]; // Name
SF_02 << fields[1]; // Rating
SF_03 << fields[6]; // Match Type
@@ -412,12 +412,12 @@ void Challenge_Graph::addSoughtItem( const QString &src )
// Challenge_Graph::display_menuSeek
//
///////////////////////////////////////
-void Challenge_Graph::display_menuSeek( Challenge_Game *Item, const QPoint &Pos )
+void Challenge_Graph::display_menuSeek( Challenge_Game *Item, const TQPoint &Pos )
{
bool enable;
if( Item != NULL )
{
- selectedPlayerName = Item->_player.replace( QRegExp("\\(.+\\)"), QString("") );
+ selectedPlayerName = Item->_player.tqreplace( TQRegExp("\\(.+\\)"), TQString("") );
selectedMatchID = Item->id();
enable = TRUE;
}
diff --git a/knights/challenge_graph.h b/knights/challenge_graph.h
index e7963a3..bb60607 100644
--- a/knights/challenge_graph.h
+++ b/knights/challenge_graph.h
@@ -18,28 +18,29 @@
#ifndef CHALLENGE_GRAPH_H
#define CHALLENGE_GRAPH_H
-#include <qstringlist.h>
-#include <qvbox.h>
-#include <qevent.h>
-#include <qcolor.h>
+#include <tqstringlist.h>
+#include <tqvbox.h>
+#include <tqevent.h>
+#include <tqcolor.h>
#include "resource.h"
#include "challenge_game.h"
class KPopupMenu;
-class QCanvas;
-class QLabel;
+class TQCanvas;
+class TQLabel;
class Challenge_Graph_View;
class Command;
-class Challenge_Graph : public QVBox
+class Challenge_Graph : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- Challenge_Graph(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ Challenge_Graph(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0);
virtual ~Challenge_Graph();
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
void add( Challenge_Game *seek );
void clear();
@@ -48,7 +49,7 @@ class Challenge_Graph : public QVBox
public slots:
void recvCMD( const Command& );
- void display_menuSeek( Challenge_Game*, const QPoint& );
+ void display_menuSeek( Challenge_Game*, const TQPoint& );
void selectMatch( int );
void menuFunct( int );
@@ -57,7 +58,7 @@ class Challenge_Graph : public QVBox
void drawChallenge( int time_control_x, int rating_y, bool rated, Challenge_Game *challenge );
bool addTo_Nearest_Neighbour( int orig_x, int orig_y, bool rated, Challenge_Game *challenge, int searchdepth=10 );
void createBackground( void );
- void addSoughtItem( const QString& );
+ void addSoughtItem( const TQString& );
void updateSoughtList( void );
private:
@@ -68,25 +69,25 @@ class Challenge_Graph : public QVBox
bool seek;
resource *myResource;
- QCanvas *graph;
+ TQCanvas *graph;
Challenge_Graph_View *myView;
- QLabel *myStatusBar;
- QPixmap background;
+ TQLabel *myStatusBar;
+ TQPixmap background;
KPopupMenu *menuSeek;
int selectedMatchID;
- QString selectedPlayerName;
+ TQString selectedPlayerName;
/*
These StringLists temporarily store Sought Game data
until all ads have been displayed.
*/
- QStringList SF_01;
- QStringList SF_02;
- QStringList SF_03;
- QStringList SF_04;
- QStringList SF_05;
- QStringList SF_06;
- QStringList SF_07;
+ TQStringList SF_01;
+ TQStringList SF_02;
+ TQStringList SF_03;
+ TQStringList SF_04;
+ TQStringList SF_05;
+ TQStringList SF_06;
+ TQStringList SF_07;
};
#endif
diff --git a/knights/challenge_graph_view.cpp b/knights/challenge_graph_view.cpp
index 734ed99..abc06fe 100644
--- a/knights/challenge_graph_view.cpp
+++ b/knights/challenge_graph_view.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
#include <string>
-#include <qpoint.h>
-#include <qstring.h>
+#include <tqpoint.h>
+#include <tqstring.h>
#include "challenge_graph_view.moc"
@@ -29,15 +29,15 @@
// Challenge_Graph_View::Constructor
//
///////////////////////////////////////
-Challenge_Graph_View::Challenge_Graph_View(QCanvas& c, QWidget * parent,const char* name, WFlags f, QLabel *qsb)
- : QCanvasView(&c,parent,name,f), canvas(c), statusbar(qsb)
+Challenge_Graph_View::Challenge_Graph_View(TQCanvas& c, TQWidget * tqparent,const char* name, WFlags f, TQLabel *qsb)
+ : TQCanvasView(&c,tqparent,name,f), canvas(c), statusbar(qsb)
{
- setHScrollBarMode( QScrollView::AlwaysOff );
- setVScrollBarMode( QScrollView::AlwaysOff );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
+ setVScrollBarMode( TQScrollView::AlwaysOff );
- if ( parent )
- parent->installEventFilter( this );
- QScrollView::viewport()->setMouseTracking(true);
+ if ( tqparent )
+ tqparent->installEventFilter( this );
+ TQScrollView::viewport()->setMouseTracking(true);
}
///////////////////////////////////////
//
@@ -52,10 +52,10 @@ Challenge_Graph_View::~Challenge_Graph_View()
// Challenge_Graph_View::contentsMousePressEvent
//
///////////////////////////////////////
-void Challenge_Graph_View::contentsMousePressEvent(QMouseEvent* e)
+void Challenge_Graph_View::contentsMousePressEvent(TQMouseEvent* e)
{
- QCanvasItemList l = canvas.collisions(e->pos());
- QCanvasItemList::Iterator it = l.begin();
+ TQCanvasItemList l = canvas.collisions(e->pos());
+ TQCanvasItemList::Iterator it = l.begin();
for(; it != l.end(); ++it )
{
Challenge_Rectangle *cr = dynamic_cast<Challenge_Rectangle *>(*it);
@@ -76,8 +76,8 @@ void Challenge_Graph_View::contentsMousePressEvent(QMouseEvent* e)
///////////////////////////////////////
void Challenge_Graph_View::reset()
{
- QCanvasItemList list = canvas.allItems();
- QCanvasItemList::Iterator it = list.begin();
+ TQCanvasItemList list = canvas.allItems();
+ TQCanvasItemList::Iterator it = list.begin();
for(; it != list.end(); ++it )
{
Challenge_Rectangle *cr = dynamic_cast<Challenge_Rectangle *>(*it);
@@ -92,19 +92,19 @@ void Challenge_Graph_View::reset()
// Challenge_Graph_View::contentsMouseMoveEvent
//
///////////////////////////////////////
-void Challenge_Graph_View::contentsMouseMoveEvent(QMouseEvent* e)
+void Challenge_Graph_View::contentsMouseMoveEvent(TQMouseEvent* e)
{
- QString match;
- QCanvasItemList l = canvas.collisions(e->pos());
- QCanvasItemList::Iterator it = l.begin();
+ TQString match;
+ TQCanvasItemList l = canvas.collisions(e->pos());
+ TQCanvasItemList::Iterator it = l.begin();
for(; it!=l.end(); ++it)
{
Challenge_Rectangle *cr = dynamic_cast<Challenge_Rectangle *>(*it);
Challenge_Game *g = cr->getGame();
match = i18n( " Name: %1 Rating: %2 Match Type: %3 %4 Base Time: %5 Increment: %6" )
- .arg( g->_player ).arg( g->rating() ).arg( g->_match_type ).arg( g->_is_rated )
- .arg( g->clock() ).arg( g->increment() );
+ .tqarg( g->_player ).tqarg( g->rating() ).tqarg( g->_match_type ).tqarg( g->_is_rated )
+ .tqarg( g->clock() ).tqarg( g->increment() );
break;
}
statusbar->setText( match );
diff --git a/knights/challenge_graph_view.h b/knights/challenge_graph_view.h
index f1e89ba..0162f20 100644
--- a/knights/challenge_graph_view.h
+++ b/knights/challenge_graph_view.h
@@ -18,33 +18,34 @@
#ifndef CHALLENGE_GRAPH_VIEW_H
#define CHALLENGE_GRAPH_VIEW_H
-#include <qevent.h>
-#include <qcanvas.h>
-#include <qlabel.h>
+#include <tqevent.h>
+#include <tqcanvas.h>
+#include <tqlabel.h>
#include "challenge_game.h"
-class Challenge_Graph_View : public QCanvasView
+class Challenge_Graph_View : public TQCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
- Challenge_Graph_View(QCanvas&, QWidget* parent=0, const char* name=0, WFlags f=0, QLabel *qsb=0);
+ Challenge_Graph_View(TQCanvas&, TQWidget* tqparent=0, const char* name=0, WFlags f=0, TQLabel *qsb=0);
~Challenge_Graph_View();
void reset();
signals:
void leftClick(int);
- void rightClick(Challenge_Game*, const QPoint&);
+ void rightClick(Challenge_Game*, const TQPoint&);
protected:
- void contentsMousePressEvent(QMouseEvent*);
- void contentsMouseMoveEvent(QMouseEvent*);
- void updateStatusBar(QString msg);
+ void contentsMousePressEvent(TQMouseEvent*);
+ void contentsMouseMoveEvent(TQMouseEvent*);
+ void updateStatusBar(TQString msg);
private:
- QCanvas &canvas;
- QLabel *statusbar;
+ TQCanvas &canvas;
+ TQLabel *statusbar;
};
#endif
diff --git a/knights/challenge_rectangle.cpp b/knights/challenge_rectangle.cpp
index 2587623..6a46df4 100644
--- a/knights/challenge_rectangle.cpp
+++ b/knights/challenge_rectangle.cpp
@@ -18,8 +18,8 @@
#include "challenge_rectangle.h"
Challenge_Rectangle::Challenge_Rectangle
- (int x, int y, int width, int height, QCanvas * canvas, Challenge_Game * ptr)
- : QCanvasRectangle(x,y,width,height,canvas), challenge(ptr)
+ (int x, int y, int width, int height, TQCanvas * canvas, Challenge_Game * ptr)
+ : TQCanvasRectangle(x,y,width,height,canvas), challenge(ptr)
{
}
diff --git a/knights/challenge_rectangle.h b/knights/challenge_rectangle.h
index 02488ff..d94752c 100644
--- a/knights/challenge_rectangle.h
+++ b/knights/challenge_rectangle.h
@@ -18,13 +18,13 @@
#ifndef CHALLENGE_RECTANGLE_H
#define CHALLENGE_RECTANGLE_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
#include "challenge_game.h"
-class Challenge_Rectangle : public QCanvasRectangle
+class Challenge_Rectangle : public TQCanvasRectangle
{
public:
- Challenge_Rectangle(int x=0, int y=0, int width=0, int height=0, QCanvas * canvas=0, Challenge_Game * ptr=0);
+ Challenge_Rectangle(int x=0, int y=0, int width=0, int height=0, TQCanvas * canvas=0, Challenge_Game * ptr=0);
~Challenge_Rectangle();
Challenge_Game* getGame();
diff --git a/knights/chessclock.cpp b/knights/chessclock.cpp
index bde4745..ae62322 100644
--- a/knights/chessclock.cpp
+++ b/knights/chessclock.cpp
@@ -18,7 +18,7 @@
#include "chessclock.moc"
#include "audio.h"
-chessclock::chessclock(QWidget *parent, const char *name, resource *Rsrc ) : QWidget(parent,name)
+chessclock::chessclock(TQWidget *tqparent, const char *name, resource *Rsrc ) : TQWidget(tqparent,name)
{
Resource = Rsrc;
Silent = TRUE;
diff --git a/knights/chessclock.h b/knights/chessclock.h
index ce2a1fd..e33695e 100644
--- a/knights/chessclock.h
+++ b/knights/chessclock.h
@@ -18,8 +18,8 @@
#ifndef CHESSCLOCK_H
#define CHESSCLOCK_H
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <stdlib.h>
#include "definitions.h"
#include "resource.h"
@@ -28,13 +28,14 @@
*@author Troy Corbin Jr.
*/
-class chessclock : public QWidget
+class chessclock : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- chessclock( QWidget *parent=0, const char *name=0, resource *Rsrc=0 );
+ chessclock( TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0 );
~chessclock();
/* The Set function accepts Centiseconds ( 1/100 second ) */
@@ -45,8 +46,8 @@ class chessclock : public QWidget
void Moved( void );
int getCentiseconds( const bool Army );
- QString whiteClock;
- QString blackClock;
+ TQString whiteClock;
+ TQString blackClock;
bool Silent;
bool Flag[2];
diff --git a/knights/command.cpp b/knights/command.cpp
index a67088a..85158ab 100644
--- a/knights/command.cpp
+++ b/knights/command.cpp
@@ -26,7 +26,7 @@ Command::Command( int ID, int Command, int WhiteTime, int BlackTime, struct Ches
command = Command;
}
-Command::Command( int ID, int Command, int WhiteTime, int BlackTime, struct ChessMove Move, QString Data )
+Command::Command( int ID, int Command, int WhiteTime, int BlackTime, struct ChessMove Move, TQString Data )
{
white_time = WhiteTime;
black_time = BlackTime;
@@ -36,7 +36,7 @@ Command::Command( int ID, int Command, int WhiteTime, int BlackTime, struct Ches
command = Command;
}
-Command::Command( int ID, int Command, int WhiteTime, int BlackTime, QString Data )
+Command::Command( int ID, int Command, int WhiteTime, int BlackTime, TQString Data )
{
white_time = WhiteTime;
black_time = BlackTime;
@@ -52,7 +52,7 @@ Command::Command( int ID, int Command )
command = Command;
}
-Command::Command( int ID, int Command, QString Data )
+Command::Command( int ID, int Command, TQString Data )
{
clear();
id = ID;
diff --git a/knights/command.h b/knights/command.h
index c10e300..3076c71 100644
--- a/knights/command.h
+++ b/knights/command.h
@@ -18,7 +18,7 @@
#ifndef COMMAND_H
#define COMMAND_H
-#include <qstring.h>
+#include <tqstring.h>
#include "definitions.h"
/**
@@ -114,14 +114,14 @@ protected:
struct ChessMove move;
int command;
int id;
- QString data; // Generic String... used for ICS and FEN, etc.
+ TQString data; // Generic String... used for ICS and FEN, etc.
public:
Command( int ID, int Command );
- Command( int ID, int Command, QString Data );
+ Command( int ID, int Command, TQString Data );
Command( int ID, int Command, int WhiteTime, int BlackTime, struct ChessMove Move );
- Command( int ID, int Command, int WhiteTime, int BlackTime, struct ChessMove Move, QString Data );
- Command( int ID, int Command, int WhiteTime, int BlackTime, QString Data );
+ Command( int ID, int Command, int WhiteTime, int BlackTime, struct ChessMove Move, TQString Data );
+ Command( int ID, int Command, int WhiteTime, int BlackTime, TQString Data );
Command();
~Command();
void clear( void );
@@ -155,7 +155,7 @@ public:
return command;
}
- QString& getData( void )
+ TQString& getData( void )
{
return data;
}
@@ -185,7 +185,7 @@ public:
command = NewCommand;
}
- void setData( QString &NewData )
+ void setData( TQString &NewData )
{
data = NewData;
}
diff --git a/knights/console.cpp b/knights/console.cpp
index 33bbbd5..53048fb 100644
--- a/knights/console.cpp
+++ b/knights/console.cpp
@@ -23,16 +23,16 @@
/* KDE */
#include <klineedit.h>
#include <kiconloader.h>
-#include <qregexp.h>
-#include <qstyle.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
-Console::Console(QWidget *parent,
+Console::Console(TQWidget *tqparent,
const char *name,
- resource *Rsrc ) : QVBox(parent,name)
+ resource *Rsrc ) : TQVBox(tqparent,name)
{
myResource = Rsrc;
SelfMoving = FALSE;
- QStyle& Style = QApplication::style();
+ TQStyle& Style = TQApplication::tqstyle();
margin = Style.defaultFrameWidth();
myTextView = new KnightsTextView( this, myResource );
@@ -41,17 +41,17 @@ Console::Console(QWidget *parent,
setBG();
myTextView->setStaticBackground( FALSE );
- connect( myLineEdit, SIGNAL( returnPressed( const QString& ) ), this, SLOT( getText( const QString& ) ) );
- connect( myResource->myAccel, SIGNAL( history_prev() ), this, SLOT( historyBackward() ) );
- connect( myResource->myAccel, SIGNAL( history_next() ), this, SLOT( historyForward() ) );
- connect( myResource->myAccel, SIGNAL( page_up() ), this, SLOT( pageUp() ) );
- connect( myResource->myAccel, SIGNAL( page_down() ), this, SLOT( pageDown() ) );
- connect( myResource->myAccel, SIGNAL( kibitz() ), this, SLOT( kibitz() ) );
- connect( myResource->myAccel, SIGNAL( whisper() ), this, SLOT( whisper() ) );
- connect( myResource->myAccel, SIGNAL( reply_tell() ), this, SLOT( replyPrivate() ) );
- connect( myResource->myAccel, SIGNAL( reply_channel() ), this, SLOT( replyChannel() ) );
- connect( myResource->myAccel, SIGNAL( focus() ), this, SLOT( getFocus() ) );
- connect( myResource->myAccel, SIGNAL( focus( const QChar& ) ), this, SLOT( getFocus( const QChar& ) ) );
+ connect( myLineEdit, TQT_SIGNAL( returnPressed( const TQString& ) ), this, TQT_SLOT( getText( const TQString& ) ) );
+ connect( myResource->myAccel, TQT_SIGNAL( history_prev() ), this, TQT_SLOT( historyBackward() ) );
+ connect( myResource->myAccel, TQT_SIGNAL( history_next() ), this, TQT_SLOT( historyForward() ) );
+ connect( myResource->myAccel, TQT_SIGNAL( page_up() ), this, TQT_SLOT( pageUp() ) );
+ connect( myResource->myAccel, TQT_SIGNAL( page_down() ), this, TQT_SLOT( pageDown() ) );
+ connect( myResource->myAccel, TQT_SIGNAL( kibitz() ), this, TQT_SLOT( kibitz() ) );
+ connect( myResource->myAccel, TQT_SIGNAL( whisper() ), this, TQT_SLOT( whisper() ) );
+ connect( myResource->myAccel, TQT_SIGNAL( reply_tell() ), this, TQT_SLOT( replyPrivate() ) );
+ connect( myResource->myAccel, TQT_SIGNAL( reply_channel() ), this, TQT_SLOT( replyChannel() ) );
+ connect( myResource->myAccel, TQT_SIGNAL( focus() ), this, TQT_SLOT( getFocus() ) );
+ connect( myResource->myAccel, TQT_SIGNAL( focus( const TQChar& ) ), this, TQT_SLOT( getFocus( const TQChar& ) ) );
myTextView->show();
myLineEdit->show();
@@ -69,7 +69,7 @@ Console::~Console()
///////////////////////////////////////
void Console::pageDown( void )
{
- myTextView->pageMove( Qt::Key_PageDown );
+ myTextView->pageMove( TQt::Key_PageDown );
}
///////////////////////////////////////
//
@@ -87,7 +87,7 @@ void Console::pageUp( void )
///////////////////////////////////////
void Console::recvCMD( const Command& command )
{
- QString modText; /* this will hold the text to append after it has been modified with anchors */
+ TQString modText; /* this will hold the text to append after it has been modified with anchors */
switch(((Command)command).getCommand())
{
@@ -124,7 +124,7 @@ void Console::recvCMD( const Command& command )
// Console::getText
//
///////////////////////////////////////
-void Console::getText( const QString &text )
+void Console::getText( const TQString &text )
{
/* Append this text into our history */
history.append( text );
@@ -171,7 +171,7 @@ void Console::historyForward( void )
///////////////////////////////////////
void Console::replyPrivate( void )
{
- myLineEdit->setText( QString( "tell %1 " ).arg( lastPrivateSource ) );
+ myLineEdit->setText( TQString( "tell %1 " ).tqarg( lastPrivateSource ) );
if( !myLineEdit->hasFocus() )
getFocus();
}
@@ -182,7 +182,7 @@ void Console::replyPrivate( void )
///////////////////////////////////////
void Console::replyChannel( void )
{
- myLineEdit->setText( QString( "tell %1 " ).arg( lastChannelSource ) );
+ myLineEdit->setText( TQString( "tell %1 " ).tqarg( lastChannelSource ) );
if( !myLineEdit->hasFocus() )
getFocus();
}
@@ -193,7 +193,7 @@ void Console::replyChannel( void )
///////////////////////////////////////
void Console::kibitz( void )
{
- myLineEdit->setText( QString( "kibitz " ) );
+ myLineEdit->setText( TQString( "kibitz " ) );
if( !myLineEdit->hasFocus() )
getFocus();
}
@@ -204,7 +204,7 @@ void Console::kibitz( void )
///////////////////////////////////////
void Console::whisper( void )
{
- myLineEdit->setText( QString( "whisper " ) );
+ myLineEdit->setText( TQString( "whisper " ) );
if( !myLineEdit->hasFocus() )
getFocus();
}
@@ -223,9 +223,9 @@ void Console::getFocus( void )
myResource->tabManager->showTab( this );
myLineEdit->setFocus();
}
-void Console::getFocus( const QChar &c )
+void Console::getFocus( const TQChar &c )
{
- myLineEdit->setText( myLineEdit->text() + QString( c ) );
+ myLineEdit->setText( myLineEdit->text() + TQString( c ) );
if( !myLineEdit->hasFocus() )
getFocus();
}
@@ -236,29 +236,29 @@ void Console::getFocus( const QChar &c )
///////////////////////////////////////
void Console::setBG( void )
{
- myTextView->setPaper( QBrush( myResource->COLOR_Background ) );
+ myTextView->setPaper( TQBrush( myResource->COLOR_Background ) );
}
///////////////////////////////////////
//
-// Console::insertTags(QString data)
+// Console::insertTags(TQString data)
//
///////////////////////////////////////
-QString Console::insertTags(QString data)
+TQString Console::insertTags(TQString data)
{
- QRegExp hyperLinks("(http://(?:.)+(?:\\.(?:[^\\s\\r\\t<])+)+)");
- QRegExp mailLinks("\\b((?:\\w|\\d)+\\@(?:\\w|\\d)+(?:\\.(?:\\d|\\w)+)+)\\b");
+ TQRegExp hyperLinks("(http://(?:.)+(?:\\.(?:[^\\s\\r\\t<])+)+)");
+ TQRegExp mailLinks("\\b((?:\\w|\\d)+\\@(?:\\w|\\d)+(?:\\.(?:\\d|\\w)+)+)\\b");
int pos = 0;
pos = hyperLinks.search(data, 0);
if(pos >= 0)
{
- data.replace(hyperLinks, "<A HREF=\"" + hyperLinks.cap(0) + "\">" + hyperLinks.cap(0) + "</A>");
+ data.tqreplace(hyperLinks, "<A HREF=\"" + hyperLinks.cap(0) + "\">" + hyperLinks.cap(0) + "</A>");
}
pos = mailLinks.search(data, 0);
if(pos >= 0)
{
- data.replace(mailLinks, "<A HREF=\"mailto:" + mailLinks.cap(0) + "\">" + mailLinks.cap(0) + "</A>");
+ data.tqreplace(mailLinks, "<A HREF=\"mailto:" + mailLinks.cap(0) + "\">" + mailLinks.cap(0) + "</A>");
}
return data;
}
diff --git a/knights/console.h b/knights/console.h
index ec38ec9..2d9b814 100644
--- a/knights/console.h
+++ b/knights/console.h
@@ -18,10 +18,10 @@
#ifndef CONSOLE_H
#define CONSOLE_H
-/* Qt */
-#include <qstringlist.h>
-#include <qvbox.h>
-#include <qlayout.h>
+/* TQt */
+#include <tqstringlist.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
/* Local */
#include "definitions.h"
#include "resource.h"
@@ -34,9 +34,10 @@
class KLineEdit;
class KnightsTextView;
-class Console : public QVBox
+class Console : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -46,19 +47,19 @@ class Console : public QVBox
Down = 0
};
- Console(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ Console(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0);
~Console();
void buildAccel( void );
public slots:
void recvCMD( const Command& );
- void getText( const QString& );
+ void getText( const TQString& );
void historyBackward( void );
void historyForward( void );
void pageUp( void );
void pageDown( void );
void getFocus( void );
- void getFocus( const QChar& );
+ void getFocus( const TQChar& );
void setBG( void );
void replyPrivate( void );
void replyChannel( void );
@@ -69,7 +70,7 @@ class Console : public QVBox
void sendCMD( const Command& );
private:
- QString insertTags(QString);
+ TQString insertTags(TQString);
resource *myResource;
int margin;
@@ -78,10 +79,10 @@ class Console : public QVBox
KnightsTextView *myTextView;
KLineEdit *myLineEdit;
- QStringList history;
- QStringList::Iterator historyIT;
- QString lastPrivateSource;
- QString lastChannelSource;
+ TQStringList history;
+ TQStringList::Iterator historyIT;
+ TQString lastPrivateSource;
+ TQString lastChannelSource;
};
#endif
diff --git a/knights/core.cpp b/knights/core.cpp
index e0b09ce..69e59fd 100644
--- a/knights/core.cpp
+++ b/knights/core.cpp
@@ -19,8 +19,8 @@
#include <kfiledialog.h>
#include <kmessagebox.h>
-/* Qt */
-#include <qpushbutton.h>
+/* TQt */
+#include <tqpushbutton.h>
/* Local */
#include "core.moc"
@@ -39,7 +39,7 @@
// core::core
//
///////////////////////////////////////
-core::core(QWidget *parent, const char *name, resource *Rsrc ) : QWidget(parent,name)
+core::core(TQWidget *tqparent, const char *name, resource *Rsrc ) : TQWidget(tqparent,name)
{
myResource = Rsrc;
listPGN = NULL;
@@ -47,8 +47,8 @@ core::core(QWidget *parent, const char *name, resource *Rsrc ) : QWidget(parent,
myButtonGroup = new thinbuttons( this, "ButtonGroup", myResource );
myButtonGroup->show();
- connect( myButtonGroup, SIGNAL( leftClick(int) ), this, SLOT( setMatch(int) ) );
- connect( myButtonGroup, SIGNAL( menuItemSelected(int,int) ), this, SLOT( thinButtonMenu(int,int) ) );
+ connect( myButtonGroup, TQT_SIGNAL( leftClick(int) ), this, TQT_SLOT( setMatch(int) ) );
+ connect( myButtonGroup, TQT_SIGNAL( menuItemSelected(int,int) ), this, TQT_SLOT( thinButtonMenu(int,int) ) );
myCoreClock.start( 100, FALSE );
resize();
@@ -85,12 +85,12 @@ void core::createNewIO( int type, int ID, int side, int str )
internetioPtr = new io_internet( this, myResource );
myIOMap.add( ID, internetioPtr );
internetioPtr->setID( ID );
- connect( internetioPtr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2Match( const Command& ) ) );
+ connect( internetioPtr, TQT_SIGNAL( sendCMD( const Command& ) ), this, TQT_SLOT( command2Match( const Command& ) ) );
}
else
{
/* Use an existing internetIO */
- internetioPtr = (io_internet*) myIOMap.find(Null);
+ internetioPtr = (io_internet*) myIOMap.tqfind(Null);
if( internetioPtr == NULL )
{
kdWarning() << "core::createNewIO: Trying to connect a match to an internetIO that doesn't exsist." << endl;
@@ -110,16 +110,16 @@ void core::createNewIO( int type, int ID, int side, int str )
internetioPtr = new io_internet( this, myResource );
myIOMap.add( ID, internetioPtr );
internetioPtr->setID( ID );
- connect( internetioPtr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2Match( const Command& ) ) );
+ connect( internetioPtr, TQT_SIGNAL( sendCMD( const Command& ) ), this, TQT_SLOT( command2Match( const Command& ) ) );
}
else
{
- internetioPtr = (io_internet*) myIOMap.find(ID);
+ internetioPtr = (io_internet*) myIOMap.tqfind(ID);
if( internetioPtr == NULL )
{
/* no io mapped to the ID yet, use the internetio */
/* Use an existing internetIO */
- internetioPtr = (io_internet*) myIOMap.find(Null);
+ internetioPtr = (io_internet*) myIOMap.tqfind(Null);
if( internetioPtr == NULL )
{
kdWarning() << "core::createNewIO: Trying to connect a match to an internetIO that doesn't exsist." << endl;
@@ -137,16 +137,16 @@ void core::createNewIO( int type, int ID, int side, int str )
engineioPtr = new io_engine( this, myResource );
myIOMap.add( ID, engineioPtr );
engineioPtr->setID( ID );
- connect( engineioPtr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2Match( const Command& ) ) );
+ connect( engineioPtr, TQT_SIGNAL( sendCMD( const Command& ) ), this, TQT_SLOT( command2Match( const Command& ) ) );
engineioPtr->Start( side );
- engineioPtr->recvCMD( Command( ID, CMD_Set_Difficulty, QString().setNum( 1 << str ) ) );
+ engineioPtr->recvCMD( Command( ID, CMD_Set_Difficulty, TQString().setNum( 1 << str ) ) );
break;
/* PLAYEREMAIL */
case PLAYEREMAIL:
// ioEmailPtr = new io_email( this, myResource );
// myIOMap.add( ID, ioEmailPtr );
// ioEmailPtr->setID( ID );
-// connect( ioEmailPtr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2Match( const Command& ) ) );
+// connect( ioEmailPtr, TQT_SIGNAL( sendCMD( const Command& ) ), this, TQT_SLOT( command2Match( const Command& ) ) );
break;
default:
/* No IO needed */
@@ -180,8 +180,8 @@ match* core::newMatch( match_param* param )
createNewIO( param->type(BLACK), newID, BLACK, param->strength(BLACK) );
/* Connect Signals */
- connect( match_ptr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2IO( const Command& ) ) );
- connect( &myCoreClock, SIGNAL( timeout() ), match_ptr, SLOT( tick() ) );
+ connect( match_ptr, TQT_SIGNAL( sendCMD( const Command& ) ), this, TQT_SLOT( command2IO( const Command& ) ) );
+ connect( &myCoreClock, TQT_SIGNAL( timeout() ), match_ptr, TQT_SLOT( tick() ) );
/* Set this new match as the current match */
setMatch( newID );
@@ -206,20 +206,20 @@ void core::setMatch( int ID )
if( currentMatch != NULL )
{
currentMatch->setCurrent( FALSE );
- disconnect( currentMatch, SIGNAL( setClocks() ), this, SLOT( slot_setClocks() ) );
- disconnect( currentMatch, SIGNAL( setStatusBar( const int&, const QString& ) ), this, SLOT( slot_setStatusBar( const int&, const QString& ) ) );
- disconnect( currentMatch, SIGNAL( setNotation() ), this, SLOT( slot_setNotation() ) );
+ disconnect( currentMatch, TQT_SIGNAL( setClocks() ), this, TQT_SLOT( slot_setClocks() ) );
+ disconnect( currentMatch, TQT_SIGNAL( setStatusBar( const int&, const TQString& ) ), this, TQT_SLOT( slot_setStatusBar( const int&, const TQString& ) ) );
+ disconnect( currentMatch, TQT_SIGNAL( setNotation() ), this, TQT_SLOT( slot_setNotation() ) );
currentMatch->setVisibility( FALSE );
}
/*
Now display the new match, and connect it's signals to the GUI
*/
- currentMatch = myMatchMap.find( ID );
+ currentMatch = myMatchMap.tqfind( ID );
currentMatch->setVisibility( TRUE );
myButtonGroup->setButton( ID );
- connect( currentMatch, SIGNAL( setClocks() ), this, SLOT( slot_setClocks() ) );
- connect( currentMatch, SIGNAL( setStatusBar( const int&, const QString& ) ), this, SLOT( slot_setStatusBar( const int&, const QString& ) ) );
- connect( currentMatch, SIGNAL( setNotation() ), this, SLOT( slot_setNotation() ) );
+ connect( currentMatch, TQT_SIGNAL( setClocks() ), this, TQT_SLOT( slot_setClocks() ) );
+ connect( currentMatch, TQT_SIGNAL( setStatusBar( const int&, const TQString& ) ), this, TQT_SLOT( slot_setStatusBar( const int&, const TQString& ) ) );
+ connect( currentMatch, TQT_SIGNAL( setNotation() ), this, TQT_SLOT( slot_setNotation() ) );
currentMatch->setCurrent( TRUE );
emit requestResize();
emit initMatch();
@@ -227,7 +227,7 @@ void core::setMatch( int ID )
/* Give Ourselves Focus */
setActiveWindow();
- topLevelWidget()->raise();
+ tqtopLevelWidget()->raise();
}
///////////////////////////////////////
@@ -264,7 +264,7 @@ bool core::clearMatch( int id )
return FALSE;
}
}
- departingMatch = myMatchMap.find(id);
+ departingMatch = myMatchMap.tqfind(id);
/* A bad ID was passed */
if( departingMatch == NULL )
@@ -305,7 +305,7 @@ bool core::clearMatch( int id )
}
/* Remove IOs in this match... */
- ioPtr = myIOMap.find(id);
+ ioPtr = myIOMap.tqfind(id);
while( ioPtr != NULL )
{
myIOMap.remove( id );
@@ -313,7 +313,7 @@ bool core::clearMatch( int id )
{
delete ioPtr;
}
- ioPtr = myIOMap.find(id);
+ ioPtr = myIOMap.tqfind(id);
}
/* ...and remove the match */
@@ -357,7 +357,7 @@ void core::command2IO( const Command &command )
io_base *io;
int id = ((Command)command).getID();
- io = myIOMap.find(id);
+ io = myIOMap.tqfind(id);
while( io != NULL )
{
io->recvCMD(command);
@@ -375,7 +375,7 @@ void core::command2Match( const Command &command )
match *matchPtr;
Command cmd = command;
- matchPtr = myMatchMap.find( cmd.getID() );
+ matchPtr = myMatchMap.tqfind( cmd.getID() );
while( matchPtr != NULL )
{
/* Catch Commands Meant for Core */
@@ -438,9 +438,9 @@ bool core::flag( const bool Army )
// core::clock
//
///////////////////////////////////////
-QString core::clock( const bool Army )
+TQString core::clock( const bool Army )
{
- if( currentMatch == NULL ) return QString::null;
+ if( currentMatch == NULL ) return TQString();
return currentMatch->clock( Army );
return "";
}
@@ -499,11 +499,11 @@ char core::onMove( void )
// core::caption
//
///////////////////////////////////////
-QString core::caption( void )
+TQString core::caption( void )
{
- QButton *Button;
- if( currentMatch == NULL ) return QString::null;
- Button = myButtonGroup->find( currentMatch->getID() );
+ TQButton *Button;
+ if( currentMatch == NULL ) return TQString();
+ Button = myButtonGroup->tqfind( currentMatch->getID() );
if( Button != NULL ) Button->setText( currentMatch->caption() );
return currentMatch->caption();
}
@@ -552,7 +552,7 @@ char core::inputOnMove( bool reverse )
// core::notation
//
///////////////////////////////////////
-QStringList* core::notation( void )
+TQStringList* core::notation( void )
{
if( currentMatch == NULL ) return NULL;
return currentMatch->notation();
@@ -571,7 +571,7 @@ void core::slot_setNotation( void )
// core::slot_setStatusBar
//
///////////////////////////////////////
-void core::slot_setStatusBar( const int &ID, const QString& MSG )
+void core::slot_setStatusBar( const int &ID, const TQString& MSG )
{
emit setStatusBar( ID, MSG );
}
@@ -599,7 +599,7 @@ void core::print( int ID )
}
else
{
- m2p = myMatchMap.find( ID );
+ m2p = myMatchMap.tqfind( ID );
}
if( m2p == NULL ) return;
m2p->print();
@@ -612,21 +612,21 @@ void core::print( int ID )
///////////////////////////////////////
bool core::load( void )
{
- const QString fileFilter( "*.pgn *.Pgn *.PGN|Portable Game Notation (.pgn)\n*|All Files" );
- QString URL;
- URL = KFileDialog::getOpenFileName( QString::null, QString( fileFilter ), this, i18n( "Load PGN..." ) );
+ const TQString fileFilter( "*.pgn *.Pgn *.PGN|Portable Game Notation (.pgn)\n*|All Files" );
+ TQString URL;
+ URL = KFileDialog::getOpenFileName( TQString(), TQString( fileFilter ), this, i18n( "Load PGN..." ) );
if( URL.isEmpty() ) return FALSE;
return load( URL );
}
-bool core::load( const QString &IncURL )
+bool core::load( const TQString &IncURL )
{
listPGN = new list_pgn( 0, "listPGN" );
myResource->tabManager->addTab( listPGN, IncURL.section( '/', -1 ) );
- connect( listPGN, SIGNAL( selected( const QString&, const int& ) ), this, SLOT( load( const QString&, const int& ) ) );
+ connect( listPGN, TQT_SIGNAL( selected( const TQString&, const int& ) ), this, TQT_SLOT( load( const TQString&, const int& ) ) );
listPGN->setURL( IncURL );
return TRUE;
}
-bool core::load( const QString &url, const int &pos )
+bool core::load( const TQString &url, const int &pos )
{
newMatch( new match_param( myResource, PLAYERLOAD, PLAYERLOAD ) );
return currentMatch->load( url, pos );
@@ -638,10 +638,10 @@ bool core::load( const QString &url, const int &pos )
///////////////////////////////////////
bool core::save( const int ID, const bool Prompt, const bool SaveAs )
{
- const QString fileFilter( "*.pgn *.Pgn *.PGN|Portable Game Notation (.pgn)\n*|All Files" );
+ const TQString fileFilter( "*.pgn *.Pgn *.PGN|Portable Game Notation (.pgn)\n*|All Files" );
match *match2bSaved;
int answer;
- QString URL;
+ TQString URL;
if( ID == Null )
{
@@ -650,7 +650,7 @@ bool core::save( const int ID, const bool Prompt, const bool SaveAs )
}
else
{
- match2bSaved = myMatchMap.find( ID );
+ match2bSaved = myMatchMap.tqfind( ID );
}
if( match2bSaved == NULL ) return FALSE;
if( Prompt )
@@ -660,9 +660,9 @@ bool core::save( const int ID, const bool Prompt, const bool SaveAs )
answer = KMessageBox::warningYesNoCancel( this,
i18n("Would you like to save this match?"),
i18n("Save Match?"),
- QString::null,
- QString::null,
- QString("PromptForSaving") );
+ TQString(),
+ TQString(),
+ TQString("PromptForSaving") );
myResource->ConfigRead();
if( answer == KMessageBox::Cancel )
{
@@ -678,12 +678,12 @@ bool core::save( const int ID, const bool Prompt, const bool SaveAs )
if( ( URL.isEmpty() ) || ( SaveAs ) )
{
/* Get a new URL */
- URL = KFileDialog::getSaveFileName( QString::null, QString( fileFilter ), this, i18n( "Save Match..." ) );
+ URL = KFileDialog::getSaveFileName( TQString(), TQString( fileFilter ), this, i18n( "Save Match..." ) );
if( URL.isNull() )
{
return FALSE;
}
- if( URL.findRev( ".pgn", -1, FALSE ) == -1 )
+ if( URL.tqfindRev( ".pgn", -1, FALSE ) == -1 )
{
URL += ".pgn";
}
@@ -712,11 +712,11 @@ void core::matchMenu( int opt )
case MENU_ACCEPT_DRAW:
if( whiteInput() == PLAYERLOCAL )
{
- command2Match( Command( currentMatch->getID(), CMD_Offer_Draw, QString("W") ) );
+ command2Match( Command( currentMatch->getID(), CMD_Offer_Draw, TQString("W") ) );
}
if( blackInput() == PLAYERLOCAL )
{
- command2Match( Command( currentMatch->getID(), CMD_Offer_Draw, QString("B") ) );
+ command2Match( Command( currentMatch->getID(), CMD_Offer_Draw, TQString("B") ) );
}
command2IO( Command( currentMatch->getID(), CMD_Offer_Draw ) );
break;
@@ -756,7 +756,7 @@ void core::matchMenu( int opt )
case MENU_HINT:
currentMatch->requestHint();
break;
- /* Orientation */
+ /* Qt::Orientation */
case MENU_ORIENTATION:
currentMatch->flip();
break;
diff --git a/knights/core.h b/knights/core.h
index 5723112..5e8e66c 100644
--- a/knights/core.h
+++ b/knights/core.h
@@ -18,8 +18,8 @@
#ifndef CORE_H
#define CORE_H
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include "definitions.h"
#include "resource.h"
#include "knightsmap.h"
@@ -38,14 +38,15 @@ class match_param;
typedef KnightsMap<int, match*> MatchMap;
typedef KnightsMap<int, io_base*> IOMap;
-class core : public QWidget
+class core : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- core(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ core(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0);
~core();
- QStringList* notation( void );
- QString caption( void );
+ TQStringList* notation( void );
+ TQString caption( void );
bool modified( void );
bool paused( void );
bool isOnline( void );
@@ -69,18 +70,18 @@ class core : public QWidget
void resize( void );
bool save( const int ID, const bool Prompt, const bool SaveAs );
bool load( void );
- bool load( const QString& );
- bool load( const QString&, const int& );
+ bool load( const TQString& );
+ bool load( const TQString&, const int& );
void slot_setNotation( void );
void slot_setClocks( void );
- void slot_setStatusBar( const int&, const QString& );
+ void slot_setStatusBar( const int&, const TQString& );
void print( int ID=Null );
void review( int );
- QString clock( const bool );
+ TQString clock( const bool );
signals:
void requestResize( void );
- void setStatusBar( const int &ID, const QString& MSG=QString::null );
+ void setStatusBar( const int &ID, const TQString& MSG=TQString() );
void setNotation( void );
void setClocks( void );
void initMatch( void );
@@ -96,7 +97,7 @@ class core : public QWidget
private:
IDManager myIDManager;
resource *myResource;
- QTimer myCoreClock;
+ TQTimer myCoreClock;
thinbuttons *myButtonGroup;
list_pgn *listPGN;
IOMap myIOMap;
diff --git a/knights/definitions.h b/knights/definitions.h
index 858331d..c6d2811 100644
--- a/knights/definitions.h
+++ b/knights/definitions.h
@@ -34,7 +34,7 @@
#define CONFIG_VERSION 1
#include <kdebug.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
/*
These are used to define the game's states.
@@ -50,7 +50,7 @@ const int PLAYEREMAIL = 0x01; // Email Opponent
const int PLAYERTCP = 0x02; // Internet Chess Engine
const int PLAYERLOAD = 0x03; // Load from PGN
- /* Add a mask of 0x10 to players that accept user input */
+ /* Add a tqmask of 0x10 to players that accept user input */
const int PLAYERLOCAL = 0x10; // Human sitting at the PC
const int PLAYEREXAMINE = 0x11; // ICS Examine Mode
@@ -72,7 +72,7 @@ const int MENU_LOAD = 0x02;
const int MENU_SAVE = 0x03;
const int MENU_SAVEAS = 0x04;
const int MENU_PRINT = 0x05;
-const int MENU_QUIT = 0x06;
+const int MENU_TQUIT = 0x06;
const int MENU_CLOSE = 0x08;
const int MENU_CLOSEALL = 0x09;
const int MENU_CONNECT = 0x0A;
@@ -191,7 +191,7 @@ const int UCI = 0x04;
/* Events */
/*
- These constants represent QEvent types.
+ These constants represent TQEvent types.
*/
const int EVENT_Del_IO_Net = 0x000003e9;
@@ -236,12 +236,12 @@ const char ICS_Movelist = 3;
typedef struct ThemeHeader
{
- QString name;
- QString version;
- QString author;
- QString authorEmail;
- QString authorWWW;
- QString notes;
+ TQString name;
+ TQString version;
+ TQString author;
+ TQString authorEmail;
+ TQString authorWWW;
+ TQString notes;
};
typedef struct ChessMove
@@ -287,6 +287,6 @@ typedef struct TCP
int Increment;
};
-typedef QValueList<TCP> TCPList;
+typedef TQValueList<TCP> TCPList;
#endif
diff --git a/knights/dlg_challenge.cpp b/knights/dlg_challenge.cpp
index 51a983f..b5ac2ec 100644
--- a/knights/dlg_challenge.cpp
+++ b/knights/dlg_challenge.cpp
@@ -15,11 +15,11 @@
* *
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include "dlg_challenge.moc"
-dlg_challenge::dlg_challenge(QWidget *parent, const char *name, resource *Rsrc ) :
- KDialogBase( parent,
+dlg_challenge::dlg_challenge(TQWidget *tqparent, const char *name, resource *Rsrc ) :
+ KDialogBase( tqparent,
name,
FALSE,
i18n("You've Been Challenged:"),
@@ -33,22 +33,22 @@ dlg_challenge::dlg_challenge(QWidget *parent, const char *name, resource *Rsrc )
BOX_Parent = makeVBoxMainWidget();
- LABEL_Headline = new QLabel( BOX_Parent );
+ LABEL_Headline = new TQLabel( BOX_Parent );
COMBO_Rated = new KComboBox( BOX_Parent );
- BOX_Time = new QHBox( BOX_Parent );
- BOX_White = new QGroupBox( 2, Qt::Horizontal, "-", BOX_Time );
- BOX_WhiteBase = new QSpinBox( BOX_White );
- LABEL_WhiteBase = new QLabel( BOX_White );
- BOX_WhiteInc = new QSpinBox( BOX_White );
- LABEL_WhiteInc = new QLabel( BOX_White );
- BOX_Black = new QGroupBox( 2, Qt::Horizontal, "-", BOX_Time );
- BOX_BlackBase = new QSpinBox( BOX_Black );
- LABEL_BlackBase = new QLabel( BOX_Black );
- BOX_BlackInc = new QSpinBox( BOX_Black );
- LABEL_BlackInc = new QLabel( BOX_Black );
- BUTTON_TimeOdds = new QCheckBox( i18n("Time Odds Match"),BOX_Parent );
-
- LABEL_Headline->setAlignment( Qt::AlignCenter );
+ BOX_Time = new TQHBox( BOX_Parent );
+ BOX_White = new TQGroupBox( 2, Qt::Horizontal, "-", BOX_Time );
+ BOX_WhiteBase = new TQSpinBox( BOX_White );
+ LABEL_WhiteBase = new TQLabel( BOX_White );
+ BOX_WhiteInc = new TQSpinBox( BOX_White );
+ LABEL_WhiteInc = new TQLabel( BOX_White );
+ BOX_Black = new TQGroupBox( 2, Qt::Horizontal, "-", BOX_Time );
+ BOX_BlackBase = new TQSpinBox( BOX_Black );
+ LABEL_BlackBase = new TQLabel( BOX_Black );
+ BOX_BlackInc = new TQSpinBox( BOX_Black );
+ LABEL_BlackInc = new TQLabel( BOX_Black );
+ BUTTON_TimeOdds = new TQCheckBox( i18n("Time Odds Match"),BOX_Parent );
+
+ LABEL_Headline->tqsetAlignment( TQt::AlignCenter );
COMBO_Rated->setEditable( FALSE );
COMBO_Rated->insertItem( i18n("Unrated"), 0 );
COMBO_Rated->insertItem( i18n("Rated"), 1 );
@@ -82,18 +82,18 @@ dlg_challenge::~dlg_challenge()
{
}
-void dlg_challenge::setValues( const QString &string, const QString &local )
+void dlg_challenge::setValues( const TQString &string, const TQString &local )
{
/* we only need the first line, strip the rest */
- QString myString( string.section('\n', 0, 0) );
- QStringList list;
+ TQString myString( string.section('\n', 0, 0) );
+ TQStringList list;
/*remove all the white space between the rating brackets*/
- myString.replace( QRegExp("\\(\\s"), "(" );
- myString.replace( QRegExp("\\s\\)"), ")" );
+ myString.tqreplace( TQRegExp("\\(\\s"), "(" );
+ myString.tqreplace( TQRegExp("\\s\\)"), ")" );
- list = QStringList::split( QChar(' '), myString, FALSE );
- list[7].replace(QRegExp("\\."), "");
+ list = TQStringList::split( TQChar(' '), myString, FALSE );
+ list[7].tqreplace(TQRegExp("\\."), "");
if( list[0] == local )
{
localRating = list[1];
@@ -107,7 +107,7 @@ void dlg_challenge::setValues( const QString &string, const QString &local )
localRating = list[3];
}
LABEL_Headline->setText( i18n("%1 %2 vs. %3 %4\nin a %5 match.")
- .arg(local).arg(localRating).arg(otherPlayer).arg(otherRating).arg(list[5]) );
+ .tqarg(local).tqarg(localRating).tqarg(otherPlayer).tqarg(otherRating).tqarg(list[5]) );
if( list[4].lower() == "rated" )
{
COMBO_Rated->setCurrentItem(1);
@@ -125,26 +125,26 @@ void dlg_challenge::setValues( const QString &string, const QString &local )
// BOX_Black->setEnabled( FALSE );
// BUTTON_TimeOdds->setChecked( FALSE );
- connect( COMBO_Rated, SIGNAL( activated(int) ), this, SLOT( slot_changed(int) ) );
- connect( BOX_WhiteBase, SIGNAL( valueChanged(int) ), this, SLOT( slot_changed(int) ) );
- connect( BOX_WhiteInc, SIGNAL( valueChanged(int) ), this, SLOT( slot_changed(int) ) );
- connect( BOX_BlackBase, SIGNAL( valueChanged(int) ), this, SLOT( slot_changed(int) ) );
- connect( BOX_BlackInc, SIGNAL( valueChanged(int) ), this, SLOT( slot_changed(int) ) );
- connect( BUTTON_TimeOdds, SIGNAL( stateChanged(int) ), this, SLOT( slot_changed(int) ) );
- connect( BUTTON_TimeOdds, SIGNAL( toggled(bool) ), this, SLOT( slot_timeOdds(bool) ) );
+ connect( COMBO_Rated, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slot_changed(int) ) );
+ connect( BOX_WhiteBase, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slot_changed(int) ) );
+ connect( BOX_WhiteInc, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slot_changed(int) ) );
+ connect( BOX_BlackBase, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slot_changed(int) ) );
+ connect( BOX_BlackInc, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slot_changed(int) ) );
+ connect( BUTTON_TimeOdds, TQT_SIGNAL( stateChanged(int) ), this, TQT_SLOT( slot_changed(int) ) );
+ connect( BUTTON_TimeOdds, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slot_timeOdds(bool) ) );
}
-QString dlg_challenge::values( void )
+TQString dlg_challenge::values( void )
{
- QString match;
- match = QString("match %1").arg(otherPlayer);
+ TQString match;
+ match = TQString("match %1").tqarg(otherPlayer);
if( COMBO_Rated->currentItem() == 0 )
match += " unrated";
else
match += " rated";
- match += QString(" %1 %1").arg(BOX_WhiteBase->value()).arg(BOX_WhiteInc->value());
+ match += TQString(" %1 %1").tqarg(BOX_WhiteBase->value()).tqarg(BOX_WhiteInc->value());
if( BUTTON_TimeOdds->isChecked() )
- match += QString(" %1 %1").arg(BOX_BlackBase->value()).arg(BOX_BlackInc->value());
+ match += TQString(" %1 %1").tqarg(BOX_BlackBase->value()).tqarg(BOX_BlackInc->value());
return match;
}
diff --git a/knights/dlg_challenge.h b/knights/dlg_challenge.h
index 2fbfb68..e21da4a 100644
--- a/knights/dlg_challenge.h
+++ b/knights/dlg_challenge.h
@@ -20,12 +20,12 @@
#include <kdialogbase.h>
#include <kcombobox.h>
-#include <qgroupbox.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqgroupbox.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
#include "resource.h"
/**
@@ -35,35 +35,36 @@
class dlg_challenge : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- dlg_challenge(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ dlg_challenge(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0);
~dlg_challenge();
- void setValues( const QString&, const QString& );
- QString values( void );
+ void setValues( const TQString&, const TQString& );
+ TQString values( void );
public slots:
void slot_changed( int );
void slot_timeOdds( bool );
private:
resource *Resource;
- QString otherPlayer;
- QString localRating;
- QString otherRating;
+ TQString otherPlayer;
+ TQString localRating;
+ TQString otherRating;
- QVBox *BOX_Parent;
- QLabel *LABEL_Headline;
+ TQVBox *BOX_Parent;
+ TQLabel *LABEL_Headline;
KComboBox *COMBO_Rated;
- QHBox *BOX_Time;
- QGroupBox *BOX_White;
- QSpinBox *BOX_WhiteBase;
- QSpinBox *BOX_WhiteInc;
- QLabel *LABEL_WhiteBase;
- QLabel *LABEL_WhiteInc;
- QGroupBox *BOX_Black;
- QSpinBox *BOX_BlackBase;
- QSpinBox *BOX_BlackInc;
- QLabel *LABEL_BlackBase;
- QLabel *LABEL_BlackInc;
- QCheckBox *BUTTON_TimeOdds;
+ TQHBox *BOX_Time;
+ TQGroupBox *BOX_White;
+ TQSpinBox *BOX_WhiteBase;
+ TQSpinBox *BOX_WhiteInc;
+ TQLabel *LABEL_WhiteBase;
+ TQLabel *LABEL_WhiteInc;
+ TQGroupBox *BOX_Black;
+ TQSpinBox *BOX_BlackBase;
+ TQSpinBox *BOX_BlackInc;
+ TQLabel *LABEL_BlackBase;
+ TQLabel *LABEL_BlackInc;
+ TQCheckBox *BUTTON_TimeOdds;
};
#endif
diff --git a/knights/dlg_engine.cpp b/knights/dlg_engine.cpp
index c2f767e..ebef625 100644
--- a/knights/dlg_engine.cpp
+++ b/knights/dlg_engine.cpp
@@ -19,8 +19,8 @@
#include <kicontheme.h>
#include "dlg_engine.moc"
-dlg_engine::dlg_engine(QWidget *parent, const char *name, resource *Rsrc, QString ItemName ) :
- KDialogBase( parent,
+dlg_engine::dlg_engine(TQWidget *tqparent, const char *name, resource *Rsrc, TQString ItemName ) :
+ KDialogBase( tqparent,
name,
TRUE,
i18n("Configure Engine"),
@@ -32,43 +32,43 @@ dlg_engine::dlg_engine(QWidget *parent, const char *name, resource *Rsrc, QStrin
Name = ItemName;
BOX_Parent = makeVBoxMainWidget();
- BOX_NameProto = new QHBox( BOX_Parent );
- BOX_Name = new QGroupBox( 1,
+ BOX_NameProto = new TQHBox( BOX_Parent );
+ BOX_Name = new TQGroupBox( 1,
Qt::Horizontal,
i18n( "Engine Name" ),
BOX_NameProto );
EDIT_Name = new KLineEdit( BOX_Name );
- BOX_Protocol = new QGroupBox( 1,
+ BOX_Protocol = new TQGroupBox( 1,
Qt::Horizontal,
i18n( "Protocol" ),
BOX_NameProto );
EDIT_Protocol = new KComboBox( BOX_Protocol );
- BOX_Filename = new QGroupBox( 2,
+ BOX_Filename = new TQGroupBox( 2,
Qt::Horizontal,
i18n( "Engine Filename" ),
BOX_Parent );
EDIT_Filename = new KLineEdit( BOX_Filename );
- BUTTON_Filename = new QPushButton( BOX_Filename );
- BOX_Arguments = new QGroupBox( 1,
+ BUTTON_Filename = new TQPushButton( BOX_Filename );
+ BOX_Arguments = new TQGroupBox( 1,
Qt::Horizontal,
i18n( "Command Line Arguments" ),
BOX_Parent );
EDIT_Arguments = new KLineEdit( BOX_Arguments );
- BOX_LogFile = new QGroupBox( 2,
+ BOX_LogFile = new TQGroupBox( 2,
Qt::Horizontal,
i18n( "Log File" ),
BOX_Parent );
EDIT_LogFile = new KLineEdit( BOX_LogFile );
- BUTTON_LogFile = new QPushButton( BOX_LogFile );
+ BUTTON_LogFile = new TQPushButton( BOX_LogFile );
setMainWidget( BOX_Parent );
- BUTTON_Filename->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
- BUTTON_LogFile->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
+ BUTTON_Filename->setPixmap( Resource->LoadIcon( TQString( "fileopen" ), KIcon::Toolbar ) );
+ BUTTON_LogFile->setPixmap( Resource->LoadIcon( TQString( "fileopen" ), KIcon::Toolbar ) );
EDIT_Name->setMinimumWidth( 150 );
EDIT_Filename->setMinimumWidth( 300 );
EDIT_Arguments->setMinimumWidth( 300 );
/* Protocol ComboBox */
- EDIT_Protocol->insertItem( QString( "XBoard" ) );
- EDIT_Protocol->insertItem( QString( "UCI" ) );
+ EDIT_Protocol->insertItem( TQString( "XBoard" ) );
+ EDIT_Protocol->insertItem( TQString( "UCI" ) );
EDIT_Protocol->setEditable( FALSE );
/* Load in data if this is a modification */
if( !Name.isEmpty() )
@@ -104,11 +104,11 @@ dlg_engine::dlg_engine(QWidget *parent, const char *name, resource *Rsrc, QStrin
enableButtonApply( FALSE );
enableButton( Help, TRUE );
- setHelp( QString( "configure-engines" ) );
+ setHelp( TQString( "configure-engines" ) );
/* Make Connections */
- connect( BUTTON_Filename, SIGNAL( clicked() ), this, SLOT( slotFilenameDialog() ) );
- connect( BUTTON_LogFile, SIGNAL( clicked() ), this, SLOT( slotLogFileDialog() ) );
- connect( EDIT_Protocol, SIGNAL( activated(int) ), this, SLOT( slotProtocol(int) ) );
+ connect( BUTTON_Filename, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFilenameDialog() ) );
+ connect( BUTTON_LogFile, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotLogFileDialog() ) );
+ connect( EDIT_Protocol, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotProtocol(int) ) );
show();
}
///////////////////////////////////////
@@ -180,18 +180,18 @@ void dlg_engine::slotCancel( void )
///////////////////////////////////////
void dlg_engine::slotFilenameDialog( void )
{
- QString temp;
+ TQString temp;
int tmp;
- temp = KFileDialog::getOpenFileName( QString::null,
- QString( "*" ),
+ temp = KFileDialog::getOpenFileName( TQString(),
+ TQString( "*" ),
this,
- QString( "Find Engine..." ) );
+ TQString( "Find Engine..." ) );
if( temp.isEmpty() ) return;
EDIT_Filename->setText( temp );
if( EDIT_Name->text().isEmpty() )
{
- tmp = temp.findRev( '/' );
+ tmp = temp.tqfindRev( '/' );
EDIT_Name->setText( temp.remove( 0, tmp + 1 ) );
}
enableButtonApply( TRUE );
@@ -203,12 +203,12 @@ void dlg_engine::slotFilenameDialog( void )
///////////////////////////////////////
void dlg_engine::slotLogFileDialog( void )
{
- QString temp;
+ TQString temp;
- temp = KFileDialog::getOpenFileName( QString::null,
- QString( "*" ),
+ temp = KFileDialog::getOpenFileName( TQString(),
+ TQString( "*" ),
this,
- QString( "Find Log..." ) );
+ TQString( "Find Log..." ) );
if( temp.isEmpty() ) return;
EDIT_LogFile->setText( temp );
enableButtonApply( TRUE );
diff --git a/knights/dlg_engine.h b/knights/dlg_engine.h
index 0bd13af..f8ca56b 100644
--- a/knights/dlg_engine.h
+++ b/knights/dlg_engine.h
@@ -21,11 +21,11 @@
#include <kdialogbase.h>
#include <klineedit.h>
#include <kcombobox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qstring.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqstring.h>
#include "definitions.h"
#include "resource.h"
@@ -36,8 +36,9 @@
class dlg_engine : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- dlg_engine(QWidget *parent=0, const char *name=0, resource *Rsrc=0, QString ItemName="" );
+ dlg_engine(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0, TQString ItemName="" );
~dlg_engine();
public slots:
@@ -51,26 +52,26 @@ class dlg_engine : public KDialogBase
private:
engineList::Iterator enginesIT;
resource *Resource;
- QString Name;
+ TQString Name;
- QVBox *BOX_Parent;
- QHBox *BOX_NameProto;
+ TQVBox *BOX_Parent;
+ TQHBox *BOX_NameProto;
- QGroupBox *BOX_Name;
+ TQGroupBox *BOX_Name;
KLineEdit *EDIT_Name;
- QGroupBox *BOX_Protocol;
+ TQGroupBox *BOX_Protocol;
KComboBox *EDIT_Protocol;
- QGroupBox *BOX_Filename;
+ TQGroupBox *BOX_Filename;
KLineEdit *EDIT_Filename;
- QPushButton *BUTTON_Filename;
+ TQPushButton *BUTTON_Filename;
- QGroupBox *BOX_LogFile;
+ TQGroupBox *BOX_LogFile;
KLineEdit *EDIT_LogFile;
- QPushButton *BUTTON_LogFile;
+ TQPushButton *BUTTON_LogFile;
- QGroupBox *BOX_Arguments;
+ TQGroupBox *BOX_Arguments;
KLineEdit *EDIT_Arguments;
};
diff --git a/knights/dlg_login.cpp b/knights/dlg_login.cpp
index 103ff91..550b837 100644
--- a/knights/dlg_login.cpp
+++ b/knights/dlg_login.cpp
@@ -17,8 +17,8 @@
#include "dlg_login.moc"
-dlg_login::dlg_login(QWidget *parent, const char *name, resource *rsrc) :
- KDialogBase(parent, name, TRUE, i18n("Login Prompt"), Help|Ok|Cancel, Ok,TRUE )
+dlg_login::dlg_login(TQWidget *tqparent, const char *name, resource *rsrc) :
+ KDialogBase(tqparent, name, TRUE, i18n("Login Prompt"), Help|Ok|Cancel, Ok,TRUE )
{
serverList::Iterator i;
serverList::Iterator currentServer;
@@ -29,7 +29,7 @@ dlg_login::dlg_login(QWidget *parent, const char *name, resource *rsrc) :
BOX_Parent = makeVBoxMainWidget();
/* Select which server to connect to */
- GROUP_Select_Server = new QGroupBox( 1, Qt::Vertical, i18n( "Select Server" ), BOX_Parent );
+ GROUP_Select_Server = new TQGroupBox( 1, Qt::Vertical, i18n( "Select Server" ), BOX_Parent );
COMBO_Select_Server = new KComboBox ( GROUP_Select_Server );
COMBO_Select_Server->setEditable( FALSE );
@@ -46,26 +46,26 @@ dlg_login::dlg_login(QWidget *parent, const char *name, resource *rsrc) :
counter++;
}
/* connect to right signal to the combobox */
- connect( COMBO_Select_Server, SIGNAL( activated(const QString &) ), this, SLOT( slotUpdateUser(const QString &) ) );
+ connect( COMBO_Select_Server, TQT_SIGNAL( activated(const TQString &) ), this, TQT_SLOT( slotUpdateUser(const TQString &) ) );
- GROUP_Username = new QGroupBox( 1, Qt::Horizontal, i18n("User info"), BOX_Parent);
- BOX_ALIGN = new QHBox( GROUP_Username );
- BOX_TEXT = new QVBox( BOX_ALIGN );
- TEXT_Login = new QLabel( BOX_TEXT );
- TEXT_Password = new QLabel( BOX_TEXT );
+ GROUP_Username = new TQGroupBox( 1, Qt::Horizontal, i18n("User info"), BOX_Parent);
+ BOX_ALIGN = new TQHBox( GROUP_Username );
+ BOX_TEXT = new TQVBox( BOX_ALIGN );
+ TEXT_Login = new TQLabel( BOX_TEXT );
+ TEXT_Password = new TQLabel( BOX_TEXT );
TEXT_Login->setText( i18n("Login:") );
TEXT_Password->setText( i18n("Password:") );
- BOX_EDIT = new QVBox( BOX_ALIGN );
+ BOX_EDIT = new TQVBox( BOX_ALIGN );
EDIT_Login = new KLineEdit( BOX_EDIT );
EDIT_Password = new KLineEdit( BOX_EDIT );
- CHECKBOX_GUEST = new QCheckBox(i18n("Log in as guest"), GROUP_Username);
+ CHECKBOX_GUEST = new TQCheckBox(i18n("Log in as guest"), GROUP_Username);
- EDIT_Password->setEchoMode( QLineEdit::Password );
+ EDIT_Password->setEchoMode( TQLineEdit::Password );
- connect(CHECKBOX_GUEST, SIGNAL(toggled(bool)), this, SLOT(slotGuestToggle(bool)));
+ connect(CHECKBOX_GUEST, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotGuestToggle(bool)));
/* Init the buttons */
showButtonCancel( TRUE );
@@ -125,7 +125,7 @@ void dlg_login::slotGuestToggle( bool on )
// dlg_login::slotUpdateUser
//
///////////////////////////////////////
-void dlg_login::slotUpdateUser(const QString &name)
+void dlg_login::slotUpdateUser(const TQString &name)
{
/* this function retrieves the correct serverResource from
the resources and uses that to fill in the username and
diff --git a/knights/dlg_login.h b/knights/dlg_login.h
index 1c02f18..8421b8f 100644
--- a/knights/dlg_login.h
+++ b/knights/dlg_login.h
@@ -18,12 +18,12 @@
#ifndef DLG_LOGIN_H
#define DLG_LOGIN_H
-#include <qwidget.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqwidget.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <kdialogbase.h>
#include <klineedit.h>
@@ -38,32 +38,33 @@
class dlg_login : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- dlg_login(QWidget *parent, const char *name=0, resource *rsrc = NULL);
+ dlg_login(TQWidget *tqparent, const char *name=0, resource *rsrc = NULL);
~dlg_login();
void disableServerSelect();
public slots:
void slotOk( void );
void slotGuestToggle( bool );
- void slotUpdateUser(const QString&);
+ void slotUpdateUser(const TQString&);
signals:
- void login(QString userName, QString passWord);
+ void login(TQString userName, TQString passWord);
private:
- QVBox *BOX_Parent;
- QVBox *BOX_TEXT;
- QVBox *BOX_EDIT;
- QHBox *BOX_ALIGN;
+ TQVBox *BOX_Parent;
+ TQVBox *BOX_TEXT;
+ TQVBox *BOX_EDIT;
+ TQHBox *BOX_ALIGN;
KLineEdit *EDIT_Login;
KLineEdit *EDIT_Password;
- QLabel *TEXT_Login;
- QLabel *TEXT_Password;
- QCheckBox *CHECKBOX_GUEST;
- QGroupBox *GROUP_Select_Server;
- QGroupBox *GROUP_Username;
+ TQLabel *TEXT_Login;
+ TQLabel *TEXT_Password;
+ TQCheckBox *CHECKBOX_GUEST;
+ TQGroupBox *GROUP_Select_Server;
+ TQGroupBox *GROUP_Username;
KComboBox *COMBO_Select_Server;
resource *myResource;
diff --git a/knights/dlg_newmatch.cpp b/knights/dlg_newmatch.cpp
index ff85497..f49c825 100644
--- a/knights/dlg_newmatch.cpp
+++ b/knights/dlg_newmatch.cpp
@@ -17,15 +17,15 @@
#include "dlg_newmatch.moc"
#include <kcombobox.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qspinbox.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qgrid.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqgrid.h>
#include "resource.h"
#include "dlg_selectengine.h"
#include "dlg_selectemail.h"
@@ -34,39 +34,39 @@
#define _TYPE_PC_ 1
#define _TYPE_EMAIL_ 2
-dlg_newmatch::dlg_newmatch(QWidget *parent, const char *name, resource *Rsrc ) :
-KDialogBase(parent, name, TRUE, i18n("Start a New Match"), Cancel|Ok|Help, Ok, TRUE )
+dlg_newmatch::dlg_newmatch(TQWidget *tqparent, const char *name, resource *Rsrc ) :
+KDialogBase(tqparent, name, TRUE, i18n("Start a New Match"), Cancel|Ok|Help, Ok, TRUE )
{
myResource = Rsrc;
Param = new match_param( myResource );
BOX_Parent = makeHBoxMainWidget();
- BOX_Players = new QVBox( BOX_Parent );
+ BOX_Players = new TQVBox( BOX_Parent );
- BOX_White = new QGroupBox(3, Qt::Horizontal, i18n("White"), BOX_Players );
- BOX_Black = new QGroupBox(3, Qt::Horizontal, i18n("Black"), BOX_Players );
+ BOX_White = new TQGroupBox(3, Qt::Horizontal, i18n("White"), BOX_Players );
+ BOX_Black = new TQGroupBox(3, Qt::Horizontal, i18n("Black"), BOX_Players );
- IMAGE_White = new QLabel( BOX_White );
- IMAGE_Black = new QLabel( BOX_Black );
+ IMAGE_White = new TQLabel( BOX_White );
+ IMAGE_Black = new TQLabel( BOX_Black );
- BOX_White_Detail = new QVBox( BOX_White );
- BOX_Black_Detail = new QVBox( BOX_Black );
+ BOX_White_Detail = new TQVBox( BOX_White );
+ BOX_Black_Detail = new TQVBox( BOX_Black );
- LABEL_White_Name = new QLabel( BOX_White_Detail );
- LABEL_Black_Name = new QLabel( BOX_Black_Detail );
+ LABEL_White_Name = new TQLabel( BOX_White_Detail );
+ LABEL_Black_Name = new TQLabel( BOX_Black_Detail );
- GROUP_White_Type = new QButtonGroup( 3, Qt::Vertical, BOX_White_Detail );
+ GROUP_White_Type = new TQButtonGroup( 3, Qt::Vertical, BOX_White_Detail );
GROUP_White_Type->setExclusive( TRUE );
- RADIO_White_Human = new QRadioButton( i18n("Human"), GROUP_White_Type );
- RADIO_White_PC = new QRadioButton( i18n("Computer"), GROUP_White_Type );
- RADIO_White_Email = new QRadioButton( i18n("Email"), GROUP_White_Type );
- connect( GROUP_White_Type, SIGNAL( clicked(int)), this, SLOT( slotWhiteType(int)));
+ RADIO_White_Human = new TQRadioButton( i18n("Human"), GROUP_White_Type );
+ RADIO_White_PC = new TQRadioButton( i18n("Computer"), GROUP_White_Type );
+ RADIO_White_Email = new TQRadioButton( i18n("Email"), GROUP_White_Type );
+ connect( GROUP_White_Type, TQT_SIGNAL( clicked(int)), this, TQT_SLOT( slotWhiteType(int)));
- GROUP_Black_Type = new QButtonGroup( 3, Qt::Vertical, BOX_Black_Detail );
+ GROUP_Black_Type = new TQButtonGroup( 3, Qt::Vertical, BOX_Black_Detail );
GROUP_Black_Type->setExclusive( TRUE );
- RADIO_Black_Human = new QRadioButton( i18n("Human"), GROUP_Black_Type );
- RADIO_Black_PC = new QRadioButton( i18n("Computer"), GROUP_Black_Type );
- RADIO_Black_Email = new QRadioButton( i18n("Email"), GROUP_Black_Type );
- connect( GROUP_Black_Type, SIGNAL( clicked(int)), this, SLOT( slotBlackType(int)));
+ RADIO_Black_Human = new TQRadioButton( i18n("Human"), GROUP_Black_Type );
+ RADIO_Black_PC = new TQRadioButton( i18n("Computer"), GROUP_Black_Type );
+ RADIO_Black_Email = new TQRadioButton( i18n("Email"), GROUP_Black_Type );
+ connect( GROUP_Black_Type, TQT_SIGNAL( clicked(int)), this, TQT_SLOT( slotBlackType(int)));
/* Disable Unconfigured Types */
if( !myResource->engines.count() )
@@ -81,44 +81,44 @@ KDialogBase(parent, name, TRUE, i18n("Start a New Match"), Cancel|Ok|Help, Ok, T
}
/* Time for White */
- GRID_White_Time = new QGrid( 2, Qt::Horizontal, BOX_White );
- LABEL_White_Base = new QLabel( i18n("Base Time:"), GRID_White_Time );
- SPIN_White_Base = new QSpinBox( 0, 120, 1, GRID_White_Time );
+ GRID_White_Time = new TQGrid( 2, Qt::Horizontal, BOX_White );
+ LABEL_White_Base = new TQLabel( i18n("Base Time:"), GRID_White_Time );
+ SPIN_White_Base = new TQSpinBox( 0, 120, 1, GRID_White_Time );
SPIN_White_Base->setSuffix( i18n(" min.") );
- connect( SPIN_White_Base, SIGNAL( valueChanged(int)), this, SLOT( slotWhiteBase(int)));
+ connect( SPIN_White_Base, TQT_SIGNAL( valueChanged(int)), this, TQT_SLOT( slotWhiteBase(int)));
- LABEL_White_Moves = new QLabel( i18n("Moves Per Base Time"), GRID_White_Time );
- SPIN_White_Moves = new QSpinBox( 0, 100, 5, GRID_White_Time );
+ LABEL_White_Moves = new TQLabel( i18n("Moves Per Base Time"), GRID_White_Time );
+ SPIN_White_Moves = new TQSpinBox( 0, 100, 5, GRID_White_Time );
SPIN_White_Moves->setSuffix( i18n(" moves") );
- connect( SPIN_White_Moves, SIGNAL( valueChanged(int)), this, SLOT( slotWhiteMoves(int)));
+ connect( SPIN_White_Moves, TQT_SIGNAL( valueChanged(int)), this, TQT_SLOT( slotWhiteMoves(int)));
- LABEL_White_Inc = new QLabel( i18n("Increment Per Move"), GRID_White_Time );
- SPIN_White_Inc = new QSpinBox( 0, 120, 1, GRID_White_Time );
+ LABEL_White_Inc = new TQLabel( i18n("Increment Per Move"), GRID_White_Time );
+ SPIN_White_Inc = new TQSpinBox( 0, 120, 1, GRID_White_Time );
SPIN_White_Inc->setSuffix( i18n(" sec.") );
- connect( SPIN_White_Inc, SIGNAL( valueChanged(int)), this, SLOT( slotWhiteInc(int)));
+ connect( SPIN_White_Inc, TQT_SIGNAL( valueChanged(int)), this, TQT_SLOT( slotWhiteInc(int)));
/* Time for Black */
- GRID_Black_Time = new QGrid( 2, Qt::Horizontal, BOX_Black );
- LABEL_Black_Base = new QLabel( i18n("Base Time:"), GRID_Black_Time );
- SPIN_Black_Base = new QSpinBox( 0, 120, 1, GRID_Black_Time );
+ GRID_Black_Time = new TQGrid( 2, Qt::Horizontal, BOX_Black );
+ LABEL_Black_Base = new TQLabel( i18n("Base Time:"), GRID_Black_Time );
+ SPIN_Black_Base = new TQSpinBox( 0, 120, 1, GRID_Black_Time );
SPIN_Black_Base->setSuffix( i18n(" min.") );
- connect( SPIN_Black_Base, SIGNAL( valueChanged(int)), this, SLOT( slotBlackBase(int)));
+ connect( SPIN_Black_Base, TQT_SIGNAL( valueChanged(int)), this, TQT_SLOT( slotBlackBase(int)));
- LABEL_Black_Moves = new QLabel( i18n("Moves Per Base Time"), GRID_Black_Time );
- SPIN_Black_Moves = new QSpinBox( 0, 100, 5, GRID_Black_Time );
+ LABEL_Black_Moves = new TQLabel( i18n("Moves Per Base Time"), GRID_Black_Time );
+ SPIN_Black_Moves = new TQSpinBox( 0, 100, 5, GRID_Black_Time );
SPIN_Black_Moves->setSuffix( i18n(" moves") );
- connect( SPIN_Black_Moves, SIGNAL( valueChanged(int)), this, SLOT( slotBlackMoves(int)));
+ connect( SPIN_Black_Moves, TQT_SIGNAL( valueChanged(int)), this, TQT_SLOT( slotBlackMoves(int)));
- LABEL_Black_Inc = new QLabel( i18n("Increment Per Move"), GRID_Black_Time );
- SPIN_Black_Inc = new QSpinBox( 0, 120, 1, GRID_Black_Time );
+ LABEL_Black_Inc = new TQLabel( i18n("Increment Per Move"), GRID_Black_Time );
+ SPIN_Black_Inc = new TQSpinBox( 0, 120, 1, GRID_Black_Time );
SPIN_Black_Inc->setSuffix( i18n(" sec.") );
- connect( SPIN_Black_Inc, SIGNAL( valueChanged(int)), this, SLOT( slotBlackInc(int)));
+ connect( SPIN_Black_Inc, TQT_SIGNAL( valueChanged(int)), this, TQT_SLOT( slotBlackInc(int)));
setTCP();
setTypes();
setNames();
setImages();
- setHelp( QString( "new-match-dialog" ) );
+ setHelp( TQString( "new-match-dialog" ) );
}
dlg_newmatch::~dlg_newmatch()
@@ -242,14 +242,14 @@ void dlg_newmatch::slotWhiteType( int type )
if( type == _TYPE_PC_ )
{
EngineSelect = new dlg_selectengine( this, myResource, WHITE );
- connect( EngineSelect, SIGNAL( valuesChanged() ), this, SLOT( slotReparse() ) );
+ connect( EngineSelect, TQT_SIGNAL( valuesChanged() ), this, TQT_SLOT( slotReparse() ) );
EngineSelect->exec();
Param->setType( WHITE, PLAYERPC );
}
else if( type == _TYPE_EMAIL_ )
{
EmailSelect = new dlg_selectemail( this, myResource );
- connect( EmailSelect, SIGNAL( valuesChanged() ), this, SLOT( slotReparse() ) );
+ connect( EmailSelect, TQT_SIGNAL( valuesChanged() ), this, TQT_SLOT( slotReparse() ) );
EmailSelect->exec();
Param->setType( WHITE, PLAYEREMAIL );
}
@@ -313,14 +313,14 @@ void dlg_newmatch::slotBlackType( int type )
if( type == _TYPE_PC_ )
{
EngineSelect = new dlg_selectengine( this, myResource, BLACK );
- connect( EngineSelect, SIGNAL( valuesChanged() ), this, SLOT( slotReparse() ) );
+ connect( EngineSelect, TQT_SIGNAL( valuesChanged() ), this, TQT_SLOT( slotReparse() ) );
EngineSelect->exec();
Param->setType( BLACK, PLAYERPC );
}
else if( type == _TYPE_EMAIL_ )
{
EmailSelect = new dlg_selectemail( this, myResource );
- connect( EmailSelect, SIGNAL( valuesChanged() ), this, SLOT( slotReparse() ) );
+ connect( EmailSelect, TQT_SIGNAL( valuesChanged() ), this, TQT_SLOT( slotReparse() ) );
EmailSelect->exec();
Param->setType( BLACK, PLAYEREMAIL );
}
diff --git a/knights/dlg_newmatch.h b/knights/dlg_newmatch.h
index 82b5e57..af3ef98 100644
--- a/knights/dlg_newmatch.h
+++ b/knights/dlg_newmatch.h
@@ -18,7 +18,7 @@
#ifndef DLG_NEWMATCH_H
#define DLG_NEWMATCH_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
#include "match_param.h"
@@ -30,61 +30,62 @@
class dlg_selectengine;
class dlg_selectemail;
class resource;
-class QLabel;
-class QSpinBox;
-class QRadioButton;
-class QCheckBox;
-class QVBox;
-class QHBox;
-class QGrid;
-class QButtonGroup;
-class QGroupBox;
+class TQLabel;
+class TQSpinBox;
+class TQRadioButton;
+class TQCheckBox;
+class TQVBox;
+class TQHBox;
+class TQGrid;
+class TQButtonGroup;
+class TQGroupBox;
class KComboBox;
class dlg_newmatch : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
private:
resource *myResource;
match_param *Param;
dlg_selectengine *EngineSelect;
dlg_selectemail *EmailSelect;
- QHBox *BOX_Parent;
- QVBox *BOX_Players;
- QGroupBox *BOX_White;
- QLabel *IMAGE_White;
- QVBox *BOX_White_Detail;
- QLabel *LABEL_White_Name;
- QButtonGroup *GROUP_White_Type;
- QRadioButton *RADIO_White_Human;
- QRadioButton *RADIO_White_PC;
- QRadioButton *RADIO_White_Email;
- QGrid *GRID_White_Time;
- QLabel *LABEL_White_Base;
- QSpinBox *SPIN_White_Base;
- QLabel *LABEL_White_Inc;
- QSpinBox *SPIN_White_Inc;
- QLabel *LABEL_White_Moves;
- QSpinBox *SPIN_White_Moves;
- QGroupBox *BOX_Black;
- QLabel *IMAGE_Black;
- QVBox *BOX_Black_Detail;
- QLabel *LABEL_Black_Name;
- QButtonGroup *GROUP_Black_Type;
- QRadioButton *RADIO_Black_Human;
- QRadioButton *RADIO_Black_PC;
- QRadioButton *RADIO_Black_Email;
- QGrid *GRID_Black_Time;
- QLabel *LABEL_Black_Base;
- QSpinBox *SPIN_Black_Base;
- QLabel *LABEL_Black_Inc;
- QSpinBox *SPIN_Black_Inc;
- QLabel *LABEL_Black_Moves;
- QSpinBox *SPIN_Black_Moves;
+ TQHBox *BOX_Parent;
+ TQVBox *BOX_Players;
+ TQGroupBox *BOX_White;
+ TQLabel *IMAGE_White;
+ TQVBox *BOX_White_Detail;
+ TQLabel *LABEL_White_Name;
+ TQButtonGroup *GROUP_White_Type;
+ TQRadioButton *RADIO_White_Human;
+ TQRadioButton *RADIO_White_PC;
+ TQRadioButton *RADIO_White_Email;
+ TQGrid *GRID_White_Time;
+ TQLabel *LABEL_White_Base;
+ TQSpinBox *SPIN_White_Base;
+ TQLabel *LABEL_White_Inc;
+ TQSpinBox *SPIN_White_Inc;
+ TQLabel *LABEL_White_Moves;
+ TQSpinBox *SPIN_White_Moves;
+ TQGroupBox *BOX_Black;
+ TQLabel *IMAGE_Black;
+ TQVBox *BOX_Black_Detail;
+ TQLabel *LABEL_Black_Name;
+ TQButtonGroup *GROUP_Black_Type;
+ TQRadioButton *RADIO_Black_Human;
+ TQRadioButton *RADIO_Black_PC;
+ TQRadioButton *RADIO_Black_Email;
+ TQGrid *GRID_Black_Time;
+ TQLabel *LABEL_Black_Base;
+ TQSpinBox *SPIN_Black_Base;
+ TQLabel *LABEL_Black_Inc;
+ TQSpinBox *SPIN_Black_Inc;
+ TQLabel *LABEL_Black_Moves;
+ TQSpinBox *SPIN_Black_Moves;
public:
- dlg_newmatch(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ dlg_newmatch(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0);
~dlg_newmatch();
match_param* paramaters( void ) { return Param; }
protected slots:
diff --git a/knights/dlg_promote.cpp b/knights/dlg_promote.cpp
index d98ad83..653ddf3 100644
--- a/knights/dlg_promote.cpp
+++ b/knights/dlg_promote.cpp
@@ -18,17 +18,17 @@
#include "definitions.h"
#include "dlg_promote.moc"
#include "knightspixcache.h"
-#include <qimage.h>
+#include <tqimage.h>
-dlg_promote::dlg_promote(QWidget *parent, const char *name, resource *Rsrc ) :
- QDialog( parent, name, TRUE, Qt::WStyle_Customize | Qt::WStyle_DialogBorder )
+dlg_promote::dlg_promote(TQWidget *tqparent, const char *name, resource *Rsrc ) :
+ TQDialog( tqparent, name, TRUE, TQt::WStyle_Customize | TQt::WStyle_DialogBorder )
{
Resource = Rsrc;
- Queen = new QPushButton( this );
- Bishop = new QPushButton( this );
- Knight = new QPushButton( this );
- Rook = new QPushButton( this );
- Description = new QLabel( this );
+ Queen = new TQPushButton( this );
+ Bishop = new TQPushButton( this );
+ Knight = new TQPushButton( this );
+ Rook = new TQPushButton( this );
+ Description = new TQLabel( this );
}
dlg_promote::~dlg_promote()
@@ -43,8 +43,8 @@ dlg_promote::~dlg_promote()
void dlg_promote::Init( bool Army )
{
KnightsPixCache *cache = Resource->pixCache;
- QImage tempImage;
- QPixmap buffer;
+ TQImage tempImage;
+ TQPixmap buffer;
int margin;
margin = 2;
@@ -65,38 +65,38 @@ void dlg_promote::Init( bool Army )
/* Queen */
buffer = cache->SquareLight;
- if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteQueen, 0, 0, -1, -1, Qt::CopyROP, FALSE);
- else bitBlt( &buffer, 0, 0, &cache->BlackQueen, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ if( Army == WHITE ) bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->WhiteQueen), 0, 0, -1, -1, TQt::CopyROP, FALSE);
+ else bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->BlackQueen), 0, 0, -1, -1, TQt::CopyROP, FALSE);
Queen->setPixmap( buffer );
Queen->show();
/* Bishop */
buffer = cache->SquareDark;
- if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteBishop, 0, 0, -1, -1, Qt::CopyROP, FALSE);
- else bitBlt( &buffer, 0, 0, &cache->BlackBishop, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ if( Army == WHITE ) bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->WhiteBishop), 0, 0, -1, -1, TQt::CopyROP, FALSE);
+ else bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->BlackBishop), 0, 0, -1, -1, TQt::CopyROP, FALSE);
Bishop->setPixmap( buffer );
Bishop->show();
/* Knight */
buffer = cache->SquareDark;
- if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteKnight, 0, 0, -1, -1, Qt::CopyROP, FALSE);
- else bitBlt( &buffer, 0, 0, &cache->BlackKnight, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ if( Army == WHITE ) bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->WhiteKnight), 0, 0, -1, -1, TQt::CopyROP, FALSE);
+ else bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->BlackKnight), 0, 0, -1, -1, TQt::CopyROP, FALSE);
Knight->setPixmap( buffer );
Knight->show();
/* Rook */
buffer = cache->SquareLight;
- if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteRook, 0, 0, -1, -1, Qt::CopyROP, FALSE);
- else bitBlt( &buffer, 0, 0, &cache->BlackRook, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ if( Army == WHITE ) bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->WhiteRook), 0, 0, -1, -1, TQt::CopyROP, FALSE);
+ else bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->BlackRook), 0, 0, -1, -1, TQt::CopyROP, FALSE);
Rook->setPixmap( buffer );
Rook->show();
Description->setText( i18n( "Promote your pawn to..." ) );
Description->show();
- connect( Queen, SIGNAL( clicked() ), this, SLOT( queenClick() ) );
- connect( Bishop, SIGNAL( clicked() ), this, SLOT( bishopClick() ) );
- connect( Knight, SIGNAL( clicked() ), this, SLOT( knightClick() ) );
- connect( Rook, SIGNAL( clicked() ), this, SLOT( rookClick() ) );
+ connect( Queen, TQT_SIGNAL( clicked() ), this, TQT_SLOT( queenClick() ) );
+ connect( Bishop, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bishopClick() ) );
+ connect( Knight, TQT_SIGNAL( clicked() ), this, TQT_SLOT( knightClick() ) );
+ connect( Rook, TQT_SIGNAL( clicked() ), this, TQT_SLOT( rookClick() ) );
Queen->setFocus();
setCaption( i18n( "Pawn Promotion" ) );
}
diff --git a/knights/dlg_promote.h b/knights/dlg_promote.h
index 0eb117e..a96d515 100644
--- a/knights/dlg_promote.h
+++ b/knights/dlg_promote.h
@@ -19,23 +19,24 @@
#define DLG_PROMOTE_H
#include <klocale.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include "resource.h"
/**
*@author Troy Corbin Jr.
*/
-class dlg_promote : public QDialog
+class dlg_promote : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- dlg_promote(QWidget *parent=0, const char *name=0, resource *Rsrc=0 );
+ dlg_promote(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0 );
~dlg_promote();
void Init( bool Army );
@@ -48,11 +49,11 @@ class dlg_promote : public QDialog
private:
resource *Resource;
- QLabel *Description;
- QPushButton *Queen;
- QPushButton *Bishop;
- QPushButton *Knight;
- QPushButton *Rook;
+ TQLabel *Description;
+ TQPushButton *Queen;
+ TQPushButton *Bishop;
+ TQPushButton *Knight;
+ TQPushButton *Rook;
};
#endif
diff --git a/knights/dlg_selectemail.cpp b/knights/dlg_selectemail.cpp
index 5c7b583..d33aefb 100644
--- a/knights/dlg_selectemail.cpp
+++ b/knights/dlg_selectemail.cpp
@@ -16,12 +16,12 @@
***************************************************************************/
#include "dlg_selectemail.moc"
-#include <qvbox.h>
-#include <qlineedit.h>
+#include <tqvbox.h>
+#include <tqlineedit.h>
#include "resource.h"
-dlg_selectemail::dlg_selectemail(QWidget *parent, resource *Rsrc ) :
- KDialogBase( parent,
+dlg_selectemail::dlg_selectemail(TQWidget *tqparent, resource *Rsrc ) :
+ KDialogBase( tqparent,
0,
TRUE,
i18n("Select Email Address"),
@@ -32,9 +32,9 @@ dlg_selectemail::dlg_selectemail(QWidget *parent, resource *Rsrc ) :
myResource = Rsrc;
BOX_Parent = makeVBoxMainWidget();
- EDIT_Email = new QLineEdit( BOX_Parent );
+ EDIT_Email = new TQLineEdit( BOX_Parent );
EDIT_Email->setText( myResource->Email_Address );
- connect( EDIT_Email, SIGNAL( returnPressed() ), this, SLOT( changeValue() ) );
+ connect( EDIT_Email, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( changeValue() ) );
}
dlg_selectemail::~dlg_selectemail()
{
diff --git a/knights/dlg_selectemail.h b/knights/dlg_selectemail.h
index 6abf799..c189b4f 100644
--- a/knights/dlg_selectemail.h
+++ b/knights/dlg_selectemail.h
@@ -18,7 +18,7 @@
#ifndef DLG_SELECTEMAIL_H
#define DLG_SELECTEMAIL_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
/**
@@ -26,14 +26,15 @@
*/
class resource;
-class QVBox;
-class QLineEdit;
+class TQVBox;
+class TQLineEdit;
class dlg_selectemail : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- dlg_selectemail(QWidget *parent, resource *Rsrc );
+ dlg_selectemail(TQWidget *tqparent, resource *Rsrc );
~dlg_selectemail();
signals:
@@ -45,8 +46,8 @@ class dlg_selectemail : public KDialogBase
private:
resource *myResource;
- QVBox *BOX_Parent;
- QLineEdit *EDIT_Email;
+ TQVBox *BOX_Parent;
+ TQLineEdit *EDIT_Email;
};
#endif
diff --git a/knights/dlg_selectengine.cpp b/knights/dlg_selectengine.cpp
index e827184..cb2a8fc 100644
--- a/knights/dlg_selectengine.cpp
+++ b/knights/dlg_selectengine.cpp
@@ -16,15 +16,15 @@
***************************************************************************/
#include "dlg_selectengine.moc"
-#include <qvbox.h>
-#include <qgroupbox.h>
-#include <qslider.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqgroupbox.h>
+#include <tqslider.h>
+#include <tqlabel.h>
#include <kcombobox.h>
#include "resource.h"
-dlg_selectengine::dlg_selectengine(QWidget *parent, resource *Rsrc, bool army ) :
- KDialogBase( parent,
+dlg_selectengine::dlg_selectengine(TQWidget *tqparent, resource *Rsrc, bool army ) :
+ KDialogBase( tqparent,
0,
TRUE,
i18n("Select Computer Player"),
@@ -36,14 +36,14 @@ dlg_selectengine::dlg_selectengine(QWidget *parent, resource *Rsrc, bool army )
Army = army;
BOX_Parent = makeVBoxMainWidget();
- BOX_Engine = new QGroupBox( 1,
+ BOX_Engine = new TQGroupBox( 1,
Qt::Horizontal,
i18n( "Computer Players" ),
BOX_Parent );
COMBO_Engine = new KComboBox( BOX_Engine );
COMBO_Engine->setEditable( FALSE );
-// BOX_EngineHelper = new QGroupBox( 1,
+// BOX_EngineHelper = new TQGroupBox( 1,
// Qt::Horizontal,
// i18n( "Computer Players' Helper" ),
// BOX_Parent );
@@ -52,24 +52,24 @@ dlg_selectengine::dlg_selectengine(QWidget *parent, resource *Rsrc, bool army )
buildEngineData();
- connect( COMBO_Engine, SIGNAL( activated(int) ), this, SLOT( slotCurrent(int) ) );
-// connect( COMBO_EngineHelper, SIGNAL( activated(int) ), this, SLOT( slotCurrentHelper(int) ) );
+ connect( COMBO_Engine, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCurrent(int) ) );
+// connect( COMBO_EngineHelper, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCurrentHelper(int) ) );
- GROUP_Strength = new QGroupBox( 3,
+ GROUP_Strength = new TQGroupBox( 3,
Qt::Horizontal,
i18n( "Player Strength" ),
BOX_Parent );
- LABEL_Str_Min = new QLabel( i18n( "Weak" ), GROUP_Strength );
- SLIDER_Strength = new QSlider ( 1,
+ LABEL_Str_Min = new TQLabel( i18n( "Weak" ), GROUP_Strength );
+ SLIDER_Strength = new TQSlider ( 1,
7,
1,
Resource->Strength[ 1 * ( Army == BLACK ) ],
- QSlider::Horizontal,
+ Qt::Horizontal,
GROUP_Strength );
- LABEL_Str_Max = new QLabel( i18n( "Strong" ), GROUP_Strength );
- SLIDER_Strength->setTickmarks( QSlider::Below );
- connect( SLIDER_Strength, SIGNAL( valueChanged(int) ), this, SLOT( slotStrength(int) ) );
+ LABEL_Str_Max = new TQLabel( i18n( "Strong" ), GROUP_Strength );
+ SLIDER_Strength->setTickmarks( TQSlider::Below );
+ connect( SLIDER_Strength, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotStrength(int) ) );
}
dlg_selectengine::~dlg_selectengine()
{
@@ -84,7 +84,7 @@ void dlg_selectengine::buildEngineData( void )
bool FLAG1(FALSE);
// bool FLAG2(FALSE);
int Index(0);
- QStringList EngineList;
+ TQStringList EngineList;
engineList::Iterator enginesIT;
/* Clear Comboboxes */
@@ -151,7 +151,7 @@ void dlg_selectengine::buildEngineData( void )
///////////////////////////////////////
void dlg_selectengine::slotCurrent( int Index )
{
- QString Name;
+ TQString Name;
engineList::Iterator enginesIT;
Name = COMBO_Engine->text(Index);
@@ -169,7 +169,7 @@ void dlg_selectengine::slotCurrent( int Index )
///////////////////////////////////////
void dlg_selectengine::slotCurrentHelper( int Index )
{
- QString Name;
+ TQString Name;
engineList::Iterator enginesIT;
Name = COMBO_EngineHelper->text(Index);
diff --git a/knights/dlg_selectengine.h b/knights/dlg_selectengine.h
index a9dffdb..98d07f4 100644
--- a/knights/dlg_selectengine.h
+++ b/knights/dlg_selectengine.h
@@ -18,7 +18,7 @@
#ifndef DLG_SELECTENGINE_H
#define DLG_SELECTENGINE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
#include "definitions.h"
@@ -26,18 +26,19 @@
*@author Troy Corbin Jr.
*/
-class QVBox;
-class QSlider;
-class QLabel;
+class TQVBox;
+class TQSlider;
+class TQLabel;
class KComboBox;
-class QGroupBox;
+class TQGroupBox;
class resource;
class dlg_selectengine : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- dlg_selectengine(QWidget *parent, resource *Rsrc, bool army );
+ dlg_selectengine(TQWidget *tqparent, resource *Rsrc, bool army );
~dlg_selectengine();
int strength( void );
bool Army;
@@ -58,15 +59,15 @@ class dlg_selectengine : public KDialogBase
int Engine1F;
int Engine2F;
- QVBox *BOX_Parent;
- QGroupBox *BOX_Engine;
+ TQVBox *BOX_Parent;
+ TQGroupBox *BOX_Engine;
KComboBox *COMBO_Engine;
- QGroupBox *BOX_EngineHelper;
+ TQGroupBox *BOX_EngineHelper;
KComboBox *COMBO_EngineHelper;
- QGroupBox *GROUP_Strength;
- QLabel *LABEL_Str_Min;
- QSlider *SLIDER_Strength;
- QLabel *LABEL_Str_Max;
+ TQGroupBox *GROUP_Strength;
+ TQLabel *LABEL_Str_Min;
+ TQSlider *SLIDER_Strength;
+ TQLabel *LABEL_Str_Max;
};
#endif
diff --git a/knights/dlg_server.cpp b/knights/dlg_server.cpp
index 89073cb..a04c15e 100644
--- a/knights/dlg_server.cpp
+++ b/knights/dlg_server.cpp
@@ -18,8 +18,8 @@
#include <kicontheme.h>
#include "dlg_server.moc"
-dlg_server::dlg_server(QWidget *parent, const char *name, resource *Rsrc, QString ItemName ) :
- KDialogBase( parent,
+dlg_server::dlg_server(TQWidget *tqparent, const char *name, resource *Rsrc, TQString ItemName ) :
+ KDialogBase( tqparent,
name,
TRUE,
i18n("Configure Server"),
@@ -32,66 +32,66 @@ dlg_server::dlg_server(QWidget *parent, const char *name, resource *Rsrc, QStrin
BOX_Parent = makeVBoxMainWidget();
- BOX_Name = new QGroupBox( 1,
+ BOX_Name = new TQGroupBox( 1,
Qt::Horizontal,
i18n( "Server Name" ),
BOX_Parent );
EDIT_Name = new KLineEdit( BOX_Name );
- BOX_URLPort = new QHBox( BOX_Parent );
- BOX_URL = new QGroupBox( 1,
+ BOX_URLPort = new TQHBox( BOX_Parent );
+ BOX_URL = new TQGroupBox( 1,
Qt::Horizontal,
i18n( "Server URL" ),
BOX_URLPort );
EDIT_URL = new KLineEdit( BOX_URL );
- BOX_Port = new QGroupBox( 1,
+ BOX_Port = new TQGroupBox( 1,
Qt::Horizontal,
i18n( "Server Port" ),
BOX_URLPort );
EDIT_Port = new KLineEdit( BOX_Port );
- BOX_UNameStore = new QHBox( BOX_Parent );
- BOX_UserName = new QGroupBox( 1,
+ BOX_UNameStore = new TQHBox( BOX_Parent );
+ BOX_UserName = new TQGroupBox( 1,
Qt::Horizontal,
i18n( "Username" ),
BOX_UNameStore );
EDIT_UserName = new KLineEdit( BOX_UserName );
- CHECK_StorePass = new QCheckBox( i18n( "Remember My Password" ), BOX_UNameStore );
+ CHECK_StorePass = new TQCheckBox( i18n( "Remember My Password" ), BOX_UNameStore );
- BOX_Pass = new QHBox( BOX_Parent );
- BOX_Password = new QGroupBox( 1,
+ BOX_Pass = new TQHBox( BOX_Parent );
+ BOX_Password = new TQGroupBox( 1,
Qt::Vertical,
i18n( "Password" ),
BOX_Pass );
EDIT_Password = new KLineEdit( BOX_Password );
- EDIT_Password->setEchoMode( QLineEdit::Password );
+ EDIT_Password->setEchoMode( TQLineEdit::Password );
- BOX_PasswordRetype = new QGroupBox( 1,
+ BOX_PasswordRetype = new TQGroupBox( 1,
Qt::Vertical,
i18n( "Confirm Password" ),
BOX_Pass );
EDIT_PasswordRetype = new KLineEdit( BOX_PasswordRetype );
- EDIT_PasswordRetype->setEchoMode( QLineEdit::Password );
+ EDIT_PasswordRetype->setEchoMode( TQLineEdit::Password );
/* Use Timeseal? */
- GROUP_Timeseal = new QGroupBox( 2,
+ GROUP_Timeseal = new TQGroupBox( 2,
Qt::Horizontal,
i18n( "Timeseal" ),
BOX_Parent );
EDIT_Timeseal = new KLineEdit( GROUP_Timeseal );
- BUTTON_Timeseal = new QPushButton( GROUP_Timeseal );
- BUTTON_Timeseal->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
- connect( BUTTON_Timeseal, SIGNAL( clicked() ), this, SLOT( slot_Timeseal() ) );
+ BUTTON_Timeseal = new TQPushButton( GROUP_Timeseal );
+ BUTTON_Timeseal->setPixmap( Resource->LoadIcon( TQString( "fileopen" ), KIcon::Toolbar ) );
+ connect( BUTTON_Timeseal, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Timeseal() ) );
- BOX_LogFile = new QGroupBox( 2,
+ BOX_LogFile = new TQGroupBox( 2,
Qt::Horizontal,
i18n( "Log File" ),
BOX_Parent );
EDIT_LogFile = new KLineEdit( BOX_LogFile );
- BUTTON_LogFile = new QPushButton( BOX_LogFile );
+ BUTTON_LogFile = new TQPushButton( BOX_LogFile );
setMainWidget( BOX_Parent );
- BUTTON_LogFile->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
+ BUTTON_LogFile->setPixmap( Resource->LoadIcon( TQString( "fileopen" ), KIcon::Toolbar ) );
EDIT_Name->setMinimumWidth( 120 );
EDIT_URL->setMinimumWidth( 120 );
EDIT_UserName->setMinimumWidth( 120 );
@@ -106,7 +106,7 @@ dlg_server::dlg_server(QWidget *parent, const char *name, resource *Rsrc, QStrin
}
EDIT_Name->setText( (*serversIT).Name );
EDIT_URL->setText( (*serversIT).URL );
- EDIT_Port->setText( QString("").setNum( (*serversIT).Port ) );
+ EDIT_Port->setText( TQString("").setNum( (*serversIT).Port ) );
EDIT_UserName->setText( (*serversIT).UserName );
CHECK_StorePass->setChecked( (*serversIT).StorePass );
EDIT_Password->setText( (*serversIT).Password );
@@ -135,16 +135,16 @@ dlg_server::dlg_server(QWidget *parent, const char *name, resource *Rsrc, QStrin
enableButtonApply( FALSE );
enableButton( Help, TRUE );
- setHelp( QString( "configure-servers" ) );
+ setHelp( TQString( "configure-servers" ) );
/* Make Connections */
- connect( BUTTON_LogFile, SIGNAL( clicked() ), this, SLOT( slotLogFileDialog() ) );
- connect( CHECK_StorePass, SIGNAL( toggled(bool) ), this, SLOT( slotStorePass(bool) ) );
- connect( EDIT_Name, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
- connect( EDIT_URL, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
- connect( EDIT_Port, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
- connect( EDIT_UserName, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
- connect( EDIT_Password, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
- connect( EDIT_Timeseal, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
+ connect( BUTTON_LogFile, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotLogFileDialog() ) );
+ connect( CHECK_StorePass, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotStorePass(bool) ) );
+ connect( EDIT_Name, TQT_SIGNAL( textChanged( const TQString&) ), this, TQT_SLOT( slotEnableApply( const TQString&) ) );
+ connect( EDIT_URL, TQT_SIGNAL( textChanged( const TQString&) ), this, TQT_SLOT( slotEnableApply( const TQString&) ) );
+ connect( EDIT_Port, TQT_SIGNAL( textChanged( const TQString&) ), this, TQT_SLOT( slotEnableApply( const TQString&) ) );
+ connect( EDIT_UserName, TQT_SIGNAL( textChanged( const TQString&) ), this, TQT_SLOT( slotEnableApply( const TQString&) ) );
+ connect( EDIT_Password, TQT_SIGNAL( textChanged( const TQString&) ), this, TQT_SLOT( slotEnableApply( const TQString&) ) );
+ connect( EDIT_Timeseal, TQT_SIGNAL( textChanged( const TQString&) ), this, TQT_SLOT( slotEnableApply( const TQString&) ) );
show();
}
dlg_server::~dlg_server()
@@ -173,7 +173,7 @@ void dlg_server::slotApply( void )
}
(*serversIT).Name = EDIT_Name->text();
(*serversIT).URL = EDIT_URL->text();
- (*serversIT).Port = QString( EDIT_Port->text() ).toInt();
+ (*serversIT).Port = TQString( EDIT_Port->text() ).toInt();
(*serversIT).UserName = EDIT_UserName->text();
(*serversIT).Password = EDIT_Password->text();
(*serversIT).LogFile = EDIT_LogFile->text();
@@ -190,18 +190,18 @@ void dlg_server::slotCancel( void )
void dlg_server::slotLogFileDialog( void )
{
- QString temp;
+ TQString temp;
- temp = KFileDialog::getOpenFileName( QString::null,
- QString( "*" ),
+ temp = KFileDialog::getOpenFileName( TQString(),
+ TQString( "*" ),
this,
- QString( "Find Log..." ) );
+ TQString( "Find Log..." ) );
if( temp.isEmpty() ) return;
EDIT_LogFile->setText( temp );
enableButtonApply( TRUE );
}
-void dlg_server::slotEnableApply( const QString& )
+void dlg_server::slotEnableApply( const TQString& )
{
enableButtonApply( TRUE );
}
@@ -227,12 +227,12 @@ void dlg_server::slotStorePass( bool )
///////////////////////////////////////
void dlg_server::slot_Timeseal( void )
{
- QString temp;
+ TQString temp;
- temp = KFileDialog::getOpenFileName( QString::null,
- QString( "*" ),
+ temp = KFileDialog::getOpenFileName( TQString(),
+ TQString( "*" ),
0,
- QString( "Find Timeseal..." ) );
+ TQString( "Find Timeseal..." ) );
if( temp.isEmpty() ) return;
EDIT_Timeseal->setText( temp );
enableButtonApply( TRUE );
diff --git a/knights/dlg_server.h b/knights/dlg_server.h
index 5d9c316..117549f 100644
--- a/knights/dlg_server.h
+++ b/knights/dlg_server.h
@@ -22,12 +22,12 @@
#include <klineedit.h>
#include <kcombobox.h>
#include <kfiledialog.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
-#include <qstring.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
+#include <tqstring.h>
#include "definitions.h"
#include "resource.h"
@@ -38,8 +38,9 @@
class dlg_server : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- dlg_server(QWidget *parent=0, const char *name=0, resource *Rsrc=0, QString ItemName="" );
+ dlg_server(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0, TQString ItemName="" );
~dlg_server();
public slots:
@@ -47,46 +48,46 @@ class dlg_server : public KDialogBase
void slotApply( void );
void slotCancel( void );
void slotLogFileDialog( void );
- void slotEnableApply( const QString& );
+ void slotEnableApply( const TQString& );
void slotStorePass( bool state );
void slot_Timeseal( void );
private:
serverList::Iterator serversIT;
resource *Resource;
- QString Name;
+ TQString Name;
- QVBox *BOX_Parent;
- QHBox *BOX_URLPort;
- QHBox *BOX_UNameStore;
- QHBox *BOX_Pass;
+ TQVBox *BOX_Parent;
+ TQHBox *BOX_URLPort;
+ TQHBox *BOX_UNameStore;
+ TQHBox *BOX_Pass;
- QGroupBox *BOX_Name;
+ TQGroupBox *BOX_Name;
KLineEdit *EDIT_Name;
- QGroupBox *BOX_URL;
+ TQGroupBox *BOX_URL;
KLineEdit *EDIT_URL;
- QGroupBox *BOX_Port;
+ TQGroupBox *BOX_Port;
KLineEdit *EDIT_Port;
- QGroupBox *BOX_UserName;
+ TQGroupBox *BOX_UserName;
KLineEdit *EDIT_UserName;
- QCheckBox *CHECK_StorePass;
+ TQCheckBox *CHECK_StorePass;
- QGroupBox *BOX_Password;
+ TQGroupBox *BOX_Password;
KLineEdit *EDIT_Password;
- QGroupBox *BOX_PasswordRetype;
+ TQGroupBox *BOX_PasswordRetype;
KLineEdit *EDIT_PasswordRetype;
- QGroupBox *GROUP_Timeseal;
+ TQGroupBox *GROUP_Timeseal;
KLineEdit *EDIT_Timeseal;
- QPushButton *BUTTON_Timeseal;
+ TQPushButton *BUTTON_Timeseal;
- QGroupBox *BOX_LogFile;
+ TQGroupBox *BOX_LogFile;
KLineEdit *EDIT_LogFile;
- QPushButton *BUTTON_LogFile;
+ TQPushButton *BUTTON_LogFile;
};
#endif
diff --git a/knights/dlg_settings.cpp b/knights/dlg_settings.cpp
index 82fa117..489acd0 100644
--- a/knights/dlg_settings.cpp
+++ b/knights/dlg_settings.cpp
@@ -30,56 +30,56 @@
// dlg_settings::Constructor
//
///////////////////////////////////////
-dlg_settings::dlg_settings(QWidget *parent, const char *name, resource *Rsrc ) :
+dlg_settings::dlg_settings(TQWidget *tqparent, const char *name, resource *Rsrc ) :
KDialogBase( IconList,
i18n("Configure"),
Help|Ok|Apply|Cancel,
Ok,
- parent,
+ tqparent,
name,
FALSE,
FALSE )
{
- QString buffer;
+ TQString buffer;
Resource = Rsrc;
Resource->ConfigWrite();
/* General Page */
FRAME_General = addPage( i18n( "General" ),
i18n( "Various aspects of Knights get configured here." ),
- QPixmap( locate( "data", "knights/icon-general.png" ) ) );
+ TQPixmap( locate( "data", "knights/icon-general.png" ) ) );
PAGE_General = new setPageGeneral( FRAME_General, Resource );
- connect( PAGE_General, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+ connect( PAGE_General, TQT_SIGNAL( enableApply() ), this, TQT_SLOT( slotEnableApply() ) );
/* Display Page */
FRAME_Display = addPage( i18n( "Display" ),
i18n( "These settings determine how Knights displays itself to you." ),
- QPixmap( locate( "data", "knights/icon-display.png" ) ) );
+ TQPixmap( locate( "data", "knights/icon-display.png" ) ) );
PAGE_Display = new setPageDisplay( FRAME_Display, Resource );
- connect( PAGE_Display, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+ connect( PAGE_Display, TQT_SIGNAL( enableApply() ), this, TQT_SLOT( slotEnableApply() ) );
/* Audio Page */
FRAME_Audio = addPage( i18n( "Audio" ),
i18n( "These settings determine what Knights sounds like." ),
- Resource->LoadIcon( QString("multimedia"), KIcon::Panel ) );
+ Resource->LoadIcon( TQString("multimedia"), KIcon::Panel ) );
PAGE_Audio = new setPageAudio( FRAME_Audio, Resource );
- connect( PAGE_Audio, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+ connect( PAGE_Audio, TQT_SIGNAL( enableApply() ), this, TQT_SLOT( slotEnableApply() ) );
/* Engines Page */
FRAME_Engines = addPage( i18n( "Computer Opponents" ),
i18n( "Configure your chess engines here." ),
- Resource->LoadIcon( QString("gear"), KIcon::Panel ) );
+ Resource->LoadIcon( TQString("gear"), KIcon::Panel ) );
PAGE_Engines = new setPageEngines( FRAME_Engines, Resource );
- connect( PAGE_Engines, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+ connect( PAGE_Engines, TQT_SIGNAL( enableApply() ), this, TQT_SLOT( slotEnableApply() ) );
/* Servers Page */
FRAME_Servers = addPage( i18n( "Chess Servers" ),
i18n( "Configure your internet chess servers here." ),
- Resource->LoadIcon( QString("network"), KIcon::Panel ) );
+ Resource->LoadIcon( TQString("network"), KIcon::Panel ) );
PAGE_Servers = new setPageServers( FRAME_Servers, Resource );
- connect( PAGE_Servers, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+ connect( PAGE_Servers, TQT_SIGNAL( enableApply() ), this, TQT_SLOT( slotEnableApply() ) );
- connect( this, SIGNAL( aboutToShowPage( QWidget* ) ), this, SLOT( slotPageChanging( QWidget* ) ) );
+ connect( this, TQT_SIGNAL( aboutToShowPage( TQWidget* ) ), this, TQT_SLOT( slotPageChanging( TQWidget* ) ) );
/* Init the buttons */
showButtonCancel( TRUE );
@@ -92,7 +92,7 @@ dlg_settings::dlg_settings(QWidget *parent, const char *name, resource *Rsrc ) :
enableButtonApply( FALSE );
enableButton( Help, TRUE );
- setHelp( QString( "configure" ) );
+ setHelp( TQString( "configure" ) );
show();
}
///////////////////////////////////////
@@ -183,18 +183,18 @@ void dlg_settings::slotThemesAdded( void )
// dlg_settings::slotPageChanging
//
///////////////////////////////////////
-void dlg_settings::slotPageChanging( QWidget *page )
+void dlg_settings::slotPageChanging( TQWidget *page )
{
if( page == FRAME_General )
- setHelp( QString( "configure-general" ) );
+ setHelp( TQString( "configure-general" ) );
else if( page == FRAME_Display )
- setHelp( QString( "configure-display" ) );
+ setHelp( TQString( "configure-display" ) );
else if( page == FRAME_Audio )
- setHelp( QString( "configure-audio" ) );
+ setHelp( TQString( "configure-audio" ) );
else if( page == FRAME_Engines )
- setHelp( QString( "configure-engines" ) );
+ setHelp( TQString( "configure-engines" ) );
else if( page == FRAME_Servers )
- setHelp( QString( "configure-servers" ) );
+ setHelp( TQString( "configure-servers" ) );
}
diff --git a/knights/dlg_settings.h b/knights/dlg_settings.h
index 997db07..0a7e577 100644
--- a/knights/dlg_settings.h
+++ b/knights/dlg_settings.h
@@ -20,10 +20,10 @@
#include <klocale.h>
#include <kdialogbase.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qvbox.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqvbox.h>
#include "definitions.h"
#include "resource.h"
@@ -40,8 +40,9 @@ class setPageGeneral;
class dlg_settings : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- dlg_settings(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ dlg_settings(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0);
~dlg_settings();
public slots:
@@ -50,7 +51,7 @@ class dlg_settings : public KDialogBase
void slotCancel( void );
void slotEnableApply( void );
void slotThemesAdded( void );
- void slotPageChanging( QWidget* );
+ void slotPageChanging( TQWidget* );
signals:
void themeChanged( int, int );
@@ -61,19 +62,19 @@ class dlg_settings : public KDialogBase
private:
resource *Resource;
- QFrame *FRAME_General;
+ TQFrame *FRAME_General;
setPageGeneral *PAGE_General;
- QFrame *FRAME_Display;
+ TQFrame *FRAME_Display;
setPageDisplay *PAGE_Display;
- QFrame *FRAME_Audio;
+ TQFrame *FRAME_Audio;
setPageAudio *PAGE_Audio;
- QFrame *FRAME_Engines;
+ TQFrame *FRAME_Engines;
setPageEngines *PAGE_Engines;
- QFrame *FRAME_Servers;
+ TQFrame *FRAME_Servers;
setPageServers *PAGE_Servers;
};
diff --git a/knights/idmanager.h b/knights/idmanager.h
index 04be2c1..70f4f5b 100644
--- a/knights/idmanager.h
+++ b/knights/idmanager.h
@@ -18,7 +18,7 @@
#ifndef IDMANAGER_H
#define IDMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
/**
*@author Alexander Wels
@@ -29,7 +29,7 @@
// The ID's generated are unsigned integers
/////////////////////////////////////////////////////
-class IDManager : public QObject
+class IDManager : public TQObject
{
public:
IDManager();
diff --git a/knights/io_base.cpp b/knights/io_base.cpp
index db62330..d3ab39c 100644
--- a/knights/io_base.cpp
+++ b/knights/io_base.cpp
@@ -28,9 +28,9 @@ io_base::io_base(resource *resc, int ID)
this->myID = ID;
}
-io_base::io_base(QWidget* parent, resource *rsrc)
+io_base::io_base(TQWidget* tqparent, resource *rsrc)
{
- this->myParent = parent;
+ this->myParent = tqparent;
this->myResource = rsrc;
}
diff --git a/knights/io_base.h b/knights/io_base.h
index 7feeff0..2743f9c 100644
--- a/knights/io_base.h
+++ b/knights/io_base.h
@@ -24,15 +24,16 @@
#include "command.h"
#include "match_param.h"
-#include <qobject.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqwidget.h>
/**
*@author Alexander Wels.
*/
-class io_base : public QObject
+class io_base : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -42,7 +43,7 @@ public:
LOCAL = 1
};
- io_base(QWidget *parent=NULL, resource *rsrc=NULL);
+ io_base(TQWidget *tqparent=NULL, resource *rsrc=NULL);
io_base(resource *rsrc);
io_base(resource *rsrc, int ID);
virtual ~io_base();
@@ -59,7 +60,7 @@ signals:
protected:
// The knightio object needs to know its ID
- QWidget *myParent;
+ TQWidget *myParent;
int myID;
resource *myResource;
ioType myType;
diff --git a/knights/io_engine.cpp b/knights/io_engine.cpp
index d9a15a7..5f44b1e 100644
--- a/knights/io_engine.cpp
+++ b/knights/io_engine.cpp
@@ -18,8 +18,8 @@
#include <kprocess.h>
#include <kicontheme.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <stdlib.h>
#include <stdio.h>
@@ -31,7 +31,7 @@
#include "proto_xboard.h"
#include "proto_uci.h"
-io_engine::io_engine( QWidget *parent, resource *Rsrc ) : io_base( parent, Rsrc )
+io_engine::io_engine( TQWidget *tqparent, resource *Rsrc ) : io_base( tqparent, Rsrc )
{
myType = io_base::LOCAL;
engine = NULL;
@@ -69,7 +69,7 @@ io_engine::~io_engine()
///////////////////////////////////////
void io_engine::Start( const int side )
{
- QStringList args;
+ TQStringList args;
unsigned int tmp;
int ID;
bool Army;
@@ -125,8 +125,8 @@ void io_engine::Start( const int side )
proto = new proto_xboard( myID );
break;
}
- connect( proto, SIGNAL( output( const QString& ) ), this, SLOT( WriteFIFO( const QString& ) ) );
- connect( proto, SIGNAL( output( const Command& ) ), this, SLOT( recvProtoCMD( const Command& ) ) );
+ connect( proto, TQT_SIGNAL( output( const TQString& ) ), this, TQT_SLOT( WriteFIFO( const TQString& ) ) );
+ connect( proto, TQT_SIGNAL( output( const Command& ) ), this, TQT_SLOT( recvProtoCMD( const Command& ) ) );
/* ...engine's display name */
proto->parse( Command( myID, CMD_Set_Name, (*IT).Name ) );
@@ -135,7 +135,7 @@ void io_engine::Start( const int side )
(*engine) << (*IT).Filename;
/* ...command line arguments */
- args = QStringList::split( QString(" "), (*IT).Arguments, FALSE );
+ args = TQStringList::split( TQString(" "), (*IT).Arguments, FALSE );
for( tmp = 0; tmp < args.count(); tmp++ )
{
(*engine) << args[tmp];
@@ -144,7 +144,7 @@ void io_engine::Start( const int side )
/* ...log file */
if( !(*IT).LogFile.isEmpty() )
{
- Log = new QFile( (*IT).LogFile );
+ Log = new TQFile( (*IT).LogFile );
if( !Log->open( IO_WriteOnly | IO_Append ) )
if( !Log->open( IO_WriteOnly ) )
kdError() << "io_engine::Start: Can not open " << (*IT).LogFile << " for writing." << endl;
@@ -156,9 +156,9 @@ void io_engine::Start( const int side )
kdError() << "io_engine::Start: Can not run the engine: " << (*IT).Filename << endl;
return;
}
- connect( engine, SIGNAL( wroteStdin( KProcess* ) ), this, SLOT( SendClear( KProcess* ) ) );
- connect( engine, SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, SLOT( Recv( KProcess*, char*, int ) ) );
- connect( engine, SIGNAL( receivedStderr( KProcess*, char*, int ) ), this, SLOT( Recv( KProcess*, char*, int ) ) );
+ connect( engine, TQT_SIGNAL( wroteStdin( KProcess* ) ), this, TQT_SLOT( SendClear( KProcess* ) ) );
+ connect( engine, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( Recv( KProcess*, char*, int ) ) );
+ connect( engine, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), this, TQT_SLOT( Recv( KProcess*, char*, int ) ) );
proto->parse( Command( myID, CMD_Init ) );
@@ -231,19 +231,19 @@ void io_engine::Recv( KProcess*, char *buffer, int bufLen )
FIFO_In += newBuff;
delete newBuff;
- if( FIFO_In.contains( QChar('\n') ) )
+ if( FIFO_In.tqcontains( TQChar('\n') ) )
{
- QString proc = FIFO_In.left( FIFO_In.findRev( QChar('\n') ) );
+ TQString proc = FIFO_In.left( FIFO_In.tqfindRev( TQChar('\n') ) );
FIFO_In = FIFO_In.right( FIFO_In.length() - proc.length() );
/* Split and Parse Full Lines of Input */
- QStringList strList = QStringList::split( "\n", proc );
+ TQStringList strList = TQStringList::split( "\n", proc );
for( unsigned int loop = 0; loop < strList.count(); loop++ )
{
/* Print the input to the log file */
if( Log )
{
- QString data = "-> " + strList[loop] + "\n";
+ TQString data = "-> " + strList[loop] + "\n";
Log->writeBlock( data.latin1(), data.length() );
}
proto->parse( strList[loop] );
@@ -256,9 +256,9 @@ void io_engine::Recv( KProcess*, char *buffer, int bufLen )
// io_engine::WriteFIFO
//
///////////////////////////////////////
-void io_engine::WriteFIFO( const QString &Data )
+void io_engine::WriteFIFO( const TQString &Data )
{
- QString data = Data;
+ TQString data = Data;
if( data.isEmpty() )
return;
if( data.right(1) != "\n" )
diff --git a/knights/io_engine.h b/knights/io_engine.h
index 3952d60..a263862 100644
--- a/knights/io_engine.h
+++ b/knights/io_engine.h
@@ -18,15 +18,15 @@
#ifndef IO_ENGINE_H
#define IO_ENGINE_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "io_base.h"
/**
*@author Troy Corbin Jr.
*/
-class QFile;
+class TQFile;
class KProcess;
class resource;
class proto_base;
@@ -34,8 +34,9 @@ class proto_base;
class io_engine : public io_base
{
Q_OBJECT
+ TQ_OBJECT
public:
- io_engine( QWidget *parent=NULL, resource *Rsrc=0 );
+ io_engine( TQWidget *tqparent=NULL, resource *Rsrc=0 );
~io_engine();
void Start( const int side );
@@ -51,7 +52,7 @@ class io_engine : public io_base
protected slots:
void sendToChild( void );
- void WriteFIFO( const QString &Data );
+ void WriteFIFO( const TQString &Data );
protected:
void Kill( void );
@@ -68,14 +69,14 @@ class io_engine : public io_base
bool Forced;
/* References */
- QFile *Log;
+ TQFile *Log;
int Protocol;
ChessMove Move;
/* Data */
KProcess *engine;
- QString FIFO_In;
- QString FIFO_Out;
+ TQString FIFO_In;
+ TQString FIFO_Out;
};
#endif
diff --git a/knights/io_internet.cpp b/knights/io_internet.cpp
index e5325cd..b51dfb2 100644
--- a/knights/io_internet.cpp
+++ b/knights/io_internet.cpp
@@ -20,13 +20,13 @@
#include <kprocess.h>
#include <kmessagebox.h>
-/* Qt */
-#include <qobject.h>
-#include <qwidget.h>
-#include <qregexp.h>
-#include <qdns.h>
-#include <qsocket.h>
-#include <qptrlist.h>
+/* TQt */
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqregexp.h>
+#include <tqdns.h>
+#include <tqsocket.h>
+#include <tqptrlist.h>
/* Local */
#include "io_internet.moc"
@@ -45,7 +45,7 @@ static const int TXT_Sht = 3;
static const int TXT_Wsp = 4;
static const int TXT_Not = 5;
-io_internet::io_internet( QWidget *parent, resource *rsrc )
+io_internet::io_internet( TQWidget *tqparent, resource *rsrc )
{
myResource = rsrc;
challenge = NULL;
@@ -60,14 +60,14 @@ io_internet::io_internet( QWidget *parent, resource *rsrc )
/* initialize various variables */
this->waiting_for_move_list = false;
- this->myParent = parent;
+ this->myParent = tqparent;
connected = false; /* we are not connected to a server */
/* create the login dialog and show it to the user */
loginDlg = new dlg_login( myParent, "LoginDialog", myResource);
- connect(loginDlg, SIGNAL( okClicked() ), this, SLOT( connectToServer() ) );
- connect(loginDlg, SIGNAL( cancelClicked() ), this, SLOT( selfDestruct() ) );
- connect(loginDlg, SIGNAL( login(QString, QString) ), this, SLOT( setUserInfo(QString, QString) ) );
+ connect(loginDlg, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( connectToServer() ) );
+ connect(loginDlg, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( selfDestruct() ) );
+ connect(loginDlg, TQT_SIGNAL( login(TQString, TQString) ), this, TQT_SLOT( setUserInfo(TQString, TQString) ) );
}
///////////////////////////////////////////////////////////
@@ -105,7 +105,7 @@ io_internet::~io_internet()
{
if(myResource->tabManager->isTab(*i))
{
- myResource->tabManager->removeTab(*i);
+ myResource->tabManager->removeTab(TQT_TQOBJECT(*i));
}
}
}
@@ -113,11 +113,11 @@ io_internet::~io_internet()
void io_internet::connectToServer()
{
serverList::iterator i;
- QWidget *tempTab;
- QWidget *consoleTab;
- QValueList<Command>::iterator j;
+ TQWidget *tempTab;
+ TQWidget *consoleTab;
+ TQValueList<Command>::iterator j;
- qApp->mainWidget()->setCursor( myResource->CURSOR_Thinking );
+ tqApp->mainWidget()->setCursor( myResource->CURSOR_Thinking );
/* Get and parse server config from resource */
myServer = NULL;
for( i = myResource->servers.begin(); i != myResource->servers.end(); i++ )
@@ -130,10 +130,10 @@ void io_internet::connectToServer()
if(myServer == NULL)
{
/* No server configured. Notify User and die gracefully */
- qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ tqApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
kdError() << "internetio::internetio: Can not find server resource CurrentRef " << endl;
- KMessageBox::sorry( (QWidget*)myParent, i18n( "There are no servers configured.\nPlease make sure you have at least one server configured." ), i18n( "Cannot find a server."));
- QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ KMessageBox::sorry( (TQWidget*)myParent, i18n( "There are no servers configured.\nPlease make sure you have at least one server configured." ), i18n( "Cannot find a server."));
+ TQApplication::postEvent( tqApp->mainWidget(), new TQCustomEvent( EVENT_Del_IO_Net ) );
return;
}
@@ -145,14 +145,14 @@ void io_internet::connectToServer()
if(!myServer->Timeseal.isEmpty())
{
myTimeseal = new KProcess();
- (*myTimeseal) << myServer->Timeseal << myServer->URL << QString().setNum( myServer->Port )
- << QString( "-p" ) << QString().setNum(myServer->Port + 1);
+ (*myTimeseal) << myServer->Timeseal << myServer->URL << TQString().setNum( myServer->Port )
+ << TQString( "-p" ) << TQString().setNum(myServer->Port + 1);
if(!myTimeseal->start())
{
/* Couldn't start Timeseal. Notify User and die gracefully */
- qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
- KMessageBox::sorry( (QWidget*)myParent, i18n( "Knights can not start Timeseal.\nPlease make sure you have the correct path and filename configured." ), i18n( "Cannot find Timeseal."));
- QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ tqApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ KMessageBox::sorry( (TQWidget*)myParent, i18n( "Knights can not start Timeseal.\nPlease make sure you have the correct path and filename configured." ), i18n( "Cannot find Timeseal."));
+ TQApplication::postEvent( tqApp->mainWidget(), new TQCustomEvent( EVENT_Del_IO_Net ) );
return;
}
socket = new KSocket("127.0.0.1", myServer->Port + 1, 30);
@@ -163,14 +163,14 @@ void io_internet::connectToServer()
myTimeseal->kill();
myTimeseal = new KProcess();
- (*myTimeseal) << myServer->Timeseal << myServer->URL << QString().setNum( myServer->Port )
- << QString( "-p" ) << QString().setNum(myServer->Port + 2);
+ (*myTimeseal) << myServer->Timeseal << myServer->URL << TQString().setNum( myServer->Port )
+ << TQString( "-p" ) << TQString().setNum(myServer->Port + 2);
if(!myTimeseal->start())
{
/* Couldn't start Timeseal. Notify User and die gracefully */
- qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
- KMessageBox::sorry( (QWidget*)myParent, i18n( "Knights can not start Timeseal.\nPlease make sure you have the correct path and filename configured." ), i18n( "Cannot find Timeseal."));
- QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ tqApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ KMessageBox::sorry( (TQWidget*)myParent, i18n( "Knights can not start Timeseal.\nPlease make sure you have the correct path and filename configured." ), i18n( "Cannot find Timeseal."));
+ TQApplication::postEvent( tqApp->mainWidget(), new TQCustomEvent( EVENT_Del_IO_Net ) );
return;
}
socket = new KSocket("127.0.0.1", myServer->Port + 2, 30);
@@ -178,9 +178,9 @@ void io_internet::connectToServer()
{
/* if we can't do it the second time, give up */
/* Couldn't connect to server through Timeseal. Notify User and die gracefully */
- qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
- KMessageBox::sorry( (QWidget*)myParent, i18n( "Knights is unable to connect to the server.\n Please make sure your internet connection is working and try again."), i18n( "Cannot connect to server(timeseal)."));
- QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ tqApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ KMessageBox::sorry( (TQWidget*)myParent, i18n( "Knights is unable to connect to the server.\n Please make sure your internet connection is working and try again."), i18n( "Cannot connect to server(timeseal)."));
+ TQApplication::postEvent( tqApp->mainWidget(), new TQCustomEvent( EVENT_Del_IO_Net ) );
return;
}
}
@@ -191,9 +191,9 @@ void io_internet::connectToServer()
if(socket->socket() == -1)
{
/* Couldn't connect to server. Notify User and die gracefully */
- qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
- KMessageBox::sorry( (QWidget*)myParent, i18n( "Knights is unable to connect to the server.\n Please make sure your internet connection is working and try again."), i18n( "Cannot connect to server."));
- QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ tqApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ KMessageBox::sorry( (TQWidget*)myParent, i18n( "Knights is unable to connect to the server.\n Please make sure your internet connection is working and try again."), i18n( "Cannot connect to server."));
+ TQApplication::postEvent( tqApp->mainWidget(), new TQCustomEvent( EVENT_Del_IO_Net ) );
return;
}
}
@@ -201,11 +201,11 @@ void io_internet::connectToServer()
socket->enableWrite(true);
/* connect a signal to readReady */
- connect(socket, SIGNAL(readEvent(KSocket *)), this, SLOT(readCommand(KSocket *)));
+ connect(socket, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(readCommand(KSocket *)));
/* setup the seekTimer and turn it off by default */
- seekTimer = new QTimer(this);
- connect(seekTimer, SIGNAL(timeout()), this, SLOT(processSeekTimer()));
+ seekTimer = new TQTimer(this);
+ connect(seekTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processSeekTimer()));
/* succesfully connected to the server, turn connected on and flush the command buffer */
connected = true;
@@ -223,28 +223,28 @@ void io_internet::connectToServer()
*/
consoleTab = new Console( 0, myServer->Name, myResource );
myTabList[consoleTab] = consoleTab;
- myResource->tabManager->addTab( myTabList[consoleTab], i18n( "%1 Console" ).arg( myServer->Name ) );
- connect( myTabList[consoleTab], SIGNAL( sendCMD( const Command& ) ), this, SLOT( recvCMD( const Command& ) ) );
- connect( this, SIGNAL( sendCMD( const Command& ) ), myTabList[consoleTab], SLOT( recvCMD( const Command& ) ) );
+ myResource->tabManager->addTab( myTabList[consoleTab], i18n( "%1 Console" ).tqarg( myServer->Name ) );
+ connect( myTabList[consoleTab], TQT_SIGNAL( sendCMD( const Command& ) ), this, TQT_SLOT( recvCMD( const Command& ) ) );
+ connect( this, TQT_SIGNAL( sendCMD( const Command& ) ), myTabList[consoleTab], TQT_SLOT( recvCMD( const Command& ) ) );
tempTab = new tab_SeekList( 0, "seekList", myResource );
myTabList[tempTab] = tempTab;
myResource->tabManager->addTab( myTabList[tempTab], i18n( "Sought Matches List" ) );
- connect( myTabList[tempTab], SIGNAL( sendCMD( const Command& ) ), this, SLOT( recvCMD( const Command& ) ) );
- connect( this, SIGNAL( sendCMD( const Command& ) ), myTabList[tempTab], SLOT( recvCMD( const Command& ) ) );
+ connect( myTabList[tempTab], TQT_SIGNAL( sendCMD( const Command& ) ), this, TQT_SLOT( recvCMD( const Command& ) ) );
+ connect( this, TQT_SIGNAL( sendCMD( const Command& ) ), myTabList[tempTab], TQT_SLOT( recvCMD( const Command& ) ) );
tempTab = new Challenge_Graph( 0, "seekGraph", myResource );
myTabList[tempTab] = tempTab;
myResource->tabManager->addTab( myTabList[tempTab], i18n( "Sought Matches Graph" ) );
- connect( myTabList[tempTab], SIGNAL( sendCMD( const Command& ) ), this, SLOT( recvCMD( const Command& ) ) );
- connect( this, SIGNAL( sendCMD( const Command& ) ), myTabList[tempTab], SLOT( recvCMD( const Command& ) ) );
+ connect( myTabList[tempTab], TQT_SIGNAL( sendCMD( const Command& ) ), this, TQT_SLOT( recvCMD( const Command& ) ) );
+ connect( this, TQT_SIGNAL( sendCMD( const Command& ) ), myTabList[tempTab], TQT_SLOT( recvCMD( const Command& ) ) );
myResource->tabManager->showTab(consoleTab);
/* ...log file */
if( !myServer->LogFile.isEmpty() )
{
- Log = new QFile( myServer->LogFile );
+ Log = new TQFile( myServer->LogFile );
if( !Log->open( IO_WriteOnly | IO_Append ) )
{
if( !Log->open( IO_WriteOnly ) )
@@ -253,12 +253,12 @@ void io_internet::connectToServer()
}
}
}
- qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ tqApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
}
void io_internet::recvCMD(const Command& command)
{
- QString error_message;
+ TQString error_message;
if(!connected)
{
@@ -311,7 +311,7 @@ void io_internet::recvCMD(const Command& command)
sendCMD( command );
break;
case CMD_Send_To_ICS:
- if(((Command)command).getData().contains(QRegExp("^(?:\\.|tell)")))
+ if(((Command)command).getData().tqcontains(TQRegExp("^(?:\\.|tell)")))
{
writeToConsole(((Command)command).getData(), "K_PVT");
}
@@ -344,9 +344,9 @@ void io_internet::recvCMD(const Command& command)
// io_internet::send
//
///////////////////////////////////////
-void io_internet::send(const QString& msg)
+void io_internet::send(const TQString& msg)
{
- QString tmp(msg);
+ TQString tmp(msg);
ssize_t len;
/* Attach events to specific outgoing text */
@@ -369,7 +369,7 @@ void io_internet::send(const QString& msg)
if( Log )
{
- Log->writeBlock( QString("<< ").latin1(), 3 );
+ Log->writeBlock( TQString("<< ").latin1(), 3 );
Log->writeBlock( tmp.latin1(), tmp.length() );
}
if( len < (signed)tmp.length() )
@@ -386,8 +386,8 @@ void io_internet::send(const QString& msg)
void io_internet::readCommand(KSocket* socket)
{
char buffer[READ_BUFFER_SIZE];
- QString tmp;
- QStringList lines;
+ TQString tmp;
+ TQStringList lines;
memset(buffer, 0, READ_BUFFER_SIZE);
read(socket->socket(), buffer, READ_BUFFER_SIZE);
@@ -406,7 +406,7 @@ void io_internet::readCommand(KSocket* socket)
}
else
{
- lines = QStringList::split( QRegExp("\n\r?"), tmp, FALSE );
+ lines = TQStringList::split( TQRegExp("\n\r?"), tmp, FALSE );
if(!(tmp.endsWith("\n\r") || tmp.endsWith("\n")))
{
lineBuffer = (*(--lines.end()));
@@ -415,11 +415,11 @@ void io_internet::readCommand(KSocket* socket)
{
lineBuffer = "";
}
- for(QStringList::iterator i = lines.begin(); i != lines.end(); i++)
+ for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)
{
if(lineBuffer == "" || i != --lines.end())
{
- (*i).replace( QRegExp( "\\a" ), "" );
+ (*i).tqreplace( TQRegExp( "\\a" ), "" );
parseLine(*i);
}
}
@@ -450,37 +450,37 @@ void io_internet::sendPassword()
// io_internet::parseLoginData
//
///////////////////////////////////////
-void io_internet::parseLoginData( QString data )
+void io_internet::parseLoginData( TQString data )
{
- QStringList lines;
+ TQStringList lines;
if(loginStage == LOGIN_STAGE_NAME)
{
- if(data.contains( "login:" ))
+ if(data.tqcontains( "login:" ))
{
sendUserName();
}
- lines = QStringList::split( QRegExp("\n\r?"), data, FALSE );
- for(QStringList::iterator i = lines.begin(); i != lines.end(); i++)
+ lines = TQStringList::split( TQRegExp("\n\r?"), data, FALSE );
+ for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)
{
writeToConsole((*i), "K_STD");
}
}
else if(loginStage == LOGIN_STAGE_PASSWORD)
{
- if(data.contains("**** Invalid password! ****") ||
- data.contains("Sorry, names can only consist of lower and upper case letters. Try again.") ||
- data.contains("If you are not a registered player, enter guest or a unique ID."))
+ if(data.tqcontains("**** Invalid password! ****") ||
+ data.tqcontains("Sorry, names can only consist of lower and upper case letters. Try again.") ||
+ data.tqcontains("If you are not a registered player, enter guest or a unique ID."))
{
loginDlg = new dlg_login( myParent, "LoginDialog", myResource);
loginDlg->disableServerSelect();
- connect(loginDlg, SIGNAL( okClicked() ), this, SLOT( sendUserName() ) );
- connect(loginDlg, SIGNAL( cancelClicked() ), this, SLOT( selfDestruct() ) );
- connect(loginDlg, SIGNAL( login(QString, QString) ), this, SLOT( setUserInfo(QString, QString) ) );
+ connect(loginDlg, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( sendUserName() ) );
+ connect(loginDlg, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( selfDestruct() ) );
+ connect(loginDlg, TQT_SIGNAL( login(TQString, TQString) ), this, TQT_SLOT( setUserInfo(TQString, TQString) ) );
}
- else if(data.contains("Press return to enter the server as"))
+ else if(data.tqcontains("Press return to enter the server as"))
{
- QRegExp guestName("Logging you in as \"(\\w*)\"");
+ TQRegExp guestName("Logging you in as \"(\\w*)\"");
int pos = guestName.search(data);
if(pos > -1)
{
@@ -488,7 +488,7 @@ void io_internet::parseLoginData( QString data )
}
send("\n");
}
- else if(data.contains("password:"))
+ else if(data.tqcontains("password:"))
{
sendPassword();
}
@@ -497,16 +497,16 @@ void io_internet::parseLoginData( QString data )
loginStage = LOGIN_STAGE_LOGGED_IN;
sendUserSettings();
}
- lines = QStringList::split( QRegExp("\n\r?"), data, FALSE );
- for(QStringList::iterator i = lines.begin(); i != lines.end(); i++)
+ lines = TQStringList::split( TQRegExp("\n\r?"), data, FALSE );
+ for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)
{
writeToConsole((*i), "K_STD");
}
}
else
{
- lines = QStringList::split( QRegExp("\n\r?"), data, FALSE );
- for(QStringList::iterator i = lines.begin(); i != lines.end(); i++)
+ lines = TQStringList::split( TQRegExp("\n\r?"), data, FALSE );
+ for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)
{
writeToConsole((*i), "K_STD");
}
@@ -518,21 +518,21 @@ void io_internet::parseLoginData( QString data )
// io_internet::ParseLine
//
///////////////////////////////////////
-void io_internet::parseLine( QString line )
+void io_internet::parseLine( TQString line )
{
int i, j;
- QString tmp;
+ TQString tmp;
switch(parseMode)
{
case NORMAL_MODE: /* determine which mode we should go into */
- if(line.contains(QRegExp("^\\s*\\d{1,3}\\s+(?:\\d{1,4}|\\+\\+\\+\\+|\\-\\-\\-\\-)\\s+\\w{3,17}(\\(C\\))?\\s+\\d{1,3}\\s+\\d{1,3}")))
+ if(line.tqcontains(TQRegExp("^\\s*\\d{1,3}\\s+(?:\\d{1,4}|\\+\\+\\+\\+|\\-\\-\\-\\-)\\s+\\w{3,17}(\\(C\\))?\\s+\\d{1,3}\\s+\\d{1,3}")))
{
updateSoughtList(line);
parseMode = UPDATE_SOUGHT_MODE;
}
/* CHALLENGE */
- else if( line.contains(QRegExp("^\\s*Challenge: ")))
+ else if( line.tqcontains(TQRegExp("^\\s*Challenge: ")))
{
myResource->play( SND_CHALLENGE );
if( challenge != NULL )
@@ -540,10 +540,10 @@ void io_internet::parseLine( QString line )
delete challenge;
}
challenge = new dlg_challenge( 0, "Challenge", myResource );
- connect( challenge, SIGNAL( destroyed() ), this, SLOT( nullifyChallenge() ) );
- connect( challenge, SIGNAL( user1Clicked() ), this, SLOT( acceptChallenge() ) );
- connect( challenge, SIGNAL( user2Clicked() ), this, SLOT( declineChallenge() ) );
- line.replace(QRegExp("^\\s*Challenge: "), "");
+ connect( challenge, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( nullifyChallenge() ) );
+ connect( challenge, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( acceptChallenge() ) );
+ connect( challenge, TQT_SIGNAL( user2Clicked() ), this, TQT_SLOT( declineChallenge() ) );
+ line.tqreplace(TQRegExp("^\\s*Challenge: "), "");
challenge->setValues( line, userName );
parseMode = CHALLENGE_MODE;
}
@@ -555,12 +555,12 @@ void io_internet::parseLine( QString line )
}
}
/* SOUGHT GAME */
- else if(line.contains("seeking"))
+ else if(line.tqcontains("seeking"))
{
// writeToConsole("seeking", "K_CH");
}
/* PRIVATE TELL */
- else if(line.contains(QRegExp(".+ tells you: .*")))
+ else if(line.tqcontains(TQRegExp(".+ tells you: .*")))
{
/* First grab the user name so we can auto-respond later */
emit sendCMD( Command( 0, CMD_Set_Src_Tell, line.section(' ', 0, 0) ) );
@@ -568,19 +568,19 @@ void io_internet::parseLine( QString line )
writeToConsole(line, "K_PVT");
}
/* SAY */
- else if(line.contains( QRegExp(".+ says: .*")))
+ else if(line.tqcontains( TQRegExp(".+ says: .*")))
{
myResource->play(SND_SAY);
writeToConsole(line, "K_PVT");
return;
}
/* WHISPER & KIBITZ */
- else if(line.contains(QRegExp(".+ whispers: .*")) || line.contains(QRegExp(".+ kibitzes: .*")))
+ else if(line.tqcontains(TQRegExp(".+ whispers: .*")) || line.tqcontains(TQRegExp(".+ kibitzes: .*")))
{
writeToConsole(line, "K_WSP");
}
/* Important System Messages: Use Whisper Color */
- else if(line.contains(QRegExp("declines the draw request\\.$" )))
+ else if(line.tqcontains(TQRegExp("declines the draw request\\.$" )))
{
writeToConsole(line, "K_WSP");
}
@@ -589,57 +589,57 @@ void io_internet::parseLine( QString line )
{
writeToConsole(line, "K_WSP");
}
- else if( line.contains( QRegExp(".+rating adjustment:.+" ) ) )
+ else if( line.tqcontains( TQRegExp(".+rating adjustment:.+" ) ) )
{
writeToConsole(line, "K_WSP");
}
/* SHOUTS */
- else if( line.contains( QRegExp("^c?t?s?-?shouts: ") ) )
+ else if( line.tqcontains( TQRegExp("^c?t?s?-?shouts: ") ) )
{
writeToConsole(line, "K_SHT");
}
/* NOTIFY */
- else if((line.contains(QRegExp("\\s*Notification:"))) ||
- (line.contains(QRegExp("\\s*Present company includes:"))) ||
- (line.contains(QRegExp("\\s*Your arrival was noted by:"))))
+ else if((line.tqcontains(TQRegExp("\\s*Notification:"))) ||
+ (line.tqcontains(TQRegExp("\\s*Present company includes:"))) ||
+ (line.tqcontains(TQRegExp("\\s*Your arrival was noted by:"))))
{
writeToConsole(line, "K_NOT");
myResource->play( SND_NOTIFICATION );
}
/* CHANNEL TELLS */
- else if(line.contains(QRegExp( ".\\(\\d+\\):" )))
+ else if(line.tqcontains(TQRegExp( ".\\(\\d+\\):" )))
{
/* First grab the channel # so we can auto-respond later */
- j = line.find(QString("):"));
- i = line.findRev(QString("("), j) + 1;
+ j = line.tqfind(TQString("):"));
+ i = line.tqfindRev(TQString("("), j) + 1;
emit sendCMD( Command( 0, CMD_Set_Src_Channel, line.mid(i, j - i) ) );
writeToConsole(line, "K_CH");
}
- else if(line.contains(QRegExp("^<12>\\s")))
+ else if(line.tqcontains(TQRegExp("^<12>\\s")))
{
/* a game move */
parseStyle12(line, PARSE12_MODE_MOVE);
}
- else if(line.contains(QRegExp("^<b1>\\s")))
+ else if(line.tqcontains(TQRegExp("^<b1>\\s")))
{
/* a bughouse piece has been passed or a piece has been captured in crazyhouse */
writeToConsole(line, "K_CH");
}
- else if(line.contains(QRegExp("^\\\\")))
+ else if(line.tqcontains(TQRegExp("^\\\\")))
{
writeToConsole(line, lastTag);
}
- else if(line.contains(QRegExp("^\\{?Game \\d+")) && line.contains("Creating", TRUE))
+ else if(line.tqcontains(TQRegExp("^\\{?Game \\d+")) && line.tqcontains("Creating", TRUE))
{
parseMode = NEW_GAME_MODE;
}
- else if(line.contains("You are now observing game"))
+ else if(line.tqcontains("You are now observing game"))
{
parseMode = OBSERVE_GAME_MODE;
}
else if(line.startsWith("Movelist for game"))
{
- QRegExp gameNumber("\\d+");
+ TQRegExp gameNumber("\\d+");
int pos = gameNumber.search(line);
if(pos > -1)
{
@@ -647,21 +647,21 @@ void io_internet::parseLine( QString line )
}
parseMode = PARSE_MOVE_LIST_MODE;
}
- else if((line.contains(QRegExp("^\\{?Game \\d+")) || line.contains(QRegExp("Game \\d+"))) &&
+ else if((line.tqcontains(TQRegExp("^\\{?Game \\d+")) || line.tqcontains(TQRegExp("Game \\d+"))) &&
(
- line.contains(" forfeits by disconnection", TRUE) ||
- line.contains(" forfeits by disconnection}", TRUE) ||
- line.contains(" forfeits on time} ", TRUE) ||
- line.contains(" forfeits on time ", TRUE) ||
- line.contains(" resigns} ", TRUE) ||
- line.contains(" resigns ", TRUE) ||
- line.contains(" Game drawn by mutual agreement ", TRUE) ||
- line.contains(" Game drawn by mutual agreement} ", TRUE) ||
- line.contains(", has lost contact or quit.", TRUE) ||
- line.contains(" checkmated ", TRUE) ||
- line.contains(" checkmated} ", TRUE) ||
- line.contains("lost connection", TRUE) ||
- line.contains("has no material to mate", TRUE)
+ line.tqcontains(" forfeits by disconnection", TRUE) ||
+ line.tqcontains(" forfeits by disconnection}", TRUE) ||
+ line.tqcontains(" forfeits on time} ", TRUE) ||
+ line.tqcontains(" forfeits on time ", TRUE) ||
+ line.tqcontains(" resigns} ", TRUE) ||
+ line.tqcontains(" resigns ", TRUE) ||
+ line.tqcontains(" Game drawn by mutual agreement ", TRUE) ||
+ line.tqcontains(" Game drawn by mutual agreement} ", TRUE) ||
+ line.tqcontains(", has lost contact or quit.", TRUE) ||
+ line.tqcontains(" checkmated ", TRUE) ||
+ line.tqcontains(" checkmated} ", TRUE) ||
+ line.tqcontains("lost connection", TRUE) ||
+ line.tqcontains("has no material to mate", TRUE)
)
)
{
@@ -671,15 +671,15 @@ void io_internet::parseLine( QString line )
{
/* don't know what to do with it, just send it to the console */
/* don't write the prompt to the console */
- if( line.contains( QRegExp( "^a?d?f?g?s?z?ics% " ) ) ||
- line.contains( QRegExp( "^cex% " ) ) ||
- line.contains( QRegExp( "^chess% " ) ) )
+ if( line.tqcontains( TQRegExp( "^a?d?f?g?s?z?ics% " ) ) ||
+ line.tqcontains( TQRegExp( "^cex% " ) ) ||
+ line.tqcontains( TQRegExp( "^chess% " ) ) )
break;
writeToConsole(line, "K_STD");
}
break;
case UPDATE_SOUGHT_MODE:
- if(line.contains(QRegExp("\\d+\\s+ads? displayed.")))
+ if(line.tqcontains(TQRegExp("\\d+\\s+ads? displayed.")))
{
updateSoughtList(line);
parseMode = NORMAL_MODE;
@@ -690,7 +690,7 @@ void io_internet::parseLine( QString line )
}
break;
case NEW_GAME_MODE:
- if(line.contains(QRegExp("<12>\\s")))
+ if(line.tqcontains(TQRegExp("<12>\\s")))
{
/* a game move */
parseStyle12(line, PARSE12_MODE_NEW);
@@ -701,7 +701,7 @@ void io_internet::parseLine( QString line )
}
break;
case OBSERVE_GAME_MODE:
- if(line.contains(QRegExp("<12>\\s")))
+ if(line.tqcontains(TQRegExp("<12>\\s")))
{
/* a game move */
parseStyle12(line, PARSE12_MODE_NEW);
@@ -716,9 +716,9 @@ void io_internet::parseLine( QString line )
}
break;
case PARSE_MOVE_LIST_MODE:
- if(!line.contains("{Still in progress}"))
+ if(!line.tqcontains("{Still in progress}"))
{
- if(line.contains(QRegExp("\\d\\.")))
+ if(line.tqcontains(TQRegExp("\\d\\.")))
{
parseMoveList(line);
}
@@ -738,13 +738,13 @@ void io_internet::parseLine( QString line )
// io_internet::ParseStyle12
//
///////////////////////////////////////
-void io_internet::parseStyle12(QString line, const unsigned int Mode)
+void io_internet::parseStyle12(TQString line, const unsigned int Mode)
{
// kdWarning() << line << endl;
struct ChessMove move;
- QStringList fields;
- QString position_line = "";
+ TQStringList fields;
+ TQString position_line = "";
match_param *param = NULL;
Command::clearMove(&move);
switch(Mode)
@@ -753,7 +753,7 @@ void io_internet::parseStyle12(QString line, const unsigned int Mode)
{
/* a new game that we are playing, or observing */
param = new match_param(this->myResource);
- fields = QStringList::split( QChar(' '), line, FALSE );
+ fields = TQStringList::split( TQChar(' '), line, FALSE );
/* set white time control */
TCPList tmpListWhite(param->time(WHITE));
@@ -808,7 +808,7 @@ void io_internet::parseStyle12(QString line, const unsigned int Mode)
}
case PARSE12_MODE_MOVE:
{
- fields = QStringList::split( QChar(' '), line, FALSE );
+ fields = TQStringList::split( TQChar(' '), line, FALSE );
/* various ICS stuff for ChessMove */
move.ICS_ClockTicking = fields[31].toInt();
@@ -847,9 +847,9 @@ void io_internet::parseStyle12(QString line, const unsigned int Mode)
}
/* Verbose Coordinate Notation of previous move ( USE AS CAN ) */
- strcpy(move.CAN, fields[27].right(fields[27].length() - 2).replace(QRegExp("-"), ""));
+ strcpy(move.CAN, fields[27].right(fields[27].length() - 2).tqreplace(TQRegExp("-"), ""));
/* SAN */
- strcpy(move.SAN, fields[29].replace(QRegExp("\\+"), "").replace(QRegExp("#"), ""));
+ strcpy(move.SAN, fields[29].tqreplace(TQRegExp("\\+"), "").tqreplace(TQRegExp("#"), ""));
/* fill the line for the command */
position_line += fields[1]; /* Internal Rank #7 */
@@ -885,35 +885,35 @@ void io_internet::parseStyle12(QString line, const unsigned int Mode)
// io_internet::ParsePlayer
//
///////////////////////////////////////
-//void io_internet::ParsePlayer( QString Handle )
+//void io_internet::ParsePlayer( TQString Handle )
//{
// player.Raw = Handle;
/* SysAdmin */
-// if( Handle.contains( QRegExp("\\(\\*\\)") ) )
+// if( Handle.tqcontains( TQRegExp("\\(\\*\\)") ) )
// {
// player.SysAdmin = TRUE;
-// Handle.replace( QRegExp("\\(\\*\\)"), QString("") );
+// Handle.tqreplace( TQRegExp("\\(\\*\\)"), TQString("") );
// }
// else player.SysAdmin = FALSE;
/* ServiceRep */
-// if( Handle.contains( QRegExp("\\(SR\\)") ) )
+// if( Handle.tqcontains( TQRegExp("\\(SR\\)") ) )
// {
// player.ServiceRep = TRUE;
-// Handle.replace( QRegExp("\\(SR\\)"), QString("") );
+// Handle.tqreplace( TQRegExp("\\(SR\\)"), TQString("") );
// }
// else player.ServiceRep = FALSE;
/* Computer */
-// if( Handle.contains( QRegExp("\\(C\\)") ) )
+// if( Handle.tqcontains( TQRegExp("\\(C\\)") ) )
// {
// player.Computer = TRUE;
-// Handle.replace( QRegExp("\\(C\\)"), QString("") );
+// Handle.tqreplace( TQRegExp("\\(C\\)"), TQString("") );
// }
// else player.Computer = FALSE;
/* Unregistered */
-// if( Handle.contains( QRegExp("\\(U\\)") ) )
+// if( Handle.tqcontains( TQRegExp("\\(U\\)") ) )
// {
// player.Unregistered = TRUE;
-// Handle.replace( QRegExp("\\(U\\)"), QString("") );
+// Handle.tqreplace( TQRegExp("\\(U\\)"), TQString("") );
// }
// else player.Unregistered = FALSE;
// return;
@@ -956,17 +956,17 @@ void io_internet::acceptChallenge( void )
// io_internet::writeToConsole
//
///////////////////////////////////////
-void io_internet::writeToConsole(QString text, QString tag)
+void io_internet::writeToConsole(TQString text, TQString tag)
{
lastTag = tag;
/* Remove Bells */
- text.replace( QRegExp("\\x0007") , "" );
+ text.tqreplace( TQRegExp("\\x0007") , "" );
/* Replace misc characters with rich-text friendly counterparts */
- text.replace( QRegExp("\\x003c"), "&#60;" );
- text.replace( QRegExp("\\x007c"), "&#124;" );
- text.replace( QRegExp( "\\f"), "");
- text.replace( QRegExp( "\\n"), "");
- text.replace( QRegExp( "\\r*" ), "" );
+ text.tqreplace( TQRegExp("\\x003c"), "&#60;" );
+ text.tqreplace( TQRegExp("\\x007c"), "&#124;" );
+ text.tqreplace( TQRegExp( "\\f"), "");
+ text.tqreplace( TQRegExp( "\\n"), "");
+ text.tqreplace( TQRegExp( "\\r*" ), "" );
emit sendCMD( Command( 0, CMD_Append_To_Console, "<" + tag + ">" + text + "</" + tag + ">" ) );
}
@@ -975,10 +975,10 @@ void io_internet::writeToConsole(QString text, QString tag)
// io_internet::updateSoughtList
//
///////////////////////////////////////
-void io_internet::updateSoughtList(QString soughtLine)
+void io_internet::updateSoughtList(TQString soughtLine)
{
/* "ADS DISPLAYED" MESSAGE */
- if(soughtLine.contains(QRegExp("\\d+\\s+ads? displayed.")))
+ if(soughtLine.tqcontains(TQRegExp("\\d+\\s+ads? displayed.")))
{
emit sendCMD( Command( 0, CMD_Show_Sought_List ) );
}
@@ -996,29 +996,29 @@ void io_internet::updateSoughtList(QString soughtLine)
void io_internet::sendUserSettings()
{
send("set style 12");
- send(QString("set interface Knights %1").arg(_VERSION_));
- send(QString("set private %1").arg(myResource->OPTION_Private));
- send(QString("set kibitz %1").arg(myResource->OPTION_Kibitz));
- send(QString("set tell %1").arg(myResource->OPTION_Tell));
- send(QString("set shout %1").arg(myResource->OPTION_Shout));
- send(QString("set seek %1").arg(myResource->OPTION_Seek));
- send(QString("set tolerance %1").arg(myResource->OPTION_Profanity));
+ send(TQString("set interface Knights %1").tqarg(_VERSION_));
+ send(TQString("set private %1").tqarg(myResource->OPTION_Private));
+ send(TQString("set kibitz %1").tqarg(myResource->OPTION_Kibitz));
+ send(TQString("set tell %1").tqarg(myResource->OPTION_Tell));
+ send(TQString("set shout %1").tqarg(myResource->OPTION_Shout));
+ send(TQString("set seek %1").tqarg(myResource->OPTION_Seek));
+ send(TQString("set tolerance %1").tqarg(myResource->OPTION_Profanity));
}
///////////////////////////////////////
//
-// io_internet::parseMoveList(QString data)
+// io_internet::parseMoveList(TQString data)
//
///////////////////////////////////////
-void io_internet::parseMoveList(QString line)
+void io_internet::parseMoveList(TQString line)
{
- QStringList two_plys;
+ TQStringList two_plys;
struct ChessMove move;
Command command;
int move_counter = 0;
/* white */
- two_plys = QStringList::split(QRegExp("\\s+"), line, FALSE);
+ two_plys = TQStringList::split(TQRegExp("\\s+"), line, FALSE);
Command::clearMove(&move);
move_counter = two_plys[0].left(two_plys[0].length() - 1).length(); /* remove the . */
move.ICS_MoveCounter = move_counter;
@@ -1047,15 +1047,15 @@ void io_internet::parseMoveList(QString line)
///////////////////////////////////////
//
-// io_internet::sendEndOfGameCommand(QString line)
+// io_internet::sendEndOfGameCommand(TQString line)
//
///////////////////////////////////////
-void io_internet::sendEndOfGameCommand(QString line)
+void io_internet::sendEndOfGameCommand(TQString line)
{
- QStringList fields;
+ TQStringList fields;
Command command;
- fields = QStringList::split( QChar(' '), line, FALSE );
+ fields = TQStringList::split( TQChar(' '), line, FALSE );
if(fields[1].endsWith(":"))
{
fields[1] = fields[1].left(fields[1].length() - 1);
@@ -1064,11 +1064,11 @@ void io_internet::sendEndOfGameCommand(QString line)
fields[fields.count() - 1] = fields[fields.count() - 1].stripWhiteSpace();
if(fields[fields.count() - 1] == "1-0" )
{
- if(fields[fields.count() - 2].contains("resigns"))
+ if(fields[fields.count() - 2].tqcontains("resigns"))
{
command.setCommand((int&)CMD_Black_Resign);
}
- else if(fields[fields.count() - 2].contains("time"))
+ else if(fields[fields.count() - 2].tqcontains("time"))
{
command.setCommand((int&)CMD_White_Called_Flag);
}
@@ -1079,11 +1079,11 @@ void io_internet::sendEndOfGameCommand(QString line)
}
else if(fields[fields.count() - 1] == "0-1")
{
- if(fields[fields.count() - 2].contains("resigns"))
+ if(fields[fields.count() - 2].tqcontains("resigns"))
{
command.setCommand((int&)CMD_White_Resign);
}
- else if(fields[fields.count() - 2].contains("time"))
+ else if(fields[fields.count() - 2].tqcontains("time"))
{
command.setCommand((int&)CMD_Black_Called_Flag);
}
@@ -1122,7 +1122,7 @@ void io_internet::processSeekTimer()
void io_internet::selfDestruct()
{
/* cause the io_internet to delete itself */
- QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ TQApplication::postEvent( tqApp->mainWidget(), new TQCustomEvent( EVENT_Del_IO_Net ) );
}
///////////////////////////////////////
@@ -1130,7 +1130,7 @@ void io_internet::selfDestruct()
// io_internet::setUserInfo()
//
///////////////////////////////////////
-void io_internet::setUserInfo(QString userName, QString passWord)
+void io_internet::setUserInfo(TQString userName, TQString passWord)
{
this->userName = userName;
this->passWord = passWord;
diff --git a/knights/io_internet.h b/knights/io_internet.h
index cf56379..c6aef91 100644
--- a/knights/io_internet.h
+++ b/knights/io_internet.h
@@ -37,7 +37,7 @@ class core;
class dlg_login;
class dlg_challenge;
-#include <qfile.h>
+#include <tqfile.h>
/**
*@author Troy Corbin Jr / Alexander Wels.
@@ -68,13 +68,14 @@ const unsigned int PARSE_MOVE_LIST_MODE = 6;
const unsigned int PARSE12_MODE_NEW = 1;
const unsigned int PARSE12_MODE_MOVE = 2;
-typedef QMap<QWidget *, QWidget *> TabMap;
+typedef TQMap<TQWidget *, TQWidget *> TabMap;
class io_internet : public io_base
{
Q_OBJECT
+ TQ_OBJECT
public:
- io_internet(QWidget *parent = NULL, resource *Rsrc = NULL);
+ io_internet(TQWidget *tqparent = NULL, resource *Rsrc = NULL);
~io_internet();
public slots:
@@ -82,57 +83,57 @@ class io_internet : public io_base
void readCommand(KSocket *);
void sendUserName(void);
void sendPassword(void);
- void send(const QString&);
+ void send(const TQString&);
void nullifyChallenge( void );
void acceptChallenge( void );
void declineChallenge( void );
void processSeekTimer( void );
void connectToServer( void );
void selfDestruct( void );
- void setUserInfo(QString userName, QString passWord);
+ void setUserInfo(TQString userName, TQString passWord);
signals:
virtual void sendCMD(const Command& command);
- void setLastPrivateSource( const QString& );
- void setLastChannelSource( const QString& );
+ void setLastPrivateSource( const TQString& );
+ void setLastChannelSource( const TQString& );
protected:
- void parseLine(QString command);
- void parseLoginData(QString command);
- void writeToConsole(QString text, QString tag);
- void updateSoughtList(QString text);
- void parseStyle12(QString line, const unsigned int mode);
+ void parseLine(TQString command);
+ void parseLoginData(TQString command);
+ void writeToConsole(TQString text, TQString tag);
+ void updateSoughtList(TQString text);
+ void parseStyle12(TQString line, const unsigned int mode);
void sendUserSettings(void);
- void parseMoveList(QString data);
- void sendEndOfGameCommand(QString line);
+ void parseMoveList(TQString data);
+ void sendEndOfGameCommand(TQString line);
private:
dlg_login *loginDlg;
dlg_challenge *challenge;
/* These are used to handle the automagic seek command */
- QTimer *seekTimer;
+ TQTimer *seekTimer;
/* These are used for the connection & logon */
- QFile *Log;
+ TQFile *Log;
KSocket *socket;
KProcess *myTimeseal;
struct serverResource *myServer;
int loginStage;
unsigned int parseMode;
- QString lastTag;
+ TQString lastTag;
int ficsMoveListNumber;
- QString lineBuffer;
+ TQString lineBuffer;
bool connected;
- QString userName;
- QString passWord;
+ TQString userName;
+ TQString passWord;
/* communication with the server */
- QStringList command_list; /* this is a temp buffer while waiting for the movelist */
+ TQStringList command_list; /* this is a temp buffer while waiting for the movelist */
bool waiting_for_move_list;
- QMap<match_param *, int> fics_ids;
- QMap<int, int> fics_to_knights; /* maps fics id's to knights id's */
+ TQMap<match_param *, int> fics_ids;
+ TQMap<int, int> fics_to_knights; /* maps fics id's to knights id's */
TabMap myTabList; /* maintains the list of the tabs currently owned by this io_internet */
- QValueList<Command> myCommandBuffer; /* this is a buffer for all the commands io_internet received while not connected to a server */
+ TQValueList<Command> myCommandBuffer; /* this is a buffer for all the commands io_internet received while not connected to a server */
};
#endif
diff --git a/knights/knights.cpp b/knights/knights.cpp
index ae68539..3ff2094 100644
--- a/knights/knights.cpp
+++ b/knights/knights.cpp
@@ -33,21 +33,21 @@
#include <klocale.h>
/* KFile */
#include <kfiledialog.h>
-/* Qt */
-#include <qpalette.h>
-#include <qiconset.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qstyle.h>
+/* TQt */
+#include <tqpalette.h>
+#include <tqiconset.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqstyle.h>
-Knights::Knights(KCmdLineArgs *Args, QWidget *parent, const char *name) : KMainWindow(parent, name)
+Knights::Knights(KCmdLineArgs *Args, TQWidget *tqparent, const char *name) : KMainWindow(tqparent, name)
{
InitAll = TRUE;
ResizeFlag = TRUE;
Minimized = FALSE;
args = Args;
SplashScreen = NULL;
- setFocusPolicy( ClickFocus );
+ setFocusPolicy( TQ_ClickFocus );
}
Knights::~Knights()
{
@@ -76,21 +76,21 @@ void Knights::BirthAll(void)
matchMenu = new KPopupMenu( this, "matchMenu");
drawMenu = new KPopupMenu( this, "drawMenu");
tutorialMenu = new KPopupMenu( this, "tutorialMenu");
- MainFrame = new QFrame( this, "MainFrame" );
+ MainFrame = new TQFrame( this, "MainFrame" );
Core = new core( MainFrame, "Core", Resource );
- Message = new QLabel( MainFrame, "Message");
- whiteTimeLabel = new QLabel( MainFrame, "whiteTimeLabel");
- blackTimeLabel = new QLabel( MainFrame, "blackTimeLabel");
+ Message = new TQLabel( MainFrame, "Message");
+ whiteTimeLabel = new TQLabel( MainFrame, "whiteTimeLabel");
+ blackTimeLabel = new TQLabel( MainFrame, "blackTimeLabel");
notationBar = new KComboBox( MainFrame, "notationBar");
/* Connect all Signals & Slots */
- connect( Core, SIGNAL( requestResize() ), this, SLOT( resizeMainFrame() ) );
- connect( Core, SIGNAL( setStatusBar(const int&, const QString& ) ), this, SLOT( setStatusBar(const int&, const QString& ) ) );
- connect( Core, SIGNAL( setNotation() ), this, SLOT( setNotation() ) );
- connect( Core, SIGNAL( initMatch() ), this, SLOT( initMatch() ) );
- connect( Core, SIGNAL( setClocks() ), this, SLOT( setClocks() ) );
- connect( Core, SIGNAL( serverDestroyed() ), this, SLOT( netConnect() ) );
- connect( notationBar, SIGNAL( activated(int) ), Core, SLOT( review(int) ) );
+ connect( Core, TQT_SIGNAL( requestResize() ), this, TQT_SLOT( resizeMainFrame() ) );
+ connect( Core, TQT_SIGNAL( setStatusBar(const int&, const TQString& ) ), this, TQT_SLOT( setStatusBar(const int&, const TQString& ) ) );
+ connect( Core, TQT_SIGNAL( setNotation() ), this, TQT_SLOT( setNotation() ) );
+ connect( Core, TQT_SIGNAL( initMatch() ), this, TQT_SLOT( initMatch() ) );
+ connect( Core, TQT_SIGNAL( setClocks() ), this, TQT_SLOT( setClocks() ) );
+ connect( Core, TQT_SIGNAL( serverDestroyed() ), this, TQT_SLOT( netConnect() ) );
+ connect( notationBar, TQT_SIGNAL( activated(int) ), Core, TQT_SLOT( review(int) ) );
}
///////////////////////////////////////
//
@@ -101,7 +101,7 @@ void Knights::menuClose(void)
{
if( !queryClose() )
return;
- qApp->quit();
+ tqApp->quit();
}
///////////////////////////////////////
//
@@ -143,8 +143,8 @@ void Knights::KillAll(void)
bool Knights::init( void )
{
wiz_setup *Wizard;
- QColorGroup GroupWhite;
- QColorGroup GroupBlack;
+ TQColorGroup GroupWhite;
+ TQColorGroup GroupBlack;
BirthAll();
SelectTheme(-1,-1);
@@ -154,30 +154,30 @@ bool Knights::init( void )
/*
Connect Accelerators
*/
- connect( Resource->myAccel, SIGNAL( board_up() ), this, SLOT( boardBigger() ) );
- connect( Resource->myAccel, SIGNAL( board_down() ), this, SLOT( boardSmaller() ) );
- connect( Resource->myAccel, SIGNAL( move_prev() ), this, SLOT( PrevNotation() ) );
- connect( Resource->myAccel, SIGNAL( move_next() ), this, SLOT( NextNotation() ) );
- connect( this, SIGNAL( focus( const QChar& ) ), Resource->myAccel, SIGNAL( focus( const QChar& ) ) );
+ connect( Resource->myAccel, TQT_SIGNAL( board_up() ), this, TQT_SLOT( boardBigger() ) );
+ connect( Resource->myAccel, TQT_SIGNAL( board_down() ), this, TQT_SLOT( boardSmaller() ) );
+ connect( Resource->myAccel, TQT_SIGNAL( move_prev() ), this, TQT_SLOT( PrevNotation() ) );
+ connect( Resource->myAccel, TQT_SIGNAL( move_next() ), this, TQT_SLOT( NextNotation() ) );
+ connect( this, TQT_SIGNAL( focus( const TQChar& ) ), Resource->myAccel, TQT_SIGNAL( focus( const TQChar& ) ) );
initMenus();
/* Init Message */
- Message->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine );
+ Message->tqsetAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::SingleLine );
/* Init White Time Label */
- GroupWhite.setColor( QColorGroup::Background, Resource->COLOR_White );
- GroupWhite.setColor( QColorGroup::Foreground, Resource->COLOR_Black );
- whiteTimeLabel->setPalette( QPalette( GroupWhite, GroupWhite, GroupWhite ) );
- whiteTimeLabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
- whiteTimeLabel->setAlignment( Qt::AlignCenter | Qt::SingleLine );
+ GroupWhite.setColor( TQColorGroup::Background, Resource->COLOR_White );
+ GroupWhite.setColor( TQColorGroup::Foreground, Resource->COLOR_Black );
+ whiteTimeLabel->setPalette( TQPalette( GroupWhite, GroupWhite, GroupWhite ) );
+ whiteTimeLabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
+ whiteTimeLabel->tqsetAlignment( TQt::AlignCenter | TQt::SingleLine );
/* Init Black Time Label */
- GroupBlack.setColor( QColorGroup::Background, Resource->COLOR_Black );
- GroupBlack.setColor( QColorGroup::Foreground, Resource->COLOR_White );
- blackTimeLabel->setPalette( QPalette( GroupBlack, GroupBlack, GroupBlack ) );
- blackTimeLabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
- blackTimeLabel->setAlignment( Qt::AlignCenter | Qt::SingleLine );
+ GroupBlack.setColor( TQColorGroup::Background, Resource->COLOR_Black );
+ GroupBlack.setColor( TQColorGroup::Foreground, Resource->COLOR_White );
+ blackTimeLabel->setPalette( TQPalette( GroupBlack, GroupBlack, GroupBlack ) );
+ blackTimeLabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
+ blackTimeLabel->tqsetAlignment( TQt::AlignCenter | TQt::SingleLine );
/* Configure self */
setCentralWidget( MainFrame );
@@ -207,7 +207,7 @@ bool Knights::init( void )
/* Begin loading file from command line */
if( args->count() )
{
- Core->load( QString( args->arg( 0 ) ) );
+ Core->load( TQString( args->arg( 0 ) ) );
}
else
{
@@ -247,125 +247,125 @@ void Knights::initMenus( void )
matchMenu->insertItem( i18n( "&Draw" ), drawMenu, MENU_DRAW );
matchMenu->setItemEnabled( MENU_DRAW, FALSE );
// MENU_RETRACT
- matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("undo"), KIcon::Small ) ),
- i18n( "&Retract Move" ), Core, SLOT(matchMenu(int)), 0, MENU_RETRACT );
+ matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("undo"), KIcon::Small ) ),
+ i18n( "&Retract Move" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_RETRACT );
matchMenu->setItemEnabled( MENU_RETRACT, FALSE );
- matchMenu->setWhatsThis( MENU_RETRACT, i18n( "Select this to retract your last move." ) );
+ matchMenu->tqsetWhatsThis( MENU_RETRACT, i18n( "Select this to retract your last move." ) );
// MENU_RESIGN
- matchMenu->insertItem( i18n( "Resign" ), Core, SLOT(matchMenu(int)), 0, MENU_RESIGN );
+ matchMenu->insertItem( i18n( "Resign" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_RESIGN );
matchMenu->setItemEnabled( MENU_RESIGN, FALSE );
- matchMenu->setWhatsThis( MENU_RESIGN, i18n( "Use this to concede the match to your opponent." ) );
+ matchMenu->tqsetWhatsThis( MENU_RESIGN, i18n( "Use this to concede the match to your opponent." ) );
// MENU_CALL_FLAG
- matchMenu->insertItem( i18n( "&Call Flag" ), Core, SLOT(matchMenu(int)), 0, MENU_CALL_FLAG );
+ matchMenu->insertItem( i18n( "&Call Flag" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_CALL_FLAG );
matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE );
- matchMenu->setWhatsThis( MENU_CALL_FLAG, i18n( "Use this to declare the match over, due to your opponent being out of time." ) );
+ matchMenu->tqsetWhatsThis( MENU_CALL_FLAG, i18n( "Use this to declare the match over, due to your opponent being out of time." ) );
// MENU_HINT
- matchMenu->insertItem( i18n( "&Hint" ), Core, SLOT(matchMenu(int)), 0, MENU_HINT );
+ matchMenu->insertItem( i18n( "&Hint" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_HINT );
matchMenu->setItemEnabled( MENU_HINT, FALSE );
- matchMenu->setWhatsThis( MENU_HINT, i18n( "This will ask your opponent for a hint." ) );
+ matchMenu->tqsetWhatsThis( MENU_HINT, i18n( "This will ask your opponent for a hint." ) );
// MENU_MOVE_NOW
- matchMenu->insertItem( i18n( "Move &Now" ), Core, SLOT(matchMenu(int)), 0, MENU_MOVE_NOW );
+ matchMenu->insertItem( i18n( "Move &Now" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_MOVE_NOW );
matchMenu->setItemEnabled( MENU_MOVE_NOW, FALSE );
- matchMenu->setWhatsThis( MENU_MOVE_NOW, i18n( "Clicking this option will force your opponent to move immediately." ) );
+ matchMenu->tqsetWhatsThis( MENU_MOVE_NOW, i18n( "Clicking this option will force your opponent to move immediately." ) );
// MENU_ORIENTATION
- matchMenu->insertItem( i18n( "&Flip View" ), Core, SLOT(matchMenu(int)), Key_F2, MENU_ORIENTATION );
+ matchMenu->insertItem( i18n( "&Flip View" ), Core, TQT_SLOT(matchMenu(int)), Key_F2, MENU_ORIENTATION );
matchMenu->setItemEnabled( MENU_ORIENTATION, FALSE );
- matchMenu->setWhatsThis( MENU_ORIENTATION, i18n( "This will reverse the chessboard's orientation by 180 degrees." ) );
+ matchMenu->tqsetWhatsThis( MENU_ORIENTATION, i18n( "This will reverse the chessboard's orientation by 180 degrees." ) );
// MENU_PONDER
- matchMenu->insertItem( i18n( "&Ponder" ), this, SLOT(Settings(int)), 0, MENU_PONDER );
+ matchMenu->insertItem( i18n( "&Ponder" ), this, TQT_SLOT(Settings(int)), 0, MENU_PONDER );
matchMenu->setItemChecked( MENU_PONDER, Resource->OPTION_Ponder );
matchMenu->setItemEnabled( MENU_PONDER, FALSE );
- matchMenu->setWhatsThis( MENU_PONDER, i18n( "This toggles your opponent's ability to think while it's your turn." ) );
+ matchMenu->tqsetWhatsThis( MENU_PONDER, i18n( "This toggles your opponent's ability to think while it's your turn." ) );
matchMenu->insertSeparator();
// MENU_PAUSE
- matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("player_pause"), KIcon::Small ) ),
- i18n( "Pause" ), this, SLOT( Settings(int) ), Key_F12, MENU_PAUSE );
+ matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("player_pause"), KIcon::Small ) ),
+ i18n( "Pause" ), this, TQT_SLOT( Settings(int) ), Key_F12, MENU_PAUSE );
matchMenu->setItemEnabled( MENU_PAUSE, FALSE );
- matchMenu->setWhatsThis( MENU_PAUSE, i18n( "Select this to pause the clock for this match." ) );
+ matchMenu->tqsetWhatsThis( MENU_PAUSE, i18n( "Select this to pause the clock for this match." ) );
/*
drawMenu menu
*/
// MENU_OFFER_DRAW
- drawMenu->insertItem( i18n( "&Offer Draw" ), Core, SLOT(matchMenu(int)), 0, MENU_OFFER_DRAW );
- drawMenu->setWhatsThis( MENU_OFFER_DRAW, i18n( "Clicking this will inform your opponent that you are willing draw the match." ) );
+ drawMenu->insertItem( i18n( "&Offer Draw" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_OFFER_DRAW );
+ drawMenu->tqsetWhatsThis( MENU_OFFER_DRAW, i18n( "Clicking this will inform your opponent that you are willing draw the match." ) );
// MENU_ACCEPT_DRAW
- drawMenu->insertItem( i18n( "&Accept Draw" ), Core, SLOT(matchMenu(int)), 0, MENU_ACCEPT_DRAW );
- drawMenu->setWhatsThis( MENU_ACCEPT_DRAW, i18n( "Clicking this will accept a draw offered by your opponent." ) );
+ drawMenu->insertItem( i18n( "&Accept Draw" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_ACCEPT_DRAW );
+ drawMenu->tqsetWhatsThis( MENU_ACCEPT_DRAW, i18n( "Clicking this will accept a draw offered by your opponent." ) );
// MENU_REJECT_DRAW
- drawMenu->insertItem( i18n( "&Reject Draw" ), Core, SLOT(matchMenu(int)), 0, MENU_REJECT_DRAW );
- drawMenu->setWhatsThis( MENU_REJECT_DRAW, i18n( "Clicking this will reject a draw offered by your opponent." ) );
+ drawMenu->insertItem( i18n( "&Reject Draw" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_REJECT_DRAW );
+ drawMenu->tqsetWhatsThis( MENU_REJECT_DRAW, i18n( "Clicking this will reject a draw offered by your opponent." ) );
// MENU_IGNORE_DRAW
- drawMenu->insertItem( i18n( "&Ignore Draw" ), Core, SLOT(matchMenu(int)), 0, MENU_IGNORE_DRAW );
- drawMenu->setWhatsThis( MENU_IGNORE_DRAW, i18n( "Clicking this will ignore future draw offers from your opponent." ) );
+ drawMenu->insertItem( i18n( "&Ignore Draw" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_IGNORE_DRAW );
+ drawMenu->tqsetWhatsThis( MENU_IGNORE_DRAW, i18n( "Clicking this will ignore future draw offers from your opponent." ) );
/*
fileMenu menu
*/
// MENU_NEWGAME
- fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filenew"), KIcon::Small ) ),
- i18n( "&New Match..." ), this, SLOT( openNewMatchDialog() ), CTRL+Key_N, MENU_NEWGAME );
- fileMenu->setWhatsThis( MENU_NEWGAME, i18n( "This allows you to begin a new match." ) );
+ fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filenew"), KIcon::Small ) ),
+ i18n( "&New Match..." ), this, TQT_SLOT( openNewMatchDialog() ), CTRL+Key_N, MENU_NEWGAME );
+ fileMenu->tqsetWhatsThis( MENU_NEWGAME, i18n( "This allows you to begin a new match." ) );
// MENU_LOAD
- fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileopen"), KIcon::Small ) ),
- i18n( "&Load Match..." ), Core, SLOT( load() ), CTRL+Key_L, MENU_LOAD );
- fileMenu->setWhatsThis( MENU_LOAD, i18n( "The Load command will allow you to select a previously saved match and play it again." ) );
+ fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileopen"), KIcon::Small ) ),
+ i18n( "&Load Match..." ), Core, TQT_SLOT( load() ), CTRL+Key_L, MENU_LOAD );
+ fileMenu->tqsetWhatsThis( MENU_LOAD, i18n( "The Load command will allow you to select a previously saved match and play it again." ) );
fileMenu->insertSeparator();
// MENU_SAVE
- fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filesave"), KIcon::Small ) ),
- i18n( "&Save Match" ), this, SLOT( SaveGame() ), CTRL+Key_S, MENU_SAVE );
+ fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), KIcon::Small ) ),
+ i18n( "&Save Match" ), this, TQT_SLOT( SaveGame() ), CTRL+Key_S, MENU_SAVE );
fileMenu->setItemEnabled( MENU_SAVE, FALSE );
- fileMenu->setWhatsThis( MENU_SAVE, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
+ fileMenu->tqsetWhatsThis( MENU_SAVE, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
// MENU_SAVEAS
- fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filesave"), KIcon::Small ) ),
- i18n( "Save Match &As..." ), this, SLOT( SaveGameAs() ), CTRL+Key_A, MENU_SAVEAS );
+ fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), KIcon::Small ) ),
+ i18n( "Save Match &As..." ), this, TQT_SLOT( SaveGameAs() ), CTRL+Key_A, MENU_SAVEAS );
fileMenu->setItemEnabled( MENU_SAVEAS, FALSE );
- fileMenu->setWhatsThis( MENU_SAVEAS, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
+ fileMenu->tqsetWhatsThis( MENU_SAVEAS, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
fileMenu->insertSeparator();
// MENU_CONNECT
- fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("connect_creating"), KIcon::Small ) ),
- i18n( "Connect to Server" ), this, SLOT( netConnect() ), CTRL+Key_C, MENU_CONNECT );
- fileMenu->setWhatsThis( MENU_CONNECT, i18n( "Clicking this will connect Knights with an internet chess server." ) );
+ fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("connect_creating"), KIcon::Small ) ),
+ i18n( "Connect to Server" ), this, TQT_SLOT( netConnect() ), CTRL+Key_C, MENU_CONNECT );
+ fileMenu->tqsetWhatsThis( MENU_CONNECT, i18n( "Clicking this will connect Knights with an internet chess server." ) );
fileMenu->insertSeparator();
// MENU_PRINT
- fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileprint"), KIcon::Small ) ),
- i18n( "&Print Notation..." ), Core, SLOT( print() ), CTRL+Key_P, MENU_PRINT );
+ fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileprint"), KIcon::Small ) ),
+ i18n( "&Print Notation..." ), Core, TQT_SLOT( print() ), CTRL+Key_P, MENU_PRINT );
fileMenu->setItemEnabled( MENU_PRINT, FALSE );
- fileMenu->setWhatsThis( MENU_PRINT, i18n( "The Print command will allow you to print this game's notation on your printer." ) );
+ fileMenu->tqsetWhatsThis( MENU_PRINT, i18n( "The Print command will allow you to print this game's notation on your printer." ) );
fileMenu->insertSeparator();
// MENU_CLOSE
- fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileclose"), KIcon::Small ) ),
- i18n( "&Close Match" ), Core, SLOT( clearMatch() ), CTRL+Key_W, MENU_CLOSE );
+ fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileclose"), KIcon::Small ) ),
+ i18n( "&Close Match" ), Core, TQT_SLOT( clearMatch() ), CTRL+Key_W, MENU_CLOSE );
fileMenu->setItemEnabled( MENU_CLOSE, FALSE );
- fileMenu->setWhatsThis( MENU_CLOSE, i18n( "This command removes the current match." ) );
+ fileMenu->tqsetWhatsThis( MENU_CLOSE, i18n( "This command removes the current match." ) );
// MENU_CLOSEALL
- fileMenu->insertItem( i18n( "Close All" ), Core, SLOT( clearAll() ), 0, MENU_CLOSEALL );
+ fileMenu->insertItem( i18n( "Close All" ), Core, TQT_SLOT( clearAll() ), 0, MENU_CLOSEALL );
fileMenu->setItemEnabled( MENU_CLOSEALL, FALSE );
- fileMenu->setWhatsThis( MENU_CLOSEALL, i18n( "This command will remove all matches that are currently loaded." ) );
+ fileMenu->tqsetWhatsThis( MENU_CLOSEALL, i18n( "This command will remove all matches that are currently loaded." ) );
fileMenu->insertSeparator();
- // MENU_QUIT
- fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("exit"), KIcon::Small ) ),
- i18n( "&Quit" ), this, SLOT(menuClose()), CTRL+Key_Q, MENU_QUIT );
- fileMenu->setWhatsThis( MENU_QUIT, i18n( "The Quit command will stop all matches and exit Knights." ) );
+ // MENU_TQUIT
+ fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("exit"), KIcon::Small ) ),
+ i18n( "&Quit" ), this, TQT_SLOT(menuClose()), CTRL+Key_Q, MENU_TQUIT );
+ fileMenu->tqsetWhatsThis( MENU_TQUIT, i18n( "The Quit command will stop all matches and exit Knights." ) );
/*
settingsMenu menu
*/
// MENU_INSTALL_THEMES
- settingsMenu->insertItem( i18n( "&Install Themes" ), this, SLOT(installThemes()), 0, MENU_INSTALL_THEMES );
- settingsMenu->setWhatsThis( MENU_INSTALL_THEMES, i18n( "This lets you install downloaded themes into Knights." ) );
+ settingsMenu->insertItem( i18n( "&Install Themes" ), this, TQT_SLOT(installThemes()), 0, MENU_INSTALL_THEMES );
+ settingsMenu->tqsetWhatsThis( MENU_INSTALL_THEMES, i18n( "This lets you install downloaded themes into Knights." ) );
// MENU_BINDINGS_DIALOG
- settingsMenu->insertItem( QIconSet( Resource->LoadIcon( QString("key_bindings"), KIcon::Small ) ),
- i18n( "Configure &Key Bindings..." ), this, SLOT(openKeyBindingDialog()), 0, MENU_BINDINGS_DIALOG );
- settingsMenu->setWhatsThis( MENU_BINDINGS_DIALOG, i18n( "Click this if you want to change the keyboard shortcuts that Knights uses." ) );
+ settingsMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("key_bindings"), KIcon::Small ) ),
+ i18n( "Configure &Key Bindings..." ), this, TQT_SLOT(openKeyBindingDialog()), 0, MENU_BINDINGS_DIALOG );
+ settingsMenu->tqsetWhatsThis( MENU_BINDINGS_DIALOG, i18n( "Click this if you want to change the keyboard shortcuts that Knights uses." ) );
// MENU_SETTINGS_DIALOG
- settingsMenu->insertItem( QIconSet( Resource->LoadIcon( QString("configure"), KIcon::Small ) ),
- i18n( "&Configure Knights..." ), this, SLOT(openSettingsDialog()), 0, MENU_SETTINGS_DIALOG );
- settingsMenu->setWhatsThis( MENU_SETTINGS_DIALOG, i18n( "This opens a new window which allows you to customize Knights to your particular tastes." ) );
+ settingsMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("configure"), KIcon::Small ) ),
+ i18n( "&Configure Knights..." ), this, TQT_SLOT(openSettingsDialog()), 0, MENU_SETTINGS_DIALOG );
+ settingsMenu->tqsetWhatsThis( MENU_SETTINGS_DIALOG, i18n( "This opens a new window which allows you to customize Knights to your particular tastes." ) );
/*
tutorialMenu menu
*/
tutorialMenu->setCheckable(TRUE);
// MENU_OPEN_TUTORIAL
- tutorialMenu->insertItem( i18n( "Begin a Tutorial" ), this, SLOT(Settings(int)), 0, MENU_OPEN_TUTORIAL );
-// tutorialMenu->setWhatsThis( MENU_OPEN_TUTORIAL, i18n( "" ) );
+ tutorialMenu->insertItem( i18n( "Begin a Tutorial" ), this, TQT_SLOT(Settings(int)), 0, MENU_OPEN_TUTORIAL );
+// tutorialMenu->tqsetWhatsThis( MENU_OPEN_TUTORIAL, i18n( "" ) );
/*
topMenu menu
*/
@@ -383,9 +383,9 @@ void Knights::initMenus( void )
///////////////////////////////////////
void Knights::resizeMainFrame(void)
{
- QStyle& Style = QApplication::style();
- QSize S_Message;
- QSize S_Menu;
+ TQStyle& Style = TQApplication::tqstyle();
+ TQSize S_Message;
+ TQSize S_Menu;
int statusY(0);
int statusX(0);
@@ -397,8 +397,8 @@ void Knights::resizeMainFrame(void)
Core->move( 0, 0 );
Core->resize();
/* Get our size hints */
- S_Message = Message->sizeHint();
- S_Menu = topMenu->sizeHint();
+ S_Message = Message->tqsizeHint();
+ S_Menu = topMenu->tqsizeHint();
statusHeight = S_Message.height() + ( margin << 1 );
statusY += Core->height() + margin + statusHeight + margin;
statusX = Core->width();
@@ -421,7 +421,7 @@ void Knights::resizeMainFrame(void)
// Knights::event
//
///////////////////////////////////////
-bool Knights::event( QEvent *e )
+bool Knights::event( TQEvent *e )
{
if( e->type() == EVENT_Del_IO_Net )
{
@@ -435,9 +435,9 @@ bool Knights::event( QEvent *e )
// Knights::resizeEvent
//
///////////////////////////////////////
-void Knights::resizeEvent( QResizeEvent * )
+void Knights::resizeEvent( TQResizeEvent * )
{
- QSize S_Message;
+ TQSize S_Message;
int tmp(0);
int statusHeight(0);
int statusY(0);
@@ -447,7 +447,7 @@ void Knights::resizeEvent( QResizeEvent * )
if( ResizeFlag ) return;
/* Get the height & Y of the status bar */
gridX = Core->width() >> 3;
- S_Message = Message->sizeHint() + QSize( 2, 2 );
+ S_Message = Message->tqsizeHint() + TQSize( 2, 2 );
statusHeight = S_Message.height() + ( margin << 1 );
Resource->Widget_Height = statusHeight;
statusY += Core->height() + margin;
@@ -479,11 +479,11 @@ void Knights::resizeEvent( QResizeEvent * )
// Knights::keyPressEvent
//
///////////////////////////////////////
-void Knights::keyPressEvent( QKeyEvent *e )
+void Knights::keyPressEvent( TQKeyEvent *e )
{
- QChar input;
+ TQChar input;
- if( ( e->state() | Qt::ShiftButton ) == Qt::ShiftButton )
+ if( ( e->state() | TQt::ShiftButton ) == TQt::ShiftButton )
{
input = e->text().at(0);
if( input.isLetterOrNumber() )
@@ -500,7 +500,7 @@ void Knights::keyPressEvent( QKeyEvent *e )
// Knights::hideEvent
//
///////////////////////////////////////
-void Knights::hideEvent( QHideEvent* )
+void Knights::hideEvent( TQHideEvent* )
{
if( !Resource->OPTION_Pause_On_Minimize )
return;
@@ -512,7 +512,7 @@ void Knights::hideEvent( QHideEvent* )
// Knights::showEvent
//
///////////////////////////////////////
-void Knights::showEvent( QShowEvent* )
+void Knights::showEvent( TQShowEvent* )
{
if( !Minimized )
return;
@@ -524,7 +524,7 @@ void Knights::showEvent( QShowEvent* )
// Knights::wheelEvent
//
///////////////////////////////////////
-void Knights::wheelEvent( QWheelEvent *event )
+void Knights::wheelEvent( TQWheelEvent *event )
{
event->accept();
if( event->delta() > 0 ) PrevNotation();
@@ -545,7 +545,7 @@ void Knights::SelectTheme( int boardIndex, int chessmenIndex )
// Knights::setStatusBar
//
///////////////////////////////////////
-void Knights::setStatusBar( const int &ID, const QString &MSG )
+void Knights::setStatusBar( const int &ID, const TQString &MSG )
{
/* Game comments as specified in http://www.schachprobleme.de/chessml/faq/pgn/
Section 10: Numeric Annotation Glyphs */
@@ -561,29 +561,29 @@ void Knights::setStatusBar( const int &ID, const QString &MSG )
case BOOK_ERROR_1:
Message->setText( i18n( "Error with white engine" ) );
KMessageBox::sorry( this,
- i18n("You selected %1 to play white,\nbut it can only be used as a book engine.\nPlease select another engine to play white.").arg( MSG ),
+ i18n("You selected %1 to play white,\nbut it can only be used as a book engine.\nPlease select another engine to play white.").tqarg( MSG ),
i18n("White Engine Problem") );
break;
case BOOK_ERROR_2:
Message->setText( i18n( "Error with white book engine" ) );
KMessageBox::sorry( this,
- i18n("You selected %1 to play white's book,\nbut it can only be used as a regular engine.\nPlease select another engine to play white's book.").arg( MSG ),
+ i18n("You selected %1 to play white's book,\nbut it can only be used as a regular engine.\nPlease select another engine to play white's book.").tqarg( MSG ),
i18n("White Book Engine Problem") );
break;
case BOOK_ERROR_3:
Message->setText( i18n( "Error with black engine" ) );
KMessageBox::sorry( this,
- i18n("You selected %1 to play black,\nbut it can only be used as a book engine.\nPlease select another engine to play black.").arg( MSG ),
+ i18n("You selected %1 to play black,\nbut it can only be used as a book engine.\nPlease select another engine to play black.").tqarg( MSG ),
i18n("Black Engine Problem") );
break;
case BOOK_ERROR_4:
Message->setText( i18n( "Error with black book engine" ) );
KMessageBox::sorry( this,
- i18n("You selected %1 to play black's book,\nbut it can only be used as a regular engine.\nPlease select another engine to play black's book.").arg( MSG ),
+ i18n("You selected %1 to play black's book,\nbut it can only be used as a regular engine.\nPlease select another engine to play black's book.").tqarg( MSG ),
i18n("Black Book Engine Problem") );
break;
case ENGINE_DIED_ERROR:
- Message->setText( i18n( "The computer opponent assigned to play %1 has crashed" ).arg( MSG ) );
+ Message->setText( i18n( "The computer opponent assigned to play %1 has crashed" ).tqarg( MSG ) );
break;
case LOAD_ERROR:
Message->setText( i18n( "There was an error while loading the file" ) );
@@ -696,8 +696,8 @@ void Knights::setClocks( void )
///////////////////////////////////////
void Knights::setNotation( void )
{
- QStringList *list;
- QStringList::Iterator IT;
+ TQStringList *list;
+ TQStringList::Iterator IT;
int count(0);
setCaption( Core->caption() );
@@ -837,14 +837,14 @@ void Knights::netConnect( void )
{
if(Core->isOnline())
{
- fileMenu->changeItem( MENU_CONNECT, QIconSet( Resource->LoadIcon( QString("connect_creating"),
+ fileMenu->changeItem( MENU_CONNECT, TQIconSet( Resource->LoadIcon( TQString("connect_creating"),
KIcon::Small ) ), i18n( "Connect to Server" ));
Core->goOffline();
setCursor( Resource->CURSOR_Standard );
}
else
{
- fileMenu->changeItem( MENU_CONNECT, QIconSet( Resource->LoadIcon( QString("connect_no"),
+ fileMenu->changeItem( MENU_CONNECT, TQIconSet( Resource->LoadIcon( TQString("connect_no"),
KIcon::Small ) ), i18n( "Disconnect from Server" ) );
/*
By passing Null as the ID, we're telling core that we're
@@ -861,10 +861,10 @@ void Knights::netConnect( void )
void Knights::openSettingsDialog( void )
{
SettingsDialog = new dlg_settings( this, "settings", Resource );
- connect( SettingsDialog, SIGNAL( themeChanged(int,int) ), this, SLOT( SelectTheme(int,int) ) );
- connect( SettingsDialog, SIGNAL( redrawBoard() ), Core, SLOT( resize() ) );
- connect( SettingsDialog, SIGNAL( resetServer() ), Core, SLOT( resetServer() ) );
- connect( this, SIGNAL( themesAdded() ), SettingsDialog, SLOT( slotThemesAdded() ) );
+ connect( SettingsDialog, TQT_SIGNAL( themeChanged(int,int) ), this, TQT_SLOT( SelectTheme(int,int) ) );
+ connect( SettingsDialog, TQT_SIGNAL( redrawBoard() ), Core, TQT_SLOT( resize() ) );
+ connect( SettingsDialog, TQT_SIGNAL( resetServer() ), Core, TQT_SLOT( resetServer() ) );
+ connect( this, TQT_SIGNAL( themesAdded() ), SettingsDialog, TQT_SLOT( slotThemesAdded() ) );
SettingsDialog->show();
}
///////////////////////////////////////
@@ -875,7 +875,7 @@ void Knights::openSettingsDialog( void )
void Knights::openNewMatchDialog( void )
{
NewMatch = new dlg_newmatch( this, "NewMatch", Resource );
- connect( NewMatch, SIGNAL( okClicked() ), this, SLOT( newMatch() ) );
+ connect( NewMatch, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( newMatch() ) );
NewMatch->show();
}
///////////////////////////////////////
@@ -914,13 +914,13 @@ void Knights::Settings(int opt)
if( Core->paused() )
{
matchMenu->changeItem( MENU_PAUSE,
- QIconSet( Resource->LoadIcon( QString("player_pause"), KIcon::Small ) ),
+ TQIconSet( Resource->LoadIcon( TQString("player_pause"), KIcon::Small ) ),
i18n( "Pause" ) );
}
else
{
matchMenu->changeItem( MENU_PAUSE,
- QIconSet( Resource->LoadIcon( QString("1rightarrow"), KIcon::Small ) ),
+ TQIconSet( Resource->LoadIcon( TQString("1rightarrow"), KIcon::Small ) ),
i18n( "Resume" ) );
}
Core->matchMenu( MENU_PAUSE );
@@ -978,28 +978,28 @@ void Knights::installThemes( void )
bool localFlag(FALSE);
bool installError(FALSE);
unsigned int loop;
- QString allerror;
- QString fileFilter( "KB* KC* KS*|" );
+ TQString allerror;
+ TQString fileFilter( "KB* KC* KS*|" );
fileFilter += i18n( "Knights Themes" );
- KURL::List files = KFileDialog::getOpenURLs( QString::null, fileFilter, this, i18n( "Install Theme..." ) );
+ KURL::List files = KFileDialog::getOpenURLs( TQString(), fileFilter, this, i18n( "Install Theme..." ) );
for( loop = 0; loop < files.count(); loop++ )
{
/* Try writing to the global theme dir */
- if( !KIO::NetAccess::copy( files[loop], KURL( QString( Resource->themeDir() + files[loop].filename() ) ) ) )
+ if( !KIO::NetAccess::copy( files[loop], KURL( TQString( Resource->themeDir() + files[loop].filename() ) ) ) )
{
/* Nope... Try a local .knights dir */
- allerror += "\n\n" + QString( Resource->themeDir() + files[loop].filename() )
+ allerror += "\n\n" + TQString( Resource->themeDir() + files[loop].filename() )
+ " - " + KIO::NetAccess::lastErrorString();
- if( !KIO::NetAccess::exists( KURL( QString( QDir::homeDirPath() + "/.knights" ) ) ) )
+ if( !KIO::NetAccess::exists( KURL( TQString( TQDir::homeDirPath() + "/.knights" ) ) ) )
{
/* Create local .knights dir */
- KIO::NetAccess::mkdir( KURL( QString( QDir::homeDirPath() + "/.knights" ) ) );
+ KIO::NetAccess::mkdir( KURL( TQString( TQDir::homeDirPath() + "/.knights" ) ) );
}
- if( !KIO::NetAccess::copy( files[loop], KURL( QString( QDir::homeDirPath() + "/.knights/" + files[loop].filename() ) ) ) )
+ if( !KIO::NetAccess::copy( files[loop], KURL( TQString( TQDir::homeDirPath() + "/.knights/" + files[loop].filename() ) ) ) )
{
/* Nope, can't copy it anywhere */
installError = TRUE;
- allerror += "\n\n" + QString( QDir::homeDirPath() + "/.knights/"
+ allerror += "\n\n" + TQString( TQDir::homeDirPath() + "/.knights/"
+ files[loop].filename() ) + " - " + KIO::NetAccess::lastErrorString();
}
else
@@ -1017,7 +1017,7 @@ void Knights::installThemes( void )
if( installError )
{
KMessageBox::sorry( this,
- i18n("The theme could not be installed:\n%1").arg( allerror ),
+ i18n("The theme could not be installed:\n%1").tqarg( allerror ),
i18n("Can not install theme") );
}
return;
diff --git a/knights/knights.h b/knights/knights.h
index a17aaa6..772e37b 100644
--- a/knights/knights.h
+++ b/knights/knights.h
@@ -30,10 +30,10 @@
#include <kstatusbar.h>
#include <kcmdlineargs.h>
/* QT */
-#include <qlayout.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
/* Local */
#include "definitions.h"
#include "resource.h"
@@ -42,8 +42,8 @@
class KMenuBar;
class KPopupMenu;
class KComboBox;
-class QLabel;
-class QFrame;
+class TQLabel;
+class TQFrame;
class dlg_settings;
class dlg_newmatch;
class core;
@@ -56,33 +56,34 @@ class splash;
**/
class Knights : public KMainWindow
{
- Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
public:
KAboutData *aboutData;
resource *Resource;
- Knights( KCmdLineArgs *Args, QWidget* parent=0, const char *name=0 );
+ Knights( KCmdLineArgs *Args, TQWidget* tqparent=0, const char *name=0 );
~Knights();
bool init( void );
void initMenus( void );
void BirthAll( void );
- void keyPressEvent( QKeyEvent* );
+ void keyPressEvent( TQKeyEvent* );
public slots:
void KillAll( void );
void menuClose( void );
- /** Yeah, they're sloppy, but I need my own geometry managment routines
+ /** Yeah, they're sloppy, but I need my own tqgeometry managment routines
because I don't like the "default" look my statusbar was getting
( double-height ). Plus, I want the console to appear only when needed. */
void resizeMainFrame( void );
- bool event( QEvent* );
- void resizeEvent( QResizeEvent* );
- void hideEvent( QHideEvent* );
- void showEvent( QShowEvent* );
- void wheelEvent( QWheelEvent* );
+ bool event( TQEvent* );
+ void resizeEvent( TQResizeEvent* );
+ void hideEvent( TQHideEvent* );
+ void showEvent( TQShowEvent* );
+ void wheelEvent( TQWheelEvent* );
- void setStatusBar( const int &ID, const QString& MSG=QString::null );
+ void setStatusBar( const int &ID, const TQString& MSG=TQString() );
void setClocks( void );
void initMatch( void );
@@ -104,7 +105,7 @@ class Knights : public KMainWindow
signals:
void themesAdded( void );
- void focus( const QChar& );
+ void focus( const TQChar& );
protected:
bool queryClose( void );
@@ -125,10 +126,10 @@ class Knights : public KMainWindow
KPopupMenu *drawMenu;
KPopupMenu *tutorialMenu;
KComboBox *notationBar;
- QFrame *MainFrame;
- QLabel *whiteTimeLabel;
- QLabel *blackTimeLabel;
- QLabel *Message;
+ TQFrame *MainFrame;
+ TQLabel *whiteTimeLabel;
+ TQLabel *blackTimeLabel;
+ TQLabel *Message;
dlg_settings *SettingsDialog;
dlg_newmatch *NewMatch;
core *Core;
diff --git a/knights/knightsmap.h b/knights/knightsmap.h
index a3b1d3d..0cfa7cb 100644
--- a/knights/knightsmap.h
+++ b/knights/knightsmap.h
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#ifndef KNIGHTSMAP_H
#define KNIGHTSMAP_H
@@ -37,7 +37,7 @@ public:
};
private:
- QValueList<Pair> pairList;
+ TQValueList<Pair> pairList;
Key searchKey;
unsigned int searchIndex;
@@ -88,7 +88,7 @@ void add( KeyType key, DataType data )
/*
Return the next Value associated with the Key given
- in the last call to 'find'. If there are none, then
+ in the last call to 'tqfind'. If there are none, then
NULL is returned.
*/
T& findNext( void )
@@ -110,7 +110,7 @@ T& findNext( void )
the first Value that's associated with the given Key.
If no Value has the given Key, NULL is returned.
*/
-T& find( KeyType key )
+T& tqfind( KeyType key )
{
searchKey = key;
searchIndex = 0;
@@ -120,7 +120,7 @@ T& find( KeyType key )
/* Removes all Values that are associated with Key */
T& remove( KeyType key )
{
- QValueListIterator<Pair> IT( pairList.begin() );
+ TQValueListIterator<Pair> IT( pairList.begin() );
while( IT != pairList.end() )
{
if( (*IT).key == key )
diff --git a/knights/knightspixcache.cpp b/knights/knightspixcache.cpp
index 5f7a26e..0f69099 100644
--- a/knights/knightspixcache.cpp
+++ b/knights/knightspixcache.cpp
@@ -86,7 +86,7 @@ void KnightsPixCache::cleanCache( const unsigned int &space )
// KnightsPixCache::add
//
///////////////////////////////////////
-void KnightsPixCache::add( const QString &label, const QPixmap &pixmap )
+void KnightsPixCache::add( const TQString &label, const TQPixmap &pixmap )
{
unsigned int tmp;
cacheItem newItem;
@@ -106,10 +106,10 @@ void KnightsPixCache::add( const QString &label, const QPixmap &pixmap )
}
///////////////////////////////////////
//
-// KnightsPixCache::find
+// KnightsPixCache::tqfind
//
///////////////////////////////////////
-bool KnightsPixCache::find( const QString &label, QPixmap &pixmap )
+bool KnightsPixCache::tqfind( const TQString &label, TQPixmap &pixmap )
{
bool status(FALSE);
for( IT = list.begin(); IT != list.end(); ++IT )
diff --git a/knights/knightspixcache.h b/knights/knightspixcache.h
index 75b9cc7..4cc5857 100644
--- a/knights/knightspixcache.h
+++ b/knights/knightspixcache.h
@@ -18,9 +18,9 @@
#ifndef KNIGHTSPIXCACHE_H
#define KNIGHTSPIXCACHE_H
-#include <qvaluelist.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqvaluelist.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
/**
*@author Troy Corbin Jr.
@@ -28,66 +28,66 @@
typedef struct cacheItem
{
- QString label;
- QPixmap item;
+ TQString label;
+ TQPixmap item;
unsigned int bytes;
unsigned int age;
};
-typedef QValueList<cacheItem> pixmapList;
+typedef TQValueList<cacheItem> pixmapList;
class KnightsPixCache
{
public:
- QPixmap SquareLight;
- QPixmap SquareDark;
- QPixmap HighlightSelect;
- QPixmap HighlightMove;
- QPixmap HighlightAttack;
- QPixmap BlackKing;
- QPixmap BlackQueen;
- QPixmap BlackBishop;
- QPixmap BlackKnight;
- QPixmap BlackRook;
- QPixmap BlackPawn;
- QPixmap WhiteKing;
- QPixmap WhiteQueen;
- QPixmap WhiteBishop;
- QPixmap WhiteKnight;
- QPixmap WhiteRook;
- QPixmap WhitePawn;
- QPixmap Border;
- QPixmap BorderLightOn;
- QPixmap BorderLightOff;
+ TQPixmap SquareLight;
+ TQPixmap SquareDark;
+ TQPixmap HighlightSelect;
+ TQPixmap HighlightMove;
+ TQPixmap HighlightAttack;
+ TQPixmap BlackKing;
+ TQPixmap BlackQueen;
+ TQPixmap BlackBishop;
+ TQPixmap BlackKnight;
+ TQPixmap BlackRook;
+ TQPixmap BlackPawn;
+ TQPixmap WhiteKing;
+ TQPixmap WhiteQueen;
+ TQPixmap WhiteBishop;
+ TQPixmap WhiteKnight;
+ TQPixmap WhiteRook;
+ TQPixmap WhitePawn;
+ TQPixmap Border;
+ TQPixmap BorderLightOn;
+ TQPixmap BorderLightOff;
- QImage Orig_SquareLight;
- QImage Orig_SquareDark;
- QImage Orig_HighlightSelect;
- QImage Orig_HighlightMove;
- QImage Orig_HighlightAttack;
- QImage Orig_BlackKing;
- QImage Orig_BlackQueen;
- QImage Orig_BlackBishop;
- QImage Orig_BlackKnight;
- QImage Orig_BlackRook;
- QImage Orig_BlackPawn;
- QImage Orig_WhiteKing;
- QImage Orig_WhiteQueen;
- QImage Orig_WhiteBishop;
- QImage Orig_WhiteKnight;
- QImage Orig_WhiteRook;
- QImage Orig_WhitePawn;
- QImage Orig_Border;
- QImage Orig_BorderLightOn;
- QImage Orig_BorderLightOff;
+ TQImage Orig_SquareLight;
+ TQImage Orig_SquareDark;
+ TQImage Orig_HighlightSelect;
+ TQImage Orig_HighlightMove;
+ TQImage Orig_HighlightAttack;
+ TQImage Orig_BlackKing;
+ TQImage Orig_BlackQueen;
+ TQImage Orig_BlackBishop;
+ TQImage Orig_BlackKnight;
+ TQImage Orig_BlackRook;
+ TQImage Orig_BlackPawn;
+ TQImage Orig_WhiteKing;
+ TQImage Orig_WhiteQueen;
+ TQImage Orig_WhiteBishop;
+ TQImage Orig_WhiteKnight;
+ TQImage Orig_WhiteRook;
+ TQImage Orig_WhitePawn;
+ TQImage Orig_Border;
+ TQImage Orig_BorderLightOn;
+ TQImage Orig_BorderLightOff;
KnightsPixCache();
~KnightsPixCache();
void clear( void );
void setCacheLimit( const unsigned int &limit );
unsigned int cacheLimit( void );
- void add( const QString &label, const QPixmap &pixmap );
- bool find( const QString &label, QPixmap &pixmap);
+ void add( const TQString &label, const TQPixmap &pixmap );
+ bool tqfind( const TQString &label, TQPixmap &pixmap);
void resize( const int &size );
private:
diff --git a/knights/knightstextview.cpp b/knights/knightstextview.cpp
index dc14936..3e31725 100644
--- a/knights/knightstextview.cpp
+++ b/knights/knightstextview.cpp
@@ -25,42 +25,42 @@
#include <krun.h>
// Used for printing functionality
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qfontmetrics.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqfontmetrics.h>
#include <kprinter.h>
-#include <qsimplerichtext.h>
+#include <tqsimplerichtext.h>
-KnightsTextView::KnightsTextView(QWidget *parent, resource *Rsrc ) : QTextBrowser(parent)
+KnightsTextView::KnightsTextView(TQWidget *tqparent, resource *Rsrc ) : TQTextBrowser(tqparent)
{
myResource = Rsrc;
setReadOnly( TRUE );
- setTextFormat( Qt::RichText );
+ setTextFormat( TQt::RichText );
menuView = new KPopupMenu( this );
/*
Configure functions in the View right click menu
*/
- menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("editcopy"), KIcon::Small ) ),
- i18n( "&Copy" ), this, SLOT( menuFunct(int) ), CTRL+Key_C, MENU_COPY );
- menuView->insertItem( i18n("Select &All"), this, SLOT( menuFunct(int) ), CTRL+Key_A, MENU_SELECT_ALL );
+ menuView->insertItem( TQIconSet( Rsrc->LoadIcon( TQString("editcopy"), KIcon::Small ) ),
+ i18n( "&Copy" ), this, TQT_SLOT( menuFunct(int) ), CTRL+Key_C, MENU_COPY );
+ menuView->insertItem( i18n("Select &All"), this, TQT_SLOT( menuFunct(int) ), CTRL+Key_A, MENU_SELECT_ALL );
menuView->insertSeparator();
- menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("fileprint"), KIcon::Small ) ),
- i18n( "&Print" ), this, SLOT( menuFunct(int) ), CTRL+Key_P, MENU_PRINT );
-// menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("find"), KIcon::Small ) ),
-// i18n( "&Find" ), this, SLOT( menuFunct(int) ), CTRL+Key_F, MENU_FIND );
-// menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("next"), KIcon::Small ) ),
-// i18n( "Find &Next" ), this, SLOT( menuFunct(int) ), Key_F3, MENU_FIND_NEXT );
+ menuView->insertItem( TQIconSet( Rsrc->LoadIcon( TQString("fileprint"), KIcon::Small ) ),
+ i18n( "&Print" ), this, TQT_SLOT( menuFunct(int) ), CTRL+Key_P, MENU_PRINT );
+// menuView->insertItem( TQIconSet( Rsrc->LoadIcon( TQString("tqfind"), KIcon::Small ) ),
+// i18n( "&Find" ), this, TQT_SLOT( menuFunct(int) ), CTRL+Key_F, MENU_FIND );
+// menuView->insertItem( TQIconSet( Rsrc->LoadIcon( TQString("next"), KIcon::Small ) ),
+// i18n( "Find &Next" ), this, TQT_SLOT( menuFunct(int) ), Key_F3, MENU_FIND_NEXT );
// menuView->insertSeparator();
menuView->insertSeparator();
- menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("viewmag+"), KIcon::Small ) ),
- i18n( "Zoom &In" ), this, SLOT( menuFunct(int) ), 0, MENU_ZOOM_IN );
- menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("viewmag-"), KIcon::Small ) ),
- i18n( "Zoom &Out" ), this, SLOT( menuFunct(int) ), 0, MENU_ZOOM_OUT );
+ menuView->insertItem( TQIconSet( Rsrc->LoadIcon( TQString("viewmag+"), KIcon::Small ) ),
+ i18n( "Zoom &In" ), this, TQT_SLOT( menuFunct(int) ), 0, MENU_ZOOM_IN );
+ menuView->insertItem( TQIconSet( Rsrc->LoadIcon( TQString("viewmag-"), KIcon::Small ) ),
+ i18n( "Zoom &Out" ), this, TQT_SLOT( menuFunct(int) ), 0, MENU_ZOOM_OUT );
/* disconnect the linkClicked signal so we can replace it with our own */
- disconnect(this, SIGNAL(linkClicked(const QString&)),this ,0);
+ disconnect(this, TQT_SIGNAL(linkClicked(const TQString&)),this ,0);
/* connect the linkClicked signal to displayLink slot */
- connect(this, SIGNAL(linkClicked(const QString&)), this, SLOT(displayLink(const QString&)));
+ connect(this, TQT_SIGNAL(linkClicked(const TQString&)), this, TQT_SLOT(displayLink(const TQString&)));
show();
}
@@ -75,21 +75,21 @@ KnightsTextView::~KnightsTextView()
// KnightsTextView::viewportMousePressEvent
//
///////////////////////////////////////
-void KnightsTextView::viewportMousePressEvent( QMouseEvent *e )
+void KnightsTextView::viewportMousePressEvent( TQMouseEvent *e )
{
- if( e->button() == RightButton )
+ if( e->button() == Qt::RightButton )
{
emit rightButtonClicked( e->globalPos() );
display_menuView( e->globalPos() );
}
- QTextEdit::viewportMousePressEvent( e );
+ TQTextEdit::viewportMousePressEvent( e );
}
///////////////////////////////////////
//
// KnightsTextView::display_menuView
//
///////////////////////////////////////
-void KnightsTextView::display_menuView( const QPoint &Pos )
+void KnightsTextView::display_menuView( const TQPoint &Pos )
{
if( hasSelectedText() )
{
@@ -134,7 +134,7 @@ void KnightsTextView::menuFunct( int funct )
// KnightsTextView::pageMove
//
///////////////////////////////////////
-void KnightsTextView::pageMove( Qt::Key key )
+void KnightsTextView::pageMove( TQt::Key key )
{
int NewY;
if( key == Key_PageUp )
@@ -155,10 +155,10 @@ void KnightsTextView::pageMove( Qt::Key key )
///////////////////////////////////////
//
-// KnightsTextView::displayLink(QString url)
+// KnightsTextView::displayLink(TQString url)
//
///////////////////////////////////////
-void KnightsTextView::displayLink(const QString& urlString)
+void KnightsTextView::displayLink(const TQString& urlString)
{
KURL url(urlString);
new KRun(url);
@@ -171,27 +171,27 @@ void KnightsTextView::displayLink(const QString& urlString)
///////////////////////////////////////
void KnightsTextView::print( void )
{
- KPrinter printer( true, QPrinter::ScreenResolution );
+ KPrinter printer( true, TQPrinter::ScreenResolution );
viewport()->setCursor( waitCursor );
/* Make sure we want to print */
if( printer.setup() )
{
- QPainter paint( &printer );
- QPaintDeviceMetrics pageMetrics( paint.device() );
+ TQPainter paint( &printer );
+ TQPaintDeviceMetrics pageMetrics( paint.device() );
/* Setup sizes */
int dpix = pageMetrics.logicalDpiX();
int dpiy = pageMetrics.logicalDpiY();
const int margin = 36; // pt
- QRect body( margin * dpix / 72, margin * dpiy / 72,
+ TQRect body( margin * dpix / 72, margin * dpiy / 72,
pageMetrics.width() - margin * dpix / 72 * 2,
pageMetrics.height() - margin * dpiy / 72 * 2 );
- QRect view( body );
+ TQRect view( body );
printer.setFullPage( true );
printer.setCreator( "Knights" );
- QSimpleRichText simpText( this->text(), this->font() );
+ TQSimpleRichText simpText( this->text(), this->font() );
simpText.setWidth( view.width() );
/* Count Pages */
@@ -207,7 +207,7 @@ void KnightsTextView::print( void )
{
/* Print the Contents */
paint.setClipRect( body );
- simpText.draw( &paint, body.left(), body.top(), view, colorGroup() );
+ simpText.draw( &paint, body.left(), body.top(), view, tqcolorGroup() );
paint.setClipping( false );
view.moveBy( 0, body.height() );
paint.translate( 0, -body.height() );
@@ -215,7 +215,7 @@ void KnightsTextView::print( void )
/* Print the Page Number */
paint.setFont( myResource->FONT_Standard );
paint.setPen( myResource->COLOR_Black );
- QString pageCount = i18n( "Page %1 of %2" ).arg( currentPage ).arg( totalPages );
+ TQString pageCount = i18n( "Page %1 of %2" ).tqarg( currentPage ).tqarg( totalPages );
paint.drawText( view.width() - paint.fontMetrics().width( pageCount ),
view.bottom() + paint.fontMetrics().ascent() + 5, pageCount );
if( view.top() >= simpText.height() )
@@ -231,7 +231,7 @@ void KnightsTextView::print( void )
viewport()->unsetCursor();
}
-void QTextBrowser::setSource(const QString&)
+void TQTextBrowser::setSource(const TQString&)
{
/* overwrote this to stop clicked links from clearing the
console */
diff --git a/knights/knightstextview.h b/knights/knightstextview.h
index f76db25..4141bbf 100644
--- a/knights/knightstextview.h
+++ b/knights/knightstextview.h
@@ -18,8 +18,8 @@
#ifndef KNIGHTSTEXTVIEW_H
#define KNIGHTSTEXTVIEW_H
-#include <qwidget.h>
-#include <qtextbrowser.h>
+#include <tqwidget.h>
+#include <tqtextbrowser.h>
/**
*@author Troy Corbin Jr./Alexander Wels
@@ -28,25 +28,26 @@
class KPopupMenu;
class resource;
-class KnightsTextView : public QTextBrowser
+class KnightsTextView : public TQTextBrowser
{
Q_OBJECT
+ TQ_OBJECT
public:
- KnightsTextView(QWidget *parent, resource *Rsrc );
+ KnightsTextView(TQWidget *tqparent, resource *Rsrc );
~KnightsTextView();
- void pageMove( Qt::Key key=Key_PageUp );
+ void pageMove( TQt::Key key=Key_PageUp );
public slots:
- void display_menuView( const QPoint& );
+ void display_menuView( const TQPoint& );
void menuFunct( int );
- void displayLink(const QString& urlString);
+ void displayLink(const TQString& urlString);
void print( void );
signals:
- void rightButtonClicked( const QPoint& );
+ void rightButtonClicked( const TQPoint& );
protected:
- void viewportMousePressEvent( QMouseEvent *e );
+ void viewportMousePressEvent( TQMouseEvent *e );
resource *myResource;
KPopupMenu *menuView;
};
diff --git a/knights/list_pgn.cpp b/knights/list_pgn.cpp
index 57be536..911e5fb 100644
--- a/knights/list_pgn.cpp
+++ b/knights/list_pgn.cpp
@@ -19,11 +19,11 @@
#include <klistview.h>
#include <kstatusbar.h>
#include <kprogress.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include "resource.h"
#include "match_param.h"
-list_pgn::list_pgn(QWidget *parent, const char *name) : QVBox(parent,name)
+list_pgn::list_pgn(TQWidget *tqparent, const char *name) : TQVBox(tqparent,name)
{
listView = new KListView( this, "listView" );
listView->addColumn( i18n( "Result" ) );
@@ -38,7 +38,7 @@ list_pgn::list_pgn(QWidget *parent, const char *name) : QVBox(parent,name)
listView->setShowSortIndicator( TRUE );
listView->restoreLayout( kapp->config(), "PGN_ListView" );
listView->show();
- connect( listView, SIGNAL( executed( QListViewItem* ) ), this, SLOT( slot_selected( QListViewItem* ) ) );
+ connect( listView, TQT_SIGNAL( executed( TQListViewItem* ) ), this, TQT_SLOT( slot_selected( TQListViewItem* ) ) );
/*
Showing listView while scanning can mean the difference between
@@ -55,7 +55,7 @@ list_pgn::list_pgn(QWidget *parent, const char *name) : QVBox(parent,name)
dummyView->restoreLayout( kapp->config(), "PGN_ListView" );
dummyView->hide();
- statusBox = new QHBox( this, "statusBox" );
+ statusBox = new TQHBox( this, "statusBox" );
status = new KStatusBar( statusBox, "status" );
progress = new KProgress( statusBox, "progress" );
@@ -72,7 +72,7 @@ list_pgn::~list_pgn()
// list_pgn::setURL
//
///////////////////////////////////////
-void list_pgn::setURL( QString URL )
+void list_pgn::setURL( TQString URL )
{
myURL = URL;
listView->clear();
@@ -80,7 +80,7 @@ void list_pgn::setURL( QString URL )
if( tmpPGN.open( URL ) == FALSE )
{
- status->message( i18n( "Can not open %1" ).arg( URL ) );
+ status->message( i18n( "Can not open %1" ).tqarg( URL ) );
return;
}
listView->hide();
@@ -105,7 +105,7 @@ void list_pgn::setProgress( const int num )
// list_pgn::slot_selected
//
///////////////////////////////////////
-void list_pgn::slot_selected( QListViewItem *item )
+void list_pgn::slot_selected( TQListViewItem *item )
{
emit selected( myURL, item->text(6).toInt() );
}
@@ -114,7 +114,7 @@ void list_pgn::slot_selected( QListViewItem *item )
// list_pgn::timerEvent
//
///////////////////////////////////////
-void list_pgn::timerEvent( QTimerEvent* )
+void list_pgn::timerEvent( TQTimerEvent* )
{
int fileProgress;
@@ -126,7 +126,7 @@ void list_pgn::timerEvent( QTimerEvent* )
{
emit selected( myURL, 0 );
}
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
listView->show();
dummyView->hide();
}
@@ -139,7 +139,7 @@ void list_pgn::timerEvent( QTimerEvent* )
tmpPGN.TAG_Round,
tmpPGN.TAG_Site,
tmpPGN.TAG_Date,
- QString::number(tmpPGN.File_Position) );
- status->message( i18n( QString( "%1 matches found." ).arg( listView->childCount() ) ) );
+ TQString::number(tmpPGN.File_Position) );
+ status->message( i18n( TQString( "%1 matches found." ).tqarg( listView->childCount() ) ) );
}
}
diff --git a/knights/list_pgn.h b/knights/list_pgn.h
index f8712b5..105d9e9 100644
--- a/knights/list_pgn.h
+++ b/knights/list_pgn.h
@@ -18,8 +18,8 @@
#ifndef LIST_PGN_H
#define LIST_PGN_H
-#include <qvbox.h>
-#include <qstring.h>
+#include <tqvbox.h>
+#include <tqstring.h>
#include "pgn.h"
/**
@@ -30,32 +30,33 @@ class match_param;
class KStatusBar;
class KProgress;
class KListView;
-class QHBox;
+class TQHBox;
-class list_pgn : public QVBox
+class list_pgn : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- list_pgn(QWidget *parent=0, const char *name=0);
- void setURL( QString URL );
+ list_pgn(TQWidget *tqparent=0, const char *name=0);
+ void setURL( TQString URL );
void setProgress( const int );
- QString URL( void )
+ TQString URL( void )
{ return myURL; }
~list_pgn();
signals:
- void selected( const QString&, const int& );
+ void selected( const TQString&, const int& );
protected slots:
- void slot_selected( QListViewItem *item );
+ void slot_selected( TQListViewItem *item );
protected:
- void timerEvent( QTimerEvent * );
+ void timerEvent( TQTimerEvent * );
private:
- QString myURL;
- QHBox *statusBox;
+ TQString myURL;
+ TQHBox *statusBox;
KListView *listView;
KListView *dummyView;
KStatusBar *status;
diff --git a/knights/logic.cpp b/knights/logic.cpp
index 9d889d4..95baa78 100644
--- a/knights/logic.cpp
+++ b/knights/logic.cpp
@@ -210,7 +210,7 @@ bool logic::parseCAN( const bool Army )
else
{
chessMove.fromFile = 4;
- if( QString( chessMove.CAN ).lower() == "o-o" ) chessMove.toFile = 6;
+ if( TQString( chessMove.CAN ).lower() == "o-o" ) chessMove.toFile = 6;
else chessMove.toFile = 2;
if( Army == WHITE )
{
@@ -243,7 +243,7 @@ bool logic::parseSAN( void )
chessMove.Promote = Null;
chessMove.ManTaken = Null;
chessMove.NAG = 0;
- while( SANPtr < (signed)QString( chessMove.SAN ).length() )
+ while( SANPtr < (signed)TQString( chessMove.SAN ).length() )
{
/* Parse a character */
switch( chessMove.SAN[SANPtr] )
@@ -288,9 +288,9 @@ bool logic::parseSAN( void )
chessMove.toRank = 0;
else
chessMove.toRank = 7;
- if( QString( chessMove.SAN ).lower() == "o-o-o" )
+ if( TQString( chessMove.SAN ).lower() == "o-o-o" )
chessMove.toFile = 2;
- if( QString( chessMove.SAN ).lower() == "o-o" )
+ if( TQString( chessMove.SAN ).lower() == "o-o" )
chessMove.toFile = 6;
break;
/* Ignore some symbols... these fall through */
@@ -359,7 +359,7 @@ bool logic::parseSAN( void )
}
if( tmp == 64 )
{
-// kdWarning() << "logic::ParseSAN could not make a legal chessMove out of " << QString( chessMove.SAN ) << endl;
+// kdWarning() << "logic::ParseSAN could not make a legal chessMove out of " << TQString( chessMove.SAN ) << endl;
// kdWarning() << (int)Army << " " << (int)Type << " " << (int)chessMove.fromFile << " " << (int)chessMove.fromRank
// << " " << (int)chessMove.toFile << " " << (int)chessMove.toRank << endl;
return FALSE;
@@ -395,7 +395,7 @@ void logic::writeSAN( void )
bool SANambig(FALSE);
bool SANambig2(FALSE);
register char tmp, manPtr, toPtr, fromPtr;
- QString SAN;
+ TQString SAN;
/*
writeSAN calls HashLegal(), which writes on current[],
@@ -525,9 +525,9 @@ void logic::writeSAN( void )
// logic::board
//
///////////////////////////////////////
-QString logic::board( void )
+TQString logic::board( void )
{
- QString output;
+ TQString output;
register int tmp(0), tmpMan(0), cR(7), cF(0);
while( tmp != 64 )
@@ -611,9 +611,9 @@ QString logic::board( void )
// logic::setBoard
//
///////////////////////////////////////
-void logic::setBoard( const QString &board, const short ppf )
+void logic::setBoard( const TQString &board, const short ppf )
{
- QChar piece;
+ TQChar piece;
int tmp(0), tmp2(0), cR(7), cF(0);
clearBoard();
@@ -816,14 +816,14 @@ bool logic::isDraw( const bool Army )
// logic::setBoardFromFen
//
///////////////////////////////////////
-void logic::setBoardFromFen(const QString &fen)
+void logic::setBoardFromFen(const TQString &fen)
{
clearBoard();
int j = 0; //position in string
int r = 7; //rank
int f = 0; //file
int p = 63; //chessman number
- QChar c; //current letter
+ TQChar c; //current letter
for (j=0;j<120 && p>=0 ;j++) {
c = fen[j];
@@ -1064,7 +1064,7 @@ void logic::_HashLegal( const bool Recursion )
switch( chessman[ManPtr].Type )
{
- /* ROOK & QUEEN */
+ /* ROOK & TQUEEN */
case Rook:
case Queen:
/* Positive Rank Movement */
diff --git a/knights/logic.h b/knights/logic.h
index d57a553..9e1fc81 100644
--- a/knights/logic.h
+++ b/knights/logic.h
@@ -18,7 +18,7 @@
#ifndef LOGIC_H
#define LOGIC_H
-#include <qstring.h>
+#include <tqstring.h>
#include "definitions.h"
#include "resource.h"
#include "match_param.h"
@@ -46,9 +46,9 @@ class logic
logic( resource *Rsrc=0, match_param *param=0 );
~logic();
void Init( const int Var=Type_Standard );
- void setBoard( const QString &board=QString::null, const short ppf=-2 );
- void setBoardFromFen( const QString &fen );
- QString board( void );
+ void setBoard( const TQString &board=TQString(), const short ppf=-2 );
+ void setBoardFromFen( const TQString &fen );
+ TQString board( void );
bool isChessman( const char ChessmanPtr );
bool isCheck( const bool Army );
bool isLegal( const bool Army );
diff --git a/knights/main.cpp b/knights/main.cpp
index f5f508e..02c4d6d 100644
--- a/knights/main.cpp
+++ b/knights/main.cpp
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
"agpwels@adelphia.net",
"");
aboutData.addCredit("Mark Westcott",
- I18N_NOOP("Qtopia port and patches"),
+ I18N_NOOP("TQtopia port and patches"),
"mark@houseoffish.org",
"");
aboutData.addCredit("Kunnar Klauks",
@@ -80,6 +80,6 @@ int main(int argc, char *argv[])
}
/* Without this connection, the destructors are not called, and some
housecleaning ( like destroying child processes ) isn't done */
- a.connect( &a, SIGNAL( shutDown () ), knights, SLOT( KillAll() ) );
+ a.connect( &a, TQT_SIGNAL( shutDown () ), knights, TQT_SLOT( KillAll() ) );
return a.exec();
}
diff --git a/knights/match.cpp b/knights/match.cpp
index 21957e4..6ef115a 100644
--- a/knights/match.cpp
+++ b/knights/match.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include "match.moc"
#include "board_base.h"
@@ -30,17 +30,17 @@
// match::match
//
///////////////////////////////////////
-match::match( QWidget *parent, match_param *param, resource *Rsrc ) : QWidget(parent)
+match::match( TQWidget *tqparent, match_param *param, resource *Rsrc ) : TQWidget(tqparent)
{
Resource = Rsrc;
/* Init Children */
Record = new pgn( Resource, param );
Logic = new logic( Resource, param );
- Board = new board_2d( parent, "Board", Resource, Logic );
+ Board = new board_2d( tqparent, "Board", Resource, Logic );
Board->show();
- connect( Board, SIGNAL( leftClick(int) ), this, SLOT( slot_Select(int) ) );
- connect( Board, SIGNAL( rightClick(int) ), this, SLOT( slot_Preview(int) ) );
+ connect( Board, TQT_SIGNAL( leftClick(int) ), this, TQT_SLOT( slot_Select(int) ) );
+ connect( Board, TQT_SIGNAL( rightClick(int) ), this, TQT_SLOT( slot_Preview(int) ) );
Clock = new chessclock( this, "Clock", Resource );
Record->init();
Logic->Init();
@@ -58,16 +58,16 @@ match::match( QWidget *parent, match_param *param, resource *Rsrc ) : QWidget(pa
Current = FALSE;
loadTimer = 0;
StatusCode = READY;
- StatusMessage = QString::null;
+ StatusMessage = TQString();
ICSGameMode = Null;
parseMatchParam();
/* Connect Signals and Slots */
- connect( param, SIGNAL( valuesChanged() ), this, SLOT( parseMatchParam() ) );
- connect( Record, SIGNAL( processMove(ChessMove) ), this, SLOT( move(ChessMove) ) );
- connect( Record, SIGNAL( processSpecial() ), this, SLOT( loadSpecial() ) );
- connect( Clock, SIGNAL( flagFell(const bool) ), this, SLOT( slot_flagFell(const bool) ) );
- connect( this, SIGNAL( setStatusBar( const int&, const QString& ) ), this, SLOT( saveStatusBar( const int&, const QString& ) ) );
+ connect( param, TQT_SIGNAL( valuesChanged() ), this, TQT_SLOT( parseMatchParam() ) );
+ connect( Record, TQT_SIGNAL( processMove(ChessMove) ), this, TQT_SLOT( move(ChessMove) ) );
+ connect( Record, TQT_SIGNAL( processSpecial() ), this, TQT_SLOT( loadSpecial() ) );
+ connect( Clock, TQT_SIGNAL( flagFell(const bool) ), this, TQT_SLOT( slot_flagFell(const bool) ) );
+ connect( this, TQT_SIGNAL( setStatusBar( const int&, const TQString& ) ), this, TQT_SLOT( saveStatusBar( const int&, const TQString& ) ) );
}
///////////////////////////////////////
@@ -312,7 +312,7 @@ char match::input( char army )
// match::save
//
///////////////////////////////////////
-bool match::save( QString URL )
+bool match::save( TQString URL )
{
Record->whiteTime = Clock->getCentiseconds(WHITE);
Record->blackTime = Clock->getCentiseconds(BLACK);
@@ -323,7 +323,7 @@ bool match::save( QString URL )
// match::load
//
///////////////////////////////////////
-bool match::load( const QString URL, const int pos )
+bool match::load( const TQString URL, const int pos )
{
bool Result;
Loading = TRUE;
@@ -360,20 +360,20 @@ void match::loadSpecial( void )
// match::url
//
///////////////////////////////////////
-QString match::url( void )
+TQString match::url( void )
{
if( !Record->CurrentURL.isEmpty() )
return Record->CurrentURL;
if( Resource->OPTION_Reuse_PGN )
return Resource->PGN_Filename;
- return QString::null;
+ return TQString();
}
///////////////////////////////////////
//
// match::clock
//
///////////////////////////////////////
-QString match::clock( const bool Army )
+TQString match::clock( const bool Army )
{
if( Army == WHITE ) return Clock->whiteClock;
return Clock->blackClock;
@@ -762,7 +762,7 @@ bool match::move( void )
int soundType( SND_MOVE );
int result(Null);
char manPtr(Null);
- QString SAN;
+ TQString SAN;
/* Bring the display up to the latest move before we proceed */
if( ICSGameMode == Null )
@@ -798,7 +798,7 @@ bool match::move( void )
}
/* Play sound for Promotion */
- if( QString( chessMove.SAN ).contains( QChar( '=' ) ) )
+ if( TQString( chessMove.SAN ).tqcontains( TQChar( '=' ) ) )
{
soundType = SND_PROMOTE;
}
@@ -863,7 +863,7 @@ bool match::move( void )
}
/* Check to make sure this isn't the starting position in an ICS match */
- if( QString( chessMove.SAN ) != "none" )
+ if( TQString( chessMove.SAN ) != "none" )
{
if( !SAN.isEmpty() )
{
@@ -876,7 +876,7 @@ bool match::move( void )
{
/* Send this move to engines and servers */
emit sendCMD( Command( myID, CMD_Move, centiseconds( WHITE ), centiseconds( BLACK ),
- chessMove, Record->notation(FALSE)->join(QString(" ")) ) );
+ chessMove, Record->notation(FALSE)->join(TQString(" ")) ) );
}
/* Draw The Move */
if( ICSGameMode != ICS_Movelist )
@@ -891,7 +891,7 @@ bool match::move( void )
Clock->Pause();
Logic->OnMove = !Logic->OnMove;
- /* Set Status Bar */
+ /* Set tqStatus Bar */
if( Logic->OnMove == WHITE )
{
emit setStatusBar( WHITE_TURN );
@@ -1000,7 +1000,7 @@ void match::_retract( void )
void match::review( const int Index )
{
int tmp(0), step;
- QString tmpS;
+ TQString tmpS;
if( ICSGameMode == ICS_Examine )
{
/* Examined Game: Use Examine Semantics */
@@ -1116,5 +1116,5 @@ void match::drawPosition( const int position )
void match::requestHint( void )
{
emit sendCMD( Command( myID, CMD_Hint ) );
- emit sendCMD( Command( myID, CMD_UCI_Hint, centiseconds( WHITE ), centiseconds( BLACK ), Record->notation(FALSE)->join(QString(" ")) ) );
+ emit sendCMD( Command( myID, CMD_UCI_Hint, centiseconds( WHITE ), centiseconds( BLACK ), Record->notation(FALSE)->join(TQString(" ")) ) );
}
diff --git a/knights/match.h b/knights/match.h
index 22db6a9..9efc361 100644
--- a/knights/match.h
+++ b/knights/match.h
@@ -18,7 +18,7 @@
#ifndef MATCH_H
#define MATCH_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "resource.h"
#include "match_param.h"
#include "command.h"
@@ -28,9 +28,10 @@
class board_base;
-class match : public QWidget
+class match : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
private:
resource *Resource;
@@ -49,16 +50,16 @@ class match : public QWidget
int myID;
int StatusCode;
int loadTimer;
- QString StatusMessage;
+ TQString StatusMessage;
char ICSGameMode;
char Draw_Offered[2];
public:
- match(QWidget *parent, match_param *param, resource *Rsrc);
+ match(TQWidget *tqparent, match_param *param, resource *Rsrc);
~match();
char inputOnMove( bool reverse=FALSE );
char input( char army );
- QString url( void );
+ TQString url( void );
void flip( void );
void retract( void );
void requestHint( void );
@@ -70,7 +71,7 @@ class match : public QWidget
{ return myID; }
void setID( const int &ID )
{ myID = ID; }
- QString caption( void )
+ TQString caption( void )
{ return Record->caption(); }
char onMove( void )
{ return Logic->OnMove; }
@@ -88,7 +89,7 @@ class match : public QWidget
{ return Loading; }
int centiseconds( const bool &Army )
{ return Clock->getCentiseconds( Army ); }
- QStringList* notation( void )
+ TQStringList* notation( void )
{ return Record->notation(); }
void setModified( const bool &state )
{ Modified = state; }
@@ -101,16 +102,16 @@ class match : public QWidget
void tick( void );
void resize( void );
void redraw( void );
- QString clock( bool );
- bool save( QString );
- bool load( const QString URL, const int pos=0 );
+ TQString clock( bool );
+ bool save( TQString );
+ bool load( const TQString URL, const int pos=0 );
void loadSpecial( void );
void slot_Select( int );
void slot_Preview( int );
void slot_flagFell( const bool );
void review( const int );
void parseMatchParam( void );
- void saveStatusBar( const int &ID, const QString &MSG )
+ void saveStatusBar( const int &ID, const TQString &MSG )
{ StatusCode = ID; StatusMessage = MSG; }
protected slots:
@@ -119,7 +120,7 @@ class match : public QWidget
signals:
void setNotation( void );
void setClocks( void );
- void setStatusBar( const int &ID, const QString &MSG=QString::null );
+ void setStatusBar( const int &ID, const TQString &MSG=TQString() );
void sendCMD( const Command& );
protected:
diff --git a/knights/match_param.cpp b/knights/match_param.cpp
index 3b356a4..d5e4351 100644
--- a/knights/match_param.cpp
+++ b/knights/match_param.cpp
@@ -16,18 +16,18 @@
***************************************************************************/
#include <kstddirs.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <string.h>
#include "match_param.moc"
-match_param::match_param(resource *Rsrc) : QObject()
+match_param::match_param(resource *Rsrc) : TQObject()
{
myResource = Rsrc;
initialize();
}
-match_param::match_param(resource *Rsrc, const int &whiteType, const int &blackType) : QObject()
+match_param::match_param(resource *Rsrc, const int &whiteType, const int &blackType) : TQObject()
{
myResource = Rsrc;
initialize();
@@ -48,7 +48,7 @@ match_param::~match_param()
void match_param::initialize( void )
{
PlayerNames << "" << "" << "" << "";
- PlayerImages << QPixmap() << QPixmap() << QPixmap() << QPixmap();
+ PlayerImages << TQPixmap() << TQPixmap() << TQPixmap() << TQPixmap();
Type[WHITE] = myResource->Type[WHITE];
Type[WHITE_HELPER] = myResource->Type[WHITE_HELPER];
Type[BLACK] = myResource->Type[BLACK];
@@ -213,7 +213,7 @@ void match_param::setVariation(const int variation)
void match_param::setTimer( void )
{
if( TimerFlag ) return;
- QTimer::singleShot( 0, this, SLOT( slot_Timer() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slot_Timer() ) );
TimerFlag = TRUE;
}
diff --git a/knights/match_param.h b/knights/match_param.h
index ff48227..a5d5421 100644
--- a/knights/match_param.h
+++ b/knights/match_param.h
@@ -22,22 +22,23 @@
*@author Troy Corbin Jr.
*/
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
#include "definitions.h"
#include "resource.h"
-class match_param : public QObject
+class match_param : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
private:
resource *myResource;
- QStringList PlayerNames;
- QValueList<QPixmap> PlayerImages;
+ TQStringList PlayerNames;
+ TQValueList<TQPixmap> PlayerImages;
/*
This is used to keep the signal valuesChanged
@@ -69,10 +70,10 @@ class match_param : public QObject
char strength( const int &player )
{ return Strength[player]; }
- QPixmap image( const char &player )
+ TQPixmap image( const char &player )
{ return PlayerImages[player]; }
- QString name( const char &player )
+ TQString name( const char &player )
{ return PlayerNames[player]; }
TCPList time( const char &player );
@@ -84,7 +85,7 @@ class match_param : public QObject
void setTime( const char &player, const TCPList &tcp );
- void setName( const int &player, const QString &name )
+ void setName( const int &player, const TQString &name )
{ PlayerNames[player] = name; }
void setVariation( const int variation );
diff --git a/knights/pgn.cpp b/knights/pgn.cpp
index a4de0a6..3723f8a 100644
--- a/knights/pgn.cpp
+++ b/knights/pgn.cpp
@@ -17,11 +17,11 @@
#include <sys/utsname.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <kprinter.h>
-#include <qfontmetrics.h>
-#include <qpaintdevicemetrics.h>
+#include <tqfontmetrics.h>
+#include <tqpaintdevicemetrics.h>
#include "pgn.moc"
#include "tabmanager.h"
#include "tab_pgnview.h"
@@ -34,7 +34,7 @@ pgn::pgn( resource *Rsrc, match_param *param )
if( Param != NULL )
{
- connect( Param, SIGNAL( valuesChanged() ), this, SLOT( parseMatchParam() ) );
+ connect( Param, TQT_SIGNAL( valuesChanged() ), this, TQT_SLOT( parseMatchParam() ) );
}
}
pgn::~pgn()
@@ -45,7 +45,7 @@ pgn::~pgn()
{
if( Resource->tabManager->isTab( pgnView ) )
{
- Resource->tabManager->removeTab( pgnView );
+ Resource->tabManager->removeTab( TQT_TQOBJECT(pgnView) );
}
}
}
@@ -106,16 +106,16 @@ void pgn::parseMatchParam( void )
// pgn::notation
//
///////////////////////////////////////
-QStringList* pgn::notation( const int format )
+TQStringList* pgn::notation( const int format )
{
- QStringList *list;
- QString notation;
+ TQStringList *list;
+ TQString notation;
MoveList::Iterator IT;
Annotation *annon;
int tmp(0), Line(0);
bool showLineNumber( false );
- list = new QStringList;
+ list = new TQStringList;
switch( format )
{
@@ -123,7 +123,7 @@ QStringList* pgn::notation( const int format )
/* CAN Raw move data ( ie. for UCI engines ) */
for( IT = Moves.begin(); IT != Moves.end(); ++IT )
{
- list->append( QString( (*IT).CAN ) );
+ list->append( TQString( (*IT).CAN ) );
}
break;
@@ -134,11 +134,11 @@ QStringList* pgn::notation( const int format )
Line = ( tmp + 2 ) >> 1;
if( ( tmp % 2 ) == 0 )
{
- notation = QString( "%1. %2" ).arg( Line ).arg( (*IT).SAN );
+ notation = TQString( "%1. %2" ).tqarg( Line ).tqarg( (*IT).SAN );
}
else
{
- notation = QString( "%1... %2" ).arg( Line ).arg( (*IT).SAN );
+ notation = TQString( "%1... %2" ).tqarg( Line ).tqarg( (*IT).SAN );
}
list->append( notation );
tmp++;
@@ -152,37 +152,37 @@ QStringList* pgn::notation( const int format )
Line = ( tmp + 2 ) >> 1;
if( ( tmp % 2 ) == 0 )
{
- notation = QString( "%1. %2" ).arg( Line ).arg( (*IT).SAN );
+ notation = TQString( "%1. %2" ).tqarg( Line ).tqarg( (*IT).SAN );
}
else
{
if( showLineNumber )
{
- notation = QString( "%1... %2" ).arg( Line ).arg( (*IT).SAN );
+ notation = TQString( "%1... %2" ).tqarg( Line ).tqarg( (*IT).SAN );
}
else
{
- notation = QString( (*IT).SAN );
+ notation = TQString( (*IT).SAN );
}
}
showLineNumber = false;
/* Insert NAGs */
if( (*IT).NAG != 0 )
{
- notation += QString( " $%1" ).arg( QString::number( (*IT).NAG ) );
+ notation += TQString( " $%1" ).tqarg( TQString::number( (*IT).NAG ) );
}
/* Insert RAVs */
- annon = RAV.find( tmp );
+ annon = RAV.tqfind( tmp );
if( annon != NULL )
{
- notation += QString( " (%1)" ).arg( annon->text );
+ notation += TQString( " (%1)" ).tqarg( annon->text );
showLineNumber = true;
}
/* Insert Annotations */
- annon = annotations.find( tmp );
+ annon = annotations.tqfind( tmp );
if( annon != NULL )
{
- notation += QString( " {%1}" ).arg( annon->text );
+ notation += TQString( " {%1}" ).tqarg( annon->text );
showLineNumber = true;
}
list->append( notation );
@@ -200,11 +200,11 @@ QStringList* pgn::notation( const int format )
// pgn::caption
//
///////////////////////////////////////
-QString pgn::caption( void )
+TQString pgn::caption( void )
{
- QString caption;
+ TQString caption;
- caption = i18n( "%1 vs. %2").arg( TAG_White ).arg( TAG_Black );
+ caption = i18n( "%1 vs. %2").tqarg( TAG_White ).tqarg( TAG_Black );
return caption;
}
///////////////////////////////////////
@@ -279,18 +279,18 @@ void pgn::clearTags( void )
///////////////////////////////////////
void pgn::init( void )
{
- QString temp;
+ TQString temp;
struct utsname unamePtr;
- QDateTime qdt;
+ TQDateTime qdt;
clear();
parseMatchParam();
uname( &unamePtr );
/* Build Date */
- qdt = QDateTime::currentDateTime();
- TAG_Date = QString("%1.%2.%3").arg(qdt.date().year(),4).arg(qdt.date().month(),2).arg(qdt.date().day(),2);
- TAG_Date = TAG_Date.replace( QRegExp("\\s"), QString("0") );
+ qdt = TQDateTime::tqcurrentDateTime();
+ TAG_Date = TQString("%1.%2.%3").tqarg(qdt.date().year(),4).tqarg(qdt.date().month(),2).tqarg(qdt.date().day(),2);
+ TAG_Date = TAG_Date.tqreplace( TQRegExp("\\s"), TQString("0") );
TAG_Time = qdt.time().toString();
TAG_Site = unamePtr.nodename;
@@ -306,7 +306,7 @@ void pgn::init( void )
int pgn::scan( void )
{
register int Section(0);
- QChar c;
+ TQChar c;
clearTags();
File_Position = File.at();
@@ -327,7 +327,7 @@ int pgn::scan( void )
return (int)( ( (float)File.at() / (float)File.size() ) * 100.0 );
}
c = getch();
- while( c != QChar::null )
+ while( c != TQChar::null )
{
switch( c )
{
@@ -337,12 +337,12 @@ int pgn::scan( void )
break;
case '%': /* Fall through */
case ';':
- c = QChar::null;
+ c = TQChar::null;
continue;
break;
default:
Section = 1;
- c = QChar::null;
+ c = TQChar::null;
continue;
break;
}
@@ -360,9 +360,9 @@ int pgn::scan( void )
///////////////////////////////////////
bool pgn::load( const int pos )
{
- QString Token,
+ TQString Token,
Value;
- QChar c;
+ TQChar c;
File.at(pos);
clear();
@@ -386,15 +386,15 @@ bool pgn::load( const int pos )
}
/* Allocate the Tab_PGNView */
pgnView = new tab_pgnView( this, Resource );
- connect( pgnView, SIGNAL( destroyed() ), this, SLOT( childViewDestroyed() ) );
- Resource->tabManager->addTab( pgnView, i18n( "%1 vs. %2" ).arg( TAG_White ).arg( TAG_Black ) );
+ connect( pgnView, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( childViewDestroyed() ) );
+ Resource->tabManager->addTab( pgnView, i18n( "%1 vs. %2" ).tqarg( TAG_White ).tqarg( TAG_Black ) );
pgnView->init();
File.at( File_Position );
currentLine = "";
return TRUE;
}
c = getch();
- while( c != QChar::null )
+ while( c != TQChar::null )
{
Token = "";
Value = "";
@@ -406,7 +406,7 @@ bool pgn::load( const int pos )
if( Value == "KNIGHTS_CMD" ) parseKnightsData();
/* Fall through */
case ';':
- c = QChar::null;
+ c = TQChar::null;
continue;
break;
/* Tag Pair */
@@ -414,7 +414,7 @@ bool pgn::load( const int pos )
parseTag();
break;
default:
- c = QChar::null;
+ c = TQChar::null;
break;
}
c = getch();
@@ -430,8 +430,8 @@ bool pgn::load( const int pos )
///////////////////////////////////////
bool pgn::loadNext( void )
{
- QChar c;
- QString Value;
+ TQChar c;
+ TQString Value;
ChessMove Move;
bool postMove( FALSE );
@@ -444,7 +444,7 @@ bool pgn::loadNext( void )
currentLine = Input.readLine();
}
c = getch();
- while( c != QChar::null )
+ while( c != TQChar::null )
{
Value = "";
switch( c )
@@ -455,7 +455,7 @@ bool pgn::loadNext( void )
if( Value == "KNIGHTS_CMD" ) parseKnightsData();
/* Fall through */
case ';':
- c = QChar::null;
+ c = TQChar::null;
continue;
/* Tag Pair...next game, so we're done. */
case '[':
@@ -463,7 +463,7 @@ bool pgn::loadNext( void )
/* Numeric Annotation Glyph */
case '$':
c = getch();
- while( ( c >= '0' ) && ( c <= '9' ) )
+ while( ( c.unicode() >= '0' ) && ( c.unicode() <= '9' ) )
{
Value += c;
c = getch();
@@ -506,7 +506,7 @@ bool pgn::loadNext( void )
return TRUE;
}
/* Catch Standard Algebraic Notation */
- while( ( c != QChar::null ) &&
+ while( ( c != TQChar::null ) &&
( c != ' ' ) &&
( c != ';' ) &&
( c != '%' ) )
@@ -528,11 +528,11 @@ bool pgn::loadNext( void )
// pgn::save
//
///////////////////////////////////////
-bool pgn::save( QString URL )
+bool pgn::save( TQString URL )
{
- QFile Save( URL );
- QTextStream *Output;
- QString Token,
+ TQFile Save( URL );
+ TQTextStream *Output;
+ TQString Token,
Value;
close();
@@ -545,7 +545,7 @@ bool pgn::save( QString URL )
{
Save.open( IO_WriteOnly );
}
- Output = new QTextStream( &Save );
+ Output = new TQTextStream( &Save );
(*Output) << "[Event \"" << TAG_Event << "\"]\n";
(*Output) << "[Site \"" << TAG_Site << "\"]\n";
(*Output) << "[Date \"" << TAG_Date << "\"]\n";
@@ -611,7 +611,7 @@ bool pgn::save( QString URL )
(*Output) << "[Annotator \"" << TAG_Annotator << "\"]\n";
if( !TAG_Mode.isEmpty() )
(*Output) << "[Mode \"" << TAG_Mode << "\"]\n";
- TAG_PlyCount = QString().setNum( Moves.count() );
+ TAG_PlyCount = TQString().setNum( Moves.count() );
(*Output) << "[PlyCount \"" << TAG_PlyCount << "\"]\n";
/* Save internal data if this game is unfinished */
@@ -658,8 +658,8 @@ bool pgn::save( QString URL )
/* End of internal data save */
(*Output) << "\n";
- QStringList *list = notation(2);
- QString SAN = list->join( " " );
+ TQStringList *list = notation(2);
+ TQString SAN = list->join( " " );
delete list;
kdWarning() << SAN.right( 20 ) << endl;
@@ -670,7 +670,7 @@ bool pgn::save( QString URL )
{
while( SAN.at( pos ) != ' ' )
pos--;
- SAN = SAN.replace( pos, 1, QString("\n") );
+ SAN = SAN.tqreplace( pos, 1, TQString("\n") );
lastPos = pos;
pos = lastPos + 80;
}
@@ -685,9 +685,9 @@ bool pgn::save( QString URL )
// pgn::getch
//
///////////////////////////////////////
-QChar pgn::getch( void )
+TQChar pgn::getch( void )
{
- QChar c;
+ TQChar c;
c = currentLine.at(0);
currentLine.remove( 0, 1 );
@@ -698,17 +698,17 @@ QChar pgn::getch( void )
// pgn::getword
//
///////////////////////////////////////
-QString pgn::getword( void )
+TQString pgn::getword( void )
{
- QChar c;
- QString word;
+ TQChar c;
+ TQString word;
do
{
c = getch();
} while( c == ' ' );
- while( ( c != ' ' ) && ( c != QChar::null ) )
+ while( ( c != ' ' ) && ( c != TQChar::null ) )
{
word += c;
c = getch();
@@ -720,7 +720,7 @@ QString pgn::getword( void )
// pgn::open
//
///////////////////////////////////////
-bool pgn::open( const QString &URL )
+bool pgn::open( const TQString &URL )
{
close();
if( !KIO::NetAccess::download( URL, tempFile ) )
@@ -732,7 +732,7 @@ bool pgn::open( const QString &URL )
close();
return FALSE;
}
- Input.setDevice( &File );
+ Input.setDevice( TQT_TQIODEVICE(&File) );
CurrentURL = URL;
File.at(0);
return TRUE;
@@ -761,9 +761,9 @@ void pgn::close( void )
///////////////////////////////////////
void pgn::parseTag( void )
{
- QChar c;
- QString Token;
- QString Value;
+ TQChar c;
+ TQString Token;
+ TQString Value;
c = getch();
while( c == ' ' ) c = getch();
@@ -838,12 +838,12 @@ void pgn::parseTag( void )
void pgn::parseAnnotation( const int fromRAVnum )
{
Annotation *annon = new Annotation;
- QChar c;
+ TQChar c;
c = getch();
while( c != '}' )
{
- if( c == QChar::null )
+ if( c == TQChar::null )
{
if( Input.eof() ) break;
currentLine = Input.readLine();
@@ -865,12 +865,12 @@ void pgn::parseRAV( void )
{
int RAVLevel(1);
Annotation *annon = new Annotation;
- QChar c;
+ TQChar c;
while( RAVLevel )
{
c = getch();
- if( c == QChar::null )
+ if( c == TQChar::null )
{
if( Input.eof() )
break;
@@ -899,8 +899,8 @@ void pgn::parseRAV( void )
///////////////////////////////////////
void pgn::parseKnightsData( void )
{
- QString Key;
- QString Value;
+ TQString Key;
+ TQString Value;
Key = getword();
if( Key == "DONE" )
@@ -950,8 +950,8 @@ void pgn::print( void )
{
/* Allocate the Tab_PGNView */
pgnView = new tab_pgnView( this, Resource );
- Resource->tabManager->addTab( pgnView, i18n( "%1 vs. %2" ).arg( TAG_White ).arg( TAG_Black ) );
- connect( pgnView, SIGNAL( destroyed() ), this, SLOT( childViewDestroyed() ) );
+ Resource->tabManager->addTab( pgnView, i18n( "%1 vs. %2" ).tqarg( TAG_White ).tqarg( TAG_Black ) );
+ connect( pgnView, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( childViewDestroyed() ) );
pgnView->init();
}
pgnView->print();
@@ -970,9 +970,9 @@ void pgn::childViewDestroyed( void )
// pgn::getNAG
//
///////////////////////////////////////
-QString pgn::getNAG( int num )
+TQString pgn::getNAG( int num )
{
- QString Line;
+ TQString Line;
switch( num )
{
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 );
diff --git a/knights/proto_base.cpp b/knights/proto_base.cpp
index c7e64fc..5487620 100644
--- a/knights/proto_base.cpp
+++ b/knights/proto_base.cpp
@@ -17,7 +17,7 @@
#include "proto_base.moc"
-proto_base::proto_base( const int ID ) : QObject()
+proto_base::proto_base( const int ID ) : TQObject()
{
myID = ID;
}
diff --git a/knights/proto_base.h b/knights/proto_base.h
index 43113c6..a19d98f 100644
--- a/knights/proto_base.h
+++ b/knights/proto_base.h
@@ -18,20 +18,21 @@
#ifndef PROTO_BASE_H
#define PROTO_BASE_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "command.h"
#include "definitions.h"
/**
*@author Troy Corbin Jr.
*/
-typedef QValueList<Command> CommandList;
+typedef TQValueList<Command> CommandList;
-class proto_base : public QObject
+class proto_base : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
proto_base( const int ID );
virtual ~proto_base();
@@ -40,10 +41,10 @@ class proto_base : public QObject
public slots:
virtual void parse( const Command& ) = 0;
- virtual void parse( const QString& ) = 0;
+ virtual void parse( const TQString& ) = 0;
signals:
- void output( const QString& );
+ void output( const TQString& );
void output( const Command& );
protected:
diff --git a/knights/proto_uci.cpp b/knights/proto_uci.cpp
index d277326..45b5eca 100644
--- a/knights/proto_uci.cpp
+++ b/knights/proto_uci.cpp
@@ -15,8 +15,8 @@
* *
***************************************************************************/
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include "proto_uci.moc"
#include "definitions.h"
@@ -76,13 +76,13 @@ void proto_uci::parse( const Command &command )
}
if( FEN.isEmpty() )
{
- emit output( QString("position startpos moves %1").arg( cmd.getData() ) );
+ emit output( TQString("position startpos moves %1").tqarg( cmd.getData() ) );
}
else
{
- emit output( QString("position fen %1 moves %2").arg( FEN ).arg( cmd.getData() ) );
+ emit output( TQString("position fen %1 moves %2").tqarg( FEN ).tqarg( cmd.getData() ) );
}
- emit output( QString("go wtime %1 btime %2 depth %3").arg( cmd.getWhiteTime() ).arg( cmd.getBlackTime() ).arg( difficulty ) );
+ emit output( TQString("go wtime %1 btime %2 depth %3").tqarg( cmd.getWhiteTime() ).tqarg( cmd.getBlackTime() ).tqarg( difficulty ) );
break;
/* Command: Set Difficulty */
@@ -105,13 +105,13 @@ void proto_uci::parse( const Command &command )
hintMode = TRUE;
if( FEN.isEmpty() )
{
- emit output( QString("position startpos moves %1").arg( cmd.getData() ) );
+ emit output( TQString("position startpos moves %1").tqarg( cmd.getData() ) );
}
else
{
- emit output( QString("position fen %1 moves %2").arg( FEN ).arg( cmd.getData() ) );
+ emit output( TQString("position fen %1 moves %2").tqarg( FEN ).tqarg( cmd.getData() ) );
}
- emit output( QString("go wtime %1 btime %2 depth %3").arg( cmd.getWhiteTime() ).arg( cmd.getBlackTime() ).arg( difficulty ) );
+ emit output( TQString("go wtime %1 btime %2 depth %3").tqarg( cmd.getWhiteTime() ).tqarg( cmd.getBlackTime() ).tqarg( difficulty ) );
break;
/* Command: Play White */
@@ -132,13 +132,13 @@ void proto_uci::parse( const Command &command )
}
///////////////////////////////////////
//
-// proto_uci::parse( const QString &string )
+// proto_uci::parse( const TQString &string )
//
///////////////////////////////////////
-void proto_uci::parse( const QString &string )
+void proto_uci::parse( const TQString &string )
{
- QString strIn = string;
- QStringList strList( QStringList::split( ' ', strIn ) );
+ TQString strIn = string;
+ TQStringList strList( TQStringList::split( ' ', strIn ) );
/* Bestmove */
if( strList[0] == "bestmove" )
@@ -154,8 +154,8 @@ void proto_uci::parse( const QString &string )
{
/* The Engine Gives a Hint */
hintMode = FALSE;
-// emit output( Command( myID, CMD_Hint, i18n( "%1 suggests this move:\n%2" ).arg( engineName ).arg( strList[1] ) ) );
- emit output( Command( myID, CMD_Hint, QString( "%1 suggests this move:\n%2" ).arg( engineName ).arg( strList[1] ) ) );
+// emit output( Command( myID, CMD_Hint, i18n( "%1 suggests this move:\n%2" ).tqarg( engineName ).tqarg( strList[1] ) ) );
+ emit output( Command( myID, CMD_Hint, TQString( "%1 suggests this move:\n%2" ).tqarg( engineName ).tqarg( strList[1] ) ) );
}
else
{
@@ -197,8 +197,8 @@ void proto_uci::parse( const QString &string )
{
if( strList[1] == "error" )
{
-// emit output( Command( myID, CMD_Tell_User_Error, i18n( "%1 did not pass it's copy protection check." ).arg( engineName ) ) );
- emit output( Command( myID, CMD_Tell_User_Error, QString( "%1 did not pass it's copy protection check." ).arg( engineName ) ) );
+// emit output( Command( myID, CMD_Tell_User_Error, i18n( "%1 did not pass it's copy protection check." ).tqarg( engineName ) ) );
+ emit output( Command( myID, CMD_Tell_User_Error, TQString( "%1 did not pass it's copy protection check." ).tqarg( engineName ) ) );
}
}
}
diff --git a/knights/proto_uci.h b/knights/proto_uci.h
index 23a27b3..ebea101 100644
--- a/knights/proto_uci.h
+++ b/knights/proto_uci.h
@@ -18,7 +18,7 @@
#ifndef PROTO_UCI_H
#define PROTO_UCI_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "proto_base.h"
/**
@@ -28,21 +28,22 @@
class proto_uci : public proto_base
{
Q_OBJECT
+ TQ_OBJECT
public:
proto_uci( const int ID );
~proto_uci();
virtual void parse( const Command& );
- virtual void parse( const QString& );
+ virtual void parse( const TQString& );
protected slots:
void releaseBuffer( void );
private:
- QString engineName;
- QString engineAuthor;
- QString difficulty;
- QString FEN;
+ TQString engineName;
+ TQString engineAuthor;
+ TQString difficulty;
+ TQString FEN;
CommandList *CMDList;
bool hintMode;
diff --git a/knights/proto_xboard.cpp b/knights/proto_xboard.cpp
index 8b68bb0..fc90fca 100644
--- a/knights/proto_xboard.cpp
+++ b/knights/proto_xboard.cpp
@@ -16,9 +16,9 @@
***************************************************************************/
#include <klocale.h>
-#include <qtimer.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include "proto_xboard.moc"
#include "definitions.h"
@@ -45,8 +45,8 @@ proto_xboard::proto_xboard( const int ID ) : proto_base( ID )
FEATURE_BookEngine = 0;
CMDList = new CommandList;
- InitTimer = new QTimer( this );
- connect( InitTimer, SIGNAL( timeout() ), this, SLOT( releaseBuffer() ) );
+ InitTimer = new TQTimer( this );
+ connect( InitTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( releaseBuffer() ) );
Check = TRUE;
Team = FALSE;
@@ -68,7 +68,7 @@ proto_xboard::~proto_xboard()
///////////////////////////////////////
void proto_xboard::parse( const Command &command )
{
- QString temp;
+ TQString temp;
Command cmd = command;
if( InitTimer->isActive() )
@@ -120,13 +120,13 @@ void proto_xboard::parse( const Command &command )
{
if( Army == WHITE )
{
- emit output( QString( "time %1" ).arg( cmd.getWhiteTime() ) );
- emit output( QString( "otim %1" ).arg( cmd.getBlackTime() ) );
+ emit output( TQString( "time %1" ).tqarg( cmd.getWhiteTime() ) );
+ emit output( TQString( "otim %1" ).tqarg( cmd.getBlackTime() ) );
}
else
{
- emit output( QString( "time %1" ).arg( cmd.getBlackTime() ) );
- emit output( QString( "otim %1" ).arg( cmd.getWhiteTime() ) );
+ emit output( TQString( "time %1" ).tqarg( cmd.getBlackTime() ) );
+ emit output( TQString( "otim %1" ).tqarg( cmd.getWhiteTime() ) );
}
}
if( FEATURE_UserMove )
@@ -267,9 +267,9 @@ void proto_xboard::parse( const Command &command )
if( FEATURE_Time )
{
if( Army == WHITE )
- emit output( QString( "time %1" ).arg( cmd.getWhiteTime() ) );
+ emit output( TQString( "time %1" ).tqarg( cmd.getWhiteTime() ) );
else
- emit output( QString( "time %1" ).arg( cmd.getBlackTime() ) );
+ emit output( TQString( "time %1" ).tqarg( cmd.getBlackTime() ) );
}
break;
@@ -278,9 +278,9 @@ void proto_xboard::parse( const Command &command )
if( FEATURE_Time )
{
if( Army == WHITE )
- emit output( QString( "otim %1" ).arg( cmd.getBlackTime() ) );
+ emit output( TQString( "otim %1" ).tqarg( cmd.getBlackTime() ) );
else
- emit output( QString( "otim %1" ).arg( cmd.getWhiteTime() ) );
+ emit output( TQString( "otim %1" ).tqarg( cmd.getWhiteTime() ) );
}
break;
@@ -354,7 +354,7 @@ void proto_xboard::parse( const Command &command )
case CMD_Set_Board:
if( FEATURE_SetBoard == TRUE )
{
- emit output( QString( "setboard %1" ).arg( cmd.getData() ) );
+ emit output( TQString( "setboard %1" ).tqarg( cmd.getData() ) );
}
else
{
@@ -365,7 +365,7 @@ void proto_xboard::parse( const Command &command )
/* Command: Set Difficulty */
case CMD_Set_Difficulty:
emit output( "sd " + cmd.getData() );
- // emit output( "st " + QString::number( cmd.getData().toInt() >> 1 ) );
+ // emit output( "st " + TQString::number( cmd.getData().toInt() >> 1 ) );
break;
/* Command: Set Name */
@@ -378,27 +378,27 @@ void proto_xboard::parse( const Command &command )
}
///////////////////////////////////////
//
-// proto_xboard::parse( const QString &string )
+// proto_xboard::parse( const TQString &string )
//
///////////////////////////////////////
-void proto_xboard::parse( const QString &string )
+void proto_xboard::parse( const TQString &string )
{
- QString strIn = string;
- QStringList strList( QStringList::split( ' ', strIn ) );
+ TQString strIn = string;
+ TQStringList strList( TQStringList::split( ' ', strIn ) );
if( ( FEATURE_SIGINT ) && ( !Forced ) )
emit output( Command( myID, CMD_Send_SIGINT ) );
/* Illegal */
- if( strList[0].contains( "illegal", FALSE ) )
+ if( strList[0].tqcontains( "illegal", FALSE ) )
{
if( AcceptIllegal )
{
- if( strIn.contains("(no matching move)board") )
+ if( strIn.tqcontains("(no matching move)board") )
return;
- if( strIn.contains("(no matching move)protover") )
+ if( strIn.tqcontains("(no matching move)protover") )
return;
- if( strIn.contains("(no matching move)sd") )
+ if( strIn.tqcontains("(no matching move)sd") )
return;
AcceptIllegal = FALSE;
emit output( Command( myID, CMD_Illegal ) );
@@ -428,7 +428,7 @@ void proto_xboard::parse( const QString &string )
}
/* A Move ( Old Variation ) */
- if( ( strList[0].contains( QRegExp("\\d+\\.") ) ) && ( strList[1] == "..." ) )
+ if( ( strList[0].tqcontains( TQRegExp("\\d+\\.") ) ) && ( strList[1] == "..." ) )
{
Command::clearMove( &myMove );
strcpy( myMove.SAN, strList[2].latin1() );
@@ -446,7 +446,7 @@ void proto_xboard::parse( const QString &string )
/* Hint */
if( strList[0] == "Hint:" )
{
- emit output( Command( myID, CMD_Hint, i18n( "%1 suggests this move:\n%2" ).arg( FEATURE_MyName ).arg( strList[1] ) ) );
+ emit output( Command( myID, CMD_Hint, i18n( "%1 suggests this move:\n%2" ).tqarg( FEATURE_MyName ).tqarg( strList[1] ) ) );
return;
}
@@ -468,61 +468,61 @@ void proto_xboard::parse( const QString &string )
/* Tell User */
if( strList[0] == "telluser" )
{
- emit output( Command( myID, CMD_Tell_User, i18n( "%1 tells you:\n%2" ).arg( FEATURE_MyName ).arg( strIn.right( strIn.length() - 9 ) ) ) );
+ emit output( Command( myID, CMD_Tell_User, i18n( "%1 tells you:\n%2" ).tqarg( FEATURE_MyName ).tqarg( strIn.right( strIn.length() - 9 ) ) ) );
return;
}
/* Tell User Error */
if( strList[0] == "tellusererror" )
{
- emit output( Command( myID, CMD_Tell_User_Error, i18n( "%1 tells you:\n%2" ).arg( FEATURE_MyName ).arg( strIn.right( strIn.length() - 14 ) ) ) );
+ emit output( Command( myID, CMD_Tell_User_Error, i18n( "%1 tells you:\n%2" ).tqarg( FEATURE_MyName ).tqarg( strIn.right( strIn.length() - 14 ) ) ) );
return;
}
/* Error */
if( strList[0] == "Error" )
{
- emit output( Command( myID, CMD_Tell_User_Error, i18n( "%1 tells you:\n%2" ).arg( FEATURE_MyName ).arg( strIn.right( strIn.length() ) ) ) );
+ emit output( Command( myID, CMD_Tell_User_Error, i18n( "%1 tells you:\n%2" ).tqarg( FEATURE_MyName ).tqarg( strIn.right( strIn.length() ) ) ) );
return;
}
/* Tell Opponent */
if( strList[0] == "tellopponent" )
{
- emit output( Command( myID, CMD_Tell_Opponent, QString( "%1" ).arg( strIn.right( strIn.length() - 13 ) ) ) );
+ emit output( Command( myID, CMD_Tell_Opponent, TQString( "%1" ).tqarg( strIn.right( strIn.length() - 13 ) ) ) );
return;
}
/* Tell Others */
if( strList[0] == "tellothers" )
{
- emit output( Command( myID, CMD_Tell_Others, QString( "%1" ).arg( strIn.right( strIn.length() - 11 ) ) ) );
+ emit output( Command( myID, CMD_Tell_Others, TQString( "%1" ).tqarg( strIn.right( strIn.length() - 11 ) ) ) );
return;
}
/* Tell All */
if( strList[0] == "tellall" )
{
- emit output( Command( myID, CMD_Tell_All, QString( "%1" ).arg( strIn.right( strIn.length() - 8 ) ) ) );
+ emit output( Command( myID, CMD_Tell_All, TQString( "%1" ).tqarg( strIn.right( strIn.length() - 8 ) ) ) );
return;
}
/* Tell ICS */
if( strList[0] == "tellics" )
{
- emit output( Command( myID, CMD_Tell_ICS, QString( "%1" ).arg( strIn.right( strIn.length() - 8 ) ) ) );
+ emit output( Command( myID, CMD_Tell_ICS, TQString( "%1" ).tqarg( strIn.right( strIn.length() - 8 ) ) ) );
return;
}
/* Tell ICS No Alias */
if( strList[0] == "tellicsnoalias" )
{
- emit output( Command( myID, CMD_Tell_ICS, QString( "%1" ).arg( strIn.right( strIn.length() - 15 ) ) ) );
+ emit output( Command( myID, CMD_Tell_ICS, TQString( "%1" ).tqarg( strIn.right( strIn.length() - 15 ) ) ) );
return;
}
/* Resign */
- if( strIn.contains( "resign", FALSE ) )
+ if( strIn.tqcontains( "resign", FALSE ) )
{
if( Army == WHITE )
emit output( Command( myID, CMD_White_Resign ) );
@@ -556,97 +556,97 @@ void proto_xboard::parse( const QString &string )
}
if( strList[loop].left(3) == "ics" )
{
- FEATURE_ICS = QString( strList[loop].right(1) ).toInt();
+ FEATURE_ICS = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted ics" );
continue;
}
if( strList[loop].left(3) == "san" )
{
- FEATURE_SAN = QString( strList[loop].right(1) ).toInt();
+ FEATURE_SAN = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted san" );
continue;
}
if( strList[loop].left(4) == "draw" )
{
- FEATURE_Draw = QString( strList[loop].right(1) ).toInt();
+ FEATURE_Draw = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted draw" );
continue;
}
if( strList[loop].left(4) == "name" )
{
- FEATURE_Name = QString( strList[loop].right(1) ).toInt();
+ FEATURE_Name = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted name" );
continue;
}
if( strList[loop].left(4) == "ping" )
{
- FEATURE_Ping = QString( strList[loop].right(1) ).toInt();
+ FEATURE_Ping = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted ping" );
continue;
}
if( strList[loop].left(4) == "time" )
{
- FEATURE_Time = QString( strList[loop].right(1) ).toInt();
+ FEATURE_Time = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted time" );
continue;
}
if( strList[loop].left(5) == "level" )
{
- FEATURE_Level = QString( strList[loop].right( strList[loop].length() - 6 ) ).toInt();
+ FEATURE_Level = TQString( strList[loop].right( strList[loop].length() - 6 ) ).toInt();
emit output( "accepted level" );
continue;
}
if( strList[loop].left(5) == "pause" )
{
- FEATURE_Pause = QString( strList[loop].right(1) ).toInt();
+ FEATURE_Pause = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted pause" );
continue;
}
if( strList[loop].left(5) == "reuse" )
{
- FEATURE_Reuse = QString( strList[loop].right(1) ).toInt();
+ FEATURE_Reuse = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted reuse" );
continue;
}
if( strList[loop].left(6) == "colors" )
{
- FEATURE_Colors = QString( strList[loop].right(1) ).toInt();
+ FEATURE_Colors = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted colors" );
continue;
}
if( strList[loop].left(6) == "myname" )
{
- FEATURE_MyName = QString( strList[loop].right( strList[loop].length() - 8 ) );
+ FEATURE_MyName = TQString( strList[loop].right( strList[loop].length() - 8 ) );
emit output( "accepted myname" );
continue;
}
if( strList[loop].left(6) == "sigint" )
{
- FEATURE_SIGINT = QString( strList[loop].right(1) ).toInt();
+ FEATURE_SIGINT = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted sigint" );
continue;
}
if( strList[loop].left(7) == "analyze" )
{
- FEATURE_Analyze = QString( strList[loop].right(1) ).toInt();
+ FEATURE_Analyze = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted analyze" );
continue;
}
if( strList[loop].left(7) == "sigterm" )
{
- FEATURE_SIGTERM = QString( strList[loop].right(1) ).toInt();
+ FEATURE_SIGTERM = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted sigterm" );
continue;
}
if( strList[loop].left(8) == "setboard" )
{
- FEATURE_SetBoard = QString( strList[loop].right(1) ).toInt();
+ FEATURE_SetBoard = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted setboard" );
continue;
}
if( strList[loop].left(8) == "usermove" )
{
- FEATURE_UserMove = QString( strList[loop].right(1) ).toInt();
+ FEATURE_UserMove = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted usermove" );
continue;
}
@@ -659,13 +659,13 @@ void proto_xboard::parse( const QString &string )
}
if( strList[loop].left(9) == "playother" )
{
- FEATURE_PlayOther = QString( strList[loop].right(1) ).toInt();
+ FEATURE_PlayOther = TQString( strList[loop].right(1) ).toInt();
emit output( "accepted playother" );
continue;
}
if( strList[loop].left(10) == "bookengine" )
{
- FEATURE_BookEngine = QString( strList[loop].right( strList[loop].length() - 11 ) ).toInt();
+ FEATURE_BookEngine = TQString( strList[loop].right( strList[loop].length() - 11 ) ).toInt();
emit output( "accepted bookengine" );
continue;
}
diff --git a/knights/proto_xboard.h b/knights/proto_xboard.h
index 0b07109..b5c1d6c 100644
--- a/knights/proto_xboard.h
+++ b/knights/proto_xboard.h
@@ -24,17 +24,18 @@
*@author Troy Corbin Jr.
*/
-class QTimer;
+class TQTimer;
class proto_xboard : public proto_base
{
Q_OBJECT
+ TQ_OBJECT
public:
proto_xboard( const int ID );
~proto_xboard();
virtual void parse( const Command& );
- virtual void parse( const QString& );
+ virtual void parse( const TQString& );
protected slots:
void releaseBuffer( void );
@@ -58,7 +59,7 @@ class proto_xboard : public proto_base
bool FEATURE_Time;
bool FEATURE_UserMove;
int FEATURE_Variants;
- QString FEATURE_MyName;
+ TQString FEATURE_MyName;
/* XBoard protover 3 */
int FEATURE_Level;
int FEATURE_BookEngine;
@@ -71,7 +72,7 @@ class proto_xboard : public proto_base
bool AcceptIllegal;
bool DelayedGo;
bool Forced;
- QTimer *InitTimer;
+ TQTimer *InitTimer;
CommandList *CMDList;
};
diff --git a/knights/resource.cpp b/knights/resource.cpp
index ba172b9..d8f2c57 100644
--- a/knights/resource.cpp
+++ b/knights/resource.cpp
@@ -22,9 +22,9 @@
#include <kiconloader.h>
#include <kmdcodec.h>
#include <kio/netaccess.h>
-/* Qt */
-#include <qdir.h>
-#include <qimage.h>
+/* TQt */
+#include <tqdir.h>
+#include <tqimage.h>
/* Local */
#include "resource.h"
#include "audio.h"
@@ -48,18 +48,18 @@ resource::resource(KCmdLineArgs *args)
{
GlobalDataDir = "";
Widget_Height = 20; // prevents max_size error for thinbuttons on init
- Icons = new KIconLoader( QString( "knights" ) );
+ Icons = new KIconLoader( TQString( "knights" ) );
Audio = new audio();
/* Define ConsoleStyle, our RichText */
- ConsoleStyle = new QStyleSheet( 0, "ConsoleStyle" );
- SSI_Default = new QStyleSheetItem( ConsoleStyle, "K_STD" );
- SSI_PrivateTell = new QStyleSheetItem( ConsoleStyle, "K_PVT" );
- SSI_ChannelTell = new QStyleSheetItem( ConsoleStyle, "K_CH" );
- SSI_Shout = new QStyleSheetItem( ConsoleStyle, "K_SHT" );
- SSI_Whisper = new QStyleSheetItem( ConsoleStyle, "K_WSP" );
- SSI_Notification = new QStyleSheetItem( ConsoleStyle, "K_NOT" );
- QStyleSheet::setDefaultSheet( ConsoleStyle );
+ ConsoleStyle = new TQStyleSheet( 0, "ConsoleStyle" );
+ SSI_Default = new TQStyleSheetItem( ConsoleStyle, "K_STD" );
+ SSI_PrivateTell = new TQStyleSheetItem( ConsoleStyle, "K_PVT" );
+ SSI_ChannelTell = new TQStyleSheetItem( ConsoleStyle, "K_CH" );
+ SSI_Shout = new TQStyleSheetItem( ConsoleStyle, "K_SHT" );
+ SSI_Whisper = new TQStyleSheetItem( ConsoleStyle, "K_WSP" );
+ SSI_Notification = new TQStyleSheetItem( ConsoleStyle, "K_NOT" );
+ TQStyleSheet::setDefaultSheet( ConsoleStyle );
/* Define GlobalDataDir... This is very important! */
GlobalDataDir = args->getOption( "d" );
@@ -73,7 +73,7 @@ resource::resource(KCmdLineArgs *args)
if( GlobalDataDir.right(1) != "/" ) GlobalDataDir += '/';
/* Allocate Accel */
- myAccel = new Accel( qApp->mainWidget() );
+ myAccel = new Accel( tqApp->mainWidget() );
/* Allocate TabManager */
tabManager = new TabManager( this );
@@ -97,7 +97,7 @@ resource::~resource()
delete myAccel;
/* Remove temp files that we missed
- QStringList temps = KGlobal::dirs()->findAllResources("tmp","knights*");
+ TQStringList temps = KGlobal::dirs()->findAllResources("tmp","knights*");
for( int a=0; a < temps.count(); a++)
{
KIO::NetAccess::del( "file://" + temps[a] );
@@ -111,9 +111,9 @@ resource::~resource()
void resource::ConfigRead( void )
{
struct passwd *passwd;
- QString sysName;
- QString buffer;
- QDesktopWidget *desktop = QApplication::desktop();
+ TQString sysName;
+ TQString buffer;
+ TQDesktopWidget *desktop = TQApplication::desktop();
/* Get Initial Board Size In Case This Install Is New */
int initSize = ( desktop->height() >> 3 ) - 32;
@@ -126,7 +126,7 @@ void resource::ConfigRead( void )
passwd = getpwuid( getuid() );
sysName = passwd->pw_gecos;
if( sysName.isEmpty() )
- sysName = QStringList::split( ",", QString(passwd->pw_name) ).first();
+ sysName = TQStringList::split( ",", TQString(passwd->pw_name) ).first();
/* Cursors */
CURSOR_Standard = KCursor::arrowCursor();
@@ -160,12 +160,12 @@ void resource::ConfigRead( void )
OPTION_Book_Black = CFG->readBoolEntry( "BookBlack", FALSE );
OPTION_Pause_On_Minimize = CFG->readBoolEntry( "PauseOnMinimize", TRUE );
OPTION_Reuse_PGN = CFG->readBoolEntry( "ReusePGN", FALSE );
- PGN_Filename = CFG->readEntry( "PGNFilename", QString::null );
- SCID_Image_Path = CFG->readEntry( "SCIDImages", QString::null );
+ PGN_Filename = CFG->readEntry( "PGNFilename", TQString() );
+ SCID_Image_Path = CFG->readEntry( "SCIDImages", TQString() );
OPTION_Auto_Close_Last_ICS = CFG->readBoolEntry( "AutoCloseLastICS", TRUE );
OPTION_Show_Extended_PGN = CFG->readEntry( "ShowExtendedPGN", FALSE );
OPTION_Auto_Call_Flag = CFG->readBoolEntry( "AutoCallFlag", TRUE );
- Email_Command_Line = CFG->readEntry( "EmailCommandLine", QString("kmail -s %s --attach %m %a") );
+ Email_Command_Line = CFG->readEntry( "EmailCommandLine", TQString("kmail -s %s --attach %m %a") );
Accepted_License = CFG->readBoolEntry( "Alg2p", FALSE );
/* Display */
@@ -174,7 +174,7 @@ void resource::ConfigRead( void )
OPTION_Show_Last_Move = CFG->readBoolEntry( "ShowLastMove", TRUE );
OPTION_Animate_Moves = CFG->readBoolEntry( "AnimateMoves", FALSE );
OPTION_Show_Coord = CFG->readBoolEntry( "ShowCoord", FALSE );
- OPTION_Board_Orientation = CFG->readBoolEntry( "BoardOrientation", 0 );
+ OPTION_Board_Orientation = CFG->readBoolEntry( "BoardQt::Orientation", 0 );
/* ICS */
CFG->setGroup( "ICS" );
@@ -198,7 +198,7 @@ void resource::ConfigRead( void )
/* Notification Prompts */
CFG->setGroup( "Notification Messages" );
- PromptForSaving = CFG->readEntry( "PromptForSaving", QString::null );
+ PromptForSaving = CFG->readEntry( "PromptForSaving", TQString() );
}
///////////////////////////////////////
//
@@ -233,7 +233,7 @@ void resource::ConfigWrite( void )
CFG->writeEntry( "Ponder", OPTION_Ponder );
CFG->writeEntry( "BookWhite", OPTION_Book_White );
CFG->writeEntry( "BookBlack", OPTION_Book_Black );
- CFG->writeEntry( "BoardOrientation", OPTION_Board_Orientation );
+ CFG->writeEntry( "BoardQt::Orientation", OPTION_Board_Orientation );
CFG->writeEntry( "PauseOnMinimize", OPTION_Pause_On_Minimize );
CFG->writeEntry( "ReusePGN", OPTION_Reuse_PGN );
CFG->writeEntry( "PGNFilename", PGN_Filename );
@@ -279,9 +279,9 @@ void resource::ConfigWrite( void )
///////////////////////////////////////
void resource::ReadMatchParam( void )
{
- QString buffer;
- QStringList TCPs;
- QStringList::Iterator QSL_IT;
+ TQString buffer;
+ TQStringList TCPs;
+ TQStringList::Iterator TQSL_IT;
TCP tempTCP;
TCPWhite.clear();
@@ -290,26 +290,26 @@ void resource::ReadMatchParam( void )
/* Handle Time Controls */
buffer = CFG->readEntry( "WhiteTCP", "40,900,0" );
- TCPs = QStringList::split( QString(","), buffer, FALSE );
- for( QSL_IT = TCPs.begin(); QSL_IT != TCPs.end(); ++QSL_IT )
+ TCPs = TQStringList::split( TQString(","), buffer, FALSE );
+ for( TQSL_IT = TCPs.begin(); TQSL_IT != TCPs.end(); ++TQSL_IT )
{
- tempTCP.Moves = (*QSL_IT).toInt();
- ++QSL_IT;
- tempTCP.Seconds = (*QSL_IT).toInt();
- ++QSL_IT;
- tempTCP.Increment = (*QSL_IT).toInt();
+ tempTCP.Moves = (*TQSL_IT).toInt();
+ ++TQSL_IT;
+ tempTCP.Seconds = (*TQSL_IT).toInt();
+ ++TQSL_IT;
+ tempTCP.Increment = (*TQSL_IT).toInt();
TCPWhite.append( tempTCP );
}
TCPs.clear();
buffer = CFG->readEntry( "BlackTCP", "40,900,0" );
- TCPs = QStringList::split( QString(","), buffer, FALSE );
- for( QSL_IT = TCPs.begin(); QSL_IT != TCPs.end(); ++QSL_IT )
+ TCPs = TQStringList::split( TQString(","), buffer, FALSE );
+ for( TQSL_IT = TCPs.begin(); TQSL_IT != TCPs.end(); ++TQSL_IT )
{
- tempTCP.Moves = (*QSL_IT).toInt();
- ++QSL_IT;
- tempTCP.Seconds = (*QSL_IT).toInt();
- ++QSL_IT;
- tempTCP.Increment = (*QSL_IT).toInt();
+ tempTCP.Moves = (*TQSL_IT).toInt();
+ ++TQSL_IT;
+ tempTCP.Seconds = (*TQSL_IT).toInt();
+ ++TQSL_IT;
+ tempTCP.Increment = (*TQSL_IT).toInt();
TCPBlack.append( tempTCP );
}
@@ -334,24 +334,24 @@ void resource::ReadMatchParam( void )
///////////////////////////////////////
void resource::WriteMatchParam( void )
{
- QString buffer;
+ TQString buffer;
TCPList::Iterator TCP_IT;
CFG->setGroup( "Match Paramaters" );
/* Handle Time Controls */
for( TCP_IT = TCPWhite.begin(); TCP_IT != TCPWhite.end(); ++TCP_IT )
{
- buffer += QString::number( (*TCP_IT).Moves ) + ",";
- buffer += QString::number( (*TCP_IT).Seconds ) + ",";
- buffer += QString::number( (*TCP_IT).Increment ) + ",";
+ buffer += TQString::number( (*TCP_IT).Moves ) + ",";
+ buffer += TQString::number( (*TCP_IT).Seconds ) + ",";
+ buffer += TQString::number( (*TCP_IT).Increment ) + ",";
}
CFG->writeEntry( "WhiteTCP", buffer );
buffer = "";
for( TCP_IT = TCPBlack.begin(); TCP_IT != TCPBlack.end(); ++TCP_IT )
{
- buffer += QString::number( (*TCP_IT).Moves ) + ",";
- buffer += QString::number( (*TCP_IT).Seconds ) + ",";
- buffer += QString::number( (*TCP_IT).Increment ) + ",";
+ buffer += TQString::number( (*TCP_IT).Moves ) + ",";
+ buffer += TQString::number( (*TCP_IT).Seconds ) + ",";
+ buffer += TQString::number( (*TCP_IT).Increment ) + ",";
}
CFG->writeEntry( "BlackTCP", buffer );
/* Match Rules */
@@ -375,16 +375,16 @@ void resource::WriteMatchParam( void )
void resource::ReadEngines( void )
{
engineResource temp;
- QStringList engineList;
- QStringList::Iterator engineListIT;
- QString buffer;
+ TQStringList engineList;
+ TQStringList::Iterator engineListIT;
+ TQString buffer;
engines.clear();
CFG->setGroup( "General" );
buffer = CFG->readEntry( "Engines" );
if( buffer.isEmpty() ) return;
- engineList = QStringList::split( QString(","), buffer, FALSE );
+ engineList = TQStringList::split( TQString(","), buffer, FALSE );
for ( engineListIT = engineList.begin(); engineListIT != engineList.end(); ++engineListIT )
{
if( !CFG->hasGroup( (*engineListIT) ) ) continue;
@@ -408,12 +408,12 @@ void resource::ReadEngines( void )
///////////////////////////////////////
void resource::WriteEngines( void )
{
- QString buffer;
+ TQString buffer;
CFG->setGroup( "General" );
if( engines.isEmpty() )
{
- CFG->writeEntry( "Engines", QString( "" ) );
+ CFG->writeEntry( "Engines", TQString( "" ) );
return;
}
for ( enginesIT = engines.begin(); enginesIT != engines.end(); ++enginesIT )
@@ -441,16 +441,16 @@ void resource::WriteEngines( void )
void resource::ReadServers( void )
{
serverResource temp;
- QStringList serverList;
- QStringList::Iterator serverListIT;
- QString buffer;
+ TQStringList serverList;
+ TQStringList::Iterator serverListIT;
+ TQString buffer;
servers.clear();
CFG->setGroup( "General" );
buffer = CFG->readEntry( "Servers" );
if( buffer.isEmpty() ) return;
- serverList = QStringList::split( QString(","), buffer, FALSE );
+ serverList = TQStringList::split( TQString(","), buffer, FALSE );
for ( serverListIT = serverList.begin(); serverListIT != serverList.end(); ++serverListIT )
{
if( !CFG->hasGroup( (*serverListIT) ) ) continue;
@@ -474,12 +474,12 @@ void resource::ReadServers( void )
///////////////////////////////////////
void resource::WriteServers( void )
{
- QString buffer;
+ TQString buffer;
CFG->setGroup( "General" );
if( servers.isEmpty() )
{
- CFG->writeEntry( "Servers", QString( "" ) );
+ CFG->writeEntry( "Servers", TQString( "" ) );
return;
}
for ( serversIT = servers.begin(); serversIT != servers.end(); ++serversIT )
@@ -507,9 +507,9 @@ void resource::WriteServers( void )
// resource::themeDir
//
///////////////////////////////////////
-QString resource::themeDir( void )
+TQString resource::themeDir( void )
{
- return QString( GlobalDataDir + "themes/" );
+ return TQString( GlobalDataDir + "themes/" );
}
///////////////////////////////////////
//
@@ -518,7 +518,7 @@ QString resource::themeDir( void )
///////////////////////////////////////
void resource::readThemeDir( void )
{
- QDir themesDir;
+ TQDir themesDir;
Boards.clear();
Chessmen.clear();
@@ -527,7 +527,7 @@ void resource::readThemeDir( void )
themesDir.setNameFilter( "KB*" );
themesDir = GlobalDataDir + "themes/";
Boards += themesDir.entryList();
- themesDir = QDir::homeDirPath() + "/.knights/";
+ themesDir = TQDir::homeDirPath() + "/.knights/";
if( themesDir.exists() ) Boards += themesDir.entryList();
themesDir = "../media/";
if( themesDir.exists() ) Boards += themesDir.entryList();
@@ -536,7 +536,7 @@ void resource::readThemeDir( void )
themesDir.setNameFilter( "KC*" );
themesDir = GlobalDataDir + "themes/";
Chessmen += themesDir.entryList();
- themesDir = QDir::homeDirPath() + "/.knights/";
+ themesDir = TQDir::homeDirPath() + "/.knights/";
if( themesDir.exists() ) Chessmen += themesDir.entryList();
themesDir = "../media/";
if( themesDir.exists() ) Chessmen += themesDir.entryList();
@@ -545,7 +545,7 @@ void resource::readThemeDir( void )
themesDir.setNameFilter( "KS*" );
themesDir = GlobalDataDir + "themes/";
Sounds += themesDir.entryList();
- themesDir = QDir::homeDirPath() + "/.knights/";
+ themesDir = TQDir::homeDirPath() + "/.knights/";
if( themesDir.exists() ) Sounds += themesDir.entryList();
themesDir = "../media/";
if( themesDir.exists() ) Sounds += themesDir.entryList();
@@ -556,9 +556,9 @@ void resource::readThemeDir( void )
// resource::getBoard
//
///////////////////////////////////////
-QString resource::getBoard( int Index )
+TQString resource::getBoard( int Index )
{
- if( Index > (signed)Boards.count() ) return QString::null;
+ if( Index > (signed)Boards.count() ) return TQString();
if( Index == -1 ) return CurrentBoard;
return Boards[Index];
}
@@ -567,9 +567,9 @@ QString resource::getBoard( int Index )
// resource::getChessmen
//
///////////////////////////////////////
-QString resource::getChessmen( int Index )
+TQString resource::getChessmen( int Index )
{
- if( Index > (signed)Chessmen.count() ) return QString::null;
+ if( Index > (signed)Chessmen.count() ) return TQString();
if( Index == -1 ) return CurrentChessmen;
return Chessmen[Index];
}
@@ -578,9 +578,9 @@ QString resource::getChessmen( int Index )
// resource::getSounds
//
///////////////////////////////////////
-QString resource::getSounds( int Index )
+TQString resource::getSounds( int Index )
{
- if( Index > (signed)Sounds.count() ) return QString::null;
+ if( Index > (signed)Sounds.count() ) return TQString();
if( Index == -1 ) return CurrentAudio;
return Sounds[Index];
}
@@ -591,7 +591,7 @@ QString resource::getSounds( int Index )
///////////////////////////////////////
void resource::setAudio( int AudioIndex )
{
- QString audioURL;
+ TQString audioURL;
/* Make sure the Indexes are valid */
if( AudioIndex > (signed)Sounds.count() )
@@ -606,9 +606,9 @@ void resource::setAudio( int AudioIndex )
{
return;
}
- QApplication::setOverrideCursor( CURSOR_Thinking );
+ TQApplication::setOverrideCursor( CURSOR_Thinking );
Audio->setTheme( audioURL );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return;
}
///////////////////////////////////////
@@ -619,10 +619,10 @@ void resource::setAudio( int AudioIndex )
void resource::setTheme( int BoardIndex, int ChessmenIndex )
{
static bool firstTime( TRUE );
- QString boardURL;
- QString chessmenURL;
- QString boardConf;
- QString chessmenConf;
+ TQString boardURL;
+ TQString chessmenURL;
+ TQString boardConf;
+ TQString chessmenConf;
KSimpleConfig *boardConfig;
KSimpleConfig *chessmenConfig;
@@ -639,7 +639,7 @@ void resource::setTheme( int BoardIndex, int ChessmenIndex )
}
/* Set the Cursor */
- QApplication::setOverrideCursor( CURSOR_Thinking );
+ TQApplication::setOverrideCursor( CURSOR_Thinking );
/* Change the theme */
if( BoardIndex != -1 )
@@ -652,7 +652,7 @@ void resource::setTheme( int BoardIndex, int ChessmenIndex )
if( ( boardURL.isEmpty() ) || ( chessmenURL.isEmpty() ) )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return;
}
@@ -723,7 +723,7 @@ void resource::setTheme( int BoardIndex, int ChessmenIndex )
/* Cleanup */
pixCache->clear();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
pixCache->resize( ThemeSize );
firstTime = FALSE;
return;
@@ -733,9 +733,9 @@ void resource::setTheme( int BoardIndex, int ChessmenIndex )
// resource::loadThemeItem
//
///////////////////////////////////////
-void resource::loadThemeItem( const QString &URL, QImage &Image )
+void resource::loadThemeItem( const TQString &URL, TQImage &Image )
{
- QString tempFile;
+ TQString tempFile;
if( KIO::NetAccess::download( URL, tempFile ) )
{
@@ -755,7 +755,7 @@ void resource::loadThemeItem( const QString &URL, QImage &Image )
void resource::resizeTheme( const int &size )
{
/* Set the Cursor */
- QApplication::setOverrideCursor( CURSOR_Thinking );
+ TQApplication::setOverrideCursor( CURSOR_Thinking );
ThemeSize = size;
if( ThemeSize > IMAGE_MAX )
@@ -765,14 +765,14 @@ void resource::resizeTheme( const int &size )
pixCache->resize( ThemeSize );
ConfigWrite();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
///////////////////////////////////////
//
// resource::LoadIcon
//
///////////////////////////////////////
-QPixmap resource::LoadIcon( QString Name, int Group )
+TQPixmap resource::LoadIcon( TQString Name, int Group )
{
return Icons->loadIcon( Name, (KIcon::Group)Group );
}
@@ -782,11 +782,11 @@ QPixmap resource::LoadIcon( QString Name, int Group )
//
///////////////////////////////////////
// Borrowed from KMail
-QString resource::encryptStr(const QString &aStr) const
+TQString resource::encryptStr(const TQString &aStr) const
{
unsigned int i, val;
unsigned int len = aStr.length();
- QCString result;
+ TQCString result;
result.resize(len+1);
for (i=0; i<len; i++)
{
@@ -804,7 +804,7 @@ QString resource::encryptStr(const QString &aStr) const
//
///////////////////////////////////////
// Borrowed from KMail
-QString resource::decryptStr(const QString &aStr) const
+TQString resource::decryptStr(const TQString &aStr) const
{
return encryptStr(aStr);
}
@@ -824,24 +824,24 @@ void resource::play( const char snd )
///////////////////////////////////////
void resource::ReadColors( void )
{
- QColor tmp;
+ TQColor tmp;
- COLOR_White = QColor( 255, 255, 255 );
- COLOR_Black = QColor( 0, 0, 0 );
+ COLOR_White = TQColor( 255, 255, 255 );
+ COLOR_Black = TQColor( 0, 0, 0 );
CFG->setGroup( "Colors" );
COLOR_Background = CFG->readColorEntry( "BackgroundColor", &COLOR_White );
COLOR_GraphBackground = CFG->readColorEntry( "GraphBackground", &COLOR_Background );
COLOR_Standard = CFG->readColorEntry( "StandardColor", &COLOR_Black );
COLOR_GraphForeground = CFG->readColorEntry( "GraphForeground", &COLOR_Standard );
- tmp = QColor( 128, 0, 128 ); // Purple
+ tmp = TQColor( 128, 0, 128 ); // Purple
COLOR_PrivateTell = CFG->readColorEntry( "PrivateColor", &tmp );
- tmp = QColor( 0, 0, 160 ); // Blue
+ tmp = TQColor( 0, 0, 160 ); // Blue
COLOR_ChannelTell = CFG->readColorEntry( "ChannelColor", &tmp );
- tmp = QColor( 160, 0, 0 ); // Red
+ tmp = TQColor( 160, 0, 0 ); // Red
COLOR_Shout = CFG->readColorEntry( "ShoutColor", &tmp );
- tmp = QColor( 0, 160, 0 ); // Green
+ tmp = TQColor( 0, 160, 0 ); // Green
COLOR_Whisper = CFG->readColorEntry( "WhisperColor", &tmp );
- tmp = QColor( 0, 128, 128 ); // Cyan
+ tmp = TQColor( 0, 128, 128 ); // Cyan
COLOR_Notification = CFG->readColorEntry( "NotificationColor", &tmp );
}
///////////////////////////////////////
@@ -869,7 +869,7 @@ void resource::WriteColors( void )
///////////////////////////////////////
void resource::ReadFonts( void )
{
- QFont Fixed = KGlobalSettings::fixedFont();
+ TQFont Fixed = KGlobalSettings::fixedFont();
CFG->setGroup( "Fonts" );
FONT_Standard = CFG->readFontEntry( "StandardFont", &Fixed );
FONT_PrivateTell = CFG->readFontEntry( "PrivateFont", &Fixed );
@@ -901,8 +901,8 @@ void resource::WriteFonts( void )
void resource::buildStyle( void )
{
/* Configure SSI_Default */
- SSI_Default->setDisplayMode( QStyleSheetItem::DisplayListItem );
- SSI_Default->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_Default->setDisplayMode( TQStyleSheetItem::DisplayListItem );
+ SSI_Default->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpacePre );
SSI_Default->setFontFamily( FONT_Standard.family() );
SSI_Default->setFontSize( FONT_Standard.pointSize() );
SSI_Default->setFontUnderline( FONT_Standard.underline() );
@@ -910,8 +910,8 @@ void resource::buildStyle( void )
SSI_Default->setFontWeight( FONT_Standard.weight() );
SSI_Default->setColor( COLOR_Standard );
/* Configure SSI_PrivateTell */
- SSI_PrivateTell->setDisplayMode( QStyleSheetItem::DisplayListItem );
- SSI_PrivateTell->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_PrivateTell->setDisplayMode( TQStyleSheetItem::DisplayListItem );
+ SSI_PrivateTell->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpacePre );
SSI_PrivateTell->setFontFamily( FONT_PrivateTell.family() );
SSI_PrivateTell->setFontSize( FONT_PrivateTell.pointSize() );
SSI_PrivateTell->setFontUnderline( FONT_PrivateTell.underline() );
@@ -919,8 +919,8 @@ void resource::buildStyle( void )
SSI_PrivateTell->setFontWeight( FONT_PrivateTell.weight() );
SSI_PrivateTell->setColor( COLOR_PrivateTell );
/* Configure SSI_ChannelTell */
- SSI_ChannelTell->setDisplayMode( QStyleSheetItem::DisplayListItem );
- SSI_ChannelTell->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_ChannelTell->setDisplayMode( TQStyleSheetItem::DisplayListItem );
+ SSI_ChannelTell->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpacePre );
SSI_ChannelTell->setFontFamily( FONT_ChannelTell.family() );
SSI_ChannelTell->setFontSize( FONT_ChannelTell.pointSize() );
SSI_ChannelTell->setFontUnderline( FONT_ChannelTell.underline() );
@@ -928,8 +928,8 @@ void resource::buildStyle( void )
SSI_ChannelTell->setFontWeight( FONT_ChannelTell.weight() );
SSI_ChannelTell->setColor( COLOR_ChannelTell );
/* Configure SSI_Shout */
- SSI_Shout->setDisplayMode( QStyleSheetItem::DisplayListItem );
- SSI_Shout->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_Shout->setDisplayMode( TQStyleSheetItem::DisplayListItem );
+ SSI_Shout->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpacePre );
SSI_Shout->setFontFamily( FONT_Shout.family() );
SSI_Shout->setFontSize( FONT_Shout.pointSize() );
SSI_Shout->setFontUnderline( FONT_Shout.underline() );
@@ -937,8 +937,8 @@ void resource::buildStyle( void )
SSI_Shout->setFontWeight( FONT_Shout.weight() );
SSI_Shout->setColor( COLOR_Shout );
/* Configure SSI_Whisper */
- SSI_Whisper->setDisplayMode( QStyleSheetItem::DisplayListItem );
- SSI_Whisper->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_Whisper->setDisplayMode( TQStyleSheetItem::DisplayListItem );
+ SSI_Whisper->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpacePre );
SSI_Whisper->setFontFamily( FONT_Whisper.family() );
SSI_Whisper->setFontSize( FONT_Whisper.pointSize() );
SSI_Whisper->setFontUnderline( FONT_Whisper.underline() );
@@ -946,8 +946,8 @@ void resource::buildStyle( void )
SSI_Whisper->setFontWeight( FONT_Whisper.weight() );
SSI_Whisper->setColor( COLOR_Whisper );
/* Configure SSI_Notification */
- SSI_Notification->setDisplayMode( QStyleSheetItem::DisplayListItem );
- SSI_Notification->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_Notification->setDisplayMode( TQStyleSheetItem::DisplayListItem );
+ SSI_Notification->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpacePre );
SSI_Notification->setFontFamily( FONT_Notification.family() );
SSI_Notification->setFontSize( FONT_Notification.pointSize() );
SSI_Notification->setFontUnderline( FONT_Notification.underline() );
@@ -960,20 +960,20 @@ void resource::buildStyle( void )
// resource::themeURL
//
///////////////////////////////////////
-QString resource::themeURL( const QString theme )
+TQString resource::themeURL( const TQString theme )
{
- QString fullURL;
+ TQString fullURL;
fullURL = "tar:" + GlobalDataDir + "themes/" + theme;
if( !KIO::NetAccess::exists( fullURL ) )
{
- fullURL = "tar:" + QDir::currentDirPath() + "../media/" + theme;
+ fullURL = "tar:" + TQDir::currentDirPath() + "../media/" + theme;
if( !KIO::NetAccess::exists( fullURL ) )
{
- fullURL = "tar:" + QDir::homeDirPath() + "/.knights/" + theme;
+ fullURL = "tar:" + TQDir::homeDirPath() + "/.knights/" + theme;
if( !KIO::NetAccess::exists( fullURL ) )
{
kdWarning() << "The theme " << theme << " does not exist in any valid path." << endl;
- return QString::null;
+ return TQString();
}
}
}
@@ -986,28 +986,28 @@ QString resource::themeURL( const QString theme )
// resource::loadSCIDImage
//
///////////////////////////////////////
-QPixmap resource::loadSCIDImage( const QString &name )
+TQPixmap resource::loadSCIDImage( const TQString &name )
{
const int BufferMax = 120;
const int ArrayMax = 21600;
const int SkipSize = 7200;
- QPixmap newPix;
- QString searchName = '\"' + name + '\"';
- QByteArray base64Data( ArrayMax );
- QByteArray rawData( ArrayMax );
+ TQPixmap newPix;
+ TQString searchName = '\"' + name + '\"';
+ TQByteArray base64Data( ArrayMax );
+ TQByteArray rawData( ArrayMax );
char *array = base64Data.data();
char buffer[BufferMax];
char photo[12];
unsigned int index = 0;
unsigned int buffSize = 0;
- QString source = locate( "appdata", "players.img" );
+ TQString source = locate( "appdata", "players.img" );
if( source.isNull() )
source = SCID_Image_Path;
strcpy( photo, "photo" );
- QFile file( source );
+ TQFile file( source );
if( file.open( IO_ReadOnly ) )
{
diff --git a/knights/resource.h b/knights/resource.h
index 0892988..3704ca6 100644
--- a/knights/resource.h
+++ b/knights/resource.h
@@ -29,13 +29,13 @@
#include <kcursor.h>
#include <klistview.h>
#include <kcmdlineargs.h>
-/* Qt */
-#include <qstylesheet.h>
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
-#include <qimage.h>
+/* TQt */
+#include <tqstylesheet.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
/* Local */
#include "definitions.h"
@@ -46,11 +46,11 @@ class Accel;
typedef struct engineResource
{
- QListViewItem *Item;
- QString Name;
- QString Filename;
- QString Arguments;
- QString LogFile;
+ TQListViewItem *Item;
+ TQString Name;
+ TQString Filename;
+ TQString Arguments;
+ TQString LogFile;
int Protocol;
int Wins;
int Losses;
@@ -60,20 +60,20 @@ typedef struct engineResource
typedef struct serverResource
{
- QListViewItem *Item;
- QString Name;
- QString URL;
- QString UserName;
- QString Password;
- QString LogFile;
- QString Timeseal;
+ TQListViewItem *Item;
+ TQString Name;
+ TQString URL;
+ TQString UserName;
+ TQString Password;
+ TQString LogFile;
+ TQString Timeseal;
bool StorePass;
int Port;
int CurrentRef;
};
-typedef QValueList<engineResource> engineList;
-typedef QValueList<serverResource> serverList;
+typedef TQValueList<engineResource> engineList;
+typedef TQValueList<serverResource> serverList;
class resource
{
@@ -81,10 +81,10 @@ class resource
/* The current Theme */
int ThemeSize;
bool ThemeBorder;
- QStyleSheet *ConsoleStyle;
- QString CurrentBoard;
- QString CurrentChessmen;
- QString CurrentAudio;
+ TQStyleSheet *ConsoleStyle;
+ TQString CurrentBoard;
+ TQString CurrentChessmen;
+ TQString CurrentAudio;
ThemeHeader boardHeader;
ThemeHeader chessmenHeader;
ThemeHeader audioHeader;
@@ -93,8 +93,8 @@ class resource
Accel *myAccel;
/* General Settings */
- QString Local_Player;
- QString Local_Email_Address;
+ TQString Local_Player;
+ TQString Local_Email_Address;
int Config_Version;
bool Accepted_License;
int OPTION_On_Init;
@@ -117,10 +117,10 @@ class resource
bool OPTION_Pause_On_Minimize;
bool OPTION_Reuse_PGN;
bool OPTION_3DBoard;
- QString PGN_Filename;
- QString Email_Command_Line;
- QString Email_Address;
- QString SCID_Image_Path;
+ TQString PGN_Filename;
+ TQString Email_Command_Line;
+ TQString Email_Address;
+ TQString SCID_Image_Path;
int Widget_Height;
/* ICS Options */
int Seek_Timer;
@@ -132,32 +132,32 @@ class resource
bool OPTION_Tell;
bool OPTION_Seek;
/* Notification Prompts */
- QString PromptForSaving;
+ TQString PromptForSaving;
/* Colors */
- QColor COLOR_White;
- QColor COLOR_Black;
- QColor COLOR_Background;
- QColor COLOR_Standard;
- QColor COLOR_PrivateTell;
- QColor COLOR_ChannelTell;
- QColor COLOR_Shout;
- QColor COLOR_Whisper;
- QColor COLOR_Notification;
- QColor COLOR_Notation;
- QColor COLOR_Notation_Shadow;
- QColor COLOR_GraphBackground;
- QColor COLOR_GraphForeground;
+ TQColor COLOR_White;
+ TQColor COLOR_Black;
+ TQColor COLOR_Background;
+ TQColor COLOR_Standard;
+ TQColor COLOR_PrivateTell;
+ TQColor COLOR_ChannelTell;
+ TQColor COLOR_Shout;
+ TQColor COLOR_Whisper;
+ TQColor COLOR_Notification;
+ TQColor COLOR_Notation;
+ TQColor COLOR_Notation_Shadow;
+ TQColor COLOR_GraphBackground;
+ TQColor COLOR_GraphForeground;
/* Fonts */
- QFont FONT_Standard;
- QFont FONT_PrivateTell;
- QFont FONT_ChannelTell;
- QFont FONT_Shout;
- QFont FONT_Whisper;
- QFont FONT_Notification;
+ TQFont FONT_Standard;
+ TQFont FONT_PrivateTell;
+ TQFont FONT_ChannelTell;
+ TQFont FONT_Shout;
+ TQFont FONT_Whisper;
+ TQFont FONT_Notification;
/* Cursors */
- QCursor CURSOR_Standard;
- QCursor CURSOR_Thinking;
- QCursor CURSOR_Text;
+ TQCursor CURSOR_Standard;
+ TQCursor CURSOR_Thinking;
+ TQCursor CURSOR_Text;
/* Chess Engines */
engineList engines;
engineList::Iterator enginesIT;
@@ -178,10 +178,10 @@ class resource
void ConfigWrite( void );
void readThemeDir( void );
- QString getBoard( int Index=-1 );
- QString getChessmen( int Index=-1 );
- QString getSounds( int Index=-1 );
- QString themeDir( void );
+ TQString getBoard( int Index=-1 );
+ TQString getChessmen( int Index=-1 );
+ TQString getSounds( int Index=-1 );
+ TQString themeDir( void );
void setTheme( int BoardIndex=-1, int ChessmenIndex=-1 );
void setAudio( int AudioIndex=-1 );
void resizeTheme( const int &size );
@@ -189,25 +189,25 @@ class resource
/**
Call buildStyle whenever you need to reparse the Resource configuration */
void buildStyle( void );
- QPixmap LoadIcon( QString Name, int Group );
- QPixmap loadSCIDImage( const QString &name );
+ TQPixmap LoadIcon( TQString Name, int Group );
+ TQPixmap loadSCIDImage( const TQString &name );
void play( const char );
private:
- QStyleSheetItem *SSI_Default;
- QStyleSheetItem *SSI_PrivateTell;
- QStyleSheetItem *SSI_ChannelTell;
- QStyleSheetItem *SSI_Shout;
- QStyleSheetItem *SSI_Whisper;
- QStyleSheetItem *SSI_Notification;
+ TQStyleSheetItem *SSI_Default;
+ TQStyleSheetItem *SSI_PrivateTell;
+ TQStyleSheetItem *SSI_ChannelTell;
+ TQStyleSheetItem *SSI_Shout;
+ TQStyleSheetItem *SSI_Whisper;
+ TQStyleSheetItem *SSI_Notification;
- QString GlobalDataDir;
- QString LocalDataDir;
+ TQString GlobalDataDir;
+ TQString LocalDataDir;
- QStringList Boards;
- QStringList Chessmen;
- QStringList Sounds;
+ TQStringList Boards;
+ TQStringList Chessmen;
+ TQStringList Sounds;
KIconLoader *Icons;
audio *Audio;
@@ -231,10 +231,10 @@ class resource
Very primitive en/de-cryption so that the password is not
readable in the config file. But still very easy breakable.
*/
- QString encryptStr( const QString& inStr ) const;
- QString decryptStr( const QString& inStr ) const;
- QString themeURL( const QString );
- void loadThemeItem( const QString& URL, QImage& Image );
+ TQString encryptStr( const TQString& inStr ) const;
+ TQString decryptStr( const TQString& inStr ) const;
+ TQString themeURL( const TQString );
+ void loadThemeItem( const TQString& URL, TQImage& Image );
};
#endif
diff --git a/knights/setpageaudio.cpp b/knights/setpageaudio.cpp
index 3c51b12..9daed0c 100644
--- a/knights/setpageaudio.cpp
+++ b/knights/setpageaudio.cpp
@@ -15,47 +15,47 @@
* *
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include "setpageaudio.moc"
-setPageAudio::setPageAudio(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+setPageAudio::setPageAudio(TQWidget *tqparent, resource *Rsrc ) : TQVBoxLayout(tqparent)
{
- Parent = parent;
+ Parent = tqparent;
Resource = Rsrc;
NewSounds = 0;
changeTheme = FALSE;
- BUTTON_enableAudio = new QCheckBox( i18n( "Enable Audio" ), parent );
+ BUTTON_enableAudio = new TQCheckBox( i18n( "Enable Audio" ), tqparent );
BUTTON_enableAudio->setChecked( Resource->OPTION_Audio );
addWidget( BUTTON_enableAudio );
- connect( BUTTON_enableAudio, SIGNAL( toggled(bool) ),
- this, SLOT( slot_enableAudio(bool) ) );
+ connect( BUTTON_enableAudio, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slot_enableAudio(bool) ) );
- GROUP_Theme = new QGroupBox( 1,
+ GROUP_Theme = new TQGroupBox( 1,
Qt::Vertical,
i18n( "Audio Themes" ),
- parent );
+ tqparent );
addWidget( GROUP_Theme );
Current_Theme = new KComboBox ( GROUP_Theme );
buildThemeList();
- connect( Current_Theme, SIGNAL( activated(int) ),
- this, SLOT( slot_currentTheme(int) ) );
+ connect( Current_Theme, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( slot_currentTheme(int) ) );
- BOX_Main = new QHBox( parent );
+ BOX_Main = new TQHBox( tqparent );
addWidget( BOX_Main );
- GROUP_Volume = new QGroupBox( 3, Qt::Vertical, i18n( "Volume" ), BOX_Main );
- Vol_Max = new QLabel( i18n( "Maximum" ), GROUP_Volume );
- Current_Volume = new QSlider ( 0, 100, 10, Resource->Audio_Volume, QSlider::Vertical, GROUP_Volume );
- connect( Current_Volume, SIGNAL( valueChanged(int) ), this, SLOT( slot_currentVolume(int) ) );
- Current_Volume->setTickmarks( QSlider::Right );
- Vol_Min = new QLabel( i18n( "Minimum" ), GROUP_Volume );
+ GROUP_Volume = new TQGroupBox( 3, Qt::Vertical, i18n( "Volume" ), BOX_Main );
+ Vol_Max = new TQLabel( i18n( "Maximum" ), GROUP_Volume );
+ Current_Volume = new TQSlider ( 0, 100, 10, Resource->Audio_Volume, Qt::Vertical, GROUP_Volume );
+ connect( Current_Volume, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slot_currentVolume(int) ) );
+ Current_Volume->setTickmarks( TQSlider::Right );
+ Vol_Min = new TQLabel( i18n( "Minimum" ), GROUP_Volume );
- BOX_Options = new QVBox( BOX_Main );
- BUTTON_AudioCurrentOnly = new QCheckBox( i18n( "For Current Match Only" ), BOX_Options );
+ BOX_Options = new TQVBox( BOX_Main );
+ BUTTON_AudioCurrentOnly = new TQCheckBox( i18n( "For Current Match Only" ), BOX_Options );
BUTTON_AudioCurrentOnly->setChecked( Resource->OPTION_Audio_Current_Only );
- connect( BUTTON_AudioCurrentOnly, SIGNAL( toggled(bool) ),
- this, SLOT( slot_AudioCurrentOnly(bool) ) );
+ connect( BUTTON_AudioCurrentOnly, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slot_AudioCurrentOnly(bool) ) );
}
setPageAudio::~setPageAudio()
{
@@ -108,7 +108,7 @@ void setPageAudio::slot_AudioCurrentOnly( bool state )
///////////////////////////////////////
void setPageAudio::buildThemeList( void )
{
- QString buffer;
+ TQString buffer;
int tmp(0);
Current_Theme->clear();
@@ -118,10 +118,10 @@ void setPageAudio::buildThemeList( void )
buffer = Resource->getSounds( tmp );
if( buffer.isEmpty() ) break;
buffer.remove( 0, 2 );
- buffer.replace( QRegExp("_"), " " );
- buffer.replace( QRegExp(".tar"), "" );
- buffer.replace( QRegExp(".gz"), "" );
- buffer.replace( QRegExp(".bz2"), "" );
+ buffer.tqreplace( TQRegExp("_"), " " );
+ buffer.tqreplace( TQRegExp(".tar"), "" );
+ buffer.tqreplace( TQRegExp(".gz"), "" );
+ buffer.tqreplace( TQRegExp(".bz2"), "" );
Current_Theme->insertItem( buffer, tmp );
if( Resource->getSounds() == Resource->getSounds( tmp ) )
{
diff --git a/knights/setpageaudio.h b/knights/setpageaudio.h
index 5d9c58b..e73da64 100644
--- a/knights/setpageaudio.h
+++ b/knights/setpageaudio.h
@@ -20,25 +20,26 @@
#include <kcombobox.h>
#include <klineedit.h>
-#include <qwidget.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qslider.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqslider.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
#include "resource.h"
/**
*@author Troy Corbin Jr.
*/
-class setPageAudio : public QVBoxLayout
+class setPageAudio : public TQVBoxLayout
{
Q_OBJECT
+ TQ_OBJECT
public:
- setPageAudio(QWidget *parent=0, resource *Rsrc=0);
+ setPageAudio(TQWidget *tqparent=0, resource *Rsrc=0);
~setPageAudio();
void buildThemeList( void );
int NewSounds;
@@ -51,19 +52,19 @@ class setPageAudio : public QVBoxLayout
void slot_currentVolume( int );
void slot_AudioCurrentOnly( bool );
private:
- QWidget *Parent;
+ TQWidget *Parent;
resource *Resource;
- QCheckBox *BUTTON_enableAudio;
- QGroupBox *GROUP_Theme;
+ TQCheckBox *BUTTON_enableAudio;
+ TQGroupBox *GROUP_Theme;
KComboBox *Current_Theme;
- QHBox *BOX_Main;
- QGroupBox *GROUP_Volume;
- QLabel *Vol_Min;
- QSlider *Current_Volume;
- QLabel *Vol_Max;
- QVBox *BOX_Options;
- QCheckBox *BUTTON_AudioCurrentOnly;
+ TQHBox *BOX_Main;
+ TQGroupBox *GROUP_Volume;
+ TQLabel *Vol_Min;
+ TQSlider *Current_Volume;
+ TQLabel *Vol_Max;
+ TQVBox *BOX_Options;
+ TQCheckBox *BUTTON_AudioCurrentOnly;
};
#endif
diff --git a/knights/setpagedisplay.cpp b/knights/setpagedisplay.cpp
index 1cf82d9..aedeb91 100644
--- a/knights/setpagedisplay.cpp
+++ b/knights/setpagedisplay.cpp
@@ -20,15 +20,15 @@
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kfontdialog.h>
-#include <qstyle.h>
-#include <qregexp.h>
+#include <tqstyle.h>
+#include <tqregexp.h>
#include <kiconloader.h>
#include <kfiledialog.h>
#include <kio/netaccess.h>
-setPageDisplay::setPageDisplay(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+setPageDisplay::setPageDisplay(TQWidget *tqparent, resource *Rsrc ) : TQVBoxLayout(tqparent)
{
- QStyle& Style = QApplication::style();
+ TQStyle& Style = TQApplication::tqstyle();
Resource = Rsrc;
margin = Style.defaultFrameWidth();
NewBoards = 0;
@@ -37,7 +37,7 @@ setPageDisplay::setPageDisplay(QWidget *parent, resource *Rsrc ) : QVBoxLayout(
refreshBoard = FALSE;
rebuildConsole = FALSE;
- TabParent = new QTabWidget( parent, "setPageDisplay" );
+ TabParent = new TQTabWidget( tqparent, "setPageDisplay" );
initTab1();
initTab2();
addWidget( TabParent );
@@ -66,87 +66,87 @@ setPageDisplay::~setPageDisplay()
///////////////////////////////////////
void setPageDisplay::initTab1( void )
{
- Tab1 = new QVBox( TabParent );
+ Tab1 = new TQVBox( TabParent );
Tab1->setMargin( margin );
- BOX_Themes = new QHBox( Tab1 );
- GROUP_Boards = new QGroupBox( 1,
+ BOX_Themes = new TQHBox( Tab1 );
+ GROUP_Boards = new TQGroupBox( 1,
Qt::Vertical,
i18n( "Board Themes" ),
BOX_Themes );
Current_Boards = new KComboBox ( GROUP_Boards );
- GROUP_Chessmen = new QGroupBox( 1,
+ GROUP_Chessmen = new TQGroupBox( 1,
Qt::Vertical,
i18n( "Chessman Themes" ),
BOX_Themes );
Current_Chessmen = new KComboBox ( GROUP_Chessmen );
- GROUP_Theme_Size = new QGroupBox( 3,
+ GROUP_Theme_Size = new TQGroupBox( 3,
Qt::Horizontal,
i18n( "Theme Size" ),
Tab1 );
- Size_Min = new QLabel( i18n( "Small" ), GROUP_Theme_Size );
- Current_Theme_Size = new QSlider ( 0,
+ Size_Min = new TQLabel( i18n( "Small" ), GROUP_Theme_Size );
+ Current_Theme_Size = new TQSlider ( 0,
14,
2,
( Resource->ThemeSize - IMAGE_MIN ) / 8 ,
- QSlider::Horizontal,
+ Qt::Horizontal,
GROUP_Theme_Size );
- Size_Max = new QLabel( i18n( "Large" ), GROUP_Theme_Size );
+ Size_Max = new TQLabel( i18n( "Large" ), GROUP_Theme_Size );
- GROUP_SCID_Images = new QGroupBox( 2, Qt::Horizontal, i18n("Player Images File:"), Tab1 );
+ GROUP_SCID_Images = new TQGroupBox( 2, Qt::Horizontal, i18n("Player Images File:"), Tab1 );
EDIT_SCID_Images = new KLineEdit( GROUP_SCID_Images );
EDIT_SCID_Images->setText( Resource->SCID_Image_Path );
- connect( EDIT_SCID_Images, SIGNAL( textChanged(const QString&) ), this, SLOT( slot_SCID_Images(const QString&) ) );
- BUTTON_SCID_Images = new QPushButton( GROUP_SCID_Images );
- BUTTON_SCID_Images->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
- connect( BUTTON_SCID_Images, SIGNAL( clicked() ), this, SLOT( slot_SCID_Images_Button() ) );
+ connect( EDIT_SCID_Images, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slot_SCID_Images(const TQString&) ) );
+ BUTTON_SCID_Images = new TQPushButton( GROUP_SCID_Images );
+ BUTTON_SCID_Images->setPixmap( Resource->LoadIcon( TQString( "fileopen" ), KIcon::Toolbar ) );
+ connect( BUTTON_SCID_Images, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_SCID_Images_Button() ) );
- GROUP_General_Graphics = new QGroupBox( 4,
+ GROUP_General_Graphics = new TQGroupBox( 4,
Qt::Vertical,
i18n( "Other Display Options" ),
Tab1 );
- Board_Orientation = new QCheckBox( i18n( "Reverse Board Orientation" ), GROUP_General_Graphics );
+ Board_Orientation = new TQCheckBox( i18n( "Reverse Board Qt::Orientation" ), GROUP_General_Graphics );
Board_Orientation->setChecked( Resource->OPTION_Board_Orientation );
- connect( Board_Orientation, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Board_Orientation(bool) ) );
+ connect( Board_Orientation, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Board_Orientation(bool) ) );
- Show_Splashscreen = new QCheckBox( i18n( "Display Startup Logo" ), GROUP_General_Graphics );
+ Show_Splashscreen = new TQCheckBox( i18n( "Display Startup Logo" ), GROUP_General_Graphics );
Show_Splashscreen->setChecked( Resource->OPTION_Show_Splash );
- connect( Show_Splashscreen, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Splashscreen(bool) ) );
+ connect( Show_Splashscreen, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Splashscreen(bool) ) );
- Auto_Preview = new QCheckBox( i18n( "Automatic Preview" ), GROUP_General_Graphics );
+ Auto_Preview = new TQCheckBox( i18n( "Automatic Preview" ), GROUP_General_Graphics );
Auto_Preview->setChecked( Resource->OPTION_Auto_Preview );
- connect( Auto_Preview, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Auto_Preview(bool) ) );
+ connect( Auto_Preview, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Auto_Preview(bool) ) );
- Show_Last_Move = new QCheckBox( i18n( "Show Last Move" ), GROUP_General_Graphics );
+ Show_Last_Move = new TQCheckBox( i18n( "Show Last Move" ), GROUP_General_Graphics );
Show_Last_Move->setChecked( Resource->OPTION_Show_Last_Move );
- connect( Show_Last_Move, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Show_Last_Move(bool) ) );
+ connect( Show_Last_Move, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Show_Last_Move(bool) ) );
- Animate_Move = new QCheckBox( i18n( "Animate Moves" ), GROUP_General_Graphics );
+ Animate_Move = new TQCheckBox( i18n( "Animate Moves" ), GROUP_General_Graphics );
Animate_Move->setChecked( Resource->OPTION_Animate_Moves );
- connect( Animate_Move, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Animate_Move(bool) ) );
+ connect( Animate_Move, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Animate_Move(bool) ) );
- Show_Coord = new QCheckBox( i18n( "Show Coordinates" ), GROUP_General_Graphics );
+ Show_Coord = new TQCheckBox( i18n( "Show Coordinates" ), GROUP_General_Graphics );
Show_Coord->setChecked( Resource->OPTION_Show_Coord );
- connect( Show_Coord, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Show_Coord(bool) ) );
+ connect( Show_Coord, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Show_Coord(bool) ) );
- Current_Theme_Size->setTickmarks( QSlider::Below );
+ Current_Theme_Size->setTickmarks( TQSlider::Below );
Current_Boards->setEditable( FALSE );
Current_Chessmen->setEditable( FALSE );
buildThemeList();
- connect( Current_Boards, SIGNAL( activated(int) ),
- this, SLOT( slotCurrent_Boards(int) ) );
- connect( Current_Chessmen, SIGNAL( activated(int) ),
- this, SLOT( slotCurrent_Chessmen(int) ) );
- connect( Current_Theme_Size, SIGNAL( valueChanged(int) ),
- this, SLOT( slotCurrent_Theme_Size(int) ) );
+ connect( Current_Boards, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( slotCurrent_Boards(int) ) );
+ connect( Current_Chessmen, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( slotCurrent_Chessmen(int) ) );
+ connect( Current_Theme_Size, TQT_SIGNAL( valueChanged(int) ),
+ this, TQT_SLOT( slotCurrent_Theme_Size(int) ) );
TabParent->addTab( Tab1, i18n("General") );
}
///////////////////////////////////////
@@ -156,77 +156,77 @@ void setPageDisplay::initTab1( void )
///////////////////////////////////////
void setPageDisplay::initTab2( void )
{
- QPixmap ColorsIcon( Resource->LoadIcon( QString("colorize"), KIcon::Toolbar ) );
- Tab2 = new QFrame( TabParent );
+ TQPixmap ColorsIcon( Resource->LoadIcon( TQString("colorize"), KIcon::Toolbar ) );
+ Tab2 = new TQFrame( TabParent );
Tab2->setMargin( margin );
- GRID_Style = new QGridLayout( Tab2, 11, 5, margin );
+ GRID_Style = new TQGridLayout( Tab2, 11, 5, margin );
- Console_Sample = new QTextView( Tab2 );
- Console_Sample->setTextFormat( Qt::RichText );
+ Console_Sample = new TQTextView( Tab2 );
+ Console_Sample->setTextFormat( TQt::RichText );
GRID_Style->addMultiCellWidget( Console_Sample, 5, 10, 1, 1 );
- Default_Button = new QPushButton( i18n("Restore Defaults"), Tab2 );
- connect( Default_Button, SIGNAL( clicked() ), this, SLOT( slot_setDefault() ) );
+ Default_Button = new TQPushButton( i18n("Restore Defaults"), Tab2 );
+ connect( Default_Button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_setDefault() ) );
GRID_Style->addWidget( Default_Button, 11, 1 );
- Fonts_Button_Standard = new QPushButton( i18n("Standard Font..."), Tab2 );
- connect( Fonts_Button_Standard, SIGNAL( clicked() ), this, SLOT( slot_Font_Standard() ) );
+ Fonts_Button_Standard = new TQPushButton( i18n("Standard Font..."), Tab2 );
+ connect( Fonts_Button_Standard, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_Standard() ) );
GRID_Style->addWidget( Fonts_Button_Standard, 5, 3 );
- Colors_Button_Standard = new QPushButton( Tab2 );
+ Colors_Button_Standard = new TQPushButton( Tab2 );
Colors_Button_Standard->setPixmap( ColorsIcon );
- connect( Colors_Button_Standard, SIGNAL( clicked() ), this, SLOT( slot_Color_Standard() ) );
+ connect( Colors_Button_Standard, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Standard() ) );
GRID_Style->addWidget( Colors_Button_Standard, 5, 5 );
- Fonts_Button_PrivateTell = new QPushButton( i18n("Private Font..."), Tab2 );
- connect( Fonts_Button_PrivateTell, SIGNAL( clicked() ), this, SLOT( slot_Font_PrivateTell() ) );
+ Fonts_Button_PrivateTell = new TQPushButton( i18n("Private Font..."), Tab2 );
+ connect( Fonts_Button_PrivateTell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_PrivateTell() ) );
GRID_Style->addWidget( Fonts_Button_PrivateTell, 6, 3 );
- Colors_Button_PrivateTell = new QPushButton( Tab2 );
+ Colors_Button_PrivateTell = new TQPushButton( Tab2 );
Colors_Button_PrivateTell->setPixmap( ColorsIcon );
- connect( Colors_Button_PrivateTell, SIGNAL( clicked() ), this, SLOT( slot_Color_PrivateTell() ) );
+ connect( Colors_Button_PrivateTell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_PrivateTell() ) );
GRID_Style->addWidget( Colors_Button_PrivateTell, 6, 5 );
- Fonts_Button_ChannelTell = new QPushButton( i18n("Channel Font..."), Tab2 );
- connect( Fonts_Button_ChannelTell, SIGNAL( clicked() ), this, SLOT( slot_Font_ChannelTell() ) );
+ Fonts_Button_ChannelTell = new TQPushButton( i18n("Channel Font..."), Tab2 );
+ connect( Fonts_Button_ChannelTell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_ChannelTell() ) );
GRID_Style->addWidget( Fonts_Button_ChannelTell, 7, 3 );
- Colors_Button_ChannelTell = new QPushButton( Tab2 );
+ Colors_Button_ChannelTell = new TQPushButton( Tab2 );
Colors_Button_ChannelTell->setPixmap( ColorsIcon );
- connect( Colors_Button_ChannelTell, SIGNAL( clicked() ), this, SLOT( slot_Color_ChannelTell() ) );
+ connect( Colors_Button_ChannelTell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_ChannelTell() ) );
GRID_Style->addWidget( Colors_Button_ChannelTell, 7, 5 );
- Fonts_Button_Shout = new QPushButton( i18n("Shout Font..."), Tab2 );
- connect( Fonts_Button_Shout, SIGNAL( clicked() ), this, SLOT( slot_Font_Shout() ) );
+ Fonts_Button_Shout = new TQPushButton( i18n("Shout Font..."), Tab2 );
+ connect( Fonts_Button_Shout, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_Shout() ) );
GRID_Style->addWidget( Fonts_Button_Shout, 8, 3 );
- Colors_Button_Shout = new QPushButton( Tab2 );
+ Colors_Button_Shout = new TQPushButton( Tab2 );
Colors_Button_Shout->setPixmap( ColorsIcon );
- connect( Colors_Button_Shout, SIGNAL( clicked() ), this, SLOT( slot_Color_Shout() ) );
+ connect( Colors_Button_Shout, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Shout() ) );
GRID_Style->addWidget( Colors_Button_Shout, 8, 5 );
- Fonts_Button_Whisper = new QPushButton( i18n("Whisper Font..."), Tab2 );
- connect( Fonts_Button_Whisper, SIGNAL( clicked() ), this, SLOT( slot_Font_Whisper() ) );
+ Fonts_Button_Whisper = new TQPushButton( i18n("Whisper Font..."), Tab2 );
+ connect( Fonts_Button_Whisper, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_Whisper() ) );
GRID_Style->addWidget( Fonts_Button_Whisper, 9, 3 );
- Colors_Button_Whisper = new QPushButton( Tab2 );
+ Colors_Button_Whisper = new TQPushButton( Tab2 );
Colors_Button_Whisper->setPixmap( ColorsIcon );
- connect( Colors_Button_Whisper, SIGNAL( clicked() ), this, SLOT( slot_Color_Whisper() ) );
+ connect( Colors_Button_Whisper, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Whisper() ) );
GRID_Style->addWidget( Colors_Button_Whisper, 9, 5 );
- Fonts_Button_Notification = new QPushButton( i18n("Notification Font..."), Tab2 );
- connect( Fonts_Button_Notification, SIGNAL( clicked() ), this, SLOT( slot_Font_Notification() ) );
+ Fonts_Button_Notification = new TQPushButton( i18n("Notification Font..."), Tab2 );
+ connect( Fonts_Button_Notification, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_Notification() ) );
GRID_Style->addWidget( Fonts_Button_Notification, 10, 3 );
- Colors_Button_Notification = new QPushButton( Tab2 );
+ Colors_Button_Notification = new TQPushButton( Tab2 );
Colors_Button_Notification->setPixmap( ColorsIcon );
- connect( Colors_Button_Notification, SIGNAL( clicked() ), this, SLOT( slot_Color_Notification() ) );
+ connect( Colors_Button_Notification, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Notification() ) );
GRID_Style->addWidget( Colors_Button_Notification, 10, 5 );
- Colors_Button_Background = new QPushButton( Tab2 );
+ Colors_Button_Background = new TQPushButton( Tab2 );
Colors_Button_Background->setPixmap( ColorsIcon );
- connect( Colors_Button_Background, SIGNAL( clicked() ), this, SLOT( slot_Color_Background() ) );
+ connect( Colors_Button_Background, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Background() ) );
GRID_Style->addWidget( Colors_Button_Background, 11, 5 );
resetSampleConsole();
@@ -247,11 +247,11 @@ void setPageDisplay::slot_setDefault(void)
Resource->FONT_Notification = KGlobalSettings::fixedFont();
Resource->COLOR_Background = Resource->COLOR_White;
Resource->COLOR_Standard = Resource->COLOR_Black;
- Resource->COLOR_PrivateTell = QColor( 128, 0, 128 ); // Purple
- Resource->COLOR_ChannelTell = QColor( 0, 0, 160 ); // Blue
- Resource->COLOR_Shout = QColor( 160, 0, 0 ); // Red
- Resource->COLOR_Whisper = QColor( 0, 160, 0 ); // Green
- Resource->COLOR_Notification = QColor( 0, 128, 128 ); // Cyan
+ Resource->COLOR_PrivateTell = TQColor( 128, 0, 128 ); // Purple
+ Resource->COLOR_ChannelTell = TQColor( 0, 0, 160 ); // Blue
+ Resource->COLOR_Shout = TQColor( 160, 0, 0 ); // Red
+ Resource->COLOR_Whisper = TQColor( 0, 160, 0 ); // Green
+ Resource->COLOR_Notification = TQColor( 0, 128, 128 ); // Cyan
resetSampleConsole();
rebuildConsole = TRUE;
emit enableApply();
@@ -472,7 +472,7 @@ void setPageDisplay::slotToggle_Show_Coord( bool state )
///////////////////////////////////////
void setPageDisplay::buildThemeList( void )
{
- QString buffer;
+ TQString buffer;
int tmp(0);
Current_Boards->clear();
@@ -483,10 +483,10 @@ void setPageDisplay::buildThemeList( void )
buffer = Resource->getBoard( tmp );
if( buffer.isEmpty() ) break;
buffer.remove( 0, 2 );
- buffer.replace( QRegExp("_"), " " );
- buffer.replace( QRegExp(".tar"), "" );
- buffer.replace( QRegExp(".gz"), "" );
- buffer.replace( QRegExp(".bz2"), "" );
+ buffer.tqreplace( TQRegExp("_"), " " );
+ buffer.tqreplace( TQRegExp(".tar"), "" );
+ buffer.tqreplace( TQRegExp(".gz"), "" );
+ buffer.tqreplace( TQRegExp(".bz2"), "" );
Current_Boards->insertItem( buffer, tmp );
if( Resource->getBoard() == Resource->getBoard( tmp ) )
{
@@ -502,10 +502,10 @@ void setPageDisplay::buildThemeList( void )
buffer = Resource->getChessmen( tmp );
if( buffer.isEmpty() ) break;
buffer.remove( 0, 2 );
- buffer.replace( QRegExp("_"), " " );
- buffer.replace( QRegExp(".tar"), "" );
- buffer.replace( QRegExp(".gz"), "" );
- buffer.replace( QRegExp(".bz2"), "" );
+ buffer.tqreplace( TQRegExp("_"), " " );
+ buffer.tqreplace( TQRegExp(".tar"), "" );
+ buffer.tqreplace( TQRegExp(".gz"), "" );
+ buffer.tqreplace( TQRegExp(".bz2"), "" );
Current_Chessmen->insertItem( buffer, tmp );
if( Resource->getChessmen() == Resource->getChessmen( tmp ) )
{
@@ -523,20 +523,20 @@ void setPageDisplay::buildThemeList( void )
void setPageDisplay::resetSampleConsole( void )
{
Resource->buildStyle();
- Console_Sample->setPaper( QBrush( Resource->COLOR_Background ) );
- Console_Sample->setText( QString( "<K_STD>" + i18n( "Standard" ) + "</K_STD>\n" ) );
- Console_Sample->append( QString( "<K_PVT>" + i18n( "Private Tell" ) + "</K_PVT>\n" ) );
- Console_Sample->append( QString( "<K_CH>" + i18n( "Channel Tell" ) + "</K_CH>\n" ) );
- Console_Sample->append( QString( "<K_SHT>" + i18n( "Shout" ) + "</K_SHT>\n" ) );
- Console_Sample->append( QString( "<K_WSP>" + i18n( "Whisper" ) + "</K_WSP>\n" ) );
- Console_Sample->append( QString( "<K_NOT>" + i18n( "Notification" ) + "</K_NOT>" ) );
+ Console_Sample->setPaper( TQBrush( Resource->COLOR_Background ) );
+ Console_Sample->setText( TQString( "<K_STD>" + i18n( "Standard" ) + "</K_STD>\n" ) );
+ Console_Sample->append( TQString( "<K_PVT>" + i18n( "Private Tell" ) + "</K_PVT>\n" ) );
+ Console_Sample->append( TQString( "<K_CH>" + i18n( "Channel Tell" ) + "</K_CH>\n" ) );
+ Console_Sample->append( TQString( "<K_SHT>" + i18n( "Shout" ) + "</K_SHT>\n" ) );
+ Console_Sample->append( TQString( "<K_WSP>" + i18n( "Whisper" ) + "</K_WSP>\n" ) );
+ Console_Sample->append( TQString( "<K_NOT>" + i18n( "Notification" ) + "</K_NOT>" ) );
}
///////////////////////////////////////
//
// setPageDisplay::slot_SCID_Images
//
///////////////////////////////////////
-void setPageDisplay::slot_SCID_Images( const QString& string )
+void setPageDisplay::slot_SCID_Images( const TQString& string )
{
Resource->SCID_Image_Path = string;
emit enableApply();
@@ -548,10 +548,10 @@ void setPageDisplay::slot_SCID_Images( const QString& string )
///////////////////////////////////////
void setPageDisplay::slot_SCID_Images_Button( void )
{
- QString temp;
+ TQString temp;
- temp = KFileDialog::getOpenFileName( QString::null,
- QString( "*" ),
+ temp = KFileDialog::getOpenFileName( TQString(),
+ TQString( "*" ),
Tab1,
i18n( "Find Player Images File..." ) );
if( temp.isEmpty() ) return;
diff --git a/knights/setpagedisplay.h b/knights/setpagedisplay.h
index d69fc59..7923211 100644
--- a/knights/setpagedisplay.h
+++ b/knights/setpagedisplay.h
@@ -20,29 +20,30 @@
#include <klineedit.h>
#include <kcombobox.h>
-#include <qtextview.h>
-#include <qtabwidget.h>
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
+#include <tqtextview.h>
+#include <tqtabwidget.h>
+#include <tqbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqslider.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
#include "resource.h"
/**
*@author Troy Corbin Jr.
*/
-class setPageDisplay : public QVBoxLayout
+class setPageDisplay : public TQVBoxLayout
{
Q_OBJECT
+ TQ_OBJECT
public:
- setPageDisplay(QWidget *parent=0, resource *Rsrc=0);
+ setPageDisplay(TQWidget *tqparent=0, resource *Rsrc=0);
~setPageDisplay();
void buildThemeList( void );
int NewBoards;
@@ -61,7 +62,7 @@ class setPageDisplay : public QVBoxLayout
void slotToggle_Show_Last_Move( bool );
void slotToggle_Animate_Move( bool );
void slotToggle_Show_Coord( bool );
- void slot_SCID_Images( const QString& );
+ void slot_SCID_Images( const TQString& );
void slot_SCID_Images_Button( void );
void slot_setDefault(void);
@@ -92,48 +93,48 @@ class setPageDisplay : public QVBoxLayout
resource *Resource;
int margin;
- QTabWidget *TabParent;
+ TQTabWidget *TabParent;
/* Tab 1 : General */
- QVBox *Tab1;
- QHBox *BOX_Themes;
- QGroupBox *GROUP_Boards;
+ TQVBox *Tab1;
+ TQHBox *BOX_Themes;
+ TQGroupBox *GROUP_Boards;
KComboBox *Current_Boards;
- QGroupBox *GROUP_Chessmen;
+ TQGroupBox *GROUP_Chessmen;
KComboBox *Current_Chessmen;
- QGroupBox *GROUP_Theme_Size;
- QLabel *Size_Min;
- QSlider *Current_Theme_Size;
- QLabel *Size_Max;
- QGroupBox *GROUP_SCID_Images;
+ TQGroupBox *GROUP_Theme_Size;
+ TQLabel *Size_Min;
+ TQSlider *Current_Theme_Size;
+ TQLabel *Size_Max;
+ TQGroupBox *GROUP_SCID_Images;
KLineEdit *EDIT_SCID_Images;
- QPushButton *BUTTON_SCID_Images;
- QGroupBox *GROUP_General_Graphics;
- QCheckBox *Board_Orientation;
- QCheckBox *Show_Splashscreen;
- QCheckBox *Auto_Preview;
- QCheckBox *Show_Last_Move;
- QCheckBox *Animate_Move;
- QCheckBox *Show_Coord;
+ TQPushButton *BUTTON_SCID_Images;
+ TQGroupBox *GROUP_General_Graphics;
+ TQCheckBox *Board_Orientation;
+ TQCheckBox *Show_Splashscreen;
+ TQCheckBox *Auto_Preview;
+ TQCheckBox *Show_Last_Move;
+ TQCheckBox *Animate_Move;
+ TQCheckBox *Show_Coord;
/* Tab 2 : Console */
- QFrame *Tab2;
- QGridLayout *GRID_Style;
- QTextView *Console_Sample;
- QPushButton *Default_Button;
- QPushButton *Fonts_Button_Standard;
- QPushButton *Fonts_Button_PrivateTell;
- QPushButton *Fonts_Button_ChannelTell;
- QPushButton *Fonts_Button_Shout;
- QPushButton *Fonts_Button_Whisper;
- QPushButton *Fonts_Button_Notification;
- QPushButton *Colors_Button_Standard;
- QPushButton *Colors_Button_PrivateTell;
- QPushButton *Colors_Button_ChannelTell;
- QPushButton *Colors_Button_Shout;
- QPushButton *Colors_Button_Whisper;
- QPushButton *Colors_Button_Notification;
- QPushButton *Colors_Button_Background;
+ TQFrame *Tab2;
+ TQGridLayout *GRID_Style;
+ TQTextView *Console_Sample;
+ TQPushButton *Default_Button;
+ TQPushButton *Fonts_Button_Standard;
+ TQPushButton *Fonts_Button_PrivateTell;
+ TQPushButton *Fonts_Button_ChannelTell;
+ TQPushButton *Fonts_Button_Shout;
+ TQPushButton *Fonts_Button_Whisper;
+ TQPushButton *Fonts_Button_Notification;
+ TQPushButton *Colors_Button_Standard;
+ TQPushButton *Colors_Button_PrivateTell;
+ TQPushButton *Colors_Button_ChannelTell;
+ TQPushButton *Colors_Button_Shout;
+ TQPushButton *Colors_Button_Whisper;
+ TQPushButton *Colors_Button_Notification;
+ TQPushButton *Colors_Button_Background;
};
#endif
diff --git a/knights/setpageengines.cpp b/knights/setpageengines.cpp
index 938d001..afc9cb9 100644
--- a/knights/setpageengines.cpp
+++ b/knights/setpageengines.cpp
@@ -17,45 +17,45 @@
#include "setpageengines.moc"
-setPageEngines::setPageEngines(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+setPageEngines::setPageEngines(TQWidget *tqparent, resource *Rsrc ) : TQVBoxLayout(tqparent)
{
- Parent = parent;
+ Parent = tqparent;
Resource = Rsrc;
Engine_Dialog = NULL;
Engines_ListView = NULL;
- BOX_Current = new QHBox( parent );
+ BOX_Current = new TQHBox( tqparent );
addWidget( BOX_Current );
/* Engines to play White */
- GROUP_White_Current = new QGroupBox( 3,
+ GROUP_White_Current = new TQGroupBox( 3,
Qt::Vertical,
i18n( "Engines to Play White" ),
BOX_Current );
- White_Use_Book = new QCheckBox( i18n( "Enable Book Engine" ), GROUP_White_Current );
+ White_Use_Book = new TQCheckBox( i18n( "Enable Book Engine" ), GROUP_White_Current );
Engines_White = new KComboBox ( GROUP_White_Current );
Engines_White_Book = new KComboBox ( GROUP_White_Current );
Engines_White->setEditable( FALSE );
Engines_White_Book->setEditable( FALSE );
/* Engines to play Black */
- GROUP_Black_Current = new QGroupBox( 3,
+ GROUP_Black_Current = new TQGroupBox( 3,
Qt::Vertical,
i18n( "Engines to Play Black" ),
BOX_Current );
- Black_Use_Book = new QCheckBox( i18n( "Enable Book Engine" ), GROUP_Black_Current );
+ Black_Use_Book = new TQCheckBox( i18n( "Enable Book Engine" ), GROUP_Black_Current );
Engines_Black = new KComboBox ( GROUP_Black_Current );
Engines_Black_Book = new KComboBox ( GROUP_Black_Current );
Engines_Black->setEditable( FALSE );
Engines_Black_Book->setEditable( FALSE );
/* Chess Engines ListView */
- GROUP_Engines = new QGroupBox( 2,
+ GROUP_Engines = new TQGroupBox( 2,
Qt::Horizontal,
i18n( "Chess Engines" ),
- parent );
+ tqparent );
addWidget( GROUP_Engines );
Engines_ListView = new KListView( GROUP_Engines );
@@ -69,24 +69,24 @@ setPageEngines::setPageEngines(QWidget *parent, resource *Rsrc ) : QVBoxLayout(
Engines_ListView->setShowSortIndicator( TRUE );
Engines_ListView->restoreLayout( kapp->config(), "Engines_ListView" );
- Engines_ButtonBox = new KButtonBox( GROUP_Engines, Vertical );
+ Engines_ButtonBox = new KButtonBox( GROUP_Engines,Qt::Vertical );
Engines_Button_Add = Engines_ButtonBox->addButton( i18n( "&Add..." ) );
Engines_Button_Change = Engines_ButtonBox->addButton( i18n( "&Modify..." ) );
Engines_Button_Delete = Engines_ButtonBox->addButton( i18n( "&Delete..." ) );
- Engines_ButtonBox->layout();
+ Engines_ButtonBox->tqlayout();
BuildEngineData();
- connect( Engines_Button_Add, SIGNAL( clicked() ), this, SLOT( slotEngine_Add() ) );
- connect( Engines_Button_Change, SIGNAL( clicked() ), this, SLOT( slotEngine_Modify() ) );
- connect( Engines_Button_Delete, SIGNAL( clicked() ), this, SLOT( slotEngine_Delete() ) );
- connect( Engines_White, SIGNAL( activated(int) ), this, SLOT( slotCurrent_White(int) ) );
- connect( Engines_White_Book, SIGNAL( activated(int) ), this, SLOT( slotCurrent_White_Book(int) ) );
- connect( Engines_Black, SIGNAL( activated(int) ), this, SLOT( slotCurrent_Black(int) ) );
- connect( Engines_Black_Book, SIGNAL( activated(int) ), this, SLOT( slotCurrent_Black_Book(int) ) );
- connect( White_Use_Book, SIGNAL( toggled(bool) ), this, SLOT( slotToggle_White_Book(bool) ) );
- connect( Black_Use_Book, SIGNAL( toggled(bool) ), this, SLOT( slotToggle_Black_Book(bool) ) );
- connect( Engines_ListView, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) );
+ connect( Engines_Button_Add, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEngine_Add() ) );
+ connect( Engines_Button_Change, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEngine_Modify() ) );
+ connect( Engines_Button_Delete, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEngine_Delete() ) );
+ connect( Engines_White, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCurrent_White(int) ) );
+ connect( Engines_White_Book, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCurrent_White_Book(int) ) );
+ connect( Engines_Black, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCurrent_Black(int) ) );
+ connect( Engines_Black_Book, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCurrent_Black_Book(int) ) );
+ connect( White_Use_Book, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotToggle_White_Book(bool) ) );
+ connect( Black_Use_Book, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotToggle_Black_Book(bool) ) );
+ connect( Engines_ListView, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( selectionChanged() ) );
}
setPageEngines::~setPageEngines()
{
@@ -108,8 +108,8 @@ void setPageEngines::BuildEngineData( void )
WHITE_BK_FLAG(FALSE),
BLACK_FLAG(FALSE),
BLACK_BK_FLAG(FALSE);
- QStringList EngineList;
- QString proto;
+ TQStringList EngineList;
+ TQString proto;
int Index(0);
engineList::Iterator enginesIT;
@@ -140,12 +140,12 @@ void setPageEngines::BuildEngineData( void )
proto = "XBoard";
break;
}
- (void) new QListViewItem( Engines_ListView,
+ (void) new TQListViewItem( Engines_ListView,
(*enginesIT).Name,
proto,
- QString( "%1" ).arg( (*enginesIT).Wins ),
- QString( "%1" ).arg( (*enginesIT).Losses ),
- QString( "%1" ).arg( (*enginesIT).Draws ) );
+ TQString( "%1" ).tqarg( (*enginesIT).Wins ),
+ TQString( "%1" ).tqarg( (*enginesIT).Losses ),
+ TQString( "%1" ).tqarg( (*enginesIT).Draws ) );
EngineList.append( (*enginesIT).Name );
}
@@ -207,7 +207,7 @@ void setPageEngines::BuildEngineData( void )
void setPageEngines::slotEngine_Add( void )
{
Engine_Dialog = new dlg_engine( Parent, "EngineDialog", Resource );
- connect( Engine_Dialog, SIGNAL( destroyed() ), this, SLOT( BuildEngineData() ) );
+ connect( Engine_Dialog, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( BuildEngineData() ) );
emit enableApply();
}
///////////////////////////////////////
@@ -217,13 +217,13 @@ void setPageEngines::slotEngine_Add( void )
///////////////////////////////////////
void setPageEngines::slotEngine_Modify( void )
{
- QListViewItem *Item;
- QList<QListViewItem> Select = Engines_ListView->selectedItems();
+ TQListViewItem *Item;
+ TQList<TQListViewItem> Select = Engines_ListView->selectedItems();
if( Select.isEmpty() ) return;
Item = Select.first();
Engine_Dialog = new dlg_engine( Parent, "EngineDialog", Resource, Item->text(0) );
- connect( Engine_Dialog, SIGNAL( destroyed() ), this, SLOT( BuildEngineData() ) );
+ connect( Engine_Dialog, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( BuildEngineData() ) );
emit enableApply();
}
///////////////////////////////////////
@@ -234,8 +234,8 @@ void setPageEngines::slotEngine_Modify( void )
void setPageEngines::slotEngine_Delete( void )
{
engineList::Iterator enginesIT;
- QListViewItem *Item;
- QList<QListViewItem> Select = Engines_ListView->selectedItems();
+ TQListViewItem *Item;
+ TQList<TQListViewItem> Select = Engines_ListView->selectedItems();
if( Select.isEmpty() ) return;
Item = Select.first();
@@ -255,7 +255,7 @@ void setPageEngines::slotEngine_Delete( void )
///////////////////////////////////////
void setPageEngines::slotCurrent_White( int Index )
{
- QString Name;
+ TQString Name;
engineList::Iterator enginesIT;
Name = Engines_White->text(Index);
@@ -273,7 +273,7 @@ void setPageEngines::slotCurrent_White( int Index )
///////////////////////////////////////
void setPageEngines::slotCurrent_White_Book( int Index )
{
- QString Name;
+ TQString Name;
engineList::Iterator enginesIT;
Name = Engines_White_Book->text(Index);
@@ -291,7 +291,7 @@ void setPageEngines::slotCurrent_White_Book( int Index )
///////////////////////////////////////
void setPageEngines::slotCurrent_Black( int Index )
{
- QString Name;
+ TQString Name;
engineList::Iterator enginesIT;
Name = Engines_Black->text(Index);
@@ -309,7 +309,7 @@ void setPageEngines::slotCurrent_Black( int Index )
///////////////////////////////////////
void setPageEngines::slotCurrent_Black_Book( int Index )
{
- QString Name;
+ TQString Name;
engineList::Iterator enginesIT;
Name = Engines_Black_Book->text(Index);
diff --git a/knights/setpageengines.h b/knights/setpageengines.h
index 130b151..e96704d 100644
--- a/knights/setpageengines.h
+++ b/knights/setpageengines.h
@@ -21,13 +21,13 @@
#include <kbuttonbox.h>
#include <klistview.h>
#include <kcombobox.h>
-#include <qstringlist.h>
-#include <qcheckbox.h>
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qptrlist.h>
-#include <qhbox.h>
-#include <qlayout.h>
+#include <tqstringlist.h>
+#include <tqcheckbox.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqptrlist.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
#include "resource.h"
#include "dlg_engine.h"
@@ -35,11 +35,12 @@
*@author Troy Corbin Jr.
*/
-class setPageEngines : public QVBoxLayout
+class setPageEngines : public TQVBoxLayout
{
Q_OBJECT
+ TQ_OBJECT
public:
- setPageEngines(QWidget *parent=0, resource *Rsrc=0);
+ setPageEngines(TQWidget *tqparent=0, resource *Rsrc=0);
~setPageEngines();
public slots:
@@ -65,25 +66,25 @@ class setPageEngines : public QVBoxLayout
void selectionChanged( void );
private:
- QWidget *Parent;
+ TQWidget *Parent;
resource *Resource;
- QHBox *BOX_Current;
- QGroupBox *GROUP_White_Current;
+ TQHBox *BOX_Current;
+ TQGroupBox *GROUP_White_Current;
KComboBox *Engines_White;
- QCheckBox *White_Use_Book;
+ TQCheckBox *White_Use_Book;
KComboBox *Engines_White_Book;
- QGroupBox *GROUP_Black_Current;
+ TQGroupBox *GROUP_Black_Current;
KComboBox *Engines_Black;
- QCheckBox *Black_Use_Book;
+ TQCheckBox *Black_Use_Book;
KComboBox *Engines_Black_Book;
- QGroupBox *GROUP_Engines;
+ TQGroupBox *GROUP_Engines;
KListView *Engines_ListView;
KButtonBox *Engines_ButtonBox;
- QPushButton *Engines_Button_Add;
- QPushButton *Engines_Button_Change;
- QPushButton *Engines_Button_Delete;
+ TQPushButton *Engines_Button_Add;
+ TQPushButton *Engines_Button_Change;
+ TQPushButton *Engines_Button_Delete;
dlg_engine *Engine_Dialog;
};
diff --git a/knights/setpagegeneral.cpp b/knights/setpagegeneral.cpp
index d79b8c9..ada79fe 100644
--- a/knights/setpagegeneral.cpp
+++ b/knights/setpagegeneral.cpp
@@ -19,81 +19,81 @@
#include <kicontheme.h>
#include "setpagegeneral.moc"
-setPageGeneral::setPageGeneral(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+setPageGeneral::setPageGeneral(TQWidget *tqparent, resource *Rsrc ) : TQVBoxLayout(tqparent)
{
- Parent = parent;
+ Parent = tqparent;
Resource = Rsrc;
- GROUP_UserName = new QGroupBox( 1,
+ GROUP_UserName = new TQGroupBox( 1,
Qt::Horizontal,
i18n( "Your Name:" ),
- parent );
+ tqparent );
addWidget( GROUP_UserName );
EDIT_UserName = new KLineEdit( GROUP_UserName );
EDIT_UserName->setText( Resource->Local_Player );
- connect( EDIT_UserName, SIGNAL( textChanged(const QString&) ), this, SLOT( slot_UserName(const QString&) ) );
+ connect( EDIT_UserName, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slot_UserName(const TQString&) ) );
- BOX_SaveInit = new QHBox( parent );
+ BOX_SaveInit = new TQHBox( tqparent );
addWidget( BOX_SaveInit );
- GROUP_OnInit = new QButtonGroup( 3, Qt::Vertical, i18n("When Knights Begins It Should:"), BOX_SaveInit );
- BUTTON_Init_Nothing = new QRadioButton( i18n( "Do Nothing" ), GROUP_OnInit );
- BUTTON_Init_VsPC = new QRadioButton( i18n( "Start a Match vs. PC" ), GROUP_OnInit );
- BUTTON_Init_Connect = new QRadioButton( i18n( "Connect to ICS" ), GROUP_OnInit );
+ GROUP_OnInit = new TQButtonGroup( 3, Qt::Vertical, i18n("When Knights Begins It Should:"), BOX_SaveInit );
+ BUTTON_Init_Nothing = new TQRadioButton( i18n( "Do Nothing" ), GROUP_OnInit );
+ BUTTON_Init_VsPC = new TQRadioButton( i18n( "Start a Match vs. PC" ), GROUP_OnInit );
+ BUTTON_Init_Connect = new TQRadioButton( i18n( "Connect to ICS" ), GROUP_OnInit );
GROUP_OnInit->setExclusive( TRUE );
if( Resource->OPTION_On_Init == 0 ) GROUP_OnInit->setButton( 0 );
else if( Resource->OPTION_On_Init == MENU_VS_PC ) GROUP_OnInit->setButton( 1 );
else GROUP_OnInit->setButton( 2 );
- connect( GROUP_OnInit, SIGNAL( clicked(int) ),
- this, SLOT( slot_Init(int) ) );
+ connect( GROUP_OnInit, TQT_SIGNAL( clicked(int) ),
+ this, TQT_SLOT( slot_Init(int) ) );
- GROUP_AutoSave = new QButtonGroup( 3, Qt::Vertical, i18n("Save Match on Close?"), BOX_SaveInit );
- BUTTON_AutoSave_Yes = new QRadioButton( i18n( "Yes" ), GROUP_AutoSave );
- BUTTON_AutoSave_No = new QRadioButton( i18n( "No" ), GROUP_AutoSave );
- BUTTON_AutoSave_Ask = new QRadioButton( i18n( "Ask" ), GROUP_AutoSave );
+ GROUP_AutoSave = new TQButtonGroup( 3, Qt::Vertical, i18n("Save Match on Close?"), BOX_SaveInit );
+ BUTTON_AutoSave_Yes = new TQRadioButton( i18n( "Yes" ), GROUP_AutoSave );
+ BUTTON_AutoSave_No = new TQRadioButton( i18n( "No" ), GROUP_AutoSave );
+ BUTTON_AutoSave_Ask = new TQRadioButton( i18n( "Ask" ), GROUP_AutoSave );
GROUP_AutoSave->setExclusive( TRUE );
if( Resource->PromptForSaving == "Yes" ) GROUP_AutoSave->setButton( 0 );
else if( Resource->PromptForSaving == "No" ) GROUP_AutoSave->setButton( 1 );
else GROUP_AutoSave->setButton( 2 );
- connect( GROUP_AutoSave, SIGNAL( clicked(int) ),
- this, SLOT( slot_AutoSave(int) ) );
+ connect( GROUP_AutoSave, TQT_SIGNAL( clicked(int) ),
+ this, TQT_SLOT( slot_AutoSave(int) ) );
- GROUP_Reuse_PGN = new QGroupBox( 2,
+ GROUP_Reuse_PGN = new TQGroupBox( 2,
Qt::Vertical,
i18n( "Append to Save File:" ),
- parent );
+ tqparent );
addWidget( GROUP_Reuse_PGN );
- BUTTON_Reuse_PGN = new QCheckBox( i18n( "Append to Save File" ), GROUP_Reuse_PGN );
+ BUTTON_Reuse_PGN = new TQCheckBox( i18n( "Append to Save File" ), GROUP_Reuse_PGN );
BUTTON_Reuse_PGN->setChecked( Resource->OPTION_Reuse_PGN );
- connect( BUTTON_Reuse_PGN, SIGNAL( toggled(bool) ),
- this, SLOT( slot_Reuse_PGN(bool) ) );
+ connect( BUTTON_Reuse_PGN, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slot_Reuse_PGN(bool) ) );
- BOX_Reuse_PGN = new QHBox( GROUP_Reuse_PGN );
+ BOX_Reuse_PGN = new TQHBox( GROUP_Reuse_PGN );
EDIT_PGN_Filename = new KLineEdit( BOX_Reuse_PGN );
EDIT_PGN_Filename->setText( Resource->PGN_Filename );
- connect( EDIT_PGN_Filename, SIGNAL( textChanged(const QString&) ), this, SLOT( slot_PGN_Filename(const QString&) ) );
- BUTTON_PGN_Filename = new QPushButton( BOX_Reuse_PGN );
- BUTTON_PGN_Filename->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
- connect( BUTTON_PGN_Filename, SIGNAL( clicked() ), this, SLOT( slot_PGN_Filename_Button() ) );
+ connect( EDIT_PGN_Filename, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slot_PGN_Filename(const TQString&) ) );
+ BUTTON_PGN_Filename = new TQPushButton( BOX_Reuse_PGN );
+ BUTTON_PGN_Filename->setPixmap( Resource->LoadIcon( TQString( "fileopen" ), KIcon::Toolbar ) );
+ connect( BUTTON_PGN_Filename, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_PGN_Filename_Button() ) );
EDIT_PGN_Filename->setEnabled( Resource->OPTION_Reuse_PGN );
BUTTON_PGN_Filename->setEnabled( Resource->OPTION_Reuse_PGN );
- BUTTON_Pause_On_Minimize = new QCheckBox( i18n( "Pause on Minimize" ), parent );
+ BUTTON_Pause_On_Minimize = new TQCheckBox( i18n( "Pause on Minimize" ), tqparent );
BUTTON_Pause_On_Minimize->setChecked( Resource->OPTION_Pause_On_Minimize );
- connect( BUTTON_Pause_On_Minimize, SIGNAL( toggled(bool) ),
- this, SLOT( slot_Pause_On_Minimize(bool) ) );
+ connect( BUTTON_Pause_On_Minimize, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slot_Pause_On_Minimize(bool) ) );
addWidget( BUTTON_Pause_On_Minimize );
- BUTTON_Auto_Queen = new QCheckBox( i18n( "Always Promote to Queen" ), parent );
+ BUTTON_Auto_Queen = new TQCheckBox( i18n( "Always Promote to Queen" ), tqparent );
BUTTON_Auto_Queen->setChecked( Resource->OPTION_Auto_Queen );
- connect( BUTTON_Auto_Queen, SIGNAL( toggled(bool) ),
- this, SLOT( slot_Auto_Queen(bool) ) );
+ connect( BUTTON_Auto_Queen, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slot_Auto_Queen(bool) ) );
addWidget( BUTTON_Auto_Queen );
- BUTTON_Auto_Flag = new QCheckBox( i18n( "Call Flag Automatically" ), parent );
+ BUTTON_Auto_Flag = new TQCheckBox( i18n( "Call Flag Automatically" ), tqparent );
BUTTON_Auto_Flag->setChecked( Resource->OPTION_Auto_Call_Flag );
- connect( BUTTON_Auto_Flag, SIGNAL( toggled(bool) ),
- this, SLOT( slot_Auto_Flag(bool) ) );
+ connect( BUTTON_Auto_Flag, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slot_Auto_Flag(bool) ) );
addWidget( BUTTON_Auto_Flag );
}
setPageGeneral::~setPageGeneral()
@@ -176,7 +176,7 @@ void setPageGeneral::slot_Auto_Flag( bool state )
// setPageGeneral::slot_UserName
//
///////////////////////////////////////
-void setPageGeneral::slot_UserName( const QString& string )
+void setPageGeneral::slot_UserName( const TQString& string )
{
Resource->Local_Player = string;
emit enableApply();
@@ -198,7 +198,7 @@ void setPageGeneral::slot_Reuse_PGN( bool state )
// setPageGeneral::slot_PGN_Filename
//
///////////////////////////////////////
-void setPageGeneral::slot_PGN_Filename( const QString& string )
+void setPageGeneral::slot_PGN_Filename( const TQString& string )
{
Resource->PGN_Filename = string;
emit enableApply();
@@ -210,10 +210,10 @@ void setPageGeneral::slot_PGN_Filename( const QString& string )
///////////////////////////////////////
void setPageGeneral::slot_PGN_Filename_Button( void )
{
- QString temp;
+ TQString temp;
- temp = KFileDialog::getOpenFileName( QString::null,
- QString( "*" ),
+ temp = KFileDialog::getOpenFileName( TQString(),
+ TQString( "*" ),
BOX_Reuse_PGN,
i18n( "Find PGN..." ) );
if( temp.isEmpty() ) return;
diff --git a/knights/setpagegeneral.h b/knights/setpagegeneral.h
index 16ada66..9b9780a 100644
--- a/knights/setpagegeneral.h
+++ b/knights/setpagegeneral.h
@@ -19,62 +19,63 @@
#define SETPAGEGENERAL_H
#include <klineedit.h>
-#include <qwidget.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
#include "resource.h"
/**
*@author Troy Corbin Jr.
*/
-class setPageGeneral : public QVBoxLayout
+class setPageGeneral : public TQVBoxLayout
{
Q_OBJECT
+ TQ_OBJECT
public:
- setPageGeneral(QWidget *parent=0, resource *Rsrc=0);
+ setPageGeneral(TQWidget *tqparent=0, resource *Rsrc=0);
~setPageGeneral();
signals:
void enableApply( void );
public slots:
void slot_AutoSave( int state );
void slot_Init( int state );
- void slot_UserName( const QString& );
+ void slot_UserName( const TQString& );
void slot_Pause_On_Minimize( bool state );
void slot_Auto_Queen( bool state );
void slot_Auto_Flag( bool state );
void slot_Reuse_PGN( bool );
- void slot_PGN_Filename( const QString& );
+ void slot_PGN_Filename( const TQString& );
void slot_PGN_Filename_Button( void );
private:
- QWidget *Parent;
+ TQWidget *Parent;
resource *Resource;
- QGroupBox *GROUP_UserName;
+ TQGroupBox *GROUP_UserName;
KLineEdit *EDIT_UserName;
- QHBox *BOX_SaveInit;
- QButtonGroup *GROUP_AutoSave;
- QRadioButton *BUTTON_AutoSave_Yes;
- QRadioButton *BUTTON_AutoSave_No;
- QRadioButton *BUTTON_AutoSave_Ask;
- QButtonGroup *GROUP_OnInit;
- QRadioButton *BUTTON_Init_Nothing;
- QRadioButton *BUTTON_Init_VsPC;
- QRadioButton *BUTTON_Init_Connect;
- QGroupBox *GROUP_Reuse_PGN;
- QCheckBox *BUTTON_Reuse_PGN;
- QHBox *BOX_Reuse_PGN;
+ TQHBox *BOX_SaveInit;
+ TQButtonGroup *GROUP_AutoSave;
+ TQRadioButton *BUTTON_AutoSave_Yes;
+ TQRadioButton *BUTTON_AutoSave_No;
+ TQRadioButton *BUTTON_AutoSave_Ask;
+ TQButtonGroup *GROUP_OnInit;
+ TQRadioButton *BUTTON_Init_Nothing;
+ TQRadioButton *BUTTON_Init_VsPC;
+ TQRadioButton *BUTTON_Init_Connect;
+ TQGroupBox *GROUP_Reuse_PGN;
+ TQCheckBox *BUTTON_Reuse_PGN;
+ TQHBox *BOX_Reuse_PGN;
KLineEdit *EDIT_PGN_Filename;
- QPushButton *BUTTON_PGN_Filename;
- QCheckBox *BUTTON_Pause_On_Minimize;
- QCheckBox *BUTTON_Auto_Queen;
- QCheckBox *BUTTON_Auto_Flag;
+ TQPushButton *BUTTON_PGN_Filename;
+ TQCheckBox *BUTTON_Pause_On_Minimize;
+ TQCheckBox *BUTTON_Auto_Queen;
+ TQCheckBox *BUTTON_Auto_Flag;
};
#endif
diff --git a/knights/setpageservers.cpp b/knights/setpageservers.cpp
index 8d570a1..e2f95fb 100644
--- a/knights/setpageservers.cpp
+++ b/knights/setpageservers.cpp
@@ -16,18 +16,18 @@
***************************************************************************/
#include "setpageservers.moc"
-#include <qstyle.h>
+#include <tqstyle.h>
#include <kicontheme.h>
-setPageServers::setPageServers(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+setPageServers::setPageServers(TQWidget *tqparent, resource *Rsrc ) : TQVBoxLayout(tqparent)
{
- QStyle& Style = QApplication::style();
+ TQStyle& Style = TQApplication::tqstyle();
margin = Style.defaultFrameWidth();
Resource = Rsrc;
Servers_ListView = NULL;
resetServer = FALSE;
- TabParent = new QTabWidget( parent, "setPageDisplay" );
+ TabParent = new TQTabWidget( tqparent, "setPageDisplay" );
initTab1();
initTab2();
addWidget( TabParent );
@@ -47,11 +47,11 @@ setPageServers::~setPageServers()
///////////////////////////////////////
void setPageServers::initTab1( void )
{
- Tab1 = new QVBox( TabParent );
+ Tab1 = new TQVBox( TabParent );
Tab1->setMargin( margin );
/* Current Server */
- GROUP_Current = new QGroupBox( 1,
+ GROUP_Current = new TQGroupBox( 1,
Qt::Vertical,
i18n( "Current Server" ),
Tab1 );
@@ -60,7 +60,7 @@ void setPageServers::initTab1( void )
Servers->setEditable( FALSE );
/* Chess Servers ListView */
- GROUP_Servers = new QGroupBox( 2,
+ GROUP_Servers = new TQGroupBox( 2,
Qt::Horizontal,
i18n( "Chess Servers" ),
Tab1 );
@@ -73,19 +73,19 @@ void setPageServers::initTab1( void )
Servers_ListView->setShowSortIndicator( TRUE );
Servers_ListView->restoreLayout( kapp->config(), "Servers_ListView" );
- Servers_ButtonBox = new KButtonBox( GROUP_Servers, Vertical );
+ Servers_ButtonBox = new KButtonBox( GROUP_Servers,Qt::Vertical );
Servers_Button_Add = Servers_ButtonBox->addButton( i18n( "&Add..." ) );
Servers_Button_Change = Servers_ButtonBox->addButton( i18n( "&Modify..." ) );
Servers_Button_Delete = Servers_ButtonBox->addButton( i18n( "&Delete..." ) );
- Servers_ButtonBox->layout();
+ Servers_ButtonBox->tqlayout();
BuildServerData();
- connect( Servers_Button_Add, SIGNAL( clicked() ), this, SLOT( slotServer_Add() ) );
- connect( Servers_Button_Change, SIGNAL( clicked() ), this, SLOT( slotServer_Modify() ) );
- connect( Servers_Button_Delete, SIGNAL( clicked() ), this, SLOT( slotServer_Delete() ) );
- connect( Servers, SIGNAL( activated(int) ), this, SLOT( slotCurrent(int) ) );
- connect( Servers_ListView, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) );
+ connect( Servers_Button_Add, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotServer_Add() ) );
+ connect( Servers_Button_Change, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotServer_Modify() ) );
+ connect( Servers_Button_Delete, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotServer_Delete() ) );
+ connect( Servers, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCurrent(int) ) );
+ connect( Servers_ListView, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( selectionChanged() ) );
TabParent->addTab( Tab1, i18n("Servers") );
}
@@ -96,12 +96,12 @@ void setPageServers::initTab1( void )
///////////////////////////////////////
void setPageServers::initTab2( void )
{
- QStringList FilterLevels;
- Tab2 = new QVBox( TabParent );
+ TQStringList FilterLevels;
+ Tab2 = new TQVBox( TabParent );
Tab2->setMargin( margin );
/* Current Profanity Filter */
- BOX_Profanity = new QGroupBox( 1,
+ BOX_Profanity = new TQGroupBox( 1,
Qt::Vertical,
i18n( "Profanity Filter" ),
Tab2 );
@@ -110,44 +110,44 @@ void setPageServers::initTab2( void )
FilterLevels << i18n("Filter Everything") << i18n("Default") << "---" << "---" << "---" << i18n("No Filtering");
COMBO_Profanity->insertStringList( FilterLevels );
COMBO_Profanity->setCurrentItem( Resource->OPTION_Profanity );
- connect( COMBO_Profanity, SIGNAL( activated(int) ), this, SLOT( slot_Profanity(int) ) );
+ connect( COMBO_Profanity, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slot_Profanity(int) ) );
- BUTTON_Auto_Close_ICS = new QCheckBox( i18n( "Automatically Close Previous ICS Match" ), Tab2 );
+ BUTTON_Auto_Close_ICS = new TQCheckBox( i18n( "Automatically Close Previous ICS Match" ), Tab2 );
BUTTON_Auto_Close_ICS->setChecked( Resource->OPTION_Auto_Close_Last_ICS );
- connect( BUTTON_Auto_Close_ICS, SIGNAL( toggled(bool) ),
- this, SLOT( slot_Auto_Close_ICS(bool) ) );
+ connect( BUTTON_Auto_Close_ICS, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slot_Auto_Close_ICS(bool) ) );
- BUTTON_Private = new QCheckBox( i18n( "Private Matches" ), Tab2 );
+ BUTTON_Private = new TQCheckBox( i18n( "Private Matches" ), Tab2 );
BUTTON_Private->setChecked( Resource->OPTION_Private );
- connect( BUTTON_Private, SIGNAL( toggled(bool) ), this, SLOT( slot_Private(bool) ) );
+ connect( BUTTON_Private, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slot_Private(bool) ) );
- BUTTON_Premove = new QCheckBox( i18n( "Enable Premove" ), Tab2 );
+ BUTTON_Premove = new TQCheckBox( i18n( "Enable Premove" ), Tab2 );
BUTTON_Premove->setChecked( Resource->OPTION_Premove );
- connect( BUTTON_Premove, SIGNAL( toggled(bool) ), this, SLOT( slot_Premove(bool) ) );
+ connect( BUTTON_Premove, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slot_Premove(bool) ) );
- BUTTON_Kibitz = new QCheckBox( i18n( "Enable Kibitzes" ), Tab2 );
+ BUTTON_Kibitz = new TQCheckBox( i18n( "Enable Kibitzes" ), Tab2 );
BUTTON_Kibitz->setChecked( Resource->OPTION_Kibitz );
- connect( BUTTON_Kibitz, SIGNAL( toggled(bool) ), this, SLOT( slot_Kibitz(bool) ) );
+ connect( BUTTON_Kibitz, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slot_Kibitz(bool) ) );
- BUTTON_Tell = new QCheckBox( i18n( "Enable Unregistered Tells" ), Tab2 );
+ BUTTON_Tell = new TQCheckBox( i18n( "Enable Unregistered Tells" ), Tab2 );
BUTTON_Tell->setChecked( Resource->OPTION_Tell );
- connect( BUTTON_Tell, SIGNAL( toggled(bool) ), this, SLOT( slot_Tell(bool) ) );
+ connect( BUTTON_Tell, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slot_Tell(bool) ) );
- BUTTON_Shout = new QCheckBox( i18n( "Enable Shouts" ), Tab2 );
+ BUTTON_Shout = new TQCheckBox( i18n( "Enable Shouts" ), Tab2 );
BUTTON_Shout->setChecked( Resource->OPTION_Shout );
- connect( BUTTON_Shout, SIGNAL( toggled(bool) ), this, SLOT( slot_Shout(bool) ) );
+ connect( BUTTON_Shout, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slot_Shout(bool) ) );
- BUTTON_Seek = new QCheckBox( i18n( "Enable Seeks" ), Tab2 );
+ BUTTON_Seek = new TQCheckBox( i18n( "Enable Seeks" ), Tab2 );
BUTTON_Seek->setChecked( Resource->OPTION_Seek );
- connect( BUTTON_Seek, SIGNAL( toggled(bool) ), this, SLOT( slot_Seek(bool) ) );
+ connect( BUTTON_Seek, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slot_Seek(bool) ) );
- BOX_SeekTimer = new QHBox( Tab2 );
- BUTTON_SeekTimer = new QSpinBox( 3, 120, 1, BOX_SeekTimer );
+ BOX_SeekTimer = new TQHBox( Tab2 );
+ BUTTON_SeekTimer = new TQSpinBox( 3, 120, 1, BOX_SeekTimer );
BUTTON_SeekTimer->setSuffix( i18n(" sec.") );
BUTTON_SeekTimer->setValue( Resource->Seek_Timer / 10 );
- connect( BUTTON_SeekTimer, SIGNAL( valueChanged(int) ),
- this, SLOT( slot_SeekTimer(int) ) );
- LABEL_SeekTimer = new QLabel( i18n("Seconds Between Seek Updates"), BOX_SeekTimer );
+ connect( BUTTON_SeekTimer, TQT_SIGNAL( valueChanged(int) ),
+ this, TQT_SLOT( slot_SeekTimer(int) ) );
+ LABEL_SeekTimer = new TQLabel( i18n("Seconds Between Seek Updates"), BOX_SeekTimer );
TabParent->addTab( Tab2, i18n("Options") );
}
@@ -159,7 +159,7 @@ void setPageServers::initTab2( void )
void setPageServers::BuildServerData( void )
{
bool SERVER_FLAG(FALSE);
- QStringList ServerList;
+ TQStringList ServerList;
int Index(0);
serverList::Iterator serversIT;
@@ -170,7 +170,7 @@ void setPageServers::BuildServerData( void )
if( Resource->servers.isEmpty() ) return;
for ( serversIT = Resource->servers.begin(); serversIT != Resource->servers.end(); ++serversIT )
{
- (void) new QListViewItem( Servers_ListView,
+ (void) new TQListViewItem( Servers_ListView,
(*serversIT).Name,
(*serversIT).URL );
ServerList.append( (*serversIT).Name );
@@ -204,7 +204,7 @@ void setPageServers::BuildServerData( void )
void setPageServers::slotServer_Add( void )
{
Server_Dialog = new dlg_server( TabParent, "ServerDialog", Resource );
- connect( Server_Dialog, SIGNAL( destroyed() ), this, SLOT( BuildServerData() ) );
+ connect( Server_Dialog, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( BuildServerData() ) );
emit enableApply();
}
///////////////////////////////////////
@@ -214,13 +214,13 @@ void setPageServers::slotServer_Add( void )
///////////////////////////////////////
void setPageServers::slotServer_Modify( void )
{
- QListViewItem *Item;
- QList<QListViewItem> Select = Servers_ListView->selectedItems();
+ TQListViewItem *Item;
+ TQList<TQListViewItem> Select = Servers_ListView->selectedItems();
if( Select.isEmpty() ) return;
Item = Select.first();
Server_Dialog = new dlg_server( TabParent, "ServerDialog", Resource, Item->text(0) );
- connect( Server_Dialog, SIGNAL( destroyed() ), this, SLOT( BuildServerData() ) );
+ connect( Server_Dialog, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( BuildServerData() ) );
emit enableApply();
}
///////////////////////////////////////
@@ -231,8 +231,8 @@ void setPageServers::slotServer_Modify( void )
void setPageServers::slotServer_Delete( void )
{
serverList::Iterator serversIT;
- QListViewItem *Item;
- QList<QListViewItem> Select = Servers_ListView->selectedItems();
+ TQListViewItem *Item;
+ TQList<TQListViewItem> Select = Servers_ListView->selectedItems();
if( Select.isEmpty() ) return;
Item = Select.first();
@@ -252,7 +252,7 @@ void setPageServers::slotServer_Delete( void )
///////////////////////////////////////
void setPageServers::slotCurrent( int Index )
{
- QString Name;
+ TQString Name;
serverList::Iterator serversIT;
Name = Servers->text(Index);
diff --git a/knights/setpageservers.h b/knights/setpageservers.h
index 4f4c21c..03f0844 100644
--- a/knights/setpageservers.h
+++ b/knights/setpageservers.h
@@ -18,22 +18,22 @@
#ifndef SETPAGESERVERS_H
#define SETPAGESERVERS_H
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kbuttonbox.h>
#include <klistview.h>
#include <klineedit.h>
#include <kcombobox.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qstringlist.h>
-#include <qcheckbox.h>
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qptrlist.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqstringlist.h>
+#include <tqcheckbox.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqptrlist.h>
+#include <tqlayout.h>
#include "resource.h"
#include "dlg_server.h"
@@ -41,11 +41,12 @@
*@author Troy Corbin Jr.
*/
-class setPageServers : public QVBoxLayout
+class setPageServers : public TQVBoxLayout
{
Q_OBJECT
+ TQ_OBJECT
public:
- setPageServers(QWidget *parent=0, resource *Rsrc=0);
+ setPageServers(TQWidget *tqparent=0, resource *Rsrc=0);
~setPageServers();
bool resetServer;
@@ -80,33 +81,33 @@ class setPageServers : public QVBoxLayout
private:
resource *Resource;
int margin;
- QTabWidget *TabParent;
+ TQTabWidget *TabParent;
/* Tab 1 : Servers */
- QVBox *Tab1;
- QGroupBox *GROUP_Current;
- QGroupBox *GROUP_Servers;
+ TQVBox *Tab1;
+ TQGroupBox *GROUP_Current;
+ TQGroupBox *GROUP_Servers;
KComboBox *Servers;
KListView *Servers_ListView;
KButtonBox *Servers_ButtonBox;
- QPushButton *Servers_Button_Add;
- QPushButton *Servers_Button_Change;
- QPushButton *Servers_Button_Delete;
+ TQPushButton *Servers_Button_Add;
+ TQPushButton *Servers_Button_Change;
+ TQPushButton *Servers_Button_Delete;
dlg_server *Server_Dialog;
/* Tab 2 : Options */
- QVBox *Tab2;
- QGroupBox *BOX_Profanity;
+ TQVBox *Tab2;
+ TQGroupBox *BOX_Profanity;
KComboBox *COMBO_Profanity;
- QCheckBox *BUTTON_Premove;
- QCheckBox *BUTTON_Private;
- QCheckBox *BUTTON_Kibitz;
- QCheckBox *BUTTON_Tell;
- QCheckBox *BUTTON_Shout;
- QCheckBox *BUTTON_Seek;
- QCheckBox *BUTTON_Auto_Close_ICS;
- QHBox *BOX_SeekTimer;
- QSpinBox *BUTTON_SeekTimer;
- QLabel *LABEL_SeekTimer;
+ TQCheckBox *BUTTON_Premove;
+ TQCheckBox *BUTTON_Private;
+ TQCheckBox *BUTTON_Kibitz;
+ TQCheckBox *BUTTON_Tell;
+ TQCheckBox *BUTTON_Shout;
+ TQCheckBox *BUTTON_Seek;
+ TQCheckBox *BUTTON_Auto_Close_ICS;
+ TQHBox *BOX_SeekTimer;
+ TQSpinBox *BUTTON_SeekTimer;
+ TQLabel *LABEL_SeekTimer;
};
#endif
diff --git a/knights/splash.cpp b/knights/splash.cpp
index cfccb62..e372008 100644
--- a/knights/splash.cpp
+++ b/knights/splash.cpp
@@ -16,24 +16,24 @@
***************************************************************************/
#include "splash.moc"
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kstddirs.h>
#include <kwin.h>
-#include <qapplication.h>
+#include <tqapplication.h>
splash::splash() :
- QWidget( 0, "splash", Qt::WStyle_Customize | Qt::WStyle_NoBorder )
+ TQWidget( 0, "splash", TQt::WStyle_Customize | TQt::WStyle_NoBorder )
{
- QPixmap SplashImage( locate("data", "knights/splash.png" ) );
+ TQPixmap SplashImage( locate("data", "knights/splash.png" ) );
setPaletteBackgroundPixmap( SplashImage );
- QSize Hint = SplashImage.size();
+ TQSize Hint = SplashImage.size();
setFixedSize( Hint );
- move( ( QApplication::desktop()->width() - Hint.width() ) / 2,
- ( QApplication::desktop()->height() - Hint.height() ) / 2 );
+ move( ( TQApplication::desktop()->width() - Hint.width() ) / 2,
+ ( TQApplication::desktop()->height() - Hint.height() ) / 2 );
show();
- repaint( FALSE );
+ tqrepaint( FALSE );
}
splash::~splash()
{
diff --git a/knights/splash.h b/knights/splash.h
index 93cdc6c..a0ea11d 100644
--- a/knights/splash.h
+++ b/knights/splash.h
@@ -18,15 +18,16 @@
#ifndef SPLASH_H
#define SPLASH_H
-#include <qwidget.h>
+#include <tqwidget.h>
/**
*@author Troy Corbin Jr.
*/
-class splash : public QWidget
+class splash : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
splash();
~splash();
diff --git a/knights/tab_pgnview.cpp b/knights/tab_pgnview.cpp
index 4164f31..75a1fda 100644
--- a/knights/tab_pgnview.cpp
+++ b/knights/tab_pgnview.cpp
@@ -19,23 +19,23 @@
#include "tabmanager.h"
#include "resource.h"
#include "pgn.h"
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include <kstddirs.h>
#include <ktempfile.h>
-tab_pgnView::tab_pgnView(pgn *parent, resource *Rsrc ) : KnightsTextView(0,Rsrc)
+tab_pgnView::tab_pgnView(pgn *tqparent, resource *Rsrc ) : KnightsTextView(0,Rsrc)
{
- myParent = parent;
+ myParent = tqparent;
whiteImage = NULL;
blackImage = NULL;
- QString source = locate( "appdata", "pgn_template.kml" );
- QFile file( source );
+ TQString source = locate( "appdata", "pgn_template.kml" );
+ TQFile file( source );
if( file.open( IO_ReadOnly ) )
{
- QTextStream stream( &file );
+ TQTextStream stream( &file );
document = stream.read();
file.close();
}
@@ -60,46 +60,46 @@ tab_pgnView::~tab_pgnView()
void tab_pgnView::init( void )
{
/* Replace macros with data */
- document.replace( QRegExp( "%site%" ), myParent->TAG_Site );
- document.replace( QRegExp( "%date%" ), myParent->TAG_Date );
- document.replace( QRegExp( "%round%" ), myParent->TAG_Round );
- document.replace( QRegExp( "%result%" ), myParent->TAG_Result );
- document.replace( QRegExp( "%white%" ), myParent->TAG_White );
- document.replace( QRegExp( "%whitetitle%" ), myParent->TAG_WhiteTitle );
- document.replace( QRegExp( "%whiteelo%" ), myParent->TAG_WhiteElo );
- document.replace( QRegExp( "%whiteuscf%" ), myParent->TAG_WhiteUSCF );
- document.replace( QRegExp( "%whitena%" ), myParent->TAG_WhiteNA );
- document.replace( QRegExp( "%whitetype%" ), myParent->TAG_WhiteType );
- document.replace( QRegExp( "%black%" ), myParent->TAG_Black );
- document.replace( QRegExp( "%blacktitle%" ), myParent->TAG_BlackTitle );
- document.replace( QRegExp( "%blackelo%" ), myParent->TAG_BlackElo );
- document.replace( QRegExp( "%blackuscf%" ), myParent->TAG_BlackUSCF );
- document.replace( QRegExp( "%blackna%" ), myParent->TAG_BlackNA );
- document.replace( QRegExp( "%blacktype%" ), myParent->TAG_BlackType );
- document.replace( QRegExp( "%time%" ), myParent->TAG_Time );
- document.replace( QRegExp( "%utctime%" ), myParent->TAG_UTCTime );
- document.replace( QRegExp( "%utcdate%" ), myParent->TAG_UTCDate );
- document.replace( QRegExp( "%event%" ), myParent->TAG_Event );
- document.replace( QRegExp( "%eventdate%" ), myParent->TAG_EventDate );
- document.replace( QRegExp( "%eventsponsor"), myParent->TAG_EventSponsor );
- document.replace( QRegExp( "%section%" ), myParent->TAG_Section );
- document.replace( QRegExp( "%stage%" ), myParent->TAG_Stage );
- document.replace( QRegExp( "%board%" ), myParent->TAG_Board );
- document.replace( QRegExp( "%opening%" ), myParent->TAG_Opening );
- document.replace( QRegExp( "%variation%" ), myParent->TAG_Variation );
- document.replace( QRegExp( "%subvariation%" ), myParent->TAG_SubVariation );
- document.replace( QRegExp( "%eco%" ), myParent->TAG_ECO );
- document.replace( QRegExp( "%nic%" ), myParent->TAG_NIC );
- document.replace( QRegExp( "%timecontrol%" ), myParent->TAG_TimeControl );
- document.replace( QRegExp( "%termination%" ), myParent->TAG_Termination );
- document.replace( QRegExp( "%setup%" ), myParent->TAG_SetUp );
- document.replace( QRegExp( "%fen%" ), myParent->TAG_FEN );
- document.replace( QRegExp( "%annotator%" ), myParent->TAG_Annotator );
- document.replace( QRegExp( "%mode%" ), myParent->TAG_Mode );
- document.replace( QRegExp( "%plycount%" ), myParent->TAG_PlyCount );
+ document.tqreplace( TQRegExp( "%site%" ), myParent->TAG_Site );
+ document.tqreplace( TQRegExp( "%date%" ), myParent->TAG_Date );
+ document.tqreplace( TQRegExp( "%round%" ), myParent->TAG_Round );
+ document.tqreplace( TQRegExp( "%result%" ), myParent->TAG_Result );
+ document.tqreplace( TQRegExp( "%white%" ), myParent->TAG_White );
+ document.tqreplace( TQRegExp( "%whitetitle%" ), myParent->TAG_WhiteTitle );
+ document.tqreplace( TQRegExp( "%whiteelo%" ), myParent->TAG_WhiteElo );
+ document.tqreplace( TQRegExp( "%whiteuscf%" ), myParent->TAG_WhiteUSCF );
+ document.tqreplace( TQRegExp( "%whitena%" ), myParent->TAG_WhiteNA );
+ document.tqreplace( TQRegExp( "%whitetype%" ), myParent->TAG_WhiteType );
+ document.tqreplace( TQRegExp( "%black%" ), myParent->TAG_Black );
+ document.tqreplace( TQRegExp( "%blacktitle%" ), myParent->TAG_BlackTitle );
+ document.tqreplace( TQRegExp( "%blackelo%" ), myParent->TAG_BlackElo );
+ document.tqreplace( TQRegExp( "%blackuscf%" ), myParent->TAG_BlackUSCF );
+ document.tqreplace( TQRegExp( "%blackna%" ), myParent->TAG_BlackNA );
+ document.tqreplace( TQRegExp( "%blacktype%" ), myParent->TAG_BlackType );
+ document.tqreplace( TQRegExp( "%time%" ), myParent->TAG_Time );
+ document.tqreplace( TQRegExp( "%utctime%" ), myParent->TAG_UTCTime );
+ document.tqreplace( TQRegExp( "%utcdate%" ), myParent->TAG_UTCDate );
+ document.tqreplace( TQRegExp( "%event%" ), myParent->TAG_Event );
+ document.tqreplace( TQRegExp( "%eventdate%" ), myParent->TAG_EventDate );
+ document.tqreplace( TQRegExp( "%eventsponsor"), myParent->TAG_EventSponsor );
+ document.tqreplace( TQRegExp( "%section%" ), myParent->TAG_Section );
+ document.tqreplace( TQRegExp( "%stage%" ), myParent->TAG_Stage );
+ document.tqreplace( TQRegExp( "%board%" ), myParent->TAG_Board );
+ document.tqreplace( TQRegExp( "%opening%" ), myParent->TAG_Opening );
+ document.tqreplace( TQRegExp( "%variation%" ), myParent->TAG_Variation );
+ document.tqreplace( TQRegExp( "%subvariation%" ), myParent->TAG_SubVariation );
+ document.tqreplace( TQRegExp( "%eco%" ), myParent->TAG_ECO );
+ document.tqreplace( TQRegExp( "%nic%" ), myParent->TAG_NIC );
+ document.tqreplace( TQRegExp( "%timecontrol%" ), myParent->TAG_TimeControl );
+ document.tqreplace( TQRegExp( "%termination%" ), myParent->TAG_Termination );
+ document.tqreplace( TQRegExp( "%setup%" ), myParent->TAG_SetUp );
+ document.tqreplace( TQRegExp( "%fen%" ), myParent->TAG_FEN );
+ document.tqreplace( TQRegExp( "%annotator%" ), myParent->TAG_Annotator );
+ document.tqreplace( TQRegExp( "%mode%" ), myParent->TAG_Mode );
+ document.tqreplace( TQRegExp( "%plycount%" ), myParent->TAG_PlyCount );
/* Get the White Player's Image */
- QPixmap wi = myResource->loadSCIDImage( myParent->TAG_White );
+ TQPixmap wi = myResource->loadSCIDImage( myParent->TAG_White );
if( wi.isNull() )
{
if( myParent->TAG_WhiteType == "program" )
@@ -110,10 +110,10 @@ void tab_pgnView::init( void )
whiteImage = new KTempFile();
whiteImage->setAutoDelete( TRUE );
wi.save( whiteImage->name(), "PNG" );
- document.replace( QRegExp( "%whiteimage%" ), whiteImage->name() );
+ document.tqreplace( TQRegExp( "%whiteimage%" ), whiteImage->name() );
/* Get the Black Player's Image */
- QPixmap bi = myResource->loadSCIDImage( myParent->TAG_Black );
+ TQPixmap bi = myResource->loadSCIDImage( myParent->TAG_Black );
if( bi.isNull() )
{
if( myParent->TAG_BlackType == "program" )
@@ -124,33 +124,33 @@ void tab_pgnView::init( void )
blackImage = new KTempFile();
blackImage->setAutoDelete( TRUE );
bi.save( blackImage->name(), "PNG" );
- document.replace( QRegExp( "%blackimage%" ), blackImage->name() );
+ document.tqreplace( TQRegExp( "%blackimage%" ), blackImage->name() );
/* Obtain the move data */
- QString moves;
- QStringList *list;
+ TQString moves;
+ TQStringList *list;
if( myParent->Move_Data.isEmpty() )
{
list = myParent->notation(2);
}
else
{
- list = new QStringList( myParent->Move_Data );
+ list = new TQStringList( myParent->Move_Data );
}
/* Do some formatting and then merge the strings */
- for( QStringList::Iterator i = list->begin(); i != list->end(); i++ )
+ for( TQStringList::Iterator i = list->begin(); i != list->end(); i++ )
{
- (*i).replace( QRegExp( "[^\\0040-\\0176]" ), "" );
- (*i).replace( QRegExp( "\\(" ), "<i>(" );
- (*i).replace( QRegExp( "\\)" ), ")</i>" );
- (*i).replace( QRegExp( "\\{" ), "<b>{" );
- (*i).replace( QRegExp( "\\}" ), "}</b>" );
+ (*i).tqreplace( TQRegExp( "[^\\0040-\\0176]" ), "" );
+ (*i).tqreplace( TQRegExp( "\\(" ), "<i>(" );
+ (*i).tqreplace( TQRegExp( "\\)" ), ")</i>" );
+ (*i).tqreplace( TQRegExp( "\\{" ), "<b>{" );
+ (*i).tqreplace( TQRegExp( "\\}" ), "}</b>" );
}
moves = list->join( " " );
delete list;
- int pos = document.find( "%moves%" );
+ int pos = document.tqfind( "%moves%" );
if( pos != -1 )
{
document.remove( (unsigned int)pos, 7 );
diff --git a/knights/tab_pgnview.h b/knights/tab_pgnview.h
index d5a9a4b..d17a2ba 100644
--- a/knights/tab_pgnview.h
+++ b/knights/tab_pgnview.h
@@ -19,7 +19,7 @@
#define TAB_PGNVIEW_H
#include "knightstextview.h"
-#include <qstring.h>
+#include <tqstring.h>
/**
*@author Troy Corbin Jr.
@@ -32,14 +32,15 @@ class KTempFile;
class tab_pgnView : public KnightsTextView
{
Q_OBJECT
+ TQ_OBJECT
public:
- tab_pgnView(pgn *parent, resource *Rsrc );
+ tab_pgnView(pgn *tqparent, resource *Rsrc );
~tab_pgnView();
void init( void );
protected:
pgn *myParent;
- QString document;
+ TQString document;
KTempFile *whiteImage;
KTempFile *blackImage;
};
diff --git a/knights/tab_seeklist.cpp b/knights/tab_seeklist.cpp
index d7554a3..0130bc8 100644
--- a/knights/tab_seeklist.cpp
+++ b/knights/tab_seeklist.cpp
@@ -18,9 +18,9 @@
#include "tab_seeklist.moc"
#include "resource.h"
#include <kiconloader.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-tab_SeekList::tab_SeekList(QWidget *parent, const char *name, resource *Rsrc ) : KListView(parent,name)
+tab_SeekList::tab_SeekList(TQWidget *tqparent, const char *name, resource *Rsrc ) : KListView(tqparent,name)
{
myResource = Rsrc;
seek = FALSE;
@@ -37,23 +37,23 @@ tab_SeekList::tab_SeekList(QWidget *parent, const char *name, resource *Rsrc ) :
menuSeek = new KPopupMenu( this );
menuSeek->setCheckable( TRUE );
- menuSeek->insertItem( i18n("Seek Matches"), this, SLOT( menuFunct(int) ), 0, MENU_SEEK );
+ menuSeek->insertItem( i18n("Seek Matches"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_SEEK );
menuSeek->insertSeparator();
- menuSeek->insertItem( i18n("Accept This Match"), this, SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH );
- menuSeek->insertItem( i18n("Tell..."), this, SLOT( menuFunct(int) ), 0, MENU_TELL );
- menuSeek->insertItem( i18n("Assess..."), this, SLOT( menuFunct(int) ), 0, MENU_ASSESS );
- menuSeek->insertItem( i18n("Player Info"), this, SLOT( menuFunct(int) ), 0, MENU_FINGER );
- menuSeek->insertItem( QIconSet( myResource->LoadIcon( QString("history"), KIcon::Small ) ),
- i18n("Player History"), this, SLOT( menuFunct(int) ), 0, MENU_HISTORY );
+ menuSeek->insertItem( i18n("Accept This Match"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH );
+ menuSeek->insertItem( i18n("Tell..."), this, TQT_SLOT( menuFunct(int) ), 0, MENU_TELL );
+ menuSeek->insertItem( i18n("Assess..."), this, TQT_SLOT( menuFunct(int) ), 0, MENU_ASSESS );
+ menuSeek->insertItem( i18n("Player Info"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_FINGER );
+ menuSeek->insertItem( TQIconSet( myResource->LoadIcon( TQString("history"), KIcon::Small ) ),
+ i18n("Player History"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_HISTORY );
menuSeek->insertSeparator();
- menuSeek->insertItem( i18n("Add to Friends"), this, SLOT( menuFunct(int) ), 0, MENU_NOTIFY );
- menuSeek->insertItem( i18n("Ignore This Player"), this, SLOT( menuFunct(int) ), 0, MENU_CENSOR );
+ menuSeek->insertItem( i18n("Add to Friends"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_NOTIFY );
+ menuSeek->insertItem( i18n("Ignore This Player"), this, TQT_SLOT( menuFunct(int) ), 0, MENU_CENSOR );
menuSeek->setItemChecked( MENU_SEEK, FALSE );
- connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int ) ),
- this, SLOT( display_menuSeek( QListViewItem*, const QPoint&, int ) ) );
- connect( this, SIGNAL( executed( QListViewItem* ) ),
- this, SLOT( selectMatch( QListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint&, int ) ),
+ this, TQT_SLOT( display_menuSeek( TQListViewItem*, const TQPoint&, int ) ) );
+ connect( this, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ this, TQT_SLOT( selectMatch( TQListViewItem* ) ) );
}
tab_SeekList::~tab_SeekList()
{
@@ -116,9 +116,9 @@ void tab_SeekList::updateSoughtList( void )
// tab_SeekList::addSoughtItem
//
///////////////////////////////////////
-void tab_SeekList::addSoughtItem( const QString &src )
+void tab_SeekList::addSoughtItem( const TQString &src )
{
- QStringList fields = QStringList::split( QChar(' '), src, FALSE );
+ TQStringList fields = TQStringList::split( TQChar(' '), src, FALSE );
SF_01 << fields[2]; // Name
SF_02 << fields[1]; // Rating
SF_03 << fields[6]; // Match Type
@@ -132,13 +132,13 @@ void tab_SeekList::addSoughtItem( const QString &src )
// tab_SeekList::display_menuSeek
//
///////////////////////////////////////
-void tab_SeekList::display_menuSeek( QListViewItem *Item, const QPoint &Pos, int )
+void tab_SeekList::display_menuSeek( TQListViewItem *Item, const TQPoint &Pos, int )
{
bool enable;
if( Item != NULL )
{
setSelected( Item, TRUE );
- selectedPlayerName = Item->text(0).replace( QRegExp("\\(.+\\)"), QString("") );
+ selectedPlayerName = Item->text(0).tqreplace( TQRegExp("\\(.+\\)"), TQString("") );
selectedMatchID = Item->text(6).toInt();
enable = TRUE;
}
@@ -164,9 +164,9 @@ void tab_SeekList::display_menuSeek( QListViewItem *Item, const QPoint &Pos, int
void tab_SeekList::selectMatch( int matchID )
{
if( matchID )
- emit sendCMD( Command( 0, CMD_Start_Match, QString::number( matchID ) ) );
+ emit sendCMD( Command( 0, CMD_Start_Match, TQString::number( matchID ) ) );
}
-void tab_SeekList::selectMatch( QListViewItem *Item )
+void tab_SeekList::selectMatch( TQListViewItem *Item )
{
selectMatch( Item->text(6).toInt() );
}
@@ -186,7 +186,7 @@ void tab_SeekList::menuFunct( int funct )
emit sendCMD( Command( 0, CMD_Player_Finger, selectedPlayerName ) );
break;
case MENU_TELL:
- emit sendCMD( Command( 0, CMD_Set_Input, QString( "tell %1 " ).arg( selectedPlayerName ) ) );
+ emit sendCMD( Command( 0, CMD_Set_Input, TQString( "tell %1 " ).tqarg( selectedPlayerName ) ) );
break;
case MENU_NOTIFY:
emit sendCMD( Command( 0, CMD_Add_Friend, selectedPlayerName ) );
@@ -198,7 +198,7 @@ void tab_SeekList::menuFunct( int funct )
emit sendCMD( Command( 0, CMD_Player_History, selectedPlayerName ) );
break;
case MENU_ACCEPT_MATCH:
- emit sendCMD( Command( 0, CMD_Start_Match, QString::number( selectedMatchID ) ) );
+ emit sendCMD( Command( 0, CMD_Start_Match, TQString::number( selectedMatchID ) ) );
break;
case MENU_ASSESS:
emit sendCMD( Command( 0, CMD_Assess, selectedPlayerName ) );
diff --git a/knights/tab_seeklist.h b/knights/tab_seeklist.h
index 9796130..a93d09e 100644
--- a/knights/tab_seeklist.h
+++ b/knights/tab_seeklist.h
@@ -20,8 +20,8 @@
#include <kpopupmenu.h>
#include <klistview.h>
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include "command.h"
/**
@@ -33,33 +33,34 @@ class resource;
class tab_SeekList : public KListView
{
Q_OBJECT
+ TQ_OBJECT
private:
resource *myResource;
KPopupMenu *menuSeek;
bool seek;
int selectedMatchID;
- QString selectedPlayerName;
+ TQString selectedPlayerName;
/*
These StringLists temporarily store Sought Game data
until all ads have been displayed.
*/
- QStringList SF_01;
- QStringList SF_02;
- QStringList SF_03;
- QStringList SF_04;
- QStringList SF_05;
- QStringList SF_06;
- QStringList SF_07;
+ TQStringList SF_01;
+ TQStringList SF_02;
+ TQStringList SF_03;
+ TQStringList SF_04;
+ TQStringList SF_05;
+ TQStringList SF_06;
+ TQStringList SF_07;
public:
- tab_SeekList(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ tab_SeekList(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0);
~tab_SeekList();
public slots:
void recvCMD( const Command& );
- void display_menuSeek( QListViewItem*, const QPoint&, int );
- void selectMatch( QListViewItem *Item );
+ void display_menuSeek( TQListViewItem*, const TQPoint&, int );
+ void selectMatch( TQListViewItem *Item );
void selectMatch( int );
void menuFunct( int );
@@ -67,7 +68,7 @@ class tab_SeekList : public KListView
void sendCMD( const Command& );
protected:
- void addSoughtItem( const QString& );
+ void addSoughtItem( const TQString& );
void updateSoughtList( void );
};
diff --git a/knights/tabbox.cpp b/knights/tabbox.cpp
index bc8baed..bc103f4 100644
--- a/knights/tabbox.cpp
+++ b/knights/tabbox.cpp
@@ -20,22 +20,22 @@
#include "resource.h"
#include "accel.h"
#include <klocale.h>
-#include <qstyle.h>
-#include <qtabwidget.h>
+#include <tqstyle.h>
+#include <tqtabwidget.h>
-TabBox::TabBox( resource *rsrc ) : QVBox(0,"TabBox",Qt::WDestructiveClose)
+TabBox::TabBox( resource *rsrc ) : TQVBox(0,"TabBox",TQt::WDestructiveClose)
{
myResource = rsrc;
- setMargin( QApplication::style().defaultFrameWidth() );
+ setMargin( TQApplication::tqstyle().defaultFrameWidth() );
- myTabs = new QTabWidget( this, "myTabs" );
- myTabs->setTabShape( QTabWidget::Rounded );
- myTabs->setTabPosition( QTabWidget::Top );
+ myTabs = new TQTabWidget( this, "myTabs" );
+ myTabs->setTabShape( TQTabWidget::Rounded );
+ myTabs->setTabPosition( TQTabWidget::Top );
myAccel = new Accel( this, myResource->myAccel );
- connect( myTabs, SIGNAL( currentChanged( QWidget* ) ), this, SLOT( changeMyCaption( QWidget* ) ) );
- connect( this, SIGNAL( focus( const QChar& ) ), myResource->myAccel, SIGNAL( focus( const QChar& ) ) );
+ connect( myTabs, TQT_SIGNAL( currentChanged( TQWidget* ) ), this, TQT_SLOT( changeMyCaption( TQWidget* ) ) );
+ connect( this, TQT_SIGNAL( focus( const TQChar& ) ), myResource->myAccel, TQT_SIGNAL( focus( const TQChar& ) ) );
}
TabBox::~TabBox()
{
@@ -50,11 +50,11 @@ TabBox::~TabBox()
// TabBox::keyPressEvent
//
///////////////////////////////////////
-void TabBox::keyPressEvent( QKeyEvent *e )
+void TabBox::keyPressEvent( TQKeyEvent *e )
{
- QChar input;
+ TQChar input;
- if( ( e->state() | Qt::ShiftButton ) == Qt::ShiftButton )
+ if( ( e->state() | TQt::ShiftButton ) == TQt::ShiftButton )
{
input = e->text().at(0);
if( input.isLetterOrNumber() )
@@ -71,26 +71,26 @@ void TabBox::keyPressEvent( QKeyEvent *e )
// TabBox::addTab
//
///////////////////////////////////////
-void TabBox::addTab( QWidget *child, const QString &caption )
+void TabBox::addTab( TQWidget *child, const TQString &caption )
{
- if( QString( child->className() ) == "TabPage" )
+ if( TQString( child->className() ) == "TabPage" )
{
myTabs->addTab( child, caption );
myTabs->showPage( child );
changeMyCaption( child );
- connect( child, SIGNAL( newParent( TabBox* ) ), this, SIGNAL( newTabBox( TabBox* ) ) );
- connect( child, SIGNAL( requestDestruction() ), this, SLOT( destroyChild() ) );
+ connect( child, TQT_SIGNAL( newParent( TabBox* ) ), this, TQT_SIGNAL( newTabBox( TabBox* ) ) );
+ connect( child, TQT_SIGNAL( requestDestruction() ), this, TQT_SLOT( destroyChild() ) );
}
else
{
- TabPage *newPage = new TabPage( (QWidget*)this, child, myResource );
+ TabPage *newPage = new TabPage( (TQWidget*)this, child, myResource );
newPage->setCaption( caption );
myTabs->addTab( newPage, caption );
myTabs->showPage( newPage );
changeMyCaption( newPage );
- connect( newPage, SIGNAL( newParent( TabBox* ) ), this, SIGNAL( newTabBox( TabBox* ) ) );
- connect( newPage, SIGNAL( requestDestruction() ), this, SLOT( destroyChild() ) );
+ connect( newPage, TQT_SIGNAL( newParent( TabBox* ) ), this, TQT_SIGNAL( newTabBox( TabBox* ) ) );
+ connect( newPage, TQT_SIGNAL( requestDestruction() ), this, TQT_SLOT( destroyChild() ) );
}
}
///////////////////////////////////////
@@ -98,17 +98,17 @@ void TabBox::addTab( QWidget *child, const QString &caption )
// TabBox::removeTab
//
///////////////////////////////////////
-void TabBox::removeTab( QWidget *child, bool deleteChild )
+void TabBox::removeTab( TQWidget *child, bool deleteChild )
{
- if( QString( child->className() ) == "TabPage" )
+ if( TQString( child->className() ) == "TabPage" )
{
- emit saveTabGeometry( QString( ((TabPage*)child)->getChild()->className() ), size() );
+ emit saveTabGeometry( TQString( ((TabPage*)child)->getChild()->className() ), size() );
myTabs->removePage( child );
}
else
{
- emit saveTabGeometry( QString( child->className() ), size() );
- myTabs->removePage( child->parentWidget() );
+ emit saveTabGeometry( TQString( child->className() ), size() );
+ myTabs->removePage( child->tqparentWidget() );
}
/* Delete it if requested */
@@ -122,10 +122,10 @@ void TabBox::removeTab( QWidget *child, bool deleteChild )
// TabBox::showTab
//
///////////////////////////////////////
-void TabBox::showTab( QWidget *child )
+void TabBox::showTab( TQWidget *child )
{
if( isChild( child ) )
- myTabs->showPage( child->parentWidget() );
+ myTabs->showPage( child->tqparentWidget() );
}
///////////////////////////////////////
//
@@ -134,22 +134,22 @@ void TabBox::showTab( QWidget *child )
///////////////////////////////////////
void TabBox::destroyChild( void )
{
- QObject *child = ((QObject*)sender());
+ TQObject *child = ((TQObject*)sender());
/* Be careful... make sure we have a valid child calling us */
if( child == NULL )
return;
if( !child->isWidgetType() )
return;
- if( !isChild( ((QWidget*)child) ) )
+ if( !isChild( ((TQWidget*)child) ) )
return;
/* Nuke it */
- removeTab( ((QWidget*)child), TRUE );
+ removeTab( ((TQWidget*)child), TRUE );
if( count() == 0 )
{
- /* TabManager will be notified of the delete via QObject::destroyed(QObject*) */
+ /* TabManager will be notified of the delete via TQObject::destroyed(TQObject*) */
delete this;
}
}
@@ -158,9 +158,9 @@ void TabBox::destroyChild( void )
// TabBox::changeMyCaption
//
///////////////////////////////////////
-void TabBox::changeMyCaption( QWidget *child )
+void TabBox::changeMyCaption( TQWidget *child )
{
- setCaption( i18n("%1 - Knights").arg( myTabs->tabLabel( child ) ) );
+ setCaption( i18n("%1 - Knights").tqarg( myTabs->tabLabel( child ) ) );
}
///////////////////////////////////////
//
@@ -176,7 +176,7 @@ int TabBox::count( void )
// TabBox::isChild
//
///////////////////////////////////////
-bool TabBox::isChild( QWidget *child )
+bool TabBox::isChild( TQWidget *child )
{
for( int tmp=0; tmp < myTabs->count(); tmp++ )
{
@@ -192,17 +192,17 @@ bool TabBox::isChild( QWidget *child )
// TabBox::changeCaption
//
///////////////////////////////////////
-void TabBox::changeCaption( QWidget *child, const QString &caption )
+void TabBox::changeCaption( TQWidget *child, const TQString &caption )
{
- if( QString( child->className() ) == "TabPage" )
+ if( TQString( child->className() ) == "TabPage" )
{
((TabPage*)child)->setCaption( caption );
myTabs->setTabLabel( child, caption );
}
else if( isChild( child ) )
{
- ((TabPage*)child->parentWidget())->setCaption( caption );
- myTabs->setTabLabel( child->parentWidget(), caption );
+ ((TabPage*)child->tqparentWidget())->setCaption( caption );
+ myTabs->setTabLabel( child->tqparentWidget(), caption );
}
changeMyCaption( myTabs->currentPage() );
}
diff --git a/knights/tabbox.h b/knights/tabbox.h
index 0f3cffb..3c1f428 100644
--- a/knights/tabbox.h
+++ b/knights/tabbox.h
@@ -18,37 +18,38 @@
#ifndef TABBOX_H
#define TABBOX_H
-#include <qvbox.h>
+#include <tqvbox.h>
#include "accel.h"
-class QTabWidget;
+class TQTabWidget;
class resource;
/**
*@author Troy Corbin Jr.
*/
-class TabBox : public QVBox
+class TabBox : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
TabBox( resource *rsrc=0 );
virtual ~TabBox();
- void keyPressEvent( QKeyEvent* );
- void addTab( QWidget *child, const QString &caption );
- void removeTab( QWidget *child, bool deleteChild=FALSE );
- bool isChild( QWidget *child );
- void showTab( QWidget *child );
- void changeCaption( QWidget *child, const QString &caption );
+ void keyPressEvent( TQKeyEvent* );
+ void addTab( TQWidget *child, const TQString &caption );
+ void removeTab( TQWidget *child, bool deleteChild=FALSE );
+ bool isChild( TQWidget *child );
+ void showTab( TQWidget *child );
+ void changeCaption( TQWidget *child, const TQString &caption );
int count( void );
signals:
void newTabBox( TabBox* );
- void saveTabGeometry( const QString&, const QSize& );
- void focus( const QChar& );
+ void saveTabGeometry( const TQString&, const TQSize& );
+ void focus( const TQChar& );
protected slots:
- void changeMyCaption( QWidget *child );
+ void changeMyCaption( TQWidget *child );
/**
This removes and deletes a Tab if it's a child of this widget.
@@ -57,7 +58,7 @@ class TabBox : public QVBox
void destroyChild( void );
private:
- QTabWidget *myTabs;
+ TQTabWidget *myTabs;
Accel *myAccel;
resource *myResource;
};
diff --git a/knights/tabgrip.cpp b/knights/tabgrip.cpp
index 563dd8f..9891df1 100644
--- a/knights/tabgrip.cpp
+++ b/knights/tabgrip.cpp
@@ -17,9 +17,9 @@
#include "tabgrip.moc"
#include "resource.h"
-#include <qpainter.h>
+#include <tqpainter.h>
-TabGrip::TabGrip(QWidget *parent, const char *name ) : QWidget(parent,name)
+TabGrip::TabGrip(TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name)
{
setMaximumSize( 3200, 12 );
setMinimumSize( 32, 12 );
@@ -27,7 +27,7 @@ TabGrip::TabGrip(QWidget *parent, const char *name ) : QWidget(parent,name)
isDragging = FALSE;
couldDrag = FALSE;
- setCursor( Qt::SizeAllCursor );
+ setCursor( TQt::SizeAllCursor );
show();
}
@@ -39,10 +39,10 @@ TabGrip::~TabGrip()
// TabGrip::paintEvent
//
///////////////////////////////////////
-void TabGrip::paintEvent( QPaintEvent* )
+void TabGrip::paintEvent( TQPaintEvent* )
{
- QPainter paint( this );
- QColorGroup group( colorGroup() );
+ TQPainter paint( this );
+ TQColorGroup group( tqcolorGroup() );
paint.setPen( group.light() );
paint.drawLine( 2, 2, width() - 3, 2 );
paint.drawLine( 2, 5, width() - 3, 5 );
@@ -57,15 +57,15 @@ void TabGrip::paintEvent( QPaintEvent* )
// TabGrip::mousePressEvent
//
///////////////////////////////////////
-void TabGrip::mousePressEvent( QMouseEvent *event )
+void TabGrip::mousePressEvent( TQMouseEvent *event )
{
event->accept();
if(event->button() == Qt::LeftButton)
{
couldDrag = TRUE;
offset = mapToGlobal( event->pos() );
- offset.setX( topLevelWidget()->x() - offset.x() );
- offset.setY( topLevelWidget()->y() - offset.y() );
+ offset.setX( tqtopLevelWidget()->x() - offset.x() );
+ offset.setY( tqtopLevelWidget()->y() - offset.y() );
}
}
///////////////////////////////////////
@@ -73,7 +73,7 @@ void TabGrip::mousePressEvent( QMouseEvent *event )
// TabGrip::mouseMoveEvent
//
///////////////////////////////////////
-void TabGrip::mouseMoveEvent( QMouseEvent *event )
+void TabGrip::mouseMoveEvent( TQMouseEvent *event )
{
/*
By default, MouseMoveEvent is never called unless the user has
@@ -85,7 +85,7 @@ void TabGrip::mouseMoveEvent( QMouseEvent *event )
/* Dragging Page */
isDragging = TRUE;
couldDrag = FALSE;
- QApplication::setOverrideCursor( Qt::SizeAllCursor );
+ TQApplication::setOverrideCursor( TQt::SizeAllCursor );
}
}
///////////////////////////////////////
@@ -93,7 +93,7 @@ void TabGrip::mouseMoveEvent( QMouseEvent *event )
// TabGrip::mouseReleaseEvent
//
///////////////////////////////////////
-void TabGrip::mouseReleaseEvent( QMouseEvent *event )
+void TabGrip::mouseReleaseEvent( TQMouseEvent *event )
{
event->accept();
if(event->button() == Qt::LeftButton)
@@ -101,7 +101,7 @@ void TabGrip::mouseReleaseEvent( QMouseEvent *event )
couldDrag = FALSE;
if( isDragging )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
isDragging = FALSE;
emit wasDragged( event->globalPos(), offset );
}
diff --git a/knights/tabgrip.h b/knights/tabgrip.h
index a568a2e..116b38e 100644
--- a/knights/tabgrip.h
+++ b/knights/tabgrip.h
@@ -18,30 +18,31 @@
#ifndef TABGRIP_H
#define TABGRIP_H
-#include <qwidget.h>
+#include <tqwidget.h>
/**
*@author Troy Corbin Jr.
*/
-class TabGrip : public QWidget
+class TabGrip : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- TabGrip(QWidget *parent=0, const char *name=0);
+ TabGrip(TQWidget *tqparent=0, const char *name=0);
~TabGrip();
- void paintEvent( QPaintEvent* );
- void mouseMoveEvent( QMouseEvent *event );
- void mousePressEvent( QMouseEvent *event );
- void mouseReleaseEvent( QMouseEvent *event );
+ void paintEvent( TQPaintEvent* );
+ void mouseMoveEvent( TQMouseEvent *event );
+ void mousePressEvent( TQMouseEvent *event );
+ void mouseReleaseEvent( TQMouseEvent *event );
signals:
- void wasDragged( const QPoint&, const QPoint& );
+ void wasDragged( const TQPoint&, const TQPoint& );
private:
bool isDragging;
bool couldDrag;
- QPoint offset;
+ TQPoint offset;
};
#endif
diff --git a/knights/tabmanager.cpp b/knights/tabmanager.cpp
index f2d72fc..efd4899 100644
--- a/knights/tabmanager.cpp
+++ b/knights/tabmanager.cpp
@@ -19,9 +19,9 @@
#include "resource.h"
#include <kdebug.h>
-static QString myConfigGroup( "TabManager" );
+static TQString myConfigGroup( "TabManager" );
-TabManager::TabManager( resource *rsrc ) : QObject()
+TabManager::TabManager( resource *rsrc ) : TQObject()
{
myResource = rsrc;
appConfig = kapp->config();
@@ -36,7 +36,7 @@ TabManager::~TabManager()
// TabManager::addTab
//
///////////////////////////////////////
-void TabManager::addTab( QWidget *child, const QString &caption )
+void TabManager::addTab( TQWidget *child, const TQString &caption )
{
TabBox *boxPtr;
@@ -49,8 +49,8 @@ void TabManager::addTab( QWidget *child, const QString &caption )
/* Get Geometry from Saved Config */
appConfig->setGroup( myConfigGroup );
- QSize defaultSize( 420, 360 );
- QSize newSize = appConfig->readSizeEntry( QString( child->className() ), &defaultSize );
+ TQSize defaultSize( 420, 360 );
+ TQSize newSize = appConfig->readSizeEntry( TQString( child->className() ), &defaultSize );
boxPtr->resize( newSize );
boxPtr->show();
}
@@ -65,7 +65,7 @@ void TabManager::addTab( QWidget *child, const QString &caption )
// TabManager::changeCaption
//
///////////////////////////////////////
-void TabManager::changeCaption( QWidget *child, const QString &caption )
+void TabManager::changeCaption( TQWidget *child, const TQString &caption )
{
TabBox *boxPtr = getParentBox( child );
@@ -79,30 +79,30 @@ void TabManager::changeCaption( QWidget *child, const QString &caption )
// TabManager::removeTab
//
///////////////////////////////////////
-void TabManager::removeTab( QObject *child )
+void TabManager::removeTab( TQObject *child )
{
- /* Make sure this is a QWidget we can manipulate */
+ /* Make sure this is a TQWidget we can manipulate */
if( !child->isWidgetType() )
{
kdError() << "TabManager::removeTab: Can not remove non-widget class " << child->className() << endl;
return;
}
- if( myList.find( ((TabBox*)child) ) != -1 )
+ if( myList.tqfind( ((TabBox*)child) ) != -1 )
{
/* Remove Child Directly */
myList.remove( ((TabBox*)child) );
return;
}
- QString childName( ((QWidget*)child)->className() );
- TabBox *boxPtr = getParentBox( ((QWidget*)child) );
+ TQString childName( ((TQWidget*)child)->className() );
+ TabBox *boxPtr = getParentBox( ((TQWidget*)child) );
/* Remove this Child's Parent, the TabPage */
if( boxPtr != NULL )
{
kdDebug() << "Removing child: " << childName << endl;
- boxPtr->removeTab( ((QWidget*)child), TRUE );
+ boxPtr->removeTab( ((TQWidget*)child), TRUE );
if( boxPtr->count() == 0 )
{
myList.remove( boxPtr );
@@ -117,7 +117,7 @@ void TabManager::removeTab( QObject *child )
// TabManager::showTab
//
///////////////////////////////////////
-void TabManager::showTab( QWidget *child )
+void TabManager::showTab( TQWidget *child )
{
TabBox *boxPtr = getParentBox( child );
if( boxPtr != NULL )
@@ -130,7 +130,7 @@ void TabManager::showTab( QWidget *child )
// TabManager::isTab
//
///////////////////////////////////////
-bool TabManager::isTab( QWidget *child )
+bool TabManager::isTab( TQWidget *child )
{
if( getParentBox( child ) == NULL )
{
@@ -143,31 +143,31 @@ bool TabManager::isTab( QWidget *child )
// TabManager::saveTabGeometry
//
///////////////////////////////////////
-void TabManager::saveTabGeometry( const QString &childName, const QSize &childSize )
+void TabManager::saveTabGeometry( const TQString &childName, const TQSize &childSize )
{
/* Save This Widget's Size For Later */
appConfig->setGroup( myConfigGroup );
appConfig->writeEntry( childName, childSize );
appConfig->sync();
- kdDebug() << "Saved geometry for Widget: " << childName << endl;
+ kdDebug() << "Saved tqgeometry for Widget: " << childName << endl;
}
///////////////////////////////////////
//
// TabManager::childEvent
//
///////////////////////////////////////
-void TabManager::childEvent( QChildEvent *event )
+void TabManager::childEvent( TQChildEvent *event )
{
if( event->inserted() )
{
/* New Child */
- if( QString( event->child()->className() ) == "TabBox" )
+ if( TQString( TQT_TQOBJECT(event->child())->className() ) == "TabBox" )
{
manageNewBox( ((TabBox*)event->child()) );
return;
}
- addTab( ((QWidget*)event->child()), QString( "Untitled" ) );
+ addTab( ((TQWidget*)event->child()), TQString( "Untitled" ) );
}
}
///////////////////////////////////////
@@ -178,16 +178,16 @@ void TabManager::childEvent( QChildEvent *event )
void TabManager::manageNewBox( TabBox *newBox )
{
myList.append( newBox );
- connect( newBox, SIGNAL( destroyed( QObject* ) ), this, SLOT( removeTab( QObject* ) ) );
- connect( newBox, SIGNAL( saveTabGeometry( const QString&, const QSize& ) ), this, SLOT( saveTabGeometry( const QString&, const QSize& ) ) );
- connect( newBox, SIGNAL( newTabBox( TabBox* ) ), this, SLOT( manageNewBox( TabBox* ) ) );
+ connect( newBox, TQT_SIGNAL( destroyed( TQObject* ) ), this, TQT_SLOT( removeTab( TQObject* ) ) );
+ connect( newBox, TQT_SIGNAL( saveTabGeometry( const TQString&, const TQSize& ) ), this, TQT_SLOT( saveTabGeometry( const TQString&, const TQSize& ) ) );
+ connect( newBox, TQT_SIGNAL( newTabBox( TabBox* ) ), this, TQT_SLOT( manageNewBox( TabBox* ) ) );
}
///////////////////////////////////////
//
// TabManager::getParentBox
//
///////////////////////////////////////
-TabBox* TabManager::getParentBox( QWidget *child )
+TabBox* TabManager::getParentBox( TQWidget *child )
{
TabBox *boxPtr;
for( unsigned int index=0; index < myList.count(); index++ )
diff --git a/knights/tabmanager.h b/knights/tabmanager.h
index 78ae9ac..c9decbf 100644
--- a/knights/tabmanager.h
+++ b/knights/tabmanager.h
@@ -18,8 +18,8 @@
#ifndef TABMANAGER_H
#define TABMANAGER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <kapp.h>
#include <kconfig.h>
#include "tabbox.h"
@@ -28,30 +28,31 @@
*@author Troy Corbin Jr.
*/
-typedef QPtrList<TabBox> TabBoxList;
+typedef TQPtrList<TabBox> TabBoxList;
class resource;
-class TabManager : public QObject
+class TabManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
TabManager( resource *rsrc );
~TabManager();
- void addTab( QWidget *child, const QString &caption );
- void childEvent( QChildEvent *event );
- void changeCaption( QWidget *child, const QString &caption );
- void showTab( QWidget *child );
- bool isTab( QWidget *child );
+ void addTab( TQWidget *child, const TQString &caption );
+ void childEvent( TQChildEvent *event );
+ void changeCaption( TQWidget *child, const TQString &caption );
+ void showTab( TQWidget *child );
+ bool isTab( TQWidget *child );
public slots:
- void removeTab( QObject *child );
+ void removeTab( TQObject *child );
protected slots:
void manageNewBox( TabBox *newBox );
- void saveTabGeometry( const QString&, const QSize& );
+ void saveTabGeometry( const TQString&, const TQSize& );
protected:
- TabBox* getParentBox( QWidget* );
+ TabBox* getParentBox( TQWidget* );
private:
TabBoxList myList;
diff --git a/knights/tabpage.cpp b/knights/tabpage.cpp
index 863e34d..e532a81 100644
--- a/knights/tabpage.cpp
+++ b/knights/tabpage.cpp
@@ -22,41 +22,41 @@
#include <kiconloader.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
///////////////////////////////////////
//
// TabPage::constructor
//
///////////////////////////////////////
-TabPage::TabPage( QWidget *parent, QWidget *child, resource *rsrc ) : QVBox(parent)
+TabPage::TabPage( TQWidget *tqparent, TQWidget *child, resource *rsrc ) : TQVBox(tqparent)
{
myResource = rsrc;
myChild = child;
- actionBar = new QHBox( this );
+ actionBar = new TQHBox( this );
actionBar->show();
grip = new TabGrip( actionBar );
- connect( grip, SIGNAL( wasDragged(const QPoint&, const QPoint&) ), this, SLOT( tabDragged(const QPoint&, const QPoint&) ) );
+ connect( grip, TQT_SIGNAL( wasDragged(const TQPoint&, const TQPoint&) ), this, TQT_SLOT( tabDragged(const TQPoint&, const TQPoint&) ) );
- KIconLoader icons( QString( "knights" ) );
- QPixmap map = icons.loadIcon( QString("tab_remove"), KIcon::Small, 0, KIcon::DefaultState, 0, TRUE );
+ KIconLoader icons( TQString( "knights" ) );
+ TQPixmap map = icons.loadIcon( TQString("tab_remove"), KIcon::Small, 0, KIcon::DefaultState, 0, TRUE );
if( map.isNull() )
{
/* Keep for backward compatability with KDE 3.0 */
- map = icons.loadIcon( QString("fileclose"), KIcon::Small );
+ map = icons.loadIcon( TQString("fileclose"), KIcon::Small );
}
- closeButton = new QToolButton( actionBar, "closeButton" );
- closeButton->setIconSet( QIconSet( map ) );
+ closeButton = new TQToolButton( actionBar, "closeButton" );
+ closeButton->setIconSet( TQIconSet( map ) );
closeButton->setAutoRaise( TRUE );
closeButton->setTextLabel( i18n( "Close This Tab" ), TRUE );
- closeButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- connect( closeButton, SIGNAL( clicked() ), this, SIGNAL( requestDestruction() ) );
+ closeButton->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
+ connect( closeButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( requestDestruction() ) );
- myChild->reparent( this, QPoint( 0, 0 ), TRUE );
+ myChild->reparent( this, TQPoint( 0, 0 ), TRUE );
myChild->show();
show();
}
@@ -73,12 +73,12 @@ TabPage::~TabPage()
// TabPage::tabDragged
//
///////////////////////////////////////
-void TabPage::tabDragged( const QPoint &dest, const QPoint &offset )
+void TabPage::tabDragged( const TQPoint &dest, const TQPoint &offset )
{
- TabBox *myParent = parentTabBox();
+ TabBox *myParent = tqparentTabBox();
if( myParent != NULL )
{
- QWidget *destWidget = QApplication::widgetAt( dest, TRUE );
+ TQWidget *destWidget = TQApplication::widgetAt( dest, TRUE );
/* Find a TabBox */
while(1)
{
@@ -94,7 +94,7 @@ void TabPage::tabDragged( const QPoint &dest, const QPoint &offset )
newBox->addTab( this, myCaption );
break;
}
- if( QString( destWidget->className() ) == "TabBox" )
+ if( TQString( destWidget->className() ) == "TabBox" )
{
if( myParent != ((TabBox*)destWidget) )
{
@@ -108,17 +108,17 @@ void TabPage::tabDragged( const QPoint &dest, const QPoint &offset )
break;
}
}
- destWidget = destWidget->parentWidget();
+ destWidget = destWidget->tqparentWidget();
}
if( myParent->count() == 0 )
{
- /* TabManager will be notified of the delete via QObject::destroyed(QObject*) */
+ /* TabManager will be notified of the delete via TQObject::destroyed(TQObject*) */
delete myParent;
}
}
else
{
- kdError() << "TabPage::tabDragged: Can not move without a parent TabBox." << endl;
+ kdError() << "TabPage::tabDragged: Can not move without a tqparent TabBox." << endl;
}
}
///////////////////////////////////////
@@ -126,25 +126,25 @@ void TabPage::tabDragged( const QPoint &dest, const QPoint &offset )
// TabPage::setCaption
//
///////////////////////////////////////
-void TabPage::setCaption( const QString &caption )
+void TabPage::setCaption( const TQString &caption )
{
myCaption = caption;
}
///////////////////////////////////////
//
-// TabPage::parentTabBox
+// TabPage::tqparentTabBox
//
///////////////////////////////////////
-TabBox* TabPage::parentTabBox( void )
+TabBox* TabPage::tqparentTabBox( void )
{
- QWidget *myParent = this->parentWidget();
- if( QString( myParent->className() ) == "QWidgetStack" )
+ TQWidget *myParent = this->tqparentWidget();
+ if( TQString( myParent->className() ) == TQWIDGETSTACK_OBJECT_NAME_STRING )
{
- myParent = myParent->parentWidget();
- if( QString( myParent->className() ) == "QTabWidget" )
+ myParent = myParent->tqparentWidget();
+ if( TQString( myParent->className() ) == TQTABWIDGET_OBJECT_NAME_STRING )
{
- myParent = myParent->parentWidget();
- if( QString( myParent->className() ) == "TabBox" )
+ myParent = myParent->tqparentWidget();
+ if( TQString( myParent->className() ) == "TabBox" )
{
return ((TabBox*)myParent);
}
@@ -157,7 +157,7 @@ TabBox* TabPage::parentTabBox( void )
// TabPage::getChild
//
///////////////////////////////////////
-QWidget* TabPage::getChild( void )
+TQWidget* TabPage::getChild( void )
{
return myChild;
}
diff --git a/knights/tabpage.h b/knights/tabpage.h
index d5aeb28..ba1388c 100644
--- a/knights/tabpage.h
+++ b/knights/tabpage.h
@@ -18,46 +18,47 @@
#ifndef TABPAGE_H
#define TABPAGE_H
-#include <qframe.h>
-#include <qwidget.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qstring.h>
+#include <tqframe.h>
+#include <tqwidget.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqstring.h>
#include "tabbox.h"
/**
*@author Troy Corbin Jr.
*/
class resource;
-class QToolButton;
+class TQToolButton;
class TabGrip;
-class TabPage : public QVBox
+class TabPage : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- TabPage( QWidget *parent, QWidget *child, resource *rsrc );
+ TabPage( TQWidget *tqparent, TQWidget *child, resource *rsrc );
~TabPage();
- void setCaption( const QString& );
- QWidget* getChild( void );
+ void setCaption( const TQString& );
+ TQWidget* getChild( void );
protected slots:
- void tabDragged( const QPoint&, const QPoint& );
+ void tabDragged( const TQPoint&, const TQPoint& );
signals:
void newParent( TabBox* );
void requestDestruction( void );
protected:
- TabBox* parentTabBox( void );
+ TabBox* tqparentTabBox( void );
private:
- QString myCaption;
- QHBox *actionBar;
+ TQString myCaption;
+ TQHBox *actionBar;
TabGrip *grip;
- QToolButton *closeButton;
+ TQToolButton *closeButton;
- QWidget *myChild;
+ TQWidget *myChild;
resource *myResource;
};
diff --git a/knights/thinbuttons.cpp b/knights/thinbuttons.cpp
index ed97ba5..74457e3 100644
--- a/knights/thinbuttons.cpp
+++ b/knights/thinbuttons.cpp
@@ -17,10 +17,10 @@
#include "thinbuttons.moc"
#include <kicontheme.h>
-#include <qpushbutton.h>
-#include <qstyle.h>
+#include <tqpushbutton.h>
+#include <tqstyle.h>
-thinbuttons::thinbuttons(QWidget *parent, const char *name, resource *Rsrc ) : QFrame(parent,name)
+thinbuttons::thinbuttons(TQWidget *tqparent, const char *name, resource *Rsrc ) : TQFrame(tqparent,name)
{
Resource = Rsrc;
rightClickID = 0;
@@ -28,17 +28,17 @@ thinbuttons::thinbuttons(QWidget *parent, const char *name, resource *Rsrc ) : Q
/* Build the pop-up menu */
matchMenu = new KPopupMenu( this );
- matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filesave"), KIcon::Small ) ),
+ matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), KIcon::Small ) ),
i18n("&Save Match"), MENU_SAVE );
- matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filesave"), KIcon::Small ) ),
+ matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), KIcon::Small ) ),
i18n("Save Match &As..."), MENU_SAVEAS );
matchMenu->insertSeparator();
- matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileprint"), KIcon::Small ) ),
+ matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileprint"), KIcon::Small ) ),
i18n("&Print Notation..."), MENU_PRINT );
matchMenu->insertSeparator();
- matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileclose"), KIcon::Small ) ),
+ matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileclose"), KIcon::Small ) ),
i18n("&Close Match"), MENU_CLOSE );
- connect( matchMenu, SIGNAL( activated(int) ), this, SLOT( menuClicked(int) ) );
+ connect( matchMenu, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( menuClicked(int) ) );
}
thinbuttons::~thinbuttons()
{
@@ -48,25 +48,25 @@ thinbuttons::~thinbuttons()
// thinbuttons::childEvent
//
///////////////////////////////////////
-void thinbuttons::childEvent( QChildEvent * cev )
+void thinbuttons::childEvent( TQChildEvent * cev )
{
/* Make sure this method only effects child buttons */
- if( QString( cev->child()->name() ) != QString( "MatchSelector" ) )
+ if( TQString( TQT_TQOBJECT(cev->child())->name() ) != TQString( "MatchSelector" ) )
return;
if( cev->removed() )
- remove( (QButton*)cev->child() );
+ remove( (TQButton*)cev->child() );
}
///////////////////////////////////////
//
// thinbuttons::create
//
///////////////////////////////////////
-QButton* thinbuttons::create( int id )
+TQButton* thinbuttons::create( int id )
{
Buttons *newBut;
- QPushButton *newButton;
+ TQPushButton *newButton;
- newButton = new QPushButton( this, "MatchSelector" );
+ newButton = new TQPushButton( this, "MatchSelector" );
newBut = new Buttons;
newBut->button = newButton;
@@ -74,10 +74,10 @@ QButton* thinbuttons::create( int id )
buttons.append( newBut );
newButton->setToggleButton( TRUE );
- newButton->setText( QString("Match") );
+ newButton->setText( TQString("Match") );
newButton->show();
- connect( newButton, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) );
+ connect( newButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( buttonClicked() ) );
return newButton;
}
///////////////////////////////////////
@@ -97,24 +97,24 @@ void thinbuttons::setButton( int id )
{
currentBut->button->setDown( TRUE );
if( currentBut->button->isToggleButton() )
- if( currentBut->button->state() != QButton::On )
+ if( currentBut->button->state() != TQButton::On )
currentBut->button->toggle();
}
else
{
currentBut->button->setDown( FALSE );
if( currentBut->button->isToggleButton() )
- if( currentBut->button->state() == QButton::On )
+ if( currentBut->button->state() == TQButton::On )
currentBut->button->toggle();
}
}
}
///////////////////////////////////////
//
-// thinbuttons::find
+// thinbuttons::tqfind
//
///////////////////////////////////////
-QButton* thinbuttons::find( int id )
+TQButton* thinbuttons::tqfind( int id )
{
unsigned int tmp;
@@ -128,7 +128,7 @@ QButton* thinbuttons::find( int id )
// thinbuttons::id
//
///////////////////////////////////////
-int thinbuttons::id( QButton* button )
+int thinbuttons::id( TQButton* button )
{
unsigned int tmp;
@@ -142,22 +142,22 @@ int thinbuttons::id( QButton* button )
// thinbuttons::remove
//
///////////////////////////////////////
-void thinbuttons::remove( QButton* button )
+void thinbuttons::remove( TQButton* button )
{
unsigned int tmp;
for( tmp = 0; tmp < buttons.count(); tmp++ )
if( buttons.at( tmp )->button == button )
{
- disconnect( buttons.at( tmp )->button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) );
+ disconnect( buttons.at( tmp )->button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( buttonClicked() ) );
buttons.remove( tmp );
}
}
void thinbuttons::remove( const int &id )
{
- QButton *butt;
+ TQButton *butt;
- butt = find(id);
+ butt = tqfind(id);
if( butt != NULL )
{
remove( butt );
@@ -171,13 +171,13 @@ void thinbuttons::remove( const int &id )
///////////////////////////////////////
void thinbuttons::buttonClicked( void )
{
- const QObject *incomming;
+ const TQObject *incomming;
int Clicked;
unsigned int tmp;
- incomming = sender();
+ incomming = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
for( tmp = 0; tmp < buttons.count(); tmp++ )
- if( buttons.at( tmp )->button == ( const QButton* )incomming )
+ if( buttons.at( tmp )->button == ( const TQButton* )incomming )
{
Clicked = buttons.at( tmp )->ID;
if( Clicked == Null ) return;
@@ -193,7 +193,7 @@ void thinbuttons::buttonClicked( void )
void thinbuttons::resize( const int Width )
{
Buttons *button;
- QStyle& Style = QApplication::style();
+ TQStyle& Style = TQApplication::tqstyle();
int margin;
unsigned int Index;
@@ -213,9 +213,9 @@ void thinbuttons::resize( const int Width )
// thinbuttons::mousePressEvent
//
///////////////////////////////////////
-void thinbuttons::mousePressEvent( QMouseEvent *event )
+void thinbuttons::mousePressEvent( TQMouseEvent *event )
{
- QStyle& Style = QApplication::style();
+ TQStyle& Style = TQApplication::tqstyle();
int margin, xpos(0), index(0);
/* We only want RightClick */
diff --git a/knights/thinbuttons.h b/knights/thinbuttons.h
index 3171189..d933fb7 100644
--- a/knights/thinbuttons.h
+++ b/knights/thinbuttons.h
@@ -19,8 +19,8 @@
#define THINBUTTONS_H
#include <kpopupmenu.h>
-#include <qframe.h>
-#include <qbutton.h>
+#include <tqframe.h>
+#include <tqbutton.h>
#include "definitions.h"
#include "resource.h"
@@ -29,24 +29,25 @@
*/
struct Buttons
{
- QButton *button;
+ TQButton *button;
int ID;
};
-class thinbuttons : public QFrame
+class thinbuttons : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- thinbuttons(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ thinbuttons(TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0);
~thinbuttons();
- void mousePressEvent( QMouseEvent *event );
+ void mousePressEvent( TQMouseEvent *event );
void setButton( int id );
- QButton* find( int id );
- QButton* create( int id );
- void remove( QButton* button );
+ TQButton* tqfind( int id );
+ TQButton* create( int id );
+ void remove( TQButton* button );
void remove( const int &id );
void resize( const int Width );
- int id( QButton * );
+ int id( TQButton * );
signals:
void leftClick( int id );
@@ -58,12 +59,12 @@ class thinbuttons : public QFrame
void menuClicked( int item );
protected:
- void childEvent( QChildEvent * );
+ void childEvent( TQChildEvent * );
private:
resource *Resource;
KPopupMenu *matchMenu;
- QList<Buttons> buttons;
+ TQList<Buttons> buttons;
int buttWidth;
int rightClickID;
};
diff --git a/knights/wiz_setup.cpp b/knights/wiz_setup.cpp
index e584de3..f840d69 100644
--- a/knights/wiz_setup.cpp
+++ b/knights/wiz_setup.cpp
@@ -18,13 +18,13 @@
#include <kglobalsettings.h>
#include <kprocess.h>
#include <kstddirs.h>
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "wiz_setup.moc"
-wiz_setup::wiz_setup(QWidget *parent, const char *name, resource *Rsrc ) : KWizard(parent,name,TRUE)
+wiz_setup::wiz_setup(TQWidget *tqparent, const char *name, resource *Rsrc ) : KWizard(tqparent,name,TRUE)
{
myResource = Rsrc;
steps = 0;
@@ -50,7 +50,7 @@ wiz_setup::wiz_setup(QWidget *parent, const char *name, resource *Rsrc ) : KWiza
initPage5();
setCaption( i18n( "Knights Setup Wizard" ) );
- connect( this, SIGNAL( selected(const QString&) ), this, SLOT( slot_Work(const QString&) ) );
+ connect( this, TQT_SIGNAL( selected(const TQString&) ), this, TQT_SLOT( slot_Work(const TQString&) ) );
}
wiz_setup::~wiz_setup()
{
@@ -62,19 +62,19 @@ wiz_setup::~wiz_setup()
///////////////////////////////////////
void wiz_setup::initPage1( void )
{
- Page1 = new QFrame( this );
- P1B1 = new QGridLayout( Page1, 1, 4, 8 );
+ Page1 = new TQFrame( this );
+ P1B1 = new TQGridLayout( Page1, 1, 4, 8 );
- SideImage1 = new QLabel( Page1 );
+ SideImage1 = new TQLabel( Page1 );
SideImage1->setPixmap( locate("data", "knights/wizard.png" ) );
P1B1->addWidget( SideImage1, 1, 1 );
- WelcomeMessage = new QLabel( Page1 );
- WelcomeMessage->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ WelcomeMessage = new TQLabel( Page1 );
+ WelcomeMessage->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
WelcomeMessage->setText( i18n( "Thank you for installing Knights, the graphical chess interface for KDE. To help you get started quickly, there are a few things Knights will need to setup. You should click 'Next' to see what they are." ) );
P1B1->addWidget( WelcomeMessage, 1, 3 );
- addPage( Page1, i18n("Welcome to Knights v%1!").arg(_VERSION_) );
+ addPage( Page1, i18n("Welcome to Knights v%1!").tqarg(_VERSION_) );
setNextEnabled( Page1, TRUE );
setHelpEnabled( Page1, FALSE );
}
@@ -85,21 +85,21 @@ void wiz_setup::initPage1( void )
///////////////////////////////////////
void wiz_setup::initPage2( void )
{
- Page2 = new QFrame( this );
- P2B1 = new QGridLayout( Page2, 2, 4, 8 );
+ Page2 = new TQFrame( this );
+ P2B1 = new TQGridLayout( Page2, 2, 4, 8 );
- SideImage2 = new QLabel( Page2 );
+ SideImage2 = new TQLabel( Page2 );
SideImage2->setPixmap( locate("data", "knights/wizard.png" ) );
P2B1->addMultiCellWidget( SideImage2, 1, 2, 1, 1 );
- pgnExplain = new QLabel( Page2 );
- pgnExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ pgnExplain = new TQLabel( Page2 );
+ pgnExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
pgnExplain->setText( i18n( "When Knights saves a match to disk, it uses Portable Game Notation (PGN) to store the match. Several other computer chess games use PGN too. If you like, Knights can be the default PGN viewer on this system." ) );
P2B1->addWidget( pgnExplain, 1, 3 );
- pgnButtons = new QButtonGroup( 2, Qt::Vertical, i18n( "Let Knights handle PGN files?" ), Page2 );
- pgnYes = new QRadioButton( i18n( "Yes" ), pgnButtons );
- pgnNo = new QRadioButton( i18n( "No" ), pgnButtons );
+ pgnButtons = new TQButtonGroup( 2, Qt::Vertical, i18n( "Let Knights handle PGN files?" ), Page2 );
+ pgnYes = new TQRadioButton( i18n( "Yes" ), pgnButtons );
+ pgnNo = new TQRadioButton( i18n( "No" ), pgnButtons );
pgnButtons->setButton( 0 );
P2B1->addWidget( pgnButtons, 2, 3 );
@@ -113,21 +113,21 @@ void wiz_setup::initPage2( void )
///////////////////////////////////////
void wiz_setup::initPage3( void )
{
- Page3 = new QFrame( this );
- P3B1 = new QGridLayout( Page3, 2, 4, 8 );
+ Page3 = new TQFrame( this );
+ P3B1 = new TQGridLayout( Page3, 2, 4, 8 );
- SideImage3 = new QLabel( Page3 );
+ SideImage3 = new TQLabel( Page3 );
SideImage3->setPixmap( locate("data", "knights/wizard.png" ) );
P3B1->addMultiCellWidget( SideImage3, 1, 2, 1, 1 );
- engineExplain = new QLabel( Page3 );
- engineExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ engineExplain = new TQLabel( Page3 );
+ engineExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
engineExplain->setText( i18n( "Knights can not play a chess match against you without help. Known as Chess Engines, these helpers can be found on the Internet and are often included with your distribution. Knights can look for Chess Engines that you may already have. If found, Knights will configure itself to use them." ) );
P3B1->addWidget( engineExplain, 1, 3 );
- engineButtons = new QButtonGroup( 2, Qt::Vertical, i18n( "Let Knights search for chess engines?" ), Page3 );
- engineYes = new QRadioButton( i18n( "Yes" ), engineButtons );
- engineNo = new QRadioButton( i18n( "No" ), engineButtons );
+ engineButtons = new TQButtonGroup( 2, Qt::Vertical, i18n( "Let Knights search for chess engines?" ), Page3 );
+ engineYes = new TQRadioButton( i18n( "Yes" ), engineButtons );
+ engineNo = new TQRadioButton( i18n( "No" ), engineButtons );
engineButtons->setButton( 0 );
P3B1->addWidget( engineButtons, 2, 3 );
@@ -141,21 +141,21 @@ void wiz_setup::initPage3( void )
///////////////////////////////////////
void wiz_setup::initPage4( void )
{
- Page4 = new QFrame( this );
- P4B1 = new QGridLayout( Page4, 2, 4, 8 );
+ Page4 = new TQFrame( this );
+ P4B1 = new TQGridLayout( Page4, 2, 4, 8 );
- SideImage4 = new QLabel( Page4 );
+ SideImage4 = new TQLabel( Page4 );
SideImage4->setPixmap( locate("data", "knights/wizard.png" ) );
P4B1->addMultiCellWidget( SideImage4, 1, 2, 1, 1 );
- serverExplain = new QLabel( Page4 );
- serverExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ serverExplain = new TQLabel( Page4 );
+ serverExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
serverExplain->setText( i18n( "In order for you to play chess online, Knights will have to connect to a chess server. Knights has a list of several of these servers. If you like, this list can be used to automatically configure Knights." ) );
P4B1->addWidget( serverExplain, 1, 3 );
- serverButtons = new QButtonGroup( 2, Qt::Vertical, i18n( "Let Knights configure chess servers?" ), Page4 );
- serverYes = new QRadioButton( i18n( "Yes" ), serverButtons );
- serverNo = new QRadioButton( i18n( "No" ), serverButtons );
+ serverButtons = new TQButtonGroup( 2, Qt::Vertical, i18n( "Let Knights configure chess servers?" ), Page4 );
+ serverYes = new TQRadioButton( i18n( "Yes" ), serverButtons );
+ serverNo = new TQRadioButton( i18n( "No" ), serverButtons );
serverButtons->setButton( 0 );
P4B1->addWidget( serverButtons, 2, 3 );
@@ -169,15 +169,15 @@ void wiz_setup::initPage4( void )
///////////////////////////////////////
void wiz_setup::initPage5( void )
{
- Page5 = new QFrame( this );
- P5B1 = new QGridLayout( Page5, 2, 4, 8 );
+ Page5 = new TQFrame( this );
+ P5B1 = new TQGridLayout( Page5, 2, 4, 8 );
- SideImage5 = new QLabel( Page5 );
+ SideImage5 = new TQLabel( Page5 );
SideImage5->setPixmap( locate("data", "knights/wizard.png" ) );
P5B1->addMultiCellWidget( SideImage5, 1, 2, 1, 1 );
- FinishExplain = new QLabel( Page5 );
- FinishExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ FinishExplain = new TQLabel( Page5 );
+ FinishExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
FinishExplain->setText( i18n( "Knights has now configured itself according to your choices. We strongly recommend that you read the documentation to make full use of all that Knights has to offer. You can access it by pressing F1." ) );
P5B1->addWidget( FinishExplain, 1, 3 );
@@ -192,39 +192,39 @@ void wiz_setup::initPage5( void )
///////////////////////////////////////
void wiz_setup::initPage6( void )
{
- QString f( locate("data", "LICENSES/GPL_V2") );
- QString licenseText("<K_STD>");
- Page6 = new QVBox( this );
+ TQString f( locate("data", "LICENSES/GPL_V2") );
+ TQString licenseText("<K_STD>");
+ Page6 = new TQVBox( this );
/* Setup License View */
licenseView = new KnightsTextView( Page6, myResource );
if (!f.isEmpty())
{
- QFile file(f);
+ TQFile file(f);
if (file.open(IO_ReadOnly))
{
- QTextStream str(&file);
+ TQTextStream str(&file);
licenseText += str.read();
}
}
licenseText.append( "</K_STD>" );
licenseView->setText( licenseText );
- licenseButtons = new QButtonGroup( 2, Qt::Horizontal, i18n( "Do you accept the terms of our license?" ), Page6 );
- licenseYes = new QRadioButton( i18n( "Yes" ), licenseButtons );
- licenseNo = new QRadioButton( i18n( "No" ), licenseButtons );
+ licenseButtons = new TQButtonGroup( 2, Qt::Horizontal, i18n( "Do you accept the terms of our license?" ), Page6 );
+ licenseYes = new TQRadioButton( i18n( "Yes" ), licenseButtons );
+ licenseNo = new TQRadioButton( i18n( "No" ), licenseButtons );
licenseButtons->setButton( 1 );
addPage( Page6, i18n("Please read and accept our license:") );
setHelpEnabled( Page6, FALSE );
- connect( licenseButtons, SIGNAL( clicked(int) ), this, SLOT( slot_License(int) ) );
+ connect( licenseButtons, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( slot_License(int) ) );
}
///////////////////////////////////////
//
// wiz_setup::slot_Work
//
///////////////////////////////////////
-void wiz_setup::slot_Work( const QString& pageTitle )
+void wiz_setup::slot_Work( const TQString& pageTitle )
{
/* Don't let 'em past the license */
if( pageTitle == title( Page6 ) )
@@ -263,7 +263,7 @@ void wiz_setup::setupPGN( void )
void wiz_setup::setupServers( void )
{
serverResource *newServer;
- QStringList names, urls, ports;
+ TQStringList names, urls, ports;
unsigned int loop;
names << i18n("Free Internet Chess Server") << i18n("Internet Chess Club") << i18n("Global Chess Server") << i18n("Chess.Net");
@@ -282,9 +282,9 @@ void wiz_setup::setupServers( void )
newServer->Name = names[loop];
newServer->URL = urls[loop];
newServer->Port = ports[loop].toInt();
- newServer->LogFile = QString::null;
- newServer->UserName = QString::null;
- newServer->Password = QString::null;
+ newServer->LogFile = TQString();
+ newServer->UserName = TQString();
+ newServer->Password = TQString();
newServer->StorePass = FALSE;
if( !loop ) newServer->CurrentRef = TRUE;
else newServer->CurrentRef = FALSE;
@@ -300,7 +300,7 @@ void wiz_setup::setupServers( void )
void wiz_setup::findEngines( void )
{
engineResource *newEngine;
- QStringList names, filenames;
+ TQStringList names, filenames;
KProcess *Shell;
bool foundOne( FALSE );
unsigned int loop;
@@ -322,8 +322,8 @@ void wiz_setup::findEngines( void )
newEngine = new engineResource;
newEngine->Name = names[loop];
newEngine->Filename = filenames[loop];
- newEngine->Arguments = QString::null;
- newEngine->LogFile = QString::null;
+ newEngine->Arguments = TQString();
+ newEngine->LogFile = TQString();
newEngine->Protocol = XBoard;
newEngine->Wins = 0;
newEngine->Losses = 0;
diff --git a/knights/wiz_setup.h b/knights/wiz_setup.h
index edd5f9e..bd8f4a1 100644
--- a/knights/wiz_setup.h
+++ b/knights/wiz_setup.h
@@ -19,13 +19,13 @@
#define WIZ_SETUP_H
#include <kwizard.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
#include "resource.h"
#include "definitions.h"
#include "knightstextview.h"
@@ -37,11 +37,12 @@
class wiz_setup : public KWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
- wiz_setup( QWidget *parent=0, const char *name=0, resource *Rsrc=0 );
+ wiz_setup( TQWidget *tqparent=0, const char *name=0, resource *Rsrc=0 );
~wiz_setup();
protected slots:
- void slot_Work( const QString& pageTitle );
+ void slot_Work( const TQString& pageTitle );
void slot_License( int );
protected:
void initPage1( void );
@@ -57,40 +58,40 @@ class wiz_setup : public KWizard
resource *myResource;
int steps;
- QFrame *Page1;
- QGridLayout *P1B1;
- QLabel *SideImage1;
- QLabel *WelcomeMessage;
- QFrame *Page2;
- QGridLayout *P2B1;
- QLabel *SideImage2;
- QLabel *pgnExplain;
- QButtonGroup *pgnButtons;
- QRadioButton *pgnYes;
- QRadioButton *pgnNo;
- QFrame *Page3;
- QGridLayout *P3B1;
- QLabel *SideImage3;
- QLabel *engineExplain;
- QButtonGroup *engineButtons;
- QRadioButton *engineYes;
- QRadioButton *engineNo;
- QFrame *Page4;
- QGridLayout *P4B1;
- QLabel *SideImage4;
- QLabel *serverExplain;
- QButtonGroup *serverButtons;
- QRadioButton *serverYes;
- QRadioButton *serverNo;
- QFrame *Page5;
- QGridLayout *P5B1;
- QLabel *SideImage5;
- QLabel *FinishExplain;
- QVBox *Page6;
+ TQFrame *Page1;
+ TQGridLayout *P1B1;
+ TQLabel *SideImage1;
+ TQLabel *WelcomeMessage;
+ TQFrame *Page2;
+ TQGridLayout *P2B1;
+ TQLabel *SideImage2;
+ TQLabel *pgnExplain;
+ TQButtonGroup *pgnButtons;
+ TQRadioButton *pgnYes;
+ TQRadioButton *pgnNo;
+ TQFrame *Page3;
+ TQGridLayout *P3B1;
+ TQLabel *SideImage3;
+ TQLabel *engineExplain;
+ TQButtonGroup *engineButtons;
+ TQRadioButton *engineYes;
+ TQRadioButton *engineNo;
+ TQFrame *Page4;
+ TQGridLayout *P4B1;
+ TQLabel *SideImage4;
+ TQLabel *serverExplain;
+ TQButtonGroup *serverButtons;
+ TQRadioButton *serverYes;
+ TQRadioButton *serverNo;
+ TQFrame *Page5;
+ TQGridLayout *P5B1;
+ TQLabel *SideImage5;
+ TQLabel *FinishExplain;
+ TQVBox *Page6;
KnightsTextView *licenseView;
- QButtonGroup *licenseButtons;
- QRadioButton *licenseYes;
- QRadioButton *licenseNo;
+ TQButtonGroup *licenseButtons;
+ TQRadioButton *licenseYes;
+ TQRadioButton *licenseNo;
};
#endif