summaryrefslogtreecommitdiffstats
path: root/kmobile
diff options
context:
space:
mode:
Diffstat (limited to 'kmobile')
-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
-rw-r--r--kmobile/kioslave/kio_mobile.cpp154
-rw-r--r--kmobile/kioslave/kio_mobile.h36
-rw-r--r--kmobile/kmobile.cpp94
-rw-r--r--kmobile/kmobile.h2
-rw-r--r--kmobile/kmobileclient.cpp124
-rw-r--r--kmobile/kmobileclient.h48
-rw-r--r--kmobile/kmobiledevice.cpp124
-rw-r--r--kmobile/kmobiledevice.h122
-rw-r--r--kmobile/kmobileiface.h44
-rw-r--r--kmobile/kmobileitem.cpp32
-rw-r--r--kmobile/kmobileitem.h22
-rw-r--r--kmobile/kmobileview.cpp122
-rw-r--r--kmobile/kmobileview.h56
-rw-r--r--kmobile/pref.cpp22
-rw-r--r--kmobile/pref.h6
-rw-r--r--kmobile/systemtray.cpp28
-rw-r--r--kmobile/systemtray.h6
-rw-r--r--kmobile/testlibkmobile.cpp24
24 files changed, 649 insertions, 649 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
diff --git a/kmobile/kioslave/kio_mobile.cpp b/kmobile/kioslave/kio_mobile.cpp
index ec987fb06..d32c11cb4 100644
--- a/kmobile/kioslave/kio_mobile.cpp
+++ b/kmobile/kioslave/kio_mobile.cpp
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <time.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -68,7 +68,7 @@ int kdemain(int argc, char **argv)
/**
* Initialize the mobile slave
*/
-KMobileProtocol::KMobileProtocol(const QCString &pool, const QCString &app)
+KMobileProtocol::KMobileProtocol(const TQCString &pool, const TQCString &app)
: SlaveBase( "mobile", pool, app)
{
}
@@ -80,14 +80,14 @@ KMobileProtocol::~KMobileProtocol()
/*
* getDeviceAndRessource("mobile:/<devicename>/<resource>/...") - split
*/
-int KMobileProtocol::getDeviceAndRessource(const QString &_path,
- QString &devName, QString &resource, QString &devPath,
+int KMobileProtocol::getDeviceAndRessource(const TQString &_path,
+ TQString &devName, TQString &resource, TQString &devPath,
KMobileDevice::Capabilities &devCaps)
{
-// PRINT_DEBUG << QString("###getDeviceAndRessource### %1\n").arg(_path);
- QStringList path = QStringList::split('/', _path, false);
+// PRINT_DEBUG << TQString("###getDeviceAndRessource### %1\n").arg(_path);
+ TQStringList path = TQStringList::split('/', _path, false);
- devName = resource = devPath = QString::null;
+ devName = resource = devPath = TQString::null;
devCaps = KMobileDevice::hasNothing;
if (path.count() >= 1) { devName = path[0]; path.pop_front(); };
@@ -108,7 +108,7 @@ int KMobileProtocol::getDeviceAndRessource(const QString &_path,
int cap = 1UL << i;
if ((_caps & cap) == 0)
continue;
- QString capname = m_dev.nameForCap(devName,cap);
+ TQString capname = m_dev.nameForCap(devName,cap);
if (capname != resource)
continue;
devCaps = (KMobileDevice::Capabilities) cap;
@@ -120,7 +120,7 @@ int KMobileProtocol::getDeviceAndRessource(const QString &_path,
static
-void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = QString::null)
+void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString::null)
{
KIO::UDSAtom atom;
atom.m_uds = ID;
@@ -130,7 +130,7 @@ void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = Q
}
static
-void createDirEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime)
+void createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime)
{
entry.clear();
addAtom(entry, KIO::UDS_NAME, 0, name);
@@ -140,13 +140,13 @@ void createDirEntry(KIO::UDSEntry& entry, const QString& name, const QString& ur
addAtom(entry, KIO::UDS_URL, 0, url);
addAtom(entry, KIO::UDS_USER, 0, getenv("USER"));
addAtom(entry, KIO::UDS_GROUP, 0, getenv("USER"));
- PRINT_DEBUG << QString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
+ PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
// addAtom(entry, KIO::UDS_SIZE, 0);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
}
static
-void createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime,
+void createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime,
const unsigned long size = 0)
{
entry.clear();
@@ -159,7 +159,7 @@ void createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& u
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
if (size) addAtom(entry, KIO::UDS_SIZE, size);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
- PRINT_DEBUG << QString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
+ PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
}
@@ -169,10 +169,10 @@ void createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& u
void KMobileProtocol::get(const KURL &url)
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << QString("get(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("get(%1)\n").arg(url.path());
KMobileDevice::Capabilities devCaps;
- QString devName, resource, devPath;
+ TQString devName, resource, devPath;
int err = getDeviceAndRessource(url.path(), devName, resource, devPath, devCaps);
if (err) {
@@ -186,8 +186,8 @@ void KMobileProtocol::get(const KURL &url)
}
// collect the result
- QCString result;
- QString mime;
+ TQCString result;
+ TQString mime;
switch (devCaps) {
case KMobileDevice::hasAddressBook: err = getVCard(devName, result, mime, devPath);
break;
@@ -213,13 +213,13 @@ void KMobileProtocol::get(const KURL &url)
totalSize(processed_size);
// tell the contents of the URL
- QByteArray array;
+ TQByteArray array;
array.setRawData( result.data(), result.length() );
data(array);
array.resetRawData( result.data(), result.length() );
processedSize( processed_size );
// tell we are finished
- data(QByteArray());
+ data(TQByteArray());
// tell we are finished
finished();
@@ -231,11 +231,11 @@ void KMobileProtocol::get(const KURL &url)
*/
void KMobileProtocol::listRoot(const KURL& url)
{
- PRINT_DEBUG << QString("########## listRoot(%1) for %2:/\n").arg(url.path()).arg(url.protocol());
+ PRINT_DEBUG << TQString("########## listRoot(%1) for %2:/\n").arg(url.path()).arg(url.protocol());
KIO::UDSEntry entry;
- QStringList deviceNames = m_dev.deviceNames();
+ TQStringList deviceNames = m_dev.deviceNames();
unsigned int dirs = deviceNames.count();
totalSize(dirs);
@@ -251,7 +251,7 @@ void KMobileProtocol::listRoot(const KURL& url)
for (unsigned int i=0; i<dirs; i++) {
- QString devName = deviceNames[i];
+ TQString devName = deviceNames[i];
if (classMask != KMobileDevice::Unclassified &&
m_dev.classType(devName) != classMask)
@@ -271,9 +271,9 @@ void KMobileProtocol::listRoot(const KURL& url)
/*
* folderMimeType() - returns mimetype of the folder itself
*/
-QString KMobileProtocol::folderMimeType(int cap)
+TQString KMobileProtocol::folderMimeType(int cap)
{
- QString mimetype;
+ TQString mimetype;
switch (cap) {
case KMobileDevice::hasAddressBook: mimetype = KMOBILE_MIMETYPE_INODE "addressbook";
break;
@@ -290,9 +290,9 @@ QString KMobileProtocol::folderMimeType(int cap)
/*
* entryMimeType() - returns mimetype of the entries in the given folder
*/
-QString KMobileProtocol::entryMimeType(int cap)
+TQString KMobileProtocol::entryMimeType(int cap)
{
- QString mimetype;
+ TQString mimetype;
switch (cap) {
case KMobileDevice::hasAddressBook: mimetype = "text/x-vcard";
break;
@@ -310,9 +310,9 @@ QString KMobileProtocol::entryMimeType(int cap)
* listTopDeviceDir("mobile:/<devicename>") - sub-directory of a devices
*/
-void KMobileProtocol::listTopDeviceDir(const QString &devName)
+void KMobileProtocol::listTopDeviceDir(const TQString &devName)
{
- PRINT_DEBUG << QString("listTopDeviceDir(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listTopDeviceDir(%1)\n").arg(devName);
KIO::UDSEntry entry;
unsigned int caps = m_dev.capabilities(devName);
@@ -322,10 +322,10 @@ void KMobileProtocol::listTopDeviceDir(const QString &devName)
if ((caps & cap) == 0)
continue;
- QString filename = m_dev.nameForCap(devName, cap);
- QString mimetype = folderMimeType(cap);
+ TQString filename = m_dev.nameForCap(devName, cap);
+ TQString mimetype = folderMimeType(cap);
- createDirEntry(entry, filename, QString("mobile:/%1/%2/").arg(devName).arg(filename), mimetype);
+ createDirEntry(entry, filename, TQString("mobile:/%1/%2/").arg(devName).arg(filename), mimetype);
listEntry(entry, false);
}
listEntry(entry, true);
@@ -336,11 +336,11 @@ void KMobileProtocol::listTopDeviceDir(const QString &devName)
/*
* listEntries("mobile:/<devicename>/<resource>") - resources of a device
*/
-void KMobileProtocol::listEntries(const QString &devName,
- const QString &resource, const QString &devPath,
+void KMobileProtocol::listEntries(const TQString &devName,
+ const TQString &resource, const TQString &devPath,
const KMobileDevice::Capabilities devCaps)
{
- PRINT_DEBUG << QString("listEntries(%1,%2,%3)\n").arg(devName).arg(resource).arg(devPath);
+ PRINT_DEBUG << TQString("listEntries(%1,%2,%3)\n").arg(devName).arg(resource).arg(devPath);
switch (devCaps) {
case KMobileDevice::hasAddressBook: listAddressBook(devName, resource);
break;
@@ -351,16 +351,16 @@ void KMobileProtocol::listEntries(const QString &devName,
case KMobileDevice::hasFileStorage: listFileStorage(devName, resource, devPath);
break;
default: error( ERR_CANNOT_ENTER_DIRECTORY,
- QString("/%1/%2").arg(devName).arg(resource) );
+ TQString("/%1/%2").arg(devName).arg(resource) );
}
}
/*
* listAddressBook("mobile:/<devicename>/Addressbook) - list the addressbook
*/
-void KMobileProtocol::listAddressBook(const QString &devName, const QString &resource)
+void KMobileProtocol::listAddressBook(const TQString &devName, const TQString &resource)
{
- PRINT_DEBUG << QString("listAddressBook(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listAddressBook(%1)\n").arg(devName);
KIO::UDSEntry entry;
@@ -370,23 +370,23 @@ void KMobileProtocol::listAddressBook(const QString &devName, const QString &res
if (entries>=100) fieldwidth=3; else
if (entries>=10) fieldwidth=2; else fieldwidth=1;
totalSize(entries);
-// QRegExp rx; rx.setPattern( ".*FN:([\\w\\s]*)[\\n\\r]{2}.*" );
- QString name;
+// TQRegExp rx; rx.setPattern( ".*FN:([\\w\\s]*)[\\n\\r]{2}.*" );
+ TQString name;
for (int i=0; i<entries; i++) {
#if 0
- QString content = m_dev.readAddress(devName, i);
+ TQString content = m_dev.readAddress(devName, i);
if ( rx.search( content ) < 0 )
- name = QString::null;
+ name = TQString::null;
else
name = "_" + rx.cap(1);
#endif
- QString filename = QString("%1%2.vcf").arg(i,fieldwidth).arg(name);
+ TQString filename = TQString("%1%2.vcf").arg(i,fieldwidth).arg(name);
for (int p=0; p<fieldwidth; p++) {
if (filename[p]==' ') filename[p]='0'; else break;
}
- QString url = QString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
+ TQString url = TQString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
createFileEntry(entry, filename, url, entryMimeType(KMobileDevice::hasAddressBook),
400 /*content.utf8().length()*/ );
@@ -401,9 +401,9 @@ void KMobileProtocol::listAddressBook(const QString &devName, const QString &res
/*
* getVCard() - gives the vCard of the given file
*/
-int KMobileProtocol::getVCard( const QString &devName, QCString &result, QString &mime, const QString &path )
+int KMobileProtocol::getVCard( const TQString &devName, TQCString &result, TQString &mime, const TQString &path )
{
- PRINT_DEBUG << QString("getVCard(%1)\n").arg(path);
+ PRINT_DEBUG << TQString("getVCard(%1)\n").arg(path);
int index = path.find('.');
if (index>0)
@@ -411,21 +411,21 @@ int KMobileProtocol::getVCard( const QString &devName, QCString &result, QString
if (index<0 || index>=m_dev.numAddresses(devName))
return KIO::ERR_DOES_NOT_EXIST;
- QString str = m_dev.readAddress(devName, index);
+ TQString str = m_dev.readAddress(devName, index);
if (str.isEmpty())
return KIO::ERR_INTERNAL;
result = str.utf8();
mime = entryMimeType(KMobileDevice::hasAddressBook);
-// setMetaData("plugin", "const QString &key, const QString &value);
+// setMetaData("plugin", "const TQString &key, const TQString &value);
return 0;
}
/*
* listCalendar("mobile:/<devicename>/Calendar) - list the calendar entries
*/
-void KMobileProtocol::listCalendar( const QString &devName, const QString &resource)
+void KMobileProtocol::listCalendar( const TQString &devName, const TQString &resource)
{
- PRINT_DEBUG << QString("listCalendar(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listCalendar(%1)\n").arg(devName);
KIO::UDSEntry entry;
@@ -433,8 +433,8 @@ void KMobileProtocol::listCalendar( const QString &devName, const QString &resou
totalSize(entries);
for (int i=0; i<entries; i++) {
- QString filename = QString("%1_%2.vcs").arg(i).arg(i18n("calendar"));
- QString url = QString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
+ TQString filename = TQString("%1_%2.vcs").arg(i).arg(i18n("calendar"));
+ TQString url = TQString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
createFileEntry(entry, filename, url, entryMimeType(KMobileDevice::hasCalendar));
listEntry(entry, false);
@@ -448,9 +448,9 @@ void KMobileProtocol::listCalendar( const QString &devName, const QString &resou
/*
* getCalendar() - reads a calendar entry
*/
-int KMobileProtocol::getCalendar( const QString &devName, QCString &result, QString &mime, const QString &path)
+int KMobileProtocol::getCalendar( const TQString &devName, TQCString &result, TQString &mime, const TQString &path)
{
- PRINT_DEBUG << QString("getCalendar(%1, #%2)\n").arg(devName).arg(path);
+ PRINT_DEBUG << TQString("getCalendar(%1, #%2)\n").arg(devName).arg(path);
/* TODO */
Q_UNUSED(result);
@@ -462,9 +462,9 @@ int KMobileProtocol::getCalendar( const QString &devName, QCString &result, QStr
/*
* listNotes("mobile:/<devicename>/Notes) - list the notes
*/
-void KMobileProtocol::listNotes( const QString &devName, const QString &resource)
+void KMobileProtocol::listNotes( const TQString &devName, const TQString &resource)
{
- PRINT_DEBUG << QString("listNotes(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listNotes(%1)\n").arg(devName);
KIO::UDSEntry entry;
@@ -472,10 +472,10 @@ void KMobileProtocol::listNotes( const QString &devName, const QString &resource
totalSize(entries);
for (int i=0; i<entries; i++) {
- QString note /*= m_dev.readNote(devName, i)*/;
+ TQString note /*= m_dev.readNote(devName, i)*/;
- QString filename = QString("%1_%2.txt").arg(i).arg(i18n("note"));
- QString url = QString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
+ TQString filename = TQString("%1_%2.txt").arg(i).arg(i18n("note"));
+ TQString url = TQString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
createFileEntry(entry, filename, url, entryMimeType(KMobileDevice::hasNotes),
0 /*note.utf8().length()*/);
@@ -490,9 +490,9 @@ void KMobileProtocol::listNotes( const QString &devName, const QString &resource
/*
* getNote() - gives the Note of the given file
*/
-int KMobileProtocol::getNote( const QString &devName, QCString &result, QString &mime, const QString &path )
+int KMobileProtocol::getNote( const TQString &devName, TQCString &result, TQString &mime, const TQString &path )
{
- PRINT_DEBUG << QString("getNote(%1)\n").arg(path);
+ PRINT_DEBUG << TQString("getNote(%1)\n").arg(path);
int index = path.find('_');
if (index>0)
@@ -500,7 +500,7 @@ int KMobileProtocol::getNote( const QString &devName, QCString &result, QString
if (index<0 || index>=m_dev.numNotes(devName))
return KIO::ERR_DOES_NOT_EXIST;
- QString note = m_dev.readNote(devName, index);
+ TQString note = m_dev.readNote(devName, index);
if (note.isEmpty())
return KIO::ERR_DOES_NOT_EXIST;
@@ -512,20 +512,20 @@ int KMobileProtocol::getNote( const QString &devName, QCString &result, QString
/*
* listFileStorage("mobile:/<devicename>/Files) - list the files on the device
*/
-void KMobileProtocol::listFileStorage(const QString &devName, const QString &resource, const QString &devPath)
+void KMobileProtocol::listFileStorage(const TQString &devName, const TQString &resource, const TQString &devPath)
{
- PRINT_DEBUG << QString("listFileStorage(%1,%2)\n").arg(devName).arg(devPath);
+ PRINT_DEBUG << TQString("listFileStorage(%1,%2)\n").arg(devName).arg(devPath);
/* TODO */
- error( KIO::ERR_DOES_NOT_EXIST, QString("/%1/%2/%3").arg(devName).arg(resource).arg(devPath) );
+ error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1/%2/%3").arg(devName).arg(resource).arg(devPath) );
}
/*
* getFileStorage() - gives the file contents of the given file
*/
-int KMobileProtocol::getFileStorage(const QString &devName, QCString &result, QString &mime, const QString &path)
+int KMobileProtocol::getFileStorage(const TQString &devName, TQCString &result, TQString &mime, const TQString &path)
{
- PRINT_DEBUG << QString("getFileStorage(%1)\n").arg(path);
+ PRINT_DEBUG << TQString("getFileStorage(%1)\n").arg(path);
/* TODO */
Q_UNUSED(devName);
@@ -541,10 +541,10 @@ int KMobileProtocol::getFileStorage(const QString &devName, QCString &result, QS
void KMobileProtocol::stat( const KURL &url )
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << QString("stat(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("stat(%1)\n").arg(url.path());
KMobileDevice::Capabilities devCaps;
- QString devName, resource, devPath;
+ TQString devName, resource, devPath;
int err = getDeviceAndRessource(url.path(), devName, resource, devPath, devCaps);
if (err) {
@@ -552,10 +552,10 @@ void KMobileProtocol::stat( const KURL &url )
return;
}
- QStringList path = QStringList::split('/', url.path(), false);
- QString filename = (path.count()>0) ? path[path.count()-1] : "/";
- QString fullPath = path.join("/");
- QString fullUrl = QString("mobile:/%1").arg(fullPath);
+ TQStringList path = TQStringList::split('/', url.path(), false);
+ TQString filename = (path.count()>0) ? path[path.count()-1] : "/";
+ TQString fullPath = path.join("/");
+ TQString fullUrl = TQString("mobile:/%1").arg(fullPath);
UDSEntry entry;
@@ -577,10 +577,10 @@ void KMobileProtocol::stat( const KURL &url )
void KMobileProtocol::mimetype(const KURL &url)
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << QString("mimetype(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("mimetype(%1)\n").arg(url.path());
KMobileDevice::Capabilities devCaps;
- QString devName, resource, devPath;
+ TQString devName, resource, devPath;
int err = getDeviceAndRessource(url.path(), devName, resource, devPath, devCaps);
if (err) {
@@ -599,7 +599,7 @@ void KMobileProtocol::mimetype(const KURL &url)
void KMobileProtocol::listDir(const KURL &url)
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << QString("listDir(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("listDir(%1)\n").arg(url.path());
if (!m_dev.isKMobileAvailable()) {
error( KIO::ERR_CONNECTION_BROKEN, i18n("KDE Mobile Device Manager") );
@@ -607,7 +607,7 @@ void KMobileProtocol::listDir(const KURL &url)
}
KMobileDevice::Capabilities devCaps;
- QString devName, resource, devPath;
+ TQString devName, resource, devPath;
int err = getDeviceAndRessource(url.path(), devName, resource, devPath, devCaps);
if (err) {
@@ -622,7 +622,7 @@ void KMobileProtocol::listDir(const KURL &url)
#if 0
if (!dev) {
- error( KIO::ERR_DOES_NOT_EXIST, QString("/%1").arg(devName) );
+ error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1").arg(devName) );
return;
}
#endif
diff --git a/kmobile/kioslave/kio_mobile.h b/kmobile/kioslave/kio_mobile.h
index 8094f514b..eb053d599 100644
--- a/kmobile/kioslave/kio_mobile.h
+++ b/kmobile/kioslave/kio_mobile.h
@@ -19,8 +19,8 @@
#ifndef __KIO_MOBILE_H__
#define __KIO_MOBILE_H__
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kio/slavebase.h>
#include <kmobiledevice.h>
@@ -29,7 +29,7 @@
class KMobileProtocol : public KIO::SlaveBase
{
public:
- KMobileProtocol( const QCString &pool, const QCString &app );
+ KMobileProtocol( const TQCString &pool, const TQCString &app );
~KMobileProtocol();
void get( const KURL& url );
@@ -38,30 +38,30 @@ public:
void listDir( const KURL& url );
protected:
- int getDeviceAndRessource(const QString &_path,
- QString &devName, QString &resource, QString &devPath,
+ int getDeviceAndRessource(const TQString &_path,
+ TQString &devName, TQString &resource, TQString &devPath,
KMobileDevice::Capabilities &devCaps);
- QString folderMimeType(int cap);
- QString entryMimeType(int cap);
+ TQString folderMimeType(int cap);
+ TQString entryMimeType(int cap);
void listRoot(const KURL& url);
- void listTopDeviceDir(const QString &devName);
- void listEntries(const QString &devName,
- const QString &resource, const QString &devPath,
+ void listTopDeviceDir(const TQString &devName);
+ void listEntries(const TQString &devName,
+ const TQString &resource, const TQString &devPath,
const KMobileDevice::Capabilities devCaps);
- void listAddressBook(const QString &devName, const QString &resource);
- int getVCard( const QString &devName, QCString &result, QString &mime, const QString &path );
+ void listAddressBook(const TQString &devName, const TQString &resource);
+ int getVCard( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
- void listCalendar(const QString &devName, const QString &resource);
- int getCalendar( const QString &devName, QCString &result, QString &mime, const QString &path );
+ void listCalendar(const TQString &devName, const TQString &resource);
+ int getCalendar( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
- void listNotes(const QString &devName, const QString &resource);
- int getNote( const QString &devName, QCString &result, QString &mime, const QString &path );
+ void listNotes(const TQString &devName, const TQString &resource);
+ int getNote( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
- void listFileStorage(const QString &devName, const QString &resource, const QString &devPath);
- int getFileStorage( const QString &devName, QCString &result, QString &mime, const QString &path );
+ void listFileStorage(const TQString &devName, const TQString &resource, const TQString &devPath);
+ int getFileStorage( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
private:
KMobileClient m_dev;
diff --git a/kmobile/kmobile.cpp b/kmobile/kmobile.cpp
index 0c056bd4c..07fa1582b 100644
--- a/kmobile/kmobile.cpp
+++ b/kmobile/kmobile.cpp
@@ -17,10 +17,10 @@
*/
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kprinter.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kglobal.h>
#include <klocale.h>
@@ -74,8 +74,8 @@ KMobile::KMobile()
setAutoSaveSettings();
// allow the view to change the statusbar and caption
- connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
+ connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
// restore all configured devices
restoreAll();
@@ -83,7 +83,7 @@ KMobile::KMobile()
// setup the system tray
m_systemTray = new SystemTray(this, "systemTray");
m_systemTray->show();
- connect(m_systemTray, SIGNAL(quitSelected()), this, SLOT(slotQuit()));
+ connect(m_systemTray, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(slotQuit()));
}
KMobile::~KMobile()
@@ -93,29 +93,29 @@ KMobile::~KMobile()
void KMobile::setupActions()
{
- KStdAction::close(this, SLOT(dockApplication()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::close(this, TQT_SLOT(dockApplication()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
- m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
+ m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection());
optionsShowToolbar();
- m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());
+ m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection());
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
new KAction(i18n("&Add Device..."), "folder_new", 0,
- this, SLOT(addDevice()), actionCollection(), "device_add");
+ this, TQT_SLOT(addDevice()), actionCollection(), "device_add");
new KAction( KGuiItem( i18n("&Remove Device"), "edittrash", i18n("Remove this device") ),
- "Delete", this, SLOT(removeDevice()), actionCollection(), "device_remove");
+ "Delete", this, TQT_SLOT(removeDevice()), actionCollection(), "device_remove");
new KAction(i18n("Re&name Device..."), 0, Key_F2,
- this, SLOT(renameDevice()), actionCollection(), "device_rename");
+ this, TQT_SLOT(renameDevice()), actionCollection(), "device_rename");
new KAction(i18n("&Configure Device..."), "configure", 0,
- this, SLOT(configDevice()), actionCollection(), "device_configure");
+ this, TQT_SLOT(configDevice()), actionCollection(), "device_configure");
createGUI();
- connect( kapp, SIGNAL(aboutToQuit()), this, SLOT(saveAll()) );
+ connect( kapp, TQT_SIGNAL(aboutToQuit()), this, TQT_SLOT(saveAll()) );
}
@@ -182,7 +182,7 @@ void KMobile::readProperties(KConfig *config)
// the app is being restored. read in here whatever you wrote
// in 'saveProperties'
- QString url = config->readPathEntry("lastURL");
+ TQString url = config->readPathEntry("lastURL");
}
void KMobile::optionsShowToolbar()
@@ -241,7 +241,7 @@ void KMobile::optionsPreferences()
void KMobile::renameDevice()
{
// rename the current selected device
- QIconViewItem *item = m_view->currentItem();
+ TQIconViewItem *item = m_view->currentItem();
if (item)
item->rename();
}
@@ -261,34 +261,34 @@ void KMobile::addDevice()
dialog->helpText->setText( i18n("Please select the category to which your new device belongs:") );
dialog->addButton->setText( i18n("&Scan for New Devices...") );
dialog->addButton->setDisabled(true);
- dialog->iconView->connect( dialog->iconView, SIGNAL(doubleClicked(QIconViewItem*)),
- dialog, SLOT(accept()) );
+ dialog->iconView->connect( dialog->iconView, TQT_SIGNAL(doubleClicked(TQIconViewItem*)),
+ dialog, TQT_SLOT(accept()) );
dialog->selectButton->setText( i18n("&Add") );
- dialog->selectButton->connect( dialog->selectButton, SIGNAL(clicked()), dialog, SLOT(accept()) );
- dialog->cancelButton->connect( dialog->cancelButton, SIGNAL(clicked()), dialog, SLOT(reject()) );
+ dialog->selectButton->connect( dialog->selectButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(accept()) );
+ dialog->cancelButton->connect( dialog->cancelButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(reject()) );
KTrader::OfferList list = KMobileItem::getMobileDevicesList();
KTrader::OfferListIterator it;
KService::Ptr ptr;
for ( it = list.begin(); it != list.end(); ++it ) {
ptr = *it;
- kdDebug() << QString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
+ kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
.arg(ptr->library()).arg(ptr->name()).arg(ptr->icon()).arg(ptr->comment());
- QString iconName = ptr->icon();
+ TQString iconName = ptr->icon();
if (iconName.isEmpty())
iconName = KMOBILE_ICON_UNKNOWN;
- QPixmap pm = KGlobal::instance()->iconLoader()->loadIcon(iconName, KIcon::Desktop );
+ TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon(iconName, KIcon::Desktop );
- QIconViewItem *item;
- item = new QIconViewItem( dialog->iconView, ptr->name(), pm );
+ TQIconViewItem *item;
+ item = new TQIconViewItem( dialog->iconView, ptr->name(), pm );
//if (!ptr->comment().isNull())
- // QToolTip::add(item->pixmap(), ptr->comment() );
+ // TQToolTip::add(item->pixmap(), ptr->comment() );
}
int index = -1;
- if (dialog->exec() == QDialog::Accepted)
+ if (dialog->exec() == TQDialog::Accepted)
index = dialog->iconView->currentItem()->index(); // get index of selected item
delete dialog;
@@ -300,7 +300,7 @@ void KMobile::addDevice()
// add the new device to the list
if (!m_view->addNewDevice(m_config, ptr)) {
KMessageBox::error(this,
- QString("<qt>KMobile could not load the <b>%1</b> Device Driver.<p>"
+ TQString("<qt>KMobile could not load the <b>%1</b> Device Driver.<p>"
"Please use the Skeleton- or Gnokii Device Driver during development.<p>"
"This driver will still be visible, but you won't be able to access it "
"from Konqueror or any other application.</qt>").arg(ptr->name()),
@@ -315,7 +315,7 @@ void KMobile::addDevice()
* show dialog to user, in which he may choose and select one of the already
* configured mobile devices.
*/
-KMobileDevice * KMobileFactory::chooseDeviceDialog( QWidget *parent,
+KMobileDevice * KMobileFactory::chooseDeviceDialog( TQWidget *parent,
enum KMobileDevice::ClassType /*type*/, enum KMobileDevice::Capabilities /*caps*/ )
{
int num;
@@ -344,11 +344,11 @@ KMobileDevice * KMobileFactory::chooseDeviceDialog( QWidget *parent,
if (!dialog)
return 0L;
- dialog->addButton->connect( dialog->addButton, SIGNAL(clicked()), this, SLOT(slotAddDevice()) );
- dialog->iconView->connect( dialog->iconView, SIGNAL(doubleClicked(QIconViewItem*)),
- dialog, SLOT(accept()) );
- dialog->selectButton->connect( dialog->selectButton, SIGNAL(clicked()), dialog, SLOT(accept()) );
- dialog->cancelButton->connect( dialog->cancelButton, SIGNAL(clicked()), dialog, SLOT(reject()) );
+ dialog->addButton->connect( dialog->addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddDevice()) );
+ dialog->iconView->connect( dialog->iconView, TQT_SIGNAL(doubleClicked(TQIconViewItem*)),
+ dialog, TQT_SLOT(accept()) );
+ dialog->selectButton->connect( dialog->selectButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(accept()) );
+ dialog->cancelButton->connect( dialog->cancelButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(reject()) );
for (int i=0; i<countDevices(); i++) {
KService::Ptr ptr;
@@ -356,21 +356,21 @@ KMobileDevice * KMobileFactory::chooseDeviceDialog( QWidget *parent,
if (!ptr)
continue;
- // kdDebug() << QString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4' #%5\n")
+ // kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4' #%5\n")
// .arg(ptr->library()).arg(ptr->name()).arg(ptr->icon()).arg(ptr->comment()).arg(i);
- QString iconName = ptr->icon();
+ TQString iconName = ptr->icon();
if (iconName.isEmpty())
iconName = KMOBILE_ICON_UNKNOWN;
- QPixmap pm( ::locate("icon", iconName+".png") );
+ TQPixmap pm( ::locate("icon", iconName+".png") );
- QIconViewItem *item;
- item = new QIconViewItem( dialog->iconView, ptr->name(), pm );
+ TQIconViewItem *item;
+ item = new TQIconViewItem( dialog->iconView, ptr->name(), pm );
}
int index = -1;
- if (dialog->exec() == QDialog::Accepted)
+ if (dialog->exec() == TQDialog::Accepted)
index = dialog->iconView->currentItem()->index(); // get index of selected item
delete dialog;
@@ -385,7 +385,7 @@ KMobileDevice * KMobileFactory::chooseDeviceDialog( QWidget *parent,
void KMobile::removeDevice()
{
// remove the current selected device
- QIconViewItem *item = m_view->currentItem();
+ TQIconViewItem *item = m_view->currentItem();
if (item)
m_view->removeDevice( item->text() );
}
@@ -393,12 +393,12 @@ void KMobile::removeDevice()
void KMobile::configDevice()
{
// configure the current selected device
- QIconViewItem *item = m_view->currentItem();
+ TQIconViewItem *item = m_view->currentItem();
if (item)
m_view->configDevice( item->text() );
}
-void KMobile::changeStatusbar(const QString& text)
+void KMobile::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text);
diff --git a/kmobile/kmobile.h b/kmobile/kmobile.h
index 059934c61..18403ffa3 100644
--- a/kmobile/kmobile.h
+++ b/kmobile/kmobile.h
@@ -76,7 +76,7 @@ private slots:
void newToolbarConfig();
- void changeStatusbar(const QString& text);
+ void changeStatusbar(const TQString& text);
private:
void setupAccel();
diff --git a/kmobile/kmobileclient.cpp b/kmobile/kmobileclient.cpp
index 6da1b919e..63910fba1 100644
--- a/kmobile/kmobileclient.cpp
+++ b/kmobile/kmobileclient.cpp
@@ -17,7 +17,7 @@
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <ktrader.h>
#include <klocale.h>
@@ -36,10 +36,10 @@ KMobileClient::KMobileClient()
m_kmobileObj = "kmobileIface";
bool ok = attach();
- PRINT_DEBUG << QString("attached to DCOP server %1\n").arg(ok?"sucessful.":"failed.");
+ PRINT_DEBUG << TQString("attached to DCOP server %1\n").arg(ok?"sucessful.":"failed.");
// m_clientAppId = registerAs("kmobileclient");
-// PRINT_DEBUG << QString("registered as DCOP client %1\n").arg(m_clientAppId);
+// PRINT_DEBUG << TQString("registered as DCOP client %1\n").arg(m_clientAppId);
isKMobileAvailable();
}
@@ -47,14 +47,14 @@ KMobileClient::KMobileClient()
KMobileClient::~KMobileClient()
{
detach();
- PRINT_DEBUG << QString("detached from server\n");
+ PRINT_DEBUG << TQString("detached from server\n");
}
bool KMobileClient::isKMobileAvailable()
{
bool available = isApplicationRegistered(m_kmobileApp);
- PRINT_DEBUG << QString("KMobile DCOP server: %1\n").arg(available?"available.":"not available");
+ PRINT_DEBUG << TQString("KMobile DCOP server: %1\n").arg(available?"available.":"not available");
if (!available) {
startKMobileApplication();
// check again...
@@ -65,15 +65,15 @@ bool KMobileClient::isKMobileAvailable()
bool KMobileClient::startKMobileApplication()
{
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
- QStringList params;
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
+ TQStringList params;
params << "--minimized";
- arg << QString("kmobile") << params;
- QCString replyType;
- QByteArray replyData;
- bool ok = call("klauncher", "klauncher", "kdeinit_exec_wait(QString,QStringList)", data, replyType, replyData);
- PRINT_DEBUG << QString("DCOP-CALL to klauncher: %1\n").arg(ok?"ok.":"failed.");
+ arg << TQString("kmobile") << params;
+ TQCString replyType;
+ TQByteArray replyData;
+ bool ok = call("klauncher", "klauncher", "kdeinit_exec_wait(TQString,TQStringList)", data, replyType, replyData);
+ PRINT_DEBUG << TQString("DCOP-CALL to klauncher: %1\n").arg(ok?"ok.":"failed.");
return ok;
}
@@ -87,17 +87,17 @@ bool KMobileClient::startKMobileApplication()
#define PREPARE( FUNC, PARAMS ) \
- QByteArray data; \
- QDataStream arg(data, IO_WriteOnly); \
+ TQByteArray data; \
+ TQDataStream arg(data, IO_WriteOnly); \
arg << PARAMS; \
- QCString replyType; \
- QByteArray replyData; \
+ TQCString replyType; \
+ TQByteArray replyData; \
bool ok = call(m_kmobileApp, m_kmobileObj, FUNC, data, replyType, replyData, KMOBILECLIENT_USE_EVENTLOOP, KMOBILECLIENT_TIMEOUT); \
- PRINT_DEBUG << QString("DCOP-CALL to %1: %2\n").arg(FUNC).arg(ok?"ok.":"FAILED.")
+ PRINT_DEBUG << TQString("DCOP-CALL to %1: %2\n").arg(FUNC).arg(ok?"ok.":"FAILED.")
#define RETURN_TYPE( FUNC, PARAMS, RETURN_TYPE ) \
PREPARE( FUNC, PARAMS ); \
- QDataStream reply(replyData, IO_ReadOnly); \
+ TQDataStream reply(replyData, IO_ReadOnly); \
RETURN_TYPE ret; \
if (ok) \
reply >> ret; \
@@ -105,14 +105,14 @@ bool KMobileClient::startKMobileApplication()
#define RETURN_TYPE_DEFAULT( FUNC, PARAMS, RETURN_TYPE, RETURN_DEFAULT ) \
PREPARE( FUNC, PARAMS ); \
- QDataStream reply(replyData, IO_ReadOnly); \
+ TQDataStream reply(replyData, IO_ReadOnly); \
RETURN_TYPE ret = RETURN_DEFAULT; \
if (ok) \
reply >> ret; \
return ret;
#define RETURN_QSTRING( FUNC, PARAMS ) \
- RETURN_TYPE( FUNC, PARAMS, QString )
+ RETURN_TYPE( FUNC, PARAMS, TQString )
#define RETURN_BOOL( FUNC, PARAMS ) \
RETURN_TYPE_DEFAULT( FUNC, PARAMS, bool, false )
@@ -122,110 +122,110 @@ bool KMobileClient::startKMobileApplication()
-QStringList KMobileClient::deviceNames()
+TQStringList KMobileClient::deviceNames()
{
if (!isKMobileAvailable())
- return QStringList();
- RETURN_TYPE( "deviceNames()", QString::fromLatin1(""), QStringList );
+ return TQStringList();
+ RETURN_TYPE( "deviceNames()", TQString::fromLatin1(""), TQStringList );
}
-void KMobileClient::removeDevice( QString deviceName )
+void KMobileClient::removeDevice( TQString deviceName )
{
- PREPARE( "removeDevice(QString)", deviceName );
+ PREPARE( "removeDevice(TQString)", deviceName );
Q_UNUSED(ok);
}
-void KMobileClient::configDevice( QString deviceName )
+void KMobileClient::configDevice( TQString deviceName )
{
- PREPARE( "configDevice(QString)", deviceName );
+ PREPARE( "configDevice(TQString)", deviceName );
Q_UNUSED(ok);
}
-bool KMobileClient::connectDevice( QString deviceName )
+bool KMobileClient::connectDevice( TQString deviceName )
{
- RETURN_BOOL( "connectDevice(QString)", deviceName );
+ RETURN_BOOL( "connectDevice(TQString)", deviceName );
}
-bool KMobileClient::disconnectDevice( QString deviceName )
+bool KMobileClient::disconnectDevice( TQString deviceName )
{
- RETURN_BOOL( "disconnectDevice(QString)", deviceName );
+ RETURN_BOOL( "disconnectDevice(TQString)", deviceName );
}
-bool KMobileClient::connected( QString deviceName )
+bool KMobileClient::connected( TQString deviceName )
{
- RETURN_BOOL( "connected(QString)", deviceName );
+ RETURN_BOOL( "connected(TQString)", deviceName );
}
-QString KMobileClient::deviceClassName( QString deviceName )
+TQString KMobileClient::deviceClassName( TQString deviceName )
{
- RETURN_QSTRING( "deviceClassName(QString)", deviceName );
+ RETURN_QSTRING( "deviceClassName(TQString)", deviceName );
}
-QString KMobileClient::deviceName( QString deviceName )
+TQString KMobileClient::deviceName( TQString deviceName )
{
- RETURN_QSTRING( "deviceName(QString)", deviceName );
+ RETURN_QSTRING( "deviceName(TQString)", deviceName );
}
-QString KMobileClient::revision( QString deviceName )
+TQString KMobileClient::revision( TQString deviceName )
{
- RETURN_QSTRING( "revision(QString)", deviceName );
+ RETURN_QSTRING( "revision(TQString)", deviceName );
}
-int KMobileClient::classType( QString deviceName )
+int KMobileClient::classType( TQString deviceName )
{
- RETURN_INT( "classType(QString)", deviceName );
+ RETURN_INT( "classType(TQString)", deviceName );
}
-int KMobileClient::capabilities( QString deviceName )
+int KMobileClient::capabilities( TQString deviceName )
{
- RETURN_INT( "capabilities(QString)", deviceName );
+ RETURN_INT( "capabilities(TQString)", deviceName );
}
-QString KMobileClient::nameForCap( QString deviceName, int cap )
+TQString KMobileClient::nameForCap( TQString deviceName, int cap )
{
- RETURN_QSTRING( "nameForCap(QString,int)", deviceName << cap );
+ RETURN_QSTRING( "nameForCap(TQString,int)", deviceName << cap );
}
-QString KMobileClient::iconFileName( QString deviceName )
+TQString KMobileClient::iconFileName( TQString deviceName )
{
- RETURN_QSTRING( "iconFileName(QString)", deviceName );
+ RETURN_QSTRING( "iconFileName(TQString)", deviceName );
}
-int KMobileClient::numAddresses( QString deviceName )
+int KMobileClient::numAddresses( TQString deviceName )
{
- RETURN_INT( "numAddresses(QString)", deviceName );
+ RETURN_INT( "numAddresses(TQString)", deviceName );
}
-QString KMobileClient::readAddress( QString deviceName, int index )
+TQString KMobileClient::readAddress( TQString deviceName, int index )
{
- RETURN_QSTRING( "readAddress(QString,int)", deviceName << index );
+ RETURN_QSTRING( "readAddress(TQString,int)", deviceName << index );
}
-bool KMobileClient::storeAddress( QString deviceName, int index, QString vcard, bool append )
+bool KMobileClient::storeAddress( TQString deviceName, int index, TQString vcard, bool append )
{
- RETURN_BOOL( "storeAddress(QString,int,QString,bool)", deviceName << index << vcard << append );
+ RETURN_BOOL( "storeAddress(TQString,int,TQString,bool)", deviceName << index << vcard << append );
}
-int KMobileClient::numCalendarEntries( QString deviceName )
+int KMobileClient::numCalendarEntries( TQString deviceName )
{
- RETURN_INT( "numCalendarEntries(QString)", deviceName );
+ RETURN_INT( "numCalendarEntries(TQString)", deviceName );
}
-int KMobileClient::numNotes( QString deviceName )
+int KMobileClient::numNotes( TQString deviceName )
{
- RETURN_INT( "numNotes(QString)", deviceName );
+ RETURN_INT( "numNotes(TQString)", deviceName );
}
-QString KMobileClient::readNote( QString deviceName, int index )
+TQString KMobileClient::readNote( TQString deviceName, int index )
{
- RETURN_QSTRING( "readNote(QString,int)", deviceName << index );
+ RETURN_QSTRING( "readNote(TQString,int)", deviceName << index );
}
-bool KMobileClient::storeNote( QString deviceName, int index, QString note )
+bool KMobileClient::storeNote( TQString deviceName, int index, TQString note )
{
- RETURN_BOOL( "storeNote(QString,int,QString)", deviceName << index << note );
+ RETURN_BOOL( "storeNote(TQString,int,TQString)", deviceName << index << note );
}
diff --git a/kmobile/kmobileclient.h b/kmobile/kmobileclient.h
index ca4b5c182..8ad6204ac 100644
--- a/kmobile/kmobileclient.h
+++ b/kmobile/kmobileclient.h
@@ -15,7 +15,7 @@ public:
KMobileClient();
virtual ~KMobileClient();
- QCString appId() const { return m_clientAppId; };
+ TQCString appId() const { return m_clientAppId; };
bool isKMobileAvailable();
bool startKMobileApplication();
@@ -23,39 +23,39 @@ public:
/**
* DCOP implementation
*/
- QStringList deviceNames();
+ TQStringList deviceNames();
- void removeDevice( QString deviceName );
- void configDevice( QString deviceName );
+ void removeDevice( TQString deviceName );
+ void configDevice( TQString deviceName );
- bool connectDevice( QString deviceName );
- bool disconnectDevice( QString deviceName );
- bool connected( QString deviceName );
+ bool connectDevice( TQString deviceName );
+ bool disconnectDevice( TQString deviceName );
+ bool connected( TQString deviceName );
- QString deviceClassName( QString deviceName );
- QString deviceName( QString deviceName );
- QString revision( QString deviceName );
- int classType( QString deviceName );
+ TQString deviceClassName( TQString deviceName );
+ TQString deviceName( TQString deviceName );
+ TQString revision( TQString deviceName );
+ int classType( TQString deviceName );
- int capabilities( QString deviceName );
- QString nameForCap( QString deviceName, int cap );
+ int capabilities( TQString deviceName );
+ TQString nameForCap( TQString deviceName, int cap );
- QString iconFileName( QString deviceName );
+ TQString iconFileName( TQString deviceName );
- int numAddresses( QString deviceName );
- QString readAddress( QString deviceName, int index );
- bool storeAddress( QString deviceName, int index, QString vcard, bool append );
+ int numAddresses( TQString deviceName );
+ TQString readAddress( TQString deviceName, int index );
+ bool storeAddress( TQString deviceName, int index, TQString vcard, bool append );
- int numCalendarEntries( QString deviceName );
+ int numCalendarEntries( TQString deviceName );
- int numNotes( QString deviceName );
- QString readNote( QString deviceName, int index );
- bool storeNote( QString deviceName, int index, QString note );
+ int numNotes( TQString deviceName );
+ TQString readNote( TQString deviceName, int index );
+ bool storeNote( TQString deviceName, int index, TQString note );
private:
- QCString m_clientAppId;
- QCString m_kmobileApp;
- QCString m_kmobileObj;
+ TQCString m_clientAppId;
+ TQCString m_kmobileApp;
+ TQCString m_kmobileObj;
};
diff --git a/kmobile/kmobiledevice.cpp b/kmobile/kmobiledevice.cpp
index dc3039f2b..cfcbf6e88 100644
--- a/kmobile/kmobiledevice.cpp
+++ b/kmobile/kmobiledevice.cpp
@@ -26,9 +26,9 @@
#include <signal.h>
#include <fcntl.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
#include <klibloader.h>
#include <kstandarddirs.h>
@@ -47,7 +47,7 @@
* The base plugin class of all mobile device drivers.
*/
-KMobileDevice::KMobileDevice(QObject *obj, const char *name, const QStringList &args)
+KMobileDevice::KMobileDevice(TQObject *obj, const char *name, const TQStringList &args)
: KLibFactory(obj,name),
m_config(0L), d(0L)
{
@@ -63,7 +63,7 @@ KMobileDevice::KMobileDevice(QObject *obj, const char *name, const QStringList &
m_config = new KConfig();
else
m_config = new KConfig(m_configFileName);
- PRINT_DEBUG << QString("name of config file is %1\n").arg(m_configFileName);
+ PRINT_DEBUG << TQString("name of config file is %1\n").arg(m_configFileName);
}
KMobileDevice::~KMobileDevice()
@@ -78,18 +78,18 @@ bool KMobileDevice::connected()
}
// returns e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
-QString KMobileDevice::deviceClassName() const
+TQString KMobileDevice::deviceClassName() const
{
return m_deviceClassName;
}
// returns real device name, e.g. "Nokia 6310" or "Rio MP3 Player"
-QString KMobileDevice::deviceName() const
+TQString KMobileDevice::deviceName() const
{
return m_deviceName;
}
-QString KMobileDevice::revision() const
+TQString KMobileDevice::revision() const
{
return m_deviceRevision;
}
@@ -104,7 +104,7 @@ bool KMobileDevice::isReadOnly() const
return false;
}
-bool KMobileDevice::configDialog( QWidget *parent )
+bool KMobileDevice::configDialog( TQWidget *parent )
{
KMessageBox::information( parent,
i18n("This device does not need any configuration."),
@@ -123,14 +123,14 @@ enum KMobileDevice::ClassType KMobileDevice::classType() const
return m_classType;
}
-QString KMobileDevice::iconFileName() const
+TQString KMobileDevice::iconFileName() const
{
return defaultIconFileName( classType() );
}
-QString KMobileDevice::defaultIconFileName( ClassType ct )
+TQString KMobileDevice::defaultIconFileName( ClassType ct )
{
- QString name;
+ TQString name;
switch (ct) {
case Phone: name = "mobile_phone"; break;
case Organizer: name = "mobile_organizer"; break;
@@ -142,9 +142,9 @@ QString KMobileDevice::defaultIconFileName( ClassType ct )
return name;
}
-QString KMobileDevice::defaultClassName( ClassType ct )
+TQString KMobileDevice::defaultClassName( ClassType ct )
{
- QString name;
+ TQString name;
switch (ct) {
case Phone: name = i18n("Cellular Mobile Phone"); break;
case Organizer: name = i18n("Organizer"); break;
@@ -166,7 +166,7 @@ int KMobileDevice::capabilities() const
return m_caps;
}
-const QString KMobileDevice::nameForCap(int cap) const
+const TQString KMobileDevice::nameForCap(int cap) const
{
switch (cap) {
case hasAddressBook: return i18n("Contacts");
@@ -178,7 +178,7 @@ const QString KMobileDevice::nameForCap(int cap) const
}
// returns an error string for the given error code
-QString KMobileDevice::buildErrorString(KIO::Error err, const QString &errorText) const
+TQString KMobileDevice::buildErrorString(KIO::Error err, const TQString &errorText) const
{
return KIO::buildErrorString( err, errorText);
}
@@ -227,12 +227,12 @@ int KMobileDevice::numNotes()
return 0;
}
-int KMobileDevice::readNote( int, QString & )
+int KMobileDevice::readNote( int, TQString & )
{
return KIO::ERR_UNSUPPORTED_ACTION;
}
-int KMobileDevice::storeNote( int, const QString & )
+int KMobileDevice::storeNote( int, const TQString & )
{
return KIO::ERR_UNSUPPORTED_ACTION;
}
@@ -243,7 +243,7 @@ int KMobileDevice::storeNote( int, const QString & )
*/
static
-void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = QString::null)
+void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString::null)
{
KIO::UDSAtom atom;
atom.m_uds = ID;
@@ -252,7 +252,7 @@ void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = Q
entry.append(atom);
}
-void KMobileDevice::createDirEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime) const
+void KMobileDevice::createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) const
{
entry.clear();
addAtom(entry, KIO::UDS_NAME, 0, name);
@@ -260,12 +260,12 @@ void KMobileDevice::createDirEntry(KIO::UDSEntry& entry, const QString& name, co
addAtom(entry, KIO::UDS_ACCESS, 0500);
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
addAtom(entry, KIO::UDS_URL, 0, url);
- PRINT_DEBUG << QString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
+ PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
// addAtom(entry, KIO::UDS_SIZE, 0);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
}
-void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime,
+void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime,
const unsigned long size) const
{
entry.clear();
@@ -276,63 +276,63 @@ void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const QString& name, c
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
if (size) addAtom(entry, KIO::UDS_SIZE, size);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
- PRINT_DEBUG << QString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
+ PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
}
-void KMobileDevice::listDir( const QString & )
+void KMobileDevice::listDir( const TQString & )
{
- emit error(KIO::ERR_CANNOT_ENTER_DIRECTORY,QString::null);
+ emit error(KIO::ERR_CANNOT_ENTER_DIRECTORY,TQString::null);
}
-void KMobileDevice::mkdir( const QString &, int )
+void KMobileDevice::mkdir( const TQString &, int )
{
- emit error(KIO::ERR_COULD_NOT_MKDIR, QString::null);
+ emit error(KIO::ERR_COULD_NOT_MKDIR, TQString::null);
}
-void KMobileDevice::rename( const QString &, const QString &, bool )
+void KMobileDevice::rename( const TQString &, const TQString &, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::symlink( const QString &, const QString &, bool )
+void KMobileDevice::symlink( const TQString &, const TQString &, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::del( const QString &, bool )
+void KMobileDevice::del( const TQString &, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::stat( const QString & )
+void KMobileDevice::stat( const TQString & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::chmod( const QString &, int )
+void KMobileDevice::chmod( const TQString &, int )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::get( const QString & )
+void KMobileDevice::get( const TQString & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::put( const QString &, int, bool, bool )
+void KMobileDevice::put( const TQString &, int, bool, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::mimetype( const QString & )
+void KMobileDevice::mimetype( const TQString & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::special( const QByteArray & )
+void KMobileDevice::special( const TQByteArray & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
@@ -366,7 +366,7 @@ void KMobileDevice::special( const QByteArray & )
# include <sys/types.h>
# include <sys/stat.h>
# include <unistd.h>
-# include <qfile.h>
+# include <tqfile.h>
# include <signal.h>
# include <errno.h>
# endif
@@ -374,7 +374,7 @@ void KMobileDevice::special( const QByteArray & )
#define DEVICE_LOCK_PATH_PREFIX "/var/lock/LCK.."
-bool KMobileDevice::lockDevice(const QString &device, QString &err_reason)
+bool KMobileDevice::lockDevice(const TQString &device, TQString &err_reason)
{
#ifdef HAVE_BAUDBOY_H
return ttylock(device.local8bit()) == EXIT_SUCCESS;
@@ -383,13 +383,13 @@ bool KMobileDevice::lockDevice(const QString &device, QString &err_reason)
return !dev_lock(device.local8bit());
# else
int pid = -1;
- QStringList all = QStringList::split('/', device);
+ TQStringList all = TQStringList::split('/', device);
if (!all.count()) {
err_reason = i18n("Invalid device (%1)").arg(device);
return false;
}
- QString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
- QFile file(lockName);
+ TQString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
+ TQFile file(lockName);
if (file.exists() && file.open(IO_ReadOnly)) {
if (file.size() == 0) {
err_reason = i18n("Unable to read lockfile %s. Please check for reason and "
@@ -400,17 +400,17 @@ bool KMobileDevice::lockDevice(const QString &device, QString &err_reason)
if (file.size() == 4 && sizeof(int)==4) {
file.readLine((char *)(&pid), 4); /* Kermit-style lockfile */
} else {
- QTextStream ts(&file);
+ TQTextStream ts(&file);
ts >> pid; /* Ascii lockfile */
}
file.close();
if (pid > 0 && kill((pid_t)pid, 0) < 0 && errno == ESRCH) {
- PRINT_DEBUG << QString("Lockfile %1 is stale. Overriding it..\n").arg(lockName);
+ PRINT_DEBUG << TQString("Lockfile %1 is stale. Overriding it..\n").arg(lockName);
sleep(1);
if (!file.remove()) {
- PRINT_DEBUG << QString("Overriding failed, please check the permissions\n");
- PRINT_DEBUG << QString("Cannot lock device %1\n").arg(device);
+ PRINT_DEBUG << TQString("Overriding failed, please check the permissions\n");
+ PRINT_DEBUG << TQString("Cannot lock device %1\n").arg(device);
err_reason = i18n("Lockfile %1 is stale. Please check permissions.").arg(lockName);
return false;
}
@@ -433,22 +433,22 @@ bool KMobileDevice::lockDevice(const QString &device, QString &err_reason)
err_reason = i18n("Could not create lockfile %1. Error-Code is %2.").arg(lockName).arg(errno);
return false;
}
- QString lockText;
- lockText = QString("%1 kmobile\n").arg(getpid(),10);
+ TQString lockText;
+ lockText = TQString("%1 kmobile\n").arg(getpid(),10);
write(fd, lockText.utf8(), lockText.utf8().length());
close(fd);
- PRINT_DEBUG << QString("%1: Device %2 locked with lockfile %3.\n")
+ PRINT_DEBUG << TQString("%1: Device %2 locked with lockfile %3.\n")
.arg(deviceName()).arg(device).arg(lockName);
- err_reason = QString::null;
+ err_reason = TQString::null;
return true;
# endif
#endif
}
-bool KMobileDevice::unlockDevice(const QString &device)
+bool KMobileDevice::unlockDevice(const TQString &device)
{
#ifdef HAVE_BAUDBOY_H
return ttyunlock(device.local8bit()) == EXIT_SUCCESS;
@@ -456,10 +456,10 @@ bool KMobileDevice::unlockDevice(const QString &device)
# ifdef HAVE_LOCKDEV_H
return 0 <= dev_unlock(device.local8bit(), getpid());
# else
- QStringList all = QStringList::split('/', device);
+ TQStringList all = TQStringList::split('/', device);
if (!all.count()) return false;
- QString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
- QFile file(lockName);
+ TQString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
+ TQFile file(lockName);
if (!file.exists())
return true;
return file.remove();
diff --git a/kmobile/kmobiledevice.h b/kmobile/kmobiledevice.h
index 5fbcad6d2..8d1e69a0d 100644
--- a/kmobile/kmobiledevice.h
+++ b/kmobile/kmobiledevice.h
@@ -20,9 +20,9 @@
#ifndef LIB_KMOBILEDEVICE_H
#define LIB_KMOBILEDEVICE_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
#include <kdepimmacros.h>
#include <klibloader.h>
@@ -38,7 +38,7 @@
class KConfig;
#define KMOBILE_MIMETYPE_DEVICE "kdedevice/mobiledevice"
-#define KMOBILE_MIMETYPE_DEVICE_KONQUEROR(name) QString("kdedevice/kmobile_%1").arg(name)
+#define KMOBILE_MIMETYPE_DEVICE_KONQUEROR(name) TQString("kdedevice/kmobile_%1").arg(name)
#define KMOBILE_MIMETYPE_INODE "inode/"
#define KMOBILE_ICON_UNKNOWN "mobile_unknown"
@@ -51,8 +51,8 @@ class KConfig;
* For a KMobileSomeDevice driver you have to write the following code:
* <pre>
* K_EXPORT_COMPONENT_FACTORY( libkmobile_somedevice, KMobileSomeDevice() );
- * QObject *KMobileSomeDevice::createObject( QObject *parent, const char *name,
- * const char *, const QStringList &args )
+ * TQObject *KMobileSomeDevice::createObject( TQObject *parent, const char *name,
+ * const char *, const TQStringList &args )
* {
* return new KMobileSomeDevice( parent, name, args );
* }
@@ -75,7 +75,7 @@ public:
* @param name The object name. For session management and window management to work.
* @param args Additional commandline parameters - the first entry has the config file name.
*/
- KMobileDevice(QObject *obj, const char *name, const QStringList &args );
+ KMobileDevice(TQObject *obj, const char *name, const TQStringList &args );
virtual ~KMobileDevice();
@@ -84,14 +84,14 @@ public:
*
* @param parent The parent widget. It will be used as parent for message boxes.
*/
- virtual bool connectDevice( QWidget *parent = 0 ) = 0;
+ virtual bool connectDevice( TQWidget *parent = 0 ) = 0;
/**
* Disconnect from the device.
*
* @param parent The parent widget. It will be used as parent for message boxes.
*/
- virtual bool disconnectDevice( QWidget *parent = 0 ) = 0;
+ virtual bool disconnectDevice( TQWidget *parent = 0 ) = 0;
/**
* Returns true, if the device is currently connected and the link is online.
@@ -102,23 +102,23 @@ public:
* Returns the classname, to which the device belongs. Examples are e.g.
* "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
*/
- virtual QString deviceClassName() const;
+ virtual TQString deviceClassName() const;
/**
* Returns the real devices name, e.g. "Nokia 6310" or "Rio MP3 Player"
*/
- virtual QString deviceName() const;
+ virtual TQString deviceName() const;
/**
* Returns the hardware revision of the devices, e.g. "Revision 1.2"
*/
- virtual QString revision() const;
+ virtual TQString revision() const;
/**
* Returns an unique ID for the device, e.g. IMEI number on phones, or serial number.
* The returned String is used to have a unique identification for syncronisation.
*/
- virtual QString deviceUniqueID() = 0;
+ virtual TQString deviceUniqueID() = 0;
/**
* Returns true, if the device is connected via a slow connection.
@@ -136,7 +136,7 @@ public:
*
* @param parent The parent widget. It will be used as parent for the configuration dialog.
*/
- virtual bool configDialog(QWidget *parent);
+ virtual bool configDialog(TQWidget *parent);
// The ClassType may be used e.g. to select an suitable icon
enum ClassType {
@@ -151,11 +151,11 @@ public:
// you may provide your own icon() implementation to display
// an appropriate Pixmap (e.g. a Palm Pilot or a Zaurus image).
- virtual QString iconFileName() const;
+ virtual TQString iconFileName() const;
// the default Icon set
- static QString defaultIconFileName( ClassType ct = Unclassified );
- static QString defaultClassName( ClassType ct = Unclassified );
+ static TQString defaultIconFileName( ClassType ct = Unclassified );
+ static TQString defaultClassName( ClassType ct = Unclassified );
// The capabilities of this device (bitmapped value)
enum Capabilities {
@@ -167,11 +167,11 @@ public:
hasAnyCapability = 0xffff // used to select devices independent of the capatibilities
};
int capabilities() const;
- const QString nameForCap(int cap) const;
+ const TQString nameForCap(int cap) const;
// returns an error string for the given error code
// See KIO::buildErrorString()
- QString buildErrorString(KIO::Error err, const QString &errorText) const;
+ TQString buildErrorString(KIO::Error err, const TQString &errorText) const;
public:
/*
@@ -192,8 +192,8 @@ public:
* Notes support
*/
virtual int numNotes();
- virtual int readNote( int index, QString &note );
- virtual int storeNote( int index, const QString &note );
+ virtual int readNote( int index, TQString &note );
+ virtual int storeNote( int index, const TQString &note );
@@ -207,10 +207,10 @@ public:
/**
* helper functions for the kmobile device drivers
*/
- void createDirEntry(KIO::UDSEntry& entry, const QString& name,
- const QString& url, const QString& mime) const;
- void createFileEntry(KIO::UDSEntry& entry, const QString& name,
- const QString& url, const QString& mime,
+ void createDirEntry(KIO::UDSEntry& entry, const TQString& name,
+ const TQString& url, const TQString& mime) const;
+ void createFileEntry(KIO::UDSEntry& entry, const TQString& name,
+ const TQString& url, const TQString& mime,
const unsigned long size = 0) const;
/**
* Lists the contents of @p path.
@@ -219,7 +219,7 @@ public:
* It should also emit @ref #totalFiles as soon as it knows how many
* files it will list.
*/
- virtual void listDir( const QString &url );
+ virtual void listDir( const TQString &url );
/**
* Create a directory
@@ -228,7 +228,7 @@ public:
* (-1 if no permissions to be set)
* The slave emits ERR_COULD_NOT_MKDIR if failure.
*/
- virtual void mkdir( const QString &url, int permissions );
+ virtual void mkdir( const TQString &url, int permissions );
/**
* Rename @p oldname into @p newname.
@@ -238,7 +238,7 @@ public:
* @param dest where to move the file to
* @param overwrite if true, any existing file will be overwritten
*/
- virtual void rename( const QString &src, const QString &dest, bool overwrite );
+ virtual void rename( const TQString &src, const TQString &dest, bool overwrite );
/**
* Creates a symbolic link named @p dest, pointing to @p target, which
@@ -247,7 +247,7 @@ public:
* @param dest The symlink to create.
* @param overwrite whether to automatically overwrite if the dest exists
*/
- virtual void symlink( const QString &target, const QString &dest, bool overwrite );
+ virtual void symlink( const TQString &target, const TQString &dest, bool overwrite );
/**
* Delete a file or directory.
@@ -255,20 +255,20 @@ public:
* @param isfile if true, a file should be deleted.
* if false, a directory should be deleted.
*/
- virtual void del( const QString &url, bool isfile);
+ virtual void del( const TQString &url, bool isfile);
/**
* Finds all details for one file or directory.
* The information returned is the same as what @ref #listDir returns,
* but only for one file or directory.
*/
- virtual void stat( const QString &url );
+ virtual void stat( const TQString &url );
/**
* Change permissions on @p path
* The slave emits ERR_DOES_NOT_EXIST or ERR_CANNOT_CHMOD
*/
- virtual void chmod( const QString &url, int permissions );
+ virtual void chmod( const TQString &url, int permissions );
/**
* get, aka read.
@@ -276,7 +276,7 @@ public:
* can be assumed to be the same as in the last setHost() call.
* The slave emits the data through @ref #data
*/
- virtual void get( const QString &url );
+ virtual void get( const TQString &url );
/**
* put, aka write.
@@ -287,7 +287,7 @@ public:
* permissions change to it.
* @param resume
*/
- virtual void put( const QString &url, int permissions, bool overwrite, bool resume );
+ virtual void put( const TQString &url, int permissions, bool overwrite, bool resume );
/**
* Finds mimetype for one file or directory.
@@ -301,7 +301,7 @@ public:
* determining the mimetype on it - this is obviously not a
* good thing in most cases.
*/
- virtual void mimetype( const QString &url );
+ virtual void mimetype( const TQString &url );
/**
* Used for any command that is specific to this slave (protocol)
@@ -311,7 +311,7 @@ public:
* slave, but usually starts with an int for the command number.
* Document your slave's commands, at least in its header file.
*/
- virtual void special( const QByteArray & );
+ virtual void special( const TQByteArray & );
signals:
/**
@@ -351,10 +351,10 @@ signals:
* KIO::AuthInfo authInfo;
* if ( openPassDlg( authInfo ) )
* {
- * kdDebug() << QString::fromLatin1("User: ")
+ * kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << QString::fromLatin1("Password: ")
- * << QString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::fromLatin1("Password: ")
+ * << TQString::fromLatin1("Not displayed here!") << endl;
* }
* </pre>
*
@@ -365,13 +365,13 @@ signals:
* KIO::AuthInfo authInfo;
* authInfo.caption= "Acme Password Dialog";
* authInfo.username= "Wile E. Coyote";
- * QString errorMsg = "You entered an incorrect password.";
+ * TQString errorMsg = "You entered an incorrect password.";
* if ( openPassDlg( authInfo, errorMsg ) )
* {
- * kdDebug() << QString::fromLatin1("User: ")
+ * kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << QString::fromLatin1("Password: ")
- * << QString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::fromLatin1("Password: ")
+ * << TQString::fromLatin1("Not displayed here!") << endl;
* }
* </pre>
*
@@ -383,13 +383,13 @@ signals:
* @return @p TRUE if user clicks on "OK", @p FALSE otherwsie.
* @since 3.1
*/
- bool openPassDlg( KIO::AuthInfo& info, const QString &errorMsg );
+ bool openPassDlg( KIO::AuthInfo& info, const TQString &errorMsg );
/**
* Call this in @ref #mimetype, when you know the mimetype.
* See @ref #mimetype about other ways to implement it.
*/
- void mimeType( const QString &_type );
+ void mimeType( const TQString &_type );
/**
* Call to signal an error.
@@ -408,18 +408,18 @@ signals:
* @param _errid the error code from KIO::Error
* @param _text the rich text error message
*/
- void error( int _errid, const QString &_text );
+ void error( int _errid, const TQString &_text );
/**
* Call to signal a warning, to be displayed in a dialog box.
*/
- void warning( const QString &msg );
+ void warning( const TQString &msg );
/**
* Call to signal a message, to be displayed if the application wants to,
* for instance in a status bar. Usual examples are "connecting to host xyz", etc.
*/
- void infoMessage( const QString &msg );
+ void infoMessage( const TQString &msg );
/**
* Call to signal successful completion of any command
@@ -446,10 +446,10 @@ signals:
* and for Information, none is used.
* @return a button code, as defined in KMessageBox, or 0 on communication error.
*/
- int messageBox( MessageBoxType type, const QString &text,
- const QString &caption = QString::null,
- const QString &buttonYes = QString::null,
- const QString &buttonNo = QString::null );
+ int messageBox( MessageBoxType type, const TQString &text,
+ const TQString &caption = TQString::null,
+ const TQString &buttonYes = TQString::null,
+ const TQString &buttonNo = TQString::null );
/**
* Call this in @ref #get and @ref #copy, to give the total size
@@ -473,7 +473,7 @@ protected:
void setClassType( enum ClassType ct );
void setCapabilities( int caps );
KConfig *config() const { return m_config; };
- QString configFileName() const { return m_configFileName; };
+ TQString configFileName() const { return m_configFileName; };
/**
@@ -481,18 +481,18 @@ protected:
* @param device Name of a device port (e.g. /dev/ttyS1, ttyS1, /dev/ircomm0)
* Returns true, if device could be locked or unlocked
*/
- bool lockDevice(const QString &device, QString &err_reason);
- bool unlockDevice(const QString &device);
+ bool lockDevice(const TQString &device, TQString &err_reason);
+ bool unlockDevice(const TQString &device);
protected:
- QMutex m_mutex; // mutex to syncronize DCOP accesses to this device
- QString m_configFileName;
+ TQMutex m_mutex; // mutex to syncronize DCOP accesses to this device
+ TQString m_configFileName;
KConfig *m_config; // this is where this device should store it's configuration
enum ClassType m_classType;
- QString m_deviceClassName; // e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
- QString m_deviceName; // e.g. "Nokia 6310", "Opie"
- QString m_deviceRevision; // e.g. "Revision 1.2" or "n/a"
- QString m_connectionName; // e.g. "IRDA", "USB", "Cable", "gnokii", "gammu", ...
+ TQString m_deviceClassName; // e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
+ TQString m_deviceName; // e.g. "Nokia 6310", "Opie"
+ TQString m_deviceRevision; // e.g. "Revision 1.2" or "n/a"
+ TQString m_connectionName; // e.g. "IRDA", "USB", "Cable", "gnokii", "gammu", ...
int m_caps; // see enum Capabilities
bool m_connected;
diff --git a/kmobile/kmobileiface.h b/kmobile/kmobileiface.h
index 9447c667c..926c8a6bb 100644
--- a/kmobile/kmobileiface.h
+++ b/kmobile/kmobileiface.h
@@ -6,7 +6,7 @@
#define _KMOBILEIFACE_H_
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QStringList;
@@ -16,40 +16,40 @@ class kmobileIface : virtual public DCOPObject
public:
k_dcop:
- virtual QStringList deviceNames() = 0;
+ virtual TQStringList deviceNames() = 0;
- virtual void removeDevice( QString deviceName ) = 0;
- virtual void configDevice( QString deviceName ) = 0;
+ virtual void removeDevice( TQString deviceName ) = 0;
+ virtual void configDevice( TQString deviceName ) = 0;
- virtual bool connectDevice( QString deviceName ) = 0;
- virtual bool disconnectDevice( QString deviceName ) = 0;
- virtual bool connected( QString deviceName ) = 0;
+ virtual bool connectDevice( TQString deviceName ) = 0;
+ virtual bool disconnectDevice( TQString deviceName ) = 0;
+ virtual bool connected( TQString deviceName ) = 0;
- virtual QString deviceClassName( QString deviceName ) = 0;
- virtual QString deviceName( QString deviceName ) = 0;
- virtual QString revision( QString deviceName ) = 0;
- virtual int classType( QString deviceName ) = 0;
+ virtual TQString deviceClassName( TQString deviceName ) = 0;
+ virtual TQString deviceName( TQString deviceName ) = 0;
+ virtual TQString revision( TQString deviceName ) = 0;
+ virtual int classType( TQString deviceName ) = 0;
- virtual int capabilities( QString deviceName ) = 0;
- virtual QString nameForCap( QString deviceName, int cap ) = 0;
+ virtual int capabilities( TQString deviceName ) = 0;
+ virtual TQString nameForCap( TQString deviceName, int cap ) = 0;
- virtual QString iconFileName( QString deviceName ) = 0;
+ virtual TQString iconFileName( TQString deviceName ) = 0;
- virtual int numAddresses( QString deviceName ) = 0;
- virtual QString readAddress( QString deviceName, int index ) = 0;
- virtual bool storeAddress( QString deviceName, int index, QString vcard, bool append ) = 0;
+ virtual int numAddresses( TQString deviceName ) = 0;
+ virtual TQString readAddress( TQString deviceName, int index ) = 0;
+ virtual bool storeAddress( TQString deviceName, int index, TQString vcard, bool append ) = 0;
- virtual int numCalendarEntries( QString deviceName ) = 0;
+ virtual int numCalendarEntries( TQString deviceName ) = 0;
- virtual int numNotes( QString deviceName ) = 0;
- virtual QString readNote( QString deviceName, int index ) = 0;
- virtual bool storeNote( QString deviceName, int index, QString note ) = 0;
+ virtual int numNotes( TQString deviceName ) = 0;
+ virtual TQString readNote( TQString deviceName, int index ) = 0;
+ virtual bool storeNote( TQString deviceName, int index, TQString note ) = 0;
/*
* DCOP functions for the devices:/ kioslave
*/
k_dcop:
- virtual QStringList kio_devices_deviceInfo(QString deviceName) = 0;
+ virtual TQStringList kio_devices_deviceInfo(TQString deviceName) = 0;
};
#endif // _KMOBILEIFACE_H_
diff --git a/kmobile/kmobileitem.cpp b/kmobile/kmobileitem.cpp
index 0cf61fec7..0e4705c5b 100644
--- a/kmobile/kmobileitem.cpp
+++ b/kmobile/kmobileitem.cpp
@@ -17,7 +17,7 @@
*/
-#include <qobject.h>
+#include <tqobject.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -29,8 +29,8 @@
#define PRINT_DEBUG kdDebug() << "KMobileItem: "
-KMobileItem::KMobileItem(QIconView *parent, KConfig *_config, KService::Ptr service)
- : QObject(parent), QIconViewItem(parent), m_dev(0L)
+KMobileItem::KMobileItem(TQIconView *parent, KConfig *_config, KService::Ptr service)
+ : TQObject(parent), TQIconViewItem(parent), m_dev(0L)
{
config = _config;
@@ -38,7 +38,7 @@ KMobileItem::KMobileItem(QIconView *parent, KConfig *_config, KService::Ptr serv
if (service) {
setText(service->name());
m_deviceDesktopFile = service->desktopEntryName();
- m_deviceConfigFile = QString("kmobile_%1_rc").arg(text());
+ m_deviceConfigFile = TQString("kmobile_%1_rc").arg(text());
m_deviceConfigFile = m_deviceConfigFile.replace(' ', "");
m_iconName = service->icon();
};
@@ -51,8 +51,8 @@ KMobileItem::KMobileItem(QIconView *parent, KConfig *_config, KService::Ptr serv
}
/* restore this item from the config file */
-KMobileItem::KMobileItem(QIconView *parent, KConfig *_config, int reload_index)
- : QObject(parent), QIconViewItem(parent), m_dev(0L)
+KMobileItem::KMobileItem(TQIconView *parent, KConfig *_config, int reload_index)
+ : TQObject(parent), TQIconViewItem(parent), m_dev(0L)
{
config = _config;
@@ -96,19 +96,19 @@ bool KMobileItem::configLoad(int idx)
return true;
}
-QPixmap KMobileItem::getIcon() const
+TQPixmap KMobileItem::getIcon() const
{
return KGlobal::instance()->iconLoader()->loadIcon(m_iconName, KIcon::Desktop );
}
-QString KMobileItem::config_SectionName(int idx) const
+TQString KMobileItem::config_SectionName(int idx) const
{
if (idx == -1) idx = index();
- return QString("MobileDevice_%1").arg(idx);
+ return TQString("MobileDevice_%1").arg(idx);
}
/* this MimeType is used by konqueror */
-QString KMobileItem::getKonquMimeType() const
+TQString KMobileItem::getKonquMimeType() const
{
return KMOBILE_MIMETYPE_DEVICE_KONQUEROR(text());
}
@@ -117,13 +117,13 @@ QString KMobileItem::getKonquMimeType() const
void KMobileItem::writeKonquMimeFile() const
{
// strip path and file extension of icon name
- QString icon = m_iconName;
+ TQString icon = m_iconName;
int p = icon.findRev('/');
if (p>=0) icon = icon.mid(p+1);
p = icon.find('.');
if (p>=0) icon = icon.left(p);
- QString comment;
+ TQString comment;
if (m_dev)
comment = m_dev->deviceClassName();
if (comment.isEmpty())
@@ -161,7 +161,7 @@ KService::Ptr KMobileItem::getServicePtr() const
if (ptr->desktopEntryName() == m_deviceDesktopFile)
return ptr;
}
- PRINT_DEBUG << QString("Service for library '%1' not found in KService list\n")
+ PRINT_DEBUG << TQString("Service for library '%1' not found in KService list\n")
.arg(m_deviceDesktopFile);
return 0L;
}
@@ -178,14 +178,14 @@ bool KMobileItem::driverAvailable()
if (!ptr)
return false;
- PRINT_DEBUG << QString("Loading library %1\n").arg(ptr->library());
+ PRINT_DEBUG << TQString("Loading library %1\n").arg(ptr->library());
KLibFactory *factory = KLibLoader::self()->factory( ptr->library().utf8() );
if (!factory)
return false;
m_dev = static_cast<KMobileDevice *>(factory->create(this, ptr->name().utf8(),
- "KMobileDevice", QStringList(m_deviceConfigFile)));
- PRINT_DEBUG << QString("Got KMobileDevice object at 0x%1, configfile=%2\n")
+ "KMobileDevice", TQStringList(m_deviceConfigFile)));
+ PRINT_DEBUG << TQString("Got KMobileDevice object at 0x%1, configfile=%2\n")
.arg((unsigned long)m_dev, 0, 16).arg(m_deviceConfigFile);
return (m_dev != 0);
diff --git a/kmobile/kmobileitem.h b/kmobile/kmobileitem.h
index b23a8f1e0..2977fda7d 100644
--- a/kmobile/kmobileitem.h
+++ b/kmobile/kmobileitem.h
@@ -5,30 +5,30 @@
#ifndef _KMOBILEITEM_H_
#define _KMOBILEITEM_H_
-#include <qiconview.h>
-#include <qpixmap.h>
+#include <tqiconview.h>
+#include <tqpixmap.h>
#include <ktrader.h>
#include "kmobiledevice.h"
-class KMobileItem : public QObject, public QIconViewItem
+class KMobileItem : public TQObject, public TQIconViewItem
{
Q_OBJECT
friend class KMobileView;
public:
- KMobileItem(QIconView *parent, KConfig *config, KService::Ptr service);
- KMobileItem(QIconView *parent, KConfig *config, int reload_index);
+ KMobileItem(TQIconView *parent, KConfig *config, KService::Ptr service);
+ KMobileItem(TQIconView *parent, KConfig *config, int reload_index);
virtual ~KMobileItem();
void configSave() const;
bool configLoad(int index);
- QString config_SectionName( int idx = -1 ) const;
- QPixmap getIcon() const;
+ TQString config_SectionName( int idx = -1 ) const;
+ TQPixmap getIcon() const;
static KTrader::OfferList getMobileDevicesList();
protected:
- QString getKonquMimeType() const;
+ TQString getKonquMimeType() const;
void writeKonquMimeFile() const;
@@ -43,10 +43,10 @@ private slots:
private:
KConfig *config;
- QString m_deviceConfigFile;
- QString m_deviceDesktopFile;
+ TQString m_deviceConfigFile;
+ TQString m_deviceDesktopFile;
- QString m_iconName;
+ TQString m_iconName;
};
#endif // _KMOBILEITEM_H_
diff --git a/kmobile/kmobileview.cpp b/kmobile/kmobileview.cpp
index dca825abf..616b9edc6 100644
--- a/kmobile/kmobileview.cpp
+++ b/kmobile/kmobileview.cpp
@@ -17,8 +17,8 @@
*/
-#include <qiconview.h>
-#include <qstringlist.h>
+#include <tqiconview.h>
+#include <tqstringlist.h>
#include <ktrader.h>
#include <klibloader.h>
@@ -32,15 +32,15 @@
#include "kmobileitem.h"
-KMobileView::KMobileView(QWidget *parent, KConfig *_config)
- : DCOPObject("kmobileIface"), QIconView(parent)
+KMobileView::KMobileView(TQWidget *parent, KConfig *_config)
+ : DCOPObject("kmobileIface"), TQIconView(parent)
{
m_config = _config;
- setSelectionMode(QIconView::Single);
- setResizeMode(QIconView::Adjust);
+ setSelectionMode(TQIconView::Single);
+ setResizeMode(TQIconView::Adjust);
setAutoArrange(true);
- connect(this, SIGNAL(doubleClicked(QIconViewItem *)),
- SLOT(slotDoubleClicked(QIconViewItem *)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQIconViewItem *)),
+ TQT_SLOT(slotDoubleClicked(TQIconViewItem *)));
}
KMobileView::~KMobileView()
@@ -50,7 +50,7 @@ KMobileView::~KMobileView()
bool KMobileView::addNewDevice(KConfig *config, KService::Ptr service)
{
kdDebug() << "New mobile device item:\n";
- kdDebug() << QString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
+ kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
.arg(service->library()).arg(service->name()).arg(service->icon())
.arg(service->comment());
@@ -66,7 +66,7 @@ void KMobileView::saveAll()
{
m_config->setGroup( "Main" );
m_config->writeEntry( "Entries", count() );
- for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
+ for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
KMobileItem *it = static_cast<KMobileItem *>(item);
it->driverAvailable();
it->configSave();
@@ -89,23 +89,23 @@ void KMobileView::restoreAll()
emit signalChangeStatusbar( i18n("Configuration restored") );
}
-KMobileItem *KMobileView::findDevice( const QString &deviceName ) const
+KMobileItem *KMobileView::findDevice( const TQString &deviceName ) const
{
- for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
+ for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
if (item->text() == deviceName)
return static_cast<KMobileItem *>(item);
}
return 0L;
}
-bool KMobileView::startKonqueror( const QString &devName )
+bool KMobileView::startKonqueror( const TQString &devName )
{
KProcess *proc = new KProcess;
*proc << "kfmclient" << "openProfile" << "webbrowsing" << "mobile:/"+devName;
return proc->start();
}
-void KMobileView::slotDoubleClicked( QIconViewItem * item )
+void KMobileView::slotDoubleClicked( TQIconViewItem * item )
{
startKonqueror(item->text());
}
@@ -119,22 +119,22 @@ void KMobileView::slotDoubleClicked( QIconViewItem * item )
#define MUTEX_UNLOCK(dev) dev->m_mutex.unlock(); }
-QStringList KMobileView::deviceNames()
+TQStringList KMobileView::deviceNames()
{
- QStringList names;
- for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
+ TQStringList names;
+ for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
names.append(item->text());
}
return names;
}
-void KMobileView::removeDevice( QString deviceName )
+void KMobileView::removeDevice( TQString deviceName )
{
delete findDevice(deviceName);
emit signalChangeStatusbar( i18n("%1 removed").arg(deviceName) );
}
-void KMobileView::configDevice( QString deviceName )
+void KMobileView::configDevice( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -145,7 +145,7 @@ void KMobileView::configDevice( QString deviceName )
}
-bool KMobileView::connectDevice( QString deviceName )
+bool KMobileView::connectDevice( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -160,7 +160,7 @@ bool KMobileView::connectDevice( QString deviceName )
return connected;
}
-bool KMobileView::disconnectDevice( QString deviceName )
+bool KMobileView::disconnectDevice( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -175,7 +175,7 @@ bool KMobileView::disconnectDevice( QString deviceName )
return disconnected;
}
-bool KMobileView::connected( QString deviceName )
+bool KMobileView::connected( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -188,43 +188,43 @@ bool KMobileView::connected( QString deviceName )
}
-QString KMobileView::deviceClassName( QString deviceName )
+TQString KMobileView::deviceClassName( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString cn;
+ return TQString::null;
+ TQString cn;
MUTEX_LOCK(dev->m_dev);
cn = dev->m_dev->deviceClassName();
MUTEX_UNLOCK(dev->m_dev);
return cn;
}
-QString KMobileView::deviceName( QString deviceName )
+TQString KMobileView::deviceName( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString dn;
+ return TQString::null;
+ TQString dn;
MUTEX_LOCK(dev->m_dev);
dn = dev->m_dev->deviceName();
MUTEX_UNLOCK(dev->m_dev);
return dn;
}
-QString KMobileView::revision( QString deviceName )
+TQString KMobileView::revision( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString rev;
+ return TQString::null;
+ TQString rev;
MUTEX_LOCK(dev->m_dev);
rev = dev->m_dev->revision();
MUTEX_UNLOCK(dev->m_dev);
return rev;
}
-int KMobileView::classType( QString deviceName )
+int KMobileView::classType( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -236,7 +236,7 @@ int KMobileView::classType( QString deviceName )
return ct;
}
-int KMobileView::capabilities( QString deviceName )
+int KMobileView::capabilities( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -248,31 +248,31 @@ int KMobileView::capabilities( QString deviceName )
return cap;
}
-QString KMobileView::nameForCap( QString deviceName, int cap )
+TQString KMobileView::nameForCap( TQString deviceName, int cap )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString nc;
+ return TQString::null;
+ TQString nc;
MUTEX_LOCK(dev->m_dev);
nc = dev->m_dev->nameForCap(cap);
MUTEX_UNLOCK(dev->m_dev);
return nc;
}
-QString KMobileView::iconFileName( QString deviceName )
+TQString KMobileView::iconFileName( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString fn;
+ return TQString::null;
+ TQString fn;
MUTEX_LOCK(dev->m_dev);
fn = dev->m_dev->iconFileName();
MUTEX_UNLOCK(dev->m_dev);
return fn;
}
-int KMobileView::numAddresses( QString deviceName )
+int KMobileView::numAddresses( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -284,11 +284,11 @@ int KMobileView::numAddresses( QString deviceName )
return num;
}
-QString KMobileView::readAddress( QString deviceName, int index )
+TQString KMobileView::readAddress( TQString deviceName, int index )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
+ return TQString::null;
int err;
KABC::Addressee adr;
@@ -296,12 +296,12 @@ QString KMobileView::readAddress( QString deviceName, int index )
err = dev->m_dev->readAddress(index, adr);
MUTEX_UNLOCK(dev->m_dev);
if (err)
- return QString::null;
+ return TQString::null;
KABC::VCardConverter converter;
- QString str = converter.createVCard(adr);
+ TQString str = converter.createVCard(adr);
if (str.isEmpty())
- return QString::null;
+ return TQString::null;
emit signalChangeStatusbar( i18n("Read addressbook entry %1 from %2")
.arg(index).arg(deviceName) );
@@ -309,7 +309,7 @@ QString KMobileView::readAddress( QString deviceName, int index )
return str;
}
-bool KMobileView::storeAddress( QString deviceName, int index, QString vcard, bool append )
+bool KMobileView::storeAddress( TQString deviceName, int index, TQString vcard, bool append )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -330,7 +330,7 @@ bool KMobileView::storeAddress( QString deviceName, int index, QString vcard, bo
return (err == 0);
}
-int KMobileView::numCalendarEntries( QString deviceName )
+int KMobileView::numCalendarEntries( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -342,7 +342,7 @@ int KMobileView::numCalendarEntries( QString deviceName )
return num;
}
-int KMobileView::numNotes( QString deviceName )
+int KMobileView::numNotes( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -354,25 +354,25 @@ int KMobileView::numNotes( QString deviceName )
return num;
}
-QString KMobileView::readNote( QString deviceName, int index )
+TQString KMobileView::readNote( TQString deviceName, int index )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
+ return TQString::null;
- QString note;
+ TQString note;
int err;
MUTEX_LOCK(dev->m_dev);
err = dev->m_dev->readNote(index, note);
MUTEX_UNLOCK(dev->m_dev);
if (err)
- return QString::null;
+ return TQString::null;
emit signalChangeStatusbar( i18n("Read note %1 from %2")
.arg(index).arg(deviceName) );
return note;
}
-bool KMobileView::storeNote( QString deviceName, int index, QString note )
+bool KMobileView::storeNote( TQString deviceName, int index, TQString note )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -397,22 +397,22 @@ bool KMobileView::storeNote( QString deviceName, int index, QString note )
/*
* returns the information for the given deviceName for usage in the
- * the devices kioslave. The QStringList returned is comparable to the
+ * the devices kioslave. The TQStringList returned is comparable to the
* format of /etc/fstab file. Please refer to the devices kioslave for
* further information.
* If deviceName is empty, this functions returns information for all
* active mobile devices.
* (function is only used by the devices kioslave - don't use elsewhere !)
*/
-QStringList KMobileView::kio_devices_deviceInfo(QString deviceName)
+TQStringList KMobileView::kio_devices_deviceInfo(TQString deviceName)
{
- QStringList mobiles = deviceNames();
+ TQStringList mobiles = deviceNames();
if (mobiles.count() == 0)
return mobiles;
- QStringList mountList;
- for ( QStringList::Iterator it = mobiles.begin(); it != mobiles.end(); ++it ) {
- QString name = *it;
+ TQStringList mountList;
+ for ( TQStringList::Iterator it = mobiles.begin(); it != mobiles.end(); ++it ) {
+ TQString name = *it;
if (deviceName.isEmpty())
mountList << name;
@@ -421,11 +421,11 @@ QStringList KMobileView::kio_devices_deviceInfo(QString deviceName)
continue;
KMobileItem *dev = findDevice(name);
- QString mime = dev ? dev->getKonquMimeType() : KMOBILE_MIMETYPE_DEVICE;
+ TQString mime = dev ? dev->getKonquMimeType() : KMOBILE_MIMETYPE_DEVICE;
mountList << name;
mountList << " ";
- mountList << QString("mobile:/%1").arg(name); // KIO::encodeFileName()
+ mountList << TQString("mobile:/%1").arg(name); // KIO::encodeFileName()
mountList << mime;
mountList << "true"; // mountState
mountList << "---";
diff --git a/kmobile/kmobileview.h b/kmobile/kmobileview.h
index 4e18793cc..079eaf925 100644
--- a/kmobile/kmobileview.h
+++ b/kmobile/kmobileview.h
@@ -5,7 +5,7 @@
#ifndef _KMOBILEVIEW_H_
#define _KMOBILEVIEW_H_
-#include <qiconview.h>
+#include <tqiconview.h>
#include "kmobileiface.h"
@@ -20,66 +20,66 @@ class KMobileItem;
* @author Helge Deller <deller@kde.org>
* @version 0.1
*/
-class KDE_EXPORT KMobileView : public QIconView, public kmobileIface
+class KDE_EXPORT KMobileView : public TQIconView, public kmobileIface
{
Q_OBJECT
public:
- KMobileView(QWidget *parent, KConfig *_config);
+ KMobileView(TQWidget *parent, KConfig *_config);
virtual ~KMobileView();
bool addNewDevice(KConfig *config, KService::Ptr service);
- bool startKonqueror(const QString &devName);
+ bool startKonqueror(const TQString &devName);
/**
* DCOP implementation
*/
- QStringList deviceNames();
+ TQStringList deviceNames();
- void removeDevice( QString deviceName );
- void configDevice( QString deviceName );
+ void removeDevice( TQString deviceName );
+ void configDevice( TQString deviceName );
- bool connectDevice( QString deviceName );
- bool disconnectDevice( QString deviceName );
- bool connected( QString deviceName );
+ bool connectDevice( TQString deviceName );
+ bool disconnectDevice( TQString deviceName );
+ bool connected( TQString deviceName );
- QString deviceClassName( QString deviceName );
- QString deviceName( QString deviceName );
- QString revision( QString deviceName );
- int classType( QString deviceName );
+ TQString deviceClassName( TQString deviceName );
+ TQString deviceName( TQString deviceName );
+ TQString revision( TQString deviceName );
+ int classType( TQString deviceName );
- int capabilities( QString deviceName );
- QString nameForCap( QString deviceName, int cap );
+ int capabilities( TQString deviceName );
+ TQString nameForCap( TQString deviceName, int cap );
- QString iconFileName( QString deviceName );
+ TQString iconFileName( TQString deviceName );
- int numAddresses( QString deviceName );
- QString readAddress( QString deviceName, int index );
- bool storeAddress( QString deviceName, int index, QString vcard, bool append );
+ int numAddresses( TQString deviceName );
+ TQString readAddress( TQString deviceName, int index );
+ bool storeAddress( TQString deviceName, int index, TQString vcard, bool append );
- int numCalendarEntries( QString deviceName );
+ int numCalendarEntries( TQString deviceName );
- int numNotes( QString deviceName );
- QString readNote( QString deviceName, int index );
- bool storeNote( QString deviceName, int index, QString note );
+ int numNotes( TQString deviceName );
+ TQString readNote( TQString deviceName, int index );
+ bool storeNote( TQString deviceName, int index, TQString note );
/* devices kioslave support: */
- QStringList kio_devices_deviceInfo(QString deviceName);
+ TQStringList kio_devices_deviceInfo(TQString deviceName);
public:
void saveAll();
void restoreAll();
protected:
- KMobileItem * findDevice( const QString &deviceName ) const;
+ KMobileItem * findDevice( const TQString &deviceName ) const;
protected slots:
- void slotDoubleClicked( QIconViewItem * item );
+ void slotDoubleClicked( TQIconViewItem * item );
signals:
/**
* Use this signal to change the content of the statusbar
*/
- void signalChangeStatusbar(const QString& text);
+ void signalChangeStatusbar(const TQString& text);
private:
KConfig *m_config;
diff --git a/kmobile/pref.cpp b/kmobile/pref.cpp
index 1d463cb34..6b5a02309 100644
--- a/kmobile/pref.cpp
+++ b/kmobile/pref.cpp
@@ -6,8 +6,8 @@
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
KMobilePreferences::KMobilePreferences()
: KDialogBase(TreeList, i18n("Preferences"),
@@ -16,7 +16,7 @@ KMobilePreferences::KMobilePreferences()
// this is the base class for your preferences dialog. it is now
// a Treelist dialog.. but there are a number of other
// possibilities (including Tab, Swallow, and just Plain)
- QFrame *frame;
+ TQFrame *frame;
frame = addPage(i18n("First Page"), i18n("Page One Options"));
m_pageOne = new KMobilePrefPageOne(frame);
@@ -24,21 +24,21 @@ KMobilePreferences::KMobilePreferences()
m_pageTwo = new KMobilePrefPageTwo(frame);
}
-KMobilePrefPageOne::KMobilePrefPageOne(QWidget *parent)
- : QFrame(parent)
+KMobilePrefPageOne::KMobilePrefPageOne(TQWidget *parent)
+ : TQFrame(parent)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true);
- new QLabel(i18n("Add something here"), this);
+ new TQLabel(i18n("Add something here"), this);
}
-KMobilePrefPageTwo::KMobilePrefPageTwo(QWidget *parent)
- : QFrame(parent)
+KMobilePrefPageTwo::KMobilePrefPageTwo(TQWidget *parent)
+ : TQFrame(parent)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true);
- new QLabel(i18n("Add something here"), this);
+ new TQLabel(i18n("Add something here"), this);
}
#include "pref.moc"
diff --git a/kmobile/pref.h b/kmobile/pref.h
index b8786a855..0b6415a30 100644
--- a/kmobile/pref.h
+++ b/kmobile/pref.h
@@ -6,7 +6,7 @@
#define _KMOBILEPREF_H_
#include <kdialogbase.h>
-#include <qframe.h>
+#include <tqframe.h>
class KMobilePrefPageOne;
class KMobilePrefPageTwo;
@@ -26,14 +26,14 @@ class KMobilePrefPageOne : public QFrame
{
Q_OBJECT
public:
- KMobilePrefPageOne(QWidget *parent = 0);
+ KMobilePrefPageOne(TQWidget *parent = 0);
};
class KMobilePrefPageTwo : public QFrame
{
Q_OBJECT
public:
- KMobilePrefPageTwo(QWidget *parent = 0);
+ KMobilePrefPageTwo(TQWidget *parent = 0);
};
#endif // _KMOBILEPREF_H_
diff --git a/kmobile/systemtray.cpp b/kmobile/systemtray.cpp
index b057086e4..01f21c8a5 100644
--- a/kmobile/systemtray.cpp
+++ b/kmobile/systemtray.cpp
@@ -24,10 +24,10 @@
#include <kiconeffect.h>
#include <kdebug.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qpainter.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
#include "systemtray.h"
@@ -68,22 +68,22 @@ void SystemTray::contextMenuAboutToShow(KPopupMenu *menu)
menu->removeItemAt(pos);
// create menu entries for each mobile device and add it's icon
- QStringList list = main->mainView()->deviceNames();
+ TQStringList list = main->mainView()->deviceNames();
for (unsigned int no=0; no<list.count(); no++) {
- QString devName = list[no];
- QString iconName = main->mainView()->iconFileName(devName);
- QPixmap pm = KGlobal::instance()->iconLoader()->loadIcon(iconName, KIcon::Small);
+ TQString devName = list[no];
+ TQString iconName = main->mainView()->iconFileName(devName);
+ TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon(iconName, KIcon::Small);
menu->insertItem(pm, devName, SYSTEMTRAY_STARTID+no, 3+no);
- menu->connectItem(SYSTEMTRAY_STARTID+no, this, SLOT(menuItemSelected()));
+ menu->connectItem(SYSTEMTRAY_STARTID+no, this, TQT_SLOT(menuItemSelected()));
}
- connect(menu, SIGNAL(activated(int)), this, SLOT(menuItemActivated(int)));
+ connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int)));
}
void SystemTray::menuItemSelected()
{
if (m_menuID<SYSTEMTRAY_STARTID || m_menuID>SYSTEMTRAY_STARTID+1000)
return;
- QString devName = contextMenu()->text(m_menuID);
+ TQString devName = contextMenu()->text(m_menuID);
KMobile *main = static_cast<KMobile *>(parent());
main->mainView()->startKonqueror(devName);
}
@@ -93,12 +93,12 @@ void SystemTray::menuItemActivated(int id)
m_menuID = id;
}
-void SystemTray::setToolTip(const QString &tip)
+void SystemTray::setToolTip(const TQString &tip)
{
if (tip.isEmpty())
- QToolTip::add(this, "KMobile");
+ TQToolTip::add(this, "KMobile");
else
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
}
#include "systemtray.moc"
diff --git a/kmobile/systemtray.h b/kmobile/systemtray.h
index 2a4cae924..4fdef04ca 100644
--- a/kmobile/systemtray.h
+++ b/kmobile/systemtray.h
@@ -41,10 +41,10 @@ protected:
void contextMenuAboutToShow( KPopupMenu* menu );
private:
- void setToolTip(const QString &tip = QString::null);
+ void setToolTip(const TQString &tip = TQString::null);
- QPixmap m_appPix;
- QLabel *m_currentLabel;
+ TQPixmap m_appPix;
+ TQLabel *m_currentLabel;
KActionCollection *m_actionCollection;
int m_menuID;
diff --git a/kmobile/testlibkmobile.cpp b/kmobile/testlibkmobile.cpp
index f89d3871f..e8ff85580 100644
--- a/kmobile/testlibkmobile.cpp
+++ b/kmobile/testlibkmobile.cpp
@@ -5,8 +5,8 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qdatastream.h>
-#include <qstring.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
#include <kdebug.h>
int main(int argc, char **argv)
@@ -19,22 +19,22 @@ int main(int argc, char **argv)
DCOPClient *client = app.dcopClient();
client->attach();
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
-// ds << QString("a");
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
+// ds << TQString("a");
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
ok = client->call("kmobile", "kmobileIface", "deviceNames()", data, replyType, replyData);
- QDataStream reply(replyData, IO_ReadOnly);
- QStringList deviceNames;
+ TQDataStream reply(replyData, IO_ReadOnly);
+ TQStringList deviceNames;
reply >> deviceNames;
- kdDebug() << QString("%1\n").arg(ok?"Ok":"Failure");
- kdDebug() << QString("Number of currently registered drivers: %1\n").arg(deviceNames.count());
+ kdDebug() << TQString("%1\n").arg(ok?"Ok":"Failure");
+ kdDebug() << TQString("Number of currently registered drivers: %1\n").arg(deviceNames.count());
for (int i=0; i<deviceNames.count(); i++)
- kdDebug() << QString("Device %1: %2\n").arg(i+1).arg(deviceNames[i]);
+ kdDebug() << TQString("Device %1: %2\n").arg(i+1).arg(deviceNames[i]);
// return app.exec();
}