summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/services
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/sms/services
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/sms/services')
-rw-r--r--kopete/protocols/sms/services/gsmlib.cpp72
-rw-r--r--kopete/protocols/sms/services/gsmlib.h46
-rw-r--r--kopete/protocols/sms/services/kopete_unix_serial.cpp6
-rw-r--r--kopete/protocols/sms/services/kopete_unix_serial.h6
-rw-r--r--kopete/protocols/sms/services/smsclient.cpp60
-rw-r--r--kopete/protocols/sms/services/smsclient.h16
-rw-r--r--kopete/protocols/sms/services/smssend.cpp68
-rw-r--r--kopete/protocols/sms/services/smssend.h22
-rw-r--r--kopete/protocols/sms/services/smssendprovider.cpp68
-rw-r--r--kopete/protocols/sms/services/smssendprovider.h36
10 files changed, 200 insertions, 200 deletions
diff --git a/kopete/protocols/sms/services/gsmlib.cpp b/kopete/protocols/sms/services/gsmlib.cpp
index e9b0542b..7f129473 100644
--- a/kopete/protocols/sms/services/gsmlib.cpp
+++ b/kopete/protocols/sms/services/gsmlib.cpp
@@ -15,13 +15,13 @@
#include "config.h"
#ifdef INCLUDE_SMSGSM
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qapplication.h>
-#include <qevent.h>
-#include <qmutex.h>
-#include <qthread.h>
-#include <qcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqapplication.h>
+#include <tqevent.h>
+#include <tqmutex.h>
+#include <tqthread.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -51,7 +51,7 @@
/////////////////////////////////////////////////////////////////////
#define GSMLIB_EVENT_ID 245
-GSMLibEvent::GSMLibEvent(SubType t) : QCustomEvent(QEvent::User+GSMLIB_EVENT_ID)
+GSMLibEvent::GSMLibEvent(SubType t) : TQCustomEvent(TQEvent::User+GSMLIB_EVENT_ID)
{
setSubType(t);
}
@@ -67,7 +67,7 @@ void GSMLibEvent::setSubType(GSMLibEvent::SubType t)
}
/////////////////////////////////////////////////////////////////////
-GSMLibThread::GSMLibThread(QString dev, GSMLib* parent)
+GSMLibThread::GSMLibThread(TQString dev, GSMLib* parent)
{
m_device = dev;
m_parent = parent;
@@ -100,7 +100,7 @@ void GSMLibThread::run()
delete m_MeTa;
m_MeTa = NULL;
- QApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::DISCONNECTED));
+ TQApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::DISCONNECTED));
kdDebug( 14160 ) << "GSMLibThread exited"<<endl;
}
@@ -115,9 +115,9 @@ void GSMLibThread::send(const Kopete::Message& msg)
else
{
GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT );
- e->Reason = QString("GSMLib: Not Connected");
+ e->Reason = TQString("GSMLib: Not Connected");
e->Message = msg;
- QApplication::postEvent(m_parent, e);
+ TQApplication::postEvent(m_parent, e);
}
}
@@ -144,7 +144,7 @@ bool GSMLibThread::doConnect()
m_MeTa->setSMSRoutingToTA(true, false, false, true);
m_MeTa->setEventHandler(this);
- QApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::CONNECTED));
+ TQApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::CONNECTED));
return true;
}
catch(gsmlib::GsmException &e)
@@ -225,7 +225,7 @@ void GSMLibThread::pollForMessages( )
e->Text = m.Message->userData().c_str();
e->Number = m.Message->address().toString().c_str();
- QApplication::postEvent(m_parent, e);
+ TQApplication::postEvent(m_parent, e);
}
m_newMessages.clear();
@@ -239,7 +239,7 @@ void GSMLibThread::pollForMessages( )
void GSMLibThread::sendMessageQueue()
{
- QMutexLocker _(&m_outMessagesMutex);
+ TQMutexLocker _(&m_outMessagesMutex);
if(m_outMessages.size() == 0 )
return;
@@ -252,18 +252,18 @@ void GSMLibThread::sendMessageQueue()
void GSMLibThread::sendMessage(const Kopete::Message& msg)
{
- QString reason;
+ TQString reason;
if (!m_MeTa)
{
GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT );
- e->Reason = QString("GSMLib: Not Connected");
+ e->Reason = TQString("GSMLib: Not Connected");
e->Message = msg;
- QApplication::postEvent(m_parent, e);
+ TQApplication::postEvent(m_parent, e);
}
- QString message = msg.plainBody();
- QString nr = msg.to().first()->contactId();
+ TQString message = msg.plainBody();
+ TQString nr = msg.to().first()->contactId();
// send SMS
try
@@ -275,14 +275,14 @@ void GSMLibThread::sendMessage(const Kopete::Message& msg)
GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_SENT );
e->Message = msg;
- QApplication::postEvent(m_parent, e);
+ TQApplication::postEvent(m_parent, e);
}
catch(gsmlib::GsmException &e)
{
GSMLibEvent* ev = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT );
- ev->Reason = QString("GSMLib: ") + e.what();
+ ev->Reason = TQString("GSMLib: ") + e.what();
ev->Message = msg;
- QApplication::postEvent(m_parent, ev);
+ TQApplication::postEvent(m_parent, ev);
}
}
@@ -308,7 +308,7 @@ void GSMLib::saveConfig()
{
KConfigGroup* c = m_account->configGroup();
- c->writeEntry(QString("%1:%2").arg("GSMLib").arg("Device"), m_device);
+ c->writeEntry(TQString("%1:%2").arg("GSMLib").arg("Device"), m_device);
}
}
@@ -317,11 +317,11 @@ void GSMLib::loadConfig()
m_device = "/dev/bluetooth/rfcomm0";
if( m_account != NULL )
{
- QString temp;
+ TQString temp;
KConfigGroup* c = m_account->configGroup();
- temp = c->readEntry(QString("%1:%2").arg("GSMLib").arg("Device"), QString::null);
- if( temp != QString::null )
+ temp = c->readEntry(TQString("%1:%2").arg("GSMLib").arg("Device"), TQString::null);
+ if( temp != TQString::null )
m_device = temp;
}
}
@@ -348,11 +348,11 @@ void GSMLib::disconnect()
}
-void GSMLib::setWidgetContainer(QWidget* parent, QGridLayout* layout)
+void GSMLib::setWidgetContainer(TQWidget* parent, TQGridLayout* layout)
{
m_parent = parent;
m_layout = layout;
- QWidget *configWidget = configureWidget(parent);
+ TQWidget *configWidget = configureWidget(parent);
layout->addMultiCellWidget(configWidget, 0, 1, 0, 1);
configWidget->show();
}
@@ -362,7 +362,7 @@ void GSMLib::send(const Kopete::Message& msg)
m_thread->send(msg);
}
-QWidget* GSMLib::configureWidget(QWidget* parent)
+TQWidget* GSMLib::configureWidget(TQWidget* parent)
{
if (prefWidget == 0L)
@@ -388,9 +388,9 @@ int GSMLib::maxSize()
return 160;
}
-void GSMLib::customEvent(QCustomEvent* e)
+void GSMLib::customEvent(TQCustomEvent* e)
{
- if( e->type() != QEvent::User+GSMLIB_EVENT_ID )
+ if( e->type() != TQEvent::User+GSMLIB_EVENT_ID )
return;
if( m_account == NULL )
@@ -415,8 +415,8 @@ void GSMLib::customEvent(QCustomEvent* e)
break;
case GSMLibEvent::NEW_MESSAGE:
{
- QString nr = ge->Number;
- QString text = ge->Text;
+ TQString nr = ge->Number;
+ TQString text = ge->Text;
// Locate a contact
SMSContact* contact = static_cast<SMSContact*>( m_account->contacts().find( nr ));
@@ -441,9 +441,9 @@ void GSMLib::customEvent(QCustomEvent* e)
-const QString& GSMLib::description()
+const TQString& GSMLib::description()
{
- QString url = "http://www.pxh.de/fs/gsmlib/";
+ TQString url = "http://www.pxh.de/fs/gsmlib/";
m_description = i18n("<qt>GSMLib is a library (and utilities) for sending SMS via a GSM device. The program can be found on <a href=\"%1\">%1</a></qt>").arg(url).arg(url);
return m_description;
}
diff --git a/kopete/protocols/sms/services/gsmlib.h b/kopete/protocols/sms/services/gsmlib.h
index fa9ef1d2..e4f7f8c8 100644
--- a/kopete/protocols/sms/services/gsmlib.h
+++ b/kopete/protocols/sms/services/gsmlib.h
@@ -30,12 +30,12 @@
#include "smsservice.h"
#include "kopetemessage.h"
-#include <qobject.h>
-#include <qevent.h>
-#include <qthread.h>
-#include <qmutex.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqevent.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
class GSMLibPrefsUI;
class SMSContact;
@@ -51,10 +51,10 @@ public:
~GSMLib();
void send(const Kopete::Message& msg);
- void setWidgetContainer(QWidget* parent, QGridLayout* container);
+ void setWidgetContainer(TQWidget* parent, TQGridLayout* container);
int maxSize();
- const QString& description();
+ const TQString& description();
public slots:
void savePreferences();
@@ -64,18 +64,18 @@ public slots:
//signals:
// void messageSent(const Kopete::Message &);
protected:
- virtual void customEvent(QCustomEvent* e);
+ virtual void customEvent(TQCustomEvent* e);
- QWidget* configureWidget(QWidget* parent);
+ TQWidget* configureWidget(TQWidget* parent);
void saveConfig();
void loadConfig();
GSMLibPrefsUI* prefWidget;
- QStringList output;
+ TQStringList output;
- QString m_device;
+ TQString m_device;
- QString m_description;
+ TQString m_description;
GSMLibThread* m_thread;
@@ -93,10 +93,10 @@ public:
SubType subType();
void setSubType(SubType t);
- QString Text;
- QString Number;
+ TQString Text;
+ TQString Number;
- QString Reason;
+ TQString Reason;
Kopete::Message Message;
protected:
@@ -104,10 +104,10 @@ protected:
};
/// Thread to deal with GsmLib's blocking
-class GSMLibThread : public QThread, gsmlib::GsmEvent
+class GSMLibThread : public TQThread, gsmlib::GsmEvent
{
public:
- GSMLibThread(QString dev, GSMLib* parent);
+ GSMLibThread(TQString dev, GSMLib* parent);
virtual ~GSMLibThread();
virtual void run();
@@ -122,7 +122,7 @@ protected:
void SMSReceptionIndication(std::string storeName, unsigned int index, SMSMessageType messageType);
GSMLib* m_parent;
- QString m_device;
+ TQString m_device;
gsmlib::MeTa* m_MeTa;
@@ -131,7 +131,7 @@ protected:
struct IncomingMessage
{
int Index;
- QString StoreName;
+ TQString StoreName;
gsmlib::SMSMessageRef Message;
GsmEvent::SMSMessageType Type;
@@ -139,12 +139,12 @@ protected:
{}
};
- typedef QValueList<IncomingMessage> MessageList;
+ typedef TQValueList<IncomingMessage> MessageList;
MessageList m_newMessages;
- typedef QValueList<Kopete::Message> KopeteMessageList;
+ typedef TQValueList<Kopete::Message> KopeteMessageList;
KopeteMessageList m_outMessages;
- QMutex m_outMessagesMutex;
+ TQMutex m_outMessagesMutex;
};
#endif
diff --git a/kopete/protocols/sms/services/kopete_unix_serial.cpp b/kopete/protocols/sms/services/kopete_unix_serial.cpp
index b694ab22..c40f831b 100644
--- a/kopete/protocols/sms/services/kopete_unix_serial.cpp
+++ b/kopete/protocols/sms/services/kopete_unix_serial.cpp
@@ -27,7 +27,7 @@
#include <cassert>
#include <assert.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include "kopete_unix_serial.h"
@@ -304,8 +304,8 @@ KopeteUnixSerialPort::KopeteUnixSerialPort(string device, speed_t lineSpeed,
if (s.find("OK") != string::npos ||
s.find("CABLE: GSM") != string::npos)
{
- _readNotifier = new QSocketNotifier(_fd, QSocketNotifier::Read);
- connect( _readNotifier, SIGNAL(activated(int)), this, SIGNAL(activated()));
+ _readNotifier = new TQSocketNotifier(_fd, TQSocketNotifier::Read);
+ connect( _readNotifier, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated()));
return; // found OK, return
}
}
diff --git a/kopete/protocols/sms/services/kopete_unix_serial.h b/kopete/protocols/sms/services/kopete_unix_serial.h
index 0248556b..beb0592a 100644
--- a/kopete/protocols/sms/services/kopete_unix_serial.h
+++ b/kopete/protocols/sms/services/kopete_unix_serial.h
@@ -24,13 +24,13 @@
#include <sys/types.h>
#include <termios.h>
-#include <qobject.h>
+#include <tqobject.h>
class QSocketNotifier;
namespace gsmlib
{
-class KopeteUnixSerialPort : public QObject, public Port
+class KopeteUnixSerialPort : public TQObject, public Port
{
Q_OBJECT;
@@ -39,7 +39,7 @@ protected:
int _oldChar; // character set by putBack() (-1 == none)
long int _timeoutVal; // timeout for getLine/readByte
- QSocketNotifier* _readNotifier;
+ TQSocketNotifier* _readNotifier;
// throw GsmException include UNIX errno
void throwModemException(std::string message) throw(GsmException);
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;
}
diff --git a/kopete/protocols/sms/services/smsclient.h b/kopete/protocols/sms/services/smsclient.h
index bc260228..1f8bfdce 100644
--- a/kopete/protocols/sms/services/smsclient.h
+++ b/kopete/protocols/sms/services/smsclient.h
@@ -20,8 +20,8 @@
#include "smsservice.h"
#include "kopetemessage.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class SMSClientPrefsUI;
class SMSContact;
@@ -36,10 +36,10 @@ public:
~SMSClient();
void send(const Kopete::Message& msg);
- void setWidgetContainer(QWidget* parent, QGridLayout* container);
+ void setWidgetContainer(TQWidget* parent, TQGridLayout* container);
int maxSize();
- const QString& description();
+ const TQString& description();
public slots:
void savePreferences();
@@ -51,15 +51,15 @@ signals:
void messageSent(const Kopete::Message &);
private:
- QWidget* configureWidget(QWidget* parent);
+ TQWidget* configureWidget(TQWidget* parent);
SMSClientPrefsUI* prefWidget;
- QStringList providers();
- QStringList output;
+ TQStringList providers();
+ TQStringList output;
Kopete::Message m_msg;
- QString m_description;
+ TQString m_description;
} ;
#endif //SMSCLIENT_H
diff --git a/kopete/protocols/sms/services/smssend.cpp b/kopete/protocols/sms/services/smssend.cpp
index f3ea258c..2e843dea 100644
--- a/kopete/protocols/sms/services/smssend.cpp
+++ b/kopete/protocols/sms/services/smssend.cpp
@@ -14,11 +14,11 @@
*************************************************************************
*/
-#include <qcombobox.h>
-#include <qvgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqcombobox.h>
+#include <tqvgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include <kconfigbase.h>
#include <klineedit.h>
@@ -50,7 +50,7 @@ SMSSend::~SMSSend()
void SMSSend::send(const Kopete::Message& msg)
{
kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl;
- QString provider = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null);
+ TQString provider = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null);
if (provider.length() < 1)
{
@@ -58,7 +58,7 @@ void SMSSend::send(const Kopete::Message& msg)
return;
}
- QString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null);
+ TQString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null);
if (prefix.isNull())
{
KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("No prefix set for SMSSend, please change it in the configuration dialog."), i18n("No Prefix"));
@@ -67,13 +67,13 @@ void SMSSend::send(const Kopete::Message& msg)
m_provider = new SMSSendProvider(provider, prefix, m_account, this);
- QObject::connect( m_provider, SIGNAL(messageSent(const Kopete::Message &)), this, SIGNAL(messageSent(const Kopete::Message &)));
- QObject::connect( m_provider, SIGNAL(messageNotSent(const Kopete::Message &, const QString &)), this, SIGNAL(messageNotSent(const Kopete::Message &, const QString &)));
+ TQObject::connect( m_provider, TQT_SIGNAL(messageSent(const Kopete::Message &)), this, TQT_SIGNAL(messageSent(const Kopete::Message &)));
+ TQObject::connect( m_provider, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &)), this, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &)));
m_provider->send(msg);
}
-void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout)
+void SMSSend::setWidgetContainer(TQWidget* parent, TQGridLayout* layout)
{
kdWarning( 14160 ) << k_funcinfo << "ml: " << layout << ", " << "mp: " << parent << endl;
m_parent = parent;
@@ -86,13 +86,13 @@ void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout)
prefWidget->program->setMode(KFile::Directory);
- QString prefix = QString::null;
+ TQString prefix = TQString::null;
if (m_account)
- prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null);
+ prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null);
if (prefix.isNull())
{
- QDir d("/usr/share/smssend");
+ TQDir d("/usr/share/smssend");
if (d.exists())
{
prefix = "/usr";
@@ -108,13 +108,13 @@ void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout)
}
}
- QObject::connect (prefWidget->program, SIGNAL(textChanged(const QString &)),
- this, SLOT(loadProviders(const QString&)));
+ TQObject::connect (prefWidget->program, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(loadProviders(const TQString&)));
prefWidget->program->setURL(prefix);
- QObject::connect(prefWidget->provider, SIGNAL(activated(const QString &)),
- this, SLOT(setOptions(const QString &)));
+ TQObject::connect(prefWidget->provider, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(setOptions(const TQString &)));
prefWidget->show();
}
@@ -129,38 +129,38 @@ void SMSSend::savePreferences()
}
}
-void SMSSend::loadProviders(const QString &prefix)
+void SMSSend::loadProviders(const TQString &prefix)
{
kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero)" << endl;
- QStringList p;
+ TQStringList p;
prefWidget->provider->clear();
- QDir d(prefix + "/share/smssend");
+ TQDir d(prefix + "/share/smssend");
if (!d.exists())
{
- setOptions(QString::null);
+ setOptions(TQString::null);
return;
}
p = d.entryList("*.sms");
- d = QDir::homeDirPath()+"/.smssend/";
+ d = TQDir::homeDirPath()+"/.smssend/";
- QStringList tmp(d.entryList("*.sms"));
+ TQStringList tmp(d.entryList("*.sms"));
- for (QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it)
+ for (TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it)
p.prepend(*it);
- for (QStringList::iterator it = p.begin(); it != p.end(); ++it)
+ for (TQStringList::iterator it = p.begin(); it != p.end(); ++it)
(*it).truncate((*it).length()-4);
prefWidget->provider->insertStringList(p);
bool found = false;
if (m_account)
- { QString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null);
+ { TQString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null);
for (int i=0; i < prefWidget->provider->count(); i++)
{
if (prefWidget->provider->text(i) == pName)
@@ -176,7 +176,7 @@ void SMSSend::loadProviders(const QString &prefix)
setOptions(prefWidget->provider->currentText());
}
-void SMSSend::setOptions(const QString& name)
+void SMSSend::setOptions(const TQString& name)
{
kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero!!)" << endl;
if(!prefWidget) return; // sanity check
@@ -195,9 +195,9 @@ void SMSSend::setOptions(const QString& name)
{
if (!m_provider->name(i).isNull())
{
- QLabel *l = new QLabel(m_parent);
+ TQLabel *l = new TQLabel(m_parent);
l->setText("&" + m_provider->name(i) + ":");
- QToolTip::add(l, m_provider->description(i));
+ TQToolTip::add(l, m_provider->description(i));
m_layout->addWidget(l, i+2, 0);
KLineEdit *e = new KLineEdit(m_parent);
e->setText(m_provider->value(i));
@@ -206,7 +206,7 @@ void SMSSend::setOptions(const QString& name)
labels.append(l);
l->setBuddy(e);
if(m_provider->isHidden(i))
- e->setEchoMode(QLineEdit::Password);
+ e->setEchoMode(TQLineEdit::Password);
e->show();
l->show();
}
@@ -222,10 +222,10 @@ int SMSSend::maxSize()
{
kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl;
- QString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null);
+ TQString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null);
if (pName.length() < 1)
return 160;
- QString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null);
+ TQString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null);
if (prefix.isNull())
prefix = "/usr";
// quick sanity check
@@ -234,9 +234,9 @@ int SMSSend::maxSize()
return m_provider->maxSize();
}
-const QString& SMSSend::description()
+const TQString& SMSSend::description()
{
- QString url = "http://zekiller.skytech.org/smssend_en.php";
+ TQString url = "http://zekiller.skytech.org/smssend_en.php";
m_description = i18n("<qt>SMSSend is a program for sending SMS through gateways on the web. It can be found on <a href=\"%1\">%2</a></qt>").arg(url).arg(url);
return m_description;
}
diff --git a/kopete/protocols/sms/services/smssend.h b/kopete/protocols/sms/services/smssend.h
index 556a21ea..2eefb014 100644
--- a/kopete/protocols/sms/services/smssend.h
+++ b/kopete/protocols/sms/services/smssend.h
@@ -17,9 +17,9 @@
#ifndef SMSSEND_H
#define SMSSEND_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qlabel.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqlabel.h>
#include <klineedit.h>
@@ -40,27 +40,27 @@ public:
virtual void setAccount(Kopete::Account* account);
void send(const Kopete::Message& msg);
- void setWidgetContainer(QWidget* parent, QGridLayout* container);
+ void setWidgetContainer(TQWidget* parent, TQGridLayout* container);
int maxSize();
- const QString& description();
+ const TQString& description();
public slots:
void savePreferences();
private slots:
- void setOptions(const QString& name);
- void loadProviders(const QString& prefix);
+ void setOptions(const TQString& name);
+ void loadProviders(const TQString& prefix);
//signals:
// void messageSent(const Kopete::Message&);
private:
- QGridLayout *settingsBoxLayout;
+ TQGridLayout *settingsBoxLayout;
SMSSendProvider* m_provider;
SMSSendPrefsUI* prefWidget;
- QPtrList<KLineEdit> args;
- QPtrList<QLabel> labels;
- QString m_description;
+ TQPtrList<KLineEdit> args;
+ TQPtrList<TQLabel> labels;
+ TQString m_description;
} ;
#endif //SMSSEND_H
diff --git a/kopete/protocols/sms/services/smssendprovider.cpp b/kopete/protocols/sms/services/smssendprovider.cpp
index 82827aab..5f0f37ee 100644
--- a/kopete/protocols/sms/services/smssendprovider.cpp
+++ b/kopete/protocols/sms/services/smssendprovider.cpp
@@ -14,9 +14,9 @@
*************************************************************************
*/
-#include <qvaluelist.h>
-#include <qlabel.h>
-#include <qfile.h>
+#include <tqvaluelist.h>
+#include <tqlabel.h>
+#include <tqfile.h>
#include <kconfigbase.h>
#include <kprocess.h>
@@ -32,8 +32,8 @@
#include "smsprotocol.h"
#include "smscontact.h"
-SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& prefixValue, Kopete::Account* account, QObject* parent, const char *name)
- : QObject( parent, name ), m_account(account)
+SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent, const char *name)
+ : TQObject( parent, name ), m_account(account)
{
kdWarning( 14160 ) << k_funcinfo << "this = " << this << ", m_account = " << m_account << " (should be ok if zero!!)" << endl;
@@ -44,14 +44,14 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
messagePos = -1;
telPos = -1;
- QString file = prefix + "/share/smssend/" + provider + ".sms";
- QFile f(file);
+ TQString file = prefix + "/share/smssend/" + provider + ".sms";
+ TQFile f(file);
if (f.open(IO_ReadOnly))
{
- QTextStream t(&f);
- QString group = QString("SMSSend-%1").arg(provider);
+ TQTextStream t(&f);
+ TQString group = TQString("SMSSend-%1").arg(provider);
bool exactNumberMatch = false;
- QStringList numberWords;
+ TQStringList numberWords;
numberWords.append("Tel");
numberWords.append("Number");
numberWords.append("number");
@@ -65,11 +65,11 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
while( !t.eof())
{
- QString s = t.readLine();
+ TQString s = t.readLine();
if( s[0] == '%')
{
- QStringList args = QStringList::split(':',s);
- QStringList options = QStringList::split(' ', args[0]);
+ TQStringList args = TQStringList::split(':',s);
+ TQStringList options = TQStringList::split(' ', args[0]);
names.append(options[0].replace(0,1,""));
@@ -87,8 +87,8 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
descriptions.append(args[1]);
if (m_account)
- values.append(m_account->configGroup()->readEntry(QString("%1:%2").arg(group).arg(names[names.count()-1]),
- QString::null));
+ values.append(m_account->configGroup()->readEntry(TQString("%1:%2").arg(group).arg(names[names.count()-1]),
+ TQString::null));
else
values.append("");
@@ -100,7 +100,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
{
if (options[i].contains("Size="))
{
- QString option = options[i];
+ TQString option = options[i];
option.replace(0,5,"");
m_maxSize = option.toInt();
}
@@ -109,7 +109,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
}
else if (!exactNumberMatch)
{
- for (QStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it)
+ for (TQStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it)
{
if (args[0].contains(*it))
{
@@ -147,20 +147,20 @@ void SMSSendProvider::setAccount(Kopete::Account *account)
m_account = account;
}
-const QString& SMSSendProvider::name(int i)
+const TQString& SMSSendProvider::name(int i)
{
if ( telPos == i || messagePos == i)
- return QString::null;
+ return TQString::null;
else
return names[i];
}
-const QString& SMSSendProvider::value(int i)
+const TQString& SMSSendProvider::value(int i)
{
return values[i];
}
-const QString& SMSSendProvider::description(int i)
+const TQString& SMSSendProvider::description(int i)
{
return descriptions[i];
}
@@ -170,12 +170,12 @@ const bool SMSSendProvider::isHidden(int i)
return isHiddens[i];
}
-void SMSSendProvider::save(QPtrList<KLineEdit>& args)
+void SMSSendProvider::save(TQPtrList<KLineEdit>& args)
{
kdDebug( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl;
if (!m_account) return; // prevent crash in worst case
- QString group = QString("SMSSend-%1").arg(provider);
+ TQString group = TQString("SMSSend-%1").arg(provider);
int namesI=0;
for (unsigned i=0; i < args.count(); i++)
@@ -194,7 +194,7 @@ void SMSSendProvider::save(QPtrList<KLineEdit>& args)
// kdDebug(14160) << k_funcinfo << "saving " << args.at(i) << " to " << names[namesI] << endl;
if (!args.at(i)->text().isEmpty())
{ values[namesI] = args.at(i)->text();
- m_account->configGroup()->writeEntry(QString("%1:%2").arg(group).arg(names[namesI]), values[namesI]);
+ m_account->configGroup()->writeEntry(TQString("%1:%2").arg(group).arg(names[namesI]), values[namesI]);
}
namesI++;
}
@@ -228,8 +228,8 @@ void SMSSendProvider::send(const Kopete::Message& msg)
m_msg = msg;
- QString message = msg.plainBody();
- QString nr = dynamic_cast<SMSContact *>(msg.to().first())->qualifiedNumber();
+ TQString message = msg.plainBody();
+ TQString nr = dynamic_cast<SMSContact *>(msg.to().first())->qualifiedNumber();
if (canSend = false)
return;
@@ -239,14 +239,14 @@ void SMSSendProvider::send(const Kopete::Message& msg)
KProcess* p = new KProcess;
- kdWarning( 14160 ) << "Executing " << QString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl;
+ kdWarning( 14160 ) << "Executing " << TQString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl;
- *p << QString("%1/bin/smssend").arg(prefix) << provider << values;
+ *p << TQString("%1/bin/smssend").arg(prefix) << provider << values;
output = "";
- connect( p, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendFinished(KProcess *)));
- connect( p, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int)));
-// connect( p, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int)));
+ connect( p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess *)));
+ connect( p, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int)));
+// connect( p, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int)));
p->start(KProcess::NotifyOnExit, KProcess::AllOutput);
}
@@ -257,15 +257,15 @@ void SMSSendProvider::slotSendFinished(KProcess *p)
if (p->exitStatus() == 0)
emit messageSent(m_msg);
else
- emit messageNotSent(m_msg, QString().setLatin1(output));
+ emit messageNotSent(m_msg, TQString().setLatin1(output));
p->deleteLater();
}
void SMSSendProvider::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)
for(int i = 0; i < buflen; i++)
output += buffer[i];
kdWarning( 14160 ) << k_funcinfo << " output now = " << output << endl;
diff --git a/kopete/protocols/sms/services/smssendprovider.h b/kopete/protocols/sms/services/smssendprovider.h
index 8560be15..bd046104 100644
--- a/kopete/protocols/sms/services/smssendprovider.h
+++ b/kopete/protocols/sms/services/smssendprovider.h
@@ -17,11 +17,11 @@
#ifndef SMSSENDPROVIDER_H
#define SMSSENDPROVIDER_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qlabel.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqlabel.h>
+#include <tqvaluelist.h>
#include <klineedit.h>
@@ -37,18 +37,18 @@ class SMSSendProvider : public QObject
{
Q_OBJECT
public:
- SMSSendProvider(const QString& providerName, const QString& prefixValue, Kopete::Account* account, QObject* parent = 0, const char* name = 0);
+ SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent = 0, const char* name = 0);
~SMSSendProvider();
void setAccount(Kopete::Account *account);
int count();
- const QString& name(int i);
- const QString& value(int i);
- const QString& description(int i);
+ const TQString& name(int i);
+ const TQString& value(int i);
+ const TQString& description(int i);
const bool isHidden(int i);
- void save(QPtrList<KLineEdit>& args);
+ void save(TQPtrList<KLineEdit>& args);
void send(const Kopete::Message& msg);
int maxSize();
@@ -56,18 +56,18 @@ private slots:
void slotReceivedOutput(KProcess*, char *buffer, int buflen);
void slotSendFinished(KProcess*);
private:
- QStringList names;
- QStringList descriptions;
- QStringList values;
- QValueList<bool> isHiddens;
+ TQStringList names;
+ TQStringList descriptions;
+ TQStringList values;
+ TQValueList<bool> isHiddens;
int messagePos;
int telPos;
int m_maxSize;
- QString provider;
- QString prefix;
- QCString output;
+ TQString provider;
+ TQString prefix;
+ TQCString output;
Kopete::Account* m_account;
@@ -76,7 +76,7 @@ private:
bool canSend;
signals:
void messageSent(const Kopete::Message& msg);
- void messageNotSent(const Kopete::Message& msg, const QString &error);
+ void messageNotSent(const Kopete::Message& msg, const TQString &error);
} ;
#endif //SMSSENDPROVIDER_H