Replace TRUE/FALSE with boolean values true/false

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/23/head
Michele Calgaro 5 months ago
parent 5025122de1
commit bc9439c0ec
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -20,19 +20,19 @@
Accel::Accel( TQWidget *parent, TQObject *target ) : TDEAccel( parent )
{
insertItem( i18n("Previous Move"), "Previous Move", Key_Up, TRUE );
insertItem( i18n("Next Move"), "Next Move", Key_Down, TRUE );
insertItem( i18n("Enter Text"), "Enter Text", Key_Return, TRUE );
insertItem( i18n("Page Up"), "Page Up", Key_PageUp, TRUE );
insertItem( i18n("Page Down"), "Page Down", Key_PageDown, 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("Last History Item"), "Last History Item", SHIFT + Key_Up, 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 Channel"), "Channel Reply", ALT + Key_C, TRUE );
insertItem( i18n("Kibitz"), "Kibitz", ALT + Key_K, TRUE );
insertItem( i18n("Whisper"), "Whisper", ALT + Key_W, TRUE );
insertItem( i18n("Previous Move"), "Previous Move", Key_Up, true );
insertItem( i18n("Next Move"), "Next Move", Key_Down, true );
insertItem( i18n("Enter Text"), "Enter Text", Key_Return, true );
insertItem( i18n("Page Up"), "Page Up", Key_PageUp, true );
insertItem( i18n("Page Down"), "Page Down", Key_PageDown, 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("Last History Item"), "Last History Item", SHIFT + Key_Up, 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 Channel"), "Channel Reply", ALT + Key_C, true );
insertItem( i18n("Kibitz"), "Kibitz", ALT + Key_K, true );
insertItem( i18n("Whisper"), "Whisper", ALT + Key_W, true );
readSettings();
if( target )

@ -43,18 +43,18 @@ audio::audio()
{
a = new audioPrivate;
a->server = Arts::Reference("global:Arts_SoundServerV2");
a->fileRef.setAutoDelete( TRUE );
a->fileRef.setAutoDelete( true );
if( a->server.isNull() )
{
a->enabled = FALSE;
a->enabled = false;
kdWarning() << "audio::audio: Can not create Arts::SoundServerV2" << endl;
}
else
{
a->enabled = TRUE;
a->enabled = true;
a->playObjectFactory = Arts::Reference("global:Arts_PlayObjectFactory");
}
a->firstTime = TRUE;
a->firstTime = true;
}
audio::~audio()
{
@ -118,7 +118,7 @@ void audio::setTheme( const TQString &newTheme )
kdWarning() << "audio::setTheme: Can not access theme.conf from " << newTheme << endl;
return;
}
themeConfig = new KSimpleConfig( configFile, TRUE );
themeConfig = new KSimpleConfig( configFile, true );
/* Read the details about this theme */
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("Say"), SND_SAY );
prepFile( a->theme + themeConfig->readEntry("Promote"), SND_PROMOTE );
a->firstTime = FALSE;
a->firstTime = false;
delete themeConfig;
TDEIO::NetAccess::removeTempFile( configFile );
@ -156,7 +156,7 @@ void audio::prepFile( const TQString &source, const int &ref )
return;
dest = new KTempFile( TQString(), source.right(4), 700 );
dest->setAutoDelete( TRUE );
dest->setAutoDelete( true );
filename = dest->name();
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;
updateX2 = updateY2 = -4000;
init = TRUE;
init = true;
premoveFrom = Null;
premoveTo = Null;
DragSprite = NULL;
lastMoveWasDrag = FALSE;
lastMoveWasDrag = false;
cache = myResource->pixCache;
int size = 8 + ( 1 * ( myResource->ThemeBorder == TRUE ) );
sprites.setAutoDelete( TRUE );
int size = 8 + ( 1 * ( myResource->ThemeBorder == true ) );
sprites.setAutoDelete( true );
/* Setup Pixmaps */
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() ) );
sprite *spritePtr = new sprite;
spritePtr->Steps = 1;
spritePtr->Restore = FALSE;
spritePtr->Restore = false;
spritePtr->POSITION_Origin = fromPtr;
spritePtr->POSITION_Destination = toPtr;
spritePtr->POSITION_TargetTaken = takenPtr;
@ -180,7 +180,7 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
/* Draw the originating position */
drawPosition( fromPtr );
if( TQString( chessMove.SAN ).contains( "o-o", FALSE ) )
if( TQString( chessMove.SAN ).contains( "o-o", false ) )
{
/* This is a castle */
ChessMove newMove;
@ -188,7 +188,7 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
newMove.fromRank = chessMove.fromRank;
newMove.toRank = chessMove.toRank;
newMove.ManTaken = Null;
if( TQString( chessMove.SAN ).contains( "o-o-o", FALSE ) )
if( TQString( chessMove.SAN ).contains( "o-o-o", false ) )
{
/* Queenside */
newMove.fromFile = 0;
@ -202,7 +202,7 @@ void board_2d::drawMove( const ChessMove &chessMove, const bool &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 )
{
int size = 8 + ( 1 * ( myResource->ThemeBorder == TRUE ) );
init = FALSE;
int size = 8 + ( 1 * ( myResource->ThemeBorder == true ) );
init = false;
/* Resize myself */
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_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;
case NOTE_MOVE: // Fall Through
case NOTE_CASTLE: // Fall Through
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;
case NOTE_ATTACK: // Fall Through
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;
default:
break;
@ -424,7 +424,7 @@ void board_2d::drawPosition( const int &pos )
if( !isSprite(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 */
cache->add( cacheName, buffer );
@ -504,7 +504,7 @@ void board_2d::mouseReleaseEvent( TQMouseEvent *event )
DragSprite = NULL;
drawPosition( tmp );
commit();
lastMoveWasDrag = TRUE;
lastMoveWasDrag = true;
}
if(event->button() == TQt::LeftButton)
@ -560,7 +560,7 @@ void board_2d::mouseMoveEvent( TQMouseEvent *event )
/* Get the piece image and store it in dragPix */
DragSprite->PIXMAP_Sprite = getChessman( DragSprite->POSITION_Origin );
DragSprite->PIXMAP_FlipFrame.resize( DragSprite->PIXMAP_Sprite.size() );
DragSprite->Restore = FALSE;
DragSprite->Restore = false;
}
else
/* Not enough dragging */
@ -696,9 +696,9 @@ void board_2d::drawSprites( void )
for( index = (signed int)sprites.count() - 1; index > -1; index-- )
{
spritePtr = sprites.at(index);
if( spritePtr->Restore == FALSE )
if( spritePtr->Restore == false )
{
spritePtr->Restore = TRUE;
spritePtr->Restore = true;
}
else
{
@ -783,10 +783,10 @@ bool board_2d::isSprite( const int &pos )
sprite *tmpSprite = sprites.at( index );
if( tmpSprite->POSITION_Origin == pos )
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
///////////////////////////////////////
//

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

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

@ -55,7 +55,7 @@ Challenge_Graph::Challenge_Graph( TQWidget* parent, const char* name, resource *
{
max_rating = 2600;
max_time = 60;
seek = FALSE;
seek = false;
graph = new TQCanvas( 0, "Challenge_Graph" );
myStatusBar = new TQLabel( this, "Challenge_Graph_Status_Bar" );
@ -71,7 +71,7 @@ Challenge_Graph::Challenge_Graph( TQWidget* parent, const char* name, resource *
clear();
menuSeek = new TDEPopupMenu( this );
menuSeek->setCheckable( TRUE );
menuSeek->setCheckable( true );
menuSeek->insertItem( i18n("Seek Matches"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_SEEK );
menuSeek->insertSeparator();
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->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->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 */
/* Pre: TRUE
/* Pre: true
Post: Finds the nearest non-overlapping position to the original coordinates */
///////////////////////////////////////
//
@ -389,7 +389,7 @@ void Challenge_Graph::updateSoughtList( void )
SF_05.clear();
SF_06.clear();
SF_07.clear();
seek = TRUE;
seek = true;
}
///////////////////////////////////////
//
@ -398,7 +398,7 @@ void Challenge_Graph::updateSoughtList( void )
///////////////////////////////////////
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_02 << fields[1]; // Rating
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("") );
selectedMatchID = Item->id();
enable = TRUE;
enable = true;
}
else
{
enable = FALSE;
enable = false;
}
menuSeek->setItemChecked( MENU_SEEK, seek );
menuSeek->setItemEnabled( MENU_FINGER, enable );
@ -452,7 +452,7 @@ void Challenge_Graph::recvCMD( const Command& command )
break;
case CMD_Hide_Sought_List:
clear();
seek = FALSE;
seek = false;
break;
default:
break;

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

@ -94,5 +94,5 @@ void Command::clearMove( ChessMove *Move )
Move->ICS_PawnPushFile = Null;
Move->ICS_Mode = Null;
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)
{
myResource = Rsrc;
SelfMoving = FALSE;
SelfMoving = false;
TQStyle& Style = TQApplication::style();
margin = Style.defaultFrameWidth();
@ -39,7 +39,7 @@ Console::Console(TQWidget *parent,
myLineEdit = new KLineEdit( this, "console_edit" );
/* Configure misc */
setBG();
myTextView->setStaticBackground( FALSE );
myTextView->setStaticBackground( false );
connect( myLineEdit, TQ_SIGNAL( returnPressed( const TQString& ) ), this, TQ_SLOT( getText( const TQString& ) ) );
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( menuItemSelected(int,int) ), this, TQ_SLOT( thinButtonMenu(int,int) ) );
myCoreClock.start( 100, FALSE );
myCoreClock.start( 100, false );
resize();
}
@ -205,22 +205,22 @@ void core::setMatch( int ID )
*/
if( currentMatch != NULL )
{
currentMatch->setCurrent( FALSE );
currentMatch->setCurrent( false );
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( 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
*/
currentMatch = myMatchMap.find( ID );
currentMatch->setVisibility( TRUE );
currentMatch->setVisibility( true );
myButtonGroup->setButton( ID );
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( setNotation() ), this, TQ_SLOT( slot_setNotation() ) );
currentMatch->setCurrent( TRUE );
currentMatch->setCurrent( true );
emit requestResize();
emit initMatch();
currentMatch->resendStatusBar();
@ -239,9 +239,9 @@ bool core::clearAll( void )
{
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
{
return FALSE;
return false;
}
}
departingMatch = myMatchMap.find(id);
@ -270,15 +270,15 @@ bool core::clearMatch( int id )
if( departingMatch == NULL )
{
kdError() << "core::clearMatch: Bad matchID " << id << " could not be cleared." << endl;
return FALSE;
return false;
}
/* Save if needed */
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;
resize();
return TRUE;
return true;
}
///////////////////////////////////////
//
@ -331,7 +331,7 @@ bool core::clearMatch( int id )
///////////////////////////////////////
void core::resize( void )
{
int size = 8 + ( 1 * ( myResource->ThemeBorder == TRUE ) );
int size = 8 + ( 1 * ( myResource->ThemeBorder == true ) );
if( currentMatch != NULL )
{
@ -429,7 +429,7 @@ void core::command2Match( const Command &command )
///////////////////////////////////////
bool core::flag( const bool Army )
{
if( currentMatch == NULL ) return FALSE;
if( currentMatch == NULL ) return false;
return currentMatch->flag( Army );
return false;
}
@ -451,7 +451,7 @@ TQString core::clock( const bool Army )
///////////////////////////////////////
bool core::modified( void )
{
if( currentMatch == NULL ) return FALSE;
if( currentMatch == NULL ) return false;
return currentMatch->modified();
return false;
}
@ -462,7 +462,7 @@ bool core::modified( void )
///////////////////////////////////////
bool core::paused( void )
{
if( currentMatch == NULL ) return FALSE;
if( currentMatch == NULL ) return false;
return currentMatch->paused();
return false;
}
@ -478,10 +478,10 @@ bool core::isOnline( void )
{
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" );
TQString URL;
URL = KFileDialog::getOpenFileName( TQString(), TQString( fileFilter ), this, i18n( "Load PGN..." ) );
if( URL.isEmpty() ) return FALSE;
if( URL.isEmpty() ) return false;
return load( URL );
}
bool core::load( const TQString &IncURL )
@ -624,7 +624,7 @@ bool core::load( const TQString &IncURL )
myResource->tabManager->addTab( listPGN, IncURL.section( '/', -1 ) );
connect( listPGN, TQ_SIGNAL( selected( const TQString&, const int& ) ), this, TQ_SLOT( load( const TQString&, const int& ) ) );
listPGN->setURL( IncURL );
return TRUE;
return true;
}
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 );
}
if( match2bSaved == NULL ) return FALSE;
if( match2bSaved == NULL ) return false;
if( Prompt )
{
/* Prompt for the save */
@ -666,11 +666,11 @@ bool core::save( const int ID, const bool Prompt, const bool SaveAs )
myResource->ConfigRead();
if( answer == KMessageBox::Cancel )
{
return FALSE;
return false;
}
if( answer == KMessageBox::No )
{
return TRUE;
return true;
}
}
/* 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..." ) );
if( URL.isNull() )
{
return FALSE;
return false;
}
if( URL.findRev( ".pgn", -1, FALSE ) == -1 )
if( URL.findRev( ".pgn", -1, false ) == -1 )
{
URL += ".pgn";
}
}
if( match2bSaved->save( URL ) == FALSE )
if( match2bSaved->save( URL ) == false )
{
emit setStatusBar( SAVE_ERROR );
return FALSE;
return false;
}
emit setStatusBar( SAVE_OK );
match2bSaved->setModified( FALSE );
return TRUE;
match2bSaved->setModified( false );
return true;
}
///////////////////////////////////////
//
@ -830,10 +830,10 @@ void core::thinButtonMenu( int id, int item )
switch( item )
{
case MENU_SAVE:
save( id, FALSE, FALSE );
save( id, false, false );
break;
case MENU_SAVEAS:
save( id, FALSE, TRUE );
save( id, false, true );
break;
case MENU_PRINT:
print( id );

@ -54,7 +54,7 @@ class core : public TQWidget
char onMove( void );
char whiteInput( 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 goOffline(void);

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

@ -21,11 +21,11 @@
dlg_challenge::dlg_challenge(TQWidget *parent, const char *name, resource *Rsrc ) :
KDialogBase( parent,
name,
FALSE,
false,
i18n("You've Been Challenged:"),
User1|User2,
Ok,
TRUE,
true,
i18n("Accept"),
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 );
LABEL_Headline->setAlignment( TQt::AlignCenter );
COMBO_Rated->setEditable( FALSE );
COMBO_Rated->setEditable( false );
COMBO_Rated->insertItem( i18n("Unrated"), 0 );
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_BlackInc->setText( i18n( "Increment" ) );
showButton( User1, TRUE );
showButton( User2, TRUE );
enableButton( User1, TRUE );
enableButton( User2, TRUE );
showButton( User1, true );
showButton( User2, true );
enableButton( User1, true );
enableButton( User2, true );
show();
}
@ -92,7 +92,7 @@ void dlg_challenge::setValues( const TQString &string, const TQString &local )
myString.replace( TQRegExp("\\(\\s"), "(" );
myString.replace( TQRegExp("\\s\\)"), ")" );
list = TQStringList::split( TQChar(' '), myString, FALSE );
list = TQStringList::split( TQChar(' '), myString, false );
list[7].replace(TQRegExp("\\."), "");
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_White->setTitle( i18n("Time Controls") );
BOX_Black->setTitle( i18n("Time Controls") );
// BOX_Black->setEnabled( FALSE );
// BUTTON_TimeOdds->setChecked( FALSE );
// BOX_Black->setEnabled( false );
// BUTTON_TimeOdds->setChecked( false );
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) ) );

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

@ -18,7 +18,7 @@
#include "dlg_login.moc"
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 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 );
COMBO_Select_Server = new KComboBox ( GROUP_Select_Server );
COMBO_Select_Server->setEditable( FALSE );
COMBO_Select_Server->setEditable( false );
/* fill the combobox with servers */
for(i = myResource->servers.begin(); i != myResource->servers.end(); i++)
{
COMBO_Select_Server->insertItem((*i).Name);
if((*i).CurrentRef == TRUE)
if((*i).CurrentRef == true)
{
COMBO_Select_Server->setCurrentItem(counter);
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)));
/* Init the buttons */
showButtonCancel( TRUE );
showButtonOK( TRUE );
showButton( Help, TRUE );
showButtonCancel( true );
showButtonOK( true );
showButton( Help, true );
enableButtonCancel( TRUE );
enableButtonOK( TRUE );
enableButton( Help, TRUE );
enableButtonCancel( true );
enableButtonOK( true );
enableButton( Help, true );
setButtonOKText( i18n("Login"), i18n("Log in to the chess server using this name and password.") );
setButtonCancelText( i18n("Cancel"), i18n("Abort logging into the server") );
setHelp("prefs");
@ -136,11 +136,11 @@ void dlg_login::slotUpdateUser(const TQString &name)
{
if((*i).CurrentRef)
{
(*i).CurrentRef = FALSE;
(*i).CurrentRef = false;
}
if((*i).Name == name )
{
(*i).CurrentRef = TRUE;
(*i).CurrentRef = true;
EDIT_Login->setText((*i).UserName);
EDIT_Password->setText((*i).Password);
server = &(*i);

@ -35,7 +35,7 @@
#define _TYPE_EMAIL_ 2
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;
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 );
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_PC = new TQRadioButton( i18n("Computer"), 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)));
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_PC = new TQRadioButton( i18n("Computer"), 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 */
if( !myResource->engines.count() )
{
RADIO_White_PC->setEnabled( FALSE );
RADIO_Black_PC->setEnabled( FALSE );
RADIO_White_PC->setEnabled( false );
RADIO_Black_PC->setEnabled( false );
}
if( 1 )
{
RADIO_White_Email->setEnabled( FALSE );
RADIO_Black_Email->setEnabled( FALSE );
RADIO_White_Email->setEnabled( false );
RADIO_Black_Email->setEnabled( false );
}
/* Time for White */

@ -21,7 +21,7 @@
#include <tqimage.h>
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;
Queen = new TQPushButton( this );
@ -65,29 +65,29 @@ void dlg_promote::Init( bool Army )
/* Queen */
buffer = cache->SquareLight;
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);
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);
Queen->setPixmap( buffer );
Queen->show();
/* Bishop */
buffer = cache->SquareDark;
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);
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);
Bishop->setPixmap( buffer );
Bishop->show();
/* Knight */
buffer = cache->SquareDark;
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);
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);
Knight->setPixmap( buffer );
Knight->show();
/* Rook */
buffer = cache->SquareLight;
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);
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);
Rook->setPixmap( buffer );
Rook->show();

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

@ -26,11 +26,11 @@
dlg_selectengine::dlg_selectengine(TQWidget *parent, resource *Rsrc, bool army ) :
KDialogBase( parent,
0,
TRUE,
true,
i18n("Select Computer Player"),
Help|Ok,
Ok,
TRUE )
true )
{
Resource = Rsrc;
Army = army;
@ -41,14 +41,14 @@ dlg_selectengine::dlg_selectengine(TQWidget *parent, resource *Rsrc, bool army )
i18n( "Computer Players" ),
BOX_Parent );
COMBO_Engine = new KComboBox( BOX_Engine );
COMBO_Engine->setEditable( FALSE );
COMBO_Engine->setEditable( false );
// BOX_EngineHelper = new TQGroupBox( 1,
// TQt::Horizontal,
// i18n( "Computer Players' Helper" ),
// BOX_Parent );
// COMBO_EngineHelper = new KComboBox( BOX_Engine );
// COMBO_EngineHelper->setEditable( FALSE );
// COMBO_EngineHelper->setEditable( false );
buildEngineData();
@ -81,8 +81,8 @@ dlg_selectengine::~dlg_selectengine()
///////////////////////////////////////
void dlg_selectengine::buildEngineData( void )
{
bool FLAG1(FALSE);
// bool FLAG2(FALSE);
bool FLAG1(false);
// bool FLAG2(false);
int Index(0);
TQStringList EngineList;
engineList::Iterator enginesIT;
@ -126,14 +126,14 @@ void dlg_selectengine::buildEngineData( void )
if( COMBO_Engine->text(Index) == (*enginesIT).Name )
{
COMBO_Engine->setCurrentItem(Index);
FLAG1 = TRUE;
FLAG1 = true;
}
// if( (*enginesIT).CurrentRef & Engine2F )
// for( Index = 0; Index < COMBO_Engine->count(); Index++ )
// if( COMBO_EngineHelper->text(Index) == (*enginesIT).Name )
// {
// 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 ) :
KDialogBase( parent,
name,
TRUE,
true,
i18n("Configure Server"),
Help|Ok|Apply|Cancel,
Ok,
TRUE )
true )
{
Resource = Rsrc;
Name = ItemName;
@ -116,24 +116,24 @@ dlg_server::dlg_server(TQWidget *parent, const char *name, resource *Rsrc, TQStr
}
if( CHECK_StorePass->isChecked() )
{
EDIT_Password->setEnabled( TRUE );
EDIT_PasswordRetype->setEnabled( TRUE );
EDIT_Password->setEnabled( true );
EDIT_PasswordRetype->setEnabled( true );
}
else
{
EDIT_Password->setEnabled( FALSE );
EDIT_PasswordRetype->setEnabled( FALSE );
EDIT_Password->setEnabled( false );
EDIT_PasswordRetype->setEnabled( false );
}
/* Init the buttons */
showButtonCancel( TRUE );
showButtonOK( TRUE );
showButtonApply( TRUE );
showButton( Help, TRUE );
showButtonCancel( true );
showButtonOK( true );
showButtonApply( true );
showButton( Help, true );
enableButtonCancel( TRUE );
enableButtonOK( TRUE );
enableButtonApply( FALSE );
enableButton( Help, TRUE );
enableButtonCancel( true );
enableButtonOK( true );
enableButtonApply( false );
enableButton( Help, true );
setHelp( TQString( "configure-servers" ) );
/* Make Connections */
@ -180,7 +180,7 @@ void dlg_server::slotApply( void )
(*serversIT).StorePass = CHECK_StorePass->isChecked();
(*serversIT).Timeseal = EDIT_Timeseal->text();
enableButtonApply( FALSE );
enableButtonApply( false );
}
void dlg_server::slotCancel( void )
@ -198,27 +198,27 @@ void dlg_server::slotLogFileDialog( void )
TQString( "Find Log..." ) );
if( temp.isEmpty() ) return;
EDIT_LogFile->setText( temp );
enableButtonApply( TRUE );
enableButtonApply( true );
}
void dlg_server::slotEnableApply( const TQString& )
{
enableButtonApply( TRUE );
enableButtonApply( true );
}
void dlg_server::slotStorePass( bool )
{
if( CHECK_StorePass->isChecked() )
{
EDIT_Password->setEnabled( TRUE );
EDIT_PasswordRetype->setEnabled( TRUE );
EDIT_Password->setEnabled( true );
EDIT_PasswordRetype->setEnabled( true );
}
else
{
EDIT_Password->setEnabled( FALSE );
EDIT_PasswordRetype->setEnabled( FALSE );
EDIT_Password->setEnabled( false );
EDIT_PasswordRetype->setEnabled( false );
}
enableButtonApply( TRUE );
enableButtonApply( true );
}
///////////////////////////////////////
//
@ -235,6 +235,6 @@ void dlg_server::slot_Timeseal( void )
TQString( "Find Timeseal..." ) );
if( temp.isEmpty() ) return;
EDIT_Timeseal->setText( temp );
enableButtonApply( TRUE );
enableButtonApply( true );
}

@ -37,8 +37,8 @@ dlg_settings::dlg_settings(TQWidget *parent, const char *name, resource *Rsrc )
Ok,
parent,
name,
FALSE,
FALSE )
false,
false )
{
TQString buffer;
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* ) ) );
/* Init the buttons */
showButtonCancel( TRUE );
showButtonOK( TRUE );
showButtonApply( TRUE );
showButton( Help, TRUE );
showButtonCancel( true );
showButtonOK( true );
showButtonApply( true );
showButton( Help, true );
enableButtonCancel( TRUE );
enableButtonOK( TRUE );
enableButtonApply( FALSE );
enableButton( Help, TRUE );
enableButtonCancel( true );
enableButtonOK( true );
enableButtonApply( false );
enableButton( Help, true );
setHelp( TQString( "configure" ) );
show();
@ -122,32 +122,32 @@ void dlg_settings::slotApply( void )
{
if( PAGE_Display->changeTheme )
{
PAGE_Display->changeTheme = FALSE;
PAGE_Display->changeTheme = false;
emit themeChanged( PAGE_Display->NewBoards, PAGE_Display->NewChessmen );
}
if( PAGE_Display->refreshBoard )
{
PAGE_Display->refreshBoard = FALSE;
PAGE_Display->refreshBoard = false;
emit redrawBoard();
}
if( PAGE_Display->rebuildConsole )
{
Resource->buildStyle();
PAGE_Display->rebuildConsole = FALSE;
PAGE_Display->rebuildConsole = false;
emit rebuildConsole();
}
if( PAGE_Audio->changeTheme )
{
PAGE_Audio->changeTheme = FALSE;
PAGE_Audio->changeTheme = false;
Resource->setAudio( PAGE_Audio->NewSounds );
}
if( PAGE_Servers->resetServer )
{
PAGE_Servers->resetServer = FALSE;
PAGE_Servers->resetServer = false;
emit resetServer();
}
Resource->ConfigWrite();
enableButtonApply( FALSE );
enableButtonApply( false );
}
///////////////////////////////////////
//
@ -166,7 +166,7 @@ void dlg_settings::slotCancel( 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;
Log = NULL;
proto = NULL;
SafeToSend = TRUE;
CleanBuffer = TRUE;
SendSIGINT = FALSE;
Forced = TRUE;
SafeToSend = true;
CleanBuffer = true;
SendSIGINT = false;
Forced = true;
Protocol = XBoard;
FIFO_In = "";
FIFO_Out = "";
@ -135,7 +135,7 @@ void io_engine::Start( const int side )
(*engine) << (*IT).Filename;
/* ...command line arguments */
args = TQStringList::split( TQString(" "), (*IT).Arguments, FALSE );
args = TQStringList::split( TQString(" "), (*IT).Arguments, false );
for( tmp = 0; tmp < args.count(); tmp++ )
{
(*engine) << args[tmp];
@ -200,11 +200,11 @@ void io_engine::sendToChild( void )
if( SendSIGINT )
{
engine->kill( SIGINT );
SendSIGINT = FALSE;
SendSIGINT = false;
}
/* Write it */
SafeToSend = FALSE;
SafeToSend = false;
if( engine->writeStdin( FIFO_Out.latin1(), FIFO_Out.length() ) )
{
/* Print the output to the log file */
@ -294,7 +294,7 @@ void io_engine::recvProtoCMD( const Command &command )
break;
/* Command: Send_SIGINT */
case CMD_Send_SIGINT:
SendSIGINT = TRUE;
SendSIGINT = true;
break;
/* Command to Core */
default:
@ -305,7 +305,7 @@ void io_engine::recvProtoCMD( const Command &command )
void io_engine::SendClear( TDEProcess* )
{
SafeToSend = TRUE;
SafeToSend = true;
if( !FIFO_Out.isEmpty() )
sendToChild();
}

@ -406,7 +406,7 @@ void io_internet::readCommand(TDESocket* socket)
}
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")))
{
lineBuffer = (*(--lines.end()));
@ -460,7 +460,7 @@ void io_internet::parseLoginData( TQString data )
{
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++)
{
writeToConsole((*i), "K_STD");
@ -497,7 +497,7 @@ void io_internet::parseLoginData( TQString data )
loginStage = LOGIN_STAGE_LOGGED_IN;
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++)
{
writeToConsole((*i), "K_STD");
@ -505,7 +505,7 @@ void io_internet::parseLoginData( TQString data )
}
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++)
{
writeToConsole((*i), "K_STD");
@ -629,7 +629,7 @@ void io_internet::parseLine( TQString line )
{
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;
}
@ -649,19 +649,19 @@ void io_internet::parseLine( TQString line )
}
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 on time} ", TRUE) ||
line.contains(" forfeits on time ", TRUE) ||
line.contains(" resigns} ", TRUE) ||
line.contains(" resigns ", TRUE) ||
line.contains(" Game drawn by mutual agreement ", TRUE) ||
line.contains(" Game drawn by mutual agreement} ", TRUE) ||
line.contains(", has lost contact or quit.", TRUE) ||
line.contains(" checkmated ", TRUE) ||
line.contains(" checkmated} ", TRUE) ||
line.contains("lost connection", TRUE) ||
line.contains("has no material to mate", TRUE)
line.contains(" forfeits by disconnection", true) ||
line.contains(" forfeits by disconnection}", true) ||
line.contains(" forfeits on time} ", true) ||
line.contains(" forfeits on time ", true) ||
line.contains(" resigns} ", true) ||
line.contains(" resigns ", true) ||
line.contains(" Game drawn by mutual agreement ", true) ||
line.contains(" Game drawn by mutual agreement} ", true) ||
line.contains(", has lost contact or quit.", true) ||
line.contains(" checkmated ", true) ||
line.contains(" checkmated} ", true) ||
line.contains("lost connection", true) ||
line.contains("has no material to mate", true)
)
)
{
@ -753,7 +753,7 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)
{
/* a new game that we are playing, or observing */
param = new match_param(this->myResource);
fields = TQStringList::split( TQChar(' '), line, FALSE );
fields = TQStringList::split( TQChar(' '), line, false );
/* set white time control */
TCPList tmpListWhite(param->time(WHITE));
@ -808,7 +808,7 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)
}
case PARSE12_MODE_MOVE:
{
fields = TQStringList::split( TQChar(' '), line, FALSE );
fields = TQStringList::split( TQChar(' '), line, false );
/* various ICS stuff for ChessMove */
move.ICS_ClockTicking = fields[31].toInt();
@ -891,31 +891,31 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)
/* SysAdmin */
// if( Handle.contains( TQRegExp("\\(\\*\\)") ) )
// {
// player.SysAdmin = TRUE;
// player.SysAdmin = true;
// Handle.replace( TQRegExp("\\(\\*\\)"), TQString("") );
// }
// else player.SysAdmin = FALSE;
// else player.SysAdmin = false;
/* ServiceRep */
// if( Handle.contains( TQRegExp("\\(SR\\)") ) )
// {
// player.ServiceRep = TRUE;
// player.ServiceRep = true;
// Handle.replace( TQRegExp("\\(SR\\)"), TQString("") );
// }
// else player.ServiceRep = FALSE;
// else player.ServiceRep = false;
/* Computer */
// if( Handle.contains( TQRegExp("\\(C\\)") ) )
// {
// player.Computer = TRUE;
// player.Computer = true;
// Handle.replace( TQRegExp("\\(C\\)"), TQString("") );
// }
// else player.Computer = FALSE;
// else player.Computer = false;
/* Unregistered */
// if( Handle.contains( TQRegExp("\\(U\\)") ) )
// {
// player.Unregistered = TRUE;
// player.Unregistered = true;
// Handle.replace( TQRegExp("\\(U\\)"), TQString("") );
// }
// else player.Unregistered = FALSE;
// else player.Unregistered = false;
// return;
//}
///////////////////////////////////////
@ -1018,7 +1018,7 @@ void io_internet::parseMoveList(TQString line)
int move_counter = 0;
/* white */
two_plys = TQStringList::split(TQRegExp("\\s+"), line, FALSE);
two_plys = TQStringList::split(TQRegExp("\\s+"), line, false);
Command::clearMove(&move);
move_counter = two_plys[0].left(two_plys[0].length() - 1).length(); /* remove the . */
move.ICS_MoveCounter = move_counter;
@ -1055,7 +1055,7 @@ void io_internet::sendEndOfGameCommand(TQString line)
TQStringList fields;
Command command;
fields = TQStringList::split( TQChar(' '), line, FALSE );
fields = TQStringList::split( TQChar(' '), line, false );
if(fields[1].endsWith(":"))
{
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)
{
InitAll = TRUE;
ResizeFlag = TRUE;
Minimized = FALSE;
InitAll = true;
ResizeFlag = true;
Minimized = false;
args = Args;
SplashScreen = NULL;
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]*" );
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 myAccel;
delete Resource;
InitAll = TRUE;
InitAll = true;
}
///////////////////////////////////////
//
@ -169,7 +169,7 @@ bool Knights::init( void )
BirthAll();
SelectTheme(-1,-1);
Resource->setAudio();
ResizeFlag = FALSE;
ResizeFlag = false;
/*
Connect Accelerators
@ -201,7 +201,7 @@ bool Knights::init( void )
/* Configure self */
setCentralWidget( MainFrame );
InitAll = FALSE;
InitAll = false;
resizeMainFrame();
show();
setStatusBar( READY );
@ -220,7 +220,7 @@ bool Knights::init( void )
delete Wizard;
resizeMainFrame();
/* if( !Resource->Accepted_License )
return FALSE;*/
return false;*/
Resource->Config_Version = CONFIG_VERSION;
}
@ -250,7 +250,7 @@ bool Knights::init( void )
break;
}
}
return TRUE;
return true;
}
///////////////////////////////////////
//
@ -262,45 +262,45 @@ void Knights::initMenus( void )
/*
matchMenu menu
*/
matchMenu->setCheckable(TRUE);
matchMenu->setCheckable(true);
// MENU_DRAW
matchMenu->insertItem( i18n( "&Draw" ), drawMenu, MENU_DRAW );
matchMenu->setItemEnabled( MENU_DRAW, FALSE );
matchMenu->setItemEnabled( MENU_DRAW, false );
// MENU_RETRACT
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("edit-undo"), TDEIcon::Small ) ),
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." ) );
// 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." ) );
// 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." ) );
// 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." ) );
// 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." ) );
// 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." ) );
// MENU_PONDER
matchMenu->insertItem( i18n( "&Ponder" ), this, TQ_SLOT(Settings(int)), 0, MENU_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->insertSeparator();
// MENU_PAUSE
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("media-playback-pause"), TDEIcon::Small ) ),
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." ) );
/*
drawMenu menu
@ -332,12 +332,12 @@ void Knights::initMenus( void )
// MENU_SAVE
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("document-save"), TDEIcon::Small ) ),
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." ) );
// MENU_SAVEAS
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("document-save"), TDEIcon::Small ) ),
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->insertSeparator();
// MENU_CONNECT
@ -348,17 +348,17 @@ void Knights::initMenus( void )
// MENU_PRINT
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("document-print"), TDEIcon::Small ) ),
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->insertSeparator();
// MENU_CLOSE
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("window-close"), TDEIcon::Small ) ),
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." ) );
// 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->insertSeparator();
// MENU_QUIT
@ -382,7 +382,7 @@ void Knights::initMenus( void )
/*
tutorialMenu menu
*/
tutorialMenu->setCheckable(TRUE);
tutorialMenu->setCheckable(true);
// MENU_OPEN_TUTORIAL
tutorialMenu->insertItem( i18n( "Begin a Tutorial" ), this, TQ_SLOT(Settings(int)), 0, MENU_OPEN_TUTORIAL );
// tutorialMenu->setWhatsThis( MENU_OPEN_TUTORIAL, i18n( "" ) );
@ -429,11 +429,11 @@ void Knights::resizeMainFrame(void)
/* enable or disable games in the menu */
if( Resource->servers.count() )
{
fileMenu->setItemEnabled( MENU_CONNECT, TRUE );
fileMenu->setItemEnabled( MENU_CONNECT, true );
}
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 )
{
netConnect();
return TRUE;
return true;
}
return TDEMainWindow::event( e );
}
@ -525,7 +525,7 @@ void Knights::hideEvent( TQHideEvent* )
if( !Resource->OPTION_Pause_On_Minimize )
return;
Core->matchMenu( MENU_PAUSEALL );
Minimized = TRUE;
Minimized = true;
}
///////////////////////////////////////
//
@ -537,7 +537,7 @@ void Knights::showEvent( TQShowEvent* )
if( !Minimized )
return;
Core->matchMenu( MENU_PAUSEALL );
Minimized = FALSE;
Minimized = false;
}
///////////////////////////////////////
//
@ -700,14 +700,14 @@ void Knights::setClocks( void )
blackTimeLabel->setText( Core->clock( BLACK ) );
if( Core->flag( WHITE ) )
if( Core->blackInput() == PLAYERLOCAL )
matchMenu->setItemEnabled( MENU_CALL_FLAG, TRUE );
matchMenu->setItemEnabled( MENU_CALL_FLAG, true );
else
matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE );
matchMenu->setItemEnabled( MENU_CALL_FLAG, false );
if( Core->flag( BLACK ) )
if( Core->whiteInput() == PLAYERLOCAL )
matchMenu->setItemEnabled( MENU_CALL_FLAG, TRUE );
matchMenu->setItemEnabled( MENU_CALL_FLAG, true );
else
matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE );
matchMenu->setItemEnabled( MENU_CALL_FLAG, false );
}
///////////////////////////////////////
//
@ -731,24 +731,24 @@ void Knights::setNotation( void )
if( list == NULL )
{
/* Disable Save & Print Functions */
fileMenu->setItemEnabled( MENU_SAVE, FALSE );
fileMenu->setItemEnabled( MENU_SAVEAS, FALSE );
fileMenu->setItemEnabled( MENU_PRINT, FALSE );
matchMenu->setItemEnabled( MENU_RETRACT, FALSE );
fileMenu->setItemEnabled( MENU_SAVE, false );
fileMenu->setItemEnabled( MENU_SAVEAS, false );
fileMenu->setItemEnabled( MENU_PRINT, false );
matchMenu->setItemEnabled( MENU_RETRACT, false );
return;
}
if( Core->modified() )
fileMenu->setItemEnabled( MENU_SAVE, TRUE );
fileMenu->setItemEnabled( MENU_SAVE, true );
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
if statement checks for the wrong player's turn. On purpose */
if( ( Core->inputOnMove() == PLAYERLOCAL ) && ( Core->inputOnMove(TRUE) == PLAYERPC ) && list->count() )
matchMenu->setItemEnabled( MENU_RETRACT, TRUE );
if( ( Core->inputOnMove() == PLAYERLOCAL ) && ( Core->inputOnMove(true) == PLAYERPC ) && list->count() )
matchMenu->setItemEnabled( MENU_RETRACT, true );
else
matchMenu->setItemEnabled( MENU_RETRACT, FALSE );
fileMenu->setItemEnabled( MENU_SAVEAS, TRUE );
fileMenu->setItemEnabled( MENU_PRINT, TRUE );
matchMenu->setItemEnabled( MENU_RETRACT, false );
fileMenu->setItemEnabled( MENU_SAVEAS, true );
fileMenu->setItemEnabled( MENU_PRINT, true );
/* Create the List */
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? */
if( ( Core->whiteInput() == Null ) || ( Core->blackInput() == Null ) )
{
fileMenu->setItemEnabled( MENU_CLOSE, FALSE );
fileMenu->setItemEnabled( MENU_CLOSEALL, FALSE );
matchMenu->setItemEnabled( MENU_ORIENTATION, FALSE );
fileMenu->setItemEnabled( MENU_CLOSE, false );
fileMenu->setItemEnabled( MENU_CLOSEALL, false );
matchMenu->setItemEnabled( MENU_ORIENTATION, false );
whiteTimeLabel->setText( "" );
blackTimeLabel->setText( "" );
setStatusBar( READY );
}
else
{
fileMenu->setItemEnabled( MENU_CLOSE, TRUE );
fileMenu->setItemEnabled( MENU_CLOSEALL, TRUE );
matchMenu->setItemEnabled( MENU_ORIENTATION, TRUE );
fileMenu->setItemEnabled( MENU_CLOSE, true );
fileMenu->setItemEnabled( MENU_CLOSEALL, true );
matchMenu->setItemEnabled( MENU_ORIENTATION, true );
}
/* Is there a local player? */
if( ( Core->whiteInput() == PLAYERLOCAL ) || ( Core->blackInput() == PLAYERLOCAL ) )
{
matchMenu->setItemEnabled( MENU_DRAW, TRUE );
matchMenu->setItemEnabled( MENU_RESIGN, TRUE );
matchMenu->setItemEnabled( MENU_DRAW, true );
matchMenu->setItemEnabled( MENU_RESIGN, true );
/* Is there also a PC player? */
if( ( Core->whiteInput() == PLAYERPC ) || ( Core->blackInput() == PLAYERPC ) )
{
@ -822,23 +822,23 @@ void Knights::initMatch( void )
}
else
{
matchMenu->setItemEnabled( MENU_DRAW, FALSE );
matchMenu->setItemEnabled( MENU_RESIGN, FALSE );
matchMenu->setItemEnabled( MENU_DRAW, false );
matchMenu->setItemEnabled( MENU_RESIGN, false );
}
/* Is there a PC player? */
if( ( Core->whiteInput() == PLAYERPC ) || ( Core->blackInput() == PLAYERPC ) )
{
matchMenu->setItemEnabled( MENU_MOVE_NOW, TRUE );
matchMenu->setItemEnabled( MENU_HINT, TRUE );
matchMenu->setItemEnabled( MENU_PONDER, TRUE );
matchMenu->setItemEnabled( MENU_PAUSE, TRUE );
matchMenu->setItemEnabled( MENU_MOVE_NOW, true );
matchMenu->setItemEnabled( MENU_HINT, true );
matchMenu->setItemEnabled( MENU_PONDER, true );
matchMenu->setItemEnabled( MENU_PAUSE, true );
}
else
{
matchMenu->setItemEnabled( MENU_MOVE_NOW, FALSE );
matchMenu->setItemEnabled( MENU_HINT, FALSE );
matchMenu->setItemEnabled( MENU_PONDER, FALSE );
matchMenu->setItemEnabled( MENU_PAUSE, FALSE );
matchMenu->setItemEnabled( MENU_MOVE_NOW, false );
matchMenu->setItemEnabled( MENU_HINT, false );
matchMenu->setItemEnabled( MENU_PONDER, false );
matchMenu->setItemEnabled( MENU_PAUSE, false );
}
/* Is there a TCP player? */
// if( ( Core->whiteInput() == PLAYERTCP ) || ( Core->blackInput() == PLAYERTCP ) )
@ -914,7 +914,7 @@ void Knights::newMatch( 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 )
{
/* We use 'Null' to indicate the current match */
return Core->save( Null, FALSE, FALSE );
return Core->save( Null, false, false );
}
bool Knights::SaveGamePrompt( void )
{
return Core->save( Null, TRUE, FALSE );
return Core->save( Null, true, false );
}
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 )
{
bool localFlag(FALSE);
bool installError(FALSE);
bool localFlag(false);
bool installError(false);
unsigned int loop;
TQString allerror;
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() ) ) ) )
{
/* Nope, can't copy it anywhere */
installError = TRUE;
installError = true;
allerror += "\n\n" + TQString( TQDir::homeDirPath() + "/.knights/"
+ files[loop].filename() ) + " - " + TDEIO::NetAccess::lastErrorString();
}
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 status(FALSE);
bool status(false);
for( IT = list.begin(); IT != list.end(); ++IT )
{
if( (*IT).label == label )
{
pixmap = (*IT).item;
(*IT).age = 0;
status = TRUE;
status = true;
}
else
(*IT).age++;

@ -34,7 +34,7 @@
KnightsTextView::KnightsTextView(TQWidget *parent, resource *Rsrc ) : TQTextBrowser(parent)
{
myResource = Rsrc;
setReadOnly( TRUE );
setReadOnly( true );
setTextFormat( TQt::RichText );
menuView = new TDEPopupMenu( this );
/*
@ -93,11 +93,11 @@ void KnightsTextView::display_menuView( const TQPoint &Pos )
{
if( hasSelectedText() )
{
menuView->setItemEnabled( MENU_COPY, TRUE );
menuView->setItemEnabled( MENU_COPY, true );
}
else
{
menuView->setItemEnabled( MENU_COPY, FALSE );
menuView->setItemEnabled( MENU_COPY, false );
}
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( "Date" ) );
listView->setSorting( 1 );
listView->setAllColumnsShowFocus( TRUE );
listView->setMultiSelection( FALSE );
listView->setShowSortIndicator( TRUE );
listView->setAllColumnsShowFocus( true );
listView->setMultiSelection( false );
listView->setShowSortIndicator( true );
listView->restoreLayout( tdeApp->config(), "PGN_ListView" );
listView->show();
connect( listView, TQ_SIGNAL( executed( TQListViewItem* ) ), this, TQ_SLOT( slot_selected( TQListViewItem* ) ) );
@ -78,7 +78,7 @@ void list_pgn::setURL( TQString URL )
listView->clear();
setCaption( URL );
if( tmpPGN.open( URL ) == FALSE )
if( tmpPGN.open( URL ) == false )
{
status->message( i18n( "Can not open %1" ).arg( URL ) );
return;
@ -96,9 +96,9 @@ void list_pgn::setProgress( const int num )
{
progress->setValue( num );
if( num == 100 )
progress->setEnabled( FALSE );
progress->setEnabled( false );
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 )
{
char BoardPtr = Pointer( chessman[ChessmanPtr].File, chessman[ChessmanPtr].Rank );
if( ( BoardPtr < 0 ) || ( BoardPtr > 63 ) ) return FALSE;
if( current[BoardPtr].ManPtr != ChessmanPtr ) return FALSE;
return TRUE;
if( ( BoardPtr < 0 ) || ( BoardPtr > 63 ) ) return false;
if( current[BoardPtr].ManPtr != ChessmanPtr ) return false;
return true;
}
///////////////////////////////////////
//
@ -189,16 +189,16 @@ void logic::Init_Standard( void )
///////////////////////////////////////
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] < 'a' ) || ( chessMove.CAN[0] > 'h' ) ) return FALSE;
if( ( chessMove.CAN[0] < 'a' ) || ( chessMove.CAN[0] > 'h' ) ) return false;
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;
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;
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;
if( strlen( chessMove.CAN ) == 5 ) chessMove.Promote = chessMove.CAN[4];
else chessMove.Promote = Null;
@ -223,7 +223,7 @@ bool logic::parseCAN( const bool Army )
chessMove.toRank = 7;
}
}
return TRUE;
return true;
}
///////////////////////////////////////
//
@ -333,7 +333,7 @@ bool logic::parseSAN( void )
}
/* Unknown symbol... Can not process this chessMove */
// kdDebug() << "logic::ParseSAN: Unknown Symbol: " << chessMove.SAN[SANPtr] << "\n";
return FALSE;
return false;
break;
}
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() << (int)Army << " " << (int)Type << " " << (int)chessMove.fromFile << " " << (int)chessMove.fromRank
// << " " << (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 )
{
Position backup[64];
bool SANambig(FALSE);
bool SANambig2(FALSE);
bool SANambig(false);
bool SANambig2(false);
char tmp, manPtr, toPtr, fromPtr;
TQString SAN;
@ -422,9 +422,9 @@ void logic::writeSAN( void )
HashLegal( tmp );
if( current[toPtr].Note >= NOTE_MOVE )
{
SANambig = TRUE;
SANambig = true;
if( chessman[tmp].File == chessman[manPtr].File )
SANambig2 = TRUE;
SANambig2 = true;
}
}
/*
@ -440,8 +440,8 @@ void logic::writeSAN( void )
HashLegal( tmp );
if( current[toPtr].Note >= NOTE_MOVE )
{
SANambig = TRUE;
SANambig2 = TRUE;
SANambig = true;
SANambig2 = true;
}
}
}
@ -453,7 +453,7 @@ void logic::writeSAN( void )
( current[toPtr].Note == NOTE_ENPASSANT ) ) &&
( chessman[manPtr].Type == Pawn ) )
{
SANambig = TRUE;
SANambig = true;
}
/* Write SAN Notation */
if( current[toPtr].Note == NOTE_CASTLE )
@ -486,7 +486,7 @@ void logic::writeSAN( void )
default:
break;
}
if( SANambig == TRUE )
if( SANambig == true )
{
SAN += char( chessMove.fromFile + 97 );
if( SANambig2 ) SAN += char( chessMove.fromRank + 49 );
@ -723,10 +723,10 @@ bool logic::isCheck( const bool Army )
if( isChessman( 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;
tmp = 0;
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 haveBishop(FALSE);
bool haveBishopDiag(FALSE);
bool haveKnight(FALSE);
bool EnemyBishop(FALSE);
bool EnemyBishopDiag(TRUE);
bool EnemyKnight(FALSE);
bool haveBishop(false);
bool haveBishopDiag(false);
bool haveKnight(false);
bool EnemyBishop(false);
bool EnemyBishopDiag(true);
bool EnemyKnight(false);
int tmp(0);
if( !isLegal( Army ) ) return TRUE;
if( !isLegal( Army ) ) return true;
for( tmp = 0; tmp < 64; tmp++ )
{
if( !isChessman( tmp ) ) continue;
if( chessman[tmp].Type == Queen ) return FALSE;
if( chessman[tmp].Type == Pawn ) return FALSE;
if( chessman[tmp].Type == Rook ) return FALSE;
if( chessman[tmp].Type == Queen ) return false;
if( chessman[tmp].Type == Pawn ) return false;
if( chessman[tmp].Type == Rook ) return false;
/* Enemy guys */
if( chessman[tmp].Army != Army )
{
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 ) );
EnemyBishop = TRUE;
EnemyBishop = true;
}
if( chessman[tmp].Type == Knight )
{
if( EnemyKnight == TRUE ) return FALSE;
EnemyKnight = TRUE;
if( EnemyKnight == true ) return false;
EnemyKnight = true;
}
continue;
}
/* Our guys */
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 ) );
haveBishop = TRUE;
haveBishop = true;
}
if( chessman[tmp].Type == Knight )
{
if( haveKnight == TRUE ) return FALSE;
haveKnight = TRUE;
if( haveKnight == true ) return false;
haveKnight = true;
}
}
if( haveKnight && EnemyKnight ) return FALSE;
if( haveBishop && EnemyKnight ) return FALSE;
if( haveKnight && EnemyBishop ) return FALSE;
if( haveKnight && haveBishop ) return FALSE;
if( EnemyKnight && EnemyBishop ) return FALSE;
if( ( haveBishop && EnemyBishop ) && ( haveBishopDiag != EnemyBishopDiag ) ) return FALSE;
return TRUE;
if( haveKnight && EnemyKnight ) return false;
if( haveBishop && EnemyKnight ) return false;
if( haveKnight && EnemyBishop ) return false;
if( haveKnight && haveBishop ) return false;
if( EnemyKnight && EnemyBishop ) return false;
if( ( haveBishop && EnemyBishop ) && ( haveBishopDiag != EnemyBishopDiag ) ) return false;
return true;
}
///////////////////////////////////////
//
@ -926,15 +926,15 @@ bool logic::Move( void )
fromPtr = Pointer( chessMove.fromFile, chessMove.fromRank );
toPtr = Pointer( chessMove.toFile, chessMove.toRank );
if( ( fromPtr == Null ) || ( toPtr == Null ) )
return FALSE;
return false;
manPtr = current[fromPtr].ManPtr;
if( manPtr == Null )
return FALSE;
return false;
HashLegal( manPtr );
/* Only proceed if this is a 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.
/* Take care of moving the rook in a caste */
@ -986,7 +986,7 @@ bool logic::Move( void )
if( ( ( OnMove == WHITE ) && ( Param->type(WHITE) == 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
{
/* Prompt user for promotion */
@ -1028,7 +1028,7 @@ bool logic::Move( void )
CastleFlag[ chessman[manPtr].Army ] -= CF_RookQ;
if( ( chessman[manPtr].Type == Rook ) && ( chessMove.fromFile == 7 ) )
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;
break;
}
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break;
}
/* Negitive Rank Movement */
@ -1100,7 +1100,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK;
break;
}
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break;
}
/* Positive File Movement */
@ -1118,7 +1118,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK;
break;
}
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break;
}
/* Negative File Movement */
@ -1136,7 +1136,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK;
break;
}
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break;
}
if( chessman[ManPtr].Type == Rook ) break;
@ -1157,7 +1157,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK;
break;
}
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break;
}
/* NW Movement */
@ -1175,7 +1175,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK;
break;
}
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break;
}
/* SW Movement */
@ -1193,7 +1193,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK;
break;
}
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break;
}
/* SE Movement */
@ -1211,7 +1211,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_ATTACK;
break;
}
if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
if( Recursion == true ) hash[Ptr].Note = NOTE_ATTACK;
break;
}
break;
@ -1254,7 +1254,7 @@ void logic::_HashLegal( const bool Recursion )
hash[Ptr].Note = NOTE_MOVE;
else
{
if( Recursion == TRUE )
if( Recursion == true )
hash[Ptr].Note = NOTE_ATTACK;
if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
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;
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;
}
}
@ -1288,7 +1288,7 @@ void logic::_HashLegal( const bool Recursion )
if( ( dirR == 0 ) && ( dirF == 0 ) ) dirF++;
}
/* Check for castles */
if( Recursion == FALSE )
if( Recursion == false )
{
/* Can the King castle at all? */
if( CastleFlag[ chessman[ ManPtr ].Army ] & CF_King )
@ -1329,7 +1329,7 @@ void logic::_HashLegal( const bool Recursion )
/* Get direction of movement */
if( chessman[ManPtr].Army == WHITE ) dirR = 1;
else dirR = -1;
if( Recursion == FALSE )
if( Recursion == false )
{
/* Forward 1 square */
Ptr = CalcPointer( 0, dirR );
@ -1347,7 +1347,7 @@ void logic::_HashLegal( const bool Recursion )
}
}
}
if( Recursion == TRUE )
if( Recursion == true )
{
/* Attack Left */
Ptr = CalcPointer( -1, dirR );
@ -1390,7 +1390,7 @@ void logic::_HashLegal( const bool Recursion )
/* THE MONSTER */
/* Remove all possible moves that would either put your */
/* king into check or wouldn't stop a check in progress */
if( Recursion == FALSE )
if( Recursion == false )
{
/* Make Backups */
copyPositions( hash, hashBackup );
@ -1407,7 +1407,7 @@ void logic::_HashLegal( const bool Recursion )
if( !isChessman( tmp ) ) continue;
if( ( chessman[tmp].Army != chessman[ManPtr].Army ) && ( chessman[tmp].Type != Null ) )
{
HashLegal( tmp, TRUE );
HashLegal( tmp, true );
/* Is a check in progress? */
if( hash[ currentKing ].Note == NOTE_ATTACK )
{
@ -1475,7 +1475,7 @@ void logic::_HashLegal( const bool Recursion )
if( chessman[tmp2].Army != chessman[ManPtr].Army )
if( isChessman( tmp2 ) )
{
HashLegal( tmp2, TRUE );
HashLegal( tmp2, true );
if( hash[ currentKing ].Note == NOTE_ATTACK )
{
hashBackup[tmp].Note = NOTE_NONE;

@ -54,7 +54,7 @@ class logic
bool isLegal( const bool Army );
bool isDraw( const bool Army );
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 );
bool parseCAN( const bool Army );
@ -64,7 +64,7 @@ class logic
protected:
int CalcPointer( const char File, const char Rank );
void _HashLegal( const bool Recursion=FALSE );
void _HashLegal( const bool Recursion=false );
void clearBoard( void );
int getKing( const bool Army );
void Init_Standard( void );

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

@ -214,7 +214,7 @@ void match_param::setTimer( void )
{
if( TimerFlag ) return;
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 )
{
emit valuesChanged();
TimerFlag = FALSE;
TimerFlag = false;
}
///////////////////////////////////////

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

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

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

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

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

@ -33,9 +33,9 @@ setPageDisplay::setPageDisplay(TQWidget *parent, resource *Rsrc ) : TQVBoxLayou
margin = Style.defaultFrameWidth();
NewBoards = 0;
NewChessmen = 0;
changeTheme = FALSE;
refreshBoard = FALSE;
rebuildConsole = FALSE;
changeTheme = false;
refreshBoard = false;
rebuildConsole = false;
TabParent = new TQTabWidget( parent, "setPageDisplay" );
initTab1();
@ -138,8 +138,8 @@ void setPageDisplay::initTab1( void )
this, TQ_SLOT( slotToggle_Show_Coord(bool) ) );
Current_Theme_Size->setTickmarks( TQSlider::Below );
Current_Boards->setEditable( FALSE );
Current_Chessmen->setEditable( FALSE );
Current_Boards->setEditable( false );
Current_Chessmen->setEditable( false );
buildThemeList();
connect( Current_Boards, TQ_SIGNAL( activated(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_Notification = TQColor( 0, 128, 128 ); // Cyan
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
///////////////////////////////////////
@ -266,7 +266,7 @@ void setPageDisplay::slot_Font_Standard(void)
int value = TDEFontDialog::getFont( Resource->FONT_Standard );
if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Font_PrivateTell(void)
@ -274,7 +274,7 @@ void setPageDisplay::slot_Font_PrivateTell(void)
int value = TDEFontDialog::getFont( Resource->FONT_PrivateTell );
if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Font_ChannelTell(void)
@ -282,7 +282,7 @@ void setPageDisplay::slot_Font_ChannelTell(void)
int value = TDEFontDialog::getFont( Resource->FONT_ChannelTell );
if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Font_Shout(void)
@ -290,7 +290,7 @@ void setPageDisplay::slot_Font_Shout(void)
int value = TDEFontDialog::getFont( Resource->FONT_Shout );
if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Font_Whisper(void)
@ -298,7 +298,7 @@ void setPageDisplay::slot_Font_Whisper(void)
int value = TDEFontDialog::getFont( Resource->FONT_Whisper );
if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Font_Notification(void)
@ -306,7 +306,7 @@ void setPageDisplay::slot_Font_Notification(void)
int value = TDEFontDialog::getFont( Resource->FONT_Notification );
if( value != TDEFontDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
///////////////////////////////////////
@ -319,7 +319,7 @@ void setPageDisplay::slot_Color_Background(void)
int value = KColorDialog::getColor( Resource->COLOR_Background );
if( value != KColorDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Color_Standard(void)
@ -327,7 +327,7 @@ void setPageDisplay::slot_Color_Standard(void)
int value = KColorDialog::getColor( Resource->COLOR_Standard );
if( value != KColorDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Color_PrivateTell(void)
@ -335,7 +335,7 @@ void setPageDisplay::slot_Color_PrivateTell(void)
int value = KColorDialog::getColor( Resource->COLOR_PrivateTell );
if( value != KColorDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Color_ChannelTell(void)
@ -343,7 +343,7 @@ void setPageDisplay::slot_Color_ChannelTell(void)
int value = KColorDialog::getColor( Resource->COLOR_ChannelTell );
if( value != KColorDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Color_Shout(void)
@ -351,7 +351,7 @@ void setPageDisplay::slot_Color_Shout(void)
int value = KColorDialog::getColor( Resource->COLOR_Shout );
if( value != KColorDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Color_Whisper(void)
@ -359,7 +359,7 @@ void setPageDisplay::slot_Color_Whisper(void)
int value = KColorDialog::getColor( Resource->COLOR_Whisper );
if( value != KColorDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
void setPageDisplay::slot_Color_Notification(void)
@ -367,7 +367,7 @@ void setPageDisplay::slot_Color_Notification(void)
int value = KColorDialog::getColor( Resource->COLOR_Notification );
if( value != KColorDialog::Accepted ) return;
resetSampleConsole();
rebuildConsole = TRUE;
rebuildConsole = true;
emit enableApply();
}
///////////////////////////////////////
@ -378,7 +378,7 @@ void setPageDisplay::slot_Color_Notification(void)
void setPageDisplay::slotCurrent_Boards( int Index )
{
NewBoards = Index;
changeTheme = TRUE;
changeTheme = true;
emit enableApply();
}
///////////////////////////////////////
@ -389,7 +389,7 @@ void setPageDisplay::slotCurrent_Boards( int Index )
void setPageDisplay::slotCurrent_Chessmen( int Index )
{
NewChessmen = Index;
changeTheme = TRUE;
changeTheme = true;
emit enableApply();
}
///////////////////////////////////////
@ -400,7 +400,7 @@ void setPageDisplay::slotCurrent_Chessmen( int Index )
void setPageDisplay::slotCurrent_Theme_Size( int Index )
{
Resource->ThemeSize = 32 + ( Index * 8 );
changeTheme = TRUE;
changeTheme = true;
emit enableApply();
}
///////////////////////////////////////
@ -411,7 +411,7 @@ void setPageDisplay::slotCurrent_Theme_Size( int Index )
void setPageDisplay::slotToggle_Board_Orientation( bool state )
{
Resource->OPTION_Board_Orientation = state;
refreshBoard = TRUE;
refreshBoard = true;
emit enableApply();
}
///////////////////////////////////////
@ -462,7 +462,7 @@ void setPageDisplay::slotToggle_Animate_Move( bool state )
void setPageDisplay::slotToggle_Show_Coord( bool state )
{
Resource->OPTION_Show_Coord = state;
refreshBoard = TRUE;
refreshBoard = true;
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 );
Engines_White = new KComboBox ( GROUP_White_Current );
Engines_White_Book = new KComboBox ( GROUP_White_Current );
Engines_White->setEditable( FALSE );
Engines_White_Book->setEditable( FALSE );
Engines_White->setEditable( false );
Engines_White_Book->setEditable( false );
/* Engines to play Black */
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 );
Engines_Black = new KComboBox ( GROUP_Black_Current );
Engines_Black_Book = new KComboBox ( GROUP_Black_Current );
Engines_Black->setEditable( FALSE );
Engines_Black_Book->setEditable( FALSE );
Engines_Black->setEditable( false );
Engines_Black_Book->setEditable( false );
/* Chess Engines ListView */
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( "Losses" ) );
Engines_ListView->addColumn( i18n( "Draws" ) );
Engines_ListView->setAllColumnsShowFocus( TRUE );
Engines_ListView->setMultiSelection( FALSE );
Engines_ListView->setShowSortIndicator( TRUE );
Engines_ListView->setAllColumnsShowFocus( true );
Engines_ListView->setMultiSelection( false );
Engines_ListView->setShowSortIndicator( true );
Engines_ListView->restoreLayout( tdeApp->config(), "Engines_ListView" );
Engines_ButtonBox = new KButtonBox( GROUP_Engines,TQt::Vertical );
@ -104,10 +104,10 @@ setPageEngines::~setPageEngines()
///////////////////////////////////////
void setPageEngines::BuildEngineData( void )
{
bool WHITE_FLAG(FALSE),
WHITE_BK_FLAG(FALSE),
BLACK_FLAG(FALSE),
BLACK_BK_FLAG(FALSE);
bool WHITE_FLAG(false),
WHITE_BK_FLAG(false),
BLACK_FLAG(false),
BLACK_BK_FLAG(false);
TQStringList EngineList;
TQString proto;
int Index(0);
@ -164,28 +164,28 @@ void setPageEngines::BuildEngineData( void )
if( Engines_White_Book->text(Index) == (*enginesIT).Name )
{
Engines_White_Book->setCurrentItem(Index);
WHITE_BK_FLAG = TRUE;
WHITE_BK_FLAG = true;
}
if( (*enginesIT).CurrentRef & ENGINE_BLACK_BK )
for( Index = 0; Index < Engines_Black_Book->count(); Index++ )
if( Engines_Black_Book->text(Index) == (*enginesIT).Name )
{
Engines_Black_Book->setCurrentItem(Index);
BLACK_BK_FLAG = TRUE;
BLACK_BK_FLAG = true;
}
if( (*enginesIT).CurrentRef & ENGINE_WHITE )
for( Index = 0; Index < Engines_White->count(); Index++ )
if( Engines_White->text(Index) == (*enginesIT).Name )
{
Engines_White->setCurrentItem(Index);
WHITE_FLAG = TRUE;
WHITE_FLAG = true;
}
if( (*enginesIT).CurrentRef & ENGINE_BLACK )
for( Index = 0; Index < Engines_Black->count(); Index++ )
if( Engines_Black->text(Index) == (*enginesIT).Name )
{
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( ( !BLACK_BK_FLAG ) && ( Engines_Black_Book->count() ) ) slotCurrent_Black_Book( Engines_Black_Book->currentItem() );
Engines_Button_Change->setEnabled( FALSE );
Engines_Button_Delete->setEnabled( FALSE );
Engines_Button_Change->setEnabled( false );
Engines_Button_Delete->setEnabled( false );
}
///////////////////////////////////////
//
@ -351,12 +351,12 @@ void setPageEngines::selectionChanged( void )
{
if( Engines_ListView->selectedItem() == 0 )
{
Engines_Button_Change->setEnabled( FALSE );
Engines_Button_Delete->setEnabled( FALSE );
Engines_Button_Change->setEnabled( false );
Engines_Button_Delete->setEnabled( false );
}
else
{
Engines_Button_Change->setEnabled( TRUE );
Engines_Button_Delete->setEnabled( TRUE );
Engines_Button_Change->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_VsPC = new TQRadioButton( i18n( "Start a Match vs. PC" ), GROUP_OnInit );
BUTTON_Init_Connect = new TQRadioButton( i18n( "Connect to ICS" ), GROUP_OnInit );
GROUP_OnInit->setExclusive( TRUE );
GROUP_OnInit->setExclusive( true );
if( Resource->OPTION_On_Init == 0 ) GROUP_OnInit->setButton( 0 );
else if( Resource->OPTION_On_Init == MENU_VS_PC ) GROUP_OnInit->setButton( 1 );
else GROUP_OnInit->setButton( 2 );
@ -52,7 +52,7 @@ setPageGeneral::setPageGeneral(TQWidget *parent, resource *Rsrc ) : TQVBoxLayout
BUTTON_AutoSave_Yes = new TQRadioButton( i18n( "Yes" ), GROUP_AutoSave );
BUTTON_AutoSave_No = new TQRadioButton( i18n( "No" ), GROUP_AutoSave );
BUTTON_AutoSave_Ask = new TQRadioButton( i18n( "Ask" ), GROUP_AutoSave );
GROUP_AutoSave->setExclusive( TRUE );
GROUP_AutoSave->setExclusive( true );
if( Resource->PromptForSaving == "Yes" ) GROUP_AutoSave->setButton( 0 );
else if( Resource->PromptForSaving == "No" ) GROUP_AutoSave->setButton( 1 );
else GROUP_AutoSave->setButton( 2 );

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

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

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

@ -23,20 +23,20 @@
tab_SeekList::tab_SeekList(TQWidget *parent, const char *name, resource *Rsrc ) : TDEListView(parent,name)
{
myResource = Rsrc;
seek = FALSE;
seek = false;
addColumn( i18n( "Name" ) );
addColumn( i18n( "Rating" ) );
addColumn( i18n( "Match Type" ) );
addColumn( i18n( "Is Rated?" ) );
addColumn( i18n( "Base Time" ) );
addColumn( i18n( "Increment" ) );
setShowSortIndicator( TRUE );
setAllColumnsShowFocus( TRUE );
setMultiSelection( FALSE );
setShowSortIndicator( true );
setAllColumnsShowFocus( true );
setMultiSelection( false );
restoreLayout( tdeApp->config(), "Sought_ListView" );
menuSeek = new TDEPopupMenu( this );
menuSeek->setCheckable( TRUE );
menuSeek->setCheckable( true );
menuSeek->insertItem( i18n("Seek Matches"), this, TQ_SLOT( menuFunct(int) ), 0, MENU_SEEK );
menuSeek->insertSeparator();
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->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->setItemChecked( MENU_SEEK, FALSE );
menuSeek->setItemChecked( MENU_SEEK, false );
connect( this, TQ_SIGNAL( contextMenuRequested( 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;
case CMD_Hide_Sought_List:
clear();
seek = FALSE;
seek = false;
break;
default:
break;
@ -109,7 +109,7 @@ void tab_SeekList::updateSoughtList( void )
SF_05.clear();
SF_06.clear();
SF_07.clear();
seek = TRUE;
seek = true;
}
///////////////////////////////////////
//
@ -118,7 +118,7 @@ void tab_SeekList::updateSoughtList( void )
///////////////////////////////////////
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_02 << fields[1]; // Rating
SF_03 << fields[6]; // Match Type
@ -137,14 +137,14 @@ void tab_SeekList::display_menuSeek( TQListViewItem *Item, const TQPoint &Pos, i
bool enable;
if( Item != NULL )
{
setSelected( Item, TRUE );
setSelected( Item, true );
selectedPlayerName = Item->text(0).replace( TQRegExp("\\(.+\\)"), TQString("") );
selectedMatchID = Item->text(6).toInt();
enable = TRUE;
enable = true;
}
else
{
enable = FALSE;
enable = false;
}
menuSeek->setItemChecked( MENU_SEEK, seek );
menuSeek->setItemEnabled( MENU_FINGER, enable );

@ -41,7 +41,7 @@ TabBox::~TabBox()
{
while( myTabs->count() )
{
removeTab( myTabs->page(0), TRUE );
removeTab( myTabs->page(0), true );
}
delete myAccel;
}
@ -145,7 +145,7 @@ void TabBox::destroyChild( void )
return;
/* Nuke it */
removeTab( ((TQWidget*)child), TRUE );
removeTab( ((TQWidget*)child), true );
if( count() == 0 )
{
@ -181,11 +181,11 @@ bool TabBox::isChild( TQWidget *child )
for( int tmp=0; tmp < myTabs->count(); tmp++ )
{
if( myTabs->page(tmp) == child )
return TRUE;
return true;
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();
void keyPressEvent( TQKeyEvent* );
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 );
void showTab( TQWidget *child );
void changeCaption( TQWidget *child, const TQString &caption );

@ -24,8 +24,8 @@ TabGrip::TabGrip(TQWidget *parent, const char *name ) : TQWidget(parent,name)
setMaximumSize( 3200, 12 );
setMinimumSize( 32, 12 );
isDragging = FALSE;
couldDrag = FALSE;
isDragging = false;
couldDrag = false;
setCursor( TQt::SizeAllCursor );
@ -62,7 +62,7 @@ void TabGrip::mousePressEvent( TQMouseEvent *event )
event->accept();
if(event->button() == TQt::LeftButton)
{
couldDrag = TRUE;
couldDrag = true;
offset = mapToGlobal( event->pos() );
offset.setX( topLevelWidget()->x() - offset.x() );
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.
*/
event->accept();
if( couldDrag == TRUE )
if( couldDrag == true )
{
/* Dragging Page */
isDragging = TRUE;
couldDrag = FALSE;
isDragging = true;
couldDrag = false;
TQApplication::setOverrideCursor( TQt::SizeAllCursor );
}
}
@ -98,11 +98,11 @@ void TabGrip::mouseReleaseEvent( TQMouseEvent *event )
event->accept();
if(event->button() == TQt::LeftButton)
{
couldDrag = FALSE;
couldDrag = false;
if( isDragging )
{
TQApplication::restoreOverrideCursor();
isDragging = FALSE;
isDragging = false;
emit wasDragged( event->globalPos(), offset );
}
}

@ -102,7 +102,7 @@ void TabManager::removeTab( TQObject *child )
if( boxPtr != NULL )
{
kdDebug() << "Removing child: " << childName << endl;
boxPtr->removeTab( ((TQWidget*)child), TRUE );
boxPtr->removeTab( ((TQWidget*)child), true );
if( boxPtr->count() == 0 )
{
myList.remove( boxPtr );
@ -134,9 +134,9 @@ bool TabManager::isTab( TQWidget *child )
{
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&) ) );
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() )
{
/* 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->setIconSet( TQIconSet( map ) );
closeButton->setAutoRaise( TRUE );
closeButton->setTextLabel( i18n( "Close This Tab" ), TRUE );
closeButton->setAutoRaise( true );
closeButton->setTextLabel( i18n( "Close This Tab" ), true );
closeButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
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();
show();
}
@ -78,7 +78,7 @@ void TabPage::tabDragged( const TQPoint &dest, const TQPoint &offset )
TabBox *myParent = parentTabBox();
if( myParent != NULL )
{
TQWidget *destWidget = TQApplication::widgetAt( dest, TRUE );
TQWidget *destWidget = TQApplication::widgetAt( dest, true );
/* Find a TabBox */
while(1)
{

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

@ -24,7 +24,7 @@
#include <tqregexp.h>
#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;
steps = 0;
@ -75,8 +75,8 @@ void wiz_setup::initPage1( void )
P1B1->addWidget( WelcomeMessage, 1, 3 );
addPage( Page1, i18n("Welcome to Knights v%1!").arg(_VERSION_) );
setNextEnabled( Page1, TRUE );
setHelpEnabled( Page1, FALSE );
setNextEnabled( Page1, true );
setHelpEnabled( Page1, false );
}
///////////////////////////////////////
//
@ -104,7 +104,7 @@ void wiz_setup::initPage2( void )
P2B1->addWidget( pgnButtons, 2, 3 );
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 );
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 );
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 );
addPage( Page5, i18n("Setup Complete") );
setFinish( Page5, TRUE );
setHelpEnabled( Page5, FALSE );
setFinish( Page5, true );
setHelpEnabled( Page5, false );
}
///////////////////////////////////////
//
@ -216,7 +216,7 @@ void wiz_setup::initPage6( void )
licenseButtons->setButton( 1 );
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) ) );
}
///////////////////////////////////////
@ -229,12 +229,12 @@ void wiz_setup::slot_Work( const TQString& pageTitle )
/* Don't let 'em past the license */
if( pageTitle == title( Page6 ) )
{
setNextEnabled( Page6, FALSE );
setNextEnabled( Page6, false );
}
/* Don't proceed unless we're ready to work */
if( pageTitle != title( Page5 ) ) return;
setBackEnabled( Page5, FALSE );
setBackEnabled( Page5, false );
if( myResource->Config_Version < 1 )
{
// if( pgnButtons->selected() == pgnYes )
@ -245,7 +245,7 @@ void wiz_setup::slot_Work( const TQString& pageTitle )
setupServers();
}
myResource->ConfigWrite();
setFinishEnabled( Page5, TRUE );
setFinishEnabled( Page5, true );
}
///////////////////////////////////////
//
@ -285,9 +285,9 @@ void wiz_setup::setupServers( void )
newServer->LogFile = TQString();
newServer->UserName = TQString();
newServer->Password = TQString();
newServer->StorePass = FALSE;
if( !loop ) newServer->CurrentRef = TRUE;
else newServer->CurrentRef = FALSE;
newServer->StorePass = false;
if( !loop ) newServer->CurrentRef = true;
else newServer->CurrentRef = false;
myResource->servers.append( *newServer );
delete newServer;
}
@ -302,7 +302,7 @@ void wiz_setup::findEngines( void )
engineResource *newEngine;
TQStringList names, filenames;
TDEProcess *Shell;
bool foundOne( FALSE );
bool foundOne( false );
unsigned int loop;
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;
myResource->engines.append( *newEngine );
delete newEngine;
foundOne = TRUE;
foundOne = true;
}
Shell->kill();
delete Shell;
@ -349,12 +349,12 @@ void wiz_setup::slot_License( int index )
{
if( index == 0 )
{
setNextEnabled( Page6, TRUE );
myResource->Accepted_License = TRUE;
setNextEnabled( Page6, true );
myResource->Accepted_License = true;
}
else
{
setNextEnabled( Page6, FALSE );
myResource->Accepted_License = FALSE;
setNextEnabled( Page6, false );
myResource->Accepted_License = false;
}
}

Loading…
Cancel
Save