summaryrefslogtreecommitdiffstats
path: root/k9devices/k9cddrive.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 23:37:00 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 23:37:00 +0000
commitb0e912c8b3d02a518fedda28c3180eb4794a7520 (patch)
tree07d344862562fab58cbe2df39d13d16f2e4d2bea /k9devices/k9cddrive.cpp
parent4d695ec81fe4d4335ee82c7a9346ad9c9e144ecc (diff)
downloadk9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.tar.gz
k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.zip
TQt4 convert k9copy
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'k9devices/k9cddrive.cpp')
-rw-r--r--k9devices/k9cddrive.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/k9devices/k9cddrive.cpp b/k9devices/k9cddrive.cpp
index 0a47b70..5fdf0bf 100644
--- a/k9devices/k9cddrive.cpp
+++ b/k9devices/k9cddrive.cpp
@@ -35,12 +35,12 @@ k9CdDrive::k9CdDrive() {
}
k9CdDrive::~k9CdDrive() {}
-k9CdDrives::k9CdDrives():QObject( 0,0) {
+k9CdDrives::k9CdDrives():TQObject( 0,0) {
drives.setAutoDelete(true);
#ifdef HAVE_HAL
m_connection=k9HalConnection::getInstance();
- connect(m_connection,SIGNAL(deviceAdded( k9HalDevice* )),this,SLOT(deviceAdded( k9HalDevice* )));
- connect(m_connection,SIGNAL(deviceRemoved( k9HalDevice* )),this,SLOT(deviceRemoved( k9HalDevice*)));
+ connect(m_connection,TQT_SIGNAL(deviceAdded( k9HalDevice* )),this,TQT_SLOT(deviceAdded( k9HalDevice* )));
+ connect(m_connection,TQT_SIGNAL(deviceRemoved( k9HalDevice* )),this,TQT_SLOT(deviceRemoved( k9HalDevice*)));
#else
m_devMgr=new K3bDevice::DeviceManager(this);
@@ -81,7 +81,7 @@ void k9CdDrives::addDrive(k9HalDevice *_device) {
drive->canWriteCDR=_device->getCanBurnCd();
drive->device=_device->getDeviceName();
drive->name=_device->getModel();
- QValueList <int> writeSpeeds;
+ TQValueList <int> writeSpeeds;
for (int i=2;i <=_device->getMaxWriteSpeed()/1385;i+=2)
writeSpeeds.append( i);
drive->setWriteSpeeds(writeSpeeds);
@@ -96,7 +96,7 @@ void k9CdDrives::scanDrives() {
drives.clear();
#ifdef HAVE_HAL
- QPtrList <k9HalDevice> list=m_connection->getDevices();
+ TQPtrList <k9HalDevice> list=m_connection->getDevices();
for (k9HalDevice *hdrive=list.first();hdrive;hdrive=list.next()) {
addDrive(hdrive);
@@ -104,7 +104,7 @@ void k9CdDrives::scanDrives() {
#else
m_devMgr->scanBus();
int row=0;
- QPtrList <K3bDevice::Device> lDev=m_devMgr->allDevices();
+ TQPtrList <K3bDevice::Device> lDev=m_devMgr->allDevices();
for (K3bDevice::Device *dev=lDev.first();dev;dev=lDev.next()) {
k9CdDrive *drive=new k9CdDrive;
drive->device=dev->blockDeviceName();
@@ -112,7 +112,7 @@ void k9CdDrives::scanDrives() {
drive->canReadDVD=dev->readsDvd();
drive->canWriteCDR=dev->writesCd();
drive->canWriteDVD=dev->writesDvd();
- QValueList <int> writeSpeeds;
+ TQValueList <int> writeSpeeds;
for (int i=2;i <=dev->determineMaximalWriteSpeed()/1385;i+=2)
writeSpeeds.append( i);
drive->setWriteSpeeds(writeSpeeds);
@@ -127,7 +127,7 @@ void k9CdDrives::scanDrives() {
readConfig();
}
-void k9CdDrives::eject(const QString & device) {
+void k9CdDrives::eject(const TQString & device) {
KProcess *process =new KProcess();
if (k9Tools::checkProgram("kdeeject"))
*process <<"kdeeject" << device;
@@ -141,26 +141,26 @@ void k9CdDrives::eject(const QString & device) {
/** reads devices that was entered manually **/
void k9CdDrives::readConfig() {
- QStringList ldev;
- QStringList llabels;
- QStringList lIO;
+ TQStringList ldev;
+ TQStringList llabels;
+ TQStringList lIO;
k9Config config;
ldev=config.getDevices();
llabels=config.getDevicesLabels();
lIO=config.getDevicesIO();
int row=count();
int i=0;
- for ( QStringList::Iterator it = ldev.begin(); it != ldev.end(); ++it ) {
+ for ( TQStringList::Iterator it = ldev.begin(); it != ldev.end(); ++it ) {
k9CdDrive *drive=new k9CdDrive;
drive->device=(*it);
- QStringList::Iterator it2=llabels.at(i);
- QStringList::Iterator it3=lIO.at(i);
+ TQStringList::Iterator it2=llabels.at(i);
+ TQStringList::Iterator it3=lIO.at(i);
drive->name=(*it2);
- QString c=(*it3);
- if (c.contains("I")) {
+ TQString c=(*it3);
+ if (c.tqcontains("I")) {
drive->canReadDVD=true;
}
- if (c.contains("O")) {
+ if (c.tqcontains("O")) {
drive->canWriteCDR=true;
drive->canWriteDVD=true;
}
@@ -185,12 +185,12 @@ k9CdDrive * k9CdDrives::getDrive(int num) {
}
-QValueList< int > k9CdDrive::getWriteSpeeds() const {
+TQValueList< int > k9CdDrive::getWriteSpeeds() const {
return writeSpeeds;
}
-void k9CdDrive::setWriteSpeeds(const QValueList< int >& _value) {
+void k9CdDrive::setWriteSpeeds(const TQValueList< int >& _value) {
writeSpeeds = _value;
}