summaryrefslogtreecommitdiffstats
path: root/src/modules/mircimport/libkvimircimport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/mircimport/libkvimircimport.cpp')
-rw-r--r--src/modules/mircimport/libkvimircimport.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/modules/mircimport/libkvimircimport.cpp b/src/modules/mircimport/libkvimircimport.cpp
index 4f3ac568..394dedf5 100644
--- a/src/modules/mircimport/libkvimircimport.cpp
+++ b/src/modules/mircimport/libkvimircimport.cpp
@@ -31,9 +31,9 @@
#include "kvi_qstring.h"
-#include <qmessagebox.h>
-#include <qdir.h>
-#include <qpushbutton.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
#include "kvi_tal_vbox.h"
KviMircServersIniImport * g_pMircServersIniImport = 0;
@@ -50,7 +50,7 @@ KviMircServersIniImport::~KviMircServersIniImport()
g_pMircServersIniImport = 0;
}
-int KviMircServersIniImport::doImport(const QString& filename)
+int KviMircServersIniImport::doImport(const TQString& filename)
{
KviConfig cfg(filename,KviConfig::Read,true);
int iCount = 0;
@@ -58,30 +58,30 @@ int KviMircServersIniImport::doImport(const QString& filename)
{
cfg.setGroup("servers");
int i = 0;
- QString key;
- QString entry;
+ TQString key;
+ TQString entry;
do {
- KviQString::sprintf(key,"n%d",i);
+ KviTQString::sprintf(key,"n%d",i);
entry = cfg.readEntry(key,"");
if(!entry.isEmpty())
{
- QString description;
- QString serv;
- QString port;
+ TQString description;
+ TQString serv;
+ TQString port;
kvi_u32_t uPort = 0;
// <description>SERVER:<server:port>GROUP:<network>
- int idx = KviQString::find(entry,"SERVER:");
+ int idx = KviTQString::tqfind(entry,"SERVER:");
if(idx != -1)
{
description = entry.left(idx);
entry.remove(0,idx + 7);
- idx = KviQString::find(entry,"GROUP:");
+ idx = KviTQString::tqfind(entry,"GROUP:");
if(idx != -1)
{
port = entry.left(idx);
entry.remove(0,idx + 6);
}
- idx = KviQString::find(port,':');
+ idx = KviTQString::tqfind(port,':');
if(idx != -1)
{
serv = port.left(idx);
@@ -108,9 +108,9 @@ int KviMircServersIniImport::doImport(const QString& filename)
}
} while(!entry.isEmpty());
} else {
- QString tmp;
- KviQString::sprintf(tmp,__tr2qs("%Q doesn't look like a servers.ini file.\nImport failed."),&filename);
- QMessageBox::warning(0,__tr2qs("Warning - KVIrc"),tmp);
+ TQString tmp;
+ KviTQString::sprintf(tmp,__tr2qs("%Q doesn't look like a servers.ini file.\nImport failed."),&filename);
+ TQMessageBox::warning(0,__tr2qs("Warning - KVIrc"),tmp);
}
return iCount;
}
@@ -118,7 +118,7 @@ int KviMircServersIniImport::doImport(const QString& filename)
void KviMircServersIniImport::start()
{
//KviStr buffer;
- QString buffer;
+ TQString buffer;
if(!KviFileDialog::askForOpenFileName(buffer,__tr("Choose a servers.ini file"),0,"*.ini",false,true))return;
doImport(buffer);
@@ -143,26 +143,26 @@ void KviMircServersIniImport::die()
KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(KviRemoteMircServersIniImport * f)
: KviTalWizard(0)
{
- QString capt = __tr2qs("Remote mIRC servers.ini Import Wizard");
+ TQString capt = __tr2qs("Remote mIRC servers.ini Import Wizard");
setCaption(capt);
m_pRequest = 0;
m_pFilter = f;
- QLabel * l = new QLabel(this);
+ TQLabel * l = new TQLabel(this);
l->setText(__tr2qs("<center><b>Welcome!</b><br><br>This wizard will guide you in the process of " \
"downloading a list of IRC servers. Please click \"<b>Next</b>\" to begin the operation.</center>"));
addPage(l,capt);
KviTalVBox * vb = new KviTalVBox(this);
- l = new QLabel(vb);
+ l = new TQLabel(vb);
l->setText(__tr2qs("<center>Here you can modify the URL that the list will be downloaded from. In most cases the default URL is acceptable.</center>"));
vb->setStretchFactor(l,1);
- m_pUrlEdit = new QLineEdit(vb);
+ m_pUrlEdit = new TQLineEdit(vb);
m_pUrlEdit->setText(KVI_WWWMIRCCOUK_SERVERSINI);
@@ -170,11 +170,11 @@ KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(KviRemoteMircSe
vb = new KviTalVBox(this);
- l = new QLabel(__tr2qs("Please wait while the list is being downloaded"),vb);
+ l = new TQLabel(__tr2qs("Please wait while the list is being downloaded"),vb);
vb->setStretchFactor(l,1);
- m_pOutput = new QLabel(vb);
- m_pOutput->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ m_pOutput = new TQLabel(vb);
+ m_pOutput->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
addPage(vb,__tr2qs("List Download"));
@@ -182,7 +182,7 @@ KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(KviRemoteMircSe
setNextEnabled(vb,false);
setFinishEnabled(vb,true);
- connect(this,SIGNAL(selected(const QString &)),this,SLOT(pageSelected(const QString &)));
+ connect(this,TQT_SIGNAL(selected(const TQString &)),this,TQT_SLOT(pageSelected(const TQString &)));
}
KviRemoteMircServerImportWizard::~KviRemoteMircServerImportWizard()
@@ -190,7 +190,7 @@ KviRemoteMircServerImportWizard::~KviRemoteMircServerImportWizard()
if(m_pRequest)delete m_pRequest;
}
-void KviRemoteMircServerImportWizard::pageSelected(const QString &title)
+void KviRemoteMircServerImportWizard::pageSelected(const TQString &title)
{
if(title == __tr2qs("List Download"))
{
@@ -198,7 +198,7 @@ void KviRemoteMircServerImportWizard::pageSelected(const QString &title)
}
}
-void KviRemoteMircServerImportWizard::closeEvent(QCloseEvent *)
+void KviRemoteMircServerImportWizard::closeEvent(TQCloseEvent *)
{
m_pFilter->die();
}
@@ -211,15 +211,15 @@ void KviRemoteMircServerImportWizard::done(int r)
void KviRemoteMircServerImportWizard::start()
{
- QString url = m_pUrlEdit->text();
+ TQString url = m_pUrlEdit->text();
if(url.isEmpty())url = KVI_WWWMIRCCOUK_SERVERSINI;
finishButton()->setEnabled(false);
if(m_pRequest)delete m_pRequest;
m_pRequest = new KviHttpRequest();
- connect(m_pRequest,SIGNAL(terminated(bool)),this,SLOT(getListTerminated(bool)));
- connect(m_pRequest,SIGNAL(status(const QString &)),this,SLOT(getListMessage(const QString &)));
+ connect(m_pRequest,TQT_SIGNAL(terminated(bool)),this,TQT_SLOT(getListTerminated(bool)));
+ connect(m_pRequest,TQT_SIGNAL(status(const TQString &)),this,TQT_SLOT(getListMessage(const TQString &)));
g_pApp->getTmpFileName(m_szTmpFileName,"servers.ini");
if(!m_pRequest->get(KviUrl(url),KviHttpRequest::StoreToFile,m_szTmpFileName))
@@ -231,7 +231,7 @@ void KviRemoteMircServerImportWizard::start()
}
}
-void KviRemoteMircServerImportWizard::getListMessage(const QString &message)
+void KviRemoteMircServerImportWizard::getListMessage(const TQString &message)
{
if(!message.isEmpty())m_pOutput->setText(message);
}
@@ -243,21 +243,21 @@ void KviRemoteMircServerImportWizard::getListTerminated(bool bSuccess)
if(bSuccess)
{
m_pOutput->setText(__tr2qs("File downloaded: processing ..."));
- m_pOutput->repaint();
+ m_pOutput->tqrepaint();
#ifndef COMPILE_ON_WINDOWS
g_pApp->syncX();
#endif //!COMPILE_ON_WINDOWS
int iCount = m_pFilter->doImport(m_szTmpFileName);
- QString tmp;
+ TQString tmp;
if(iCount > 0)
- tmp = __tr2qs("%1 servers imported succesfully").arg(iCount);
+ tmp = __tr2qs("%1 servers imported succesfully").tqarg(iCount);
else
tmp = __tr2qs("No servers imported");
m_pOutput->setText(tmp);
- QDir d;
+ TQDir d;
d.remove(m_szTmpFileName);
} else m_pOutput->setText(m_pRequest->lastError());
@@ -309,11 +309,11 @@ static KviModuleExtension * mircimport_remote_filter_alloc(KviModuleExtensionAll
static bool mircimport_module_init(KviModule * m)
{
- QString szPath;
- QPixmap * pix = 0;
+ TQString szPath;
+ TQPixmap * pix = 0;
if(g_pApp->findImage(szPath,"kvi_mircimport.png"))
{
- pix = new QPixmap(szPath);
+ pix = new TQPixmap(szPath);
if(pix->isNull())
{
delete pix;