summaryrefslogtreecommitdiffstats
path: root/src/modules/setup/setupwizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/setup/setupwizard.cpp')
-rw-r--r--src/modules/setup/setupwizard.cpp304
1 files changed, 152 insertions, 152 deletions
diff --git a/src/modules/setup/setupwizard.cpp b/src/modules/setup/setupwizard.cpp
index 5b8c1ff7..3d23a476 100644
--- a/src/modules/setup/setupwizard.cpp
+++ b/src/modules/setup/setupwizard.cpp
@@ -38,12 +38,12 @@ bool g_bFoundMirc;
#include "kvi_config.h"
#include <kvi_tal_textedit.h>
-#include <qmessagebox.h>
-#include <qdir.h>
-#include <qpushbutton.h>
-#include <qvalidator.h>
-#include <qtextcodec.h>
-#include <qlayout.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
+#include <tqvalidator.h>
+#include <tqtextcodec.h>
+#include <tqlayout.h>
#include "kvi_tal_hbox.h"
#ifdef COMPILE_ON_WINDOWS
@@ -56,18 +56,18 @@ bool g_bFoundMirc;
#endif
#ifdef COMPILE_USE_QT4
- #include <QDesktopWidget>
+ #include <TQDesktopWidget>
#endif
// libkvisetup.cpp
-extern QString g_szChoosenIncomingDirectory;
+extern TQString g_szChoosenIncomingDirectory;
//extern int g_iThemeToApply;
extern bool bNeedToApplyDefaults;
extern unsigned int uPort;
-extern QString szHost;
-extern QString szUrl;
-extern QString szMircServers;
-extern QString szMircIni;
+extern TQString szHost;
+extern TQString szUrl;
+extern TQString szMircServers;
+extern TQString szMircIni;
#ifdef COMPILE_ON_WINDOWS
#define KVI_LOCAL_KVIRC_SUBDIRECTORY_NAME "KVIrc"
@@ -76,11 +76,11 @@ extern QString szMircIni;
#endif
KviSetupPage::KviSetupPage(KviSetupWizard * w)
-: QWidget(w)
+: TQWidget(w)
{
- QGridLayout * g = new QGridLayout(this);
+ TQGridLayout * g = new TQGridLayout(this);
- //setBackgroundColor(QColor(255,0,0));
+ //setBackgroundColor(TQColor(255,0,0));
// we need this to set localized text on buttons (see QT doc/ KviTalWizard class)
w->KviTalWizard::backButton()->setText(__tr2qs("< &Back"));
@@ -89,12 +89,12 @@ KviSetupPage::KviSetupPage(KviSetupWizard * w)
w->KviTalWizard::cancelButton()->setText(__tr2qs("Cancel"));
//w->KviTalWizard::helpButton()->setText(__tr2qs("Help"));
- m_pPixmapLabel = new QLabel(this);
+ m_pPixmapLabel = new TQLabel(this);
g->addWidget(m_pPixmapLabel,0,0);
m_pPixmapLabel->setPixmap(*(w->m_pLabelPixmap));
m_pPixmapLabel->setFixedSize(w->m_pLabelPixmap->size());
- m_pPixmapLabel->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
+ m_pPixmapLabel->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel);
m_pPixmapLabel->setMargin(0);
g->setSpacing(8);
@@ -103,32 +103,32 @@ KviSetupPage::KviSetupPage(KviSetupWizard * w)
m_pVBox = new KviTalVBox(this);
m_pVBox->setSpacing(4);
m_pVBox->setMargin(0);
- //m_pVBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding));
- //m_pVBox->setBackgroundColor(QColor(0,80,0));
+ //m_pVBox->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding));
+ //m_pVBox->setBackgroundColor(TQColor(0,80,0));
//m_pVBox->setMaximumHeight(450);
g->addWidget(m_pVBox,0,1);
g->setColStretch(1,1);
- QLabel * l = new QLabel(m_pVBox);
- l->setAlignment(Qt::AlignAuto | Qt::AlignTop);
+ TQLabel * l = new TQLabel(m_pVBox);
+ l->tqsetAlignment(TQt::AlignAuto | TQt::AlignTop);
/*
- QString szHeader = "<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"margin:0px;padding:0px;\" width=\"100%\"><tr><td bgcolor=\"#303030\">" \
+ TQString szHeader = "<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"margin:0px;padding:0px;\" width=\"100%\"><tr><td bgcolor=\"#303030\">" \
"<h1><font color=\"#FFFFFF\">KVIrc " KVI_VERSION "</font></h1>" \
"</td></tr></table>";
*/
- QString szHeader = "<h1><font color=\"#FFFFFF\">&nbsp;KVIrc " KVI_VERSION "</font></h1>";
+ TQString szHeader = "<h1><font color=\"#FFFFFF\">&nbsp;KVIrc " KVI_VERSION "</font></h1>";
l->setText(szHeader);
- l->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
- l->setAlignment(Qt::AlignAuto | Qt::AlignVCenter);
+ l->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel);
+ l->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter);
l->setMargin(0);
- l->setBackgroundColor(QColor(48,48,48));
+ l->setBackgroundColor(TQColor(48,48,48));
- m_pTextLabel = new QLabel(m_pVBox);
+ m_pTextLabel = new TQLabel(m_pVBox);
#ifdef COMPILE_USE_QT4
m_pTextLabel->setWordWrap(true);
#endif
- m_pTextLabel->setAlignment(Qt::AlignJustify | Qt::AlignTop);
+ m_pTextLabel->tqsetAlignment(TQt::AlignJustify | TQt::AlignTop);
m_pVBox->setStretchFactor(m_pTextLabel,1);
}
@@ -143,16 +143,16 @@ KviSetupWizard::KviSetupWizard()
setModal(true);
g_bFoundMirc = false;
- QString szLabelText;
+ TQString szLabelText;
- QString szImagePath;
+ TQString szImagePath;
g_pApp->getGlobalKvircDirectory(szImagePath,KviApp::Pics,"kvi_setup_label.png");
- m_pLabelPixmap = new QPixmap(szImagePath);
+ m_pLabelPixmap = new TQPixmap(szImagePath);
if(m_pLabelPixmap->isNull())
{
delete m_pLabelPixmap;
- m_pLabelPixmap = new QPixmap(250,450);
+ m_pLabelPixmap = new TQPixmap(250,450);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -161,7 +161,7 @@ KviSetupWizard::KviSetupWizard()
m_pWelcome = new KviSetupPage(this);
// here we go...
- QString szText = __tr2qs("<p>" \
+ TQString szText = __tr2qs("<p>" \
"<h2>Welcome :)</h2>" \
"This is your first time running this version of KVIrc.<br>" \
"This wizard will guide you through the few steps " \
@@ -195,8 +195,8 @@ KviSetupWizard::KviSetupWizard()
KviTalTextEdit * ed = new KviTalTextEdit(m_pLicense->m_pVBox);
ed->setReadOnly(true);
ed->setWordWrap(KviTalTextEdit::NoWrap);
- QString szLicense;
- QString szLicensePath;
+ TQString szLicense;
+ TQString szLicensePath;
g_pApp->getGlobalKvircDirectory(szLicensePath,KviApp::License,"EULA");
if(!KviFileUtils::loadFile(szLicensePath,szLicense))
{
@@ -233,66 +233,66 @@ KviSetupWizard::KviSetupWizard()
addPage(m_pDirectory,__tr2qs("Application Folders"));
- QString tmp;
+ TQString tmp;
m_pDirButtonGroup = new KviTalVButtonGroup(__tr2qs("Store configuration in folder"),m_pDirectory->m_pVBox);
- m_pDirUsePrev = new QRadioButton(__tr2qs("Use settings folder from previous installation"),m_pDirButtonGroup);
- connect(m_pDirUsePrev,SIGNAL(clicked()),this,SLOT(oldDirClicked()));
+ m_pDirUsePrev = new TQRadioButton(__tr2qs("Use settings folder from previous installation"),m_pDirButtonGroup);
+ connect(m_pDirUsePrev,TQT_SIGNAL(clicked()),this,TQT_SLOT(oldDirClicked()));
m_pOldPathBox = new KviTalHBox(m_pDirButtonGroup);
- m_pOldDataPathEdit = new QLineEdit(m_pOldPathBox);
- connect(m_pOldDataPathEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(oldDataTextChanged ( const QString & )));
+ m_pOldDataPathEdit = new TQLineEdit(m_pOldPathBox);
+ connect(m_pOldDataPathEdit,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(oldDataTextChanged ( const TQString & )));
- QPushButton * pb = new QPushButton(__tr2qs("&Browse..."),m_pOldPathBox);
- connect(pb,SIGNAL(clicked()),this,SLOT(chooseOldDataPath()));
+ TQPushButton * pb = new TQPushButton(__tr2qs("&Browse..."),m_pOldPathBox);
+ connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseOldDataPath()));
m_pOldPathBox->setSpacing(3);
m_pOldPathBox->setStretchFactor(m_pOldDataPathEdit,1);
- m_pDirUseNew = new QRadioButton(__tr2qs("Use new settings folder"),m_pDirButtonGroup);
- connect(m_pDirUseNew,SIGNAL(clicked()),this,SLOT(newDirClicked()));
+ m_pDirUseNew = new TQRadioButton(__tr2qs("Use new settings folder"),m_pDirButtonGroup);
+ connect(m_pDirUseNew,TQT_SIGNAL(clicked()),this,TQT_SLOT(newDirClicked()));
- QLabel* l = new QLabel(m_pDirButtonGroup);
+ TQLabel* l = new TQLabel(m_pDirButtonGroup);
l->setText(__tr2qs("Settings folder:"));
m_pNewPathBox = new KviTalHBox(m_pDirButtonGroup);
- m_pDataPathEdit = new QLineEdit(m_pNewPathBox);
+ m_pDataPathEdit = new TQLineEdit(m_pNewPathBox);
- pb = new QPushButton(__tr2qs("&Browse..."),m_pNewPathBox);
- connect(pb,SIGNAL(clicked()),this,SLOT(chooseDataPath()));
+ pb = new TQPushButton(__tr2qs("&Browse..."),m_pNewPathBox);
+ connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseDataPath()));
m_pNewPathBox->setSpacing(3);
m_pNewPathBox->setStretchFactor(m_pDataPathEdit,1);
#ifdef COMPILE_ON_WINDOWS
- tmp = QTextCodec::codecForLocale()->toUnicode(getenv( "APPDATA" ));
+ tmp = TQTextCodec::codecForLocale()->toUnicode(getenv( "APPDATA" ));
if(tmp.isEmpty())
- tmp = QDir::homeDirPath();
+ tmp = TQDir::homeDirPath();
#else
- tmp = QDir::homeDirPath();
+ tmp = TQDir::homeDirPath();
#endif //COMPILE_ON_WINDOWS
- KviQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR);
+ KviTQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR);
tmp.append(KVI_LOCAL_KVIRC_SUBDIRECTORY_NAME);
KviFileUtils::adjustFilePath(tmp);
m_pDataPathEdit->setText(tmp);
- l = new QLabel(m_pDirButtonGroup);
+ l = new TQLabel(m_pDirButtonGroup);
l->setText(__tr2qs("Download files to folder:"));
m_pNewIncomingBox = new KviTalHBox(m_pDirButtonGroup);
- m_pIncomingPathEdit = new QLineEdit(m_pNewIncomingBox);
+ m_pIncomingPathEdit = new TQLineEdit(m_pNewIncomingBox);
- pb = new QPushButton(__tr2qs("&Browse..."),m_pNewIncomingBox);
- connect(pb,SIGNAL(clicked()),this,SLOT(chooseIncomingPath()));
+ pb = new TQPushButton(__tr2qs("&Browse..."),m_pNewIncomingBox);
+ connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseIncomingPath()));
m_pNewIncomingBox->setSpacing(3);
m_pNewIncomingBox->setStretchFactor(m_pIncomingPathEdit,1);
- tmp = QDir::homeDirPath();
- KviQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR);
+ tmp = TQDir::homeDirPath();
+ KviTQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR);
tmp.append(KVI_DEFAULT_INCOMING_SUBDIRECTORY_NAME);
KviFileUtils::adjustFilePath(tmp);
m_pIncomingPathEdit->setText(tmp);
@@ -301,21 +301,21 @@ KviSetupWizard::KviSetupWizard()
newDirClicked();
#ifdef COMPILE_ON_WINDOWS
- m_pDirMakePortable = new QRadioButton(__tr2qs("All settings in shared program folder (portable)")
+ m_pDirMakePortable = new TQRadioButton(__tr2qs("All settings in shared program folder (portable)")
,m_pDirButtonGroup);
#endif
// Pragma: Unused, takes only space.
- //m_pDirRestore = new QRadioButton(__tr2qs("Restore from backup archive"),m_pDirButtonGroup);
+ //m_pDirRestore = new TQRadioButton(__tr2qs("Restore from backup archive"),m_pDirButtonGroup);
//m_pDirRestore->setEnabled(FALSE);
- //l = new QLabel(m_pDirectory->m_pVBox,"<b> </b>");
+ //l = new TQLabel(m_pDirectory->m_pVBox,"<b> </b>");
//m_pDirectory->m_pVBox->setStretchFactor(m_pDirectory->m_pTextLabel,1);
setHelpEnabled(m_pDirectory,false);
- connect(m_pDataPathEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(newDataTextChanged ( const QString & )));
- connect(m_pIncomingPathEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(newIncomingTextChanged ( const QString & )));
+ connect(m_pDataPathEdit,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(newDataTextChanged ( const TQString & )));
+ connect(m_pIncomingPathEdit,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(newIncomingTextChanged ( const TQString & )));
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Identity
@@ -329,7 +329,7 @@ KviSetupWizard::KviSetupWizard()
"If in doubt, just enter the first nick that comes to mind. " \
"You will be able to change it later in the Identity properties, or with the /NICK command."));
- QString nick;
+ TQString nick;
char * nnn = kvi_getenv("USER");
if(nnn)nick = nnn;
else nick = "newbie";
@@ -337,18 +337,18 @@ KviSetupWizard::KviSetupWizard()
if(nick == "root")nick = "newbie";
//m_pIdentity->m_pVBox
//__tr2qs("Basic Properties")
- KviTalGroupBox * gbox = new KviTalGroupBox(1,Qt::Horizontal,QString(),m_pIdentity->m_pVBox);
+ KviTalGroupBox * gbox = new KviTalGroupBox(1,Qt::Horizontal,TQString(),m_pIdentity->m_pVBox);
m_pNickSelector = new KviStringSelector(gbox,__tr2qs("Nickname:"),&(KVI_OPTION_STRING(KviOption_stringNickname1)),true);
m_pNickSelector->setMinimumLabelWidth(120);
- QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*"),gbox);
+ TQValidator * v = new TQRegExpValidator(TQRegExp("[^-0-9 ][^ ]*"),TQT_TQOBJECT(gbox));
m_pNickSelector->setValidator(v);
- QString szOptionalCtcpUserInfo = __tr2qs("This field is optional and will appear as part of the CTCP USERINFO reply.");
- QString szCenterBegin("<center>");
- QString szCenterEnd("</center>");
- QString szTrailing = "<br><br>" + szOptionalCtcpUserInfo + szCenterEnd;
+ TQString szOptionalCtcpUserInfo = __tr2qs("This field is optional and will appear as part of the CTCP USERINFO reply.");
+ TQString szCenterBegin("<center>");
+ TQString szCenterEnd("</center>");
+ TQString szTrailing = "<br><br>" + szOptionalCtcpUserInfo + szCenterEnd;
gbox = new KviTalGroupBox(1,Qt::Horizontal,__tr2qs("Profile"),m_pIdentity->m_pVBox);
@@ -358,16 +358,16 @@ KviSetupWizard::KviSetupWizard()
KviTalHBox* hb = new KviTalHBox(gbox);
hb->setSpacing(4);
- l = new QLabel(__tr2qs("Age:"),hb);
+ l = new TQLabel(__tr2qs("Age:"),hb);
l->setMinimumWidth(120);
- m_pAgeCombo = new QComboBox(hb);
+ m_pAgeCombo = new TQComboBox(hb);
m_pAgeCombo->insertItem(__tr2qs("Unspecified"));
unsigned int i;
for(i=1;i<120;i++)
{
- QString tmp;
+ TQString tmp;
tmp.setNum(i);
m_pAgeCombo->insertItem(tmp);
}
@@ -384,18 +384,18 @@ KviSetupWizard::KviSetupWizard()
hb = new KviTalHBox(gbox);
hb->setSpacing(4);
- l = new QLabel(__tr2qs("Gender:"),hb);
+ l = new TQLabel(__tr2qs("Gender:"),hb);
l->setMinimumWidth(120);
- m_pGenderCombo = new QComboBox(hb);
+ m_pGenderCombo = new TQComboBox(hb);
m_pGenderCombo->insertItem(__tr2qs("Unspecified"));
m_pGenderCombo->insertItem(__tr2qs("Female"));
m_pGenderCombo->insertItem(__tr2qs("Male"));
- if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male"))
+ if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male"))
m_pGenderCombo->setCurrentItem(2);
- else if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female"))
+ else if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female"))
m_pGenderCombo->setCurrentItem(1);
else
m_pGenderCombo->setCurrentItem(0);
@@ -413,7 +413,7 @@ KviSetupWizard::KviSetupWizard()
addPage(m_pIdentity,__tr2qs("Identity"));
- //l = new QLabel(m_pIdentity->m_pVBox,"<b> </b>");
+ //l = new TQLabel(m_pIdentity->m_pVBox,"<b> </b>");
setHelpEnabled(m_pIdentity,false);
@@ -436,43 +436,43 @@ KviSetupWizard::KviSetupWizard()
KviTalVBox* pThemesVb = new KviTalVBox(pThemesHb);
- QString szThemeImagePath;
+ TQString szThemeImagePath;
g_pApp->getGlobalKvircDirectory(szThemeImagePath,KviApp::Pics,"kvi_setup_theme_hires.png");
- QPixmap* pHiResPixmap = new QPixmap(szThemeImagePath);
+ TQPixmap* pHiResPixmap = new TQPixmap(szThemeImagePath);
if(pHiResPixmap->isNull())
{
delete pHiResPixmap;
- pHiResPixmap= new QPixmap(250,200);
+ pHiResPixmap= new TQPixmap(250,200);
}
- QLabel* pPixmapLabelHiRes = new QLabel(pThemesVb);
+ TQLabel* pPixmapLabelHiRes = new TQLabel(pThemesVb);
pPixmapLabelHiRes->setPixmap(*pHiResPixmap);
pPixmapLabelHiRes->setFixedSize(pHiResPixmap->size());
- pPixmapLabelHiRes->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
+ pPixmapLabelHiRes->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel);
pPixmapLabelHiRes->setMargin(0);
- m_pThemeHiRes = new QRadioButton(__tr2qs("&Fancy Theme"),pThemesVb);
+ m_pThemeHiRes = new TQRadioButton(__tr2qs("&Fancy Theme"),pThemesVb);
pThemesVb = new KviTalVBox(pThemesHb);
g_pApp->getGlobalKvircDirectory(szThemeImagePath,KviApp::Pics,"kvi_setup_theme_lowres.png");
- QPixmap* pLowResPixmap = new QPixmap(szThemeImagePath);
+ TQPixmap* pLowResPixmap = new TQPixmap(szThemeImagePath);
if(pLowResPixmap->isNull())
{
delete pLowResPixmap;
- pLowResPixmap= new QPixmap(250,200);
+ pLowResPixmap= new TQPixmap(250,200);
}
- QLabel* pPixmapLabelLowRes = new QLabel(pThemesVb);
+ TQLabel* pPixmapLabelLowRes = new TQLabel(pThemesVb);
pPixmapLabelLowRes->setPixmap(*pLowResPixmap);
pPixmapLabelLowRes->setFixedSize(pLowResPixmap->size());
- pPixmapLabelLowRes->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
+ pPixmapLabelLowRes->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel);
pPixmapLabelLowRes->setMargin(0);
- m_pThemeLoRes = new QRadioButton(__tr2qs("&Minimalist Theme"),pThemesVb);
- m_pThemeNone = new QRadioButton(__tr2qs("&Don't apply any theme"),m_pThemeButtonGroup);
+ m_pThemeLoRes = new TQRadioButton(__tr2qs("&Minimalist Theme"),pThemesVb);
+ m_pThemeNone = new TQRadioButton(__tr2qs("&Don't apply any theme"),m_pThemeButtonGroup);
m_pThemeButtonGroup->insert(m_pThemeHiRes);
m_pThemeButtonGroup->insert(m_pThemeLoRes);
@@ -501,16 +501,16 @@ KviSetupWizard::KviSetupWizard()
addPage(m_pDesktopIntegration,__tr2qs("Desktop Integration"));
#ifdef COMPILE_ON_WINDOWS
- m_pCreateUrlHandlers = new QCheckBox(__tr2qs("Make KVIrc default IRC client"),m_pDesktopIntegration->m_pVBox);
+ m_pCreateUrlHandlers = new TQCheckBox(__tr2qs("Make KVIrc default IRC client"),m_pDesktopIntegration->m_pVBox);
m_pCreateUrlHandlers->setChecked(true);
#endif
#ifdef COMPILE_KDE_SUPPORT
- m_pCreateDesktopShortcut = new QCheckBox(__tr2qs("Create desktop shortcut"),m_pDesktopIntegration->m_pVBox);
+ m_pCreateDesktopShortcut = new TQCheckBox(__tr2qs("Create desktop shortcut"),m_pDesktopIntegration->m_pVBox);
m_pCreateDesktopShortcut->setChecked(true);
#endif
#ifdef COMPILE_ON_WINDOWS
- m_pUseMircServerList = new QRadioButton(__tr2qs("Import server list from mIRC"),m_pDesktopIntegration->m_pVBox);
+ m_pUseMircServerList = new TQRadioButton(__tr2qs("Import server list from mIRC"),m_pDesktopIntegration->m_pVBox);
m_pUseMircServerList->setEnabled(false);
#endif
@@ -527,9 +527,9 @@ KviSetupWizard::KviSetupWizard()
m_pServersButtonGroup = new KviTalVButtonGroup(__tr2qs("Choose a server to connect"),m_pServers->m_pVBox);
- m_pServersChooseFromList = new QRadioButton(__tr2qs("Choose from built-in server list"),m_pServersButtonGroup);
+ m_pServersChooseFromList = new TQRadioButton(__tr2qs("Choose from built-in server list"),m_pServersButtonGroup);
- m_pServersSpecifyManually = new QRadioButton(__tr2qs("Specify server manually"),m_pServersButtonGroup);
+ m_pServersSpecifyManually = new TQRadioButton(__tr2qs("Specify server manually"),m_pServersButtonGroup);
hb = new KviTalHBox(m_pServersButtonGroup);
m_uServerPort=6667;
@@ -537,13 +537,13 @@ KviSetupWizard::KviSetupWizard()
m_pServerPortSelector = new KviUIntSelector(hb,__tr2qs("Port:"),&m_uServerPort,1,65536,6667,true,false);
- m_pServersOpenIrcUrl = new QRadioButton(__tr2qs("Open irc:// or irc6:// URL"),m_pServersButtonGroup);
+ m_pServersOpenIrcUrl = new TQRadioButton(__tr2qs("Open irc:// or irc6:// URL"),m_pServersButtonGroup);
m_szServerUrl="irc://";
m_pServerUrlSelector = new KviStringSelector(m_pServersButtonGroup,__tr2qs("URL:"),&m_szServerUrl,true);
*/
/*
- m_pServersLoadConfig = new QRadioButton(__tr2qs("Use server config"),m_pServersButtonGroup);
+ m_pServersLoadConfig = new TQRadioButton(__tr2qs("Use server config"),m_pServersButtonGroup);
m_pServersLoadConfig->setEnabled(FALSE);
m_pServerConfigSelector = new KviFileSelector(m_pServersButtonGroup,__tr2qs("Config file:"),&m_szServerConfigFile,true);
m_pServerConfigSelector->setEnabled(FALSE);
@@ -557,7 +557,7 @@ KviSetupWizard::KviSetupWizard()
// Preconfigured values
#ifdef COMPILE_ON_WINDOWS
- QString szTmp;
+ TQString szTmp;
g_pApp->getGlobalKvircDirectory(szTmp,KviApp::Config,"preinstalled.kvc");
if(KviFileUtils::fileExists(szTmp))
{
@@ -588,21 +588,21 @@ KviSetupWizard::KviSetupWizard()
}
//mIRC import
- #define QUERY_BUFFER 2048
+ #define TQUERY_BUFFER 2048
char* buffer;
- DWORD len = QUERY_BUFFER;
+ DWORD len = TQUERY_BUFFER;
buffer = (char*)malloc(len*sizeof(char));
HKEY hKey;
- QString szMircDir;
+ TQString szMircDir;
if(RegOpenKeyEx(HKEY_CLASSES_ROOT,"ChatFile\\DefaultIcon",0,KEY_READ,&hKey) == ERROR_SUCCESS )
{
if( RegQueryValueEx( hKey,0,0,0,(LPBYTE)buffer,&len) == ERROR_SUCCESS)
{
- szMircDir = QString::fromLocal8Bit(buffer,len);
+ szMircDir = TQString::fromLocal8Bit(buffer,len);
szMircDir.remove('"');
- QString szMircFile = KviFileUtils::extractFileName(szMircDir);
+ TQString szMircFile = KviFileUtils::extractFileName(szMircDir);
szMircFile = szMircFile.left(szMircFile.length()-4); //cut off ".exe"
szMircDir = KviFileUtils::extractFilePath(szMircDir);
@@ -620,16 +620,16 @@ KviSetupWizard::KviSetupWizard()
{
g_bFoundMirc = true;
cfg.setGroup("mirc");
- m_pNickSelector->setText(cfg.readQStringEntry("nick",KVI_OPTION_STRING(KviOption_stringNickname1)));
- m_pRealNameSelector->setText(cfg.readQStringEntry("user",KVI_OPTION_STRING(KviOption_stringRealname)));
+ m_pNickSelector->setText(cfg.readTQStringEntry("nick",KVI_OPTION_STRING(KviOption_stringNickname1)));
+ m_pRealNameSelector->setText(cfg.readTQStringEntry("user",KVI_OPTION_STRING(KviOption_stringRealname)));
KVI_OPTION_STRING(KviOption_stringNickname2) =
- cfg.readQStringEntry("anick",KVI_OPTION_STRING(KviOption_stringNickname2));
+ cfg.readTQStringEntry("anick",KVI_OPTION_STRING(KviOption_stringNickname2));
KVI_OPTION_STRING(KviOption_stringUsername) =
- cfg.readQStringEntry("email",KVI_OPTION_STRING(KviOption_stringUsername)).section('@',0,0);
+ cfg.readTQStringEntry("email",KVI_OPTION_STRING(KviOption_stringUsername)).section('@',0,0);
if(cfg.hasGroup("files"))
{
- m_szMircServerIniFile = cfg.readQStringEntry("servers","servers.ini");
+ m_szMircServerIniFile = cfg.readTQStringEntry("servers","servers.ini");
m_szMircServerIniFile.prepend('/');
m_szMircServerIniFile.prepend(szMircDir);
if(KviFileUtils::fileExists(m_szMircServerIniFile))
@@ -657,10 +657,10 @@ KviSetupWizard::~KviSetupWizard()
delete m_pLabelPixmap;
}
-void KviSetupWizard::showEvent(QShowEvent *e)
+void KviSetupWizard::showEvent(TQShowEvent *e)
{
- int w = QApplication::desktop()->width();
- int h = QApplication::desktop()->height();
+ int w = TQApplication::desktop()->width();
+ int h = TQApplication::desktop()->height();
int ww = width();
int wh = height();
@@ -673,7 +673,7 @@ void KviSetupWizard::showEvent(QShowEvent *e)
if(ww < 770)ww = 770;
}
- //wh = sizeHint().height();
+ //wh = tqsizeHint().height();
setGeometry((w - ww) / 2,(h - wh) / 2,ww,wh);
@@ -694,17 +694,17 @@ void KviSetupWizard::oldDirClicked()
else setNextEnabled(m_pDirectory,true);
}
-void KviSetupWizard::oldDataTextChanged ( const QString & str)
+void KviSetupWizard::oldDataTextChanged ( const TQString & str)
{
setNextEnabled(m_pDirectory,!str.isEmpty());
}
-void KviSetupWizard::newDataTextChanged ( const QString & str)
+void KviSetupWizard::newDataTextChanged ( const TQString & str)
{
setNextEnabled(m_pDirectory,!str.isEmpty() && !m_pIncomingPathEdit->text().isEmpty());
}
-void KviSetupWizard::newIncomingTextChanged ( const QString & str)
+void KviSetupWizard::newIncomingTextChanged ( const TQString & str)
{
setNextEnabled(m_pDirectory,!str.isEmpty() && !m_pDataPathEdit->text().isEmpty());
}
@@ -724,21 +724,21 @@ void KviSetupWizard::newDirClicked()
}
void KviSetupWizard::chooseOldDataPath()
{
- QString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pDataPathEdit->text(),__tr2qs("Choose an Old Configuration Folder - KVIrc Setup"),0);
+ TQString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pDataPathEdit->text(),__tr2qs("Choose an Old Configuration Folder - KVIrc Setup"),0);
if(!szBuffer.isEmpty())
{
- KviQString::ensureLastCharIs(szBuffer,KVI_PATH_SEPARATOR_CHAR);
+ KviTQString::ensureLastCharIs(szBuffer,KVI_PATH_SEPARATOR_CHAR);
if(!g_pApp->checkLocalKvircDirectory(szBuffer))
{
if(
- QMessageBox::question(
+ TQMessageBox::question(
this,
__tr2qs("Do not overwrite folder? - KVIrc"),
- tr("A folder %1 seems to be not a valid KVIrc settings folder."
+ tqtr("A folder %1 seems to be not a valid KVIrc settings folder."
"Do you want to use it anyway?")
- .arg( szBuffer ),
+ .tqarg( szBuffer ),
__tr2qs("&Yes"), __tr2qs("&No"),
- QString::null, 0, 1 ) == 0
+ TQString(), 0, 1 ) == 0
) {
m_pOldDataPathEdit->setText(szBuffer);
}
@@ -750,18 +750,18 @@ void KviSetupWizard::chooseOldDataPath()
void KviSetupWizard::chooseDataPath()
{
- QString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pDataPathEdit->text(),__tr2qs("Choose a Configuration Folder - KVIrc Setup"),0);
+ TQString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pDataPathEdit->text(),__tr2qs("Choose a Configuration Folder - KVIrc Setup"),0);
if(!szBuffer.isEmpty())
{
- KviQString::ensureLastCharIs(szBuffer,KVI_PATH_SEPARATOR_CHAR);
+ KviTQString::ensureLastCharIs(szBuffer,KVI_PATH_SEPARATOR_CHAR);
m_pDataPathEdit->setText(szBuffer);
}
}
void KviSetupWizard::chooseIncomingPath()
{
- //QString szBuffer = QFileDialog::getExistingDirectory(m_pIncomingPathEdit->text(),0,0,__tr2qs("Choose the download folder"));
- QString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pIncomingPathEdit->text(),__tr2qs("Choose a Download Folder - KVIrc Setup"),0);
+ //TQString szBuffer = TQFileDialog::getExistingDirectory(m_pIncomingPathEdit->text(),0,0,__tr2qs("Choose the download folder"));
+ TQString szBuffer = KviTalFileDialog::getExistingDirectoryPath(m_pIncomingPathEdit->text(),__tr2qs("Choose a Download Folder - KVIrc Setup"),0);
if(!szBuffer.isEmpty())
{
m_pIncomingPathEdit->setText(szBuffer);
@@ -796,7 +796,7 @@ void KviSetupWizard::makeLink()
// Dig in the registry looking up the Desktop path
if(RegOpenKeyEx(HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
- 0,KEY_QUERY_VALUE,&hCU) == ERROR_SUCCESS)
+ 0,KEY_TQUERY_VALUE,&hCU) == ERROR_SUCCESS)
{
RegQueryValueEx(hCU,"Desktop",NULL,&lpType,
(unsigned char *)&szLink,&ulSize);
@@ -804,10 +804,10 @@ void KviSetupWizard::makeLink()
}
// Build our paths
- QString szLinkTarget = szLink;
+ TQString szLinkTarget = szLink;
szLinkTarget.append("\\kvirc.lnk");
- QString szKvircExec = g_pApp->m_szGlobalKvircDir;
+ TQString szKvircExec = g_pApp->m_szGlobalKvircDir;
szKvircExec.append("\\kvirc.exe");
// Trigger a horrible machinery
@@ -830,11 +830,11 @@ void KviSetupWizard::makeLink()
{
WORD wsz[MAX_PATH];
// Set the path to the shell link target.
- psl->SetPath(QTextCodec::codecForLocale()->fromUnicode(szKvircExec).data());
+ psl->SetPath(TQTextCodec::codecForLocale()->fromUnicode(szKvircExec).data());
// Set the description of the shell link.
psl->SetDescription("kvirc");
// Ensure string is ANSI.
- MultiByteToWideChar(CP_ACP,0,QTextCodec::codecForLocale()->fromUnicode(szLinkTarget).data(),-1,(LPWSTR)wsz,MAX_PATH);
+ MultiByteToWideChar(CP_ACP,0,TQTextCodec::codecForLocale()->fromUnicode(szLinkTarget).data(),-1,(LPWSTR)wsz,MAX_PATH);
// Save the link via the IPersistFile::Save method.
ppf->Save((LPCOLESTR)wsz,true);
ppf->Release();
@@ -846,13 +846,13 @@ void KviSetupWizard::makeLink()
#endif //COMPILE_ON_WINDOWS
#ifdef COMPILE_KDE_SUPPORT
- QString tmp = QDir::homeDirPath();
- KviQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR);
+ TQString tmp = TQDir::homeDirPath();
+ KviTQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR);
tmp.append("Desktop");
- KviQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR);
+ KviTQString::ensureLastCharIs(tmp,KVI_PATH_SEPARATOR_CHAR);
tmp.append("kvirc.desktop");
- QString contents = "[Desktop Entry]\n" \
+ TQString contents = "[Desktop Entry]\n" \
"GenericName=IRC Client\n" \
"Comment=Connect to Internet Relay Chat\n" \
"Exec=kvirc -m %u\n" \
@@ -871,7 +871,7 @@ void KviSetupWizard::makeLink()
void KviSetupWizard::setUrlHandlers()
{
#ifdef COMPILE_ON_WINDOWS
- QString szReg = "REGEDIT4\r\n" \
+ TQString szReg = "REGEDIT4\r\n" \
"\r\n" \
"[HKEY_CLASSES_ROOT\\irc]\r\n" \
"@=\"URL:IRC Protocol\"\r\n" \
@@ -909,37 +909,37 @@ void KviSetupWizard::setUrlHandlers()
"[HKEY_CLASSES_ROOT\\irc6\\shell\\open\\command]\r\n" \
"@=\"\\\"@KVIRCEXECUTABLE@\\\" %1\"\r\n";
- QString szKvircExec = g_pApp->m_szGlobalKvircDir;
+ TQString szKvircExec = g_pApp->m_szGlobalKvircDir;
szKvircExec.append("\\kvirc.exe");
- szKvircExec.replace("\\","\\\\");
+ szKvircExec.tqreplace("\\","\\\\");
- szReg.replace("@KVIRCEXECUTABLE@",QTextCodec::codecForLocale()->fromUnicode(szKvircExec));
+ szReg.tqreplace("@KVIRCEXECUTABLE@",TQTextCodec::codecForLocale()->fromUnicode(szKvircExec));
- QString szRegFile = g_pApp->m_szGlobalKvircDir;
+ TQString szRegFile = g_pApp->m_szGlobalKvircDir;
szRegFile.append("\\kvirc.reg");
KviFileUtils::writeFile(szRegFile,szReg,false);
- QString szCmd = "regedit /S \"";
+ TQString szCmd = "regedit /S \"";
szCmd += szRegFile;
szCmd += "\"";
- WinExec(QTextCodec::codecForLocale()->fromUnicode(szCmd).data(),SW_SHOW);
+ WinExec(TQTextCodec::codecForLocale()->fromUnicode(szCmd).data(),SW_SHOW);
#endif
}
void KviSetupWizard::reject()
{
- if(QMessageBox::warning(this,__tr2qs("Abort Setup - KVIrc Setup"),
+ if(TQMessageBox::warning(this,__tr2qs("Abort Setup - KVIrc Setup"),
__tr2qs("You have chosen to abort the setup.<br>KVIrc cannot run until you complete this procedure.<br><br>Do you really wish to abort?"),
- QMessageBox::Yes,QMessageBox::No|QMessageBox::Default|QMessageBox::Escape) != QMessageBox::Yes)return;
+ TQMessageBox::Yes,TQMessageBox::No|TQMessageBox::Default|TQMessageBox::Escape) != TQMessageBox::Yes)return;
KviTalWizard::reject();
}
void KviSetupWizard::accept()
{
- QString szDir;
+ TQString szDir;
if(m_pDirUsePrev->isOn())
{
@@ -957,7 +957,7 @@ void KviSetupWizard::accept()
#endif
KviFileUtils::adjustFilePath(szDir);
- KviQString::ensureLastCharIs(szDir,KVI_PATH_SEPARATOR_CHAR);
+ KviTQString::ensureLastCharIs(szDir,KVI_PATH_SEPARATOR_CHAR);
if(!KviFileUtils::directoryExists(szDir))
{
if(!KviFileUtils::makeDir(szDir))
@@ -1005,9 +1005,9 @@ void KviSetupWizard::accept()
#ifndef COMPILE_ON_WINDOWS
// Make local->global link
- QString localPath = QString("%1/global").arg(g_pApp->m_szLocalKvircDir);
- unlink(QTextCodec::codecForLocale()->fromUnicode(localPath).data());
- symlink(QTextCodec::codecForLocale()->fromUnicode(g_pApp->m_szGlobalKvircDir).data(),QTextCodec::codecForLocale()->fromUnicode(localPath).data());
+ TQString localPath = TQString("%1/global").tqarg(g_pApp->m_szLocalKvircDir);
+ unlink(TQTextCodec::codecForLocale()->fromUnicode(localPath).data());
+ symlink(TQTextCodec::codecForLocale()->fromUnicode(g_pApp->m_szGlobalKvircDir).data(),TQTextCodec::codecForLocale()->fromUnicode(localPath).data());
#endif
#ifdef COMPILE_KDE_SUPPORT
@@ -1042,17 +1042,17 @@ void KviSetupWizard::accept()
//m_pOtherInfoSelector->commit();
KVI_OPTION_STRING(KviOption_stringNickname1).stripWhiteSpace();
- KVI_OPTION_STRING(KviOption_stringNickname1).replace(" ","");
+ KVI_OPTION_STRING(KviOption_stringNickname1).tqreplace(" ","");
if(KVI_OPTION_STRING(KviOption_stringNickname1).length() > 32)
{
- QString tmp = KVI_OPTION_STRING(KviOption_stringNickname1).left(32);
+ TQString tmp = KVI_OPTION_STRING(KviOption_stringNickname1).left(32);
KVI_OPTION_STRING(KviOption_stringNickname1) = tmp;
}
if(KVI_OPTION_STRING(KviOption_stringNickname1).isEmpty())KVI_OPTION_STRING(KviOption_stringNickname1) = "newbie";
- QString szNickPart;
+ TQString szNickPart;
if(KVI_OPTION_STRING(KviOption_stringNickname1).length() < 31)
{
szNickPart = KVI_OPTION_STRING(KviOption_stringNickname1);
@@ -1060,7 +1060,7 @@ void KviSetupWizard::accept()
szNickPart = KVI_OPTION_STRING(KviOption_stringNickname1).left(30);
}
- QString alt = szNickPart;
+ TQString alt = szNickPart;
alt.prepend("|"); // <-- this is an erroneous nickname on IrcNet :/
alt.append("|");
if(!g_bFoundMirc)