diff options
Diffstat (limited to 'kmobile/kmobileview.cpp')
-rw-r--r-- | kmobile/kmobileview.cpp | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/kmobile/kmobileview.cpp b/kmobile/kmobileview.cpp index 616b9edc6..7a83f52ef 100644 --- a/kmobile/kmobileview.cpp +++ b/kmobile/kmobileview.cpp @@ -32,8 +32,8 @@ #include "kmobileitem.h" -KMobileView::KMobileView(TQWidget *parent, KConfig *_config) - : DCOPObject("kmobileIface"), TQIconView(parent) +KMobileView::KMobileView(TQWidget *tqparent, KConfig *_config) + : DCOPObject("kmobileIface"), TQIconView(tqparent) { m_config = _config; setSelectionMode(TQIconView::Single); @@ -49,7 +49,7 @@ KMobileView::~KMobileView() bool KMobileView::addNewDevice(KConfig *config, KService::Ptr service) { - kdDebug() << "New mobile device item:\n"; + kdDebug() << "New mobile tqdevice item:\n"; kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n") .arg(service->library()).arg(service->name()).arg(service->icon()) .arg(service->comment()); @@ -89,10 +89,10 @@ void KMobileView::restoreAll() emit signalChangeStatusbar( i18n("Configuration restored") ); } -KMobileItem *KMobileView::findDevice( const TQString &deviceName ) const +KMobileItem *KMobileView::findDevice( const TQString &tqdeviceName ) const { for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) { - if (item->text() == deviceName) + if (item->text() == tqdeviceName) return static_cast<KMobileItem *>(item); } return 0L; @@ -119,7 +119,7 @@ void KMobileView::slotDoubleClicked( TQIconViewItem * item ) #define MUTEX_UNLOCK(dev) dev->m_mutex.unlock(); } -TQStringList KMobileView::deviceNames() +TQStringList KMobileView::tqdeviceNames() { TQStringList names; for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) { @@ -128,15 +128,15 @@ TQStringList KMobileView::deviceNames() return names; } -void KMobileView::removeDevice( TQString deviceName ) +void KMobileView::removeDevice( TQString tqdeviceName ) { - delete findDevice(deviceName); - emit signalChangeStatusbar( i18n("%1 removed").arg(deviceName) ); + delete findDevice(tqdeviceName); + emit signalChangeStatusbar( i18n("%1 removed").arg(tqdeviceName) ); } -void KMobileView::configDevice( TQString deviceName ) +void KMobileView::configDevice( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return; MUTEX_LOCK(dev->m_dev); @@ -145,9 +145,9 @@ void KMobileView::configDevice( TQString deviceName ) } -bool KMobileView::connectDevice( TQString deviceName ) +bool KMobileView::connectDevice( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return false; bool connected; @@ -155,14 +155,14 @@ bool KMobileView::connectDevice( TQString deviceName ) connected = dev->m_dev->connectDevice(); MUTEX_UNLOCK(dev->m_dev); emit signalChangeStatusbar( - connected ? i18n("Connection to %1 established").arg(deviceName) - : i18n("Connection to %1 failed").arg(deviceName) ); + connected ? i18n("Connection to %1 established").arg(tqdeviceName) + : i18n("Connection to %1 failed").arg(tqdeviceName) ); return connected; } -bool KMobileView::disconnectDevice( TQString deviceName ) +bool KMobileView::disconnectDevice( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return true; bool disconnected; @@ -170,14 +170,14 @@ bool KMobileView::disconnectDevice( TQString deviceName ) disconnected = dev->m_dev->disconnectDevice(); MUTEX_UNLOCK(dev->m_dev); emit signalChangeStatusbar( - disconnected ? i18n("%1 disconnected").arg(deviceName) - : i18n("Disconnection of %1 failed").arg(deviceName) ); + disconnected ? i18n("%1 disconnected").arg(tqdeviceName) + : i18n("Disconnection of %1 failed").arg(tqdeviceName) ); return disconnected; } -bool KMobileView::connected( TQString deviceName ) +bool KMobileView::connected( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return false; bool conn; @@ -188,35 +188,35 @@ bool KMobileView::connected( TQString deviceName ) } -TQString KMobileView::deviceClassName( TQString deviceName ) +TQString KMobileView::tqdeviceClassName( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) - return TQString::null; + return TQString(); TQString cn; MUTEX_LOCK(dev->m_dev); - cn = dev->m_dev->deviceClassName(); + cn = dev->m_dev->tqdeviceClassName(); MUTEX_UNLOCK(dev->m_dev); return cn; } -TQString KMobileView::deviceName( TQString deviceName ) +TQString KMobileView::tqdeviceName( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) - return TQString::null; + return TQString(); TQString dn; MUTEX_LOCK(dev->m_dev); - dn = dev->m_dev->deviceName(); + dn = dev->m_dev->tqdeviceName(); MUTEX_UNLOCK(dev->m_dev); return dn; } -TQString KMobileView::revision( TQString deviceName ) +TQString KMobileView::revision( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) - return TQString::null; + return TQString(); TQString rev; MUTEX_LOCK(dev->m_dev); rev = dev->m_dev->revision(); @@ -224,9 +224,9 @@ TQString KMobileView::revision( TQString deviceName ) return rev; } -int KMobileView::classType( TQString deviceName ) +int KMobileView::classType( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return KMobileDevice::Unclassified; int ct; @@ -236,9 +236,9 @@ int KMobileView::classType( TQString deviceName ) return ct; } -int KMobileView::capabilities( TQString deviceName ) +int KMobileView::capabilities( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return KMobileDevice::hasNothing; int cap; @@ -248,11 +248,11 @@ int KMobileView::capabilities( TQString deviceName ) return cap; } -TQString KMobileView::nameForCap( TQString deviceName, int cap ) +TQString KMobileView::nameForCap( TQString tqdeviceName, int cap ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) - return TQString::null; + return TQString(); TQString nc; MUTEX_LOCK(dev->m_dev); nc = dev->m_dev->nameForCap(cap); @@ -260,11 +260,11 @@ TQString KMobileView::nameForCap( TQString deviceName, int cap ) return nc; } -TQString KMobileView::iconFileName( TQString deviceName ) +TQString KMobileView::iconFileName( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) - return TQString::null; + return TQString(); TQString fn; MUTEX_LOCK(dev->m_dev); fn = dev->m_dev->iconFileName(); @@ -272,9 +272,9 @@ TQString KMobileView::iconFileName( TQString deviceName ) return fn; } -int KMobileView::numAddresses( TQString deviceName ) +int KMobileView::numAddresses( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return 0; int num; @@ -284,11 +284,11 @@ int KMobileView::numAddresses( TQString deviceName ) return num; } -TQString KMobileView::readAddress( TQString deviceName, int index ) +TQString KMobileView::readAddress( TQString tqdeviceName, int index ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) - return TQString::null; + return TQString(); int err; KABC::Addressee adr; @@ -296,22 +296,22 @@ TQString KMobileView::readAddress( TQString deviceName, int index ) err = dev->m_dev->readAddress(index, adr); MUTEX_UNLOCK(dev->m_dev); if (err) - return TQString::null; + return TQString(); KABC::VCardConverter converter; TQString str = converter.createVCard(adr); if (str.isEmpty()) - return TQString::null; + return TQString(); emit signalChangeStatusbar( i18n("Read addressbook entry %1 from %2") - .arg(index).arg(deviceName) ); + .arg(index).arg(tqdeviceName) ); return str; } -bool KMobileView::storeAddress( TQString deviceName, int index, TQString vcard, bool append ) +bool KMobileView::storeAddress( TQString tqdeviceName, int index, TQString vcard, bool append ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return false; @@ -325,14 +325,14 @@ bool KMobileView::storeAddress( TQString deviceName, int index, TQString vcard, err = dev->m_dev->storeAddress(index, adr, append); MUTEX_UNLOCK(dev->m_dev); emit signalChangeStatusbar( - err ? i18n("Storing contact %1 on %2 failed").arg(index).arg(deviceName) - : i18n("Contact %1 stored on %2").arg(index).arg(deviceName) ); + err ? i18n("Storing contact %1 on %2 failed").arg(index).arg(tqdeviceName) + : i18n("Contact %1 stored on %2").arg(index).arg(tqdeviceName) ); return (err == 0); } -int KMobileView::numCalendarEntries( TQString deviceName ) +int KMobileView::numCalendarEntries( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return 0; int num; @@ -342,9 +342,9 @@ int KMobileView::numCalendarEntries( TQString deviceName ) return num; } -int KMobileView::numNotes( TQString deviceName ) +int KMobileView::numNotes( TQString tqdeviceName ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return 0; int num; @@ -354,11 +354,11 @@ int KMobileView::numNotes( TQString deviceName ) return num; } -TQString KMobileView::readNote( TQString deviceName, int index ) +TQString KMobileView::readNote( TQString tqdeviceName, int index ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) - return TQString::null; + return TQString(); TQString note; int err; @@ -366,15 +366,15 @@ TQString KMobileView::readNote( TQString deviceName, int index ) err = dev->m_dev->readNote(index, note); MUTEX_UNLOCK(dev->m_dev); if (err) - return TQString::null; + return TQString(); emit signalChangeStatusbar( i18n("Read note %1 from %2") - .arg(index).arg(deviceName) ); + .arg(index).arg(tqdeviceName) ); return note; } -bool KMobileView::storeNote( TQString deviceName, int index, TQString note ) +bool KMobileView::storeNote( TQString tqdeviceName, int index, TQString note ) { - KMobileItem *dev = findDevice(deviceName); + KMobileItem *dev = findDevice(tqdeviceName); if (!dev || !dev->driverAvailable()) return false; @@ -385,28 +385,28 @@ bool KMobileView::storeNote( TQString deviceName, int index, TQString note ) if (err) return false; emit signalChangeStatusbar( i18n("Stored note %1 to %2") - .arg(index).arg(deviceName) ); + .arg(index).arg(tqdeviceName) ); return true; } /* - * DCOP Implementation for the devices:/ kioslave + * DCOP Implementation for the tqdevices:/ kioslave */ /* - * returns the information for the given deviceName for usage in the - * the devices kioslave. The TQStringList returned is comparable to the - * format of /etc/fstab file. Please refer to the devices kioslave for + * returns the information for the given tqdeviceName for usage in the + * the tqdevices kioslave. The TQStringList returned is comparable to the + * format of /etc/fstab file. Please refer to the tqdevices 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 !) + * If tqdeviceName is empty, this functions returns information for all + * active mobile tqdevices. + * (function is only used by the tqdevices kioslave - don't use elsewhere !) */ -TQStringList KMobileView::kio_devices_deviceInfo(TQString deviceName) +TQStringList KMobileView::kio_tqdevices_tqdeviceInfo(TQString tqdeviceName) { - TQStringList mobiles = deviceNames(); + TQStringList mobiles = tqdeviceNames(); if (mobiles.count() == 0) return mobiles; @@ -414,10 +414,10 @@ TQStringList KMobileView::kio_devices_deviceInfo(TQString deviceName) for ( TQStringList::Iterator it = mobiles.begin(); it != mobiles.end(); ++it ) { TQString name = *it; - if (deviceName.isEmpty()) + if (tqdeviceName.isEmpty()) mountList << name; else - if (deviceName!=name) + if (tqdeviceName!=name) continue; KMobileItem *dev = findDevice(name); @@ -429,7 +429,7 @@ TQStringList KMobileView::kio_devices_deviceInfo(TQString deviceName) mountList << mime; mountList << "true"; // mountState mountList << "---"; - if (!deviceName.isEmpty()) + if (!tqdeviceName.isEmpty()) break; } return mountList; |