diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 19:21:21 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 19:21:21 +0000 |
commit | d8cc8bdfa7fa624a526d5aa1626974e1444cb799 (patch) | |
tree | f295f1c545b319963d5357af79fe08991d8141d9 /libk3b/tools/k3bdevicecombobox.cpp | |
parent | 2a39a080579fb52a2599c02b2939795385b89093 (diff) | |
download | k3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.tar.gz k3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.zip |
TQt4 port k3b
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1233803 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libk3b/tools/k3bdevicecombobox.cpp')
-rw-r--r-- | libk3b/tools/k3bdevicecombobox.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libk3b/tools/k3bdevicecombobox.cpp b/libk3b/tools/k3bdevicecombobox.cpp index 165b59d..e6ce8ce 100644 --- a/libk3b/tools/k3bdevicecombobox.cpp +++ b/libk3b/tools/k3bdevicecombobox.cpp @@ -20,26 +20,26 @@ #include <klocale.h> -#include <qmap.h> -#include <qptrvector.h> +#include <tqmap.h> +#include <tqptrvector.h> class K3bDeviceComboBox::Private { public: - QMap<QString, int> deviceIndexMap; - QPtrVector<K3bDevice::Device> devices; + TQMap<TQString, int> deviceIndexMap; + TQPtrVector<K3bDevice::Device> devices; }; -K3bDeviceComboBox::K3bDeviceComboBox( QWidget* parent, const char* name ) - : KComboBox( parent, name ) +K3bDeviceComboBox::K3bDeviceComboBox( TQWidget* tqparent, const char* name ) + : KComboBox( tqparent, name ) { d = new Private(); - connect( this, SIGNAL(activated(int)), - this, SLOT(slotActivated(int)) ); - connect( k3bcore->deviceManager(), SIGNAL(changed(K3bDevice::DeviceManager*)), - this, SLOT(slotDeviceManagerChanged(K3bDevice::DeviceManager*)) ); + connect( this, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotActivated(int)) ); + connect( k3bcore->deviceManager(), TQT_SIGNAL(changed(K3bDevice::DeviceManager*)), + this, TQT_SLOT(slotDeviceManagerChanged(K3bDevice::DeviceManager*)) ); } @@ -96,10 +96,10 @@ void K3bDeviceComboBox::addDevice( K3bDevice::Device* dev ) void K3bDeviceComboBox::removeDevice( K3bDevice::Device* dev ) { if( dev ) { - if( d->deviceIndexMap.contains(dev->devicename()) ) { + if( d->deviceIndexMap.tqcontains(dev->devicename()) ) { // let's make it easy and recreate the whole list K3bDevice::Device* selDev = selectedDevice(); - QPtrList<K3bDevice::Device> devices; + TQPtrList<K3bDevice::Device> devices; for( unsigned int i = 0; i < d->devices.size(); ++i ) devices.append( d->devices[i] ); @@ -114,19 +114,19 @@ void K3bDeviceComboBox::removeDevice( K3bDevice::Device* dev ) } -void K3bDeviceComboBox::addDevices( const QPtrList<K3bDevice::Device>& list ) +void K3bDeviceComboBox::addDevices( const TQPtrList<K3bDevice::Device>& list ) { - for( QPtrListIterator<K3bDevice::Device> it( list ); + for( TQPtrListIterator<K3bDevice::Device> it( list ); it.current(); ++it ) addDevice( it.current() ); } -void K3bDeviceComboBox::refreshDevices( const QPtrList<K3bDevice::Device>& list ) +void K3bDeviceComboBox::refreshDevices( const TQPtrList<K3bDevice::Device>& list ) { K3bDevice::Device* selDev = selectedDevice(); clear(); - if( !list.containsRef( selDev ) ) + if( !list.tqcontainsRef( selDev ) ) selDev = 0; addDevices( list ); setSelectedDevice( selDev ); @@ -136,7 +136,7 @@ void K3bDeviceComboBox::refreshDevices( const QPtrList<K3bDevice::Device>& list void K3bDeviceComboBox::setSelectedDevice( K3bDevice::Device* dev ) { if( dev ) { - if( d->deviceIndexMap.contains(dev->devicename()) ) { + if( d->deviceIndexMap.tqcontains(dev->devicename()) ) { setCurrentItem( d->deviceIndexMap[dev->devicename()] ); emit selectionChanged( dev ); } @@ -162,7 +162,7 @@ void K3bDeviceComboBox::slotDeviceManagerChanged( K3bDevice::DeviceManager* dm ) { unsigned int i = 0; while( i < d->devices.size() ) { - if( !dm->allDevices().containsRef( d->devices[i] ) ) { + if( !dm->allDevices().tqcontainsRef( d->devices[i] ) ) { removeDevice( d->devices[i] ); i = 0; } |