summaryrefslogtreecommitdiffstats
path: root/knights/wiz_setup.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 18:28:11 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 18:28:11 +0000
commit9ca7f795653bc31cf1d206da1e12c801a8380fa6 (patch)
treeee829debe9ad76ce8fc3b10cdc376754dba5ed03 /knights/wiz_setup.cpp
parent98cb2d5fa21e616cfea012f80bf1d989cfe264e3 (diff)
downloadknights-9ca7f795653bc31cf1d206da1e12c801a8380fa6.tar.gz
knights-9ca7f795653bc31cf1d206da1e12c801a8380fa6.zip
TQt4 port knights
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knights@1238529 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knights/wiz_setup.cpp')
-rw-r--r--knights/wiz_setup.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/knights/wiz_setup.cpp b/knights/wiz_setup.cpp
index e584de3..f840d69 100644
--- a/knights/wiz_setup.cpp
+++ b/knights/wiz_setup.cpp
@@ -18,13 +18,13 @@
#include <kglobalsettings.h>
#include <kprocess.h>
#include <kstddirs.h>
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "wiz_setup.moc"
-wiz_setup::wiz_setup(QWidget *parent, const char *name, resource *Rsrc ) : KWizard(parent,name,TRUE)
+wiz_setup::wiz_setup(TQWidget *tqparent, const char *name, resource *Rsrc ) : KWizard(tqparent,name,TRUE)
{
myResource = Rsrc;
steps = 0;
@@ -50,7 +50,7 @@ wiz_setup::wiz_setup(QWidget *parent, const char *name, resource *Rsrc ) : KWiza
initPage5();
setCaption( i18n( "Knights Setup Wizard" ) );
- connect( this, SIGNAL( selected(const QString&) ), this, SLOT( slot_Work(const QString&) ) );
+ connect( this, TQT_SIGNAL( selected(const TQString&) ), this, TQT_SLOT( slot_Work(const TQString&) ) );
}
wiz_setup::~wiz_setup()
{
@@ -62,19 +62,19 @@ wiz_setup::~wiz_setup()
///////////////////////////////////////
void wiz_setup::initPage1( void )
{
- Page1 = new QFrame( this );
- P1B1 = new QGridLayout( Page1, 1, 4, 8 );
+ Page1 = new TQFrame( this );
+ P1B1 = new TQGridLayout( Page1, 1, 4, 8 );
- SideImage1 = new QLabel( Page1 );
+ SideImage1 = new TQLabel( Page1 );
SideImage1->setPixmap( locate("data", "knights/wizard.png" ) );
P1B1->addWidget( SideImage1, 1, 1 );
- WelcomeMessage = new QLabel( Page1 );
- WelcomeMessage->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ WelcomeMessage = new TQLabel( Page1 );
+ WelcomeMessage->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
WelcomeMessage->setText( i18n( "Thank you for installing Knights, the graphical chess interface for KDE. To help you get started quickly, there are a few things Knights will need to setup. You should click 'Next' to see what they are." ) );
P1B1->addWidget( WelcomeMessage, 1, 3 );
- addPage( Page1, i18n("Welcome to Knights v%1!").arg(_VERSION_) );
+ addPage( Page1, i18n("Welcome to Knights v%1!").tqarg(_VERSION_) );
setNextEnabled( Page1, TRUE );
setHelpEnabled( Page1, FALSE );
}
@@ -85,21 +85,21 @@ void wiz_setup::initPage1( void )
///////////////////////////////////////
void wiz_setup::initPage2( void )
{
- Page2 = new QFrame( this );
- P2B1 = new QGridLayout( Page2, 2, 4, 8 );
+ Page2 = new TQFrame( this );
+ P2B1 = new TQGridLayout( Page2, 2, 4, 8 );
- SideImage2 = new QLabel( Page2 );
+ SideImage2 = new TQLabel( Page2 );
SideImage2->setPixmap( locate("data", "knights/wizard.png" ) );
P2B1->addMultiCellWidget( SideImage2, 1, 2, 1, 1 );
- pgnExplain = new QLabel( Page2 );
- pgnExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ pgnExplain = new TQLabel( Page2 );
+ pgnExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
pgnExplain->setText( i18n( "When Knights saves a match to disk, it uses Portable Game Notation (PGN) to store the match. Several other computer chess games use PGN too. If you like, Knights can be the default PGN viewer on this system." ) );
P2B1->addWidget( pgnExplain, 1, 3 );
- pgnButtons = new QButtonGroup( 2, Qt::Vertical, i18n( "Let Knights handle PGN files?" ), Page2 );
- pgnYes = new QRadioButton( i18n( "Yes" ), pgnButtons );
- pgnNo = new QRadioButton( i18n( "No" ), pgnButtons );
+ pgnButtons = new TQButtonGroup( 2, Qt::Vertical, i18n( "Let Knights handle PGN files?" ), Page2 );
+ pgnYes = new TQRadioButton( i18n( "Yes" ), pgnButtons );
+ pgnNo = new TQRadioButton( i18n( "No" ), pgnButtons );
pgnButtons->setButton( 0 );
P2B1->addWidget( pgnButtons, 2, 3 );
@@ -113,21 +113,21 @@ void wiz_setup::initPage2( void )
///////////////////////////////////////
void wiz_setup::initPage3( void )
{
- Page3 = new QFrame( this );
- P3B1 = new QGridLayout( Page3, 2, 4, 8 );
+ Page3 = new TQFrame( this );
+ P3B1 = new TQGridLayout( Page3, 2, 4, 8 );
- SideImage3 = new QLabel( Page3 );
+ SideImage3 = new TQLabel( Page3 );
SideImage3->setPixmap( locate("data", "knights/wizard.png" ) );
P3B1->addMultiCellWidget( SideImage3, 1, 2, 1, 1 );
- engineExplain = new QLabel( Page3 );
- engineExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ engineExplain = new TQLabel( Page3 );
+ engineExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
engineExplain->setText( i18n( "Knights can not play a chess match against you without help. Known as Chess Engines, these helpers can be found on the Internet and are often included with your distribution. Knights can look for Chess Engines that you may already have. If found, Knights will configure itself to use them." ) );
P3B1->addWidget( engineExplain, 1, 3 );
- engineButtons = new QButtonGroup( 2, Qt::Vertical, i18n( "Let Knights search for chess engines?" ), Page3 );
- engineYes = new QRadioButton( i18n( "Yes" ), engineButtons );
- engineNo = new QRadioButton( i18n( "No" ), engineButtons );
+ engineButtons = new TQButtonGroup( 2, Qt::Vertical, i18n( "Let Knights search for chess engines?" ), Page3 );
+ engineYes = new TQRadioButton( i18n( "Yes" ), engineButtons );
+ engineNo = new TQRadioButton( i18n( "No" ), engineButtons );
engineButtons->setButton( 0 );
P3B1->addWidget( engineButtons, 2, 3 );
@@ -141,21 +141,21 @@ void wiz_setup::initPage3( void )
///////////////////////////////////////
void wiz_setup::initPage4( void )
{
- Page4 = new QFrame( this );
- P4B1 = new QGridLayout( Page4, 2, 4, 8 );
+ Page4 = new TQFrame( this );
+ P4B1 = new TQGridLayout( Page4, 2, 4, 8 );
- SideImage4 = new QLabel( Page4 );
+ SideImage4 = new TQLabel( Page4 );
SideImage4->setPixmap( locate("data", "knights/wizard.png" ) );
P4B1->addMultiCellWidget( SideImage4, 1, 2, 1, 1 );
- serverExplain = new QLabel( Page4 );
- serverExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ serverExplain = new TQLabel( Page4 );
+ serverExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
serverExplain->setText( i18n( "In order for you to play chess online, Knights will have to connect to a chess server. Knights has a list of several of these servers. If you like, this list can be used to automatically configure Knights." ) );
P4B1->addWidget( serverExplain, 1, 3 );
- serverButtons = new QButtonGroup( 2, Qt::Vertical, i18n( "Let Knights configure chess servers?" ), Page4 );
- serverYes = new QRadioButton( i18n( "Yes" ), serverButtons );
- serverNo = new QRadioButton( i18n( "No" ), serverButtons );
+ serverButtons = new TQButtonGroup( 2, Qt::Vertical, i18n( "Let Knights configure chess servers?" ), Page4 );
+ serverYes = new TQRadioButton( i18n( "Yes" ), serverButtons );
+ serverNo = new TQRadioButton( i18n( "No" ), serverButtons );
serverButtons->setButton( 0 );
P4B1->addWidget( serverButtons, 2, 3 );
@@ -169,15 +169,15 @@ void wiz_setup::initPage4( void )
///////////////////////////////////////
void wiz_setup::initPage5( void )
{
- Page5 = new QFrame( this );
- P5B1 = new QGridLayout( Page5, 2, 4, 8 );
+ Page5 = new TQFrame( this );
+ P5B1 = new TQGridLayout( Page5, 2, 4, 8 );
- SideImage5 = new QLabel( Page5 );
+ SideImage5 = new TQLabel( Page5 );
SideImage5->setPixmap( locate("data", "knights/wizard.png" ) );
P5B1->addMultiCellWidget( SideImage5, 1, 2, 1, 1 );
- FinishExplain = new QLabel( Page5 );
- FinishExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ FinishExplain = new TQLabel( Page5 );
+ FinishExplain->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop | TQt::WordBreak );
FinishExplain->setText( i18n( "Knights has now configured itself according to your choices. We strongly recommend that you read the documentation to make full use of all that Knights has to offer. You can access it by pressing F1." ) );
P5B1->addWidget( FinishExplain, 1, 3 );
@@ -192,39 +192,39 @@ void wiz_setup::initPage5( void )
///////////////////////////////////////
void wiz_setup::initPage6( void )
{
- QString f( locate("data", "LICENSES/GPL_V2") );
- QString licenseText("<K_STD>");
- Page6 = new QVBox( this );
+ TQString f( locate("data", "LICENSES/GPL_V2") );
+ TQString licenseText("<K_STD>");
+ Page6 = new TQVBox( this );
/* Setup License View */
licenseView = new KnightsTextView( Page6, myResource );
if (!f.isEmpty())
{
- QFile file(f);
+ TQFile file(f);
if (file.open(IO_ReadOnly))
{
- QTextStream str(&file);
+ TQTextStream str(&file);
licenseText += str.read();
}
}
licenseText.append( "</K_STD>" );
licenseView->setText( licenseText );
- licenseButtons = new QButtonGroup( 2, Qt::Horizontal, i18n( "Do you accept the terms of our license?" ), Page6 );
- licenseYes = new QRadioButton( i18n( "Yes" ), licenseButtons );
- licenseNo = new QRadioButton( i18n( "No" ), licenseButtons );
+ licenseButtons = new TQButtonGroup( 2, Qt::Horizontal, i18n( "Do you accept the terms of our license?" ), Page6 );
+ licenseYes = new TQRadioButton( i18n( "Yes" ), licenseButtons );
+ licenseNo = new TQRadioButton( i18n( "No" ), licenseButtons );
licenseButtons->setButton( 1 );
addPage( Page6, i18n("Please read and accept our license:") );
setHelpEnabled( Page6, FALSE );
- connect( licenseButtons, SIGNAL( clicked(int) ), this, SLOT( slot_License(int) ) );
+ connect( licenseButtons, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( slot_License(int) ) );
}
///////////////////////////////////////
//
// wiz_setup::slot_Work
//
///////////////////////////////////////
-void wiz_setup::slot_Work( const QString& pageTitle )
+void wiz_setup::slot_Work( const TQString& pageTitle )
{
/* Don't let 'em past the license */
if( pageTitle == title( Page6 ) )
@@ -263,7 +263,7 @@ void wiz_setup::setupPGN( void )
void wiz_setup::setupServers( void )
{
serverResource *newServer;
- QStringList names, urls, ports;
+ TQStringList names, urls, ports;
unsigned int loop;
names << i18n("Free Internet Chess Server") << i18n("Internet Chess Club") << i18n("Global Chess Server") << i18n("Chess.Net");
@@ -282,9 +282,9 @@ void wiz_setup::setupServers( void )
newServer->Name = names[loop];
newServer->URL = urls[loop];
newServer->Port = ports[loop].toInt();
- newServer->LogFile = QString::null;
- newServer->UserName = QString::null;
- newServer->Password = QString::null;
+ newServer->LogFile = TQString();
+ newServer->UserName = TQString();
+ newServer->Password = TQString();
newServer->StorePass = FALSE;
if( !loop ) newServer->CurrentRef = TRUE;
else newServer->CurrentRef = FALSE;
@@ -300,7 +300,7 @@ void wiz_setup::setupServers( void )
void wiz_setup::findEngines( void )
{
engineResource *newEngine;
- QStringList names, filenames;
+ TQStringList names, filenames;
KProcess *Shell;
bool foundOne( FALSE );
unsigned int loop;
@@ -322,8 +322,8 @@ void wiz_setup::findEngines( void )
newEngine = new engineResource;
newEngine->Name = names[loop];
newEngine->Filename = filenames[loop];
- newEngine->Arguments = QString::null;
- newEngine->LogFile = QString::null;
+ newEngine->Arguments = TQString();
+ newEngine->LogFile = TQString();
newEngine->Protocol = XBoard;
newEngine->Wins = 0;
newEngine->Losses = 0;