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/movixcd | |
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/movixcd')
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixdoc.cpp | 90 | ||||
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixdoc.h | 67 | ||||
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixdocpreparer.cpp | 100 | ||||
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixdocpreparer.h | 9 | ||||
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixfileitem.cpp | 18 | ||||
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixfileitem.h | 6 | ||||
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixjob.cpp | 48 | ||||
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixjob.h | 7 | ||||
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixprogram.cpp | 112 | ||||
-rw-r--r-- | libk3b/projects/movixcd/k3bmovixprogram.h | 54 |
10 files changed, 257 insertions, 254 deletions
diff --git a/libk3b/projects/movixcd/k3bmovixdoc.cpp b/libk3b/projects/movixcd/k3bmovixdoc.cpp index f7b2198..5b5ea82 100644 --- a/libk3b/projects/movixcd/k3bmovixdoc.cpp +++ b/libk3b/projects/movixcd/k3bmovixdoc.cpp @@ -30,15 +30,15 @@ #include <kconfig.h> #include <kapplication.h> -#include <qdom.h> -#include <qfileinfo.h> +#include <tqdom.h> +#include <tqfileinfo.h> -K3bMovixDoc::K3bMovixDoc( QObject* parent ) - : K3bDataDoc( parent ) +K3bMovixDoc::K3bMovixDoc( TQObject* tqparent ) + : K3bDataDoc( tqparent ) { - connect( this, SIGNAL(itemRemoved(K3bDataItem*)), - this, SLOT(slotDataItemRemoved(K3bDataItem*)) ); + connect( this, TQT_SIGNAL(itemRemoved(K3bDataItem*)), + this, TQT_SLOT(slotDataItemRemoved(K3bDataItem*)) ); } @@ -47,9 +47,9 @@ K3bMovixDoc::~K3bMovixDoc() } -K3bBurnJob* K3bMovixDoc::newBurnJob( K3bJobHandler* hdl, QObject* parent ) +K3bBurnJob* K3bMovixDoc::newBurnJob( K3bJobHandler* hdl, TQObject* tqparent ) { - return new K3bMovixJob( this, hdl, parent ); + return new K3bMovixJob( this, hdl, tqparent ); } @@ -79,11 +79,11 @@ void K3bMovixDoc::addMovixFile( const KURL& _url, int pos ) { KURL url = K3b::convertToLocalUrl( _url ); - QFileInfo f( url.path() ); + TQFileInfo f( url.path() ); if( !f.isFile() || !url.isLocalFile() ) return; - QString newName = f.fileName(); + TQString newName = f.fileName(); if( nameAlreadyInDir( newName, root() ) ) { kapp->config()->setGroup("Data project settings"); bool dropDoubles = kapp->config()->readBoolEntry( "Drop doubles", false ); @@ -113,15 +113,15 @@ void K3bMovixDoc::addMovixFile( const KURL& _url, int pos ) } -bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) +bool K3bMovixDoc::loadDocumentData( TQDomElement* rootElem ) { if( !root() ) newDocument(); - QDomNodeList nodes = rootElem->childNodes(); + TQDomNodeList nodes = rootElem->childNodes(); if( nodes.item(0).nodeName() != "general" ) { - kdDebug() << "(K3bMovixDoc) could not find 'general' section." << endl; + kdDebug() << "(K3bMovixDoc) could not tqfind 'general' section." << endl; return false; } if( !readGeneralDocumentData( nodes.item(0).toElement() ) ) @@ -131,7 +131,7 @@ bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) // parse options // ----------------------------------------------------------------- if( nodes.item(1).nodeName() != "data_options" ) { - kdDebug() << "(K3bMovixDoc) could not find 'data_options' section." << endl; + kdDebug() << "(K3bMovixDoc) could not tqfind 'data_options' section." << endl; return false; } if( !loadDocumentDataOptions( nodes.item(1).toElement() ) ) @@ -143,7 +143,7 @@ bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) // parse header // ----------------------------------------------------------------- if( nodes.item(2).nodeName() != "data_header" ) { - kdDebug() << "(K3bMovixDoc) could not find 'data_header' section." << endl; + kdDebug() << "(K3bMovixDoc) could not tqfind 'data_header' section." << endl; return false; } if( !loadDocumentDataHeader( nodes.item(2).toElement() ) ) @@ -155,15 +155,15 @@ bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) // parse movix options // ----------------------------------------------------------------- if( nodes.item(3).nodeName() != "movix_options" ) { - kdDebug() << "(K3bMovixDoc) could not find 'movix_options' section." << endl; + kdDebug() << "(K3bMovixDoc) could not tqfind 'movix_options' section." << endl; return false; } // load the options - QDomNodeList optionList = nodes.item(3).childNodes(); + TQDomNodeList optionList = nodes.item(3).childNodes(); for( uint i = 0; i < optionList.count(); i++ ) { - QDomElement e = optionList.item(i).toElement(); + TQDomElement e = optionList.item(i).toElement(); if( e.isNull() ) return false; @@ -186,7 +186,7 @@ bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) else if( e.nodeName() == "keyboard_language") setKeyboardLayout( e.text() ); else if( e.nodeName() == "codecs") - setCodecs( QStringList::split( ',', e.text() ) ); + setCodecs( TQStringList::split( ',', e.text() ) ); else if( e.nodeName() == "default_boot_label") setDefaultBootLabel( e.text() ); else if( e.nodeName() == "additional_mplayer_options") @@ -203,15 +203,15 @@ bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) // parse files // ----------------------------------------------------------------- if( nodes.item(4).nodeName() != "movix_files" ) { - kdDebug() << "(K3bMovixDoc) could not find 'movix_files' section." << endl; + kdDebug() << "(K3bMovixDoc) could not tqfind 'movix_files' section." << endl; return false; } // load file items - QDomNodeList fileList = nodes.item(4).childNodes(); + TQDomNodeList fileList = nodes.item(4).childNodes(); for( uint i = 0; i < fileList.count(); i++ ) { - QDomElement e = fileList.item(i).toElement(); + TQDomElement e = fileList.item(i).toElement(); if( e.isNull() ) return false; @@ -221,7 +221,7 @@ bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) return false; } - QDomElement urlElem = e.firstChild().toElement(); + TQDomElement urlElem = e.firstChild().toElement(); if( urlElem.isNull() ) { kdDebug() << "(K3bMovixDoc) found file tag without url child." << endl; return false; @@ -235,7 +235,7 @@ bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) m_movixFiles.append( newK3bItem ); // subtitle file? - QDomElement subTitleElem = e.childNodes().item(1).toElement(); + TQDomElement subTitleElem = e.childNodes().item(1).toElement(); if( !subTitleElem.isNull() && subTitleElem.nodeName() == "subtitle_file" ) { urlElem = subTitleElem.firstChild().toElement(); if( urlElem.isNull() ) { @@ -243,7 +243,7 @@ bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) return false; } - QString name = K3bMovixFileItem::subTitleFileName( newK3bItem->k3bName() ); + TQString name = K3bMovixFileItem::subTitleFileName( newK3bItem->k3bName() ); K3bFileItem* subItem = new K3bFileItem( urlElem.text(), this, root(), name ); newK3bItem->setSubTitleItem( subItem ); } @@ -262,24 +262,24 @@ bool K3bMovixDoc::loadDocumentData( QDomElement* rootElem ) } -bool K3bMovixDoc::saveDocumentData( QDomElement* docElem ) +bool K3bMovixDoc::saveDocumentData( TQDomElement* docElem ) { - QDomDocument doc = docElem->ownerDocument(); + TQDomDocument doc = docElem->ownerDocument(); saveGeneralDocumentData( docElem ); - QDomElement optionsElem = doc.createElement( "data_options" ); + TQDomElement optionsElem = doc.createElement( "data_options" ); saveDocumentDataOptions( optionsElem ); - QDomElement headerElem = doc.createElement( "data_header" ); + TQDomElement headerElem = doc.createElement( "data_header" ); saveDocumentDataHeader( headerElem ); - QDomElement movixOptElem = doc.createElement( "movix_options" ); - QDomElement movixFilesElem = doc.createElement( "movix_files" ); + TQDomElement movixOptElem = doc.createElement( "movix_options" ); + TQDomElement movixFilesElem = doc.createElement( "movix_files" ); // save the movix options - QDomElement propElem = doc.createElement( "shutdown" ); + TQDomElement propElem = doc.createElement( "shutdown" ); propElem.setAttribute( "activated", shutdown() ? "yes" : "no" ); movixOptElem.appendChild( propElem ); @@ -332,22 +332,22 @@ bool K3bMovixDoc::saveDocumentData( QDomElement* docElem ) movixOptElem.appendChild( propElem ); propElem = doc.createElement( "loop_playlist" ); - propElem.appendChild( doc.createTextNode( QString::number(loopPlaylist()) ) ); + propElem.appendChild( doc.createTextNode( TQString::number(loopPlaylist()) ) ); movixOptElem.appendChild( propElem ); // save the movix items - for( QPtrListIterator<K3bMovixFileItem> it( m_movixFiles ); + for( TQPtrListIterator<K3bMovixFileItem> it( m_movixFiles ); *it; ++it ) { K3bMovixFileItem* item = *it; - QDomElement topElem = doc.createElement( "file" ); + TQDomElement topElem = doc.createElement( "file" ); topElem.setAttribute( "name", item->k3bName() ); - QDomElement urlElem = doc.createElement( "url" ); + TQDomElement urlElem = doc.createElement( "url" ); urlElem.appendChild( doc.createTextNode( item->localPath() ) ); topElem.appendChild( urlElem ); if( item->subTitleItem() ) { - QDomElement subElem = doc.createElement( "subtitle_file" ); + TQDomElement subElem = doc.createElement( "subtitle_file" ); urlElem = doc.createElement( "url" ); urlElem.appendChild( doc.createTextNode( item->subTitleItem()->localPath() ) ); subElem.appendChild( urlElem ); @@ -370,7 +370,7 @@ void K3bMovixDoc::slotDataItemRemoved( K3bDataItem* item ) { // check if it's a movix item if( K3bMovixFileItem* fi = dynamic_cast<K3bMovixFileItem*>(item) ) - if( m_movixFiles.containsRef( fi ) ) { + if( m_movixFiles.tqcontainsRef( fi ) ) { emit movixItemRemoved( fi ); m_movixFiles.removeRef( fi ); setModified(true); @@ -380,7 +380,7 @@ void K3bMovixDoc::slotDataItemRemoved( K3bDataItem* item ) int K3bMovixDoc::indexOf( K3bMovixFileItem* item ) { - return m_movixFiles.findRef(item)+1; + return m_movixFiles.tqfindRef(item)+1; } @@ -390,12 +390,12 @@ void K3bMovixDoc::moveMovixItem( K3bMovixFileItem* item, K3bMovixFileItem* itemA return; // set the current item to track - m_movixFiles.findRef( item ); + m_movixFiles.tqfindRef( item ); // take the current item item = m_movixFiles.take(); - // if after == 0 findRef returnes -1 - int pos = m_movixFiles.findRef( itemAfter ); + // if after == 0 tqfindRef returnes -1 + int pos = m_movixFiles.tqfindRef( itemAfter ); m_movixFiles.insert( pos+1, item ); emit newMovixFileItems(); @@ -409,15 +409,15 @@ void K3bMovixDoc::addSubTitleItem( K3bMovixFileItem* item, const KURL& url ) if( item->subTitleItem() ) removeSubTitleItem( item ); - QFileInfo f( url.path() ); + TQFileInfo f( url.path() ); if( !f.isFile() || !url.isLocalFile() ) return; // check if there already is a file named like we want to name the subTitle file - QString name = K3bMovixFileItem::subTitleFileName( item->k3bName() ); + TQString name = K3bMovixFileItem::subTitleFileName( item->k3bName() ); if( nameAlreadyInDir( name, root() ) ) { - KMessageBox::error( 0, i18n("Could not rename subtitle file. File with requested name %1 already exists.").arg(name) ); + KMessageBox::error( 0, i18n("Could not rename subtitle file. File with requested name %1 already exists.").tqarg(name) ); return; } diff --git a/libk3b/projects/movixcd/k3bmovixdoc.h b/libk3b/projects/movixcd/k3bmovixdoc.h index 53debfc..cd46dbf 100644 --- a/libk3b/projects/movixcd/k3bmovixdoc.h +++ b/libk3b/projects/movixcd/k3bmovixdoc.h @@ -20,11 +20,11 @@ #include <k3bdatadoc.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include "k3b_export.h" //class K3bView; class KURL; -class QDomElement; +class TQDomElement; class K3bFileItem; class K3bMovixFileItem; class K3bDataItem; @@ -34,18 +34,19 @@ class KConfig; class LIBK3B_EXPORT K3bMovixDoc : public K3bDataDoc { Q_OBJECT + TQ_OBJECT public: - K3bMovixDoc( QObject* parent = 0 ); + K3bMovixDoc( TQObject* tqparent = 0 ); virtual ~K3bMovixDoc(); virtual int type() const { return MOVIX; } - virtual K3bBurnJob* newBurnJob( K3bJobHandler* hdl, QObject* parent ); + virtual K3bBurnJob* newBurnJob( K3bJobHandler* hdl, TQObject* tqparent ); bool newDocument(); - const QPtrList<K3bMovixFileItem>& movixFileItems() const { return m_movixFiles; } + const TQPtrList<K3bMovixFileItem>& movixFileItems() const { return m_movixFiles; } int indexOf( K3bMovixFileItem* ); @@ -54,14 +55,14 @@ class LIBK3B_EXPORT K3bMovixDoc : public K3bDataDoc bool reboot() const { return m_reboot; } bool ejectDisk() const { return m_ejectDisk; } bool randomPlay() const { return m_randomPlay; } - const QString& subtitleFontset() const { return m_subtitleFontset; } - const QString& bootMessageLanguage() const { return m_bootMessageLanguage; } - const QString& audioBackground() const { return m_audioBackground; } - const QString& keyboardLayout() const { return m_keyboardLayout; } - const QStringList& codecs() const { return m_codecs; } - const QString& defaultBootLabel() const { return m_defaultBootLabel; } - const QString& additionalMPlayerOptions() const { return m_additionalMPlayerOptions; } - const QString& unwantedMPlayerOptions() const { return m_unwantedMPlayerOptions; } + const TQString& subtitleFontset() const { return m_subtitleFontset; } + const TQString& bootMessageLanguage() const { return m_bootMessageLanguage; } + const TQString& audioBackground() const { return m_audioBackground; } + const TQString& keyboardLayout() const { return m_keyboardLayout; } + const TQStringList& codecs() const { return m_codecs; } + const TQString& defaultBootLabel() const { return m_defaultBootLabel; } + const TQString& additionalMPlayerOptions() const { return m_additionalMPlayerOptions; } + const TQString& unwantedMPlayerOptions() const { return m_unwantedMPlayerOptions; } int loopPlaylist() const { return m_loopPlaylist; } bool noDma() const { return m_noDma; } @@ -69,14 +70,14 @@ class LIBK3B_EXPORT K3bMovixDoc : public K3bDataDoc void setReboot( bool v ) { m_reboot = v; } void setEjectDisk( bool v ) { m_ejectDisk = v; } void setRandomPlay( bool v ) { m_randomPlay = v; } - void setSubtitleFontset( const QString& v ) { m_subtitleFontset = v; } - void setBootMessageLanguage( const QString& v ) { m_bootMessageLanguage = v; } - void setAudioBackground( const QString& b ) { m_audioBackground = b; } - void setKeyboardLayout( const QString& l ) { m_keyboardLayout = l; } - void setCodecs( const QStringList& c ) { m_codecs = c; } - void setDefaultBootLabel( const QString& v ) { m_defaultBootLabel = v; } - void setAdditionalMPlayerOptions( const QString& v ) { m_additionalMPlayerOptions = v; } - void setUnwantedMPlayerOptions( const QString& v ) { m_unwantedMPlayerOptions = v; } + void setSubtitleFontset( const TQString& v ) { m_subtitleFontset = v; } + void setBootMessageLanguage( const TQString& v ) { m_bootMessageLanguage = v; } + void setAudioBackground( const TQString& b ) { m_audioBackground = b; } + void setKeyboardLayout( const TQString& l ) { m_keyboardLayout = l; } + void setCodecs( const TQStringList& c ) { m_codecs = c; } + void setDefaultBootLabel( const TQString& v ) { m_defaultBootLabel = v; } + void setAdditionalMPlayerOptions( const TQString& v ) { m_additionalMPlayerOptions = v; } + void setUnwantedMPlayerOptions( const TQString& v ) { m_unwantedMPlayerOptions = v; } void setLoopPlaylist( int v ) { m_loopPlaylist = v; } void setNoDma( bool b ) { m_noDma = b; } @@ -94,30 +95,30 @@ class LIBK3B_EXPORT K3bMovixDoc : public K3bDataDoc protected: /** reimplemented from K3bDoc */ - bool loadDocumentData( QDomElement* root ); + bool loadDocumentData( TQDomElement* root ); /** reimplemented from K3bDoc */ - bool saveDocumentData( QDomElement* ); + bool saveDocumentData( TQDomElement* ); - virtual QString typeString() const { return "movix"; } + virtual TQString typeString() const { return "movix"; } private slots: void slotDataItemRemoved( K3bDataItem* ); private: - QPtrList<K3bMovixFileItem> m_movixFiles; + TQPtrList<K3bMovixFileItem> m_movixFiles; bool m_shutdown; bool m_reboot; bool m_ejectDisk; bool m_randomPlay; - QString m_subtitleFontset; - QString m_bootMessageLanguage; - QString m_audioBackground; - QString m_keyboardLayout; - QStringList m_codecs; - QString m_defaultBootLabel; - QString m_additionalMPlayerOptions; - QString m_unwantedMPlayerOptions; + TQString m_subtitleFontset; + TQString m_bootMessageLanguage; + TQString m_audioBackground; + TQString m_keyboardLayout; + TQStringList m_codecs; + TQString m_defaultBootLabel; + TQString m_additionalMPlayerOptions; + TQString m_unwantedMPlayerOptions; int m_loopPlaylist; bool m_noDma; }; diff --git a/libk3b/projects/movixcd/k3bmovixdocpreparer.cpp b/libk3b/projects/movixcd/k3bmovixdocpreparer.cpp index 57e18af..04afd83 100644 --- a/libk3b/projects/movixcd/k3bmovixdocpreparer.cpp +++ b/libk3b/projects/movixcd/k3bmovixdocpreparer.cpp @@ -31,8 +31,8 @@ #include <ktempfile.h> #include <kio/global.h> -#include <qtextstream.h> -#include <qdir.h> +#include <tqtextstream.h> +#include <tqdir.h> class K3bMovixDocPreparer::Private @@ -62,14 +62,14 @@ public: K3bDirItem* mplayerDir; K3bFileItem* playlistFileItem; - QPtrList<K3bDataItem> newMovixItems; + TQPtrList<K3bDataItem> newMovixItems; bool structuresCreated; }; -K3bMovixDocPreparer::K3bMovixDocPreparer( K3bMovixDoc* doc, K3bJobHandler* jh, QObject* parent, const char* name ) - : K3bJob( jh, parent, name ) +K3bMovixDocPreparer::K3bMovixDocPreparer( K3bMovixDoc* doc, K3bJobHandler* jh, TQObject* tqparent, const char* name ) + : K3bJob( jh, tqparent, name ) { d = new Private(); d->doc = doc; @@ -175,11 +175,11 @@ bool K3bMovixDocPreparer::writePlaylistFile() d->playlistFile = new KTempFile(); d->playlistFile->setAutoDelete(true); - if( QTextStream* s = d->playlistFile->textStream() ) { + if( TQTextStream* s = d->playlistFile->textStream() ) { - const QPtrList<K3bMovixFileItem>& movixFileItems = d->doc->movixFileItems(); + const TQPtrList<K3bMovixFileItem>& movixFileItems = d->doc->movixFileItems(); - for( QPtrListIterator<K3bMovixFileItem> it( movixFileItems ); + for( TQPtrListIterator<K3bMovixFileItem> it( movixFileItems ); *it; ++it ) { *s << "/cdrom/"; *s << it.current()->writtenName(); @@ -190,33 +190,33 @@ bool K3bMovixDocPreparer::writePlaylistFile() return true; } else { - emit infoMessage( i18n("Could not write to temporary file %1").arg(d->playlistFile->name()), ERROR ); + emit infoMessage( i18n("Could not write to temporary file %1").tqarg(d->playlistFile->name()), ERROR ); return false; } } -bool K3bMovixDocPreparer::writeIsolinuxConfigFile( const QString& originalPath ) +bool K3bMovixDocPreparer::writeIsolinuxConfigFile( const TQString& originalPath ) { delete d->isolinuxConfigFile; d->isolinuxConfigFile = new KTempFile(); d->isolinuxConfigFile->setAutoDelete(true); - if( QTextStream* s = d->isolinuxConfigFile->textStream() ) { + if( TQTextStream* s = d->isolinuxConfigFile->textStream() ) { - // now open the default isolinux.cfg and copy everything except the first line which contains + // now open the default isolinux.cfg and copy everything except the first line which tqcontains // the default boot label - QFile f( originalPath ); + TQFile f( originalPath ); if( f.open( IO_ReadOnly ) ) { - QTextStream isolinuxConfigOrig( &f ); + TQTextStream isolinuxConfigOrig( &f ); if( d->doc->defaultBootLabel() != i18n("default") ) { isolinuxConfigOrig.readLine(); // skip first line *s << "default " << d->doc->defaultBootLabel() << endl; } - QString line = isolinuxConfigOrig.readLine(); + TQString line = isolinuxConfigOrig.readLine(); while( !line.isNull() ) { *s << line << endl; line = isolinuxConfigOrig.readLine(); @@ -229,7 +229,7 @@ bool K3bMovixDocPreparer::writeIsolinuxConfigFile( const QString& originalPath ) return false; } else { - emit infoMessage( i18n("Could not write to temporary file %1").arg(d->isolinuxConfigFile->name()), ERROR ); + emit infoMessage( i18n("Could not write to temporary file %1").tqarg(d->isolinuxConfigFile->name()), ERROR ); return false; } } @@ -241,7 +241,7 @@ bool K3bMovixDocPreparer::writeMovixRcFile() d->movixRcFile = new KTempFile(); d->movixRcFile->setAutoDelete(true); - if( QTextStream* s = d->movixRcFile->textStream() ) { + if( TQTextStream* s = d->movixRcFile->textStream() ) { if( !d->doc->additionalMPlayerOptions().isEmpty() ) *s << "extra-mplayer-options=" << d->doc->additionalMPlayerOptions() << endl; @@ -263,7 +263,7 @@ bool K3bMovixDocPreparer::writeMovixRcFile() return true; } else { - emit infoMessage( i18n("Could not write to temporary file %1").arg(d->movixRcFile->name()), ERROR ); + emit infoMessage( i18n("Could not write to temporary file %1").tqarg(d->movixRcFile->name()), ERROR ); return false; } } @@ -297,28 +297,28 @@ bool K3bMovixDocPreparer::addMovixFiles() // the following sucks! Redesign it! // add all the isolinux files - QStringList isolinuxFiles = d->eMovixBin->isolinuxFiles(); + TQStringList isolinuxFiles = d->eMovixBin->isolinuxFiles(); isolinuxFiles.remove( "isolinux.bin" ); isolinuxFiles.remove( "isolinux.cfg" ); isolinuxFiles.remove( "kernel/vmlinuz" ); - for( QStringList::const_iterator it = isolinuxFiles.begin(); + for( TQStringList::const_iterator it = isolinuxFiles.begin(); it != isolinuxFiles.end(); ++it ) { - QString path = d->eMovixBin->path + "/isolinux/" + *it; + TQString path = d->eMovixBin->path + "/isolinux/" + *it; (void)new K3bFileItem( path, d->doc, d->isolinuxDir ); } - const QStringList& movixFiles = d->eMovixBin->movixFiles(); - for( QStringList::const_iterator it = movixFiles.begin(); + const TQStringList& movixFiles = d->eMovixBin->movixFiles(); + for( TQStringList::const_iterator it = movixFiles.begin(); it != movixFiles.end(); ++it ) { - QString path = d->eMovixBin->path + "/movix/" + *it; + TQString path = d->eMovixBin->path + "/movix/" + *it; (void)new K3bFileItem( path, d->doc, d->movixDir ); } // add doku files - QString path = d->eMovixBin->languageDir( d->doc->bootMessageLanguage() ); - QDir dir(path); - QStringList helpFiles = dir.entryList(QDir::Files); - for( QStringList::const_iterator it = helpFiles.begin(); + TQString path = d->eMovixBin->languageDir( d->doc->bootMessageLanguage() ); + TQDir dir(path); + TQStringList helpFiles = dir.entryList(TQDir::Files); + for( TQStringList::const_iterator it = helpFiles.begin(); it != helpFiles.end(); ++it ) { // some emovix installations include backup-files, no one's perfect ;) if( !(*it).endsWith( "~" ) ) @@ -331,13 +331,13 @@ bool K3bMovixDocPreparer::addMovixFiles() d->doc->subtitleFontset() != i18n("none") ) { d->mplayerDir = new K3bDirItem( "mplayer", d->doc, d->doc->root() ); - QString fontPath = d->eMovixBin->subtitleFontDir( d->doc->subtitleFontset() ); - QFileInfo fontType( fontPath ); + TQString fontPath = d->eMovixBin->subtitleFontDir( d->doc->subtitleFontset() ); + TQFileInfo fontType( fontPath ); if( fontType.isDir() ) { K3bDirItem* fontDir = new K3bDirItem( "font", d->doc, d->mplayerDir ); - QDir dir( fontPath ); - QStringList fontFiles = dir.entryList( QDir::Files ); - for( QStringList::const_iterator it = fontFiles.begin(); + TQDir dir( fontPath ); + TQStringList fontFiles = dir.entryList( TQDir::Files ); + for( TQStringList::const_iterator it = fontFiles.begin(); it != fontFiles.end(); ++it ) { (void)new K3bFileItem( fontPath + "/" + *it, d->doc, fontDir ); } @@ -378,16 +378,16 @@ bool K3bMovixDocPreparer::addMovixFilesNew() // 4. set weights for isolinux files // FIXME: use the settings from the doc - QStringList files = d->eMovixBin->files( d->doc->keyboardLayout(), + TQStringList files = d->eMovixBin->files( d->doc->keyboardLayout(), d->doc->subtitleFontset(), d->doc->audioBackground(), d->doc->bootMessageLanguage(), "all" /*d->doc->codecs()*/ ); // for now we simply don't allow selection - for( QStringList::iterator it = files.begin(); it != files.end(); ++it ) { - QString docPath = (*it).section( ' ', 0, 0 ); - QString filePath = (*it).section( ' ', 1, 1 ); - QString fileName = filePath.section( '/', -1 ); + for( TQStringList::iterator it = files.begin(); it != files.end(); ++it ) { + TQString docPath = (*it).section( ' ', 0, 0 ); + TQString filePath = (*it).section( ' ', 1, 1 ); + TQString fileName = filePath.section( '/', -1 ); if( fileName == "isolinux.cfg" ) { // replace the local file with our modified one @@ -406,7 +406,7 @@ bool K3bMovixDocPreparer::addMovixFilesNew() // set the proper sort weight bootItem->setSortWeight( 200 ); - bootItem->parent()->setSortWeight( 100 ); + bootItem->tqparent()->setSortWeight( 100 ); } else if( fileName != "movixrc" ) { // we create our own movixrc K3bFileItem* item = createItem( filePath, docPath ); @@ -424,10 +424,10 @@ bool K3bMovixDocPreparer::addMovixFilesNew() // eMovix supplied codecs. These codecs are not picked up by the movix-conf script K3bDirItem* codecDir = dynamic_cast<K3bDirItem*>( d->doc->root()->findByPath( "/eMoviX/codecs" ) ); if( !codecDir || codecDir->isEmpty() ) { - QDir localCodecDir( d->eMovixBin->movixDataDir() + "/codecs" ); + TQDir localCodecDir( d->eMovixBin->movixDataDir() + "/codecs" ); if( localCodecDir.exists() ) { - QStringList codecFiles = localCodecDir.entryList( QDir::Files ); - for( QStringList::const_iterator it = codecFiles.begin(); it != codecFiles.end(); ++it ) + TQStringList codecFiles = localCodecDir.entryList( TQDir::Files ); + for( TQStringList::const_iterator it = codecFiles.begin(); it != codecFiles.end(); ++it ) createItem( localCodecDir.path() + '/' + *it, "/eMoviX/codecs" ); } } @@ -443,7 +443,7 @@ bool K3bMovixDocPreparer::addMovixFilesNew() } -K3bFileItem* K3bMovixDocPreparer::createItem( const QString& localPath, const QString& docPath ) +K3bFileItem* K3bMovixDocPreparer::createItem( const TQString& localPath, const TQString& docPath ) { // make sure the path in the doc exists K3bDirItem* dir = createDir( docPath ); @@ -459,12 +459,12 @@ K3bFileItem* K3bMovixDocPreparer::createItem( const QString& localPath, const QS } -K3bDirItem* K3bMovixDocPreparer::createDir( const QString& docPath ) +K3bDirItem* K3bMovixDocPreparer::createDir( const TQString& docPath ) { - QStringList docPathSections = QStringList::split( '/', docPath ); + TQStringList docPathSections = TQStringList::split( '/', docPath ); K3bDirItem* dir = d->doc->root(); - for( QStringList::iterator it = docPathSections.begin(); it != docPathSections.end(); ++it ) { - K3bDataItem* next = dir->find( *it ); + for( TQStringList::iterator it = docPathSections.begin(); it != docPathSections.end(); ++it ) { + K3bDataItem* next = dir->tqfind( *it ); if( !next ) dir = new K3bDirItem( *it, d->doc, dir ); else if( next->isDir() ) @@ -478,9 +478,9 @@ K3bDirItem* K3bMovixDocPreparer::createDir( const QString& docPath ) // remember the dir to remove it if( dir != d->doc->root() ) { K3bDirItem* delDir = dir; - while( delDir->parent() != d->doc->root() ) - delDir = delDir->parent(); - if( d->newMovixItems.findRef( delDir ) == -1 ) + while( delDir->tqparent() != d->doc->root() ) + delDir = delDir->tqparent(); + if( d->newMovixItems.tqfindRef( delDir ) == -1 ) d->newMovixItems.append( delDir ); } diff --git a/libk3b/projects/movixcd/k3bmovixdocpreparer.h b/libk3b/projects/movixcd/k3bmovixdocpreparer.h index 3844eae..8d4ba1e 100644 --- a/libk3b/projects/movixcd/k3bmovixdocpreparer.h +++ b/libk3b/projects/movixcd/k3bmovixdocpreparer.h @@ -30,9 +30,10 @@ class K3bDirItem; class K3bMovixDocPreparer : public K3bJob { Q_OBJECT + TQ_OBJECT public: - explicit K3bMovixDocPreparer( K3bMovixDoc* doc, K3bJobHandler*, QObject* parent = 0, const char* name = 0 ); + explicit K3bMovixDocPreparer( K3bMovixDoc* doc, K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 ); ~K3bMovixDocPreparer(); K3bMovixDoc* doc() const; @@ -53,12 +54,12 @@ class K3bMovixDocPreparer : public K3bJob private: bool writePlaylistFile(); - bool writeIsolinuxConfigFile( const QString& ); + bool writeIsolinuxConfigFile( const TQString& ); bool writeMovixRcFile(); bool addMovixFiles(); bool addMovixFilesNew(); - K3bFileItem* createItem( const QString& localPath, const QString& docPath ); - K3bDirItem* createDir( const QString& docPath ); + K3bFileItem* createItem( const TQString& localPath, const TQString& docPath ); + K3bDirItem* createDir( const TQString& docPath ); class Private; Private* d; diff --git a/libk3b/projects/movixcd/k3bmovixfileitem.cpp b/libk3b/projects/movixcd/k3bmovixfileitem.cpp index 12803a2..ccc387f 100644 --- a/libk3b/projects/movixcd/k3bmovixfileitem.cpp +++ b/libk3b/projects/movixcd/k3bmovixfileitem.cpp @@ -20,10 +20,10 @@ #include <k3bdiritem.h> -K3bMovixFileItem::K3bMovixFileItem( const QString& fileName, +K3bMovixFileItem::K3bMovixFileItem( const TQString& fileName, K3bMovixDoc* doc, K3bDirItem* dir, - const QString& k3bName ) + const TQString& k3bName ) : K3bFileItem( fileName, doc, dir, k3bName ), m_doc(doc), m_subTitleItem(0) @@ -36,16 +36,16 @@ K3bMovixFileItem::~K3bMovixFileItem() if( m_subTitleItem ) m_doc->removeSubTitleItem( this ); - // remove this from parentdir + // remove this from tqparentdir // it is important to do it here and not // rely on the K3bFileItem destructor becasue // otherwise the doc is not informed early enough - if( parent() ) - parent()->takeDataItem( this ); + if( tqparent() ) + tqparent()->takeDataItem( this ); } -void K3bMovixFileItem::setK3bName( const QString& newName ) +void K3bMovixFileItem::setK3bName( const TQString& newName ) { K3bFileItem::setK3bName( newName ); @@ -56,11 +56,11 @@ void K3bMovixFileItem::setK3bName( const QString& newName ) } -QString K3bMovixFileItem::subTitleFileName( const QString& name ) +TQString K3bMovixFileItem::subTitleFileName( const TQString& name ) { // remove ending from k3bName - QString subName = name; - int pos = subName.findRev("."); + TQString subName = name; + int pos = subName.tqfindRev("."); if( pos > 0 ) subName.truncate( pos ); subName += ".sub"; diff --git a/libk3b/projects/movixcd/k3bmovixfileitem.h b/libk3b/projects/movixcd/k3bmovixfileitem.h index 343f00b..a605434 100644 --- a/libk3b/projects/movixcd/k3bmovixfileitem.h +++ b/libk3b/projects/movixcd/k3bmovixfileitem.h @@ -25,7 +25,7 @@ class K3bMovixDoc; class K3bMovixFileItem : public K3bFileItem { public: - K3bMovixFileItem( const QString& fileName, K3bMovixDoc* doc, K3bDirItem* dir, const QString& k3bName = 0 ); + K3bMovixFileItem( const TQString& fileName, K3bMovixDoc* doc, K3bDirItem* dir, const TQString& k3bName = 0 ); ~K3bMovixFileItem(); K3bFileItem* subTitleItem() const { return m_subTitleItem; } @@ -35,13 +35,13 @@ class K3bMovixFileItem : public K3bFileItem * reimplemented from K3bDataItem * also renames the subTitleItem */ - void setK3bName( const QString& ); + void setK3bName( const TQString& ); /** * returnes the name that the subtitle file must have in * order to work with mplayer */ - static QString subTitleFileName( const QString& ); + static TQString subTitleFileName( const TQString& ); private: K3bMovixDoc* m_doc; diff --git a/libk3b/projects/movixcd/k3bmovixjob.cpp b/libk3b/projects/movixcd/k3bmovixjob.cpp index 2579453..220a8da 100644 --- a/libk3b/projects/movixcd/k3bmovixjob.cpp +++ b/libk3b/projects/movixcd/k3bmovixjob.cpp @@ -27,34 +27,34 @@ #include <kdebug.h> -K3bMovixJob::K3bMovixJob( K3bMovixDoc* doc, K3bJobHandler* jh, QObject* parent ) - : K3bBurnJob( jh, parent ), +K3bMovixJob::K3bMovixJob( K3bMovixDoc* doc, K3bJobHandler* jh, TQObject* tqparent ) + : K3bBurnJob( jh, tqparent ), m_doc(doc) { m_dataJob = new K3bDataJob( doc, this, this ); m_movixDocPreparer = new K3bMovixDocPreparer( doc, this, this ); // pipe signals - connect( m_dataJob, SIGNAL(percent(int)), this, SIGNAL(percent(int)) ); - connect( m_dataJob, SIGNAL(subPercent(int)), this, SIGNAL(subPercent(int)) ); - connect( m_dataJob, SIGNAL(processedSubSize(int, int)), this, SIGNAL(processedSubSize(int, int)) ); - connect( m_dataJob, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSize(int, int)) ); - connect( m_dataJob, SIGNAL(bufferStatus(int)), this, SIGNAL(bufferStatus(int)) ); - connect( m_dataJob, SIGNAL(deviceBuffer(int)), this, SIGNAL(deviceBuffer(int)) ); - connect( m_dataJob, SIGNAL(writeSpeed(int, int)), this, SIGNAL(writeSpeed(int, int)) ); - connect( m_dataJob, SIGNAL(newTask(const QString&)), this, SIGNAL(newTask(const QString&)) ); - connect( m_dataJob, SIGNAL(newSubTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( m_dataJob, SIGNAL(debuggingOutput(const QString&, const QString&)), - this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); - connect( m_dataJob, SIGNAL(infoMessage(const QString&, int)), - this, SIGNAL(infoMessage(const QString&, int)) ); - connect( m_dataJob, SIGNAL(burning(bool)), this, SIGNAL(burning(bool)) ); + connect( m_dataJob, TQT_SIGNAL(percent(int)), this, TQT_SIGNAL(percent(int)) ); + connect( m_dataJob, TQT_SIGNAL(subPercent(int)), this, TQT_SIGNAL(subPercent(int)) ); + connect( m_dataJob, TQT_SIGNAL(processedSubSize(int, int)), this, TQT_SIGNAL(processedSubSize(int, int)) ); + connect( m_dataJob, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSize(int, int)) ); + connect( m_dataJob, TQT_SIGNAL(buffertqStatus(int)), this, TQT_SIGNAL(buffertqStatus(int)) ); + connect( m_dataJob, TQT_SIGNAL(deviceBuffer(int)), this, TQT_SIGNAL(deviceBuffer(int)) ); + connect( m_dataJob, TQT_SIGNAL(writeSpeed(int, int)), this, TQT_SIGNAL(writeSpeed(int, int)) ); + connect( m_dataJob, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newTask(const TQString&)) ); + connect( m_dataJob, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) ); + connect( m_dataJob, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) ); + connect( m_dataJob, TQT_SIGNAL(infoMessage(const TQString&, int)), + this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); + connect( m_dataJob, TQT_SIGNAL(burning(bool)), this, TQT_SIGNAL(burning(bool)) ); // we need to clean up here - connect( m_dataJob, SIGNAL(finished(bool)), this, SLOT(slotDataJobFinished(bool)) ); + connect( m_dataJob, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotDataJobFinished(bool)) ); - connect( m_movixDocPreparer, SIGNAL(infoMessage(const QString&, int)), - this, SIGNAL(infoMessage(const QString&, int)) ); + connect( m_movixDocPreparer, TQT_SIGNAL(infoMessage(const TQString&, int)), + this, TQT_SIGNAL(infoMessage(const TQString&, int)) ); } @@ -110,23 +110,23 @@ void K3bMovixJob::slotDataJobFinished( bool success ) } -QString K3bMovixJob::jobDescription() const +TQString K3bMovixJob::jobDescription() const { if( m_doc->isoOptions().volumeID().isEmpty() ) return i18n("Writing eMovix CD"); else - return i18n("Writing eMovix CD (%1)").arg(m_doc->isoOptions().volumeID()); + return i18n("Writing eMovix CD (%1)").tqarg(m_doc->isoOptions().volumeID()); } -QString K3bMovixJob::jobDetails() const +TQString K3bMovixJob::jobDetails() const { return ( i18n("1 file (%1) and about 8 MB eMovix data", "%n files (%1) and about 8 MB eMovix data", - m_doc->movixFileItems().count()).arg(KIO::convertSize(m_doc->size())) + m_doc->movixFileItems().count()).tqarg(KIO::convertSize(m_doc->size())) + ( m_doc->copies() > 1 ? i18n(" - %n copy", " - %n copies", m_doc->copies()) - : QString::null ) ); + : TQString() ) ); } #include "k3bmovixjob.moc" diff --git a/libk3b/projects/movixcd/k3bmovixjob.h b/libk3b/projects/movixcd/k3bmovixjob.h index 81dea8e..d1689f6 100644 --- a/libk3b/projects/movixcd/k3bmovixjob.h +++ b/libk3b/projects/movixcd/k3bmovixjob.h @@ -31,16 +31,17 @@ class K3bFileItem; class K3bMovixJob : public K3bBurnJob { Q_OBJECT + TQ_OBJECT public: - K3bMovixJob( K3bMovixDoc* doc, K3bJobHandler*, QObject* parent = 0 ); + K3bMovixJob( K3bMovixDoc* doc, K3bJobHandler*, TQObject* tqparent = 0 ); ~K3bMovixJob(); K3bDoc* doc() const; K3bDevice::Device* writer() const; - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; public slots: void start(); diff --git a/libk3b/projects/movixcd/k3bmovixprogram.cpp b/libk3b/projects/movixcd/k3bmovixprogram.cpp index 8720e8d..522e700 100644 --- a/libk3b/projects/movixcd/k3bmovixprogram.cpp +++ b/libk3b/projects/movixcd/k3bmovixprogram.cpp @@ -21,9 +21,9 @@ #include <kdebug.h> #include <klocale.h> -#include <qdir.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqtextstream.h> K3bMovixProgram::K3bMovixProgram() @@ -31,17 +31,17 @@ K3bMovixProgram::K3bMovixProgram() { } -bool K3bMovixProgram::scan( const QString& p ) +bool K3bMovixProgram::scan( const TQString& p ) { if( p.isEmpty() ) return false; - QString path = p; + TQString path = p; if( path[path.length()-1] != '/' ) path.append("/"); // first test if we have a version info (eMovix >= 0.8.0pre3) - if( !QFile::exists( path + "movix-version" ) ) + if( !TQFile::exists( path + "movix-version" ) ) return false; K3bMovixBin* bin = 0; @@ -74,19 +74,19 @@ bool K3bMovixProgram::scan( const QString& p ) } -bool K3bMovixProgram::scanNewEMovix( K3bMovixBin* bin, const QString& path ) +bool K3bMovixProgram::scanNewEMovix( K3bMovixBin* bin, const TQString& path ) { - QStringList files = bin->files(); - for( QStringList::iterator it = files.begin(); + TQStringList files = bin->files(); + for( TQStringList::iterator it = files.begin(); it != files.end(); ++it ) { - if( (*it).contains( "isolinux.cfg" ) ) { - bin->m_supportedBootLabels = determineSupportedBootLabels( QStringList::split( " ", *it )[1] ); + if( (*it).tqcontains( "isolinux.cfg" ) ) { + bin->m_supportedBootLabels = determineSupportedBootLabels( TQStringList::split( " ", *it )[1] ); break; } } // here we simply check for the movix-conf program - if( QFile::exists( path + "movix-conf" ) ) { + if( TQFile::exists( path + "movix-conf" ) ) { bin->addFeature( "newfiles" ); addBin(bin); return true; @@ -98,29 +98,29 @@ bool K3bMovixProgram::scanNewEMovix( K3bMovixBin* bin, const QString& path ) } -bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const QString& path ) +bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const TQString& path ) { // // first check if all necessary directories are present // - QDir dir( bin->movixDataDir() ); - QStringList subdirs = dir.entryList( QDir::Dirs ); - if( !subdirs.contains( "boot-messages" ) ) { + TQDir dir( bin->movixDataDir() ); + TQStringList subdirs = dir.entryList( TQDir::Dirs ); + if( !subdirs.tqcontains( "boot-messages" ) ) { kdDebug() << "(K3bMovixProgram) could not find subdir 'boot-messages'" << endl; delete bin; return false; } - if( !subdirs.contains( "isolinux" ) ) { + if( !subdirs.tqcontains( "isolinux" ) ) { kdDebug() << "(K3bMovixProgram) could not find subdir 'isolinux'" << endl; delete bin; return false; } - if( !subdirs.contains( "movix" ) ) { + if( !subdirs.tqcontains( "movix" ) ) { kdDebug() << "(K3bMovixProgram) could not find subdir 'movix'" << endl; delete bin; return false; } - if( !subdirs.contains( "mplayer-fonts" ) ) { + if( !subdirs.tqcontains( "mplayer-fonts" ) ) { kdDebug() << "(K3bMovixProgram) could not find subdir 'mplayer-fonts'" << endl; delete bin; return false; @@ -130,14 +130,14 @@ bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const QString& path ) // // check if we have a version of eMovix which contains the movix-files script // - if( QFile::exists( path + "movix-files" ) ) { + if( TQFile::exists( path + "movix-files" ) ) { bin->addFeature( "files" ); KProcess p; K3bProcessOutputCollector out( &p ); p << bin->path + "movix-files"; if( p.start( KProcess::Block, KProcess::AllOutput ) ) { - bin->m_movixFiles = QStringList::split( "\n", out.output() ); + bin->m_movixFiles = TQStringList::split( "\n", out.output() ); } } @@ -145,8 +145,8 @@ bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const QString& path ) // fallback: to be compatible with 0.8.0rc2 we just add all files in the movix directory // if( bin->m_movixFiles.isEmpty() ) { - QDir dir( bin->movixDataDir() + "/movix" ); - bin->m_movixFiles = dir.entryList(QDir::Files); + TQDir dir( bin->movixDataDir() + "/movix" ); + bin->m_movixFiles = dir.entryList(TQDir::Files); } // @@ -164,9 +164,9 @@ bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const QString& path ) // // check every single necessary file :( // - for( QStringList::const_iterator it = bin->m_isolinuxFiles.begin(); + for( TQStringList::const_iterator it = bin->m_isolinuxFiles.begin(); it != bin->m_isolinuxFiles.end(); ++it ) { - if( !QFile::exists( bin->movixDataDir() + "/isolinux/" + *it ) ) { + if( !TQFile::exists( bin->movixDataDir() + "/isolinux/" + *it ) ) { kdDebug() << "(K3bMovixProgram) Could not find file " << *it << endl; delete bin; return false; @@ -177,7 +177,7 @@ bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const QString& path ) // now check the boot-messages languages // dir.cd( "boot-messages" ); - bin->m_supportedLanguages = dir.entryList(QDir::Dirs); + bin->m_supportedLanguages = dir.entryList(TQDir::Dirs); bin->m_supportedLanguages.remove("."); bin->m_supportedLanguages.remove(".."); bin->m_supportedLanguages.remove("CVS"); // the eMovix makefile stuff seems not perfect ;) @@ -189,12 +189,12 @@ bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const QString& path ) // FIXME: every font dir needs to contain the "font.desc" file! // dir.cd( "mplayer-fonts" ); - bin->m_supportedSubtitleFonts = dir.entryList( QDir::Dirs ); + bin->m_supportedSubtitleFonts = dir.entryList( TQDir::Dirs ); bin->m_supportedSubtitleFonts.remove("."); bin->m_supportedSubtitleFonts.remove(".."); bin->m_supportedSubtitleFonts.remove("CVS"); // the eMovix makefile stuff seems not perfect ;) // new ttf fonts in 0.8.0rc2 - bin->m_supportedSubtitleFonts += dir.entryList( "*.ttf", QDir::Files ); + bin->m_supportedSubtitleFonts += dir.entryList( "*.ttf", TQDir::Files ); bin->m_supportedSubtitleFonts.prepend( i18n("none") ); dir.cdUp(); @@ -213,17 +213,17 @@ bool K3bMovixProgram::scanOldEMovix( K3bMovixBin* bin, const QString& path ) } -QStringList K3bMovixProgram::determineSupportedBootLabels( const QString& isoConfigFile ) const +TQStringList K3bMovixProgram::determineSupportedBootLabels( const TQString& isoConfigFile ) const { - QStringList list( i18n("default") ); + TQStringList list( i18n("default") ); - QFile f( isoConfigFile ); + TQFile f( isoConfigFile ); if( !f.open( IO_ReadOnly ) ) { kdDebug() << "(K3bMovixProgram) could not open file '" << f.name() << "'" << endl; } else { - QTextStream fs( &f ); - QString line = fs.readLine(); + TQTextStream fs( &f ); + TQString line = fs.readLine(); while( !line.isNull() ) { if( line.startsWith( "label" ) ) list.append( line.mid( 5 ).stripWhiteSpace() ); @@ -237,84 +237,84 @@ QStringList K3bMovixProgram::determineSupportedBootLabels( const QString& isoCon } -QString K3bMovixBin::subtitleFontDir( const QString& font ) const +TQString K3bMovixBin::subtitleFontDir( const TQString& font ) const { if( font == i18n("none" ) ) return ""; - else if( m_supportedSubtitleFonts.contains( font ) ) + else if( m_supportedSubtitleFonts.tqcontains( font ) ) return path + "/mplayer-fonts/" + font; else return ""; } -QString K3bMovixBin::languageDir( const QString& lang ) const +TQString K3bMovixBin::languageDir( const TQString& lang ) const { if( lang == i18n("default") ) return languageDir( "en" ); - else if( m_supportedLanguages.contains( lang ) ) + else if( m_supportedLanguages.tqcontains( lang ) ) return path + "/boot-messages/" + lang; else return ""; } -QStringList K3bMovixBin::supportedSubtitleFonts() const +TQStringList K3bMovixBin::supportedSubtitleFonts() const { if( version >= K3bVersion( 0, 9, 0 ) ) - return QStringList( i18n("default") ) += supported( "font" ); + return TQStringList( i18n("default") ) += supported( "font" ); else return m_supportedSubtitleFonts; } -QStringList K3bMovixBin::supportedLanguages() const +TQStringList K3bMovixBin::supportedLanguages() const { if( version >= K3bVersion( 0, 9, 0 ) ) - return QStringList( i18n("default") ) += supported( "lang" ); + return TQStringList( i18n("default") ) += supported( "lang" ); else return m_supportedLanguages; } // only used for eMovix >= 0.9.0 -QStringList K3bMovixBin::supportedKbdLayouts() const +TQStringList K3bMovixBin::supportedKbdLayouts() const { - return QStringList( i18n("default") ) += supported( "kbd" ); + return TQStringList( i18n("default") ) += supported( "kbd" ); } // only used for eMovix >= 0.9.0 -QStringList K3bMovixBin::supportedBackgrounds() const +TQStringList K3bMovixBin::supportedBackgrounds() const { - return QStringList( i18n("default") ) += supported( "background" ); + return TQStringList( i18n("default") ) += supported( "background" ); } // only used for eMovix >= 0.9.0 -QStringList K3bMovixBin::supportedCodecs() const +TQStringList K3bMovixBin::supportedCodecs() const { return supported( "codecs" ); } -QStringList K3bMovixBin::supported( const QString& type ) const +TQStringList K3bMovixBin::supported( const TQString& type ) const { KProcess p; K3bProcessOutputCollector out( &p ); p << path + "movix-conf" << "--supported=" + type; if( p.start( KProcess::Block, KProcess::AllOutput ) ) - return QStringList::split( "\n", out.output() ); + return TQStringList::split( "\n", out.output() ); else - return QStringList(); + return TQStringList(); } -QStringList K3bMovixBin::files( const QString& kbd, - const QString& font, - const QString& bg, - const QString& lang, - const QStringList& codecs ) const +TQStringList K3bMovixBin::files( const TQString& kbd, + const TQString& font, + const TQString& bg, + const TQString& lang, + const TQStringList& codecs ) const { KProcess p; K3bProcessOutputCollector out( &p ); @@ -333,7 +333,7 @@ QStringList K3bMovixBin::files( const QString& kbd, p << "--codecs" << codecs.join( "," ); if( p.start( KProcess::Block, KProcess::AllOutput ) ) - return QStringList::split( "\n", out.output() ); + return TQStringList::split( "\n", out.output() ); else - return QStringList(); + return TQStringList(); } diff --git a/libk3b/projects/movixcd/k3bmovixprogram.h b/libk3b/projects/movixcd/k3bmovixprogram.h index a6a9ac0..7508626 100644 --- a/libk3b/projects/movixcd/k3bmovixprogram.h +++ b/libk3b/projects/movixcd/k3bmovixprogram.h @@ -26,58 +26,58 @@ class LIBK3B_EXPORT K3bMovixBin : public K3bExternalBin : K3bExternalBin( p ) { } - const QString& movixDataDir() const { return m_movixPath; } + const TQString& movixDataDir() const { return m_movixPath; } - const QStringList& supportedBootLabels() const { return m_supportedBootLabels; } - QStringList supportedSubtitleFonts() const; - QStringList supportedLanguages() const; - QStringList supportedKbdLayouts() const; - QStringList supportedBackgrounds() const; - QStringList supportedCodecs() const; + const TQStringList& supportedBootLabels() const { return m_supportedBootLabels; } + TQStringList supportedSubtitleFonts() const; + TQStringList supportedLanguages() const; + TQStringList supportedKbdLayouts() const; + TQStringList supportedBackgrounds() const; + TQStringList supportedCodecs() const; /* * Unused for eMovix versions 0.9.0 and above */ - const QStringList& movixFiles() const { return m_movixFiles; } + const TQStringList& movixFiles() const { return m_movixFiles; } /* * Unused for eMovix versions 0.9.0 and above */ - const QStringList& isolinuxFiles() const { return m_isolinuxFiles; } + const TQStringList& isolinuxFiles() const { return m_isolinuxFiles; } /** * returnes empty string if font was not found * * Unused for eMovix versions 0.9.0 and above */ - QString subtitleFontDir( const QString& font ) const; + TQString subtitleFontDir( const TQString& font ) const; /** * returnes empty string if lang was not found * * Unused for eMovix versions 0.9.0 and above */ - QString languageDir( const QString& lang ) const; + TQString languageDir( const TQString& lang ) const; /** * Interface for the movix-conf --files interface for * versions >= 0.9.0 */ - QStringList files( const QString& kbd = QString::null, - const QString& font = QString::null, - const QString& bg = QString::null, - const QString& lang = QString::null, - const QStringList& codecs = QStringList() ) const; + TQStringList files( const TQString& kbd = TQString(), + const TQString& font = TQString(), + const TQString& bg = TQString(), + const TQString& lang = TQString(), + const TQStringList& codecs = TQStringList() ) const; private: - QStringList supported( const QString& ) const; + TQStringList supported( const TQString& ) const; - QString m_movixPath; - QStringList m_movixFiles; - QStringList m_isolinuxFiles; - QStringList m_supportedBootLabels; - QStringList m_supportedSubtitleFonts; - QStringList m_supportedLanguages; + TQString m_movixPath; + TQStringList m_movixFiles; + TQStringList m_isolinuxFiles; + TQStringList m_supportedBootLabels; + TQStringList m_supportedSubtitleFonts; + TQStringList m_supportedLanguages; friend class K3bMovixProgram; }; @@ -88,14 +88,14 @@ class LIBK3B_EXPORT K3bMovixProgram : public K3bExternalProgram public: K3bMovixProgram(); - bool scan( const QString& ); + bool scan( const TQString& ); bool supportsUserParameters() const { return false; } private: - bool scanNewEMovix( K3bMovixBin* bin, const QString& ); - bool scanOldEMovix( K3bMovixBin* bin, const QString& ); - QStringList determineSupportedBootLabels( const QString& ) const; + bool scanNewEMovix( K3bMovixBin* bin, const TQString& ); + bool scanOldEMovix( K3bMovixBin* bin, const TQString& ); + TQStringList determineSupportedBootLabels( const TQString& ) const; }; |