Replace TRUE/FALSE with boolean values true/false

Manually cherry-picked from commit bc9439c

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
r14.1.x
Michele Calgaro 5 months ago
parent 453bebd01b
commit 9184ab1fcd
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -20,19 +20,19 @@
Accel::Accel( TQWidget *parent, TQObject *target ) : TDEAccel( parent ) Accel::Accel( TQWidget *parent, TQObject *target ) : TDEAccel( parent )
{ {
insertItem( i18n("Previous Move"), "Previous Move", Key_Up, TRUE ); insertItem( i18n("Previous Move"), "Previous Move", Key_Up, true );
insertItem( i18n("Next Move"), "Next Move", Key_Down, TRUE ); insertItem( i18n("Next Move"), "Next Move", Key_Down, true );
insertItem( i18n("Enter Text"), "Enter Text", Key_Return, TRUE ); insertItem( i18n("Enter Text"), "Enter Text", Key_Return, true );
insertItem( i18n("Page Up"), "Page Up", Key_PageUp, TRUE ); insertItem( i18n("Page Up"), "Page Up", Key_PageUp, true );
insertItem( i18n("Page Down"), "Page Down", Key_PageDown, TRUE ); insertItem( i18n("Page Down"), "Page Down", Key_PageDown, true );
insertItem( i18n("Increase Board Size"), "Board Up", ALT + Key_Plus, TRUE ); insertItem( i18n("Increase Board Size"), "Board Up", ALT + Key_Plus, true );
insertItem( i18n("Decrease Board Size"), "Board Down", ALT + Key_Minus, TRUE ); insertItem( i18n("Decrease Board Size"), "Board Down", ALT + Key_Minus, true );
insertItem( i18n("Last History Item"), "Last History Item", SHIFT + Key_Up, TRUE ); insertItem( i18n("Last History Item"), "Last History Item", SHIFT + Key_Up, true );
insertItem( i18n("Next History Item"), "Next History Item", SHIFT + Key_Down, TRUE ); insertItem( i18n("Next History Item"), "Next History Item", SHIFT + Key_Down, true );
insertItem( i18n("Reply to the Last Tell"), "Tell Reply", ALT + Key_R, TRUE ); insertItem( i18n("Reply to the Last Tell"), "Tell Reply", ALT + Key_R, true );
insertItem( i18n("Reply to the Channel"), "Channel Reply", ALT + Key_C, TRUE ); insertItem( i18n("Reply to the Channel"), "Channel Reply", ALT + Key_C, true );
insertItem( i18n("Kibitz"), "Kibitz", ALT + Key_K, TRUE ); insertItem( i18n("Kibitz"), "Kibitz", ALT + Key_K, true );
insertItem( i18n("Whisper"), "Whisper", ALT + Key_W, TRUE ); insertItem( i18n("Whisper"), "Whisper", ALT + Key_W, true );
readSettings(); readSettings();
if( target ) if( target )

@ -43,18 +43,18 @@ audio::audio()
{ {
a = new audioPrivate; a = new audioPrivate;
a->server = Arts::Reference("global:Arts_SoundServerV2"); a->server = Arts::Reference("global:Arts_SoundServerV2");
a->fileRef.setAutoDelete( TRUE ); a->fileRef.setAutoDelete( true );
if( a->server.isNull() ) if( a->server.isNull() )
{ {
a->enabled = FALSE; a->enabled = false;
kdWarning() << "audio::audio: Can not create Arts::SoundServerV2" << endl; kdWarning() << "audio::audio: Can not create Arts::SoundServerV2" << endl;
} }
else else
{ {
a->enabled = TRUE; a->enabled = true;
a->playObjectFactory = Arts::Reference("global:Arts_PlayObjectFactory"); a->playObjectFactory = Arts::Reference("global:Arts_PlayObjectFactory");
} }
a->firstTime = TRUE; a->firstTime = true;
} }
audio::~audio() audio::~audio()
{ {
@ -118,7 +118,7 @@ void audio::setTheme( const TQString &newTheme )
kdWarning() << "audio::setTheme: Can not access theme.conf from " << newTheme << endl; kdWarning() << "audio::setTheme: Can not access theme.conf from " << newTheme << endl;
return; return;
} }
themeConfig = new KSimpleConfig( configFile, TRUE ); themeConfig = new KSimpleConfig( configFile, true );
/* Read the details about this theme */ /* Read the details about this theme */
themeConfig->setGroup( "General" ); themeConfig->setGroup( "General" );
@ -142,7 +142,7 @@ void audio::setTheme( const TQString &newTheme )
prepFile( a->theme + themeConfig->readEntry("DrawOffer"), SND_DRAW_OFFER ); prepFile( a->theme + themeConfig->readEntry("DrawOffer"), SND_DRAW_OFFER );
prepFile( a->theme + themeConfig->readEntry("Say"), SND_SAY ); prepFile( a->theme + themeConfig->readEntry("Say"), SND_SAY );
prepFile( a->theme + themeConfig->readEntry("Promote"), SND_PROMOTE ); prepFile( a->theme + themeConfig->readEntry("Promote"), SND_PROMOTE );
a->firstTime = FALSE; a->firstTime = false;
delete themeConfig; delete themeConfig;
TDEIO::NetAccess::removeTempFile( configFile ); TDEIO::NetAccess::removeTempFile( configFile );
@ -156,7 +156,7 @@ void audio::prepFile( const TQString &source, const int &ref )
return; return;
dest = new KTempFile( TQString(), source.right(4), 700 ); dest = new KTempFile( TQString(), source.right(4), 700 );
dest->setAutoDelete( TRUE ); dest->setAutoDelete( true );
filename = dest->name(); filename = dest->name();
if( !TDEIO::NetAccess::download( source, filename ) ) if( !TDEIO::NetAccess::download( source, filename ) )

@ -29,14 +29,14 @@ board_2d::board_2d(TQWidget *parent, const char *name, resource *Rsrc, logic *Lg
{ {
updateX1 = updateY1 = 4000; updateX1 = updateY1 = 4000;
updateX2 = updateY2 = -4000; updateX2 = updateY2 = -4000;
init = TRUE; init = true;
premoveFrom = Null; premoveFrom = Null;
premoveTo = Null; premoveTo = Null;
DragSprite = NULL; DragSprite = NULL;
lastMoveWasDrag = FALSE; lastMoveWasDrag = false;
cache = myResource->pixCache; cache = myResource->pixCache;
int size = 8 + ( 1 * ( myResource->ThemeBorder == TRUE ) ); int size = 8 + ( 1 * ( myResource->ThemeBorder == true ) );
sprites.setAutoDelete( TRUE ); sprites.setAutoDelete( true );
/* Setup Pixmaps */ /* Setup Pixmaps */
myself.setOptimization( TQPixmap::BestOptim ); myself.setOptimization( TQPixmap::BestOptim );
@ -148,7 +148,7 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
TQTimer::singleShot( 0, this, TQ_SLOT( updateSprites() ) ); TQTimer::singleShot( 0, this, TQ_SLOT( updateSprites() ) );
sprite *spritePtr = new sprite; sprite *spritePtr = new sprite;
spritePtr->Steps = 1; spritePtr->Steps = 1;
spritePtr->Restore = FALSE; spritePtr->Restore = false;
spritePtr->POSITION_Origin = fromPtr; spritePtr->POSITION_Origin = fromPtr;
spritePtr->POSITION_Destination = toPtr; spritePtr->POSITION_Destination = toPtr;
spritePtr->POSITION_TargetTaken = takenPtr; spritePtr->POSITION_TargetTaken = takenPtr;
@ -180,7 +180,7 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
/* Draw the originating position */ /* Draw the originating position */
drawPosition( fromPtr ); drawPosition( fromPtr );
if( TQString( chessMove.SAN ).contains( "o-o", FALSE ) ) if( TQString( chessMove.SAN ).contains( "o-o", false ) )
{ {
/* This is a castle */ /* This is a castle */
ChessMove newMove; ChessMove newMove;
@ -188,7 +188,7 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
newMove.fromRank = chessMove.fromRank; newMove.fromRank = chessMove.fromRank;
newMove.toRank = chessMove.toRank; newMove.toRank = chessMove.toRank;
newMove.ManTaken = Null; newMove.ManTaken = Null;
if( TQString( chessMove.SAN ).contains( "o-o-o", FALSE ) ) if( TQString( chessMove.SAN ).contains( "o-o-o", false ) )
{ {
/* Queenside */ /* Queenside */
newMove.fromFile = 0; newMove.fromFile = 0;
@ -202,7 +202,7 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
} }
drawMove( newMove, reverse ); drawMove( newMove, reverse );
} }
lastMoveWasDrag = FALSE; lastMoveWasDrag = false;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -211,8 +211,8 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
/////////////////////////////////////// ///////////////////////////////////////
void board_2d::resizeBoard( void ) void board_2d::resizeBoard( void )
{ {
int size = 8 + ( 1 * ( myResource->ThemeBorder == TRUE ) ); int size = 8 + ( 1 * ( myResource->ThemeBorder == true ) );
init = FALSE; init = false;
/* Resize myself */ /* Resize myself */
myself.resize( myResource->ThemeSize * size, myResource->ThemeSize * size); myself.resize( myResource->ThemeSize * size, myResource->ThemeSize * size);
@ -407,16 +407,16 @@ void board_2d::drawPosition( const int &pos )
{ {
case NOTE_HIGHLIGHT: // Fall Through case NOTE_HIGHLIGHT: // Fall Through
case NOTE_SELECT: case NOTE_SELECT:
bitBlt( &buffer, 0, 0, &cache->HighlightSelect, 0, 0, -1, -1, TQt::CopyROP, FALSE); bitBlt( &buffer, 0, 0, &cache->HighlightSelect, 0, 0, -1, -1, TQt::CopyROP, false);
break; break;
case NOTE_MOVE: // Fall Through case NOTE_MOVE: // Fall Through
case NOTE_CASTLE: // Fall Through case NOTE_CASTLE: // Fall Through
case NOTE_PAWN_DOUBLE: case NOTE_PAWN_DOUBLE:
bitBlt( &buffer, 0, 0, &cache->HighlightMove, 0, 0, -1, -1, TQt::CopyROP, FALSE); bitBlt( &buffer, 0, 0, &cache->HighlightMove, 0, 0, -1, -1, TQt::CopyROP, false);
break; break;
case NOTE_ATTACK: // Fall Through case NOTE_ATTACK: // Fall Through
case NOTE_ENPASSANT: case NOTE_ENPASSANT:
bitBlt( &buffer, 0, 0, &cache->HighlightAttack, 0, 0, -1, -1, TQt::CopyROP, FALSE); bitBlt( &buffer, 0, 0, &cache->HighlightAttack, 0, 0, -1, -1, TQt::CopyROP, false);
break; break;
default: default:
break; break;
@ -424,7 +424,7 @@ void board_2d::drawPosition( const int &pos )
if( !isSprite(pos) ) if( !isSprite(pos) )
{ {
TQPixmap chessman = getChessman( pos ); TQPixmap chessman = getChessman( pos );
bitBlt( &buffer, 0, 0, &chessman, 0, 0, -1, -1, TQt::CopyROP, FALSE); bitBlt( &buffer, 0, 0, &chessman, 0, 0, -1, -1, TQt::CopyROP, false);
} }
/* Now add this pixmap to the cache */ /* Now add this pixmap to the cache */
cache->add( cacheName, buffer ); cache->add( cacheName, buffer );
@ -504,7 +504,7 @@ void board_2d::mouseReleaseEvent( TQMouseEvent *event )
DragSprite = NULL; DragSprite = NULL;
drawPosition( tmp ); drawPosition( tmp );
commit(); commit();
lastMoveWasDrag = TRUE; lastMoveWasDrag = true;
} }
if(event->button() == TQt::LeftButton) if(event->button() == TQt::LeftButton)
@ -560,7 +560,7 @@ void board_2d::mouseMoveEvent( TQMouseEvent *event )
/* Get the piece image and store it in dragPix */ /* Get the piece image and store it in dragPix */
DragSprite->PIXMAP_Sprite = getChessman( DragSprite->POSITION_Origin ); DragSprite->PIXMAP_Sprite = getChessman( DragSprite->POSITION_Origin );
DragSprite->PIXMAP_FlipFrame.resize( DragSprite->PIXMAP_Sprite.size() ); DragSprite->PIXMAP_FlipFrame.resize( DragSprite->PIXMAP_Sprite.size() );
DragSprite->Restore = FALSE; DragSprite->Restore = false;
} }
else else
/* Not enough dragging */ /* Not enough dragging */
@ -696,9 +696,9 @@ void board_2d::drawSprites( void )
for( index = (signed int)sprites.count() - 1; index > -1; index-- ) for( index = (signed int)sprites.count() - 1; index > -1; index-- )
{ {
spritePtr = sprites.at(index); spritePtr = sprites.at(index);
if( spritePtr->Restore == FALSE ) if( spritePtr->Restore == false )
{ {
spritePtr->Restore = TRUE; spritePtr->Restore = true;
} }
else else
{ {
@ -783,10 +783,10 @@ bool board_2d::isSprite( const int &pos )
sprite *tmpSprite = sprites.at( index ); sprite *tmpSprite = sprites.at( index );
if( tmpSprite->POSITION_Origin == pos ) if( tmpSprite->POSITION_Origin == pos )
{ {
return TRUE; return true;
} }
} }
return FALSE; return false;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //

@ -51,7 +51,7 @@ class board_2d : public board_base
public: public:
board_2d(TQWidget *parent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0); board_2d(TQWidget *parent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
~board_2d(); ~board_2d();
virtual void drawMove( const ChessMove &chessMove, const bool &reverse=FALSE ); virtual void drawMove( const ChessMove &chessMove, const bool &reverse=false );
virtual void setPremovePositions( const int&, const int& ); virtual void setPremovePositions( const int&, const int& );
virtual void redrawLights( void ); virtual void redrawLights( void );
void paintEvent( TQPaintEvent *event ); void paintEvent( TQPaintEvent *event );

@ -37,7 +37,7 @@ class board_base : public TQWidget
public: public:
board_base(TQWidget *parent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0); board_base(TQWidget *parent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
virtual ~board_base(); virtual ~board_base();
virtual void drawMove( const ChessMove &chessMove, const bool &reverse=FALSE ); virtual void drawMove( const ChessMove &chessMove, const bool &reverse=false );
virtual void setPremovePositions( const int&, const int& ); virtual void setPremovePositions( const int&, const int& );
virtual void redrawLights( void ); virtual void redrawLights( void );

@ -55,7 +55,7 @@ Challenge_Graph::Challenge_Graph( TQWidget* parent, const char* name, resource *
{ {
max_rating = 2600; max_rating = 2600;
max_time = 60; max_time = 60;
seek = FALSE; seek = false;
graph = new TQCanvas( 0, "Challenge_Graph" ); graph = new TQCanvas( 0, "Challenge_Graph" );
myStatusBar = new TQLabel( this, "Challenge_Graph_Status_Bar" ); myStatusBar = new TQLabel( this, "Challenge_Graph_Status_Bar" );
@ -71,7 +71,7 @@ Challenge_Graph::Challenge_Graph( TQWidget* parent, const char* name, resource *
clear(); clear();
menuSeek = new TDEPopupMenu( this ); menuSeek = new TDEPopupMenu( this );
menuSeek->setCheckable( TRUE ); menuSeek->setCheckable( true );
menuSeek->insertItem( i18n("Seek Matches"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_SEEK ); menuSeek->insertItem( i18n("Seek Matches"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_SEEK );
menuSeek->insertSeparator(); menuSeek->insertSeparator();
menuSeek->insertItem( i18n("Accept This Match"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH ); menuSeek->insertItem( i18n("Accept This Match"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH );
@ -83,7 +83,7 @@ Challenge_Graph::Challenge_Graph( TQWidget* parent, const char* name, resource *
menuSeek->insertSeparator(); menuSeek->insertSeparator();
menuSeek->insertItem( i18n("Add to Friends"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_NOTIFY ); menuSeek->insertItem( i18n("Add to Friends"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_NOTIFY );
menuSeek->insertItem( i18n("Ignore This Player"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_CENSOR ); menuSeek->insertItem( i18n("Ignore This Player"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_CENSOR );
menuSeek->setItemChecked( MENU_SEEK, FALSE ); menuSeek->setItemChecked( MENU_SEEK, false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -199,7 +199,7 @@ bool Challenge_Graph::isEmpty(int x, int y)
} }
/* This function does a spiral search for the nearest neighbour */ /* This function does a spiral search for the nearest neighbour */
/* Pre: TRUE /* Pre: true
Post: Finds the nearest non-overlapping position to the original coordinates */ Post: Finds the nearest non-overlapping position to the original coordinates */
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -389,7 +389,7 @@ void Challenge_Graph::updateSoughtList( void )
SF_05.clear(); SF_05.clear();
SF_06.clear(); SF_06.clear();
SF_07.clear(); SF_07.clear();
seek = TRUE; seek = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -398,7 +398,7 @@ void Challenge_Graph::updateSoughtList( void )
/////////////////////////////////////// ///////////////////////////////////////
void Challenge_Graph::addSoughtItem( const TQString &src ) void Challenge_Graph::addSoughtItem( const TQString &src )
{ {
TQStringList fields = TQStringList::split( TQChar(' '), src, FALSE ); TQStringList fields = TQStringList::split( TQChar(' '), src, false );
SF_01 << fields[2]; // Name SF_01 << fields[2]; // Name
SF_02 << fields[1]; // Rating SF_02 << fields[1]; // Rating
SF_03 << fields[6]; // Match Type SF_03 << fields[6]; // Match Type
@ -419,11 +419,11 @@ void Challenge_Graph::display_menuSeek( Challenge_Game *Item, const TQPoint &Pos
{ {
selectedPlayerName = Item->_player.replace( TQRegExp("\\(.+\\)"), TQString("") ); selectedPlayerName = Item->_player.replace( TQRegExp("\\(.+\\)"), TQString("") );
selectedMatchID = Item->id(); selectedMatchID = Item->id();
enable = TRUE; enable = true;
} }
else else
{ {
enable = FALSE; enable = false;
} }
menuSeek->setItemChecked( MENU_SEEK, seek ); menuSeek->setItemChecked( MENU_SEEK, seek );
menuSeek->setItemEnabled( MENU_FINGER, enable ); menuSeek->setItemEnabled( MENU_FINGER, enable );
@ -452,7 +452,7 @@ void Challenge_Graph::recvCMD( const Command& command )
break; break;
case CMD_Hide_Sought_List: case CMD_Hide_Sought_List:
clear(); clear();
seek = FALSE; seek = false;
break; break;
default: default:
break; break;

@ -21,11 +21,11 @@
chessclock::chessclock(TQWidget *parent, const char *name, resource *Rsrc ) : TQWidget(parent,name) chessclock::chessclock(TQWidget *parent, const char *name, resource *Rsrc ) : TQWidget(parent,name)
{ {
Resource = Rsrc; Resource = Rsrc;
Silent = TRUE; Silent = true;
WhiteIndex = 0; WhiteIndex = 0;
BlackIndex = 0; BlackIndex = 0;
Flag[WHITE] = FALSE; Flag[WHITE] = false;
Flag[BLACK] = FALSE; Flag[BLACK] = false;
whiteClock = " 0:00:00 "; whiteClock = " 0:00:00 ";
blackClock = " 0:00:00 "; blackClock = " 0:00:00 ";
} }
@ -64,7 +64,7 @@ void chessclock::Reset( void )
Black.Increment *= 10; Black.Increment *= 10;
ArmyOnMove = WHITE; ArmyOnMove = WHITE;
External = FALSE; External = false;
UpdateStrings(); UpdateStrings();
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -74,7 +74,7 @@ void chessclock::Reset( void )
/////////////////////////////////////// ///////////////////////////////////////
void chessclock::Pause( void ) void chessclock::Pause( void )
{ {
Silent = TRUE; Silent = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -83,7 +83,7 @@ void chessclock::Pause( void )
/////////////////////////////////////// ///////////////////////////////////////
void chessclock::Resume( void ) void chessclock::Resume( void )
{ {
Silent = FALSE; Silent = false;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -147,9 +147,9 @@ void chessclock::Tick( void )
if( ArmyOnMove == WHITE ) if( ArmyOnMove == WHITE )
{ {
White.Seconds--; White.Seconds--;
if( ( White.Seconds < 0 ) && ( Flag[WHITE] == FALSE ) ) if( ( White.Seconds < 0 ) && ( Flag[WHITE] == false ) )
{ {
Flag[WHITE] = TRUE; Flag[WHITE] = true;
emit flagFell( WHITE ); emit flagFell( WHITE );
Resource->play( SND_FLAG ); Resource->play( SND_FLAG );
} }
@ -157,9 +157,9 @@ void chessclock::Tick( void )
else else
{ {
Black.Seconds--; Black.Seconds--;
if( ( Black.Seconds < 0 ) && ( Flag[BLACK] == FALSE ) ) if( ( Black.Seconds < 0 ) && ( Flag[BLACK] == false ) )
{ {
Flag[BLACK] = TRUE; Flag[BLACK] = true;
emit flagFell( BLACK ); emit flagFell( BLACK );
Resource->play( SND_FLAG ); Resource->play( SND_FLAG );
} }

@ -94,5 +94,5 @@ void Command::clearMove( ChessMove *Move )
Move->ICS_PawnPushFile = Null; Move->ICS_PawnPushFile = Null;
Move->ICS_Mode = Null; Move->ICS_Mode = Null;
Move->ICS_OnMove = 0; Move->ICS_OnMove = 0;
Move->ICS_ClockTicking = TRUE; Move->ICS_ClockTicking = true;
} }

@ -31,7 +31,7 @@ Console::Console(TQWidget *parent,
resource *Rsrc ) : TQVBox(parent,name) resource *Rsrc ) : TQVBox(parent,name)
{ {
myResource = Rsrc; myResource = Rsrc;
SelfMoving = FALSE; SelfMoving = false;
TQStyle& Style = TQApplication::style(); TQStyle& Style = TQApplication::style();
margin = Style.defaultFrameWidth(); margin = Style.defaultFrameWidth();
@ -39,7 +39,7 @@ Console::Console(TQWidget *parent,
myLineEdit = new KLineEdit( this, "console_edit" ); myLineEdit = new KLineEdit( this, "console_edit" );
/* Configure misc */ /* Configure misc */
setBG(); setBG();
myTextView->setStaticBackground( FALSE ); myTextView->setStaticBackground( false );
connect( myLineEdit, TQ_SIGNAL( returnPressed( const TQString& ) ), this, TQ_SLOT( getText( const TQString& ) ) ); connect( myLineEdit, TQ_SIGNAL( returnPressed( const TQString& ) ), this, TQ_SLOT( getText( const TQString& ) ) );
connect( myResource->myAccel, TQ_SIGNAL( history_prev() ), this, TQ_SLOT( historyBackward() ) ); connect( myResource->myAccel, TQ_SIGNAL( history_prev() ), this, TQ_SLOT( historyBackward() ) );

@ -50,7 +50,7 @@ core::core(TQWidget *parent, const char *name, resource *Rsrc ) : TQWidget(paren
connect( myButtonGroup, TQ_SIGNAL( leftClick(int) ), this, TQ_SLOT( setMatch(int) ) ); connect( myButtonGroup, TQ_SIGNAL( leftClick(int) ), this, TQ_SLOT( setMatch(int) ) );
connect( myButtonGroup, TQ_SIGNAL( menuItemSelected(int,int) ), this, TQ_SLOT( thinButtonMenu(int,int) ) ); connect( myButtonGroup, TQ_SIGNAL( menuItemSelected(int,int) ), this, TQ_SLOT( thinButtonMenu(int,int) ) );
myCoreClock.start( 100, FALSE ); myCoreClock.start( 100, false );
resize(); resize();
} }
@ -205,22 +205,22 @@ void core::setMatch( int ID )
*/ */
if( currentMatch != NULL ) if( currentMatch != NULL )
{ {
currentMatch->setCurrent( FALSE ); currentMatch->setCurrent( false );
disconnect( currentMatch, TQ_SIGNAL( setClocks() ), this, TQ_SLOT( slot_setClocks() ) ); disconnect( currentMatch, TQ_SIGNAL( setClocks() ), this, TQ_SLOT( slot_setClocks() ) );
disconnect( currentMatch, TQ_SIGNAL( setStatusBar( const int&, const TQString& ) ), this, TQ_SLOT( slot_setStatusBar( const int&, const TQString& ) ) ); disconnect( currentMatch, TQ_SIGNAL( setStatusBar( const int&, const TQString& ) ), this, TQ_SLOT( slot_setStatusBar( const int&, const TQString& ) ) );
disconnect( currentMatch, TQ_SIGNAL( setNotation() ), this, TQ_SLOT( slot_setNotation() ) ); disconnect( currentMatch, TQ_SIGNAL( setNotation() ), this, TQ_SLOT( slot_setNotation() ) );
currentMatch->setVisibility( FALSE ); currentMatch->setVisibility( false );
} }
/* /*
Now display the new match, and connect it's signals to the GUI Now display the new match, and connect it's signals to the GUI
*/ */
currentMatch = myMatchMap.find( ID ); currentMatch = myMatchMap.find( ID );
currentMatch->setVisibility( TRUE ); currentMatch->setVisibility( true );
myButtonGroup->setButton( ID ); myButtonGroup->setButton( ID );
connect( currentMatch, TQ_SIGNAL( setClocks() ), this, TQ_SLOT( slot_setClocks() ) ); connect( currentMatch, TQ_SIGNAL( setClocks() ), this, TQ_SLOT( slot_setClocks() ) );
connect( currentMatch, TQ_SIGNAL( setStatusBar( const int&, const TQString& ) ), this, TQ_SLOT( slot_setStatusBar( const int&, const TQString& ) ) ); connect( currentMatch, TQ_SIGNAL( setStatusBar( const int&, const TQString& ) ), this, TQ_SLOT( slot_setStatusBar( const int&, const TQString& ) ) );
connect( currentMatch, TQ_SIGNAL( setNotation() ), this, TQ_SLOT( slot_setNotation() ) ); connect( currentMatch, TQ_SIGNAL( setNotation() ), this, TQ_SLOT( slot_setNotation() ) );
currentMatch->setCurrent( TRUE ); currentMatch->setCurrent( true );
emit requestResize(); emit requestResize();
emit initMatch(); emit initMatch();
currentMatch->resendStatusBar(); currentMatch->resendStatusBar();
@ -239,9 +239,9 @@ bool core::clearAll( void )
{ {
while( myMatchMap.count() ) while( myMatchMap.count() )
{ {
if( clearMatch() != TRUE ) return FALSE; if( clearMatch() != true ) return false;
} }
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -261,7 +261,7 @@ bool core::clearMatch( int id )
} }
else else
{ {
return FALSE; return false;
} }
} }
departingMatch = myMatchMap.find(id); departingMatch = myMatchMap.find(id);
@ -270,15 +270,15 @@ bool core::clearMatch( int id )
if( departingMatch == NULL ) if( departingMatch == NULL )
{ {
kdError() << "core::clearMatch: Bad matchID " << id << " could not be cleared." << endl; kdError() << "core::clearMatch: Bad matchID " << id << " could not be cleared." << endl;
return FALSE; return false;
} }
/* Save if needed */ /* Save if needed */
if( departingMatch->modified() ) if( departingMatch->modified() )
{ {
if( save( id, TRUE, FALSE ) == FALSE ) if( save( id, true, false ) == false )
{ {
return FALSE; return false;
} }
} }
@ -322,7 +322,7 @@ bool core::clearMatch( int id )
delete departingMatch; delete departingMatch;
resize(); resize();
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -331,7 +331,7 @@ bool core::clearMatch( int id )
/////////////////////////////////////// ///////////////////////////////////////
void core::resize( void ) void core::resize( void )
{ {
int size = 8 + ( 1 * ( myResource->ThemeBorder == TRUE ) ); int size = 8 + ( 1 * ( myResource->ThemeBorder == true ) );
if( currentMatch != NULL ) if( currentMatch != NULL )
{ {
@ -429,7 +429,7 @@ void core::command2Match( const Command &command )
/////////////////////////////////////// ///////////////////////////////////////
bool core::flag( const bool Army ) bool core::flag( const bool Army )
{ {
if( currentMatch == NULL ) return FALSE; if( currentMatch == NULL ) return false;
return currentMatch->flag( Army ); return currentMatch->flag( Army );
return false; return false;
} }
@ -451,7 +451,7 @@ TQString core::clock( const bool Army )
/////////////////////////////////////// ///////////////////////////////////////
bool core::modified( void ) bool core::modified( void )
{ {
if( currentMatch == NULL ) return FALSE; if( currentMatch == NULL ) return false;
return currentMatch->modified(); return currentMatch->modified();
return false; return false;
} }
@ -462,7 +462,7 @@ bool core::modified( void )
/////////////////////////////////////// ///////////////////////////////////////
bool core::paused( void ) bool core::paused( void )
{ {
if( currentMatch == NULL ) return FALSE; if( currentMatch == NULL ) return false;
return currentMatch->paused(); return currentMatch->paused();
return false; return false;
} }
@ -478,10 +478,10 @@ bool core::isOnline( void )
{ {
if( myIOMap[index]->getType() == io_base::INTERNET ) if( myIOMap[index]->getType() == io_base::INTERNET )
{ {
return TRUE; return true;
} }
} }
return FALSE; return false;
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -615,7 +615,7 @@ bool core::load( void )
const TQString fileFilter( "*.pgn *.Pgn *.PGN|Portable Game Notation (.pgn)\n*|All Files" ); const TQString fileFilter( "*.pgn *.Pgn *.PGN|Portable Game Notation (.pgn)\n*|All Files" );
TQString URL; TQString URL;
URL = KFileDialog::getOpenFileName( TQString(), TQString( fileFilter ), this, i18n( "Load PGN..." ) ); URL = KFileDialog::getOpenFileName( TQString(), TQString( fileFilter ), this, i18n( "Load PGN..." ) );
if( URL.isEmpty() ) return FALSE; if( URL.isEmpty() ) return false;
return load( URL ); return load( URL );
} }
bool core::load( const TQString &IncURL ) bool core::load( const TQString &IncURL )
@ -624,7 +624,7 @@ bool core::load( const TQString &IncURL )
myResource->tabManager->addTab( listPGN, IncURL.section( '/', -1 ) ); myResource->tabManager->addTab( listPGN, IncURL.section( '/', -1 ) );
connect( listPGN, TQ_SIGNAL( selected( const TQString&, const int& ) ), this, TQ_SLOT( load( const TQString&, const int& ) ) ); connect( listPGN, TQ_SIGNAL( selected( const TQString&, const int& ) ), this, TQ_SLOT( load( const TQString&, const int& ) ) );
listPGN->setURL( IncURL ); listPGN->setURL( IncURL );
return TRUE; return true;
} }
bool core::load( const TQString &url, const int &pos ) bool core::load( const TQString &url, const int &pos )
{ {
@ -652,7 +652,7 @@ bool core::save( const int ID, const bool Prompt, const bool SaveAs )
{ {
match2bSaved = myMatchMap.find( ID ); match2bSaved = myMatchMap.find( ID );
} }
if( match2bSaved == NULL ) return FALSE; if( match2bSaved == NULL ) return false;
if( Prompt ) if( Prompt )
{ {
/* Prompt for the save */ /* Prompt for the save */
@ -666,11 +666,11 @@ bool core::save( const int ID, const bool Prompt, const bool SaveAs )
myResource->ConfigRead(); myResource->ConfigRead();
if( answer == KMessageBox::Cancel ) if( answer == KMessageBox::Cancel )
{ {
return FALSE; return false;
} }
if( answer == KMessageBox::No ) if( answer == KMessageBox::No )
{ {
return TRUE; return true;
} }
} }
/* Get the last URL we used */ /* Get the last URL we used */
@ -681,21 +681,21 @@ bool core::save( const int ID, const bool Prompt, const bool SaveAs )
URL = KFileDialog::getSaveFileName( TQString(), TQString( fileFilter ), this, i18n( "Save Match..." ) ); URL = KFileDialog::getSaveFileName( TQString(), TQString( fileFilter ), this, i18n( "Save Match..." ) );
if( URL.isNull() ) if( URL.isNull() )
{ {
return FALSE; return false;
} }
if( URL.findRev( ".pgn", -1, FALSE ) == -1 ) if( URL.findRev( ".pgn", -1, false ) == -1 )
{ {
URL += ".pgn"; URL += ".pgn";
} }
} }
if( match2bSaved->save( URL ) == FALSE ) if( match2bSaved->save( URL ) == false )
{ {
emit setStatusBar( SAVE_ERROR ); emit setStatusBar( SAVE_ERROR );
return FALSE; return false;
} }
emit setStatusBar( SAVE_OK ); emit setStatusBar( SAVE_OK );
match2bSaved->setModified( FALSE ); match2bSaved->setModified( false );
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -830,10 +830,10 @@ void core::thinButtonMenu( int id, int item )
switch( item ) switch( item )
{ {
case MENU_SAVE: case MENU_SAVE:
save( id, FALSE, FALSE ); save( id, false, false );
break; break;
case MENU_SAVEAS: case MENU_SAVEAS:
save( id, FALSE, TRUE ); save( id, false, true );
break; break;
case MENU_PRINT: case MENU_PRINT:
print( id ); print( id );

@ -54,7 +54,7 @@ class core : public TQWidget
char onMove( void ); char onMove( void );
char whiteInput( void ); char whiteInput( void );
char blackInput( void ); char blackInput( void );
char inputOnMove( bool reverse=FALSE ); char inputOnMove( bool reverse=false );
void createNewIO( int type, int ID, int side=BLACK, int str=0 ); void createNewIO( int type, int ID, int side=BLACK, int str=0 );
void goOffline(void); void goOffline(void);

@ -19,11 +19,6 @@
#ifndef _DEFINITIONS_H #ifndef _DEFINITIONS_H
#define _DEFINITIONS_H #define _DEFINITIONS_H
#ifndef TRUE
# define TRUE 1
# define FALSE 0
#endif
#ifndef _VERSION_ #ifndef _VERSION_
# define _VERSION_ "0.6" # define _VERSION_ "0.6"
#endif #endif

@ -21,11 +21,11 @@
dlg_challenge::dlg_challenge(TQWidget *parent, const char *name, resource *Rsrc ) : dlg_challenge::dlg_challenge(TQWidget *parent, const char *name, resource *Rsrc ) :
KDialogBase( parent, KDialogBase( parent,
name, name,
FALSE, false,
i18n("You've Been Challenged:"), i18n("You've Been Challenged:"),
User1|User2, User1|User2,
Ok, Ok,
TRUE, true,
i18n("Accept"), i18n("Accept"),
i18n("Decline") ) i18n("Decline") )
{ {
@ -49,7 +49,7 @@ dlg_challenge::dlg_challenge(TQWidget *parent, const char *name, resource *Rsrc
BUTTON_TimeOdds = new TQCheckBox( i18n("Time Odds Match"),BOX_Parent ); BUTTON_TimeOdds = new TQCheckBox( i18n("Time Odds Match"),BOX_Parent );
LABEL_Headline->setAlignment( TQt::AlignCenter ); LABEL_Headline->setAlignment( TQt::AlignCenter );
COMBO_Rated->setEditable( FALSE ); COMBO_Rated->setEditable( false );
COMBO_Rated->insertItem( i18n("Unrated"), 0 ); COMBO_Rated->insertItem( i18n("Unrated"), 0 );
COMBO_Rated->insertItem( i18n("Rated"), 1 ); COMBO_Rated->insertItem( i18n("Rated"), 1 );
@ -71,10 +71,10 @@ dlg_challenge::dlg_challenge(TQWidget *parent, const char *name, resource *Rsrc
LABEL_BlackBase->setText( i18n( "Base Time" ) ); LABEL_BlackBase->setText( i18n( "Base Time" ) );
LABEL_BlackInc->setText( i18n( "Increment" ) ); LABEL_BlackInc->setText( i18n( "Increment" ) );
showButton( User1, TRUE ); showButton( User1, true );
showButton( User2, TRUE ); showButton( User2, true );
enableButton( User1, TRUE ); enableButton( User1, true );
enableButton( User2, TRUE ); enableButton( User2, true );
show(); show();
} }
@ -92,7 +92,7 @@ void dlg_challenge::setValues( const TQString &string, const TQString &local )
myString.replace( TQRegExp("\\(\\s"), "(" ); myString.replace( TQRegExp("\\(\\s"), "(" );
myString.replace( TQRegExp("\\s\\)"), ")" ); myString.replace( TQRegExp("\\s\\)"), ")" );
list = TQStringList::split( TQChar(' '), myString, FALSE ); list = TQStringList::split( TQChar(' '), myString, false );
list[7].replace(TQRegExp("\\."), ""); list[7].replace(TQRegExp("\\."), "");
if( list[0] == local ) if( list[0] == local )
{ {
@ -122,8 +122,8 @@ void dlg_challenge::setValues( const TQString &string, const TQString &local )
BOX_BlackInc->setValue( list[7].toInt() ); BOX_BlackInc->setValue( list[7].toInt() );
BOX_White->setTitle( i18n("Time Controls") ); BOX_White->setTitle( i18n("Time Controls") );
BOX_Black->setTitle( i18n("Time Controls") ); BOX_Black->setTitle( i18n("Time Controls") );
// BOX_Black->setEnabled( FALSE ); // BOX_Black->setEnabled( false );
// BUTTON_TimeOdds->setChecked( FALSE ); // BUTTON_TimeOdds->setChecked( false );
connect( COMBO_Rated, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( slot_changed(int) ) ); connect( COMBO_Rated, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( slot_changed(int) ) );
connect( BOX_WhiteBase, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( slot_changed(int) ) ); connect( BOX_WhiteBase, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( slot_changed(int) ) );

@ -22,11 +22,11 @@
dlg_engine::dlg_engine(TQWidget *parent, const char *name, resource *Rsrc, TQString ItemName ) : dlg_engine::dlg_engine(TQWidget *parent, const char *name, resource *Rsrc, TQString ItemName ) :
KDialogBase( parent, KDialogBase( parent,
name, name,
TRUE, true,
i18n("Configure Engine"), i18n("Configure Engine"),
Help|Ok|Apply|Cancel, Help|Ok|Apply|Cancel,
Ok, Ok,
TRUE ) true )
{ {
Resource = Rsrc; Resource = Rsrc;
Name = ItemName; Name = ItemName;
@ -69,7 +69,7 @@ dlg_engine::dlg_engine(TQWidget *parent, const char *name, resource *Rsrc, TQStr
/* Protocol ComboBox */ /* Protocol ComboBox */
EDIT_Protocol->insertItem( TQString( "XBoard" ) ); EDIT_Protocol->insertItem( TQString( "XBoard" ) );
EDIT_Protocol->insertItem( TQString( "UCI" ) ); EDIT_Protocol->insertItem( TQString( "UCI" ) );
EDIT_Protocol->setEditable( FALSE ); EDIT_Protocol->setEditable( false );
/* Load in data if this is a modification */ /* Load in data if this is a modification */
if( !Name.isEmpty() ) if( !Name.isEmpty() )
{ {
@ -94,15 +94,15 @@ dlg_engine::dlg_engine(TQWidget *parent, const char *name, resource *Rsrc, TQStr
} }
} }
/* Init the buttons */ /* Init the buttons */
showButtonCancel( TRUE ); showButtonCancel( true );
showButtonOK( TRUE ); showButtonOK( true );
showButtonApply( TRUE ); showButtonApply( true );
showButton( Help, TRUE ); showButton( Help, true );
enableButtonCancel( TRUE ); enableButtonCancel( true );
enableButtonOK( TRUE ); enableButtonOK( true );
enableButtonApply( FALSE ); enableButtonApply( false );
enableButton( Help, TRUE ); enableButton( Help, true );
setHelp( TQString( "configure-engines" ) ); setHelp( TQString( "configure-engines" ) );
/* Make Connections */ /* Make Connections */
@ -162,7 +162,7 @@ void dlg_engine::slotApply( void )
default: default:
break; break;
} }
enableButtonApply( FALSE ); enableButtonApply( false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -194,7 +194,7 @@ void dlg_engine::slotFilenameDialog( void )
tmp = temp.findRev( '/' ); tmp = temp.findRev( '/' );
EDIT_Name->setText( temp.remove( 0, tmp + 1 ) ); EDIT_Name->setText( temp.remove( 0, tmp + 1 ) );
} }
enableButtonApply( TRUE ); enableButtonApply( true );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -211,7 +211,7 @@ void dlg_engine::slotLogFileDialog( void )
TQString( "Find Log..." ) ); TQString( "Find Log..." ) );
if( temp.isEmpty() ) return; if( temp.isEmpty() ) return;
EDIT_LogFile->setText( temp ); EDIT_LogFile->setText( temp );
enableButtonApply( TRUE ); enableButtonApply( true );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -221,6 +221,6 @@ void dlg_engine::slotLogFileDialog( void )
void dlg_engine::slotProtocol( int Index ) void dlg_engine::slotProtocol( int Index )
{ {
if(Index); // No-op to stop compile warning. if(Index); // No-op to stop compile warning.
enableButtonApply( TRUE ); enableButtonApply( true );
} }

@ -18,7 +18,7 @@
#include "dlg_login.moc" #include "dlg_login.moc"
dlg_login::dlg_login(TQWidget *parent, const char *name, resource *rsrc) : dlg_login::dlg_login(TQWidget *parent, const char *name, resource *rsrc) :
KDialogBase(parent, name, TRUE, i18n("Login Prompt"), Help|Ok|Cancel, Ok,TRUE ) KDialogBase(parent, name, true, i18n("Login Prompt"), Help|Ok|Cancel, Ok,true )
{ {
serverList::Iterator i; serverList::Iterator i;
serverList::Iterator currentServer; serverList::Iterator currentServer;
@ -32,13 +32,13 @@ dlg_login::dlg_login(TQWidget *parent, const char *name, resource *rsrc) :
GROUP_Select_Server = new TQGroupBox( 1, TQt::Vertical, i18n( "Select Server" ), BOX_Parent ); GROUP_Select_Server = new TQGroupBox( 1, TQt::Vertical, i18n( "Select Server" ), BOX_Parent );
COMBO_Select_Server = new KComboBox ( GROUP_Select_Server ); COMBO_Select_Server = new KComboBox ( GROUP_Select_Server );
COMBO_Select_Server->setEditable( FALSE ); COMBO_Select_Server->setEditable( false );
/* fill the combobox with servers */ /* fill the combobox with servers */
for(i = myResource->servers.begin(); i != myResource->servers.end(); i++) for(i = myResource->servers.begin(); i != myResource->servers.end(); i++)
{ {
COMBO_Select_Server->insertItem((*i).Name); COMBO_Select_Server->insertItem((*i).Name);
if((*i).CurrentRef == TRUE) if((*i).CurrentRef == true)
{ {
COMBO_Select_Server->setCurrentItem(counter); COMBO_Select_Server->setCurrentItem(counter);
currentServer = i; currentServer = i;
@ -68,13 +68,13 @@ dlg_login::dlg_login(TQWidget *parent, const char *name, resource *rsrc) :
connect(CHECKBOX_GUEST, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotGuestToggle(bool))); connect(CHECKBOX_GUEST, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotGuestToggle(bool)));
/* Init the buttons */ /* Init the buttons */
showButtonCancel( TRUE ); showButtonCancel( true );
showButtonOK( TRUE ); showButtonOK( true );
showButton( Help, TRUE ); showButton( Help, true );
enableButtonCancel( TRUE ); enableButtonCancel( true );
enableButtonOK( TRUE ); enableButtonOK( true );
enableButton( Help, TRUE ); enableButton( Help, true );
setButtonOKText( i18n("Login"), i18n("Log in to the chess server using this name and password.") ); setButtonOKText( i18n("Login"), i18n("Log in to the chess server using this name and password.") );
setButtonCancelText( i18n("Cancel"), i18n("Abort logging into the server") ); setButtonCancelText( i18n("Cancel"), i18n("Abort logging into the server") );
setHelp("prefs"); setHelp("prefs");
@ -136,11 +136,11 @@ void dlg_login::slotUpdateUser(const TQString &name)
{ {
if((*i).CurrentRef) if((*i).CurrentRef)
{ {
(*i).CurrentRef = FALSE; (*i).CurrentRef = false;
} }
if((*i).Name == name ) if((*i).Name == name )
{ {
(*i).CurrentRef = TRUE; (*i).CurrentRef = true;
EDIT_Login->setText((*i).UserName); EDIT_Login->setText((*i).UserName);
EDIT_Password->setText((*i).Password); EDIT_Password->setText((*i).Password);
server = &(*i); server = &(*i);

@ -35,7 +35,7 @@
#define _TYPE_EMAIL_ 2 #define _TYPE_EMAIL_ 2
dlg_newmatch::dlg_newmatch(TQWidget *parent, const char *name, resource *Rsrc ) : dlg_newmatch::dlg_newmatch(TQWidget *parent, const char *name, resource *Rsrc ) :
KDialogBase(parent, name, TRUE, i18n("Start a New Match"), Cancel|Ok|Help, Ok, TRUE ) KDialogBase(parent, name, true, i18n("Start a New Match"), Cancel|Ok|Help, Ok, true )
{ {
myResource = Rsrc; myResource = Rsrc;
Param = new match_param( myResource ); Param = new match_param( myResource );
@ -55,14 +55,14 @@ KDialogBase(parent, name, TRUE, i18n("Start a New Match"), Cancel|Ok|Help, Ok, T
LABEL_Black_Name = new TQLabel( BOX_Black_Detail ); LABEL_Black_Name = new TQLabel( BOX_Black_Detail );
GROUP_White_Type = new TQButtonGroup( 3, TQt::Vertical, BOX_White_Detail ); GROUP_White_Type = new TQButtonGroup( 3, TQt::Vertical, BOX_White_Detail );
GROUP_White_Type->setExclusive( TRUE ); GROUP_White_Type->setExclusive( true );
RADIO_White_Human = new TQRadioButton( i18n("Human"), GROUP_White_Type ); RADIO_White_Human = new TQRadioButton( i18n("Human"), GROUP_White_Type );
RADIO_White_PC = new TQRadioButton( i18n("Computer"), GROUP_White_Type ); RADIO_White_PC = new TQRadioButton( i18n("Computer"), GROUP_White_Type );
RADIO_White_Email = new TQRadioButton( i18n("Email"), GROUP_White_Type ); RADIO_White_Email = new TQRadioButton( i18n("Email"), GROUP_White_Type );
connect( GROUP_White_Type, TQ_SIGNAL( clicked(int)), this, TQ_SLOT( slotWhiteType(int))); connect( GROUP_White_Type, TQ_SIGNAL( clicked(int)), this, TQ_SLOT( slotWhiteType(int)));
GROUP_Black_Type = new TQButtonGroup( 3, TQt::Vertical, BOX_Black_Detail ); GROUP_Black_Type = new TQButtonGroup( 3, TQt::Vertical, BOX_Black_Detail );
GROUP_Black_Type->setExclusive( TRUE ); GROUP_Black_Type->setExclusive( true );
RADIO_Black_Human = new TQRadioButton( i18n("Human"), GROUP_Black_Type ); RADIO_Black_Human = new TQRadioButton( i18n("Human"), GROUP_Black_Type );
RADIO_Black_PC = new TQRadioButton( i18n("Computer"), GROUP_Black_Type ); RADIO_Black_PC = new TQRadioButton( i18n("Computer"), GROUP_Black_Type );
RADIO_Black_Email = new TQRadioButton( i18n("Email"), GROUP_Black_Type ); RADIO_Black_Email = new TQRadioButton( i18n("Email"), GROUP_Black_Type );
@ -71,13 +71,13 @@ KDialogBase(parent, name, TRUE, i18n("Start a New Match"), Cancel|Ok|Help, Ok, T
/* Disable Unconfigured Types */ /* Disable Unconfigured Types */
if( !myResource->engines.count() ) if( !myResource->engines.count() )
{ {
RADIO_White_PC->setEnabled( FALSE ); RADIO_White_PC->setEnabled( false );
RADIO_Black_PC->setEnabled( FALSE ); RADIO_Black_PC->setEnabled( false );
} }
if( 1 ) if( 1 )
{ {
RADIO_White_Email->setEnabled( FALSE ); RADIO_White_Email->setEnabled( false );
RADIO_Black_Email->setEnabled( FALSE ); RADIO_Black_Email->setEnabled( false );
} }
/* Time for White */ /* Time for White */

@ -21,7 +21,7 @@
#include <tqimage.h> #include <tqimage.h>
dlg_promote::dlg_promote(TQWidget *parent, const char *name, resource *Rsrc ) : dlg_promote::dlg_promote(TQWidget *parent, const char *name, resource *Rsrc ) :
TQDialog( parent, name, TRUE, TQt::WStyle_Customize | TQt::WStyle_DialogBorder ) TQDialog( parent, name, true, TQt::WStyle_Customize | TQt::WStyle_DialogBorder )
{ {
Resource = Rsrc; Resource = Rsrc;
Queen = new TQPushButton( this ); Queen = new TQPushButton( this );
@ -65,29 +65,29 @@ void dlg_promote::Init( bool Army )
/* Queen */ /* Queen */
buffer = cache->SquareLight; buffer = cache->SquareLight;
if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteQueen, 0, 0, -1, -1, TQt::CopyROP, FALSE); if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteQueen, 0, 0, -1, -1, TQt::CopyROP, false);
else bitBlt( &buffer, 0, 0, &cache->BlackQueen, 0, 0, -1, -1, TQt::CopyROP, FALSE); else bitBlt( &buffer, 0, 0, &cache->BlackQueen, 0, 0, -1, -1, TQt::CopyROP, false);
Queen->setPixmap( buffer ); Queen->setPixmap( buffer );
Queen->show(); Queen->show();
/* Bishop */ /* Bishop */
buffer = cache->SquareDark; buffer = cache->SquareDark;
if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteBishop, 0, 0, -1, -1, TQt::CopyROP, FALSE); if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteBishop, 0, 0, -1, -1, TQt::CopyROP, false);
else bitBlt( &buffer, 0, 0, &cache->BlackBishop, 0, 0, -1, -1, TQt::CopyROP, FALSE); else bitBlt( &buffer, 0, 0, &cache->BlackBishop, 0, 0, -1, -1, TQt::CopyROP, false);
Bishop->setPixmap( buffer ); Bishop->setPixmap( buffer );
Bishop->show(); Bishop->show();
/* Knight */ /* Knight */
buffer = cache->SquareDark; buffer = cache->SquareDark;
if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteKnight, 0, 0, -1, -1, TQt::CopyROP, FALSE); if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteKnight, 0, 0, -1, -1, TQt::CopyROP, false);
else bitBlt( &buffer, 0, 0, &cache->BlackKnight, 0, 0, -1, -1, TQt::CopyROP, FALSE); else bitBlt( &buffer, 0, 0, &cache->BlackKnight, 0, 0, -1, -1, TQt::CopyROP, false);
Knight->setPixmap( buffer ); Knight->setPixmap( buffer );
Knight->show(); Knight->show();
/* Rook */ /* Rook */
buffer = cache->SquareLight; buffer = cache->SquareLight;
if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteRook, 0, 0, -1, -1, TQt::CopyROP, FALSE); if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteRook, 0, 0, -1, -1, TQt::CopyROP, false);
else bitBlt( &buffer, 0, 0, &cache->BlackRook, 0, 0, -1, -1, TQt::CopyROP, FALSE); else bitBlt( &buffer, 0, 0, &cache->BlackRook, 0, 0, -1, -1, TQt::CopyROP, false);
Rook->setPixmap( buffer ); Rook->setPixmap( buffer );
Rook->show(); Rook->show();

@ -23,11 +23,11 @@
dlg_selectemail::dlg_selectemail(TQWidget *parent, resource *Rsrc ) : dlg_selectemail::dlg_selectemail(TQWidget *parent, resource *Rsrc ) :
KDialogBase( parent, KDialogBase( parent,
0, 0,
TRUE, true,
i18n("Select Email Address"), i18n("Select Email Address"),
Help|Ok, Help|Ok,
Ok, Ok,
TRUE ) true )
{ {
myResource = Rsrc; myResource = Rsrc;
BOX_Parent = makeVBoxMainWidget(); BOX_Parent = makeVBoxMainWidget();

@ -26,11 +26,11 @@
dlg_selectengine::dlg_selectengine(TQWidget *parent, resource *Rsrc, bool army ) : dlg_selectengine::dlg_selectengine(TQWidget *parent, resource *Rsrc, bool army ) :
KDialogBase( parent, KDialogBase( parent,
0, 0,
TRUE, true,
i18n("Select Computer Player"), i18n("Select Computer Player"),
Help|Ok, Help|Ok,
Ok, Ok,
TRUE ) true )
{ {
Resource = Rsrc; Resource = Rsrc;
Army = army; Army = army;
@ -41,14 +41,14 @@ dlg_selectengine::dlg_selectengine(TQWidget *parent, resource *Rsrc, bool army )
i18n( "Computer Players" ), i18n( "Computer Players" ),
BOX_Parent ); BOX_Parent );
COMBO_Engine = new KComboBox( BOX_Engine ); COMBO_Engine = new KComboBox( BOX_Engine );
COMBO_Engine->setEditable( FALSE ); COMBO_Engine->setEditable( false );
// BOX_EngineHelper = new TQGroupBox( 1, // BOX_EngineHelper = new TQGroupBox( 1,
// TQt::Horizontal, // TQt::Horizontal,
// i18n( "Computer Players' Helper" ), // i18n( "Computer Players' Helper" ),
// BOX_Parent ); // BOX_Parent );
// COMBO_EngineHelper = new KComboBox( BOX_Engine ); // COMBO_EngineHelper = new KComboBox( BOX_Engine );
// COMBO_EngineHelper->setEditable( FALSE ); // COMBO_EngineHelper->setEditable( false );
buildEngineData(); buildEngineData();
@ -81,8 +81,8 @@ dlg_selectengine::~dlg_selectengine()
/////////////////////////////////////// ///////////////////////////////////////
void dlg_selectengine::buildEngineData( void ) void dlg_selectengine::buildEngineData( void )
{ {
bool FLAG1(FALSE); bool FLAG1(false);
// bool FLAG2(FALSE); // bool FLAG2(false);
int Index(0); int Index(0);
TQStringList EngineList; TQStringList EngineList;
engineList::Iterator enginesIT; engineList::Iterator enginesIT;
@ -126,14 +126,14 @@ void dlg_selectengine::buildEngineData( void )
if( COMBO_Engine->text(Index) == (*enginesIT).Name ) if( COMBO_Engine->text(Index) == (*enginesIT).Name )
{ {
COMBO_Engine->setCurrentItem(Index); COMBO_Engine->setCurrentItem(Index);
FLAG1 = TRUE; FLAG1 = true;
} }
// if( (*enginesIT).CurrentRef & Engine2F ) // if( (*enginesIT).CurrentRef & Engine2F )
// for( Index = 0; Index < COMBO_Engine->count(); Index++ ) // for( Index = 0; Index < COMBO_Engine->count(); Index++ )
// if( COMBO_EngineHelper->text(Index) == (*enginesIT).Name ) // if( COMBO_EngineHelper->text(Index) == (*enginesIT).Name )
// { // {
// COMBO_EngineHelper->setCurrentItem(Index); // COMBO_EngineHelper->setCurrentItem(Index);
// FLAG2 = TRUE; // FLAG2 = true;
// } // }
} }

@ -21,11 +21,11 @@
dlg_server::dlg_server(TQWidget *parent, const char *name, resource *Rsrc, TQString ItemName ) : dlg_server::dlg_server(TQWidget *parent, const char *name, resource *Rsrc, TQString ItemName ) :
KDialogBase( parent, KDialogBase( parent,
name, name,
TRUE, true,
i18n("Configure Server"), i18n("Configure Server"),
Help|Ok|Apply|Cancel, Help|Ok|Apply|Cancel,
Ok, Ok,
TRUE ) true )
{ {
Resource = Rsrc; Resource = Rsrc;
Name = ItemName; Name = ItemName;
@ -116,24 +116,24 @@ dlg_server::dlg_server(TQWidget *parent, const char *name, resource *Rsrc, TQStr
} }
if( CHECK_StorePass->isChecked() ) if( CHECK_StorePass->isChecked() )
{ {
EDIT_Password->setEnabled( TRUE ); EDIT_Password->setEnabled( true );
EDIT_PasswordRetype->setEnabled( TRUE ); EDIT_PasswordRetype->setEnabled( true );
} }
else else
{ {
EDIT_Password->setEnabled( FALSE ); EDIT_Password->setEnabled( false );
EDIT_PasswordRetype->setEnabled( FALSE ); EDIT_PasswordRetype->setEnabled( false );
} }
/* Init the buttons */ /* Init the buttons */
showButtonCancel( TRUE ); showButtonCancel( true );
showButtonOK( TRUE ); showButtonOK( true );
showButtonApply( TRUE ); showButtonApply( true );
showButton( Help, TRUE ); showButton( Help, true );
enableButtonCancel( TRUE ); enableButtonCancel( true );
enableButtonOK( TRUE ); enableButtonOK( true );
enableButtonApply( FALSE ); enableButtonApply( false );
enableButton( Help, TRUE ); enableButton( Help, true );
setHelp( TQString( "configure-servers" ) ); setHelp( TQString( "configure-servers" ) );
/* Make Connections */ /* Make Connections */
@ -180,7 +180,7 @@ void dlg_server::slotApply( void )
(*serversIT).StorePass = CHECK_StorePass->isChecked(); (*serversIT).StorePass = CHECK_StorePass->isChecked();
(*serversIT).Timeseal = EDIT_Timeseal->text(); (*serversIT).Timeseal = EDIT_Timeseal->text();
enableButtonApply( FALSE ); enableButtonApply( false );
} }
void dlg_server::slotCancel( void ) void dlg_server::slotCancel( void )
@ -198,27 +198,27 @@ void dlg_server::slotLogFileDialog( void )
TQString( "Find Log..." ) ); TQString( "Find Log..." ) );
if( temp.isEmpty() ) return; if( temp.isEmpty() ) return;
EDIT_LogFile->setText( temp ); EDIT_LogFile->setText( temp );
enableButtonApply( TRUE ); enableButtonApply( true );
} }
void dlg_server::slotEnableApply( const TQString& ) void dlg_server::slotEnableApply( const TQString& )
{ {
enableButtonApply( TRUE ); enableButtonApply( true );
} }
void dlg_server::slotStorePass( bool ) void dlg_server::slotStorePass( bool )
{ {
if( CHECK_StorePass->isChecked() ) if( CHECK_StorePass->isChecked() )
{ {
EDIT_Password->setEnabled( TRUE ); EDIT_Password->setEnabled( true );
EDIT_PasswordRetype->setEnabled( TRUE ); EDIT_PasswordRetype->setEnabled( true );
} }
else else
{ {
EDIT_Password->setEnabled( FALSE ); EDIT_Password->setEnabled( false );
EDIT_PasswordRetype->setEnabled( FALSE ); EDIT_PasswordRetype->setEnabled( false );
} }
enableButtonApply( TRUE ); enableButtonApply( true );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -235,6 +235,6 @@ void dlg_server::slot_Timeseal( void )
TQString( "Find Timeseal..." ) ); TQString( "Find Timeseal..." ) );
if( temp.isEmpty() ) return; if( temp.isEmpty() ) return;
EDIT_Timeseal->setText( temp ); EDIT_Timeseal->setText( temp );
enableButtonApply( TRUE ); enableButtonApply( true );
} }

@ -37,8 +37,8 @@ dlg_settings::dlg_settings(TQWidget *parent, const char *name, resource *Rsrc )
Ok, Ok,
parent, parent,
name, name,
FALSE, false,
FALSE ) false )
{ {
TQString buffer; TQString buffer;
Resource = Rsrc; Resource = Rsrc;
@ -82,15 +82,15 @@ dlg_settings::dlg_settings(TQWidget *parent, const char *name, resource *Rsrc )
connect( this, TQ_SIGNAL( aboutToShowPage( TQWidget* ) ), this, TQ_SLOT( slotPageChanging( TQWidget* ) ) ); connect( this, TQ_SIGNAL( aboutToShowPage( TQWidget* ) ), this, TQ_SLOT( slotPageChanging( TQWidget* ) ) );
/* Init the buttons */ /* Init the buttons */
showButtonCancel( TRUE ); showButtonCancel( true );
showButtonOK( TRUE ); showButtonOK( true );
showButtonApply( TRUE ); showButtonApply( true );
showButton( Help, TRUE ); showButton( Help, true );
enableButtonCancel( TRUE ); enableButtonCancel( true );
enableButtonOK( TRUE ); enableButtonOK( true );
enableButtonApply( FALSE ); enableButtonApply( false );
enableButton( Help, TRUE ); enableButton( Help, true );
setHelp( TQString( "configure" ) ); setHelp( TQString( "configure" ) );
show(); show();
@ -122,32 +122,32 @@ void dlg_settings::slotApply( void )
{ {
if( PAGE_Display->changeTheme ) if( PAGE_Display->changeTheme )
{ {
PAGE_Display->changeTheme = FALSE; PAGE_Display->changeTheme = false;
emit themeChanged( PAGE_Display->NewBoards, PAGE_Display->NewChessmen ); emit themeChanged( PAGE_Display->NewBoards, PAGE_Display->NewChessmen );
} }
if( PAGE_Display->refreshBoard ) if( PAGE_Display->refreshBoard )
{ {
PAGE_Display->refreshBoard = FALSE; PAGE_Display->refreshBoard = false;
emit redrawBoard(); emit redrawBoard();
} }
if( PAGE_Display->rebuildConsole ) if( PAGE_Display->rebuildConsole )
{ {
Resource->buildStyle(); Resource->buildStyle();
PAGE_Display->rebuildConsole = FALSE; PAGE_Display->rebuildConsole = false;
emit rebuildConsole(); emit rebuildConsole();
} }
if( PAGE_Audio->changeTheme ) if( PAGE_Audio->changeTheme )
{ {
PAGE_Audio->changeTheme = FALSE; PAGE_Audio->changeTheme = false;
Resource->setAudio( PAGE_Audio->NewSounds ); Resource->setAudio( PAGE_Audio->NewSounds );
} }
if( PAGE_Servers->resetServer ) if( PAGE_Servers->resetServer )
{ {
PAGE_Servers->resetServer = FALSE; PAGE_Servers->resetServer = false;
emit resetServer(); emit resetServer();
} }
Resource->ConfigWrite(); Resource->ConfigWrite();
enableButtonApply( FALSE ); enableButtonApply( false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -166,7 +166,7 @@ void dlg_settings::slotCancel( void )
/////////////////////////////////////// ///////////////////////////////////////
void dlg_settings::slotEnableApply( void ) void dlg_settings::slotEnableApply( void )
{ {
enableButtonApply( TRUE ); enableButtonApply( true );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //

@ -37,10 +37,10 @@ io_engine::io_engine( TQWidget *parent, resource *Rsrc ) : io_base( parent, Rsrc
engine = NULL; engine = NULL;
Log = NULL; Log = NULL;
proto = NULL; proto = NULL;
SafeToSend = TRUE; SafeToSend = true;
CleanBuffer = TRUE; CleanBuffer = true;
SendSIGINT = FALSE; SendSIGINT = false;
Forced = TRUE; Forced = true;
Protocol = XBoard; Protocol = XBoard;
FIFO_In = ""; FIFO_In = "";
FIFO_Out = ""; FIFO_Out = "";
@ -135,7 +135,7 @@ void io_engine::Start( const int side )
(*engine) << (*IT).Filename; (*engine) << (*IT).Filename;
/* ...command line arguments */ /* ...command line arguments */
args = TQStringList::split( TQString(" "), (*IT).Arguments, FALSE ); args = TQStringList::split( TQString(" "), (*IT).Arguments, false );
for( tmp = 0; tmp < args.count(); tmp++ ) for( tmp = 0; tmp < args.count(); tmp++ )
{ {
(*engine) << args[tmp]; (*engine) << args[tmp];
@ -200,11 +200,11 @@ void io_engine::sendToChild( void )
if( SendSIGINT ) if( SendSIGINT )
{ {
engine->kill( SIGINT ); engine->kill( SIGINT );
SendSIGINT = FALSE; SendSIGINT = false;
} }
/* Write it */ /* Write it */
SafeToSend = FALSE; SafeToSend = false;
if( engine->writeStdin( FIFO_Out.latin1(), FIFO_Out.length() ) ) if( engine->writeStdin( FIFO_Out.latin1(), FIFO_Out.length() ) )
{ {
/* Print the output to the log file */ /* Print the output to the log file */
@ -294,7 +294,7 @@ void io_engine::recvProtoCMD( const Command &command )
break; break;
/* Command: Send_SIGINT */ /* Command: Send_SIGINT */
case CMD_Send_SIGINT: case CMD_Send_SIGINT:
SendSIGINT = TRUE; SendSIGINT = true;
break; break;
/* Command to Core */ /* Command to Core */
default: default:
@ -305,7 +305,7 @@ void io_engine::recvProtoCMD( const Command &command )
void io_engine::SendClear( TDEProcess* ) void io_engine::SendClear( TDEProcess* )
{ {
SafeToSend = TRUE; SafeToSend = true;
if( !FIFO_Out.isEmpty() ) if( !FIFO_Out.isEmpty() )
sendToChild(); sendToChild();
} }

@ -406,7 +406,7 @@ void io_internet::readCommand(TDESocket* socket)
} }
else else
{ {
lines = TQStringList::split( TQRegExp("\n\r?"), tmp, FALSE ); lines = TQStringList::split( TQRegExp("\n\r?"), tmp, false );
if(!(tmp.endsWith("\n\r") || tmp.endsWith("\n"))) if(!(tmp.endsWith("\n\r") || tmp.endsWith("\n")))
{ {
lineBuffer = (*(--lines.end())); lineBuffer = (*(--lines.end()));
@ -460,7 +460,7 @@ void io_internet::parseLoginData( TQString data )
{ {
sendUserName(); sendUserName();
} }
lines = TQStringList::split( TQRegExp("\n\r?"), data, FALSE ); lines = TQStringList::split( TQRegExp("\n\r?"), data, false );
for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++) for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)
{ {
writeToConsole((*i), "K_STD"); writeToConsole((*i), "K_STD");
@ -497,7 +497,7 @@ void io_internet::parseLoginData( TQString data )
loginStage = LOGIN_STAGE_LOGGED_IN; loginStage = LOGIN_STAGE_LOGGED_IN;
sendUserSettings(); sendUserSettings();
} }
lines = TQStringList::split( TQRegExp("\n\r?"), data, FALSE ); lines = TQStringList::split( TQRegExp("\n\r?"), data, false );
for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++) for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)
{ {
writeToConsole((*i), "K_STD"); writeToConsole((*i), "K_STD");
@ -505,7 +505,7 @@ void io_internet::parseLoginData( TQString data )
} }
else else
{ {
lines = TQStringList::split( TQRegExp("\n\r?"), data, FALSE ); lines = TQStringList::split( TQRegExp("\n\r?"), data, false );
for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++) for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)
{ {
writeToConsole((*i), "K_STD"); writeToConsole((*i), "K_STD");
@ -629,7 +629,7 @@ void io_internet::parseLine( TQString line )
{ {
writeToConsole(line, lastTag); writeToConsole(line, lastTag);
} }
else if(line.contains(TQRegExp("^\\{?Game \\d+")) && line.contains("Creating", TRUE)) else if(line.contains(TQRegExp("^\\{?Game \\d+")) && line.contains("Creating", true))
{ {
parseMode = NEW_GAME_MODE; parseMode = NEW_GAME_MODE;
} }
@ -649,19 +649,19 @@ void io_internet::parseLine( TQString line )
} }
else if((line.contains(TQRegExp("^\\{?Game \\d+")) || line.contains(TQRegExp("Game \\d+"))) && else if((line.contains(TQRegExp("^\\{?Game \\d+")) || line.contains(TQRegExp("Game \\d+"))) &&
( (
line.contains(" forfeits by disconnection", TRUE) || line.contains(" forfeits by disconnection", true) ||
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(" forfeits on time ", TRUE) || line.contains(" forfeits on time ", true) ||
line.contains(" resigns} ", TRUE) || line.contains(" resigns} ", 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(" Game drawn by mutual agreement} ", TRUE) || line.contains(" Game drawn by mutual agreement} ", true) ||
line.contains(", has lost contact or quit.", TRUE) || line.contains(", has lost contact or quit.", true) ||
line.contains(" checkmated ", TRUE) || line.contains(" checkmated ", true) ||
line.contains(" checkmated} ", TRUE) || line.contains(" checkmated} ", true) ||
line.contains("lost connection", TRUE) || line.contains("lost connection", true) ||
line.contains("has no material to mate", TRUE) line.contains("has no material to mate", true)
) )
) )
{ {
@ -753,7 +753,7 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)
{ {
/* a new game that we are playing, or observing */ /* a new game that we are playing, or observing */
param = new match_param(this->myResource); param = new match_param(this->myResource);
fields = TQStringList::split( TQChar(' '), line, FALSE ); fields = TQStringList::split( TQChar(' '), line, false );
/* set white time control */ /* set white time control */
TCPList tmpListWhite(param->time(WHITE)); TCPList tmpListWhite(param->time(WHITE));
@ -808,7 +808,7 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)
} }
case PARSE12_MODE_MOVE: case PARSE12_MODE_MOVE:
{ {
fields = TQStringList::split( TQChar(' '), line, FALSE ); fields = TQStringList::split( TQChar(' '), line, false );
/* various ICS stuff for ChessMove */ /* various ICS stuff for ChessMove */
move.ICS_ClockTicking = fields[31].toInt(); move.ICS_ClockTicking = fields[31].toInt();
@ -891,31 +891,31 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)
/* SysAdmin */ /* SysAdmin */
// if( Handle.contains( TQRegExp("\\(\\*\\)") ) ) // if( Handle.contains( TQRegExp("\\(\\*\\)") ) )
// { // {
// player.SysAdmin = TRUE; // player.SysAdmin = true;
// Handle.replace( TQRegExp("\\(\\*\\)"), TQString("") ); // Handle.replace( TQRegExp("\\(\\*\\)"), TQString("") );
// } // }
// else player.SysAdmin = FALSE; // else player.SysAdmin = false;
/* ServiceRep */ /* ServiceRep */
// if( Handle.contains( TQRegExp("\\(SR\\)") ) ) // if( Handle.contains( TQRegExp("\\(SR\\)") ) )
// { // {
// player.ServiceRep = TRUE; // player.ServiceRep = true;
// Handle.replace( TQRegExp("\\(SR\\)"), TQString("") ); // Handle.replace( TQRegExp("\\(SR\\)"), TQString("") );
// } // }
// else player.ServiceRep = FALSE; // else player.ServiceRep = false;
/* Computer */ /* Computer */
// if( Handle.contains( TQRegExp("\\(C\\)") ) ) // if( Handle.contains( TQRegExp("\\(C\\)") ) )
// { // {
// player.Computer = TRUE; // player.Computer = true;
// Handle.replace( TQRegExp("\\(C\\)"), TQString("") ); // Handle.replace( TQRegExp("\\(C\\)"), TQString("") );
// } // }
// else player.Computer = FALSE; // else player.Computer = false;
/* Unregistered */ /* Unregistered */
// if( Handle.contains( TQRegExp("\\(U\\)") ) ) // if( Handle.contains( TQRegExp("\\(U\\)") ) )
// { // {
// player.Unregistered = TRUE; // player.Unregistered = true;
// Handle.replace( TQRegExp("\\(U\\)"), TQString("") ); // Handle.replace( TQRegExp("\\(U\\)"), TQString("") );
// } // }
// else player.Unregistered = FALSE; // else player.Unregistered = false;
// return; // return;
//} //}
/////////////////////////////////////// ///////////////////////////////////////
@ -1018,7 +1018,7 @@ void io_internet::parseMoveList(TQString line)
int move_counter = 0; int move_counter = 0;
/* white */ /* white */
two_plys = TQStringList::split(TQRegExp("\\s+"), line, FALSE); two_plys = TQStringList::split(TQRegExp("\\s+"), line, false);
Command::clearMove(&move); Command::clearMove(&move);
move_counter = two_plys[0].left(two_plys[0].length() - 1).length(); /* remove the . */ move_counter = two_plys[0].left(two_plys[0].length() - 1).length(); /* remove the . */
move.ICS_MoveCounter = move_counter; move.ICS_MoveCounter = move_counter;
@ -1055,7 +1055,7 @@ void io_internet::sendEndOfGameCommand(TQString line)
TQStringList fields; TQStringList fields;
Command command; Command command;
fields = TQStringList::split( TQChar(' '), line, FALSE ); fields = TQStringList::split( TQChar(' '), line, false );
if(fields[1].endsWith(":")) if(fields[1].endsWith(":"))
{ {
fields[1] = fields[1].left(fields[1].length() - 1); fields[1] = fields[1].left(fields[1].length() - 1);

@ -42,9 +42,9 @@
Knights::Knights(TDECmdLineArgs *Args, TQWidget *parent, const char *name) : TDEMainWindow(parent, name) Knights::Knights(TDECmdLineArgs *Args, TQWidget *parent, const char *name) : TDEMainWindow(parent, name)
{ {
InitAll = TRUE; InitAll = true;
ResizeFlag = TRUE; ResizeFlag = true;
Minimized = FALSE; Minimized = false;
args = Args; args = Args;
SplashScreen = NULL; SplashScreen = NULL;
setFocusPolicy( TQWidget::ClickFocus ); setFocusPolicy( TQWidget::ClickFocus );
@ -128,7 +128,7 @@ void Knights::aboutToQuit(void)
TQDir userdir( TQDir::homeDirPath(), "game.[0-9][0-9]*;log.[0-9][0-9]*" ); TQDir userdir( TQDir::homeDirPath(), "game.[0-9][0-9]*;log.[0-9][0-9]*" );
for ( int i = 0; i < userdir.count(); i++ ) for ( int i = 0; i < userdir.count(); i++ )
{ {
userdir.remove( userdir.absFilePath(userdir[i]), TRUE ); userdir.remove( userdir.absFilePath(userdir[i]), true );
} }
} }
} }
@ -153,7 +153,7 @@ void Knights::KillAll(void)
delete MainFrame; delete MainFrame;
delete myAccel; delete myAccel;
delete Resource; delete Resource;
InitAll = TRUE; InitAll = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -169,7 +169,7 @@ bool Knights::init( void )
BirthAll(); BirthAll();
SelectTheme(-1,-1); SelectTheme(-1,-1);
Resource->setAudio(); Resource->setAudio();
ResizeFlag = FALSE; ResizeFlag = false;
/* /*
Connect Accelerators Connect Accelerators
@ -201,7 +201,7 @@ bool Knights::init( void )
/* Configure self */ /* Configure self */
setCentralWidget( MainFrame ); setCentralWidget( MainFrame );
InitAll = FALSE; InitAll = false;
resizeMainFrame(); resizeMainFrame();
show(); show();
setStatusBar( READY ); setStatusBar( READY );
@ -220,7 +220,7 @@ bool Knights::init( void )
delete Wizard; delete Wizard;
resizeMainFrame(); resizeMainFrame();
/* if( !Resource->Accepted_License ) /* if( !Resource->Accepted_License )
return FALSE;*/ return false;*/
Resource->Config_Version = CONFIG_VERSION; Resource->Config_Version = CONFIG_VERSION;
} }
@ -250,7 +250,7 @@ bool Knights::init( void )
break; break;
} }
} }
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -262,45 +262,45 @@ void Knights::initMenus( void )
/* /*
matchMenu menu matchMenu menu
*/ */
matchMenu->setCheckable(TRUE); matchMenu->setCheckable(true);
// MENU_DRAW // MENU_DRAW
matchMenu->insertItem( i18n( "&Draw" ), drawMenu, MENU_DRAW ); matchMenu->insertItem( i18n( "&Draw" ), drawMenu, MENU_DRAW );
matchMenu->setItemEnabled( MENU_DRAW, FALSE ); matchMenu->setItemEnabled( MENU_DRAW, false );
// MENU_RETRACT // MENU_RETRACT
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("edit-undo"), TDEIcon::Small ) ), matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("edit-undo"), TDEIcon::Small ) ),
i18n( "&Retract Move" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_RETRACT ); i18n( "&Retract Move" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_RETRACT );
matchMenu->setItemEnabled( MENU_RETRACT, FALSE ); matchMenu->setItemEnabled( MENU_RETRACT, false );
matchMenu->setWhatsThis( MENU_RETRACT, i18n( "Select this to retract your last move." ) ); matchMenu->setWhatsThis( MENU_RETRACT, i18n( "Select this to retract your last move." ) );
// MENU_RESIGN // MENU_RESIGN
matchMenu->insertItem( i18n( "Resign" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_RESIGN ); matchMenu->insertItem( i18n( "Resign" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_RESIGN );
matchMenu->setItemEnabled( MENU_RESIGN, FALSE ); matchMenu->setItemEnabled( MENU_RESIGN, false );
matchMenu->setWhatsThis( MENU_RESIGN, i18n( "Use this to concede the match to your opponent." ) ); matchMenu->setWhatsThis( MENU_RESIGN, i18n( "Use this to concede the match to your opponent." ) );
// MENU_CALL_FLAG // MENU_CALL_FLAG
matchMenu->insertItem( i18n( "&Call Flag" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_CALL_FLAG ); matchMenu->insertItem( i18n( "&Call Flag" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_CALL_FLAG );
matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE ); 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->setWhatsThis( MENU_CALL_FLAG, i18n( "Use this to declare the match over, due to your opponent being out of time." ) );
// MENU_HINT // MENU_HINT
matchMenu->insertItem( i18n( "&Hint" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_HINT ); matchMenu->insertItem( i18n( "&Hint" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_HINT );
matchMenu->setItemEnabled( MENU_HINT, FALSE ); matchMenu->setItemEnabled( MENU_HINT, false );
matchMenu->setWhatsThis( MENU_HINT, i18n( "This will ask your opponent for a hint." ) ); matchMenu->setWhatsThis( MENU_HINT, i18n( "This will ask your opponent for a hint." ) );
// MENU_MOVE_NOW // MENU_MOVE_NOW
matchMenu->insertItem( i18n( "Move &Now" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_MOVE_NOW ); matchMenu->insertItem( i18n( "Move &Now" ), Core, TQ_SLOT(matchMenu(int)), 0, MENU_MOVE_NOW );
matchMenu->setItemEnabled( MENU_MOVE_NOW, FALSE ); matchMenu->setItemEnabled( MENU_MOVE_NOW, false );
matchMenu->setWhatsThis( MENU_MOVE_NOW, i18n( "Clicking this option will force your opponent to move immediately." ) ); matchMenu->setWhatsThis( MENU_MOVE_NOW, i18n( "Clicking this option will force your opponent to move immediately." ) );
// MENU_ORIENTATION // MENU_ORIENTATION
matchMenu->insertItem( i18n( "&Flip View" ), Core, TQ_SLOT(matchMenu(int)), Key_F2, MENU_ORIENTATION ); matchMenu->insertItem( i18n( "&Flip View" ), Core, TQ_SLOT(matchMenu(int)), Key_F2, MENU_ORIENTATION );
matchMenu->setItemEnabled( MENU_ORIENTATION, FALSE ); matchMenu->setItemEnabled( MENU_ORIENTATION, false );
matchMenu->setWhatsThis( MENU_ORIENTATION, i18n( "This will reverse the chessboard's orientation by 180 degrees." ) ); matchMenu->setWhatsThis( MENU_ORIENTATION, i18n( "This will reverse the chessboard's orientation by 180 degrees." ) );
// MENU_PONDER // MENU_PONDER
matchMenu->insertItem( i18n( "&Ponder" ), this, TQ_SLOT(Settings(int)), 0, MENU_PONDER ); matchMenu->insertItem( i18n( "&Ponder" ), this, TQ_SLOT(Settings(int)), 0, MENU_PONDER );
matchMenu->setItemChecked( MENU_PONDER, Resource->OPTION_Ponder ); matchMenu->setItemChecked( MENU_PONDER, Resource->OPTION_Ponder );
matchMenu->setItemEnabled( MENU_PONDER, FALSE ); matchMenu->setItemEnabled( MENU_PONDER, false );
matchMenu->setWhatsThis( MENU_PONDER, i18n( "This toggles your opponent's ability to think while it's your turn." ) ); matchMenu->setWhatsThis( MENU_PONDER, i18n( "This toggles your opponent's ability to think while it's your turn." ) );
matchMenu->insertSeparator(); matchMenu->insertSeparator();
// MENU_PAUSE // MENU_PAUSE
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("media-playback-pause"), TDEIcon::Small ) ), matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("media-playback-pause"), TDEIcon::Small ) ),
i18n( "Pause" ), this, TQ_SLOT( Settings(int) ), Key_F12, MENU_PAUSE ); i18n( "Pause" ), this, TQ_SLOT( Settings(int) ), Key_F12, MENU_PAUSE );
matchMenu->setItemEnabled( MENU_PAUSE, FALSE ); matchMenu->setItemEnabled( MENU_PAUSE, false );
matchMenu->setWhatsThis( MENU_PAUSE, i18n( "Select this to pause the clock for this match." ) ); matchMenu->setWhatsThis( MENU_PAUSE, i18n( "Select this to pause the clock for this match." ) );
/* /*
drawMenu menu drawMenu menu
@ -332,12 +332,12 @@ void Knights::initMenus( void )
// MENU_SAVE // MENU_SAVE
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("document-save"), TDEIcon::Small ) ), fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("document-save"), TDEIcon::Small ) ),
i18n( "&Save Match" ), this, TQ_SLOT( SaveGame() ), CTRL+Key_S, MENU_SAVE ); i18n( "&Save Match" ), this, TQ_SLOT( SaveGame() ), CTRL+Key_S, MENU_SAVE );
fileMenu->setItemEnabled( MENU_SAVE, FALSE ); 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->setWhatsThis( MENU_SAVE, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
// MENU_SAVEAS // MENU_SAVEAS
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("document-save"), TDEIcon::Small ) ), fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("document-save"), TDEIcon::Small ) ),
i18n( "Save Match &As..." ), this, TQ_SLOT( SaveGameAs() ), CTRL+Key_A, MENU_SAVEAS ); i18n( "Save Match &As..." ), this, TQ_SLOT( SaveGameAs() ), CTRL+Key_A, MENU_SAVEAS );
fileMenu->setItemEnabled( MENU_SAVEAS, FALSE ); 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->setWhatsThis( MENU_SAVEAS, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
fileMenu->insertSeparator(); fileMenu->insertSeparator();
// MENU_CONNECT // MENU_CONNECT
@ -348,17 +348,17 @@ void Knights::initMenus( void )
// MENU_PRINT // MENU_PRINT
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("document-print"), TDEIcon::Small ) ), fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("document-print"), TDEIcon::Small ) ),
i18n( "&Print Notation..." ), Core, TQ_SLOT( print() ), CTRL+Key_P, MENU_PRINT ); i18n( "&Print Notation..." ), Core, TQ_SLOT( print() ), CTRL+Key_P, MENU_PRINT );
fileMenu->setItemEnabled( MENU_PRINT, FALSE ); 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->setWhatsThis( MENU_PRINT, i18n( "The Print command will allow you to print this game's notation on your printer." ) );
fileMenu->insertSeparator(); fileMenu->insertSeparator();
// MENU_CLOSE // MENU_CLOSE
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("window-close"), TDEIcon::Small ) ), fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("window-close"), TDEIcon::Small ) ),
i18n( "&Close Match" ), Core, TQ_SLOT( clearMatch() ), CTRL+Key_W, MENU_CLOSE ); i18n( "&Close Match" ), Core, TQ_SLOT( clearMatch() ), CTRL+Key_W, MENU_CLOSE );
fileMenu->setItemEnabled( MENU_CLOSE, FALSE ); fileMenu->setItemEnabled( MENU_CLOSE, false );
fileMenu->setWhatsThis( MENU_CLOSE, i18n( "This command removes the current match." ) ); fileMenu->setWhatsThis( MENU_CLOSE, i18n( "This command removes the current match." ) );
// MENU_CLOSEALL // MENU_CLOSEALL
fileMenu->insertItem( i18n( "Close All" ), Core, TQ_SLOT( clearAll() ), 0, MENU_CLOSEALL ); fileMenu->insertItem( i18n( "Close All" ), Core, TQ_SLOT( clearAll() ), 0, MENU_CLOSEALL );
fileMenu->setItemEnabled( MENU_CLOSEALL, FALSE ); fileMenu->setItemEnabled( MENU_CLOSEALL, false );
fileMenu->setWhatsThis( MENU_CLOSEALL, i18n( "This command will remove all matches that are currently loaded." ) ); fileMenu->setWhatsThis( MENU_CLOSEALL, i18n( "This command will remove all matches that are currently loaded." ) );
fileMenu->insertSeparator(); fileMenu->insertSeparator();
// MENU_QUIT // MENU_QUIT
@ -382,7 +382,7 @@ void Knights::initMenus( void )
/* /*
tutorialMenu menu tutorialMenu menu
*/ */
tutorialMenu->setCheckable(TRUE); tutorialMenu->setCheckable(true);
// MENU_OPEN_TUTORIAL // MENU_OPEN_TUTORIAL
tutorialMenu->insertItem( i18n( "Begin a Tutorial" ), this, TQ_SLOT(Settings(int)), 0, MENU_OPEN_TUTORIAL ); tutorialMenu->insertItem( i18n( "Begin a Tutorial" ), this, TQ_SLOT(Settings(int)), 0, MENU_OPEN_TUTORIAL );
// tutorialMenu->setWhatsThis( MENU_OPEN_TUTORIAL, i18n( "" ) ); // tutorialMenu->setWhatsThis( MENU_OPEN_TUTORIAL, i18n( "" ) );
@ -429,11 +429,11 @@ void Knights::resizeMainFrame(void)
/* enable or disable games in the menu */ /* enable or disable games in the menu */
if( Resource->servers.count() ) if( Resource->servers.count() )
{ {
fileMenu->setItemEnabled( MENU_CONNECT, TRUE ); fileMenu->setItemEnabled( MENU_CONNECT, true );
} }
else else
{ {
fileMenu->setItemEnabled( MENU_CONNECT, FALSE ); fileMenu->setItemEnabled( MENU_CONNECT, false );
} }
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -446,7 +446,7 @@ bool Knights::event( TQEvent *e )
if( e->type() == EVENT_Del_IO_Net ) if( e->type() == EVENT_Del_IO_Net )
{ {
netConnect(); netConnect();
return TRUE; return true;
} }
return TDEMainWindow::event( e ); return TDEMainWindow::event( e );
} }
@ -525,7 +525,7 @@ void Knights::hideEvent( TQHideEvent* )
if( !Resource->OPTION_Pause_On_Minimize ) if( !Resource->OPTION_Pause_On_Minimize )
return; return;
Core->matchMenu( MENU_PAUSEALL ); Core->matchMenu( MENU_PAUSEALL );
Minimized = TRUE; Minimized = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -537,7 +537,7 @@ void Knights::showEvent( TQShowEvent* )
if( !Minimized ) if( !Minimized )
return; return;
Core->matchMenu( MENU_PAUSEALL ); Core->matchMenu( MENU_PAUSEALL );
Minimized = FALSE; Minimized = false;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -700,14 +700,14 @@ void Knights::setClocks( void )
blackTimeLabel->setText( Core->clock( BLACK ) ); blackTimeLabel->setText( Core->clock( BLACK ) );
if( Core->flag( WHITE ) ) if( Core->flag( WHITE ) )
if( Core->blackInput() == PLAYERLOCAL ) if( Core->blackInput() == PLAYERLOCAL )
matchMenu->setItemEnabled( MENU_CALL_FLAG, TRUE ); matchMenu->setItemEnabled( MENU_CALL_FLAG, true );
else else
matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE ); matchMenu->setItemEnabled( MENU_CALL_FLAG, false );
if( Core->flag( BLACK ) ) if( Core->flag( BLACK ) )
if( Core->whiteInput() == PLAYERLOCAL ) if( Core->whiteInput() == PLAYERLOCAL )
matchMenu->setItemEnabled( MENU_CALL_FLAG, TRUE ); matchMenu->setItemEnabled( MENU_CALL_FLAG, true );
else else
matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE ); matchMenu->setItemEnabled( MENU_CALL_FLAG, false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -731,24 +731,24 @@ void Knights::setNotation( void )
if( list == NULL ) if( list == NULL )
{ {
/* Disable Save & Print Functions */ /* Disable Save & Print Functions */
fileMenu->setItemEnabled( MENU_SAVE, FALSE ); fileMenu->setItemEnabled( MENU_SAVE, false );
fileMenu->setItemEnabled( MENU_SAVEAS, FALSE ); fileMenu->setItemEnabled( MENU_SAVEAS, false );
fileMenu->setItemEnabled( MENU_PRINT, FALSE ); fileMenu->setItemEnabled( MENU_PRINT, false );
matchMenu->setItemEnabled( MENU_RETRACT, FALSE ); matchMenu->setItemEnabled( MENU_RETRACT, false );
return; return;
} }
if( Core->modified() ) if( Core->modified() )
fileMenu->setItemEnabled( MENU_SAVE, TRUE ); fileMenu->setItemEnabled( MENU_SAVE, true );
else else
fileMenu->setItemEnabled( MENU_SAVE, FALSE ); fileMenu->setItemEnabled( MENU_SAVE, false );
/* Core->onMove is called before it is updated by Match->slot_Move. Because of this, the following /* Core->onMove is called before it is updated by Match->slot_Move. Because of this, the following
if statement checks for the wrong player's turn. On purpose */ if statement checks for the wrong player's turn. On purpose */
if( ( Core->inputOnMove() == PLAYERLOCAL ) && ( Core->inputOnMove(TRUE) == PLAYERPC ) && list->count() ) if( ( Core->inputOnMove() == PLAYERLOCAL ) && ( Core->inputOnMove(true) == PLAYERPC ) && list->count() )
matchMenu->setItemEnabled( MENU_RETRACT, TRUE ); matchMenu->setItemEnabled( MENU_RETRACT, true );
else else
matchMenu->setItemEnabled( MENU_RETRACT, FALSE ); matchMenu->setItemEnabled( MENU_RETRACT, false );
fileMenu->setItemEnabled( MENU_SAVEAS, TRUE ); fileMenu->setItemEnabled( MENU_SAVEAS, true );
fileMenu->setItemEnabled( MENU_PRINT, TRUE ); fileMenu->setItemEnabled( MENU_PRINT, true );
/* Create the List */ /* Create the List */
for( IT = list->begin(); IT != list->end(); ++IT ) for( IT = list->begin(); IT != list->end(); ++IT )
@ -796,25 +796,25 @@ void Knights::initMatch( void )
/* Are there any players? ( ie - is this a match or a null? */ /* Are there any players? ( ie - is this a match or a null? */
if( ( Core->whiteInput() == Null ) || ( Core->blackInput() == Null ) ) if( ( Core->whiteInput() == Null ) || ( Core->blackInput() == Null ) )
{ {
fileMenu->setItemEnabled( MENU_CLOSE, FALSE ); fileMenu->setItemEnabled( MENU_CLOSE, false );
fileMenu->setItemEnabled( MENU_CLOSEALL, FALSE ); fileMenu->setItemEnabled( MENU_CLOSEALL, false );
matchMenu->setItemEnabled( MENU_ORIENTATION, FALSE ); matchMenu->setItemEnabled( MENU_ORIENTATION, false );
whiteTimeLabel->setText( "" ); whiteTimeLabel->setText( "" );
blackTimeLabel->setText( "" ); blackTimeLabel->setText( "" );
setStatusBar( READY ); setStatusBar( READY );
} }
else else
{ {
fileMenu->setItemEnabled( MENU_CLOSE, TRUE ); fileMenu->setItemEnabled( MENU_CLOSE, true );
fileMenu->setItemEnabled( MENU_CLOSEALL, TRUE ); fileMenu->setItemEnabled( MENU_CLOSEALL, true );
matchMenu->setItemEnabled( MENU_ORIENTATION, TRUE ); matchMenu->setItemEnabled( MENU_ORIENTATION, true );
} }
/* Is there a local player? */ /* Is there a local player? */
if( ( Core->whiteInput() == PLAYERLOCAL ) || ( Core->blackInput() == PLAYERLOCAL ) ) if( ( Core->whiteInput() == PLAYERLOCAL ) || ( Core->blackInput() == PLAYERLOCAL ) )
{ {
matchMenu->setItemEnabled( MENU_DRAW, TRUE ); matchMenu->setItemEnabled( MENU_DRAW, true );
matchMenu->setItemEnabled( MENU_RESIGN, TRUE ); matchMenu->setItemEnabled( MENU_RESIGN, true );
/* Is there also a PC player? */ /* Is there also a PC player? */
if( ( Core->whiteInput() == PLAYERPC ) || ( Core->blackInput() == PLAYERPC ) ) if( ( Core->whiteInput() == PLAYERPC ) || ( Core->blackInput() == PLAYERPC ) )
{ {
@ -822,23 +822,23 @@ void Knights::initMatch( void )
} }
else else
{ {
matchMenu->setItemEnabled( MENU_DRAW, FALSE ); matchMenu->setItemEnabled( MENU_DRAW, false );
matchMenu->setItemEnabled( MENU_RESIGN, FALSE ); matchMenu->setItemEnabled( MENU_RESIGN, false );
} }
/* Is there a PC player? */ /* Is there a PC player? */
if( ( Core->whiteInput() == PLAYERPC ) || ( Core->blackInput() == PLAYERPC ) ) if( ( Core->whiteInput() == PLAYERPC ) || ( Core->blackInput() == PLAYERPC ) )
{ {
matchMenu->setItemEnabled( MENU_MOVE_NOW, TRUE ); matchMenu->setItemEnabled( MENU_MOVE_NOW, true );
matchMenu->setItemEnabled( MENU_HINT, TRUE ); matchMenu->setItemEnabled( MENU_HINT, true );
matchMenu->setItemEnabled( MENU_PONDER, TRUE ); matchMenu->setItemEnabled( MENU_PONDER, true );
matchMenu->setItemEnabled( MENU_PAUSE, TRUE ); matchMenu->setItemEnabled( MENU_PAUSE, true );
} }
else else
{ {
matchMenu->setItemEnabled( MENU_MOVE_NOW, FALSE ); matchMenu->setItemEnabled( MENU_MOVE_NOW, false );
matchMenu->setItemEnabled( MENU_HINT, FALSE ); matchMenu->setItemEnabled( MENU_HINT, false );
matchMenu->setItemEnabled( MENU_PONDER, FALSE ); matchMenu->setItemEnabled( MENU_PONDER, false );
matchMenu->setItemEnabled( MENU_PAUSE, FALSE ); matchMenu->setItemEnabled( MENU_PAUSE, false );
} }
/* Is there a TCP player? */ /* Is there a TCP player? */
// if( ( Core->whiteInput() == PLAYERTCP ) || ( Core->blackInput() == PLAYERTCP ) ) // if( ( Core->whiteInput() == PLAYERTCP ) || ( Core->blackInput() == PLAYERTCP ) )
@ -914,7 +914,7 @@ void Knights::newMatch( void )
/////////////////////////////////////// ///////////////////////////////////////
void Knights::openKeyBindingDialog( void ) void Knights::openKeyBindingDialog( void )
{ {
KKeyDialog::configureKeys( myAccel, TRUE, this ); KKeyDialog::configureKeys( myAccel, true, this );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -957,15 +957,15 @@ void Knights::Settings(int opt)
bool Knights::SaveGame( void ) bool Knights::SaveGame( void )
{ {
/* We use 'Null' to indicate the current match */ /* We use 'Null' to indicate the current match */
return Core->save( Null, FALSE, FALSE ); return Core->save( Null, false, false );
} }
bool Knights::SaveGamePrompt( void ) bool Knights::SaveGamePrompt( void )
{ {
return Core->save( Null, TRUE, FALSE ); return Core->save( Null, true, false );
} }
bool Knights::SaveGameAs( void ) bool Knights::SaveGameAs( void )
{ {
return Core->save( Null, FALSE, TRUE ); return Core->save( Null, false, true );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -995,8 +995,8 @@ void Knights::boardSmaller( void )
/////////////////////////////////////// ///////////////////////////////////////
void Knights::installThemes( void ) void Knights::installThemes( void )
{ {
bool localFlag(FALSE); bool localFlag(false);
bool installError(FALSE); bool installError(false);
unsigned int loop; unsigned int loop;
TQString allerror; TQString allerror;
TQString fileFilter( "KB* KC* KS*|" ); TQString fileFilter( "KB* KC* KS*|" );
@ -1018,13 +1018,13 @@ void Knights::installThemes( void )
if( !TDEIO::NetAccess::copy( files[loop], KURL( TQString( TQDir::homeDirPath() + "/.knights/" + files[loop].filename() ) ) ) ) if( !TDEIO::NetAccess::copy( files[loop], KURL( TQString( TQDir::homeDirPath() + "/.knights/" + files[loop].filename() ) ) ) )
{ {
/* Nope, can't copy it anywhere */ /* Nope, can't copy it anywhere */
installError = TRUE; installError = true;
allerror += "\n\n" + TQString( TQDir::homeDirPath() + "/.knights/" allerror += "\n\n" + TQString( TQDir::homeDirPath() + "/.knights/"
+ files[loop].filename() ) + " - " + TDEIO::NetAccess::lastErrorString(); + files[loop].filename() ) + " - " + TDEIO::NetAccess::lastErrorString();
} }
else else
{ {
localFlag = TRUE; localFlag = true;
} }
} }
} }

@ -111,14 +111,14 @@ void KnightsPixCache::add( const TQString &label, const TQPixmap &pixmap )
/////////////////////////////////////// ///////////////////////////////////////
bool KnightsPixCache::find( const TQString &label, TQPixmap &pixmap ) bool KnightsPixCache::find( const TQString &label, TQPixmap &pixmap )
{ {
bool status(FALSE); bool status(false);
for( IT = list.begin(); IT != list.end(); ++IT ) for( IT = list.begin(); IT != list.end(); ++IT )
{ {
if( (*IT).label == label ) if( (*IT).label == label )
{ {
pixmap = (*IT).item; pixmap = (*IT).item;
(*IT).age = 0; (*IT).age = 0;
status = TRUE; status = true;
} }
else else
(*IT).age++; (*IT).age++;

@ -34,7 +34,7 @@
KnightsTextView::KnightsTextView(TQWidget *parent, resource *Rsrc ) : TQTextBrowser(parent) KnightsTextView::KnightsTextView(TQWidget *parent, resource *Rsrc ) : TQTextBrowser(parent)
{ {
myResource = Rsrc; myResource = Rsrc;
setReadOnly( TRUE ); setReadOnly( true );
setTextFormat( TQt::RichText ); setTextFormat( TQt::RichText );
menuView = new TDEPopupMenu( this ); menuView = new TDEPopupMenu( this );
/* /*
@ -93,11 +93,11 @@ void KnightsTextView::display_menuView( const TQPoint &Pos )
{ {
if( hasSelectedText() ) if( hasSelectedText() )
{ {
menuView->setItemEnabled( MENU_COPY, TRUE ); menuView->setItemEnabled( MENU_COPY, true );
} }
else else
{ {
menuView->setItemEnabled( MENU_COPY, FALSE ); menuView->setItemEnabled( MENU_COPY, false );
} }
menuView->popup( Pos ); menuView->popup( Pos );
} }

@ -33,9 +33,9 @@ list_pgn::list_pgn(TQWidget *parent, const char *name) : TQVBox(parent,name)
listView->addColumn( i18n( "Site" ) ); listView->addColumn( i18n( "Site" ) );
listView->addColumn( i18n( "Date" ) ); listView->addColumn( i18n( "Date" ) );
listView->setSorting( 1 ); listView->setSorting( 1 );
listView->setAllColumnsShowFocus( TRUE ); listView->setAllColumnsShowFocus( true );
listView->setMultiSelection( FALSE ); listView->setMultiSelection( false );
listView->setShowSortIndicator( TRUE ); listView->setShowSortIndicator( true );
listView->restoreLayout( kapp->config(), "PGN_ListView" ); listView->restoreLayout( kapp->config(), "PGN_ListView" );
listView->show(); listView->show();
connect( listView, TQ_SIGNAL( executed( TQListViewItem* ) ), this, TQ_SLOT( slot_selected( TQListViewItem* ) ) ); connect( listView, TQ_SIGNAL( executed( TQListViewItem* ) ), this, TQ_SLOT( slot_selected( TQListViewItem* ) ) );
@ -78,7 +78,7 @@ void list_pgn::setURL( TQString URL )
listView->clear(); listView->clear();
setCaption( URL ); setCaption( URL );
if( tmpPGN.open( URL ) == FALSE ) if( tmpPGN.open( URL ) == false )
{ {
status->message( i18n( "Can not open %1" ).arg( URL ) ); status->message( i18n( "Can not open %1" ).arg( URL ) );
return; return;
@ -96,9 +96,9 @@ void list_pgn::setProgress( const int num )
{ {
progress->setValue( num ); progress->setValue( num );
if( num == 100 ) if( num == 100 )
progress->setEnabled( FALSE ); progress->setEnabled( false );
else else
progress->setEnabled( TRUE ); progress->setEnabled( true );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //

@ -79,9 +79,9 @@ int logic::CalcPointer( const char File, const char Rank )
bool logic::isChessman( const char ChessmanPtr ) bool logic::isChessman( const char ChessmanPtr )
{ {
char BoardPtr = Pointer( chessman[ChessmanPtr].File, chessman[ChessmanPtr].Rank ); char BoardPtr = Pointer( chessman[ChessmanPtr].File, chessman[ChessmanPtr].Rank );
if( ( BoardPtr < 0 ) || ( BoardPtr > 63 ) ) return FALSE; if( ( BoardPtr < 0 ) || ( BoardPtr > 63 ) ) return false;
if( current[BoardPtr].ManPtr != ChessmanPtr ) return FALSE; if( current[BoardPtr].ManPtr != ChessmanPtr ) return false;
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -189,16 +189,16 @@ void logic::Init_Standard( void )
/////////////////////////////////////// ///////////////////////////////////////
bool logic::parseCAN( const bool Army ) bool logic::parseCAN( const bool Army )
{ {
if( chessMove.CAN == NULL ) return FALSE; if( chessMove.CAN == NULL ) return false;
if( ( chessMove.CAN[0] != 'o' ) && ( chessMove.CAN[0] != 'O' ) ) if( ( chessMove.CAN[0] != 'o' ) && ( chessMove.CAN[0] != 'O' ) )
{ {
if( ( chessMove.CAN[0] < 'a' ) || ( chessMove.CAN[0] > 'h' ) ) return FALSE; if( ( chessMove.CAN[0] < 'a' ) || ( chessMove.CAN[0] > 'h' ) ) return false;
chessMove.fromFile = chessMove.CAN[0] - 97; chessMove.fromFile = chessMove.CAN[0] - 97;
if( ( chessMove.CAN[1] < '1' ) || ( chessMove.CAN[1] > '8' ) ) return FALSE; if( ( chessMove.CAN[1] < '1' ) || ( chessMove.CAN[1] > '8' ) ) return false;
chessMove.fromRank = chessMove.CAN[1] - 49; chessMove.fromRank = chessMove.CAN[1] - 49;
if( ( chessMove.CAN[2] < 'a' ) || ( chessMove.CAN[2] > 'h' ) ) return FALSE; if( ( chessMove.CAN[2] < 'a' ) || ( chessMove.CAN[2] > 'h' ) ) return false;
chessMove.toFile = chessMove.CAN[2] - 97; chessMove.toFile = chessMove.CAN[2] - 97;
if( ( chessMove.CAN[3] < '1' ) || ( chessMove.CAN[3] > '8' ) ) return FALSE; if( ( chessMove.CAN[3] < '1' ) || ( chessMove.CAN[3] > '8' ) ) return false;
chessMove.toRank = chessMove.CAN[3] - 49; chessMove.toRank = chessMove.CAN[3] - 49;
if( strlen( chessMove.CAN ) == 5 ) chessMove.Promote = chessMove.CAN[4]; if( strlen( chessMove.CAN ) == 5 ) chessMove.Promote = chessMove.CAN[4];
else chessMove.Promote = Null; else chessMove.Promote = Null;
@ -223,7 +223,7 @@ bool logic::parseCAN( const bool Army )
chessMove.toRank = 7; chessMove.toRank = 7;
} }
} }
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -333,7 +333,7 @@ bool logic::parseSAN( void )
} }
/* Unknown symbol... Can not process this chessMove */ /* Unknown symbol... Can not process this chessMove */
// kdDebug() << "logic::ParseSAN: Unknown Symbol: " << chessMove.SAN[SANPtr] << "\n"; // kdDebug() << "logic::ParseSAN: Unknown Symbol: " << chessMove.SAN[SANPtr] << "\n";
return FALSE; return false;
break; break;
} }
SANPtr++; SANPtr++;
@ -362,9 +362,9 @@ bool logic::parseSAN( void )
// kdWarning() << "logic::ParseSAN could not make a legal chessMove out of " << TQString( 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 // kdWarning() << (int)Army << " " << (int)Type << " " << (int)chessMove.fromFile << " " << (int)chessMove.fromRank
// << " " << (int)chessMove.toFile << " " << (int)chessMove.toRank << endl; // << " " << (int)chessMove.toFile << " " << (int)chessMove.toRank << endl;
return FALSE; return false;
} }
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -392,8 +392,8 @@ void logic::writeCAN( void )
void logic::writeSAN( void ) void logic::writeSAN( void )
{ {
Position backup[64]; Position backup[64];
bool SANambig(FALSE); bool SANambig(false);
bool SANambig2(FALSE); bool SANambig2(false);
char tmp, manPtr, toPtr, fromPtr; char tmp, manPtr, toPtr, fromPtr;
TQString SAN; TQString SAN;
@ -422,9 +422,9 @@ void logic::writeSAN( void )
HashLegal( tmp ); HashLegal( tmp );
if( current[toPtr].Note >= NOTE_MOVE ) if( current[toPtr].Note >= NOTE_MOVE )
{ {
SANambig = TRUE; SANambig = true;
if( chessman[tmp].File == chessman[manPtr].File ) if( chessman[tmp].File == chessman[manPtr].File )
SANambig2 = TRUE; SANambig2 = true;
} }
} }
/* /*
@ -440,8 +440,8 @@ void logic::writeSAN( void )
HashLegal( tmp ); HashLegal( tmp );
if( current[toPtr].Note >= NOTE_MOVE ) if( current[toPtr].Note >= NOTE_MOVE )
{ {
SANambig = TRUE; SANambig = true;
SANambig2 = TRUE; SANambig2 = true;
} }
} }
} }
@ -453,7 +453,7 @@ void logic::writeSAN( void )
( current[toPtr].Note == NOTE_ENPASSANT ) ) && ( current[toPtr].Note == NOTE_ENPASSANT ) ) &&
( chessman[manPtr].Type == Pawn ) ) ( chessman[manPtr].Type == Pawn ) )
{ {
SANambig = TRUE; SANambig = true;
} }
/* Write SAN Notation */ /* Write SAN Notation */
if( current[toPtr].Note == NOTE_CASTLE ) if( current[toPtr].Note == NOTE_CASTLE )
@ -486,7 +486,7 @@ void logic::writeSAN( void )
default: default:
break; break;
} }
if( SANambig == TRUE ) if( SANambig == true )
{ {
SAN += char( chessMove.fromFile + 97 ); SAN += char( chessMove.fromFile + 97 );
if( SANambig2 ) SAN += char( chessMove.fromRank + 49 ); if( SANambig2 ) SAN += char( chessMove.fromRank + 49 );
@ -723,10 +723,10 @@ bool logic::isCheck( const bool Army )
if( isChessman( tmp ) ) if( isChessman( tmp ) )
{ {
HashLegal( tmp ); HashLegal( tmp );
if( current[ currentKing ].Note == NOTE_ATTACK ) return TRUE; if( current[ currentKing ].Note == NOTE_ATTACK ) return true;
} }
} }
return FALSE; return false;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -747,10 +747,10 @@ bool logic::isLegal( const bool Army )
count = 0; count = 0;
tmp = 0; tmp = 0;
while( tmp < 64 ) count += ( current[tmp++].Note >= NOTE_MOVE ); while( tmp < 64 ) count += ( current[tmp++].Note >= NOTE_MOVE );
if( count ) return TRUE; if( count ) return true;
} }
} }
return FALSE; return false;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -759,57 +759,57 @@ bool logic::isLegal( const bool Army )
/////////////////////////////////////// ///////////////////////////////////////
bool logic::isDraw( const bool Army ) bool logic::isDraw( const bool Army )
{ {
bool haveBishop(FALSE); bool haveBishop(false);
bool haveBishopDiag(FALSE); bool haveBishopDiag(false);
bool haveKnight(FALSE); bool haveKnight(false);
bool EnemyBishop(FALSE); bool EnemyBishop(false);
bool EnemyBishopDiag(TRUE); bool EnemyBishopDiag(true);
bool EnemyKnight(FALSE); bool EnemyKnight(false);
int tmp(0); int tmp(0);
if( !isLegal( Army ) ) return TRUE; if( !isLegal( Army ) ) return true;
for( tmp = 0; tmp < 64; tmp++ ) for( tmp = 0; tmp < 64; tmp++ )
{ {
if( !isChessman( tmp ) ) continue; if( !isChessman( tmp ) ) continue;
if( chessman[tmp].Type == Queen ) return FALSE; if( chessman[tmp].Type == Queen ) return false;
if( chessman[tmp].Type == Pawn ) return FALSE; if( chessman[tmp].Type == Pawn ) return false;
if( chessman[tmp].Type == Rook ) return FALSE; if( chessman[tmp].Type == Rook ) return false;
/* Enemy guys */ /* Enemy guys */
if( chessman[tmp].Army != Army ) if( chessman[tmp].Army != Army )
{ {
if( chessman[tmp].Type == Bishop ) if( chessman[tmp].Type == Bishop )
{ {
if( EnemyBishop == TRUE ) return FALSE; if( EnemyBishop == true ) return false;
EnemyBishopDiag = abs( ( current[tmp].Rank % 2 ) - ( current[tmp].File % 2 ) ); EnemyBishopDiag = abs( ( current[tmp].Rank % 2 ) - ( current[tmp].File % 2 ) );
EnemyBishop = TRUE; EnemyBishop = true;
} }
if( chessman[tmp].Type == Knight ) if( chessman[tmp].Type == Knight )
{ {
if( EnemyKnight == TRUE ) return FALSE; if( EnemyKnight == true ) return false;
EnemyKnight = TRUE; EnemyKnight = true;
} }
continue; continue;
} }
/* Our guys */ /* Our guys */
if( chessman[tmp].Type == Bishop ) if( chessman[tmp].Type == Bishop )
{ {
if( haveBishop == TRUE ) return FALSE; if( haveBishop == true ) return false;
haveBishopDiag = abs( ( current[tmp].Rank % 2 ) - ( current[tmp].File % 2 ) ); haveBishopDiag = abs( ( current[tmp].Rank % 2 ) - ( current[tmp].File % 2 ) );
haveBishop = TRUE; haveBishop = true;
} }
if( chessman[tmp].Type == Knight ) if( chessman[tmp].Type == Knight )
{ {
if( haveKnight == TRUE ) return FALSE; if( haveKnight == true ) return false;
haveKnight = TRUE; haveKnight = true;
} }
} }
if( haveKnight && EnemyKnight ) return FALSE; if( haveKnight && EnemyKnight ) return false;
if( haveBishop && EnemyKnight ) return FALSE; if( haveBishop && EnemyKnight ) return false;
if( haveKnight && EnemyBishop ) return FALSE; if( haveKnight && EnemyBishop ) return false;
if( haveKnight && haveBishop ) return FALSE; if( haveKnight && haveBishop ) return false;
if( EnemyKnight && EnemyBishop ) return FALSE; if( EnemyKnight && EnemyBishop ) return false;
if( ( haveBishop && EnemyBishop ) && ( haveBishopDiag != EnemyBishopDiag ) ) return FALSE; if( ( haveBishop && EnemyBishop ) && ( haveBishopDiag != EnemyBishopDiag ) ) return false;
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -926,15 +926,15 @@ bool logic::Move( void )
fromPtr = Pointer( chessMove.fromFile, chessMove.fromRank ); fromPtr = Pointer( chessMove.fromFile, chessMove.fromRank );
toPtr = Pointer( chessMove.toFile, chessMove.toRank ); toPtr = Pointer( chessMove.toFile, chessMove.toRank );
if( ( fromPtr == Null ) || ( toPtr == Null ) ) if( ( fromPtr == Null ) || ( toPtr == Null ) )
return FALSE; return false;
manPtr = current[fromPtr].ManPtr; manPtr = current[fromPtr].ManPtr;
if( manPtr == Null ) if( manPtr == Null )
return FALSE; return false;
HashLegal( manPtr ); HashLegal( manPtr );
/* Only proceed if this is a move */ /* Only proceed if this is a move */
if( current[toPtr].Note < NOTE_MOVE ) if( current[toPtr].Note < NOTE_MOVE )
return FALSE; // This depends on all moves being higher value than NOTE_MOVE, return false; // This depends on all moves being higher value than NOTE_MOVE,
// while all non-moves are less. // while all non-moves are less.
/* Take care of moving the rook in a caste */ /* Take care of moving the rook in a caste */
@ -986,7 +986,7 @@ bool logic::Move( void )
if( ( ( OnMove == WHITE ) && ( Param->type(WHITE) == PLAYERLOCAL ) ) || if( ( ( OnMove == WHITE ) && ( Param->type(WHITE) == PLAYERLOCAL ) ) ||
( ( OnMove == BLACK ) && ( Param->type(BLACK) == PLAYERLOCAL ) ) ) ( ( OnMove == BLACK ) && ( Param->type(BLACK) == PLAYERLOCAL ) ) )
{ {
if( Resource->OPTION_Auto_Queen == TRUE ) chessMove.Promote = 'q'; if( Resource->OPTION_Auto_Queen == true ) chessMove.Promote = 'q';
else else
{ {
/* Prompt user for promotion */ /* Prompt user for promotion */
@ -1028,7 +1028,7 @@ bool logic::Move( void )
CastleFlag[ chessman[manPtr].Army ] -= CF_RookQ; CastleFlag[ chessman[manPtr].Army ] -= CF_RookQ;
if( ( chessman[manPtr].Type == Rook ) && ( chessMove.fromFile == 7 ) ) if( ( chessman[manPtr].Type == Rook ) && ( chessMove.fromFile == 7 ) )
CastleFlag[ chessman[manPtr].Army ] -= CF_RookK; CastleFlag[ chessman[manPtr].Army ] -= CF_RookK;
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -1082,7 +1082,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK; if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
/* Negitive Rank Movement */ /* Negitive Rank Movement */
@ -1100,7 +1100,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK; if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
/* Positive File Movement */ /* Positive File Movement */
@ -1118,7 +1118,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK; if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
/* Negative File Movement */ /* Negative File Movement */
@ -1136,7 +1136,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK; if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
if( chessman[ManPtr].Type == Rook ) break; if( chessman[ManPtr].Type == Rook ) break;
@ -1157,7 +1157,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK; if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
/* NW Movement */ /* NW Movement */
@ -1175,7 +1175,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK; if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
/* SW Movement */ /* SW Movement */
@ -1193,7 +1193,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK; if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
/* SE Movement */ /* SE Movement */
@ -1211,7 +1211,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK; if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break; break;
} }
break; break;
@ -1254,7 +1254,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_MOVE; hash[Ptr].Note = NOTE_MOVE;
else else
{ {
if( Recursion == TRUE ) if( Recursion == true )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army ) if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
hash[Ptr].Note = NOTE_ATTACK; hash[Ptr].Note = NOTE_ATTACK;
@ -1274,7 +1274,7 @@ void logic::_HashLegal( const bool Recursion )
if( hash[Ptr].ManPtr == Null ) hash[Ptr].Note = NOTE_MOVE; if( hash[Ptr].ManPtr == Null ) hash[Ptr].Note = NOTE_MOVE;
else else
{ {
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK; if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army ) hash[Ptr].Note = NOTE_ATTACK; if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army ) hash[Ptr].Note = NOTE_ATTACK;
} }
} }
@ -1288,7 +1288,7 @@ void logic::_HashLegal( const bool Recursion )
if( ( dirR == 0 ) && ( dirF == 0 ) ) dirF++; if( ( dirR == 0 ) && ( dirF == 0 ) ) dirF++;
} }
/* Check for castles */ /* Check for castles */
if( Recursion == FALSE ) if( Recursion == false )
{ {
/* Can the King castle at all? */ /* Can the King castle at all? */
if( CastleFlag[ chessman[ ManPtr ].Army ] & CF_King ) if( CastleFlag[ chessman[ ManPtr ].Army ] & CF_King )
@ -1329,7 +1329,7 @@ void logic::_HashLegal( const bool Recursion )
/* Get direction of movement */ /* Get direction of movement */
if( chessman[ManPtr].Army == WHITE ) dirR = 1; if( chessman[ManPtr].Army == WHITE ) dirR = 1;
else dirR = -1; else dirR = -1;
if( Recursion == FALSE ) if( Recursion == false )
{ {
/* Forward 1 square */ /* Forward 1 square */
Ptr = CalcPointer( 0, dirR ); Ptr = CalcPointer( 0, dirR );
@ -1347,7 +1347,7 @@ void logic::_HashLegal( const bool Recursion )
} }
} }
} }
if( Recursion == TRUE ) if( Recursion == true )
{ {
/* Attack Left */ /* Attack Left */
Ptr = CalcPointer( -1, dirR ); Ptr = CalcPointer( -1, dirR );
@ -1390,7 +1390,7 @@ void logic::_HashLegal( const bool Recursion )
/* THE MONSTER */ /* THE MONSTER */
/* Remove all possible moves that would either put your */ /* Remove all possible moves that would either put your */
/* king into check or wouldn't stop a check in progress */ /* king into check or wouldn't stop a check in progress */
if( Recursion == FALSE ) if( Recursion == false )
{ {
/* Make Backups */ /* Make Backups */
copyPositions( hash, hashBackup ); copyPositions( hash, hashBackup );
@ -1407,7 +1407,7 @@ void logic::_HashLegal( const bool Recursion )
if( !isChessman( tmp ) ) continue; if( !isChessman( tmp ) ) continue;
if( ( chessman[tmp].Army != chessman[ManPtr].Army ) && ( chessman[tmp].Type != Null ) ) if( ( chessman[tmp].Army != chessman[ManPtr].Army ) && ( chessman[tmp].Type != Null ) )
{ {
HashLegal( tmp, TRUE ); HashLegal( tmp, true );
/* Is a check in progress? */ /* Is a check in progress? */
if( hash[ currentKing ].Note == NOTE_ATTACK ) if( hash[ currentKing ].Note == NOTE_ATTACK )
{ {
@ -1475,7 +1475,7 @@ void logic::_HashLegal( const bool Recursion )
if( chessman[tmp2].Army != chessman[ManPtr].Army ) if( chessman[tmp2].Army != chessman[ManPtr].Army )
if( isChessman( tmp2 ) ) if( isChessman( tmp2 ) )
{ {
HashLegal( tmp2, TRUE ); HashLegal( tmp2, true );
if( hash[ currentKing ].Note == NOTE_ATTACK ) if( hash[ currentKing ].Note == NOTE_ATTACK )
{ {
hashBackup[tmp].Note = NOTE_NONE; hashBackup[tmp].Note = NOTE_NONE;

@ -54,7 +54,7 @@ class logic
bool isLegal( const bool Army ); bool isLegal( const bool Army );
bool isDraw( const bool Army ); bool isDraw( const bool Army );
bool Move( void ); bool Move( void );
void HashLegal( const char Man, const bool Recursion=FALSE ); void HashLegal( const char Man, const bool Recursion=false );
int Pointer( const char File, const char Rank ); int Pointer( const char File, const char Rank );
bool parseCAN( const bool Army ); bool parseCAN( const bool Army );
@ -64,7 +64,7 @@ class logic
protected: protected:
int CalcPointer( const char File, const char Rank ); int CalcPointer( const char File, const char Rank );
void _HashLegal( const bool Recursion=FALSE ); void _HashLegal( const bool Recursion=false );
void clearBoard( void ); void clearBoard( void );
int getKing( const bool Army ); int getKing( const bool Army );
void Init_Standard( void ); void Init_Standard( void );

@ -48,14 +48,14 @@ match::match( TQWidget *parent, match_param *param, resource *Rsrc ) : TQWidget(
clearSelections(); clearSelections();
/* Init Variables */ /* Init Variables */
Draw_Offered[WHITE] = FALSE; Draw_Offered[WHITE] = false;
Draw_Offered[BLACK] = FALSE; Draw_Offered[BLACK] = false;
Modified = FALSE; Modified = false;
Loading = FALSE; Loading = false;
Paused = FALSE; Paused = false;
JustMoved = FALSE; JustMoved = false;
preMoved = FALSE; preMoved = false;
Current = FALSE; Current = false;
loadTimer = 0; loadTimer = 0;
StatusCode = READY; StatusCode = READY;
StatusMessage = TQString(); StatusMessage = TQString();
@ -89,17 +89,17 @@ match::~match()
/////////////////////////////////////// ///////////////////////////////////////
void match::setVisibility( const bool vis ) void match::setVisibility( const bool vis )
{ {
if( vis == TRUE ) if( vis == true )
{ {
show(); show();
Board->show(); Board->show();
setEnabled( TRUE ); setEnabled( true );
} }
else else
{ {
hide(); hide();
Board->hide(); Board->hide();
setEnabled( FALSE ); setEnabled( false );
} }
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -142,7 +142,7 @@ void match::tick(void)
*/ */
if( !Record->loadNext() ) if( !Record->loadNext() )
{ {
Loading = FALSE; Loading = false;
emit sendCMD( Command( myID, CMD_Play ) ); emit sendCMD( Command( myID, CMD_Play ) );
if( Record->TAG_Result == "*" ) if( Record->TAG_Result == "*" )
{ {
@ -171,7 +171,7 @@ void match::tick(void)
/////////////////////////////////////// ///////////////////////////////////////
void match::clearSelections( void ) void match::clearSelections( void )
{ {
bool commitFlag( FALSE ); bool commitFlag( false );
char tmp; char tmp;
if( ICSGameMode == Null ) if( ICSGameMode == Null )
@ -182,7 +182,7 @@ void match::clearSelections( void )
{ {
Logic->current[tmp].Note = NOTE_NONE; Logic->current[tmp].Note = NOTE_NONE;
Board->drawPosition( tmp ); Board->drawPosition( tmp );
commitFlag = TRUE; commitFlag = true;
} }
} }
} }
@ -192,7 +192,7 @@ void match::clearSelections( void )
{ {
Logic->current[tmp].Note = NOTE_NONE; Logic->current[tmp].Note = NOTE_NONE;
Board->drawPosition( tmp ); Board->drawPosition( tmp );
commitFlag = TRUE; commitFlag = true;
} }
} }
if( commitFlag ) if( commitFlag )
@ -326,11 +326,11 @@ bool match::save( TQString URL )
bool match::load( const TQString URL, const int pos ) bool match::load( const TQString URL, const int pos )
{ {
bool Result; bool Result;
Loading = TRUE; Loading = true;
loadTimer = 20; loadTimer = 20;
if( !Record->open( URL ) ) if( !Record->open( URL ) )
{ {
return FALSE; return false;
} }
Result = Record->load( pos ); Result = Record->load( pos );
if( !Record->TAG_FEN.isEmpty() ) if( !Record->TAG_FEN.isEmpty() )
@ -385,7 +385,7 @@ TQString match::clock( const bool Army )
/////////////////////////////////////// ///////////////////////////////////////
void match::slot_Select( int position ) void match::slot_Select( int position )
{ {
bool preMoving(FALSE); bool preMoving(false);
char tmp, army, selected(Null); char tmp, army, selected(Null);
if( Paused ) return; if( Paused ) return;
@ -410,9 +410,9 @@ void match::slot_Select( int position )
/* Check to make sure it's our turn to select. */ /* Check to make sure it's our turn to select. */
if( !( inputOnMove() & PLAYERLOCAL ) ) if( !( inputOnMove() & PLAYERLOCAL ) )
{ {
if( ( inputOnMove(TRUE) == PLAYERLOCAL ) && ( Resource->OPTION_Premove ) ) if( ( inputOnMove(true) == PLAYERLOCAL ) && ( Resource->OPTION_Premove ) )
{ {
preMoving = TRUE; preMoving = true;
} }
else else
{ {
@ -429,7 +429,7 @@ void match::slot_Select( int position )
} }
if( preMoved ) if( preMoved )
{ {
preMoved = FALSE; preMoved = false;
playSound( SND_SELECT ); playSound( SND_SELECT );
Board->setPremovePositions( Null, Null ); Board->setPremovePositions( Null, Null );
Board->drawPosition( Logic->Pointer( preMove.fromFile, preMove.fromRank ) ); Board->drawPosition( Logic->Pointer( preMove.fromFile, preMove.fromRank ) );
@ -451,7 +451,7 @@ void match::slot_Select( int position )
Logic->current[position].Note = NOTE_SELECT; Logic->current[position].Note = NOTE_SELECT;
Board->drawPosition( selected ); Board->drawPosition( selected );
drawPosition( position ); drawPosition( position );
if( Resource->OPTION_Auto_Preview == TRUE ) if( Resource->OPTION_Auto_Preview == true )
slot_Preview( position ); slot_Preview( position );
else else
playSound( SND_SELECT ); playSound( SND_SELECT );
@ -474,7 +474,7 @@ void match::slot_Select( int position )
preMove.fromFile = Logic->current[selected].File; preMove.fromFile = Logic->current[selected].File;
preMove.toRank = Logic->current[position].Rank; preMove.toRank = Logic->current[position].Rank;
preMove.toFile = Logic->current[position].File; preMove.toFile = Logic->current[position].File;
preMoved = TRUE; preMoved = true;
playSound( SND_SELECT ); playSound( SND_SELECT );
Board->setPremovePositions( selected, position ); Board->setPremovePositions( selected, position );
} }
@ -485,8 +485,8 @@ void match::slot_Select( int position )
chessMove.fromFile = Logic->current[selected].File; chessMove.fromFile = Logic->current[selected].File;
chessMove.toRank = Logic->current[position].Rank; chessMove.toRank = Logic->current[position].Rank;
chessMove.toFile = Logic->current[position].File; chessMove.toFile = Logic->current[position].File;
JustMoved = TRUE; JustMoved = true;
if( move() == FALSE ) if( move() == false )
{ {
Logic->current[selected].Note = NOTE_SELECT; Logic->current[selected].Note = NOTE_SELECT;
drawPosition( selected ); drawPosition( selected );
@ -504,7 +504,7 @@ void match::slot_Select( int position )
army = Logic->chessman[ tmp ].Army; army = Logic->chessman[ tmp ].Army;
/* You can't select your enemy */ /* You can't select your enemy */
if( ( army != onMove() ) && ( preMoving == FALSE ) ) if( ( army != onMove() ) && ( preMoving == false ) )
{ {
return; return;
} }
@ -520,7 +520,7 @@ void match::slot_Select( int position )
Logic->current[position].Note = NOTE_SELECT; Logic->current[position].Note = NOTE_SELECT;
} }
drawPosition( position ); drawPosition( position );
if( Resource->OPTION_Auto_Preview == TRUE ) if( Resource->OPTION_Auto_Preview == true )
{ {
slot_Preview( position ); slot_Preview( position );
} }
@ -600,7 +600,7 @@ void match::recvCMD( const Command &constCommand )
/* Recieving Movelist */ /* Recieving Movelist */
Logic->chessMove = newMove; Logic->chessMove = newMove;
Logic->parseSAN(); Logic->parseSAN();
JustMoved = FALSE; JustMoved = false;
} }
else else
{ {
@ -616,7 +616,7 @@ void match::recvCMD( const Command &constCommand )
move(); move();
else else
{ {
JustMoved = FALSE; JustMoved = false;
Logic->OnMove = !Logic->OnMove; Logic->OnMove = !Logic->OnMove;
} }
@ -745,16 +745,16 @@ bool match::move( ChessMove newMove )
clearSelections(); clearSelections();
Logic->chessMove = newMove; Logic->chessMove = newMove;
if( Logic->parseCAN( onMove() ) != TRUE ) if( Logic->parseCAN( onMove() ) != true )
{ {
if( Logic->parseSAN() != TRUE ) if( Logic->parseSAN() != true )
{ {
kdDebug() << "#" << myID << ": Recieved bad data: " << newMove.CAN << endl; kdDebug() << "#" << myID << ": Recieved bad data: " << newMove.CAN << endl;
return FALSE; return false;
} }
} }
chessMove = Logic->chessMove; chessMove = Logic->chessMove;
JustMoved = TRUE; JustMoved = true;
return move(); return move();
} }
bool match::move( void ) bool match::move( void )
@ -781,19 +781,19 @@ bool match::move( void )
char toPtr = ( chessMove.toRank << 3 ) + chessMove.toFile; char toPtr = ( chessMove.toRank << 3 ) + chessMove.toFile;
/* Skip all this if we're being called due to normal server moves */ /* Skip all this if we're being called due to normal server moves */
if( ( JustMoved == TRUE ) || ( ICSGameMode == ICS_Movelist ) ) if( ( JustMoved == true ) || ( ICSGameMode == ICS_Movelist ) )
{ {
if( ( fromPtr > 63 ) || ( toPtr > 63 ) ) if( ( fromPtr > 63 ) || ( toPtr > 63 ) )
return FALSE; return false;
if( ( fromPtr < 0 ) || ( toPtr < 0 ) ) if( ( fromPtr < 0 ) || ( toPtr < 0 ) )
return FALSE; return false;
manPtr = Logic->current[fromPtr].ManPtr; manPtr = Logic->current[fromPtr].ManPtr;
if( manPtr == Null ) if( manPtr == Null )
return FALSE; return false;
/* Make the move */ /* Make the move */
Logic->chessMove = chessMove; Logic->chessMove = chessMove;
if( Logic->Move() == FALSE ) if( Logic->Move() == false )
return FALSE; return false;
chessMove = Logic->chessMove; chessMove = Logic->chessMove;
} }
@ -872,11 +872,11 @@ bool match::move( void )
Record->Positions << Logic->board(); Record->Positions << Logic->board();
Record->Moves << chessMove; Record->Moves << chessMove;
Record->currentIndex = Record->Moves.count() - 1; Record->currentIndex = Record->Moves.count() - 1;
if( JustMoved == TRUE ) if( JustMoved == true )
{ {
/* Send this move to engines and servers */ /* Send this move to engines and servers */
emit sendCMD( Command( myID, CMD_Move, centiseconds( WHITE ), centiseconds( BLACK ), emit sendCMD( Command( myID, CMD_Move, centiseconds( WHITE ), centiseconds( BLACK ),
chessMove, Record->notation(FALSE)->join(TQString(" ")) ) ); chessMove, Record->notation(false)->join(TQString(" ")) ) );
} }
/* Draw The Move */ /* Draw The Move */
if( ICSGameMode != ICS_Movelist ) if( ICSGameMode != ICS_Movelist )
@ -902,7 +902,7 @@ bool match::move( void )
} }
/* Set Cursor */ /* Set Cursor */
if( ( inputOnMove(TRUE) == PLAYERLOCAL ) && ( inputOnMove() != PLAYERLOCAL ) ) if( ( inputOnMove(true) == PLAYERLOCAL ) && ( inputOnMove() != PLAYERLOCAL ) )
{ {
Board->setCursor( Resource->CURSOR_Thinking ); Board->setCursor( Resource->CURSOR_Thinking );
} }
@ -952,14 +952,14 @@ bool match::move( void )
} }
else else
{ {
Modified = TRUE; Modified = true;
} }
if( preMoved ) if( preMoved )
{ {
preMoved = FALSE; preMoved = false;
Board->setPremovePositions( Null, Null ); Board->setPremovePositions( Null, Null );
chessMove = preMove; chessMove = preMove;
JustMoved = TRUE; JustMoved = true;
move(); move();
} }
/* if( inputOnMove() == PLAYEREMAIL ) /* if( inputOnMove() == PLAYEREMAIL )
@ -970,7 +970,7 @@ bool match::move( void )
i18n("Send Email?") ); i18n("Send Email?") );
} }
*/ */
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -1057,7 +1057,7 @@ void match::review( const int Index )
Logic->setBoard( Record->Positions[Index + 1] ); Logic->setBoard( Record->Positions[Index + 1] );
while( tmp < 64 ) while( tmp < 64 )
Board->drawPosition( tmp++ ); Board->drawPosition( tmp++ );
Board->drawMove( Record->Moves[Index + 1], TRUE ); Board->drawMove( Record->Moves[Index + 1], true );
Logic->setBoard( Record->Positions[Index] ); Logic->setBoard( Record->Positions[Index] );
} }
} }
@ -1116,5 +1116,5 @@ void match::drawPosition( const int position )
void match::requestHint( void ) void match::requestHint( void )
{ {
emit sendCMD( Command( myID, CMD_Hint ) ); emit sendCMD( Command( myID, CMD_Hint ) );
emit sendCMD( Command( myID, CMD_UCI_Hint, centiseconds( WHITE ), centiseconds( BLACK ), Record->notation(FALSE)->join(TQString(" ")) ) ); emit sendCMD( Command( myID, CMD_UCI_Hint, centiseconds( WHITE ), centiseconds( BLACK ), Record->notation(false)->join(TQString(" ")) ) );
} }

@ -57,7 +57,7 @@ class match : public TQWidget
public: public:
match(TQWidget *parent, match_param *param, resource *Rsrc); match(TQWidget *parent, match_param *param, resource *Rsrc);
~match(); ~match();
char inputOnMove( bool reverse=FALSE ); char inputOnMove( bool reverse=false );
char input( char army ); char input( char army );
TQString url( void ); TQString url( void );
void flip( void ); void flip( void );

@ -214,7 +214,7 @@ void match_param::setTimer( void )
{ {
if( TimerFlag ) return; if( TimerFlag ) return;
TQTimer::singleShot( 0, this, TQ_SLOT( slot_Timer() ) ); TQTimer::singleShot( 0, this, TQ_SLOT( slot_Timer() ) );
TimerFlag = TRUE; TimerFlag = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -225,7 +225,7 @@ void match_param::setTimer( void )
void match_param::slot_Timer( void ) void match_param::slot_Timer( void )
{ {
emit valuesChanged(); emit valuesChanged();
TimerFlag = FALSE; TimerFlag = false;
} }
/////////////////////////////////////// ///////////////////////////////////////

@ -391,7 +391,7 @@ bool pgn::load( const int pos )
pgnView->init(); pgnView->init();
File.at( File_Position ); File.at( File_Position );
currentLine = ""; currentLine = "";
return TRUE; return true;
} }
c = getch(); c = getch();
while( c != TQChar::null ) while( c != TQChar::null )
@ -421,7 +421,7 @@ bool pgn::load( const int pos )
} }
} }
close(); close();
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -433,7 +433,7 @@ bool pgn::loadNext( void )
TQChar c; TQChar c;
TQString Value; TQString Value;
ChessMove Move; ChessMove Move;
bool postMove( FALSE ); bool postMove( false );
/* Toplevel parsing loop */ /* Toplevel parsing loop */
while( 1 ) while( 1 )
@ -459,7 +459,7 @@ bool pgn::loadNext( void )
continue; continue;
/* Tag Pair...next game, so we're done. */ /* Tag Pair...next game, so we're done. */
case '[': case '[':
return FALSE; return false;
/* Numeric Annotation Glyph */ /* Numeric Annotation Glyph */
case '$': case '$':
c = getch(); c = getch();
@ -503,7 +503,7 @@ bool pgn::loadNext( void )
if( postMove ) if( postMove )
{ {
currentLine.prepend( c ); currentLine.prepend( c );
return TRUE; return true;
} }
/* Catch Standard Algebraic Notation */ /* Catch Standard Algebraic Notation */
while( ( c != TQChar::null ) && while( ( c != TQChar::null ) &&
@ -516,12 +516,12 @@ bool pgn::loadNext( void )
} }
strcpy( Move.SAN, Value.latin1() ); strcpy( Move.SAN, Value.latin1() );
emit processMove( Move ); emit processMove( Move );
postMove = TRUE; postMove = true;
} }
c = getch(); c = getch();
} }
} }
return FALSE; return false;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -678,7 +678,7 @@ bool pgn::save( TQString URL )
(*Output) << SAN << " " << TAG_Result << "\n\n"; (*Output) << SAN << " " << TAG_Result << "\n\n";
Save.close(); Save.close();
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -724,18 +724,18 @@ bool pgn::open( const TQString &URL )
{ {
close(); close();
if( !TDEIO::NetAccess::download( URL, tempFile ) ) if( !TDEIO::NetAccess::download( URL, tempFile ) )
return FALSE; return false;
File.setName( tempFile ); File.setName( tempFile );
if( !File.open( IO_ReadOnly ) ) if( !File.open( IO_ReadOnly ) )
{ {
close(); close();
return FALSE; return false;
} }
Input.setDevice( &File ); Input.setDevice( &File );
CurrentURL = URL; CurrentURL = URL;
File.at(0); File.at(0);
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //

@ -23,9 +23,9 @@
proto_uci::proto_uci( const int ID ) : proto_base( ID ) proto_uci::proto_uci( const int ID ) : proto_base( ID )
{ {
hintMode = FALSE; hintMode = false;
initMode = FALSE; initMode = false;
JustMoved = FALSE; JustMoved = false;
myArmy = BLACK; myArmy = BLACK;
Turn = WHITE; Turn = WHITE;
CMDList = new CommandList; CMDList = new CommandList;
@ -54,7 +54,7 @@ void proto_uci::parse( const Command &command )
/* Command: Init */ /* Command: Init */
case CMD_Init: case CMD_Init:
emit output( "uci" ); emit output( "uci" );
initMode = TRUE; initMode = true;
break; break;
/* Command: New Game */ /* Command: New Game */
@ -71,7 +71,7 @@ void proto_uci::parse( const Command &command )
case CMD_Move: case CMD_Move:
if( JustMoved ) if( JustMoved )
{ {
JustMoved = FALSE; JustMoved = false;
break; break;
} }
if( FEN.isEmpty() ) if( FEN.isEmpty() )
@ -102,7 +102,7 @@ void proto_uci::parse( const Command &command )
/* Command: UCI Hint */ /* Command: UCI Hint */
case CMD_UCI_Hint: case CMD_UCI_Hint:
hintMode = TRUE; hintMode = true;
if( FEN.isEmpty() ) if( FEN.isEmpty() )
{ {
emit output( TQString("position startpos moves %1").arg( cmd.getData() ) ); emit output( TQString("position startpos moves %1").arg( cmd.getData() ) );
@ -153,14 +153,14 @@ void proto_uci::parse( const TQString &string )
if( hintMode ) if( hintMode )
{ {
/* The Engine Gives a Hint */ /* The Engine Gives a Hint */
hintMode = FALSE; 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, i18n( "%1 suggests this move:\n%2" ).arg( engineName ).arg( strList[1] ) ) );
emit output( Command( myID, CMD_Hint, TQString( "%1 suggests this move:\n%2" ).arg( engineName ).arg( strList[1] ) ) ); emit output( Command( myID, CMD_Hint, TQString( "%1 suggests this move:\n%2" ).arg( engineName ).arg( strList[1] ) ) );
} }
else else
{ {
/* The Engine Moves */ /* The Engine Moves */
JustMoved = TRUE; JustMoved = true;
emit output( Command( myID, CMD_Move, 0, 0, myMove ) ); emit output( Command( myID, CMD_Move, 0, 0, myMove ) );
} }
} }
@ -168,14 +168,14 @@ void proto_uci::parse( const TQString &string )
/* UCIOK */ /* UCIOK */
if( strList[0] == "uciok" ) if( strList[0] == "uciok" )
{ {
initMode = FALSE; initMode = false;
releaseBuffer(); releaseBuffer();
} }
/* READYOK */ /* READYOK */
if( strList[0] == "readyok" ) if( strList[0] == "readyok" )
{ {
initMode = FALSE; initMode = false;
releaseBuffer(); releaseBuffer();
} }

@ -25,21 +25,21 @@
proto_xboard::proto_xboard( const int ID ) : proto_base( ID ) proto_xboard::proto_xboard( const int ID ) : proto_base( ID )
{ {
FEATURE_Analyze = TRUE; FEATURE_Analyze = true;
FEATURE_Colors = TRUE; FEATURE_Colors = true;
FEATURE_Draw = TRUE; FEATURE_Draw = true;
FEATURE_ICS = FALSE; FEATURE_ICS = false;
FEATURE_Name = TRUE; FEATURE_Name = true;
FEATURE_Pause = FALSE; FEATURE_Pause = false;
FEATURE_Ping = FALSE; FEATURE_Ping = false;
FEATURE_PlayOther = FALSE; FEATURE_PlayOther = false;
FEATURE_Reuse = TRUE; FEATURE_Reuse = true;
FEATURE_SetBoard = FALSE; FEATURE_SetBoard = false;
FEATURE_SAN = FALSE; FEATURE_SAN = false;
FEATURE_SIGINT = TRUE; FEATURE_SIGINT = true;
FEATURE_SIGTERM = TRUE; FEATURE_SIGTERM = true;
FEATURE_Time = TRUE; FEATURE_Time = true;
FEATURE_UserMove = FALSE; FEATURE_UserMove = false;
FEATURE_Variants = 0; FEATURE_Variants = 0;
FEATURE_Level = 1; FEATURE_Level = 1;
FEATURE_BookEngine = 0; FEATURE_BookEngine = 0;
@ -48,12 +48,12 @@ proto_xboard::proto_xboard( const int ID ) : proto_base( ID )
InitTimer = new TQTimer( this ); InitTimer = new TQTimer( this );
connect( InitTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( releaseBuffer() ) ); connect( InitTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( releaseBuffer() ) );
Check = TRUE; Check = true;
Team = FALSE; Team = false;
JustMoved = FALSE; JustMoved = false;
AcceptIllegal = FALSE; AcceptIllegal = false;
DelayedGo = FALSE; DelayedGo = false;
Forced = TRUE; Forced = true;
Turn = WHITE; Turn = WHITE;
} }
proto_xboard::~proto_xboard() proto_xboard::~proto_xboard()
@ -86,7 +86,7 @@ void proto_xboard::parse( const Command &command )
/* Command: Init */ /* Command: Init */
case CMD_Init: case CMD_Init:
emit output( "xboard\nprotover 3" ); emit output( "xboard\nprotover 3" );
InitTimer->start( 2000, TRUE ); InitTimer->start( 2000, true );
break; break;
/* Command: New Game */ /* Command: New Game */
@ -110,10 +110,10 @@ void proto_xboard::parse( const Command &command )
case CMD_Move: case CMD_Move:
if( JustMoved ) if( JustMoved )
{ {
JustMoved = FALSE; JustMoved = false;
break; break;
} }
AcceptIllegal = TRUE; AcceptIllegal = true;
myMove = cmd.getMove(); myMove = cmd.getMove();
/* Send Time */ /* Send Time */
if( FEATURE_Time ) if( FEATURE_Time )
@ -137,9 +137,9 @@ void proto_xboard::parse( const Command &command )
temp += myMove.CAN; temp += myMove.CAN;
if( DelayedGo ) if( DelayedGo )
{ {
DelayedGo = FALSE; DelayedGo = false;
temp += "\ngo"; temp += "\ngo";
Forced = FALSE; Forced = false;
} }
emit output( temp ); emit output( temp );
break; break;
@ -151,7 +151,7 @@ void proto_xboard::parse( const Command &command )
else else
{ {
emit output( "force" ); emit output( "force" );
Forced = TRUE; Forced = true;
} }
break; break;
@ -164,10 +164,10 @@ void proto_xboard::parse( const Command &command )
if( Turn == Army ) if( Turn == Army )
{ {
emit output( "go" ); emit output( "go" );
Forced = FALSE; Forced = false;
} }
else else
DelayedGo = TRUE; DelayedGo = true;
} }
break; break;
@ -187,8 +187,8 @@ void proto_xboard::parse( const Command &command )
else else
{ {
emit output( "force" ); emit output( "force" );
Forced = TRUE; Forced = true;
DelayedGo = TRUE; DelayedGo = true;
} }
break; break;
} }
@ -219,8 +219,8 @@ void proto_xboard::parse( const Command &command )
else else
{ {
emit output( "force" ); emit output( "force" );
Forced = TRUE; Forced = true;
DelayedGo = TRUE; DelayedGo = true;
} }
break; break;
} }
@ -238,7 +238,7 @@ void proto_xboard::parse( const Command &command )
/* Command: Result White */ /* Command: Result White */
case CMD_Result_White: case CMD_Result_White:
emit output( "result 1-0 {White Mates}" ); emit output( "result 1-0 {White Mates}" );
AcceptIllegal = FALSE; AcceptIllegal = false;
// if( Army == WHITE ) // if( Army == WHITE )
// (*IT).Wins++; // (*IT).Wins++;
// else // else
@ -248,7 +248,7 @@ void proto_xboard::parse( const Command &command )
/* Command: Result Black */ /* Command: Result Black */
case CMD_Result_Black: case CMD_Result_Black:
emit output( "result 0-1 {Black Mates}" ); emit output( "result 0-1 {Black Mates}" );
AcceptIllegal = FALSE; AcceptIllegal = false;
// if( Army == BLACK ) // if( Army == BLACK )
// (*IT).Wins++; // (*IT).Wins++;
// else // else
@ -258,7 +258,7 @@ void proto_xboard::parse( const Command &command )
/* Command: Result Draw */ /* Command: Result Draw */
case CMD_Result_Draw: case CMD_Result_Draw:
emit output( "result 1/2-1/2 {Draw Game}" ); emit output( "result 1/2-1/2 {Draw Game}" );
AcceptIllegal = FALSE; AcceptIllegal = false;
// (*IT).Draws++; // (*IT).Draws++;
break; break;
@ -299,7 +299,7 @@ void proto_xboard::parse( const Command &command )
/* Command: Check Book */ /* Command: Check Book */
case CMD_Check_Book: case CMD_Check_Book:
emit output( "go" ); emit output( "go" );
Forced = FALSE; Forced = false;
break; break;
/* Command: Ponder */ /* Command: Ponder */
@ -325,8 +325,8 @@ void proto_xboard::parse( const Command &command )
/* Command: Listen */ /* Command: Listen */
case CMD_Listen: case CMD_Listen:
emit output( "force" ); emit output( "force" );
Forced = TRUE; Forced = true;
DelayedGo = FALSE; DelayedGo = false;
break; break;
/* Command: Play */ /* Command: Play */
@ -334,10 +334,10 @@ void proto_xboard::parse( const Command &command )
if( Army == Turn ) if( Army == Turn )
{ {
emit output( "go" ); emit output( "go" );
Forced = FALSE; Forced = false;
} }
else else
DelayedGo = TRUE; DelayedGo = true;
break; break;
/* Command: White Resign */ /* Command: White Resign */
@ -352,7 +352,7 @@ void proto_xboard::parse( const Command &command )
/* Command: Set Board */ /* Command: Set Board */
case CMD_Set_Board: case CMD_Set_Board:
if( FEATURE_SetBoard == TRUE ) if( FEATURE_SetBoard == true )
{ {
emit output( TQString( "setboard %1" ).arg( cmd.getData() ) ); emit output( TQString( "setboard %1" ).arg( cmd.getData() ) );
} }
@ -390,7 +390,7 @@ void proto_xboard::parse( const TQString &string )
emit output( Command( myID, CMD_Send_SIGINT ) ); emit output( Command( myID, CMD_Send_SIGINT ) );
/* Illegal */ /* Illegal */
if( strList[0].contains( "illegal", FALSE ) ) if( strList[0].contains( "illegal", false ) )
{ {
if( AcceptIllegal ) if( AcceptIllegal )
{ {
@ -400,7 +400,7 @@ void proto_xboard::parse( const TQString &string )
return; return;
if( strIn.contains("(no matching move)sd") ) if( strIn.contains("(no matching move)sd") )
return; return;
AcceptIllegal = FALSE; AcceptIllegal = false;
emit output( Command( myID, CMD_Illegal ) ); emit output( Command( myID, CMD_Illegal ) );
} }
return; return;
@ -420,9 +420,9 @@ void proto_xboard::parse( const TQString &string )
if( Team ) if( Team )
{ {
emit output( "force" ); emit output( "force" );
Forced = TRUE; Forced = true;
} }
JustMoved = TRUE; JustMoved = true;
emit output( Command( myID, CMD_Move, 0, 0, myMove ) ); emit output( Command( myID, CMD_Move, 0, 0, myMove ) );
return; return;
} }
@ -436,9 +436,9 @@ void proto_xboard::parse( const TQString &string )
if( Team ) if( Team )
{ {
emit output( "force" ); emit output( "force" );
Forced = TRUE; Forced = true;
} }
JustMoved = TRUE; JustMoved = true;
emit output( Command( myID, CMD_Move, 0, 0, myMove ) ); emit output( Command( myID, CMD_Move, 0, 0, myMove ) );
return; return;
} }
@ -460,7 +460,7 @@ void proto_xboard::parse( const TQString &string )
if( strList[0] == "outofbook" ) if( strList[0] == "outofbook" )
{ {
emit output( "force" ); emit output( "force" );
Forced = TRUE; Forced = true;
emit output( Command( myID, CMD_Out_Of_Book ) ); emit output( Command( myID, CMD_Out_Of_Book ) );
return; return;
} }
@ -522,7 +522,7 @@ void proto_xboard::parse( const TQString &string )
} }
/* Resign */ /* Resign */
if( strIn.contains( "resign", FALSE ) ) if( strIn.contains( "resign", false ) )
{ {
if( Army == WHITE ) if( Army == WHITE )
emit output( Command( myID, CMD_White_Resign ) ); emit output( Command( myID, CMD_White_Resign ) );

@ -138,7 +138,7 @@ void resource::ConfigRead( void )
CFG->setGroup( "Themes" ); CFG->setGroup( "Themes" );
CurrentBoard = CFG->readEntry( "CurrentBoard", "KBDefault.tar.gz" ); CurrentBoard = CFG->readEntry( "CurrentBoard", "KBDefault.tar.gz" );
CurrentChessmen = CFG->readEntry( "CurrentChessmen", "KCDefault.tar.gz" ); CurrentChessmen = CFG->readEntry( "CurrentChessmen", "KCDefault.tar.gz" );
OPTION_3DBoard = CFG->readBoolEntry( "Use3DBoard", FALSE ); OPTION_3DBoard = CFG->readBoolEntry( "Use3DBoard", false );
ThemeSize = CFG->readNumEntry( "Size", initSize ); ThemeSize = CFG->readNumEntry( "Size", initSize );
if( ThemeSize > ( initSize + 16 ) ) if( ThemeSize > ( initSize + 16 ) )
ThemeSize = initSize; ThemeSize = initSize;
@ -154,45 +154,45 @@ void resource::ConfigRead( void )
Local_Player = CFG->readEntry( "UserName", sysName ); Local_Player = CFG->readEntry( "UserName", sysName );
Config_Version = CFG->readNumEntry( "ConfigVersion", 0 ); Config_Version = CFG->readNumEntry( "ConfigVersion", 0 );
OPTION_On_Init = CFG->readNumEntry( "OnInit", MENU_VS_PC ); OPTION_On_Init = CFG->readNumEntry( "OnInit", MENU_VS_PC );
OPTION_Auto_Queen = CFG->readBoolEntry( "AlwaysQueen", FALSE ); OPTION_Auto_Queen = CFG->readBoolEntry( "AlwaysQueen", false );
OPTION_Ponder = CFG->readBoolEntry( "Ponder", TRUE ); OPTION_Ponder = CFG->readBoolEntry( "Ponder", true );
OPTION_Book_White = CFG->readBoolEntry( "BookWhite", FALSE ); OPTION_Book_White = CFG->readBoolEntry( "BookWhite", false );
OPTION_Book_Black = CFG->readBoolEntry( "BookBlack", FALSE ); OPTION_Book_Black = CFG->readBoolEntry( "BookBlack", false );
OPTION_Pause_On_Minimize = CFG->readBoolEntry( "PauseOnMinimize", TRUE ); OPTION_Pause_On_Minimize = CFG->readBoolEntry( "PauseOnMinimize", true );
OPTION_Delete_Logs = CFG->readBoolEntry( "DeleteLogOnExit", FALSE ); OPTION_Delete_Logs = CFG->readBoolEntry( "DeleteLogOnExit", false );
OPTION_Reuse_PGN = CFG->readBoolEntry( "ReusePGN", FALSE ); OPTION_Reuse_PGN = CFG->readBoolEntry( "ReusePGN", false );
PGN_Filename = CFG->readEntry( "PGNFilename", TQString() ); PGN_Filename = CFG->readEntry( "PGNFilename", TQString() );
SCID_Image_Path = CFG->readEntry( "SCIDImages", TQString() ); SCID_Image_Path = CFG->readEntry( "SCIDImages", TQString() );
OPTION_Auto_Close_Last_ICS = CFG->readBoolEntry( "AutoCloseLastICS", TRUE ); OPTION_Auto_Close_Last_ICS = CFG->readBoolEntry( "AutoCloseLastICS", true );
OPTION_Show_Extended_PGN = CFG->readBoolEntry( "ShowExtendedPGN", FALSE ); OPTION_Show_Extended_PGN = CFG->readBoolEntry( "ShowExtendedPGN", false );
OPTION_Auto_Call_Flag = CFG->readBoolEntry( "AutoCallFlag", TRUE ); OPTION_Auto_Call_Flag = CFG->readBoolEntry( "AutoCallFlag", true );
Email_Command_Line = CFG->readEntry( "EmailCommandLine", TQString("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 ); Accepted_License = CFG->readBoolEntry( "Alg2p", false );
/* Display */ /* Display */
OPTION_Show_Splash = CFG->readBoolEntry( "ShowSplash", TRUE ); OPTION_Show_Splash = CFG->readBoolEntry( "ShowSplash", true );
OPTION_Auto_Preview = CFG->readBoolEntry( "AutoPreview", FALSE ); OPTION_Auto_Preview = CFG->readBoolEntry( "AutoPreview", false );
OPTION_Show_Last_Move = CFG->readBoolEntry( "ShowLastMove", TRUE ); OPTION_Show_Last_Move = CFG->readBoolEntry( "ShowLastMove", true );
OPTION_Animate_Moves = CFG->readBoolEntry( "AnimateMoves", FALSE ); OPTION_Animate_Moves = CFG->readBoolEntry( "AnimateMoves", false );
OPTION_Show_Coord = CFG->readBoolEntry( "ShowCoord", FALSE ); OPTION_Show_Coord = CFG->readBoolEntry( "ShowCoord", false );
OPTION_Board_Orientation = CFG->readBoolEntry( "BoardOrientation", 0 ); OPTION_Board_Orientation = CFG->readBoolEntry( "BoardOrientation", 0 );
/* ICS */ /* ICS */
CFG->setGroup( "ICS" ); CFG->setGroup( "ICS" );
OPTION_Premove = CFG->readBoolEntry( "Premove", TRUE ); OPTION_Premove = CFG->readBoolEntry( "Premove", true );
OPTION_Kibitz = CFG->readBoolEntry( "Kibitz", TRUE ); OPTION_Kibitz = CFG->readBoolEntry( "Kibitz", true );
OPTION_Private = CFG->readBoolEntry( "Private", FALSE ); OPTION_Private = CFG->readBoolEntry( "Private", false );
OPTION_Shout = CFG->readBoolEntry( "Shout", TRUE ); OPTION_Shout = CFG->readBoolEntry( "Shout", true );
OPTION_Tell = CFG->readBoolEntry( "Tell", TRUE ); OPTION_Tell = CFG->readBoolEntry( "Tell", true );
OPTION_Seek = CFG->readBoolEntry( "Seek", TRUE ); OPTION_Seek = CFG->readBoolEntry( "Seek", true );
OPTION_Profanity = CFG->readNumEntry( "Profanity", 1 ); OPTION_Profanity = CFG->readNumEntry( "Profanity", 1 );
Seek_Timer = CFG->readNumEntry( "SeekTimer", 70 ); Seek_Timer = CFG->readNumEntry( "SeekTimer", 70 );
/* Audio */ /* Audio */
CFG->setGroup( "Audio" ); CFG->setGroup( "Audio" );
OPTION_Audio = CFG->readBoolEntry( "useAudio", TRUE ); OPTION_Audio = CFG->readBoolEntry( "useAudio", true );
CurrentAudio = CFG->readEntry( "CurrentAudio", "KSDefault.tar.gz" ); CurrentAudio = CFG->readEntry( "CurrentAudio", "KSDefault.tar.gz" );
OPTION_Audio_Current_Only = CFG->readBoolEntry( "AudioCurrentOnly", FALSE ); OPTION_Audio_Current_Only = CFG->readBoolEntry( "AudioCurrentOnly", false );
Audio_Volume = CFG->readNumEntry( "AudioVolume", 0 ); Audio_Volume = CFG->readNumEntry( "AudioVolume", 0 );
Audio->enabled = OPTION_Audio; Audio->enabled = OPTION_Audio;
Audio->volume = Audio_Volume; Audio->volume = Audio_Volume;
@ -269,7 +269,7 @@ void resource::ConfigWrite( void )
/* Notification Prompts */ /* Notification Prompts */
CFG->setGroup( "Notification Messages" ); CFG->setGroup( "Notification Messages" );
CFG->writeEntry( "PromptForSaving", PromptForSaving ); CFG->writeEntry( "PromptForSaving", PromptForSaving );
CFG->setReadOnly( FALSE ); CFG->setReadOnly( false );
if( CFG->isReadOnly() ) if( CFG->isReadOnly() )
kdWarning() << "resource::ConfigWrite: Configuration is READ ONLY. Can not write changes." << endl; kdWarning() << "resource::ConfigWrite: Configuration is READ ONLY. Can not write changes." << endl;
CFG->sync(); CFG->sync();
@ -292,7 +292,7 @@ void resource::ReadMatchParam( void )
/* Handle Time Controls */ /* Handle Time Controls */
buffer = CFG->readEntry( "WhiteTCP", "40,900,0" ); buffer = CFG->readEntry( "WhiteTCP", "40,900,0" );
TCPs = TQStringList::split( TQString(","), buffer, FALSE ); TCPs = TQStringList::split( TQString(","), buffer, false );
for( TQSL_IT = TCPs.begin(); TQSL_IT != TCPs.end(); ++TQSL_IT ) for( TQSL_IT = TCPs.begin(); TQSL_IT != TCPs.end(); ++TQSL_IT )
{ {
tempTCP.Moves = (*TQSL_IT).toInt(); tempTCP.Moves = (*TQSL_IT).toInt();
@ -304,7 +304,7 @@ void resource::ReadMatchParam( void )
} }
TCPs.clear(); TCPs.clear();
buffer = CFG->readEntry( "BlackTCP", "40,900,0" ); buffer = CFG->readEntry( "BlackTCP", "40,900,0" );
TCPs = TQStringList::split( TQString(","), buffer, FALSE ); TCPs = TQStringList::split( TQString(","), buffer, false );
for( TQSL_IT = TCPs.begin(); TQSL_IT != TCPs.end(); ++TQSL_IT ) for( TQSL_IT = TCPs.begin(); TQSL_IT != TCPs.end(); ++TQSL_IT )
{ {
tempTCP.Moves = (*TQSL_IT).toInt(); tempTCP.Moves = (*TQSL_IT).toInt();
@ -386,7 +386,7 @@ void resource::ReadEngines( void )
buffer = CFG->readEntry( "Engines" ); buffer = CFG->readEntry( "Engines" );
if( buffer.isEmpty() ) return; if( buffer.isEmpty() ) return;
engineList = TQStringList::split( TQString(","), buffer, FALSE ); engineList = TQStringList::split( TQString(","), buffer, false );
for ( engineListIT = engineList.begin(); engineListIT != engineList.end(); ++engineListIT ) for ( engineListIT = engineList.begin(); engineListIT != engineList.end(); ++engineListIT )
{ {
if( !CFG->hasGroup( (*engineListIT) ) ) continue; if( !CFG->hasGroup( (*engineListIT) ) ) continue;
@ -452,7 +452,7 @@ void resource::ReadServers( void )
buffer = CFG->readEntry( "Servers" ); buffer = CFG->readEntry( "Servers" );
if( buffer.isEmpty() ) return; if( buffer.isEmpty() ) return;
serverList = TQStringList::split( TQString(","), buffer, FALSE ); serverList = TQStringList::split( TQString(","), buffer, false );
for ( serverListIT = serverList.begin(); serverListIT != serverList.end(); ++serverListIT ) for ( serverListIT = serverList.begin(); serverListIT != serverList.end(); ++serverListIT )
{ {
if( !CFG->hasGroup( (*serverListIT) ) ) continue; if( !CFG->hasGroup( (*serverListIT) ) ) continue;
@ -620,7 +620,7 @@ void resource::setAudio( int AudioIndex )
/////////////////////////////////////// ///////////////////////////////////////
void resource::setTheme( int BoardIndex, int ChessmenIndex ) void resource::setTheme( int BoardIndex, int ChessmenIndex )
{ {
static bool firstTime( TRUE ); static bool firstTime( true );
TQString boardURL; TQString boardURL;
TQString chessmenURL; TQString chessmenURL;
TQString boardConf; TQString boardConf;
@ -661,11 +661,11 @@ void resource::setTheme( int BoardIndex, int ChessmenIndex )
/* load the theme.conf files */ /* load the theme.conf files */
if( !TDEIO::NetAccess::download( boardURL + "theme.conf", boardConf ) ) if( !TDEIO::NetAccess::download( boardURL + "theme.conf", boardConf ) )
kdWarning() << "Can not read theme.conf from " << boardURL << endl; kdWarning() << "Can not read theme.conf from " << boardURL << endl;
boardConfig = new KSimpleConfig( boardConf, TRUE ); boardConfig = new KSimpleConfig( boardConf, true );
if( !TDEIO::NetAccess::download( chessmenURL + "theme.conf", chessmenConf ) ) if( !TDEIO::NetAccess::download( chessmenURL + "theme.conf", chessmenConf ) )
kdWarning() << "Can not read theme.conf from " << chessmenURL << endl; kdWarning() << "Can not read theme.conf from " << chessmenURL << endl;
chessmenConfig = new KSimpleConfig( chessmenConf, TRUE ); chessmenConfig = new KSimpleConfig( chessmenConf, true );
/* Read the headers */ /* Read the headers */
boardConfig->setGroup( "General" ); boardConfig->setGroup( "General" );
@ -685,7 +685,7 @@ void resource::setTheme( int BoardIndex, int ChessmenIndex )
/* Load the Board */ /* Load the Board */
boardConfig->setGroup( "2DBoard" ); boardConfig->setGroup( "2DBoard" );
ThemeBorder = boardConfig->readBoolEntry( "HaveBorder", FALSE ); ThemeBorder = boardConfig->readBoolEntry( "HaveBorder", false );
loadThemeItem( boardURL + boardConfig->readEntry("Light", "square.light.png"), pixCache->Orig_SquareLight ); loadThemeItem( boardURL + boardConfig->readEntry("Light", "square.light.png"), pixCache->Orig_SquareLight );
loadThemeItem( boardURL + boardConfig->readEntry("Dark", "square.dark.png"), pixCache->Orig_SquareDark ); loadThemeItem( boardURL + boardConfig->readEntry("Dark", "square.dark.png"), pixCache->Orig_SquareDark );
loadThemeItem( boardURL + boardConfig->readEntry("Select", "square.select.png"), pixCache->Orig_HighlightSelect ); loadThemeItem( boardURL + boardConfig->readEntry("Select", "square.select.png"), pixCache->Orig_HighlightSelect );
@ -727,7 +727,7 @@ void resource::setTheme( int BoardIndex, int ChessmenIndex )
pixCache->clear(); pixCache->clear();
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
pixCache->resize( ThemeSize ); pixCache->resize( ThemeSize );
firstTime = FALSE; firstTime = false;
return; return;
} }
/////////////////////////////////////// ///////////////////////////////////////

@ -23,7 +23,7 @@ setPageAudio::setPageAudio(TQWidget *parent, resource *Rsrc ) : TQVBoxLayout(par
Parent = parent; Parent = parent;
Resource = Rsrc; Resource = Rsrc;
NewSounds = 0; NewSounds = 0;
changeTheme = FALSE; changeTheme = false;
BUTTON_enableAudio = new TQCheckBox( i18n( "Enable Audio" ), parent ); BUTTON_enableAudio = new TQCheckBox( i18n( "Enable Audio" ), parent );
BUTTON_enableAudio->setChecked( Resource->OPTION_Audio ); BUTTON_enableAudio->setChecked( Resource->OPTION_Audio );
@ -78,7 +78,7 @@ void setPageAudio::slot_enableAudio( bool state )
void setPageAudio::slot_currentTheme( int Index ) void setPageAudio::slot_currentTheme( int Index )
{ {
NewSounds = Index; NewSounds = Index;
changeTheme = TRUE; changeTheme = true;
emit enableApply(); emit enableApply();
} }
/////////////////////////////////////// ///////////////////////////////////////

@ -33,9 +33,9 @@ setPageDisplay::setPageDisplay(TQWidget *parent, resource *Rsrc ) : TQVBoxLayou
margin = Style.defaultFrameWidth(); margin = Style.defaultFrameWidth();
NewBoards = 0; NewBoards = 0;
NewChessmen = 0; NewChessmen = 0;
changeTheme = FALSE; changeTheme = false;
refreshBoard = FALSE; refreshBoard = false;
rebuildConsole = FALSE; rebuildConsole = false;
TabParent = new TQTabWidget( parent, "setPageDisplay" ); TabParent = new TQTabWidget( parent, "setPageDisplay" );
initTab1(); initTab1();
@ -138,8 +138,8 @@ void setPageDisplay::initTab1( void )
this, TQ_SLOT( slotToggle_Show_Coord(bool) ) ); this, TQ_SLOT( slotToggle_Show_Coord(bool) ) );
Current_Theme_Size->setTickmarks( TQSlider::Below ); Current_Theme_Size->setTickmarks( TQSlider::Below );
Current_Boards->setEditable( FALSE ); Current_Boards->setEditable( false );
Current_Chessmen->setEditable( FALSE ); Current_Chessmen->setEditable( false );
buildThemeList(); buildThemeList();
connect( Current_Boards, TQ_SIGNAL( activated(int) ), connect( Current_Boards, TQ_SIGNAL( activated(int) ),
this, TQ_SLOT( slotCurrent_Boards(int) ) ); this, TQ_SLOT( slotCurrent_Boards(int) ) );
@ -253,7 +253,7 @@ void setPageDisplay::slot_setDefault(void)
Resource->COLOR_Whisper = TQColor( 0, 160, 0 ); // Green Resource->COLOR_Whisper = TQColor( 0, 160, 0 ); // Green
Resource->COLOR_Notification = TQColor( 0, 128, 128 ); // Cyan Resource->COLOR_Notification = TQColor( 0, 128, 128 ); // Cyan
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -266,7 +266,7 @@ void setPageDisplay::slot_Font_Standard(void)
int value = TDEFontDialog::getFont( Resource->FONT_Standard ); int value = TDEFontDialog::getFont( Resource->FONT_Standard );
if( value != TDEFontDialog::Accepted ) return; if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Font_PrivateTell(void) void setPageDisplay::slot_Font_PrivateTell(void)
@ -274,7 +274,7 @@ void setPageDisplay::slot_Font_PrivateTell(void)
int value = TDEFontDialog::getFont( Resource->FONT_PrivateTell ); int value = TDEFontDialog::getFont( Resource->FONT_PrivateTell );
if( value != TDEFontDialog::Accepted ) return; if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Font_ChannelTell(void) void setPageDisplay::slot_Font_ChannelTell(void)
@ -282,7 +282,7 @@ void setPageDisplay::slot_Font_ChannelTell(void)
int value = TDEFontDialog::getFont( Resource->FONT_ChannelTell ); int value = TDEFontDialog::getFont( Resource->FONT_ChannelTell );
if( value != TDEFontDialog::Accepted ) return; if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Font_Shout(void) void setPageDisplay::slot_Font_Shout(void)
@ -290,7 +290,7 @@ void setPageDisplay::slot_Font_Shout(void)
int value = TDEFontDialog::getFont( Resource->FONT_Shout ); int value = TDEFontDialog::getFont( Resource->FONT_Shout );
if( value != TDEFontDialog::Accepted ) return; if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Font_Whisper(void) void setPageDisplay::slot_Font_Whisper(void)
@ -298,7 +298,7 @@ void setPageDisplay::slot_Font_Whisper(void)
int value = TDEFontDialog::getFont( Resource->FONT_Whisper ); int value = TDEFontDialog::getFont( Resource->FONT_Whisper );
if( value != TDEFontDialog::Accepted ) return; if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Font_Notification(void) void setPageDisplay::slot_Font_Notification(void)
@ -306,7 +306,7 @@ void setPageDisplay::slot_Font_Notification(void)
int value = TDEFontDialog::getFont( Resource->FONT_Notification ); int value = TDEFontDialog::getFont( Resource->FONT_Notification );
if( value != TDEFontDialog::Accepted ) return; if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -319,7 +319,7 @@ void setPageDisplay::slot_Color_Background(void)
int value = KColorDialog::getColor( Resource->COLOR_Background ); int value = KColorDialog::getColor( Resource->COLOR_Background );
if( value != KColorDialog::Accepted ) return; if( value != KColorDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Color_Standard(void) void setPageDisplay::slot_Color_Standard(void)
@ -327,7 +327,7 @@ void setPageDisplay::slot_Color_Standard(void)
int value = KColorDialog::getColor( Resource->COLOR_Standard ); int value = KColorDialog::getColor( Resource->COLOR_Standard );
if( value != KColorDialog::Accepted ) return; if( value != KColorDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Color_PrivateTell(void) void setPageDisplay::slot_Color_PrivateTell(void)
@ -335,7 +335,7 @@ void setPageDisplay::slot_Color_PrivateTell(void)
int value = KColorDialog::getColor( Resource->COLOR_PrivateTell ); int value = KColorDialog::getColor( Resource->COLOR_PrivateTell );
if( value != KColorDialog::Accepted ) return; if( value != KColorDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Color_ChannelTell(void) void setPageDisplay::slot_Color_ChannelTell(void)
@ -343,7 +343,7 @@ void setPageDisplay::slot_Color_ChannelTell(void)
int value = KColorDialog::getColor( Resource->COLOR_ChannelTell ); int value = KColorDialog::getColor( Resource->COLOR_ChannelTell );
if( value != KColorDialog::Accepted ) return; if( value != KColorDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Color_Shout(void) void setPageDisplay::slot_Color_Shout(void)
@ -351,7 +351,7 @@ void setPageDisplay::slot_Color_Shout(void)
int value = KColorDialog::getColor( Resource->COLOR_Shout ); int value = KColorDialog::getColor( Resource->COLOR_Shout );
if( value != KColorDialog::Accepted ) return; if( value != KColorDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Color_Whisper(void) void setPageDisplay::slot_Color_Whisper(void)
@ -359,7 +359,7 @@ void setPageDisplay::slot_Color_Whisper(void)
int value = KColorDialog::getColor( Resource->COLOR_Whisper ); int value = KColorDialog::getColor( Resource->COLOR_Whisper );
if( value != KColorDialog::Accepted ) return; if( value != KColorDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
void setPageDisplay::slot_Color_Notification(void) void setPageDisplay::slot_Color_Notification(void)
@ -367,7 +367,7 @@ void setPageDisplay::slot_Color_Notification(void)
int value = KColorDialog::getColor( Resource->COLOR_Notification ); int value = KColorDialog::getColor( Resource->COLOR_Notification );
if( value != KColorDialog::Accepted ) return; if( value != KColorDialog::Accepted ) return;
resetSampleConsole(); resetSampleConsole();
rebuildConsole = TRUE; rebuildConsole = true;
emit enableApply(); emit enableApply();
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -378,7 +378,7 @@ void setPageDisplay::slot_Color_Notification(void)
void setPageDisplay::slotCurrent_Boards( int Index ) void setPageDisplay::slotCurrent_Boards( int Index )
{ {
NewBoards = Index; NewBoards = Index;
changeTheme = TRUE; changeTheme = true;
emit enableApply(); emit enableApply();
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -389,7 +389,7 @@ void setPageDisplay::slotCurrent_Boards( int Index )
void setPageDisplay::slotCurrent_Chessmen( int Index ) void setPageDisplay::slotCurrent_Chessmen( int Index )
{ {
NewChessmen = Index; NewChessmen = Index;
changeTheme = TRUE; changeTheme = true;
emit enableApply(); emit enableApply();
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -400,7 +400,7 @@ void setPageDisplay::slotCurrent_Chessmen( int Index )
void setPageDisplay::slotCurrent_Theme_Size( int Index ) void setPageDisplay::slotCurrent_Theme_Size( int Index )
{ {
Resource->ThemeSize = 32 + ( Index * 8 ); Resource->ThemeSize = 32 + ( Index * 8 );
changeTheme = TRUE; changeTheme = true;
emit enableApply(); emit enableApply();
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -411,7 +411,7 @@ void setPageDisplay::slotCurrent_Theme_Size( int Index )
void setPageDisplay::slotToggle_Board_Orientation( bool state ) void setPageDisplay::slotToggle_Board_Orientation( bool state )
{ {
Resource->OPTION_Board_Orientation = state; Resource->OPTION_Board_Orientation = state;
refreshBoard = TRUE; refreshBoard = true;
emit enableApply(); emit enableApply();
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -462,7 +462,7 @@ void setPageDisplay::slotToggle_Animate_Move( bool state )
void setPageDisplay::slotToggle_Show_Coord( bool state ) void setPageDisplay::slotToggle_Show_Coord( bool state )
{ {
Resource->OPTION_Show_Coord = state; Resource->OPTION_Show_Coord = state;
refreshBoard = TRUE; refreshBoard = true;
emit enableApply(); emit enableApply();
} }
/////////////////////////////////////// ///////////////////////////////////////

@ -36,8 +36,8 @@ setPageEngines::setPageEngines(TQWidget *parent, resource *Rsrc ) : TQVBoxLayou
White_Use_Book = new TQCheckBox( 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 = new KComboBox ( GROUP_White_Current );
Engines_White_Book = new KComboBox ( GROUP_White_Current ); Engines_White_Book = new KComboBox ( GROUP_White_Current );
Engines_White->setEditable( FALSE ); Engines_White->setEditable( false );
Engines_White_Book->setEditable( FALSE ); Engines_White_Book->setEditable( false );
/* Engines to play Black */ /* Engines to play Black */
GROUP_Black_Current = new TQGroupBox( 3, GROUP_Black_Current = new TQGroupBox( 3,
@ -48,8 +48,8 @@ setPageEngines::setPageEngines(TQWidget *parent, resource *Rsrc ) : TQVBoxLayou
Black_Use_Book = new TQCheckBox( 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 = new KComboBox ( GROUP_Black_Current );
Engines_Black_Book = new KComboBox ( GROUP_Black_Current ); Engines_Black_Book = new KComboBox ( GROUP_Black_Current );
Engines_Black->setEditable( FALSE ); Engines_Black->setEditable( false );
Engines_Black_Book->setEditable( FALSE ); Engines_Black_Book->setEditable( false );
/* Chess Engines ListView */ /* Chess Engines ListView */
GROUP_Engines = new TQGroupBox( 2, GROUP_Engines = new TQGroupBox( 2,
@ -64,9 +64,9 @@ setPageEngines::setPageEngines(TQWidget *parent, resource *Rsrc ) : TQVBoxLayou
Engines_ListView->addColumn( i18n( "Wins" ) ); Engines_ListView->addColumn( i18n( "Wins" ) );
Engines_ListView->addColumn( i18n( "Losses" ) ); Engines_ListView->addColumn( i18n( "Losses" ) );
Engines_ListView->addColumn( i18n( "Draws" ) ); Engines_ListView->addColumn( i18n( "Draws" ) );
Engines_ListView->setAllColumnsShowFocus( TRUE ); Engines_ListView->setAllColumnsShowFocus( true );
Engines_ListView->setMultiSelection( FALSE ); Engines_ListView->setMultiSelection( false );
Engines_ListView->setShowSortIndicator( TRUE ); Engines_ListView->setShowSortIndicator( true );
Engines_ListView->restoreLayout( kapp->config(), "Engines_ListView" ); Engines_ListView->restoreLayout( kapp->config(), "Engines_ListView" );
Engines_ButtonBox = new KButtonBox( GROUP_Engines,TQt::Vertical ); Engines_ButtonBox = new KButtonBox( GROUP_Engines,TQt::Vertical );
@ -104,10 +104,10 @@ setPageEngines::~setPageEngines()
/////////////////////////////////////// ///////////////////////////////////////
void setPageEngines::BuildEngineData( void ) void setPageEngines::BuildEngineData( void )
{ {
bool WHITE_FLAG(FALSE), bool WHITE_FLAG(false),
WHITE_BK_FLAG(FALSE), WHITE_BK_FLAG(false),
BLACK_FLAG(FALSE), BLACK_FLAG(false),
BLACK_BK_FLAG(FALSE); BLACK_BK_FLAG(false);
TQStringList EngineList; TQStringList EngineList;
TQString proto; TQString proto;
int Index(0); int Index(0);
@ -164,28 +164,28 @@ void setPageEngines::BuildEngineData( void )
if( Engines_White_Book->text(Index) == (*enginesIT).Name ) if( Engines_White_Book->text(Index) == (*enginesIT).Name )
{ {
Engines_White_Book->setCurrentItem(Index); Engines_White_Book->setCurrentItem(Index);
WHITE_BK_FLAG = TRUE; WHITE_BK_FLAG = true;
} }
if( (*enginesIT).CurrentRef & ENGINE_BLACK_BK ) if( (*enginesIT).CurrentRef & ENGINE_BLACK_BK )
for( Index = 0; Index < Engines_Black_Book->count(); Index++ ) for( Index = 0; Index < Engines_Black_Book->count(); Index++ )
if( Engines_Black_Book->text(Index) == (*enginesIT).Name ) if( Engines_Black_Book->text(Index) == (*enginesIT).Name )
{ {
Engines_Black_Book->setCurrentItem(Index); Engines_Black_Book->setCurrentItem(Index);
BLACK_BK_FLAG = TRUE; BLACK_BK_FLAG = true;
} }
if( (*enginesIT).CurrentRef & ENGINE_WHITE ) if( (*enginesIT).CurrentRef & ENGINE_WHITE )
for( Index = 0; Index < Engines_White->count(); Index++ ) for( Index = 0; Index < Engines_White->count(); Index++ )
if( Engines_White->text(Index) == (*enginesIT).Name ) if( Engines_White->text(Index) == (*enginesIT).Name )
{ {
Engines_White->setCurrentItem(Index); Engines_White->setCurrentItem(Index);
WHITE_FLAG = TRUE; WHITE_FLAG = true;
} }
if( (*enginesIT).CurrentRef & ENGINE_BLACK ) if( (*enginesIT).CurrentRef & ENGINE_BLACK )
for( Index = 0; Index < Engines_Black->count(); Index++ ) for( Index = 0; Index < Engines_Black->count(); Index++ )
if( Engines_Black->text(Index) == (*enginesIT).Name ) if( Engines_Black->text(Index) == (*enginesIT).Name )
{ {
Engines_Black->setCurrentItem(Index); Engines_Black->setCurrentItem(Index);
BLACK_FLAG = TRUE; BLACK_FLAG = true;
} }
} }
@ -196,8 +196,8 @@ void setPageEngines::BuildEngineData( void )
if( ( !WHITE_BK_FLAG ) && ( Engines_White_Book->count() ) ) slotCurrent_White_Book( Engines_White_Book->currentItem() ); if( ( !WHITE_BK_FLAG ) && ( Engines_White_Book->count() ) ) slotCurrent_White_Book( Engines_White_Book->currentItem() );
if( ( !BLACK_BK_FLAG ) && ( Engines_Black_Book->count() ) ) slotCurrent_Black_Book( Engines_Black_Book->currentItem() ); if( ( !BLACK_BK_FLAG ) && ( Engines_Black_Book->count() ) ) slotCurrent_Black_Book( Engines_Black_Book->currentItem() );
Engines_Button_Change->setEnabled( FALSE ); Engines_Button_Change->setEnabled( false );
Engines_Button_Delete->setEnabled( FALSE ); Engines_Button_Delete->setEnabled( false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -351,12 +351,12 @@ void setPageEngines::selectionChanged( void )
{ {
if( Engines_ListView->selectedItem() == 0 ) if( Engines_ListView->selectedItem() == 0 )
{ {
Engines_Button_Change->setEnabled( FALSE ); Engines_Button_Change->setEnabled( false );
Engines_Button_Delete->setEnabled( FALSE ); Engines_Button_Delete->setEnabled( false );
} }
else else
{ {
Engines_Button_Change->setEnabled( TRUE ); Engines_Button_Change->setEnabled( true );
Engines_Button_Delete->setEnabled( TRUE ); Engines_Button_Delete->setEnabled( true );
} }
} }

@ -41,7 +41,7 @@ setPageGeneral::setPageGeneral(TQWidget *parent, resource *Rsrc ) : TQVBoxLayout
BUTTON_Init_Nothing = new TQRadioButton( i18n( "Do Nothing" ), GROUP_OnInit ); 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_VsPC = new TQRadioButton( i18n( "Start a Match vs. PC" ), GROUP_OnInit );
BUTTON_Init_Connect = new TQRadioButton( i18n( "Connect to ICS" ), GROUP_OnInit ); BUTTON_Init_Connect = new TQRadioButton( i18n( "Connect to ICS" ), GROUP_OnInit );
GROUP_OnInit->setExclusive( TRUE ); GROUP_OnInit->setExclusive( true );
if( Resource->OPTION_On_Init == 0 ) GROUP_OnInit->setButton( 0 ); if( Resource->OPTION_On_Init == 0 ) GROUP_OnInit->setButton( 0 );
else if( Resource->OPTION_On_Init == MENU_VS_PC ) GROUP_OnInit->setButton( 1 ); else if( Resource->OPTION_On_Init == MENU_VS_PC ) GROUP_OnInit->setButton( 1 );
else GROUP_OnInit->setButton( 2 ); else GROUP_OnInit->setButton( 2 );
@ -52,7 +52,7 @@ setPageGeneral::setPageGeneral(TQWidget *parent, resource *Rsrc ) : TQVBoxLayout
BUTTON_AutoSave_Yes = new TQRadioButton( i18n( "Yes" ), GROUP_AutoSave ); BUTTON_AutoSave_Yes = new TQRadioButton( i18n( "Yes" ), GROUP_AutoSave );
BUTTON_AutoSave_No = new TQRadioButton( i18n( "No" ), GROUP_AutoSave ); BUTTON_AutoSave_No = new TQRadioButton( i18n( "No" ), GROUP_AutoSave );
BUTTON_AutoSave_Ask = new TQRadioButton( i18n( "Ask" ), GROUP_AutoSave ); BUTTON_AutoSave_Ask = new TQRadioButton( i18n( "Ask" ), GROUP_AutoSave );
GROUP_AutoSave->setExclusive( TRUE ); GROUP_AutoSave->setExclusive( true );
if( Resource->PromptForSaving == "Yes" ) GROUP_AutoSave->setButton( 0 ); if( Resource->PromptForSaving == "Yes" ) GROUP_AutoSave->setButton( 0 );
else if( Resource->PromptForSaving == "No" ) GROUP_AutoSave->setButton( 1 ); else if( Resource->PromptForSaving == "No" ) GROUP_AutoSave->setButton( 1 );
else GROUP_AutoSave->setButton( 2 ); else GROUP_AutoSave->setButton( 2 );

@ -25,7 +25,7 @@ setPageServers::setPageServers(TQWidget *parent, resource *Rsrc ) : TQVBoxLayou
margin = Style.defaultFrameWidth(); margin = Style.defaultFrameWidth();
Resource = Rsrc; Resource = Rsrc;
Servers_ListView = NULL; Servers_ListView = NULL;
resetServer = FALSE; resetServer = false;
TabParent = new TQTabWidget( parent, "setPageDisplay" ); TabParent = new TQTabWidget( parent, "setPageDisplay" );
initTab1(); initTab1();
@ -57,7 +57,7 @@ void setPageServers::initTab1( void )
Tab1 ); Tab1 );
Servers = new KComboBox ( GROUP_Current ); Servers = new KComboBox ( GROUP_Current );
Servers->setEditable( FALSE ); Servers->setEditable( false );
/* Chess Servers ListView */ /* Chess Servers ListView */
GROUP_Servers = new TQGroupBox( 2, GROUP_Servers = new TQGroupBox( 2,
@ -68,9 +68,9 @@ void setPageServers::initTab1( void )
Servers_ListView = new TDEListView( GROUP_Servers ); Servers_ListView = new TDEListView( GROUP_Servers );
Servers_ListView->addColumn( i18n( "Name" ) ); Servers_ListView->addColumn( i18n( "Name" ) );
Servers_ListView->addColumn( i18n( "URL" ) ); Servers_ListView->addColumn( i18n( "URL" ) );
Servers_ListView->setAllColumnsShowFocus( TRUE ); Servers_ListView->setAllColumnsShowFocus( true );
Servers_ListView->setMultiSelection( FALSE ); Servers_ListView->setMultiSelection( false );
Servers_ListView->setShowSortIndicator( TRUE ); Servers_ListView->setShowSortIndicator( true );
Servers_ListView->restoreLayout( kapp->config(), "Servers_ListView" ); Servers_ListView->restoreLayout( kapp->config(), "Servers_ListView" );
Servers_ButtonBox = new KButtonBox( GROUP_Servers,TQt::Vertical ); Servers_ButtonBox = new KButtonBox( GROUP_Servers,TQt::Vertical );
@ -106,7 +106,7 @@ void setPageServers::initTab2( void )
i18n( "Profanity Filter" ), i18n( "Profanity Filter" ),
Tab2 ); Tab2 );
COMBO_Profanity = new KComboBox ( BOX_Profanity ); COMBO_Profanity = new KComboBox ( BOX_Profanity );
COMBO_Profanity->setEditable( FALSE ); COMBO_Profanity->setEditable( false );
FilterLevels << i18n("Filter Everything") << i18n("Default") << "---" << "---" << "---" << i18n("No Filtering"); FilterLevels << i18n("Filter Everything") << i18n("Default") << "---" << "---" << "---" << i18n("No Filtering");
COMBO_Profanity->insertStringList( FilterLevels ); COMBO_Profanity->insertStringList( FilterLevels );
COMBO_Profanity->setCurrentItem( Resource->OPTION_Profanity ); COMBO_Profanity->setCurrentItem( Resource->OPTION_Profanity );
@ -158,7 +158,7 @@ void setPageServers::initTab2( void )
/////////////////////////////////////// ///////////////////////////////////////
void setPageServers::BuildServerData( void ) void setPageServers::BuildServerData( void )
{ {
bool SERVER_FLAG(FALSE); bool SERVER_FLAG(false);
TQStringList ServerList; TQStringList ServerList;
int Index(0); int Index(0);
serverList::Iterator serversIT; serverList::Iterator serversIT;
@ -186,15 +186,15 @@ void setPageServers::BuildServerData( void )
if( Servers->text(Index) == (*serversIT).Name ) if( Servers->text(Index) == (*serversIT).Name )
{ {
Servers->setCurrentItem(Index); Servers->setCurrentItem(Index);
SERVER_FLAG = TRUE; SERVER_FLAG = true;
} }
} }
/* This prevents a bug where you had to modify the current_server_combobox /* This prevents a bug where you had to modify the current_server_combobox
before you could get any servers to run. */ before you could get any servers to run. */
if( ( !SERVER_FLAG ) && ( Servers->count() ) ) slotCurrent( Servers->currentItem() ); if( ( !SERVER_FLAG ) && ( Servers->count() ) ) slotCurrent( Servers->currentItem() );
Servers_Button_Change->setEnabled( FALSE ); Servers_Button_Change->setEnabled( false );
Servers_Button_Delete->setEnabled( FALSE ); Servers_Button_Delete->setEnabled( false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -258,8 +258,8 @@ void setPageServers::slotCurrent( int Index )
Name = Servers->text(Index); Name = Servers->text(Index);
for ( serversIT = Resource->servers.begin(); serversIT != Resource->servers.end(); ++serversIT ) for ( serversIT = Resource->servers.begin(); serversIT != Resource->servers.end(); ++serversIT )
{ {
if( (*serversIT).CurrentRef ) (*serversIT).CurrentRef = FALSE; if( (*serversIT).CurrentRef ) (*serversIT).CurrentRef = false;
if( (*serversIT).Name == Name ) (*serversIT).CurrentRef = TRUE; if( (*serversIT).Name == Name ) (*serversIT).CurrentRef = true;
} }
emit enableApply(); emit enableApply();
} }
@ -272,7 +272,7 @@ void setPageServers::slot_Profanity( int Index )
{ {
Resource->OPTION_Profanity = Index; Resource->OPTION_Profanity = Index;
emit enableApply(); emit enableApply();
resetServer = TRUE; resetServer = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -293,7 +293,7 @@ void setPageServers::slot_Shout( bool state )
{ {
Resource->OPTION_Shout = state; Resource->OPTION_Shout = state;
emit enableApply(); emit enableApply();
resetServer = TRUE; resetServer = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -304,7 +304,7 @@ void setPageServers::slot_Private( bool state )
{ {
Resource->OPTION_Private = state; Resource->OPTION_Private = state;
emit enableApply(); emit enableApply();
resetServer = TRUE; resetServer = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -315,7 +315,7 @@ void setPageServers::slot_Kibitz( bool state )
{ {
Resource->OPTION_Kibitz = state; Resource->OPTION_Kibitz = state;
emit enableApply(); emit enableApply();
resetServer = TRUE; resetServer = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -326,7 +326,7 @@ void setPageServers::slot_Tell( bool state )
{ {
Resource->OPTION_Tell = state; Resource->OPTION_Tell = state;
emit enableApply(); emit enableApply();
resetServer = TRUE; resetServer = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -337,7 +337,7 @@ void setPageServers::slot_Seek( bool state )
{ {
Resource->OPTION_Seek = state; Resource->OPTION_Seek = state;
emit enableApply(); emit enableApply();
resetServer = TRUE; resetServer = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -368,12 +368,12 @@ void setPageServers::selectionChanged( void )
{ {
if( Servers_ListView->selectedItem() == 0 ) if( Servers_ListView->selectedItem() == 0 )
{ {
Servers_Button_Change->setEnabled( FALSE ); Servers_Button_Change->setEnabled( false );
Servers_Button_Delete->setEnabled( FALSE ); Servers_Button_Delete->setEnabled( false );
} }
else else
{ {
Servers_Button_Change->setEnabled( TRUE ); Servers_Button_Change->setEnabled( true );
Servers_Button_Delete->setEnabled( TRUE ); Servers_Button_Delete->setEnabled( true );
} }
} }

@ -33,7 +33,7 @@ splash::splash() :
move( ( TQApplication::desktop()->width() - Hint.width() ) / 2, move( ( TQApplication::desktop()->width() - Hint.width() ) / 2,
( TQApplication::desktop()->height() - Hint.height() ) / 2 ); ( TQApplication::desktop()->height() - Hint.height() ) / 2 );
show(); show();
repaint( FALSE ); repaint( false );
} }
splash::~splash() splash::~splash()
{ {

@ -108,7 +108,7 @@ void tab_pgnView::init( void )
wi.load( locate("data", "knights/default-portrait.jpg" ) ); wi.load( locate("data", "knights/default-portrait.jpg" ) );
} }
whiteImage = new KTempFile(); whiteImage = new KTempFile();
whiteImage->setAutoDelete( TRUE ); whiteImage->setAutoDelete( true );
wi.save( whiteImage->name(), "PNG" ); wi.save( whiteImage->name(), "PNG" );
document.replace( TQRegExp( "%whiteimage%" ), whiteImage->name() ); document.replace( TQRegExp( "%whiteimage%" ), whiteImage->name() );
@ -122,7 +122,7 @@ void tab_pgnView::init( void )
bi.load( locate("data", "knights/default-portrait.jpg" ) ); bi.load( locate("data", "knights/default-portrait.jpg" ) );
} }
blackImage = new KTempFile(); blackImage = new KTempFile();
blackImage->setAutoDelete( TRUE ); blackImage->setAutoDelete( true );
bi.save( blackImage->name(), "PNG" ); bi.save( blackImage->name(), "PNG" );
document.replace( TQRegExp( "%blackimage%" ), blackImage->name() ); document.replace( TQRegExp( "%blackimage%" ), blackImage->name() );

@ -23,20 +23,20 @@
tab_SeekList::tab_SeekList(TQWidget *parent, const char *name, resource *Rsrc ) : TDEListView(parent,name) tab_SeekList::tab_SeekList(TQWidget *parent, const char *name, resource *Rsrc ) : TDEListView(parent,name)
{ {
myResource = Rsrc; myResource = Rsrc;
seek = FALSE; seek = false;
addColumn( i18n( "Name" ) ); addColumn( i18n( "Name" ) );
addColumn( i18n( "Rating" ) ); addColumn( i18n( "Rating" ) );
addColumn( i18n( "Match Type" ) ); addColumn( i18n( "Match Type" ) );
addColumn( i18n( "Is Rated?" ) ); addColumn( i18n( "Is Rated?" ) );
addColumn( i18n( "Base Time" ) ); addColumn( i18n( "Base Time" ) );
addColumn( i18n( "Increment" ) ); addColumn( i18n( "Increment" ) );
setShowSortIndicator( TRUE ); setShowSortIndicator( true );
setAllColumnsShowFocus( TRUE ); setAllColumnsShowFocus( true );
setMultiSelection( FALSE ); setMultiSelection( false );
restoreLayout( kapp->config(), "Sought_ListView" ); restoreLayout( kapp->config(), "Sought_ListView" );
menuSeek = new TDEPopupMenu( this ); menuSeek = new TDEPopupMenu( this );
menuSeek->setCheckable( TRUE ); menuSeek->setCheckable( true );
menuSeek->insertItem( i18n("Seek Matches"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_SEEK ); menuSeek->insertItem( i18n("Seek Matches"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_SEEK );
menuSeek->insertSeparator(); menuSeek->insertSeparator();
menuSeek->insertItem( i18n("Accept This Match"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH ); menuSeek->insertItem( i18n("Accept This Match"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH );
@ -48,7 +48,7 @@ tab_SeekList::tab_SeekList(TQWidget *parent, const char *name, resource *Rsrc )
menuSeek->insertSeparator(); menuSeek->insertSeparator();
menuSeek->insertItem( i18n("Add to Friends"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_NOTIFY ); menuSeek->insertItem( i18n("Add to Friends"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_NOTIFY );
menuSeek->insertItem( i18n("Ignore This Player"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_CENSOR ); menuSeek->insertItem( i18n("Ignore This Player"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_CENSOR );
menuSeek->setItemChecked( MENU_SEEK, FALSE ); menuSeek->setItemChecked( MENU_SEEK, false );
connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint&, int ) ), connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint&, int ) ),
this, TQ_SLOT( display_menuSeek( TQListViewItem*, const TQPoint&, int ) ) ); this, TQ_SLOT( display_menuSeek( TQListViewItem*, const TQPoint&, int ) ) );
@ -75,7 +75,7 @@ void tab_SeekList::recvCMD( const Command& command )
break; break;
case CMD_Hide_Sought_List: case CMD_Hide_Sought_List:
clear(); clear();
seek = FALSE; seek = false;
break; break;
default: default:
break; break;
@ -109,7 +109,7 @@ void tab_SeekList::updateSoughtList( void )
SF_05.clear(); SF_05.clear();
SF_06.clear(); SF_06.clear();
SF_07.clear(); SF_07.clear();
seek = TRUE; seek = true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -118,7 +118,7 @@ void tab_SeekList::updateSoughtList( void )
/////////////////////////////////////// ///////////////////////////////////////
void tab_SeekList::addSoughtItem( const TQString &src ) void tab_SeekList::addSoughtItem( const TQString &src )
{ {
TQStringList fields = TQStringList::split( TQChar(' '), src, FALSE ); TQStringList fields = TQStringList::split( TQChar(' '), src, false );
SF_01 << fields[2]; // Name SF_01 << fields[2]; // Name
SF_02 << fields[1]; // Rating SF_02 << fields[1]; // Rating
SF_03 << fields[6]; // Match Type SF_03 << fields[6]; // Match Type
@ -137,14 +137,14 @@ void tab_SeekList::display_menuSeek( TQListViewItem *Item, const TQPoint &Pos, i
bool enable; bool enable;
if( Item != NULL ) if( Item != NULL )
{ {
setSelected( Item, TRUE ); setSelected( Item, true );
selectedPlayerName = Item->text(0).replace( TQRegExp("\\(.+\\)"), TQString("") ); selectedPlayerName = Item->text(0).replace( TQRegExp("\\(.+\\)"), TQString("") );
selectedMatchID = Item->text(6).toInt(); selectedMatchID = Item->text(6).toInt();
enable = TRUE; enable = true;
} }
else else
{ {
enable = FALSE; enable = false;
} }
menuSeek->setItemChecked( MENU_SEEK, seek ); menuSeek->setItemChecked( MENU_SEEK, seek );
menuSeek->setItemEnabled( MENU_FINGER, enable ); menuSeek->setItemEnabled( MENU_FINGER, enable );

@ -41,7 +41,7 @@ TabBox::~TabBox()
{ {
while( myTabs->count() ) while( myTabs->count() )
{ {
removeTab( myTabs->page(0), TRUE ); removeTab( myTabs->page(0), true );
} }
delete myAccel; delete myAccel;
} }
@ -145,7 +145,7 @@ void TabBox::destroyChild( void )
return; return;
/* Nuke it */ /* Nuke it */
removeTab( ((TQWidget*)child), TRUE ); removeTab( ((TQWidget*)child), true );
if( count() == 0 ) if( count() == 0 )
{ {
@ -181,11 +181,11 @@ bool TabBox::isChild( TQWidget *child )
for( int tmp=0; tmp < myTabs->count(); tmp++ ) for( int tmp=0; tmp < myTabs->count(); tmp++ )
{ {
if( myTabs->page(tmp) == child ) if( myTabs->page(tmp) == child )
return TRUE; return true;
if( ((TabPage*)myTabs->page(tmp))->getChild() == child ) if( ((TabPage*)myTabs->page(tmp))->getChild() == child )
return TRUE; return true;
} }
return FALSE; return false;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //

@ -37,7 +37,7 @@ class TabBox : public TQVBox
virtual ~TabBox(); virtual ~TabBox();
void keyPressEvent( TQKeyEvent* ); void keyPressEvent( TQKeyEvent* );
void addTab( TQWidget *child, const TQString &caption ); void addTab( TQWidget *child, const TQString &caption );
void removeTab( TQWidget *child, bool deleteChild=FALSE ); void removeTab( TQWidget *child, bool deleteChild=false );
bool isChild( TQWidget *child ); bool isChild( TQWidget *child );
void showTab( TQWidget *child ); void showTab( TQWidget *child );
void changeCaption( TQWidget *child, const TQString &caption ); void changeCaption( TQWidget *child, const TQString &caption );

@ -24,8 +24,8 @@ TabGrip::TabGrip(TQWidget *parent, const char *name ) : TQWidget(parent,name)
setMaximumSize( 3200, 12 ); setMaximumSize( 3200, 12 );
setMinimumSize( 32, 12 ); setMinimumSize( 32, 12 );
isDragging = FALSE; isDragging = false;
couldDrag = FALSE; couldDrag = false;
setCursor( TQt::SizeAllCursor ); setCursor( TQt::SizeAllCursor );
@ -62,7 +62,7 @@ void TabGrip::mousePressEvent( TQMouseEvent *event )
event->accept(); event->accept();
if(event->button() == TQt::LeftButton) if(event->button() == TQt::LeftButton)
{ {
couldDrag = TRUE; couldDrag = true;
offset = mapToGlobal( event->pos() ); offset = mapToGlobal( event->pos() );
offset.setX( topLevelWidget()->x() - offset.x() ); offset.setX( topLevelWidget()->x() - offset.x() );
offset.setY( topLevelWidget()->y() - offset.y() ); offset.setY( topLevelWidget()->y() - offset.y() );
@ -80,11 +80,11 @@ void TabGrip::mouseMoveEvent( TQMouseEvent *event )
a button held down, so this should only be called if we're dragging. a button held down, so this should only be called if we're dragging.
*/ */
event->accept(); event->accept();
if( couldDrag == TRUE ) if( couldDrag == true )
{ {
/* Dragging Page */ /* Dragging Page */
isDragging = TRUE; isDragging = true;
couldDrag = FALSE; couldDrag = false;
TQApplication::setOverrideCursor( TQt::SizeAllCursor ); TQApplication::setOverrideCursor( TQt::SizeAllCursor );
} }
} }
@ -98,11 +98,11 @@ void TabGrip::mouseReleaseEvent( TQMouseEvent *event )
event->accept(); event->accept();
if(event->button() == TQt::LeftButton) if(event->button() == TQt::LeftButton)
{ {
couldDrag = FALSE; couldDrag = false;
if( isDragging ) if( isDragging )
{ {
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
isDragging = FALSE; isDragging = false;
emit wasDragged( event->globalPos(), offset ); emit wasDragged( event->globalPos(), offset );
} }
} }

@ -102,7 +102,7 @@ void TabManager::removeTab( TQObject *child )
if( boxPtr != NULL ) if( boxPtr != NULL )
{ {
kdDebug() << "Removing child: " << childName << endl; kdDebug() << "Removing child: " << childName << endl;
boxPtr->removeTab( ((TQWidget*)child), TRUE ); boxPtr->removeTab( ((TQWidget*)child), true );
if( boxPtr->count() == 0 ) if( boxPtr->count() == 0 )
{ {
myList.remove( boxPtr ); myList.remove( boxPtr );
@ -134,9 +134,9 @@ bool TabManager::isTab( TQWidget *child )
{ {
if( getParentBox( child ) == NULL ) if( getParentBox( child ) == NULL )
{ {
return FALSE; return false;
} }
return TRUE; return true;
} }
/////////////////////////////////////// ///////////////////////////////////////
// //

@ -42,7 +42,7 @@ TabPage::TabPage( TQWidget *parent, TQWidget *child, resource *rsrc ) : TQVBox(p
connect( grip, TQ_SIGNAL( wasDragged(const TQPoint&, const TQPoint&) ), this, TQ_SLOT( tabDragged(const TQPoint&, const TQPoint&) ) ); connect( grip, TQ_SIGNAL( wasDragged(const TQPoint&, const TQPoint&) ), this, TQ_SLOT( tabDragged(const TQPoint&, const TQPoint&) ) );
TDEIconLoader icons( TQString( "knights" ) ); TDEIconLoader icons( TQString( "knights" ) );
TQPixmap map = icons.loadIcon( TQString("tab_remove"), TDEIcon::Small, 0, TDEIcon::DefaultState, 0, TRUE ); TQPixmap map = icons.loadIcon( TQString("tab_remove"), TDEIcon::Small, 0, TDEIcon::DefaultState, 0, true );
if( map.isNull() ) if( map.isNull() )
{ {
/* Keep for backward compatability with KDE 3.0 */ /* Keep for backward compatability with KDE 3.0 */
@ -51,12 +51,12 @@ TabPage::TabPage( TQWidget *parent, TQWidget *child, resource *rsrc ) : TQVBox(p
closeButton = new TQToolButton( actionBar, "closeButton" ); closeButton = new TQToolButton( actionBar, "closeButton" );
closeButton->setIconSet( TQIconSet( map ) ); closeButton->setIconSet( TQIconSet( map ) );
closeButton->setAutoRaise( TRUE ); closeButton->setAutoRaise( true );
closeButton->setTextLabel( i18n( "Close This Tab" ), TRUE ); closeButton->setTextLabel( i18n( "Close This Tab" ), true );
closeButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); closeButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
connect( closeButton, TQ_SIGNAL( clicked() ), this, TQ_SIGNAL( requestDestruction() ) ); connect( closeButton, TQ_SIGNAL( clicked() ), this, TQ_SIGNAL( requestDestruction() ) );
myChild->reparent( this, TQPoint( 0, 0 ), TRUE ); myChild->reparent( this, TQPoint( 0, 0 ), true );
myChild->show(); myChild->show();
show(); show();
} }
@ -78,7 +78,7 @@ void TabPage::tabDragged( const TQPoint &dest, const TQPoint &offset )
TabBox *myParent = parentTabBox(); TabBox *myParent = parentTabBox();
if( myParent != NULL ) if( myParent != NULL )
{ {
TQWidget *destWidget = TQApplication::widgetAt( dest, TRUE ); TQWidget *destWidget = TQApplication::widgetAt( dest, true );
/* Find a TabBox */ /* Find a TabBox */
while(1) while(1)
{ {

@ -73,7 +73,7 @@ TQButton* thinbuttons::create( int id )
newBut->ID = id; newBut->ID = id;
buttons.append( newBut ); buttons.append( newBut );
newButton->setToggleButton( TRUE ); newButton->setToggleButton( true );
newButton->setText( TQString("Match") ); newButton->setText( TQString("Match") );
newButton->show(); newButton->show();
@ -95,14 +95,14 @@ void thinbuttons::setButton( int id )
currentBut = buttons.at( Index ); currentBut = buttons.at( Index );
if( currentBut->ID == id ) if( currentBut->ID == id )
{ {
currentBut->button->setDown( TRUE ); currentBut->button->setDown( true );
if( currentBut->button->isToggleButton() ) if( currentBut->button->isToggleButton() )
if( currentBut->button->state() != TQButton::On ) if( currentBut->button->state() != TQButton::On )
currentBut->button->toggle(); currentBut->button->toggle();
} }
else else
{ {
currentBut->button->setDown( FALSE ); currentBut->button->setDown( false );
if( currentBut->button->isToggleButton() ) if( currentBut->button->isToggleButton() )
if( currentBut->button->state() == TQButton::On ) if( currentBut->button->state() == TQButton::On )
currentBut->button->toggle(); currentBut->button->toggle();

@ -24,7 +24,7 @@
#include <tqregexp.h> #include <tqregexp.h>
#include "wiz_setup.moc" #include "wiz_setup.moc"
wiz_setup::wiz_setup(TQWidget *parent, const char *name, resource *Rsrc ) : KWizard(parent,name,TRUE) wiz_setup::wiz_setup(TQWidget *parent, const char *name, resource *Rsrc ) : KWizard(parent,name,true)
{ {
myResource = Rsrc; myResource = Rsrc;
steps = 0; steps = 0;
@ -75,8 +75,8 @@ void wiz_setup::initPage1( void )
P1B1->addWidget( WelcomeMessage, 1, 3 ); P1B1->addWidget( WelcomeMessage, 1, 3 );
addPage( Page1, i18n("Welcome to Knights v%1!").arg(_VERSION_) ); addPage( Page1, i18n("Welcome to Knights v%1!").arg(_VERSION_) );
setNextEnabled( Page1, TRUE ); setNextEnabled( Page1, true );
setHelpEnabled( Page1, FALSE ); setHelpEnabled( Page1, false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -104,7 +104,7 @@ void wiz_setup::initPage2( void )
P2B1->addWidget( pgnButtons, 2, 3 ); P2B1->addWidget( pgnButtons, 2, 3 );
addPage( Page2, i18n("Let Knights handle your .pgn files?") ); addPage( Page2, i18n("Let Knights handle your .pgn files?") );
setHelpEnabled( Page2, FALSE ); setHelpEnabled( Page2, false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -132,7 +132,7 @@ void wiz_setup::initPage3( void )
P3B1->addWidget( engineButtons, 2, 3 ); P3B1->addWidget( engineButtons, 2, 3 );
addPage( Page3, i18n("Let Knights search for chess engines?") ); addPage( Page3, i18n("Let Knights search for chess engines?") );
setHelpEnabled( Page3, FALSE ); setHelpEnabled( Page3, false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -160,7 +160,7 @@ void wiz_setup::initPage4( void )
P4B1->addWidget( serverButtons, 2, 3 ); P4B1->addWidget( serverButtons, 2, 3 );
addPage( Page4, i18n("Let Knights configure chess servers?") ); addPage( Page4, i18n("Let Knights configure chess servers?") );
setHelpEnabled( Page4, FALSE ); setHelpEnabled( Page4, false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -182,8 +182,8 @@ void wiz_setup::initPage5( void )
P5B1->addWidget( FinishExplain, 1, 3 ); P5B1->addWidget( FinishExplain, 1, 3 );
addPage( Page5, i18n("Setup Complete") ); addPage( Page5, i18n("Setup Complete") );
setFinish( Page5, TRUE ); setFinish( Page5, true );
setHelpEnabled( Page5, FALSE ); setHelpEnabled( Page5, false );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -216,7 +216,7 @@ void wiz_setup::initPage6( void )
licenseButtons->setButton( 1 ); licenseButtons->setButton( 1 );
addPage( Page6, i18n("Please read and accept our license:") ); addPage( Page6, i18n("Please read and accept our license:") );
setHelpEnabled( Page6, FALSE ); setHelpEnabled( Page6, false );
connect( licenseButtons, TQ_SIGNAL( clicked(int) ), this, TQ_SLOT( slot_License(int) ) ); connect( licenseButtons, TQ_SIGNAL( clicked(int) ), this, TQ_SLOT( slot_License(int) ) );
} }
/////////////////////////////////////// ///////////////////////////////////////
@ -229,12 +229,12 @@ void wiz_setup::slot_Work( const TQString& pageTitle )
/* Don't let 'em past the license */ /* Don't let 'em past the license */
if( pageTitle == title( Page6 ) ) if( pageTitle == title( Page6 ) )
{ {
setNextEnabled( Page6, FALSE ); setNextEnabled( Page6, false );
} }
/* Don't proceed unless we're ready to work */ /* Don't proceed unless we're ready to work */
if( pageTitle != title( Page5 ) ) return; if( pageTitle != title( Page5 ) ) return;
setBackEnabled( Page5, FALSE ); setBackEnabled( Page5, false );
if( myResource->Config_Version < 1 ) if( myResource->Config_Version < 1 )
{ {
// if( pgnButtons->selected() == pgnYes ) // if( pgnButtons->selected() == pgnYes )
@ -245,7 +245,7 @@ void wiz_setup::slot_Work( const TQString& pageTitle )
setupServers(); setupServers();
} }
myResource->ConfigWrite(); myResource->ConfigWrite();
setFinishEnabled( Page5, TRUE ); setFinishEnabled( Page5, true );
} }
/////////////////////////////////////// ///////////////////////////////////////
// //
@ -285,9 +285,9 @@ void wiz_setup::setupServers( void )
newServer->LogFile = TQString(); newServer->LogFile = TQString();
newServer->UserName = TQString(); newServer->UserName = TQString();
newServer->Password = TQString(); newServer->Password = TQString();
newServer->StorePass = FALSE; newServer->StorePass = false;
if( !loop ) newServer->CurrentRef = TRUE; if( !loop ) newServer->CurrentRef = true;
else newServer->CurrentRef = FALSE; else newServer->CurrentRef = false;
myResource->servers.append( *newServer ); myResource->servers.append( *newServer );
delete newServer; delete newServer;
} }
@ -302,7 +302,7 @@ void wiz_setup::findEngines( void )
engineResource *newEngine; engineResource *newEngine;
TQStringList names, filenames; TQStringList names, filenames;
TDEProcess *Shell; TDEProcess *Shell;
bool foundOne( FALSE ); bool foundOne( false );
unsigned int loop; unsigned int loop;
names << "GNUChess" << "Crafty" << "Sjeng" << "KnightCap" << "BabyChess" << "Phalanx-XXII"; names << "GNUChess" << "Crafty" << "Sjeng" << "KnightCap" << "BabyChess" << "Phalanx-XXII";
@ -334,7 +334,7 @@ void wiz_setup::findEngines( void )
newEngine->CurrentRef = ENGINE_WHITE | ENGINE_BLACK | ENGINE_WHITE_BK | ENGINE_BLACK_BK; newEngine->CurrentRef = ENGINE_WHITE | ENGINE_BLACK | ENGINE_WHITE_BK | ENGINE_BLACK_BK;
myResource->engines.append( *newEngine ); myResource->engines.append( *newEngine );
delete newEngine; delete newEngine;
foundOne = TRUE; foundOne = true;
} }
Shell->kill(); Shell->kill();
delete Shell; delete Shell;
@ -349,12 +349,12 @@ void wiz_setup::slot_License( int index )
{ {
if( index == 0 ) if( index == 0 )
{ {
setNextEnabled( Page6, TRUE ); setNextEnabled( Page6, true );
myResource->Accepted_License = TRUE; myResource->Accepted_License = true;
} }
else else
{ {
setNextEnabled( Page6, FALSE ); setNextEnabled( Page6, false );
myResource->Accepted_License = FALSE; myResource->Accepted_License = false;
} }
} }

Loading…
Cancel
Save