summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/services/gsmlib.cpp
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/gsmlib.cpp
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/gsmlib.cpp')
-rw-r--r--kopete/protocols/sms/services/gsmlib.cpp72
1 files changed, 36 insertions, 36 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;
}