summaryrefslogtreecommitdiffstats
path: root/kmobile/kmobileview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmobile/kmobileview.cpp')
-rw-r--r--kmobile/kmobileview.cpp122
1 files changed, 61 insertions, 61 deletions
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 << "---";