summaryrefslogtreecommitdiffstats
path: root/kmobile/devices
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kmobile/devices
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmobile/devices')
-rw-r--r--kmobile/devices/gnokii/gnokii_mobile.cpp118
-rw-r--r--kmobile/devices/gnokii/gnokii_mobile.h26
-rw-r--r--kmobile/devices/gnokii/gnokiiconfig.cpp30
-rw-r--r--kmobile/devices/gnokii/gnokiiconfig.h10
-rw-r--r--kmobile/devices/skeleton/skeleton.cpp30
-rw-r--r--kmobile/devices/skeleton/skeleton.h18
6 files changed, 116 insertions, 116 deletions
diff --git a/kmobile/devices/gnokii/gnokii_mobile.cpp b/kmobile/devices/gnokii/gnokii_mobile.cpp
index 871442847..7061493ac 100644
--- a/kmobile/devices/gnokii/gnokii_mobile.cpp
+++ b/kmobile/devices/gnokii/gnokii_mobile.cpp
@@ -21,9 +21,9 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
#include <klibloader.h>
#include <kconfig.h>
@@ -48,7 +48,7 @@
#define GNOKII_CHECK_ERROR(error) \
do { \
if (error) \
- PRINT_DEBUG << QString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\
+ PRINT_DEBUG << TQString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\
} while (0)
@@ -56,8 +56,8 @@
K_EXPORT_COMPONENT_FACTORY( libkmobile_gnokii, KMobileGnokii() )
/* createObject needs to be reimplemented by every KMobileDevice driver */
-QObject *KMobileGnokii::createObject( QObject *parent, const char *name,
- const char *, const QStringList &args )
+TQObject *KMobileGnokii::createObject( TQObject *parent, const char *name,
+ const char *, const TQStringList &args )
{
return new KMobileGnokii( parent, name, args );
}
@@ -66,7 +66,7 @@ QObject *KMobileGnokii::createObject( QObject *parent, const char *name,
static char *BinDir;
static char *lockfile = NULL;
static char model[GN_MODEL_MAX_LENGTH+1], revision[GN_REVISION_MAX_LENGTH+1], imei[GN_IMEI_MAX_LENGTH+1];
-static QString PhoneProductId;
+static TQString PhoneProductId;
static gn_statemachine state;
static gn_data data;
@@ -77,7 +77,7 @@ static gn_calnote_list calnote_list;
* The KDE gnokii mobile device driver.
*/
-KMobileGnokii::KMobileGnokii(QObject *obj, const char *name, const QStringList &args )
+KMobileGnokii::KMobileGnokii(TQObject *obj, const char *name, const TQStringList &args )
: KMobileDevice(obj, name, args)
{
// set initial device info
@@ -103,7 +103,7 @@ KMobileGnokii::KMobileGnokii(QObject *obj, const char *name, const QStringList &
m_baud = "9600";
}
- PRINT_DEBUG << QString("Using GNOKII configuration: %1 %2 %3 %4\n").arg(m_modelnr)
+ PRINT_DEBUG << TQString("Using GNOKII configuration: %1 %2 %3 %4\n").arg(m_modelnr)
.arg(m_connection).arg(m_port).arg(m_baud);
saveDeviceConfiguration();
@@ -119,7 +119,7 @@ KMobileGnokii::~KMobileGnokii()
* GNOKII lowlevel interface
******************************************************************************************/
-static gn_connection_type connectionToValue( QString connectionName )
+static gn_connection_type connectionToValue( TQString connectionName )
{
if (connectionName == "serial")
return GN_CT_Serial;
@@ -154,7 +154,7 @@ bool KMobileGnokii::setGnokiiStateMachine()
return true;
}
-bool KMobileGnokii::saveConfig( KConfig &conf, QString group )
+bool KMobileGnokii::saveConfig( KConfig &conf, TQString group )
{
conf.setGroup(group);
conf.writeEntry("model", m_modelnr );
@@ -170,7 +170,7 @@ bool KMobileGnokii::saveConfig( KConfig &conf, QString group )
return true;
}
-bool KMobileGnokii::loadConfig( KConfig &conf, QString group )
+bool KMobileGnokii::loadConfig( KConfig &conf, TQString group )
{
conf.setGroup(group);
m_modelnr = conf.readEntry("model", m_modelnr );
@@ -182,13 +182,13 @@ bool KMobileGnokii::loadConfig( KConfig &conf, QString group )
bool KMobileGnokii::saveGnokiiConfiguration()
{
- KConfig conf( QDir::homeDirPath() + "/.gnokiirc", false, false, "" );
+ KConfig conf( TQDir::homeDirPath() + "/.gnokiirc", false, false, "" );
return saveConfig( conf, "global" );
}
bool KMobileGnokii::loadGnokiiConfiguration()
{
- KConfig conf( QDir::homeDirPath() + "/.gnokiirc", true, false, "" );
+ KConfig conf( TQDir::homeDirPath() + "/.gnokiirc", true, false, "" );
return loadConfig( conf, "global" );
}
@@ -209,7 +209,7 @@ static void busterminate(void)
if (lockfile) gn_device_unlock(lockfile);
}
-static QString businit(void)
+static TQString businit(void)
{
gn_error error;
char *aux;
@@ -264,12 +264,12 @@ static QString businit(void)
GNOKII_CHECK_ERROR(error);
data.imei = NULL;
- GNOKII_DEBUG( QString("Found mobile phone: Model: %1, Revision: %2, IMEI: %3\n")
+ GNOKII_DEBUG( TQString("Found mobile phone: Model: %1, Revision: %2, IMEI: %3\n")
.arg(model).arg(revision).arg(imei) );
- PhoneProductId = QString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei);
+ PhoneProductId = TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei);
- return QString::null;
+ return TQString::null;
}
@@ -298,7 +298,7 @@ static gn_error read_phone_memstat( gn_memory_type memtype, gn_memory_status *me
break;
}
}
- GNOKII_DEBUG( QString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n")
+ GNOKII_DEBUG( TQString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n")
.arg(memtype).arg(memstat->used).arg(memstat->free).arg(memstat->used+memstat->free) );
return error;
}
@@ -360,8 +360,8 @@ static int gn_error2kio_error( gn_error err )
static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memtype, KABC::Addressee *a )
{
gn_phonebook_entry entry;
- QStringList addrlist;
- QString s, country;
+ TQStringList addrlist;
+ TQString s, country;
KABC::Address *addr;
gn_error error;
@@ -372,21 +372,21 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
if (error != GN_ERR_NONE)
return error;
- GNOKII_DEBUG(QString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(index).arg(entry.name)
+ GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(index).arg(entry.name)
.arg(entry.number).arg(entry.location).arg(entry.caller_group).arg(entry.subentries_count));
// try to split Name into FamilyName and GivenName
- s = QString(entry.name).simplifyWhiteSpace();
+ s = TQString(entry.name).simplifyWhiteSpace();
a->setFormattedName(s);
if (s.find(',')!=-1) {
- addrlist = QStringList::split(',', s);
+ addrlist = TQStringList::split(',', s);
if (addrlist.count()==2) {
a->setFamilyName(addrlist[0].simplifyWhiteSpace());
a->setGivenName(addrlist[1].simplifyWhiteSpace());
} else
a->setGivenName(s);
} else {
- addrlist = QStringList::split(' ', s);
+ addrlist = TQStringList::split(' ', s);
if (addrlist.count()==2) {
a->setFamilyName(addrlist[1].simplifyWhiteSpace());
a->setGivenName(addrlist[0].simplifyWhiteSpace());
@@ -395,19 +395,19 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
}
a->insertCustom(APP, "X_GSM_CALLERGROUP", s.setNum(entry.caller_group));
- a->insertCustom(APP, "X_GSM_STORE_AT", QString("%1_%2").arg(GN_MT_ME).arg(entry.location));
+ a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1_%2").arg(GN_MT_ME).arg(entry.location));
// set ProductId
a->setProductId(PhoneProductId);
// evaluate timestamp (ignore timezone)
- QDateTime datetime;
+ TQDateTime datetime;
if (entry.date.year<1998)
- datetime = QDateTime::currentDateTime();
+ datetime = TQDateTime::currentDateTime();
else
- datetime = QDateTime( QDate(entry.date.year, entry.date.month, entry.date.day),
- QTime(entry.date.hour, entry.date.minute, entry.date.second) );
- GNOKII_DEBUG(QString(" date=%1\n").arg(datetime.toString()));
+ datetime = TQDateTime( TQDate(entry.date.year, entry.date.month, entry.date.day),
+ TQTime(entry.date.hour, entry.date.minute, entry.date.second) );
+ GNOKII_DEBUG(TQString(" date=%1\n").arg(datetime.toString()));
a->setRevision(datetime);
if (!entry.subentries_count)
@@ -416,8 +416,8 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
/* scan sub-entries */
if (entry.subentries_count)
for (int n=0; n<entry.subentries_count; n++) {
- QString s = QString(entry.subentries[n].data.number).simplifyWhiteSpace();
- GNOKII_DEBUG(QString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n")
+ TQString s = TQString(entry.subentries[n].data.number).simplifyWhiteSpace();
+ GNOKII_DEBUG(TQString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n")
.arg(n).arg(entry.subentries[n].entry_type)
.arg(entry.subentries[n].number_type).arg(s));
if (s.isEmpty())
@@ -430,7 +430,7 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
a->insertEmail(s);
break;
case GN_PHONEBOOK_ENTRY_Postal:
- addrlist = QStringList::split(',', s, true);
+ addrlist = TQStringList::split(',', s, true);
addr = new KABC::Address(KABC::Address::Work);
switch (addrlist.count()) {
case 4: addr->setStreet(addrlist[0].simplifyWhiteSpace());
@@ -477,7 +477,7 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
a->insertCategory(s);
break;
default:
- GNOKII_DEBUG(QString(" Not handled id=%1, entry=%2\n")
+ GNOKII_DEBUG(TQString(" Not handled id=%1, entry=%2\n")
.arg(entry.subentries[n].entry_type).arg(s));
break;
} // switch()
@@ -494,32 +494,32 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
// connect the device and ask user to turn device on (if necessary)
-bool KMobileGnokii::connectDevice(QWidget * /*parent*/)
+bool KMobileGnokii::connectDevice(TQWidget * /*parent*/)
{
if (connected())
return true;
- QString err = businit();
+ TQString err = businit();
m_connected = err.isEmpty();
- PRINT_DEBUG << QString("connectDevice() : %1\n").arg(m_connected ? "Ok" : err);
+ PRINT_DEBUG << TQString("connectDevice() : %1\n").arg(m_connected ? "Ok" : err);
return m_connected;
}
// disconnect the device and return true, if sucessful
-bool KMobileGnokii::disconnectDevice(QWidget * /*parent*/)
+bool KMobileGnokii::disconnectDevice(TQWidget * /*parent*/)
{
if (!connected())
return true;
busterminate();
m_connected = false;
- PRINT_DEBUG << QString("disconnectDevice() : %1\n").arg("done");
+ PRINT_DEBUG << TQString("disconnectDevice() : %1\n").arg("done");
return true;
}
// provice the own configuration dialog
-bool KMobileGnokii::configDialog(QWidget *parent)
+bool KMobileGnokii::configDialog(TQWidget *parent)
{
- QString model, connection, port, baud;
+ TQString model, connection, port, baud;
int ok = 0;
GnokiiConfig *dialog = new GnokiiConfig(parent);
if (dialog) {
@@ -528,7 +528,7 @@ bool KMobileGnokii::configDialog(QWidget *parent)
}
dialog->getValues(model, connection, port, baud);
delete dialog;
- if (ok == QDialog::Accepted) {
+ if (ok == TQDialog::Accepted) {
m_modelnr = model;
m_connection = connection;
m_port = port;
@@ -538,16 +538,16 @@ bool KMobileGnokii::configDialog(QWidget *parent)
return true;
}
-QString KMobileGnokii::iconFileName() const
+TQString KMobileGnokii::iconFileName() const
{
return "mobile_phone";
}
// return a unique ID, e.g. the IMEI number of phones, or a serial number
// this String is used to have a unique identification for syncronisation.
-QString KMobileGnokii::deviceUniqueID()
+TQString KMobileGnokii::deviceUniqueID()
{
- return QString("GNOKII-IMEI-%1").arg(QString::fromLocal8Bit(imei));
+ return TQString("GNOKII-IMEI-%1").arg(TQString::fromLocal8Bit(imei));
}
@@ -587,7 +587,7 @@ int KMobileGnokii::numAddresses()
int KMobileGnokii::readAddress( int index, KABC::Addressee &addr )
{
- PRINT_DEBUG << QString("############ GET ADDRESS #%1\n").arg(index);
+ PRINT_DEBUG << TQString("############ GET ADDRESS #%1\n").arg(index);
// index is zero-based, but in gnokii the first address starts at 1
if (index<0 || index>=numAddresses())
return KIO::ERR_DOES_NOT_EXIST;
@@ -619,7 +619,7 @@ int KMobileGnokii::storeAddress( int, const KABC::Addressee &, bool )
* Calendar support *
**********************************************************************************/
-static void QDateTime_2_timestamp( const QDateTime &qdt, gn_timestamp &ts )
+static void QDateTime_2_timestamp( const TQDateTime &qdt, gn_timestamp &ts )
{
ts.year = qdt.date().year();
ts.month = qdt.date().month();
@@ -630,10 +630,10 @@ static void QDateTime_2_timestamp( const QDateTime &qdt, gn_timestamp &ts )
ts.timezone = 0;
}
-static QDateTime timestamp_2_QDateTime( const gn_timestamp &ts )
+static TQDateTime timestamp_2_QDateTime( const gn_timestamp &ts )
{
- return QDateTime( QDate(ts.year, ts.month, ts.day),
- QTime(ts.hour, ts.minute, ts.second) );
+ return TQDateTime( TQDate(ts.year, ts.month, ts.day),
+ TQTime(ts.hour, ts.minute, ts.second) );
}
static void print_calnote( const gn_calnote &entry )
@@ -700,11 +700,11 @@ int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event )
print_calnote( entry );
- QDateTime dt_start = timestamp_2_QDateTime(entry.time);
- QDateTime dt_end = dt_start.addSecs( 60*60 ); // XXX: assume one hour
+ TQDateTime dt_start = timestamp_2_QDateTime(entry.time);
+ TQDateTime dt_end = dt_start.addSecs( 60*60 ); // XXX: assume one hour
event.setDtStart( dt_start );
event.setDtEnd( dt_end );
- event.setSummary( QString::fromUtf8(entry.text) );
+ event.setSummary( TQString::fromUtf8(entry.text) );
// type:
switch (entry.type) {
@@ -713,7 +713,7 @@ int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event )
break;
case GN_CALNOTE_CALL:
event.setCategories(i18n("PHONE CALL"));
- event.setDescription(QString::fromUtf8(entry.phone_number));
+ event.setDescription(TQString::fromUtf8(entry.phone_number));
break;
case GN_CALNOTE_BIRTHDAY:
event.setCategories(i18n("BIRTHDAY"));
@@ -727,7 +727,7 @@ int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event )
// alarm:
if (entry.alarm.enabled) {
- QDateTime at = timestamp_2_QDateTime(entry.alarm.timestamp);
+ TQDateTime at = timestamp_2_QDateTime(entry.alarm.timestamp);
if (at.isValid() && dt_start.isValid()) {
int seconds = abs(at.secsTo(dt_start));
seconds %= 60*60*24; /* max. 1 day in advance... */
@@ -805,7 +805,7 @@ int KMobileGnokii::storeCalendarEntry( int index, const KCal::Event &event )
QDateTime_2_timestamp( eventalarm->time(), entry.alarm.timestamp );
} else
if (eventalarm->hasStartOffset()) {
- QDateTime dt = event.dtStart();
+ TQDateTime dt = event.dtStart();
dt = dt.addSecs(-eventalarm->startOffset().asSeconds());
QDateTime_2_timestamp( dt, entry.alarm.timestamp );
}
@@ -858,13 +858,13 @@ int KMobileGnokii::numNotes()
return 100; /* we simulate one address */
}
-int KMobileGnokii::readNote( int index, QString &note )
+int KMobileGnokii::readNote( int index, TQString &note )
{
// index is zero-based, and we only have one simulated note
if (index<0 || index>=numNotes())
return KIO::ERR_DOES_NOT_EXIST;
- note = QString("NOTE #%1\n"
+ note = TQString("NOTE #%1\n"
"--------\n"
"This is a sample note #%2\n\n"
"DeviceClassName: %3\n"
diff --git a/kmobile/devices/gnokii/gnokii_mobile.h b/kmobile/devices/gnokii/gnokii_mobile.h
index fdc61e30e..6be2196a0 100644
--- a/kmobile/devices/gnokii/gnokii_mobile.h
+++ b/kmobile/devices/gnokii/gnokii_mobile.h
@@ -31,24 +31,24 @@ class KMobileGnokii : public KMobileDevice
{
Q_OBJECT
public:
- KMobileGnokii( QObject *obj=0, const char *name=0, const QStringList &args=QStringList() );
+ KMobileGnokii( TQObject *obj=0, const char *name=0, const TQStringList &args=TQStringList() );
~KMobileGnokii();
// createObject needs to be reimplemented by every KMobileDevice driver
- QObject *createObject( QObject *parent=0, const char *name=0,
- const char *classname="QObject", const QStringList &args=QStringList() );
+ TQObject *createObject( TQObject *parent=0, const char *name=0,
+ const char *classname="TQObject", const TQStringList &args=TQStringList() );
// connect, disconnect and current status
- bool connectDevice(QWidget *parent);
- bool disconnectDevice(QWidget *parent);
+ bool connectDevice(TQWidget *parent);
+ bool disconnectDevice(TQWidget *parent);
// provide a device-specific configure dialog
- bool configDialog(QWidget *parent);
+ bool configDialog(TQWidget *parent);
// filename and path to gnokii-icon
- QString iconFileName() const;
+ TQString iconFileName() const;
- QString deviceUniqueID();
+ TQString deviceUniqueID();
/*
* Addressbook / Phonebook support
@@ -68,23 +68,23 @@ public:
* Notes support
*/
int numNotes();
- int readNote( int index, QString &note );
+ int readNote( int index, TQString &note );
signals:
void connectionChanged( bool connected );
- void message( int msgLevel, const QString &msg );
+ void message( int msgLevel, const TQString &msg );
protected:
bool setGnokiiStateMachine();
- bool saveConfig( KConfig &conf, QString group );
- bool loadConfig( KConfig &conf, QString group );
+ bool saveConfig( KConfig &conf, TQString group );
+ bool loadConfig( KConfig &conf, TQString group );
bool saveGnokiiConfiguration();
bool loadGnokiiConfiguration();
bool saveDeviceConfiguration();
bool loadDeviceConfiguration();
private:
- QString m_modelnr, m_connection, m_port, m_baud;
+ TQString m_modelnr, m_connection, m_port, m_baud;
int m_numAddresses;
KABC::Addressee::List m_addrList;
diff --git a/kmobile/devices/gnokii/gnokiiconfig.cpp b/kmobile/devices/gnokii/gnokiiconfig.cpp
index 780dc23ce..07bc46f46 100644
--- a/kmobile/devices/gnokii/gnokiiconfig.cpp
+++ b/kmobile/devices/gnokii/gnokiiconfig.cpp
@@ -17,11 +17,11 @@
*/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qcombobox.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqcombobox.h>
#include "gnokiiconfigui.h"
#include "gnokiiconfig.h"
@@ -43,19 +43,19 @@
#define BAUDRATES "57600 38400 19200 14400 9600 4800 2400"
-GnokiiConfig::GnokiiConfig( QWidget* parent, const char* name, bool modal, WFlags fl )
+GnokiiConfig::GnokiiConfig( TQWidget* parent, const char* name, bool modal, WFlags fl )
: GnokiiConfigUI(parent, name, modal, fl)
{
- QStringList list = QStringList::split(" ", MODELS);
+ TQStringList list = TQStringList::split(" ", MODELS);
cb_Model->insertStringList(list);
- list = QStringList::split(" ", CONNECTIONS);
+ list = TQStringList::split(" ", CONNECTIONS);
cb_Connection->insertStringList(list);
- list = QStringList::split(" ", AVAILABLE_PORTS);
+ list = TQStringList::split(" ", AVAILABLE_PORTS);
cb_Port->insertStringList(list);
- list = QStringList::split(" ", BAUDRATES);
+ list = TQStringList::split(" ", BAUDRATES);
cb_Baud->insertStringList(list);
}
@@ -63,7 +63,7 @@ GnokiiConfig::~GnokiiConfig()
{
}
-void GnokiiConfig::setValues(const QString &model, const QString &connection, const QString &port, const QString &baud)
+void GnokiiConfig::setValues(const TQString &model, const TQString &connection, const TQString &port, const TQString &baud)
{
cb_Model->setCurrentText(model);
cb_Connection->setCurrentText(connection);
@@ -72,10 +72,10 @@ void GnokiiConfig::setValues(const QString &model, const QString &connection, co
slotCheckValues();
- connect( cb_Connection, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckValues(const QString &)) );
+ connect( cb_Connection, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotCheckValues(const TQString &)) );
}
-void GnokiiConfig::getValues(QString &model, QString &connection, QString &port, QString &baud) const
+void GnokiiConfig::getValues(TQString &model, TQString &connection, TQString &port, TQString &baud) const
{
model = cb_Model->currentText();
connection = cb_Connection->currentText();
@@ -83,9 +83,9 @@ void GnokiiConfig::getValues(QString &model, QString &connection, QString &port,
baud = cb_Baud->currentText();
}
-void GnokiiConfig::slotCheckValues(const QString &txt)
+void GnokiiConfig::slotCheckValues(const TQString &txt)
{
- bool disable_serial = (QString("infrared irda").find(txt,0,false)>=0);
+ bool disable_serial = (TQString("infrared irda").find(txt,0,false)>=0);
textLabelBaudRate->setDisabled(disable_serial);
cb_Baud->setDisabled(disable_serial);
}
diff --git a/kmobile/devices/gnokii/gnokiiconfig.h b/kmobile/devices/gnokii/gnokiiconfig.h
index 662386010..30f548bf3 100644
--- a/kmobile/devices/gnokii/gnokiiconfig.h
+++ b/kmobile/devices/gnokii/gnokiiconfig.h
@@ -19,7 +19,7 @@
#ifndef GNOKIICONFIG_H
#define GNOKIICONFIG_H
-#include <qobject.h>
+#include <tqobject.h>
#include <gnokiiconfigui.h>
@@ -27,15 +27,15 @@ class GnokiiConfig : public GnokiiConfigUI
{
Q_OBJECT
public:
- GnokiiConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ GnokiiConfig( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~GnokiiConfig();
- void setValues(const QString &model, const QString &connection, const QString &port, const QString &baud);
- void getValues(QString &model, QString &connection, QString &port, QString &baud) const;
+ void setValues(const TQString &model, const TQString &connection, const TQString &port, const TQString &baud);
+ void getValues(TQString &model, TQString &connection, TQString &port, TQString &baud) const;
private slots:
void slotCheckValues();
- void slotCheckValues(const QString &);
+ void slotCheckValues(const TQString &);
};
#endif
diff --git a/kmobile/devices/skeleton/skeleton.cpp b/kmobile/devices/skeleton/skeleton.cpp
index 122e2af20..e6b1d9c59 100644
--- a/kmobile/devices/skeleton/skeleton.cpp
+++ b/kmobile/devices/skeleton/skeleton.cpp
@@ -17,8 +17,8 @@
*/
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <klibloader.h>
#include <kstandarddirs.h>
@@ -35,8 +35,8 @@
K_EXPORT_COMPONENT_FACTORY( libkmobile_skeleton, KMobileSkeleton() )
/* createObject needs to be reimplemented by every KMobileDevice driver */
-QObject *KMobileSkeleton::createObject( QObject *parent, const char *name,
- const char *, const QStringList &args )
+TQObject *KMobileSkeleton::createObject( TQObject *parent, const char *name,
+ const char *, const TQStringList &args )
{
return new KMobileSkeleton( parent, name, args );
}
@@ -46,7 +46,7 @@ QObject *KMobileSkeleton::createObject( QObject *parent, const char *name,
* The KDE skeleton mobile device driver.
*/
-KMobileSkeleton::KMobileSkeleton(QObject *obj, const char *name, const QStringList &args )
+KMobileSkeleton::KMobileSkeleton(TQObject *obj, const char *name, const TQStringList &args )
: KMobileDevice(obj, name, args)
{
// set initial device info
@@ -61,7 +61,7 @@ KMobileSkeleton::~KMobileSkeleton()
}
// connect the device and ask user to turn device on (if necessary)
-bool KMobileSkeleton::connectDevice(QWidget *parent)
+bool KMobileSkeleton::connectDevice(TQWidget *parent)
{
if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parent,
i18n("Please turn on your %1 on now and press continue to proceed.").arg(m_deviceName),
@@ -73,7 +73,7 @@ bool KMobileSkeleton::connectDevice(QWidget *parent)
}
// disconnect the device and return true, if sucessful
-bool KMobileSkeleton::disconnectDevice(QWidget *)
+bool KMobileSkeleton::disconnectDevice(TQWidget *)
{
m_connected = true;
return true;
@@ -87,12 +87,12 @@ bool KMobileSkeleton::isReadOnly() const
// return a unique ID, e.g. the IMEI number of phones, or a serial number
// this String is used to have a unique identification for syncronisation.
-QString KMobileSkeleton::deviceUniqueID()
+TQString KMobileSkeleton::deviceUniqueID()
{
- return QString::fromLocal8Bit("SkElEtOn-123456789");
+ return TQString::fromLocal8Bit("SkElEtOn-123456789");
}
-QString KMobileSkeleton::iconFileName() const
+TQString KMobileSkeleton::iconFileName() const
{
return "mobile_unknown"; /* KMOBILE_ICON_UNKNOWN */
}
@@ -112,11 +112,11 @@ int KMobileSkeleton::readAddress( int index, KABC::Addressee &addr )
return KIO::ERR_DOES_NOT_EXIST;
// now build our own sample name
- addr.setFamilyName(QString("Meyer_%1").arg(index+1));
+ addr.setFamilyName(TQString("Meyer_%1").arg(index+1));
addr.setGivenName("Peter");
addr.setFormattedName("Peter "+addr.familyName());
addr.setNickName("PeterM");
- addr.setBirthday(QDateTime(QDate(1970,7,22)));
+ addr.setBirthday(TQDateTime(TQDate(1970,7,22)));
addr.setRole("KDE Software Developer");
addr.setOrganization("KDE.ORG");
addr.setNote("the best KDE developer ever");
@@ -125,7 +125,7 @@ int KMobileSkeleton::readAddress( int index, KABC::Addressee &addr )
addr.insertPhoneNumber(KABC::PhoneNumber("+49 6110 12345"));
// the Revision might be important for syncronisations
- addr.setRevision(QDateTime(QDate(2003,1,1)));
+ addr.setRevision(TQDateTime(TQDate(2003,1,1)));
return 0;
}
@@ -144,13 +144,13 @@ int KMobileSkeleton::numNotes()
return 100;
}
-int KMobileSkeleton::readNote( int index, QString &note )
+int KMobileSkeleton::readNote( int index, TQString &note )
{
// index is zero-based, and we only have one simulated note
if (index<0 || index>=numNotes())
return KIO::ERR_DOES_NOT_EXIST;
- note = QString("NOTE #%1\n"
+ note = TQString("NOTE #%1\n"
"--------\n"
"This is a sample note #%2\n\n"
"DeviceClassName: %3\n"
diff --git a/kmobile/devices/skeleton/skeleton.h b/kmobile/devices/skeleton/skeleton.h
index eb0d7db0b..de57947a3 100644
--- a/kmobile/devices/skeleton/skeleton.h
+++ b/kmobile/devices/skeleton/skeleton.h
@@ -30,25 +30,25 @@ class KMobileSkeleton : public KMobileDevice
{
Q_OBJECT
public:
- KMobileSkeleton( QObject *obj=0, const char *name=0, const QStringList &args=QStringList() );
+ KMobileSkeleton( TQObject *obj=0, const char *name=0, const TQStringList &args=TQStringList() );
~KMobileSkeleton();
// createObject needs to be reimplemented by every KMobileDevice driver
- QObject *createObject( QObject *parent=0, const char *name=0,
- const char *classname="QObject", const QStringList &args=QStringList() );
+ TQObject *createObject( TQObject *parent=0, const char *name=0,
+ const char *classname="TQObject", const TQStringList &args=TQStringList() );
// connect, disconnect and current status
- bool connectDevice(QWidget *parent);
- bool disconnectDevice(QWidget *parent);
+ bool connectDevice(TQWidget *parent);
+ bool disconnectDevice(TQWidget *parent);
// returns true, if this device is read-only (default: false)
bool isReadOnly() const;
// you may provide your own icon() implementation to display
// an appropriate Pixmap (e.g. a Palm Pilot or a Zaurus image).
- QString iconFileName() const;
+ TQString iconFileName() const;
- QString deviceUniqueID();
+ TQString deviceUniqueID();
/*
* Addressbook / Phonebook support
@@ -61,11 +61,11 @@ public:
* Notes support
*/
int numNotes();
- int readNote( int index, QString &note );
+ int readNote( int index, TQString &note );
signals:
void connectionChanged( bool connected );
- void message( int msgLevel, const QString &msg );
+ void message( int msgLevel, const TQString &msg );
};
#endif