Rename old tq methods that no longer need a unique name

(cherry picked from commit dd4501d85d)
v3.5.13-sru
Timothy Pearson 13 years ago committed by Slávek Banko
parent 8ba0d12534
commit 25ad6268bc

@ -66,7 +66,7 @@ Challenge_Graph::Challenge_Graph( TQWidget* parent, const char* name, resource *
/* Setup Style for myStatusBar */
myStatusBar->tqsetAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::SingleLine );
myStatusBar->setAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::SingleLine );
myStatusBar->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
clear();
@ -311,7 +311,7 @@ void Challenge_Graph::createBackground( void )
painter.drawText( 64, y_size - 8, i18n( "Time" ) );
painter.end();
graph->tqsetBackgroundPixmap( background );
graph->setBackgroundPixmap( background );
}
///////////////////////////////////////
//

@ -227,7 +227,7 @@ void core::setMatch( int ID )
/* Give Ourselves Focus */
setActiveWindow();
tqtopLevelWidget()->raise();
topLevelWidget()->raise();
}
///////////////////////////////////////

@ -48,7 +48,7 @@ dlg_challenge::dlg_challenge(TQWidget *parent, const char *name, resource *Rsrc
LABEL_BlackInc = new TQLabel( BOX_Black );
BUTTON_TimeOdds = new TQCheckBox( i18n("Time Odds Match"),BOX_Parent );
LABEL_Headline->tqsetAlignment( TQt::AlignCenter );
LABEL_Headline->setAlignment( TQt::AlignCenter );
COMBO_Rated->setEditable( FALSE );
COMBO_Rated->insertItem( i18n("Unrated"), 0 );
COMBO_Rated->insertItem( i18n("Rated"), 1 );

@ -163,21 +163,21 @@ bool Knights::init( void )
initMenus();
/* Init Message */
Message->tqsetAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::SingleLine );
Message->setAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::SingleLine );
/* Init White Time Label */
GroupWhite.setColor( TQColorGroup::Background, Resource->COLOR_White );
GroupWhite.setColor( TQColorGroup::Foreground, Resource->COLOR_Black );
whiteTimeLabel->setPalette( TQPalette( GroupWhite, GroupWhite, GroupWhite ) );
whiteTimeLabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
whiteTimeLabel->tqsetAlignment( TQt::AlignCenter | TQt::SingleLine );
whiteTimeLabel->setAlignment( TQt::AlignCenter | TQt::SingleLine );
/* Init Black Time Label */
GroupBlack.setColor( TQColorGroup::Background, Resource->COLOR_Black );
GroupBlack.setColor( TQColorGroup::Foreground, Resource->COLOR_White );
blackTimeLabel->setPalette( TQPalette( GroupBlack, GroupBlack, GroupBlack ) );
blackTimeLabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
blackTimeLabel->tqsetAlignment( TQt::AlignCenter | TQt::SingleLine );
blackTimeLabel->setAlignment( TQt::AlignCenter | TQt::SingleLine );
/* Configure self */
setCentralWidget( MainFrame );
@ -250,122 +250,122 @@ void Knights::initMenus( void )
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("undo"), KIcon::Small ) ),
i18n( "&Retract Move" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_RETRACT );
matchMenu->setItemEnabled( MENU_RETRACT, FALSE );
matchMenu->tqsetWhatsThis( MENU_RETRACT, i18n( "Select this to retract your last move." ) );
matchMenu->setWhatsThis( MENU_RETRACT, i18n( "Select this to retract your last move." ) );
// MENU_RESIGN
matchMenu->insertItem( i18n( "Resign" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_RESIGN );
matchMenu->setItemEnabled( MENU_RESIGN, FALSE );
matchMenu->tqsetWhatsThis( MENU_RESIGN, i18n( "Use this to concede the match to your opponent." ) );
matchMenu->setWhatsThis( MENU_RESIGN, i18n( "Use this to concede the match to your opponent." ) );
// MENU_CALL_FLAG
matchMenu->insertItem( i18n( "&Call Flag" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_CALL_FLAG );
matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE );
matchMenu->tqsetWhatsThis( MENU_CALL_FLAG, i18n( "Use this to declare the match over, due to your opponent being out of time." ) );
matchMenu->setWhatsThis( MENU_CALL_FLAG, i18n( "Use this to declare the match over, due to your opponent being out of time." ) );
// MENU_HINT
matchMenu->insertItem( i18n( "&Hint" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_HINT );
matchMenu->setItemEnabled( MENU_HINT, FALSE );
matchMenu->tqsetWhatsThis( MENU_HINT, i18n( "This will ask your opponent for a hint." ) );
matchMenu->setWhatsThis( MENU_HINT, i18n( "This will ask your opponent for a hint." ) );
// MENU_MOVE_NOW
matchMenu->insertItem( i18n( "Move &Now" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_MOVE_NOW );
matchMenu->setItemEnabled( MENU_MOVE_NOW, FALSE );
matchMenu->tqsetWhatsThis( MENU_MOVE_NOW, i18n( "Clicking this option will force your opponent to move immediately." ) );
matchMenu->setWhatsThis( MENU_MOVE_NOW, i18n( "Clicking this option will force your opponent to move immediately." ) );
// MENU_ORIENTATION
matchMenu->insertItem( i18n( "&Flip View" ), Core, TQT_SLOT(matchMenu(int)), Key_F2, MENU_ORIENTATION );
matchMenu->setItemEnabled( MENU_ORIENTATION, FALSE );
matchMenu->tqsetWhatsThis( MENU_ORIENTATION, i18n( "This will reverse the chessboard's orientation by 180 degrees." ) );
matchMenu->setWhatsThis( MENU_ORIENTATION, i18n( "This will reverse the chessboard's orientation by 180 degrees." ) );
// MENU_PONDER
matchMenu->insertItem( i18n( "&Ponder" ), this, TQT_SLOT(Settings(int)), 0, MENU_PONDER );
matchMenu->setItemChecked( MENU_PONDER, Resource->OPTION_Ponder );
matchMenu->setItemEnabled( MENU_PONDER, FALSE );
matchMenu->tqsetWhatsThis( MENU_PONDER, i18n( "This toggles your opponent's ability to think while it's your turn." ) );
matchMenu->setWhatsThis( MENU_PONDER, i18n( "This toggles your opponent's ability to think while it's your turn." ) );
matchMenu->insertSeparator();
// MENU_PAUSE
matchMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("player_pause"), KIcon::Small ) ),
i18n( "Pause" ), this, TQT_SLOT( Settings(int) ), Key_F12, MENU_PAUSE );
matchMenu->setItemEnabled( MENU_PAUSE, FALSE );
matchMenu->tqsetWhatsThis( MENU_PAUSE, i18n( "Select this to pause the clock for this match." ) );
matchMenu->setWhatsThis( MENU_PAUSE, i18n( "Select this to pause the clock for this match." ) );
/*
drawMenu menu
*/
// MENU_OFFER_DRAW
drawMenu->insertItem( i18n( "&Offer Draw" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_OFFER_DRAW );
drawMenu->tqsetWhatsThis( MENU_OFFER_DRAW, i18n( "Clicking this will inform your opponent that you are willing draw the match." ) );
drawMenu->setWhatsThis( MENU_OFFER_DRAW, i18n( "Clicking this will inform your opponent that you are willing draw the match." ) );
// MENU_ACCEPT_DRAW
drawMenu->insertItem( i18n( "&Accept Draw" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_ACCEPT_DRAW );
drawMenu->tqsetWhatsThis( MENU_ACCEPT_DRAW, i18n( "Clicking this will accept a draw offered by your opponent." ) );
drawMenu->setWhatsThis( MENU_ACCEPT_DRAW, i18n( "Clicking this will accept a draw offered by your opponent." ) );
// MENU_REJECT_DRAW
drawMenu->insertItem( i18n( "&Reject Draw" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_REJECT_DRAW );
drawMenu->tqsetWhatsThis( MENU_REJECT_DRAW, i18n( "Clicking this will reject a draw offered by your opponent." ) );
drawMenu->setWhatsThis( MENU_REJECT_DRAW, i18n( "Clicking this will reject a draw offered by your opponent." ) );
// MENU_IGNORE_DRAW
drawMenu->insertItem( i18n( "&Ignore Draw" ), Core, TQT_SLOT(matchMenu(int)), 0, MENU_IGNORE_DRAW );
drawMenu->tqsetWhatsThis( MENU_IGNORE_DRAW, i18n( "Clicking this will ignore future draw offers from your opponent." ) );
drawMenu->setWhatsThis( MENU_IGNORE_DRAW, i18n( "Clicking this will ignore future draw offers from your opponent." ) );
/*
fileMenu menu
*/
// MENU_NEWGAME
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filenew"), KIcon::Small ) ),
i18n( "&New Match..." ), this, TQT_SLOT( openNewMatchDialog() ), CTRL+Key_N, MENU_NEWGAME );
fileMenu->tqsetWhatsThis( MENU_NEWGAME, i18n( "This allows you to begin a new match." ) );
fileMenu->setWhatsThis( MENU_NEWGAME, i18n( "This allows you to begin a new match." ) );
// MENU_LOAD
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileopen"), KIcon::Small ) ),
i18n( "&Load Match..." ), Core, TQT_SLOT( load() ), CTRL+Key_L, MENU_LOAD );
fileMenu->tqsetWhatsThis( MENU_LOAD, i18n( "The Load command will allow you to select a previously saved match and play it again." ) );
fileMenu->setWhatsThis( MENU_LOAD, i18n( "The Load command will allow you to select a previously saved match and play it again." ) );
fileMenu->insertSeparator();
// MENU_SAVE
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), KIcon::Small ) ),
i18n( "&Save Match" ), this, TQT_SLOT( SaveGame() ), CTRL+Key_S, MENU_SAVE );
fileMenu->setItemEnabled( MENU_SAVE, FALSE );
fileMenu->tqsetWhatsThis( MENU_SAVE, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
fileMenu->setWhatsThis( MENU_SAVE, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
// MENU_SAVEAS
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("filesave"), KIcon::Small ) ),
i18n( "Save Match &As..." ), this, TQT_SLOT( SaveGameAs() ), CTRL+Key_A, MENU_SAVEAS );
fileMenu->setItemEnabled( MENU_SAVEAS, FALSE );
fileMenu->tqsetWhatsThis( MENU_SAVEAS, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
fileMenu->setWhatsThis( MENU_SAVEAS, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
fileMenu->insertSeparator();
// MENU_CONNECT
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("connect_creating"), KIcon::Small ) ),
i18n( "Connect to Server" ), this, TQT_SLOT( netConnect() ), CTRL+Key_C, MENU_CONNECT );
fileMenu->tqsetWhatsThis( MENU_CONNECT, i18n( "Clicking this will connect Knights with an internet chess server." ) );
fileMenu->setWhatsThis( MENU_CONNECT, i18n( "Clicking this will connect Knights with an internet chess server." ) );
fileMenu->insertSeparator();
// MENU_PRINT
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileprint"), KIcon::Small ) ),
i18n( "&Print Notation..." ), Core, TQT_SLOT( print() ), CTRL+Key_P, MENU_PRINT );
fileMenu->setItemEnabled( MENU_PRINT, FALSE );
fileMenu->tqsetWhatsThis( MENU_PRINT, i18n( "The Print command will allow you to print this game's notation on your printer." ) );
fileMenu->setWhatsThis( MENU_PRINT, i18n( "The Print command will allow you to print this game's notation on your printer." ) );
fileMenu->insertSeparator();
// MENU_CLOSE
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("fileclose"), KIcon::Small ) ),
i18n( "&Close Match" ), Core, TQT_SLOT( clearMatch() ), CTRL+Key_W, MENU_CLOSE );
fileMenu->setItemEnabled( MENU_CLOSE, FALSE );
fileMenu->tqsetWhatsThis( MENU_CLOSE, i18n( "This command removes the current match." ) );
fileMenu->setWhatsThis( MENU_CLOSE, i18n( "This command removes the current match." ) );
// MENU_CLOSEALL
fileMenu->insertItem( i18n( "Close All" ), Core, TQT_SLOT( clearAll() ), 0, MENU_CLOSEALL );
fileMenu->setItemEnabled( MENU_CLOSEALL, FALSE );
fileMenu->tqsetWhatsThis( MENU_CLOSEALL, i18n( "This command will remove all matches that are currently loaded." ) );
fileMenu->setWhatsThis( MENU_CLOSEALL, i18n( "This command will remove all matches that are currently loaded." ) );
fileMenu->insertSeparator();
// MENU_TQUIT
fileMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("exit"), KIcon::Small ) ),
i18n( "&Quit" ), this, TQT_SLOT(menuClose()), CTRL+Key_Q, MENU_TQUIT );
fileMenu->tqsetWhatsThis( MENU_TQUIT, i18n( "The Quit command will stop all matches and exit Knights." ) );
fileMenu->setWhatsThis( MENU_TQUIT, i18n( "The Quit command will stop all matches and exit Knights." ) );
/*
settingsMenu menu
*/
// MENU_INSTALL_THEMES
settingsMenu->insertItem( i18n( "&Install Themes" ), this, TQT_SLOT(installThemes()), 0, MENU_INSTALL_THEMES );
settingsMenu->tqsetWhatsThis( MENU_INSTALL_THEMES, i18n( "This lets you install downloaded themes into Knights." ) );
settingsMenu->setWhatsThis( MENU_INSTALL_THEMES, i18n( "This lets you install downloaded themes into Knights." ) );
// MENU_BINDINGS_DIALOG
settingsMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("key_bindings"), KIcon::Small ) ),
i18n( "Configure &Key Bindings..." ), this, TQT_SLOT(openKeyBindingDialog()), 0, MENU_BINDINGS_DIALOG );
settingsMenu->tqsetWhatsThis( MENU_BINDINGS_DIALOG, i18n( "Click this if you want to change the keyboard shortcuts that Knights uses." ) );
settingsMenu->setWhatsThis( MENU_BINDINGS_DIALOG, i18n( "Click this if you want to change the keyboard shortcuts that Knights uses." ) );
// MENU_SETTINGS_DIALOG
settingsMenu->insertItem( TQIconSet( Resource->LoadIcon( TQString("configure"), KIcon::Small ) ),
i18n( "&Configure Knights..." ), this, TQT_SLOT(openSettingsDialog()), 0, MENU_SETTINGS_DIALOG );
settingsMenu->tqsetWhatsThis( MENU_SETTINGS_DIALOG, i18n( "This opens a new window which allows you to customize Knights to your particular tastes." ) );
settingsMenu->setWhatsThis( MENU_SETTINGS_DIALOG, i18n( "This opens a new window which allows you to customize Knights to your particular tastes." ) );
/*
tutorialMenu menu
*/
tutorialMenu->setCheckable(TRUE);
// MENU_OPEN_TUTORIAL
tutorialMenu->insertItem( i18n( "Begin a Tutorial" ), this, TQT_SLOT(Settings(int)), 0, MENU_OPEN_TUTORIAL );
// tutorialMenu->tqsetWhatsThis( MENU_OPEN_TUTORIAL, i18n( "" ) );
// tutorialMenu->setWhatsThis( MENU_OPEN_TUTORIAL, i18n( "" ) );
/*
topMenu menu
*/
@ -397,8 +397,8 @@ void Knights::resizeMainFrame(void)
Core->move( 0, 0 );
Core->resize();
/* Get our size hints */
S_Message = Message->tqsizeHint();
S_Menu = topMenu->tqsizeHint();
S_Message = Message->sizeHint();
S_Menu = topMenu->sizeHint();
statusHeight = S_Message.height() + ( margin << 1 );
statusY += Core->height() + margin + statusHeight + margin;
statusX = Core->width();
@ -447,7 +447,7 @@ void Knights::resizeEvent( TQResizeEvent * )
if( ResizeFlag ) return;
/* Get the height & Y of the status bar */
gridX = Core->width() >> 3;
S_Message = Message->tqsizeHint() + TQSize( 2, 2 );
S_Message = Message->sizeHint() + TQSize( 2, 2 );
statusHeight = S_Message.height() + ( margin << 1 );
Resource->Widget_Height = statusHeight;
statusY += Core->height() + margin;

@ -207,7 +207,7 @@ void KnightsTextView::print( void )
{
/* Print the Contents */
paint.setClipRect( body );
simpText.draw( &paint, body.left(), body.top(), view, tqcolorGroup() );
simpText.draw( &paint, body.left(), body.top(), view, colorGroup() );
paint.setClipping( false );
view.moveBy( 0, body.height() );
paint.translate( 0, -body.height() );

@ -891,7 +891,7 @@ bool match::move( void )
Clock->Pause();
Logic->OnMove = !Logic->OnMove;
/* Set tqStatus Bar */
/* Set Status Bar */
if( Logic->OnMove == WHITE )
{
emit setStatusBar( WHITE_TURN );

@ -288,7 +288,7 @@ void pgn::init( void )
uname( &unamePtr );
/* Build Date */
qdt = TQDateTime::tqcurrentDateTime();
qdt = TQDateTime::currentDateTime();
TAG_Date = TQString("%1.%2.%3").tqarg(qdt.date().year(),4).tqarg(qdt.date().month(),2).tqarg(qdt.date().day(),2);
TAG_Date = TAG_Date.replace( TQRegExp("\\s"), TQString("0") );
TAG_Time = qdt.time().toString();

@ -42,7 +42,7 @@ TabGrip::~TabGrip()
void TabGrip::paintEvent( TQPaintEvent* )
{
TQPainter paint( this );
TQColorGroup group( tqcolorGroup() );
TQColorGroup group( colorGroup() );
paint.setPen( group.light() );
paint.drawLine( 2, 2, width() - 3, 2 );
paint.drawLine( 2, 5, width() - 3, 5 );
@ -64,8 +64,8 @@ void TabGrip::mousePressEvent( TQMouseEvent *event )
{
couldDrag = TRUE;
offset = mapToGlobal( event->pos() );
offset.setX( tqtopLevelWidget()->x() - offset.x() );
offset.setY( tqtopLevelWidget()->y() - offset.y() );
offset.setX( topLevelWidget()->x() - offset.x() );
offset.setY( topLevelWidget()->y() - offset.y() );
}
}
///////////////////////////////////////

@ -53,7 +53,7 @@ TabPage::TabPage( TQWidget *parent, TQWidget *child, resource *rsrc ) : TQVBox(p
closeButton->setIconSet( TQIconSet( map ) );
closeButton->setAutoRaise( TRUE );
closeButton->setTextLabel( i18n( "Close This Tab" ), TRUE );
closeButton->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
closeButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
connect( closeButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( requestDestruction() ) );
myChild->reparent( this, TQPoint( 0, 0 ), TRUE );

@ -70,7 +70,7 @@ void wiz_setup::initPage1( void )
P1B1->addWidget( SideImage1, 1, 1 );
WelcomeMessage = new TQLabel( Page1 );
WelcomeMessage->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
WelcomeMessage->setAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
WelcomeMessage->setText( i18n( "Thank you for installing Knights, the graphical chess interface for KDE. To help you get started quickly, there are a few things Knights will need to setup. You should click 'Next' to see what they are." ) );
P1B1->addWidget( WelcomeMessage, 1, 3 );
@ -93,7 +93,7 @@ void wiz_setup::initPage2( void )
P2B1->addMultiCellWidget( SideImage2, 1, 2, 1, 1 );
pgnExplain = new TQLabel( Page2 );
pgnExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
pgnExplain->setAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
pgnExplain->setText( i18n( "When Knights saves a match to disk, it uses Portable Game Notation (PGN) to store the match. Several other computer chess games use PGN too. If you like, Knights can be the default PGN viewer on this system." ) );
P2B1->addWidget( pgnExplain, 1, 3 );
@ -121,7 +121,7 @@ void wiz_setup::initPage3( void )
P3B1->addMultiCellWidget( SideImage3, 1, 2, 1, 1 );
engineExplain = new TQLabel( Page3 );
engineExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
engineExplain->setAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
engineExplain->setText( i18n( "Knights can not play a chess match against you without help. Known as Chess Engines, these helpers can be found on the Internet and are often included with your distribution. Knights can look for Chess Engines that you may already have. If found, Knights will configure itself to use them." ) );
P3B1->addWidget( engineExplain, 1, 3 );
@ -149,7 +149,7 @@ void wiz_setup::initPage4( void )
P4B1->addMultiCellWidget( SideImage4, 1, 2, 1, 1 );
serverExplain = new TQLabel( Page4 );
serverExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
serverExplain->setAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
serverExplain->setText( i18n( "In order for you to play chess online, Knights will have to connect to a chess server. Knights has a list of several of these servers. If you like, this list can be used to automatically configure Knights." ) );
P4B1->addWidget( serverExplain, 1, 3 );
@ -177,7 +177,7 @@ void wiz_setup::initPage5( void )
P5B1->addMultiCellWidget( SideImage5, 1, 2, 1, 1 );
FinishExplain = new TQLabel( Page5 );
FinishExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
FinishExplain->setAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
FinishExplain->setText( i18n( "Knights has now configured itself according to your choices. We strongly recommend that you read the documentation to make full use of all that Knights has to offer. You can access it by pressing F1." ) );
P5B1->addWidget( FinishExplain, 1, 3 );

Loading…
Cancel
Save