summaryrefslogtreecommitdiffstats
path: root/k9devices
diff options
context:
space:
mode:
Diffstat (limited to 'k9devices')
-rw-r--r--k9devices/k9cddrive.cpp38
-rw-r--r--k9devices/k9cddrive.h28
-rw-r--r--k9devices/k9dbusdispatch.cpp32
-rw-r--r--k9devices/k9dbusdispatch.h29
-rw-r--r--k9devices/k9halconnection.cpp18
-rw-r--r--k9devices/k9halconnection.h22
-rw-r--r--k9devices/k9haldevice.cpp26
-rw-r--r--k9devices/k9haldevice.h34
8 files changed, 123 insertions, 104 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;
}
diff --git a/k9devices/k9cddrive.h b/k9devices/k9cddrive.h
index e64bc0f..9a4a374 100644
--- a/k9devices/k9cddrive.h
+++ b/k9devices/k9cddrive.h
@@ -13,11 +13,11 @@
#define K9CDDRIVE_H
#include "k9common.h"
-#include <qobject.h>
+#include <tqobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#ifndef HAVE_HAL
#include <k3bdevice.h>
#include <k3bdevicemanager.h>
@@ -30,20 +30,21 @@
class k9HalDevice;
class k9HalConnection;
-class k9CdDrive : public QObject {
+class k9CdDrive : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
k9CdDrive();
~k9CdDrive();
int num;
- QString name;
- QString device;
+ TQString name;
+ TQString device;
bool canWriteCDR;
bool canReadDVD;
bool canWriteDVD;
- void setWriteSpeeds(const QValueList< int >& _value);
- QValueList< int > getWriteSpeeds() const;
+ void setWriteSpeeds(const TQValueList< int >& _value);
+ TQValueList< int > getWriteSpeeds() const;
#ifdef HAVE_HAL
void setDevice(k9HalDevice* _value) { m_Device = _value;}
@@ -51,14 +52,15 @@ public:
k9HalDevice* getDevice() { return m_Device;}
#endif
private:
- QValueList <int> writeSpeeds;
+ TQValueList <int> writeSpeeds;
#ifdef HAVE_HAL
k9HalDevice *m_Device;
#endif
};
-class k9CdDrives : public QObject {
+class k9CdDrives : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
k9CdDrives();
~k9CdDrives();
@@ -66,7 +68,7 @@ public:
int count();
/** No descriptions */
k9CdDrive * getDrive(int num);
- void eject(const QString & device);
+ void eject(const TQString & device);
void scanDrives();
public slots:
void deviceAdded(k9HalDevice *device);
@@ -82,6 +84,6 @@ private: // Private methods
K3bDevice::DeviceManager *m_devMgr;
#endif
void readConfig();
- QPtrList <k9CdDrive> drives;
+ TQPtrList <k9CdDrive> drives;
};
#endif
diff --git a/k9devices/k9dbusdispatch.cpp b/k9devices/k9dbusdispatch.cpp
index 71d8a2f..c8c6a09 100644
--- a/k9devices/k9dbusdispatch.cpp
+++ b/k9devices/k9dbusdispatch.cpp
@@ -29,20 +29,20 @@ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data)
bool enabled = dbus_watch_get_enabled(watch);
//qDebug("addReadWatch %d %s", fd, (enabled ? "enabled" : "disabled"));
watcher.watch = watch;
- watcher.read = new QSocketNotifier(fd, QSocketNotifier::Read, d);
+ watcher.read = new TQSocketNotifier(fd, TQSocketNotifier::Read, d);
if (!enabled) watcher.read->setEnabled(false);
- d->connect(watcher.read, SIGNAL(activated(int)), SLOT(socketRead(int)));
+ d->connect(watcher.read, TQT_SIGNAL(activated(int)), TQT_SLOT(socketRead(int)));
}
if (flags & DBUS_WATCH_WRITABLE) {
bool enabled = dbus_watch_get_enabled(watch);
//qDebug("addWriteWatch %d %s", fd, (enabled ? "enabled" : "disabled"));
watcher.watch = watch;
- watcher.write = new QSocketNotifier(fd, QSocketNotifier::Write, d);
+ watcher.write = new TQSocketNotifier(fd, TQSocketNotifier::Write, d);
if (!enabled) watcher.write->setEnabled(false);
- d->connect(watcher.write, SIGNAL(activated(int)), SLOT(socketWrite(int)));
+ d->connect(watcher.write, TQT_SIGNAL(activated(int)), TQT_SLOT(socketWrite(int)));
}
// FIXME-QT4 d->watchers.insertMulti(fd, watcher);
- K9DBusDispatch::WatcherHash::iterator it = d->watchers.find(fd);
+ K9DBusDispatch::WatcherHash::iterator it = d->watchers.tqfind(fd);
if (it == d->watchers.end())
{
it = d->watchers.insert(fd, K9DBusDispatch::WatcherList());
@@ -58,7 +58,7 @@ static void qDBusRemoveWatch(DBusWatch *watch, void *data)
int fd = dbus_watch_get_fd(watch);
- K9DBusDispatch::WatcherHash::iterator it = d->watchers.find(fd);
+ K9DBusDispatch::WatcherHash::iterator it = d->watchers.tqfind(fd);
if (it != d->watchers.end())
{
K9DBusDispatch::WatcherList& list = *it;
@@ -87,7 +87,7 @@ static void qDBusRemoveWatch(DBusWatch *watch, void *data)
}
if (d->removedWatches.count() > 0)
- QTimer::singleShot(0, d, SLOT(purgeRemovedWatches()));
+ TQTimer::singleShot(0, d, TQT_SLOT(purgeRemovedWatches()));
}
@@ -96,7 +96,7 @@ static void qDBusToggleWatch(DBusWatch *watch, void *data)
K9DBusDispatch *d=(K9DBusDispatch*)data;
int fd = dbus_watch_get_fd(watch);
- K9DBusDispatch::WatcherHash::iterator it = d->watchers.find(fd);
+ K9DBusDispatch::WatcherHash::iterator it = d->watchers.tqfind(fd);
if (it != d->watchers.end()) {
K9DBusDispatch::WatcherList& list = *it;
for (K9DBusDispatch::WatcherList::iterator wit = list.begin(); wit != list.end();
@@ -162,8 +162,8 @@ void K9DBusDispatch::purgeRemovedWatches()
void K9DBusDispatch::socketRead(int fd)
{
- // FIXME-QT4 QHashIterator<int, QDBusConnectionPrivate::Watcher> it(watchers);
- WatcherHash::const_iterator it = watchers.find(fd);
+ // FIXME-QT4 TQHashIterator<int, TQDBusConnectionPrivate::Watcher> it(watchers);
+ WatcherHash::const_iterator it = watchers.tqfind(fd);
if (it != watchers.end()) {
const WatcherList& list = *it;
for (WatcherList::const_iterator wit = list.begin(); wit != list.end(); ++wit) {
@@ -178,8 +178,8 @@ void K9DBusDispatch::socketRead(int fd)
void K9DBusDispatch::socketWrite(int fd)
{
- // FIXME-QT4 QHashIterator<int, QDBusConnectionPrivate::Watcher> it(watchers);
- WatcherHash::const_iterator it = watchers.find(fd);
+ // FIXME-QT4 TQHashIterator<int, TQDBusConnectionPrivate::Watcher> it(watchers);
+ WatcherHash::const_iterator it = watchers.tqfind(fd);
if (it != watchers.end()) {
const WatcherList& list = *it;
for (WatcherList::const_iterator wit = list.begin(); wit != list.end(); ++wit) {
@@ -205,11 +205,11 @@ void K9DBusDispatch::dispatch()
}
}
-K9DBusDispatch::K9DBusDispatch(QObject *parent, const char *name)
- : QObject(parent, name)
+K9DBusDispatch::K9DBusDispatch(TQObject *tqparent, const char *name)
+ : TQObject(tqparent, name)
{
- m_dispatcher = new QTimer(this);
- QObject::connect(m_dispatcher, SIGNAL(timeout()), this, SLOT(dispatch()));
+ m_dispatcher = new TQTimer(this);
+ TQObject::connect(m_dispatcher, TQT_SIGNAL(timeout()), this, TQT_SLOT(dispatch()));
}
diff --git a/k9devices/k9dbusdispatch.h b/k9devices/k9dbusdispatch.h
index a93c2b0..d9d210e 100644
--- a/k9devices/k9dbusdispatch.h
+++ b/k9devices/k9dbusdispatch.h
@@ -3,7 +3,7 @@
//
// Description: the main goal of this class is to dispatch dbus messages so that libhal can
// detect changes on devices.
-// This code is based on QDBusConnectionPrivate from the new Qt DBus bindings
+// This code is based on TQDBusConnectionPrivate from the new TQt DBus bindings
//
//
// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007
@@ -15,15 +15,19 @@
#define K9DBUSDISPATCH_H
#include "k9common.h"
+#ifdef Q_MOC_RUN
+#define HAVE_HAL
+#endif // Q_MOC_RUN
+
#ifdef HAVE_HAL
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus.h>
-#include <qsocketnotifier.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqsocketnotifier.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
/**
@author Jean-Michel PETIT <k9copy@free.fr>
@@ -33,24 +37,25 @@ class k9Watcher {
public:
k9Watcher() { read=write=0; watch=0;};
DBusWatch *watch;
- QSocketNotifier *read,*write;
+ TQSocketNotifier *read,*write;
};
-class K9DBusDispatch : public QObject
+class K9DBusDispatch : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- K9DBusDispatch(QObject *parent = 0, const char *name = 0);
+ K9DBusDispatch(TQObject *tqparent = 0, const char *name = 0);
~K9DBusDispatch();
void setConnection(DBusConnection* _value);
- typedef QValueList<k9Watcher> WatcherList;
+ typedef TQValueList<k9Watcher> WatcherList;
WatcherList removedWatches;
- typedef QMap<int, WatcherList> WatcherHash;
+ typedef TQMap<int, WatcherList> WatcherHash;
WatcherHash watchers;
private:
- QTimer *m_dispatcher;
+ TQTimer *m_dispatcher;
DBusConnection *m_connection;
void purgeRemovedWatches();
diff --git a/k9devices/k9halconnection.cpp b/k9devices/k9halconnection.cpp
index 4de67ac..12d23cb 100644
--- a/k9devices/k9halconnection.cpp
+++ b/k9devices/k9halconnection.cpp
@@ -31,8 +31,8 @@ void halDeviceRemoved (LibHalContext *ctx, const char *udi) {
}
-k9HalConnection::k9HalConnection(QObject *parent, const char *name)
- : QObject(parent, name)
+k9HalConnection::k9HalConnection(TQObject *tqparent, const char *name)
+ : TQObject(tqparent, name)
{
m_devices.setAutoDelete(true);
m_context =(void*) libhal_ctx_new();
@@ -41,7 +41,7 @@ k9HalConnection::k9HalConnection(QObject *parent, const char *name)
dbus_error_init( &error );
m_dbusConnect = dbus_bus_get( DBUS_BUS_SYSTEM, &error );
if( dbus_error_is_set(&error) ) {
- qDebug(QString("Error connecting to DBUS : %1").arg(error.message));
+ qDebug(TQString("Error connecting to DBUS : %1").tqarg(error.message));
return;
}
@@ -82,7 +82,7 @@ void k9HalConnection::addDevice( const char* udi )
if( libhal_device_query_capability( (LibHalContext*) m_context, udi, "storage.cdrom", 0 ) ) {
char* dev = libhal_device_get_property_string( (LibHalContext*) m_context, udi, "block.device", 0 );
if( dev ) {
- QString s( dev );
+ TQString s( dev );
libhal_free_string( dev );
if( !s.isEmpty() ) {
@@ -104,7 +104,7 @@ void k9HalConnection::testVolumeChanged( const char * udi) {
}
else
if( libhal_device_query_capability( (LibHalContext*) m_context, udi, "volume", 0 ) ) {
- char* udiParent = libhal_device_get_property_string( (LibHalContext*) m_context, udi, "info.parent", 0 );
+ char* udiParent = libhal_device_get_property_string( (LibHalContext*) m_context, udi, "info.tqparent", 0 );
if( udiParent ) {
k9HalDevice *device=findDevice( udiParent);
libhal_free_string( udiParent );
@@ -120,9 +120,9 @@ k9HalConnection::~k9HalConnection()
libhal_ctx_shutdown((LibHalContext*)m_context, 0 );
libhal_ctx_free ((LibHalContext*)m_context);
#ifdef DBUS_QT3
- //QDBusConnection::closeConnection("sbus");
+ //TQDBusConnection::closeConnection("sbus");
#else
- //delete m_dBusQtConnect;
+ //delete m_dBusTQtConnect;
#endif
}
@@ -135,7 +135,7 @@ k9HalConnection * k9HalConnection::getInstance() {
k9HalDevice *k9HalConnection::findDevice( const char *udi) {
for (k9HalDevice *dev= m_devices.first();dev;dev=m_devices.next()) {
- if (dev->name()==QString(udi))
+ if (dev->name()==TQString(udi))
return dev;
}
return NULL;
@@ -143,7 +143,7 @@ k9HalDevice *k9HalConnection::findDevice( const char *udi) {
k9HalDevice *k9HalConnection::findDeviceByVolume( const char *udi) {
for (k9HalDevice *dev= m_devices.first();dev;dev=m_devices.next()) {
- if (dev->getVolumeUdi()==QString(udi))
+ if (dev->getVolumeUdi()==TQString(udi))
return dev;
}
return NULL;
diff --git a/k9devices/k9halconnection.h b/k9devices/k9halconnection.h
index 27119a5..ac44db4 100644
--- a/k9devices/k9halconnection.h
+++ b/k9devices/k9halconnection.h
@@ -10,12 +10,17 @@
//
//
#include "k9common.h"
+
+#ifdef Q_MOC_RUN
+#define HAVE_HAL
+#endif // Q_MOC_RUN
+
#ifdef HAVE_HAL
#ifndef K9HALCONNECTION_H
#define K9HALCONNECTION_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "k9dbusdispatch.h"
/**
@author Jean-Michel PETIT <k9copy@free.fr>
@@ -24,22 +29,23 @@
class k9HalDevice;
class DBusConnection;
#ifdef DBUS_QT3
-class QDBusConnection;
+class TQDBusConnection;
#else
-namespace DBusQt {
+namespace DBusTQt {
class Connection;
};
#endif
-class k9HalConnection : public QObject
+class k9HalConnection : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
friend class k9HalDevice;
public:
static k9HalConnection* getInstance();
static void end();
- QPtrList< k9HalDevice > getDevices() const { return m_devices;}
+ TQPtrList< k9HalDevice > getDevices() const { return m_devices;}
void addDevice( const char* udi );
void removeDevice( const char* udi );
void testVolumeChanged( const char * udi);
@@ -49,13 +55,13 @@ signals:
void deviceAdded(k9HalDevice *);
void deviceRemoved(k9HalDevice*);
private:
- QPtrList <k9HalDevice> m_devices;
+ TQPtrList <k9HalDevice> m_devices;
void *m_context;
DBusConnection * m_dbusConnect;
K9DBusDispatch *m_dbusDispatch;
private:
- k9HalConnection(QObject *parent = 0, const char *name = 0);
+ k9HalConnection(TQObject *tqparent = 0, const char *name = 0);
~k9HalConnection();
diff --git a/k9devices/k9haldevice.cpp b/k9devices/k9haldevice.cpp
index 0f70c42..f42ead8 100644
--- a/k9devices/k9haldevice.cpp
+++ b/k9devices/k9haldevice.cpp
@@ -17,17 +17,17 @@
#include <hal/libhal.h>
#include <hal/libhal-storage.h>
-k9HalDevice::k9HalDevice(QObject *parent, const char *udi)
- : QObject(parent, udi) {
+k9HalDevice::k9HalDevice(TQObject *tqparent, const char *udi)
+ : TQObject(tqparent, udi) {
- m_connection=(k9HalConnection*)parent;
+ m_connection=(k9HalConnection*)tqparent;
getDriveProperties();
}
k9HalDevice::~k9HalDevice() {}
-QString k9HalDevice::volumeName() {
- QString sVol("");
+TQString k9HalDevice::volumeName() {
+ TQString sVol("");
LibHalDrive *drive= libhal_drive_from_udi ((LibHalContext *)m_connection->m_context, name());
int num_volumes;
if (drive !=NULL) {
@@ -37,11 +37,11 @@ QString k9HalDevice::volumeName() {
char *volume_udi;
LibHalVolume *volume;
volume_udi = volumes[i];
- QString s(volume_udi);
+ TQString s(volume_udi);
m_volumeUdi=s;
volume = libhal_volume_from_udi ((LibHalContext *)m_connection->m_context, volume_udi);
if (volume != NULL) {
- sVol=QString(libhal_volume_get_label (volume));
+ sVol=TQString(libhal_volume_get_label (volume));
libhal_volume_free (volume);
}
}
@@ -53,8 +53,8 @@ QString k9HalDevice::volumeName() {
return sVol;
}
-QString k9HalDevice::mountPoint() {
- QString sMountPoint("");
+TQString k9HalDevice::mountPoint() {
+ TQString sMountPoint("");
LibHalDrive *drive= libhal_drive_from_udi ((LibHalContext *)m_connection->m_context, name());
if (drive !=NULL) {
int num_volumes;
@@ -66,7 +66,7 @@ QString k9HalDevice::mountPoint() {
volume_udi = volumes[i];
volume = libhal_volume_from_udi ((LibHalContext *)m_connection->m_context, volume_udi);
if (volume != NULL) {
- sMountPoint=QString(libhal_volume_get_mount_point (volume));
+ sMountPoint=TQString(libhal_volume_get_mount_point (volume));
libhal_volume_free (volume);
}
}
@@ -94,8 +94,8 @@ void k9HalDevice::getDriveProperties() {
m_canBurnCd= (caps & LIBHAL_DRIVE_CDROM_CAPS_CDR)==LIBHAL_DRIVE_CDROM_CAPS_CDR;
m_canReadDvd=(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDROM)==LIBHAL_DRIVE_CDROM_CAPS_DVDROM;
m_canBurnDvd=(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDR)==LIBHAL_DRIVE_CDROM_CAPS_DVDR;
- m_model=QString(libhal_drive_get_model(drive));
- // qDebug(QString("canReadDvd:%1 canBurnDvd:%2 model:%3").arg(m_canReadDvd).arg(m_canBurnDvd).arg(m_model));
+ m_model=TQString(libhal_drive_get_model(drive));
+ // qDebug(TQString("canReadDvd:%1 canBurnDvd:%2 model:%3").tqarg(m_canReadDvd).tqarg(m_canBurnDvd).tqarg(m_model));
libhal_drive_free(drive);
@@ -103,7 +103,7 @@ void k9HalDevice::getDriveProperties() {
m_maxWriteSpeed= libhal_device_get_property_int( (LibHalContext*)m_connection->m_context, name(), "storage.cdrom.write_speed", 0 );
}
char* dev = libhal_device_get_property_string( (LibHalContext*) m_connection->m_context, name(), "block.device", 0 );
- m_deviceName=QString ( dev );
+ m_deviceName=TQString ( dev );
libhal_free_string( dev );
m_volumeName=volumeName();
diff --git a/k9devices/k9haldevice.h b/k9devices/k9haldevice.h
index e7c25f1..c2c0e0c 100644
--- a/k9devices/k9haldevice.h
+++ b/k9devices/k9haldevice.h
@@ -13,19 +13,25 @@
#ifndef K9HALDEVICE_H
#define K9HALDEVICE_H
#include "k9common.h"
+
+#ifdef Q_MOC_RUN
+#define HAVE_HAL
+#endif // Q_MOC_RUN
+
#ifdef HAVE_HAL
-#include <qobject.h>
+#include <tqobject.h>
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9HalConnection;
-class k9HalDevice : public QObject
+class k9HalDevice : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- k9HalDevice(QObject *parent = 0, const char *name = 0);
+ k9HalDevice(TQObject *tqparent = 0, const char *name = 0);
~k9HalDevice();
@@ -45,7 +51,7 @@ public:
return m_canBurnDvd;
}
- QString getModel() const {
+ TQString getModel() const {
return m_model;
}
@@ -53,33 +59,33 @@ public:
return m_maxWriteSpeed;
}
- QString getDeviceName() const {
+ TQString getDeviceName() const {
return m_deviceName;
}
void updateVolumeName();
- QString getVolumeUdi() const {
+ TQString getVolumeUdi() const {
return m_volumeUdi;
}
- QString getVolumeName() const {
+ TQString getVolumeName() const {
return m_volumeName;
}
- QString mountPoint();
+ TQString mountPoint();
signals:
- void volumeChanged(const QString &device,const QString &volumeName);
+ void volumeChanged(const TQString &device,const TQString &volumeName);
private:
- QString m_volumeName;
- QString m_volumeUdi;
+ TQString m_volumeName;
+ TQString m_volumeUdi;
k9HalConnection *m_connection;
bool m_canReadCd,m_canReadDvd,m_canBurnCd,m_canBurnDvd;
- QString m_model;
- QString m_deviceName;
+ TQString m_model;
+ TQString m_deviceName;
int m_maxWriteSpeed;
void getDriveProperties();
- QString volumeName();
+ TQString volumeName();
};
#endif