summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/services/smsclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/sms/services/smsclient.cpp')
-rw-r--r--kopete/protocols/sms/services/smsclient.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kopete/protocols/sms/services/smsclient.cpp b/kopete/protocols/sms/services/smsclient.cpp
index 96c04818..17a27066 100644
--- a/kopete/protocols/sms/services/smsclient.cpp
+++ b/kopete/protocols/sms/services/smsclient.cpp
@@ -14,8 +14,8 @@
*************************************************************************
*/
-#include <qcombobox.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -41,12 +41,12 @@ SMSClient::~SMSClient()
{
}
-void SMSClient::setWidgetContainer(QWidget* parent, QGridLayout* layout)
+void SMSClient::setWidgetContainer(TQWidget* parent, TQGridLayout* layout)
{
kdWarning( 14160 ) << k_funcinfo << "ml: " << layout << ", " << "mp: " << parent << endl;
m_parent = parent;
m_layout = layout;
- QWidget *configWidget = configureWidget(parent);
+ TQWidget *configWidget = configureWidget(parent);
layout->addMultiCellWidget(configWidget, 0, 1, 0, 1);
configWidget->show();
}
@@ -59,7 +59,7 @@ void SMSClient::send(const Kopete::Message& msg)
m_msg = msg;
KConfigGroup* c = m_account->configGroup();
- QString provider = c->readEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName"), QString::null);
+ TQString provider = c->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName"), TQString::null);
if (provider.isNull())
{
@@ -67,27 +67,27 @@ void SMSClient::send(const Kopete::Message& msg)
return;
}
- QString programName = c->readEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"). QString::null);
+ TQString programName = c->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"). TQString::null);
if (programName.isNull())
programName = "/usr/bin/sms_client";
KProcess* p = new KProcess;
- QString message = msg.plainBody();
- QString nr = msg.to().first()->contactId();
+ TQString message = msg.plainBody();
+ TQString nr = msg.to().first()->contactId();
*p << programName;
*p << provider + ":" + nr;
*p << message;
- QObject::connect(p, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendFinished(KProcess*)));
- QObject::connect(p, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
- QObject::connect(p, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ TQObject::connect(p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess*)));
+ TQObject::connect(p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
+ TQObject::connect(p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int)));
p->start(KProcess::Block, KProcess::AllOutput);
}
-QWidget* SMSClient::configureWidget(QWidget* parent)
+TQWidget* SMSClient::configureWidget(TQWidget* parent)
{
kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero!!)" << endl;
@@ -95,17 +95,17 @@ QWidget* SMSClient::configureWidget(QWidget* parent)
prefWidget = new SMSClientPrefsUI(parent);
prefWidget->configDir->setMode(KFile::Directory);
- QString configDir;
+ TQString configDir;
if (m_account)
- configDir = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ConfigDir"), QString::null);
+ configDir = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ConfigDir"), TQString::null);
if (configDir.isNull())
configDir = "/etc/sms";
prefWidget->configDir->setURL(configDir);
- QString programName;
+ TQString programName;
if (m_account)
- programName = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"),
- QString::null);
+ programName = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"),
+ TQString::null);
if (programName.isNull())
programName = "/usr/bin/sms_client";
prefWidget->program->setURL(programName);
@@ -114,7 +114,7 @@ QWidget* SMSClient::configureWidget(QWidget* parent)
if (m_account)
{
- QString pName = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName"));
+ TQString pName = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName"));
for (int i=0; i < prefWidget->provider->count(); i++)
{
if (prefWidget->provider->text(i) == pName)
@@ -136,27 +136,27 @@ void SMSClient::savePreferences()
{
KConfigGroup* c = m_account->configGroup();
- c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"), prefWidget->program->url());
- c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ConfigDir"), prefWidget->configDir->url());
- c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName"), prefWidget->provider->currentText());
+ c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"), prefWidget->program->url());
+ c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ConfigDir"), prefWidget->configDir->url());
+ c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName"), prefWidget->provider->currentText());
}
}
-QStringList SMSClient::providers()
+TQStringList SMSClient::providers()
{
- QStringList p;
+ TQStringList p;
- QDir d;
- d.setPath(QString("%1/services/").arg(prefWidget->configDir->url()));
- p += d.entryList("*", QDir::Files);
+ TQDir d;
+ d.setPath(TQString("%1/services/").arg(prefWidget->configDir->url()));
+ p += d.entryList("*", TQDir::Files);
return p;
}
void SMSClient::slotReceivedOutput(KProcess*, char *buffer, int buflen)
{
- QStringList lines = QStringList::split("\n", QString::fromLocal8Bit(buffer, buflen));
- for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split("\n", TQString::fromLocal8Bit(buffer, buflen));
+ for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
output.append(*it);
}
@@ -173,9 +173,9 @@ int SMSClient::maxSize()
return 160;
}
-const QString& SMSClient::description()
+const TQString& SMSClient::description()
{
- QString url = "http://www.smsclient.org";
+ TQString url = "http://www.smsclient.org";
m_description = i18n("<qt>SMSClient is a program for sending SMS with the modem. The program can be found on <a href=\"%1\">%1</a></qt>").arg(url).arg(url);
return m_description;
}