summaryrefslogtreecommitdiffstats
path: root/libk3b/projects/datadvd
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 19:21:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 19:21:21 +0000
commitd8cc8bdfa7fa624a526d5aa1626974e1444cb799 (patch)
treef295f1c545b319963d5357af79fe08991d8141d9 /libk3b/projects/datadvd
parent2a39a080579fb52a2599c02b2939795385b89093 (diff)
downloadk3b-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/projects/datadvd')
-rw-r--r--libk3b/projects/datadvd/k3bdvdbooktypejob.cpp44
-rw-r--r--libk3b/projects/datadvd/k3bdvdbooktypejob.h9
-rw-r--r--libk3b/projects/datadvd/k3bdvddoc.cpp8
-rw-r--r--libk3b/projects/datadvd/k3bdvddoc.h6
-rw-r--r--libk3b/projects/datadvd/k3bdvdjob.cpp42
-rw-r--r--libk3b/projects/datadvd/k3bdvdjob.h9
-rw-r--r--libk3b/projects/datadvd/k3bdvdview.cpp8
-rw-r--r--libk3b/projects/datadvd/k3bdvdview.h5
8 files changed, 67 insertions, 64 deletions
diff --git a/libk3b/projects/datadvd/k3bdvdbooktypejob.cpp b/libk3b/projects/datadvd/k3bdvdbooktypejob.cpp
index f703452..f5dea6b 100644
--- a/libk3b/projects/datadvd/k3bdvdbooktypejob.cpp
+++ b/libk3b/projects/datadvd/k3bdvdbooktypejob.cpp
@@ -29,8 +29,8 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
#include <errno.h>
#include <string.h>
@@ -61,8 +61,8 @@ public:
};
-K3bDvdBooktypeJob::K3bDvdBooktypeJob( K3bJobHandler* jh, QObject* parent, const char* name )
- : K3bJob( jh, parent, name ),
+K3bDvdBooktypeJob::K3bDvdBooktypeJob( K3bJobHandler* jh, TQObject* tqparent, const char* name )
+ : K3bJob( jh, tqparent, name ),
m_action(0)
{
d = new Private;
@@ -82,15 +82,15 @@ void K3bDvdBooktypeJob::setForceNoEject( bool b )
}
-QString K3bDvdBooktypeJob::jobDescription() const
+TQString K3bDvdBooktypeJob::jobDescription() const
{
return i18n("Changing DVD Booktype"); // Changing DVD±R(W) Booktype
}
-QString K3bDvdBooktypeJob::jobDetails() const
+TQString K3bDvdBooktypeJob::jobDetails() const
{
- return QString::null;
+ return TQString();
}
@@ -118,7 +118,7 @@ void K3bDvdBooktypeJob::start()
K3bDevice::STATE_COMPLETE|K3bDevice::STATE_INCOMPLETE|K3bDevice::STATE_EMPTY,
K3bDevice::MEDIA_DVD_PLUS_RW|K3bDevice::MEDIA_DVD_PLUS_R,
i18n("Please insert an empty DVD+R or a DVD+RW medium into drive<p><b>%1 %2 (%3)</b>.")
- .arg(d->device->vendor()).arg(d->device->description()).arg(d->device->devicename()) ) == -1 ) {
+ .tqarg(d->device->vendor()).tqarg(d->device->description()).tqarg(d->device->devicename()) ) == -1 ) {
emit canceled();
jobFinished(false);
d->running = false;
@@ -129,9 +129,9 @@ void K3bDvdBooktypeJob::start()
emit newTask( i18n("Checking media") );
connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::NG_DISKINFO, d->device ),
- SIGNAL(finished(K3bDevice::DeviceHandler*)),
+ TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)),
this,
- SLOT(slotDeviceHandlerFinished(K3bDevice::DeviceHandler*)) );
+ TQT_SLOT(slotDeviceHandlerFinished(K3bDevice::DeviceHandler*)) );
}
else {
// change writer defaults
@@ -170,7 +170,7 @@ void K3bDvdBooktypeJob::setDevice( K3bDevice::Device* dev )
}
-void K3bDvdBooktypeJob::slotStderrLine( const QString& line )
+void K3bDvdBooktypeJob::slotStderrLine( const TQString& line )
{
emit debuggingOutput( "dvd+rw-booktype", line );
// FIXME
@@ -189,7 +189,7 @@ void K3bDvdBooktypeJob::slotProcessFinished( KProcess* p )
d->success = true;
}
else {
- emit infoMessage( i18n("%1 returned an unknown error (code %2).").arg(d->dvdBooktypeBin->name()).arg(p->exitStatus()),
+ emit infoMessage( i18n("%1 returned an unknown error (code %2).").tqarg(d->dvdBooktypeBin->name()).tqarg(p->exitStatus()),
K3bJob::ERROR );
emit infoMessage( i18n("Please send me an email with the last output."), K3bJob::ERROR );
@@ -197,7 +197,7 @@ void K3bDvdBooktypeJob::slotProcessFinished( KProcess* p )
}
}
else {
- emit infoMessage( i18n("%1 did not exit cleanly.").arg(d->dvdBooktypeBin->name()),
+ emit infoMessage( i18n("%1 did not exit cleanly.").tqarg(d->dvdBooktypeBin->name()),
ERROR );
d->success = false;
}
@@ -216,9 +216,9 @@ void K3bDvdBooktypeJob::slotProcessFinished( KProcess* p )
else {
emit infoMessage( i18n("Ejecting DVD..."), INFO );
connect( K3bDevice::eject( d->device ),
- SIGNAL(finished(K3bDevice::DeviceHandler*)),
+ TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)),
this,
- SLOT(slotEjectingFinished(K3bDevice::DeviceHandler*)) );
+ TQT_SLOT(slotEjectingFinished(K3bDevice::DeviceHandler*)) );
}
}
else {
@@ -280,12 +280,12 @@ void K3bDvdBooktypeJob::startBooktypeChange()
d->process = new K3bProcess();
d->process->setRunPrivileged(true);
d->process->setSuppressEmptyLines(true);
- connect( d->process, SIGNAL(stderrLine(const QString&)), this, SLOT(slotStderrLine(const QString&)) );
- connect( d->process, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcessFinished(KProcess*)) );
+ connect( d->process, TQT_SIGNAL(stderrLine(const TQString&)), this, TQT_SLOT(slotStderrLine(const TQString&)) );
+ connect( d->process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessFinished(KProcess*)) );
d->dvdBooktypeBin = k3bcore->externalBinManager()->binObject( "dvd+rw-booktype" );
if( !d->dvdBooktypeBin ) {
- emit infoMessage( i18n("Could not find %1 executable.").arg("dvd+rw-booktype"), ERROR );
+ emit infoMessage( i18n("Could not tqfind %1 executable.").tqarg("dvd+rw-booktype"), ERROR );
d->running = false;
jobFinished(false);
return;
@@ -326,9 +326,9 @@ void K3bDvdBooktypeJob::startBooktypeChange()
*d->process << d->device->blockDeviceName();
kdDebug() << "***** dvd+rw-booktype parameters:\n";
- const QValueList<QCString>& args = d->process->args();
- QString s;
- for( QValueList<QCString>::const_iterator it = args.begin(); it != args.end(); ++it ) {
+ const TQValueList<TQCString>& args = d->process->args();
+ TQString s;
+ for( TQValueList<TQCString>::const_iterator it = args.begin(); it != args.end(); ++it ) {
s += *it + " ";
}
kdDebug() << s << endl << flush;
@@ -338,7 +338,7 @@ void K3bDvdBooktypeJob::startBooktypeChange()
if( !d->process->start( KProcess::NotifyOnExit, KProcess::All ) ) {
// something went wrong when starting the program
// it "should" be the executable
- emit infoMessage( i18n("Could not start %1.").arg(d->dvdBooktypeBin->name()), K3bJob::ERROR );
+ emit infoMessage( i18n("Could not start %1.").tqarg(d->dvdBooktypeBin->name()), K3bJob::ERROR );
d->running = false;
jobFinished(false);
}
diff --git a/libk3b/projects/datadvd/k3bdvdbooktypejob.h b/libk3b/projects/datadvd/k3bdvdbooktypejob.h
index b9e7e4b..6605007 100644
--- a/libk3b/projects/datadvd/k3bdvdbooktypejob.h
+++ b/libk3b/projects/datadvd/k3bdvdbooktypejob.h
@@ -34,13 +34,14 @@ namespace K3bDevice {
class K3bDvdBooktypeJob : public K3bJob
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bDvdBooktypeJob( K3bJobHandler*, QObject* parent = 0, const char* name = 0 );
+ K3bDvdBooktypeJob( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 );
~K3bDvdBooktypeJob();
- QString jobDescription() const;
- QString jobDetails() const;
+ TQString jobDescription() const;
+ TQString jobDetails() const;
/**
* @list SET_MEDIA_DVD_ROM Change media identification on current media to DVD-ROM.
@@ -81,7 +82,7 @@ class K3bDvdBooktypeJob : public K3bJob
void setForceNoEject( bool );
private slots:
- void slotStderrLine( const QString& );
+ void slotStderrLine( const TQString& );
void slotProcessFinished( KProcess* );
void slotDeviceHandlerFinished( K3bDevice::DeviceHandler* );
void slotEjectingFinished( K3bDevice::DeviceHandler* );
diff --git a/libk3b/projects/datadvd/k3bdvddoc.cpp b/libk3b/projects/datadvd/k3bdvddoc.cpp
index 4ab8b9f..2d6ae46 100644
--- a/libk3b/projects/datadvd/k3bdvddoc.cpp
+++ b/libk3b/projects/datadvd/k3bdvddoc.cpp
@@ -22,8 +22,8 @@
#include <kconfig.h>
-K3bDvdDoc::K3bDvdDoc( QObject* parent )
- : K3bDataDoc( parent )
+K3bDvdDoc::K3bDvdDoc( TQObject* tqparent )
+ : K3bDataDoc( tqparent )
{
}
@@ -31,9 +31,9 @@ K3bDvdDoc::~K3bDvdDoc()
{
}
-K3bBurnJob* K3bDvdDoc::newBurnJob( K3bJobHandler* hdl, QObject* parent )
+K3bBurnJob* K3bDvdDoc::newBurnJob( K3bJobHandler* hdl, TQObject* tqparent )
{
- return new K3bDvdJob( this, hdl, parent );
+ return new K3bDvdJob( this, hdl, tqparent );
}
//#include "k3bdvddoc.moc"
diff --git a/libk3b/projects/datadvd/k3bdvddoc.h b/libk3b/projects/datadvd/k3bdvddoc.h
index 03b5c3d..20b039e 100644
--- a/libk3b/projects/datadvd/k3bdvddoc.h
+++ b/libk3b/projects/datadvd/k3bdvddoc.h
@@ -23,15 +23,15 @@ class KConfig;
class LIBK3B_EXPORT K3bDvdDoc : public K3bDataDoc
{
public:
- K3bDvdDoc( QObject* parent = 0 );
+ K3bDvdDoc( TQObject* tqparent = 0 );
virtual ~K3bDvdDoc();
virtual int type() const { return DVD; }
- virtual K3bBurnJob* newBurnJob( K3bJobHandler* hdl, QObject* parent = 0 );
+ virtual K3bBurnJob* newBurnJob( K3bJobHandler* hdl, TQObject* tqparent = 0 );
protected:
- virtual QString typeString() const { return "dvd"; }
+ virtual TQString typeString() const { return "dvd"; }
};
#endif
diff --git a/libk3b/projects/datadvd/k3bdvdjob.cpp b/libk3b/projects/datadvd/k3bdvdjob.cpp
index 3cd1521..d8bb75c 100644
--- a/libk3b/projects/datadvd/k3bdvdjob.cpp
+++ b/libk3b/projects/datadvd/k3bdvdjob.cpp
@@ -39,8 +39,8 @@ public:
};
-K3bDvdJob::K3bDvdJob( K3bDataDoc* doc, K3bJobHandler* hdl, QObject* parent )
- : K3bDataJob( doc, hdl, parent ),
+K3bDvdJob::K3bDvdJob( K3bDataDoc* doc, K3bJobHandler* hdl, TQObject* tqparent )
+ : K3bDataJob( doc, hdl, tqparent ),
m_doc( doc )
{
d = new Private();
@@ -79,7 +79,7 @@ bool K3bDvdJob::prepareWriterJob()
writer->setCloseDvd( usedMultiSessionMode() == K3bDataDoc::NONE ||
usedMultiSessionMode() == K3bDataDoc::FINISH );
- writer->setImageToWrite( QString::null ); // read from stdin
+ writer->setImageToWrite( TQString() ); // read from stdin
writer->setTrackSize( m_isoImager->size() );
if( usedMultiSessionMode() != K3bDataDoc::NONE ) {
@@ -105,9 +105,9 @@ void K3bDvdJob::determineMultiSessionMode()
}
else {
connect( K3bDevice::sendCommand( K3bDevice::DeviceHandler::NG_DISKINFO, m_doc->burner() ),
- SIGNAL(finished(K3bDevice::DeviceHandler*)),
+ TQT_SIGNAL(finished(K3bDevice::DeviceHandler*)),
this,
- SLOT(slotDetermineMultiSessionMode(K3bDevice::DeviceHandler*)) );
+ TQT_SLOT(slotDetermineMultiSessionMode(K3bDevice::DeviceHandler*)) );
}
}
@@ -243,8 +243,8 @@ bool K3bDvdJob::waitForMedium()
if( !questionYesNo( i18n("Your writer (%1 %2) does not support simulation with DVD-R(W) media. "
"Do you really want to continue? The media will be written "
"for real.")
- .arg(m_doc->burner()->vendor())
- .arg(m_doc->burner()->description()),
+ .tqarg(m_doc->burner()->vendor())
+ .tqarg(m_doc->burner()->description()),
i18n("No Simulation with DVD-R(W)") ) ) {
return false;
}
@@ -271,7 +271,7 @@ bool K3bDvdJob::waitForMedium()
if( m_doc->writingMode() == K3b::DAO )
// || ( m_doc->writingMode() == K3b::WRITING_MODE_AUTO &&
// usedMultiSessionMode() == K3bDataDoc::NONE ) )
- emit infoMessage( i18n("Writing %1 in DAO mode.").arg( K3bDevice::mediaTypeString(foundMedium, true) ), INFO );
+ emit infoMessage( i18n("Writing %1 in DAO mode.").tqarg( K3bDevice::mediaTypeString(foundMedium, true) ), INFO );
else {
// check if the writer supports writing sequential and thus multisession (on -1 the burner cannot handle
@@ -279,14 +279,14 @@ bool K3bDvdJob::waitForMedium()
if( m_doc->burner()->featureCurrent( K3bDevice::FEATURE_INCREMENTAL_STREAMING_WRITABLE ) == 0 ) {
if( !questionYesNo( i18n("Your writer (%1 %2) does not support Incremental Streaming with %3 "
"media. Multisession will not be possible. Continue anyway?")
- .arg(m_doc->burner()->vendor())
- .arg(m_doc->burner()->description())
- .arg( K3bDevice::mediaTypeString(foundMedium, true) ),
+ .tqarg(m_doc->burner()->vendor())
+ .tqarg(m_doc->burner()->description())
+ .tqarg( K3bDevice::mediaTypeString(foundMedium, true) ),
i18n("No Incremental Streaming") ) ) {
return false;
}
else {
- emit infoMessage( i18n("Writing %1 in DAO mode.").arg( K3bDevice::mediaTypeString(foundMedium, true) ), INFO );
+ emit infoMessage( i18n("Writing %1 in DAO mode.").tqarg( K3bDevice::mediaTypeString(foundMedium, true) ), INFO );
}
}
else {
@@ -294,7 +294,7 @@ bool K3bDvdJob::waitForMedium()
m_doc->writingMode() == K3b::WRITING_MODE_RES_OVWR )
emit infoMessage( i18n("Restricted Overwrite is not possible with DVD-R media."), INFO );
- emit infoMessage( i18n("Writing %1 in incremental mode.").arg( K3bDevice::mediaTypeString(foundMedium, true) ), INFO );
+ emit infoMessage( i18n("Writing %1 in incremental mode.").tqarg( K3bDevice::mediaTypeString(foundMedium, true) ), INFO );
}
}
}
@@ -305,7 +305,7 @@ bool K3bDvdJob::waitForMedium()
}
-QString K3bDvdJob::jobDescription() const
+TQString K3bDvdJob::jobDescription() const
{
if( m_doc->onlyCreateImages() ) {
return i18n("Creating Data Image File");
@@ -314,19 +314,19 @@ QString K3bDvdJob::jobDescription() const
m_doc->multiSessionMode() == K3bDataDoc::AUTO ) {
return i18n("Writing Data DVD")
+ ( m_doc->isoOptions().volumeID().isEmpty()
- ? QString::null
- : QString( " (%1)" ).arg(m_doc->isoOptions().volumeID()) );
+ ? TQString()
+ : TQString( " (%1)" ).tqarg(m_doc->isoOptions().volumeID()) );
}
else {
return i18n("Writing Multisession DVD")
+ ( m_doc->isoOptions().volumeID().isEmpty()
- ? QString::null
- : QString( " (%1)" ).arg(m_doc->isoOptions().volumeID()) );
+ ? TQString()
+ : TQString( " (%1)" ).tqarg(m_doc->isoOptions().volumeID()) );
}
}
-QString K3bDvdJob::jobDetails() const
+TQString K3bDvdJob::jobDetails() const
{
if( m_doc->copies() > 1 &&
!m_doc->dummy() &&
@@ -335,10 +335,10 @@ QString K3bDvdJob::jobDetails() const
return i18n("ISO9660 Filesystem (Size: %1) - %n copy",
"ISO9660 Filesystem (Size: %1) - %n copies",
m_doc->copies())
- .arg(KIO::convertSize( m_doc->size() ));
+ .tqarg(KIO::convertSize( m_doc->size() ));
else
return i18n("ISO9660 Filesystem (Size: %1)")
- .arg(KIO::convertSize( m_doc->size() ));
+ .tqarg(KIO::convertSize( m_doc->size() ));
}
#include "k3bdvdjob.moc"
diff --git a/libk3b/projects/datadvd/k3bdvdjob.h b/libk3b/projects/datadvd/k3bdvdjob.h
index 381bc1d..3bdf7b6 100644
--- a/libk3b/projects/datadvd/k3bdvdjob.h
+++ b/libk3b/projects/datadvd/k3bdvdjob.h
@@ -19,7 +19,7 @@
#include <k3bdatajob.h>
-#include <qfile.h>
+#include <tqfile.h>
class K3bDataDoc;
class K3bGrowisofsWriter;
@@ -28,16 +28,17 @@ class K3bGrowisofsWriter;
class K3bDvdJob : public K3bDataJob
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* To be more flexible we allow writing of any data doc
*/
- K3bDvdJob( K3bDataDoc*, K3bJobHandler*, QObject* parent = 0 );
+ K3bDvdJob( K3bDataDoc*, K3bJobHandler*, TQObject* tqparent = 0 );
virtual ~K3bDvdJob();
- virtual QString jobDescription() const;
- virtual QString jobDetails() const;
+ virtual TQString jobDescription() const;
+ virtual TQString jobDetails() const;
protected:
void prepareData();
diff --git a/libk3b/projects/datadvd/k3bdvdview.cpp b/libk3b/projects/datadvd/k3bdvdview.cpp
index 512ec4b..dc5f67a 100644
--- a/libk3b/projects/datadvd/k3bdvdview.cpp
+++ b/libk3b/projects/datadvd/k3bdvdview.cpp
@@ -22,8 +22,8 @@
#include <klocale.h>
-K3bDvdView::K3bDvdView( K3bDvdDoc* doc, QWidget *parent, const char *name )
- : K3bDataView( doc, parent, name )
+K3bDvdView::K3bDvdView( K3bDvdDoc* doc, TQWidget *tqparent, const char *name )
+ : K3bDataView( doc, tqparent, name )
{
m_doc = doc;
@@ -40,9 +40,9 @@ K3bDvdView::~K3bDvdView()
}
-K3bProjectBurnDialog* K3bDvdView::newBurnDialog( QWidget* parent, const char* name )
+K3bProjectBurnDialog* K3bDvdView::newBurnDialog( TQWidget* tqparent, const char* name )
{
- return new K3bDvdBurnDialog( m_doc, parent, name, true );
+ return new K3bDvdBurnDialog( m_doc, tqparent, name, true );
}
#include "k3bdvdview.moc"
diff --git a/libk3b/projects/datadvd/k3bdvdview.h b/libk3b/projects/datadvd/k3bdvdview.h
index d9f30f3..1072cc2 100644
--- a/libk3b/projects/datadvd/k3bdvdview.h
+++ b/libk3b/projects/datadvd/k3bdvdview.h
@@ -25,13 +25,14 @@ class K3bDvdDoc;
class K3bDvdView : public K3bDataView
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bDvdView( K3bDvdDoc* doc, QWidget *parent = 0, const char *name = 0 );
+ K3bDvdView( K3bDvdDoc* doc, TQWidget *tqparent = 0, const char *name = 0 );
~K3bDvdView();
protected:
- virtual K3bProjectBurnDialog* newBurnDialog( QWidget* parent = 0, const char* name = 0 );
+ virtual K3bProjectBurnDialog* newBurnDialog( TQWidget* tqparent = 0, const char* name = 0 );
private:
K3bDvdDoc* m_doc;