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/projects/videodvd | |
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/projects/videodvd')
-rw-r--r-- | libk3b/projects/videodvd/k3bvideodvddoc.cpp | 8 | ||||
-rw-r--r-- | libk3b/projects/videodvd/k3bvideodvddoc.h | 6 | ||||
-rw-r--r-- | libk3b/projects/videodvd/k3bvideodvdimager.cpp | 46 | ||||
-rw-r--r-- | libk3b/projects/videodvd/k3bvideodvdimager.h | 7 | ||||
-rw-r--r-- | libk3b/projects/videodvd/k3bvideodvdjob.cpp | 18 | ||||
-rw-r--r-- | libk3b/projects/videodvd/k3bvideodvdjob.h | 7 |
6 files changed, 47 insertions, 45 deletions
diff --git a/libk3b/projects/videodvd/k3bvideodvddoc.cpp b/libk3b/projects/videodvd/k3bvideodvddoc.cpp index 2f02ac6..f86830d 100644 --- a/libk3b/projects/videodvd/k3bvideodvddoc.cpp +++ b/libk3b/projects/videodvd/k3bvideodvddoc.cpp @@ -24,8 +24,8 @@ #include <kconfig.h> -K3bVideoDvdDoc::K3bVideoDvdDoc( QObject* parent ) - : K3bDvdDoc( parent ) +K3bVideoDvdDoc::K3bVideoDvdDoc( TQObject* tqparent ) + : K3bDvdDoc( tqparent ) { } @@ -63,9 +63,9 @@ bool K3bVideoDvdDoc::newDocument() } -K3bBurnJob* K3bVideoDvdDoc::newBurnJob( K3bJobHandler* hdl, QObject* parent ) +K3bBurnJob* K3bVideoDvdDoc::newBurnJob( K3bJobHandler* hdl, TQObject* tqparent ) { - return new K3bVideoDvdJob( this, hdl, parent ); + return new K3bVideoDvdJob( this, hdl, tqparent ); } //#include "k3bdvddoc.moc" diff --git a/libk3b/projects/videodvd/k3bvideodvddoc.h b/libk3b/projects/videodvd/k3bvideodvddoc.h index 034ae4d..cdfdfa7 100644 --- a/libk3b/projects/videodvd/k3bvideodvddoc.h +++ b/libk3b/projects/videodvd/k3bvideodvddoc.h @@ -23,12 +23,12 @@ class KConfig; class LIBK3B_EXPORT K3bVideoDvdDoc : public K3bDvdDoc { public: - K3bVideoDvdDoc( QObject* parent = 0 ); + K3bVideoDvdDoc( TQObject* tqparent = 0 ); virtual ~K3bVideoDvdDoc(); virtual int type() const { return VIDEODVD; } - virtual K3bBurnJob* newBurnJob( K3bJobHandler* hdl, QObject* parent ); + virtual K3bBurnJob* newBurnJob( K3bJobHandler* hdl, TQObject* tqparent ); virtual bool newDocument(); @@ -37,7 +37,7 @@ class LIBK3B_EXPORT K3bVideoDvdDoc : public K3bDvdDoc // TODO: implement load- and saveDocumentData since we do not need all those options protected: - virtual QString typeString() const { return "video_dvd"; } + virtual TQString typeString() const { return "video_dvd"; } private: K3bDirItem* m_videoTsDir; diff --git a/libk3b/projects/videodvd/k3bvideodvdimager.cpp b/libk3b/projects/videodvd/k3bvideodvdimager.cpp index 7362aa0..ab7c17a 100644 --- a/libk3b/projects/videodvd/k3bvideodvdimager.cpp +++ b/libk3b/projects/videodvd/k3bvideodvdimager.cpp @@ -26,10 +26,10 @@ #include <kdebug.h> #include <klocale.h> -#include <qtextstream.h> -#include <qdir.h> -#include <qfile.h> -#include <qptrlist.h> +#include <tqtextstream.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqptrlist.h> @@ -38,12 +38,12 @@ class K3bVideoDvdImager::Private public: K3bVideoDvdDoc* doc; - QString tempPath; + TQString tempPath; }; -K3bVideoDvdImager::K3bVideoDvdImager( K3bVideoDvdDoc* doc, K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bIsoImager( doc, jh, parent, name ) +K3bVideoDvdImager::K3bVideoDvdImager( K3bVideoDvdDoc* doc, K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bIsoImager( doc, jh, tqparent, name ) { d = new Private; d->doc = doc; @@ -104,30 +104,30 @@ int K3bVideoDvdImager::writePathSpec() // // We do this here since K3bIsoImager::start calls cleanup which deletes the temp files // - QDir dir( KGlobal::dirs()->resourceDirs( "tmp" ).first() ); + TQDir dir( KGlobal::dirs()->resourceDirs( "tmp" ).first() ); d->tempPath = K3b::findUniqueFilePrefix( "k3bVideoDvd", dir.path() ); kdDebug() << "(K3bVideoDvdImager) creating temp dir: " << d->tempPath << endl; if( !dir.mkdir( d->tempPath, true ) ) { - emit infoMessage( i18n("Unable to create temporary directory '%1'.").arg(d->tempPath), ERROR ); + emit infoMessage( i18n("Unable to create temporary directory '%1'.").tqarg(d->tempPath), ERROR ); return -1; } dir.cd( d->tempPath ); if( !dir.mkdir( "VIDEO_TS" ) ) { - emit infoMessage( i18n("Unable to create temporary directory '%1'.").arg(d->tempPath + "/VIDEO_TS"), ERROR ); + emit infoMessage( i18n("Unable to create temporary directory '%1'.").tqarg(d->tempPath + "/VIDEO_TS"), ERROR ); return -1; } - for( QPtrListIterator<K3bDataItem> it( d->doc->videoTsDir()->children() ); *it; ++it ) { + for( TQPtrListIterator<K3bDataItem> it( d->doc->videoTsDir()->tqchildren() ); *it; ++it ) { if( (*it)->isDir() ) { - emit infoMessage( i18n("Found invalid entry in the VIDEO_TS folder (%1).").arg((*it)->k3bName()), ERROR ); + emit infoMessage( i18n("Found invalid entry in the VIDEO_TS folder (%1).").tqarg((*it)->k3bName()), ERROR ); return -1; } // convert to upper case names - if( ::symlink( QFile::encodeName( (*it)->localPath() ), - QFile::encodeName( d->tempPath + "/VIDEO_TS/" + (*it)->k3bName().upper() ) ) == -1 ) { - emit infoMessage( i18n("Unable to link temporary file in folder %1.").arg( d->tempPath ), ERROR ); + if( ::symlink( TQFile::encodeName( (*it)->localPath() ), + TQFile::encodeName( d->tempPath + "/VIDEO_TS/" + (*it)->k3bName().upper() ) ) == -1 ) { + emit infoMessage( i18n("Unable to link temporary file in folder %1.").tqarg( d->tempPath ), ERROR ); return -1; } } @@ -137,7 +137,7 @@ int K3bVideoDvdImager::writePathSpec() } -int K3bVideoDvdImager::writePathSpecForDir( K3bDirItem* dirItem, QTextStream& stream ) +int K3bVideoDvdImager::writePathSpecForDir( K3bDirItem* dirItem, TQTextStream& stream ) { // // We handle the VIDEO_TS dir differently since otherwise mkisofs is not able to @@ -148,7 +148,7 @@ int K3bVideoDvdImager::writePathSpecForDir( K3bDirItem* dirItem, QTextStream& st } int num = 0; - for( QPtrListIterator<K3bDataItem> it( dirItem->children() ); it.current(); ++it ) { + for( TQPtrListIterator<K3bDataItem> it( dirItem->tqchildren() ); it.current(); ++it ) { K3bDataItem* item = it.current(); num++; @@ -192,25 +192,25 @@ bool K3bVideoDvdImager::addMkisofsParameters( bool printSize ) void K3bVideoDvdImager::cleanup() { - if( QFile::exists( d->tempPath ) ) { - QDir dir( d->tempPath ); + if( TQFile::exists( d->tempPath ) ) { + TQDir dir( d->tempPath ); dir.cd( "VIDEO_TS" ); - for( QPtrListIterator<K3bDataItem> it( d->doc->videoTsDir()->children() ); *it; ++it ) + for( TQPtrListIterator<K3bDataItem> it( d->doc->videoTsDir()->tqchildren() ); *it; ++it ) dir.remove( (*it)->k3bName().upper() ); dir.cdUp(); dir.rmdir( "VIDEO_TS" ); dir.cdUp(); dir.rmdir( d->tempPath ); } - d->tempPath = QString::null; + d->tempPath = TQString(); K3bIsoImager::cleanup(); } -void K3bVideoDvdImager::slotReceivedStderr( const QString& line ) +void K3bVideoDvdImager::slotReceivedStderr( const TQString& line ) { - if( line.contains( "Unable to make a DVD-Video image" ) ) { + if( line.tqcontains( "Unable to make a DVD-Video image" ) ) { emit infoMessage( i18n("The project does not contain all necessary VideoDVD files."), WARNING ); emit infoMessage( i18n("The resulting DVD will most likely not be playable on a Hifi DVD player."), WARNING ); } diff --git a/libk3b/projects/videodvd/k3bvideodvdimager.h b/libk3b/projects/videodvd/k3bvideodvdimager.h index 0062d55..b1a9678 100644 --- a/libk3b/projects/videodvd/k3bvideodvdimager.h +++ b/libk3b/projects/videodvd/k3bvideodvdimager.h @@ -32,9 +32,10 @@ class K3bVideoDvdDoc; class K3bVideoDvdImager : public K3bIsoImager { Q_OBJECT + TQ_OBJECT public: - K3bVideoDvdImager( K3bVideoDvdDoc* doc, K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + K3bVideoDvdImager( K3bVideoDvdDoc* doc, K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); virtual ~K3bVideoDvdImager(); public slots: @@ -46,10 +47,10 @@ class K3bVideoDvdImager : public K3bIsoImager bool addMkisofsParameters( bool printSize = false ); int writePathSpec(); void cleanup(); - int writePathSpecForDir( K3bDirItem* dirItem, QTextStream& stream ); + int writePathSpecForDir( K3bDirItem* dirItem, TQTextStream& stream ); protected slots: - virtual void slotReceivedStderr( const QString& ); + virtual void slotReceivedStderr( const TQString& ); private: void fixVideoDVDSettings(); diff --git a/libk3b/projects/videodvd/k3bvideodvdjob.cpp b/libk3b/projects/videodvd/k3bvideodvdjob.cpp index f4e6129..b550379 100644 --- a/libk3b/projects/videodvd/k3bvideodvdjob.cpp +++ b/libk3b/projects/videodvd/k3bvideodvdjob.cpp @@ -30,8 +30,8 @@ -K3bVideoDvdJob::K3bVideoDvdJob( K3bVideoDvdDoc* doc, K3bJobHandler* jh, QObject* parent ) - : K3bDvdJob( doc, jh, parent ), +K3bVideoDvdJob::K3bVideoDvdJob( K3bVideoDvdDoc* doc, K3bJobHandler* jh, TQObject* tqparent ) + : K3bDvdJob( doc, jh, tqparent ), m_doc(doc) { } @@ -64,7 +64,7 @@ bool K3bVideoDvdJob::prepareWriterJob() writer->setCloseDvd( true ); if( m_doc->onTheFly() ) { - writer->setImageToWrite( QString::null ); // read from stdin + writer->setImageToWrite( TQString() ); // read from stdin writer->setTrackSize( m_isoImager->size() ); } else @@ -76,7 +76,7 @@ bool K3bVideoDvdJob::prepareWriterJob() } -QString K3bVideoDvdJob::jobDescription() const +TQString K3bVideoDvdJob::jobDescription() const { if( m_doc->onlyCreateImages() ) { return i18n("Creating Video DVD Image File"); @@ -84,18 +84,18 @@ QString K3bVideoDvdJob::jobDescription() const else { return i18n("Writing Video DVD") + ( m_doc->isoOptions().volumeID().isEmpty() - ? QString::null - : QString( " (%1)" ).arg(m_doc->isoOptions().volumeID()) ); + ? TQString() + : TQString( " (%1)" ).tqarg(m_doc->isoOptions().volumeID()) ); } } -QString K3bVideoDvdJob::jobDetails() const +TQString K3bVideoDvdJob::jobDetails() const { - return ( i18n("ISO9660/Udf Filesystem (Size: %1)").arg(KIO::convertSize( doc()->size() )) + return ( i18n("ISO9660/Udf Filesystem (Size: %1)").tqarg(KIO::convertSize( doc()->size() )) + ( m_doc->copies() > 1 ? i18n(" - %n copy", " - %n copies", m_doc->copies()) - : QString::null ) ); + : TQString() ) ); } #include "k3bvideodvdjob.moc" diff --git a/libk3b/projects/videodvd/k3bvideodvdjob.h b/libk3b/projects/videodvd/k3bvideodvdjob.h index 3f03cea..a1d079e 100644 --- a/libk3b/projects/videodvd/k3bvideodvdjob.h +++ b/libk3b/projects/videodvd/k3bvideodvdjob.h @@ -28,13 +28,14 @@ class K3bVideoDvdDoc; class K3bVideoDvdJob : public K3bDvdJob { Q_OBJECT + TQ_OBJECT public: - K3bVideoDvdJob( K3bVideoDvdDoc*, K3bJobHandler*, QObject* parent = 0 ); + K3bVideoDvdJob( K3bVideoDvdDoc*, K3bJobHandler*, TQObject* tqparent = 0 ); virtual ~K3bVideoDvdJob(); - virtual QString jobDescription() const; - virtual QString jobDetails() const; + virtual TQString jobDescription() const; + virtual TQString jobDetails() const; private: bool prepareWriterJob(); |