summaryrefslogtreecommitdiffstats
path: root/libk3b/projects/audiocd
diff options
context:
space:
mode:
Diffstat (limited to 'libk3b/projects/audiocd')
-rw-r--r--libk3b/projects/audiocd/k3baudiocdtrackdrag.cpp30
-rw-r--r--libk3b/projects/audiocd/k3baudiocdtrackdrag.h20
-rw-r--r--libk3b/projects/audiocd/k3baudiocdtracksource.cpp26
-rw-r--r--libk3b/projects/audiocd/k3baudiocdtracksource.h8
-rw-r--r--libk3b/projects/audiocd/k3baudiodatasource.h6
-rw-r--r--libk3b/projects/audiocd/k3baudiodatasourceiterator.h2
-rw-r--r--libk3b/projects/audiocd/k3baudiodoc.cpp174
-rw-r--r--libk3b/projects/audiocd/k3baudiodoc.h75
-rw-r--r--libk3b/projects/audiocd/k3baudiofile.cpp6
-rw-r--r--libk3b/projects/audiocd/k3baudiofile.h6
-rw-r--r--libk3b/projects/audiocd/k3baudioimager.cpp18
-rw-r--r--libk3b/projects/audiocd/k3baudioimager.h5
-rw-r--r--libk3b/projects/audiocd/k3baudiojob.cpp136
-rw-r--r--libk3b/projects/audiocd/k3baudiojob.h11
-rw-r--r--libk3b/projects/audiocd/k3baudiojobtempdata.cpp46
-rw-r--r--libk3b/projects/audiocd/k3baudiojobtempdata.h21
-rw-r--r--libk3b/projects/audiocd/k3baudiomaxspeedjob.cpp14
-rw-r--r--libk3b/projects/audiocd/k3baudiomaxspeedjob.h3
-rw-r--r--libk3b/projects/audiocd/k3baudionormalizejob.cpp34
-rw-r--r--libk3b/projects/audiocd/k3baudionormalizejob.h11
-rw-r--r--libk3b/projects/audiocd/k3baudiotrack.cpp46
-rw-r--r--libk3b/projects/audiocd/k3baudiotrack.h42
-rw-r--r--libk3b/projects/audiocd/k3baudiozerodata.cpp6
-rw-r--r--libk3b/projects/audiocd/k3baudiozerodata.h4
24 files changed, 378 insertions, 372 deletions
diff --git a/libk3b/projects/audiocd/k3baudiocdtrackdrag.cpp b/libk3b/projects/audiocd/k3baudiocdtrackdrag.cpp
index 8429f25..f8a5b71 100644
--- a/libk3b/projects/audiocd/k3baudiocdtrackdrag.cpp
+++ b/libk3b/projects/audiocd/k3baudiocdtrackdrag.cpp
@@ -21,28 +21,28 @@
#include <k3btrack.h>
#include <k3bcore.h>
-#include <qdatastream.h>
-#include <qcstring.h>
+#include <tqdatastream.h>
+#include <tqcstring.h>
// FIXME: multiple tracks
-K3bAudioCdTrackDrag::K3bAudioCdTrackDrag( const K3bDevice::Toc& toc, const QValueList<int>& cdTrackNumbers,
+K3bAudioCdTrackDrag::K3bAudioCdTrackDrag( const K3bDevice::Toc& toc, const TQValueList<int>& cdTrackNumbers,
const K3bCddbResultEntry& cddb,
- K3bDevice::Device* lastDev, QWidget* dragSource, const char* name )
- : QStoredDrag( "k3b/audio_track_drag", dragSource, name ),
+ K3bDevice::Device* lastDev, TQWidget* dragSource, const char* name )
+ : TQStoredDrag( "k3b/audio_track_drag", dragSource, name ),
m_toc(toc),
m_cdTrackNumbers(cdTrackNumbers),
m_cddb(cddb),
m_device(lastDev)
{
- QByteArray data;
- QDataStream s( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream s( data, IO_WriteOnly );
s << (unsigned int)toc.count();
for( K3bDevice::Toc::const_iterator it = toc.begin(); it != toc.end(); ++it ) {
const K3bDevice::Track& track = *it;
s << track.firstSector().lba() << track.lastSector().lba();
}
- QTextStream t( s.device() );
+ TQTextStream t( s.device() );
t << cddb.cdArtist << endl
<< cddb.cdTitle << endl;
for( unsigned int i = 0; i < toc.count(); ++i ) {
@@ -52,7 +52,7 @@ K3bAudioCdTrackDrag::K3bAudioCdTrackDrag( const K3bDevice::Toc& toc, const QValu
s << (unsigned int)cdTrackNumbers.count();
- for( QValueList<int>::const_iterator it = cdTrackNumbers.begin();
+ for( TQValueList<int>::const_iterator it = cdTrackNumbers.begin();
it != cdTrackNumbers.end(); ++it )
s << *it;
@@ -66,13 +66,13 @@ K3bAudioCdTrackDrag::K3bAudioCdTrackDrag( const K3bDevice::Toc& toc, const QValu
}
-bool K3bAudioCdTrackDrag::decode( const QMimeSource* e,
- K3bDevice::Toc& toc, QValueList<int>& trackNumbers,
+bool K3bAudioCdTrackDrag::decode( const TQMimeSource* e,
+ K3bDevice::Toc& toc, TQValueList<int>& trackNumbers,
K3bCddbResultEntry& cddb, K3bDevice::Device** dev )
{
- QByteArray data = e->encodedData( "k3b/audio_track_drag" );
+ TQByteArray data = e->tqencodedData( "k3b/audio_track_drag" );
- QDataStream s( data, IO_ReadOnly );
+ TQDataStream s( data, IO_ReadOnly );
unsigned int trackCnt;
s >> trackCnt;
@@ -83,7 +83,7 @@ bool K3bAudioCdTrackDrag::decode( const QMimeSource* e,
toc.append( K3bDevice::Track( fs, ls, K3bDevice::Track::AUDIO ) );
}
- QTextStream t( s.device() );
+ TQTextStream t( s.device() );
cddb.artists.clear();
cddb.titles.clear();
cddb.cdArtist = t.readLine();
@@ -101,7 +101,7 @@ bool K3bAudioCdTrackDrag::decode( const QMimeSource* e,
trackNumbers.append( trackNumber );
}
- QString devName = t.readLine();
+ TQString devName = t.readLine();
if( dev && !devName.isEmpty() )
*dev = k3bcore->deviceManager()->findDevice( devName );
diff --git a/libk3b/projects/audiocd/k3baudiocdtrackdrag.h b/libk3b/projects/audiocd/k3baudiocdtrackdrag.h
index 3148466..f88c4e5 100644
--- a/libk3b/projects/audiocd/k3baudiocdtrackdrag.h
+++ b/libk3b/projects/audiocd/k3baudiocdtrackdrag.h
@@ -16,33 +16,33 @@
#ifndef _K3B_AUDIO_CDTRACK_DRAG_H_
#define _K3B_AUDIO_CDTRACK_DRAG_H_
-#include <qdragobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqdragobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
#include <k3btoc.h>
#include <k3bcddbresult.h>
#include <k3bdevice.h>
#include "k3b_export.h"
-class LIBK3B_EXPORT K3bAudioCdTrackDrag : public QStoredDrag
+class LIBK3B_EXPORT K3bAudioCdTrackDrag : public TQStoredDrag
{
public:
- K3bAudioCdTrackDrag( const K3bDevice::Toc& toc, const QValueList<int>& cdTrackNumbers, const K3bCddbResultEntry& cddb,
- K3bDevice::Device* lastDev = 0, QWidget* dragSource = 0, const char* name = 0 );
+ K3bAudioCdTrackDrag( const K3bDevice::Toc& toc, const TQValueList<int>& cdTrackNumbers, const K3bCddbResultEntry& cddb,
+ K3bDevice::Device* lastDev = 0, TQWidget* dragSource = 0, const char* name = 0 );
const K3bDevice::Toc& toc() const { return m_toc; }
- const QValueList<int>& cdTrackNumbers() const { return m_cdTrackNumbers; }
+ const TQValueList<int>& cdTrackNumbers() const { return m_cdTrackNumbers; }
const K3bCddbResultEntry& cddbEntry() const { return m_cddb; }
bool provides( const char* mimetype ) const { return !qstrcmp( mimetype, "k3b/audio_track_drag" ); }
- static bool canDecode( const QMimeSource* s ) { return s->provides( "k3b/audio_track_drag" ); }
- static bool decode( const QMimeSource* s, K3bDevice::Toc&, QValueList<int>& trackNumbers, K3bCddbResultEntry&, K3bDevice::Device** dev = 0 );
+ static bool canDecode( const TQMimeSource* s ) { return s->provides( "k3b/audio_track_drag" ); }
+ static bool decode( const TQMimeSource* s, K3bDevice::Toc&, TQValueList<int>& trackNumbers, K3bCddbResultEntry&, K3bDevice::Device** dev = 0 );
private:
K3bDevice::Toc m_toc;
- QValueList<int> m_cdTrackNumbers;
+ TQValueList<int> m_cdTrackNumbers;
K3bCddbResultEntry m_cddb;
K3bDevice::Device* m_device;
};
diff --git a/libk3b/projects/audiocd/k3baudiocdtracksource.cpp b/libk3b/projects/audiocd/k3baudiocdtracksource.cpp
index b61e865..6319086 100644
--- a/libk3b/projects/audiocd/k3baudiocdtracksource.cpp
+++ b/libk3b/projects/audiocd/k3baudiocdtracksource.cpp
@@ -45,8 +45,8 @@ K3bAudioCdTrackSource::K3bAudioCdTrackSource( const K3bDevice::Toc& toc, int cdT
K3bAudioCdTrackSource::K3bAudioCdTrackSource( unsigned int discid, const K3b::Msf& length, int cdTrackNumber,
- const QString& artist, const QString& title,
- const QString& cdArtist, const QString& cdTitle )
+ const TQString& artist, const TQString& title,
+ const TQString& cdArtist, const TQString& cdTitle )
: K3bAudioDataSource(),
m_discId( discid ),
m_length( length ),
@@ -56,8 +56,8 @@ K3bAudioCdTrackSource::K3bAudioCdTrackSource( unsigned int discid, const K3b::Ms
m_initialized( false )
{
for( int i = 1; i < cdTrackNumber; ++i ) {
- m_cddbEntry.titles.append( QString::null );
- m_cddbEntry.artists.append( QString::null );
+ m_cddbEntry.titles.append( TQString() );
+ m_cddbEntry.artists.append( TQString() );
}
m_cddbEntry.titles.append( title );
m_cddbEntry.artists.append( artist );
@@ -98,10 +98,10 @@ bool K3bAudioCdTrackSource::initParanoia()
// ask here for the cd since searchForAudioCD() may also be called from outside
if( !m_lastUsedDevice ) {
// could not find the CD, so ask for it
- QString s = i18n("Please insert Audio CD %1%2")
- .arg(m_discId, 0, 16)
- .arg(m_cddbEntry.cdTitle.isEmpty() || m_cddbEntry.cdArtist.isEmpty()
- ? QString::null
+ TQString s = i18n("Please insert Audio CD %1%2")
+ .tqarg(m_discId, 0, 16)
+ .tqarg(m_cddbEntry.cdTitle.isEmpty() || m_cddbEntry.cdArtist.isEmpty()
+ ? TQString()
: " (" + m_cddbEntry.cdArtist + " - " + m_cddbEntry.cdTitle + ")");
while( K3bDevice::Device* dev = K3bThreadWidget::selectDevice( track()->doc()->view(), s ) ) {
@@ -163,8 +163,8 @@ K3bDevice::Device* K3bAudioCdTrackSource::searchForAudioCD() const
if( m_lastUsedDevice && searchForAudioCD( m_lastUsedDevice ) )
return m_lastUsedDevice;
- const QPtrList<K3bDevice::Device>& devices = k3bcore->deviceManager()->readingDevices();
- for( QPtrListIterator<K3bDevice::Device> it(devices); *it; ++it ) {
+ const TQPtrList<K3bDevice::Device>& devices = k3bcore->deviceManager()->readingDevices();
+ for( TQPtrListIterator<K3bDevice::Device> it(devices); *it; ++it ) {
if( searchForAudioCD( *it ) ) {
return *it;
}
@@ -244,15 +244,15 @@ int K3bAudioCdTrackSource::read( char* data, unsigned int )
}
-QString K3bAudioCdTrackSource::type() const
+TQString K3bAudioCdTrackSource::type() const
{
return i18n("CD Track");
}
-QString K3bAudioCdTrackSource::sourceComment() const
+TQString K3bAudioCdTrackSource::sourceComment() const
{
- return i18n("Track %1 from Audio CD %2").arg(m_cdTrackNumber).arg(m_discId,0,16);
+ return i18n("Track %1 from Audio CD %2").tqarg(m_cdTrackNumber).tqarg(m_discId,0,16);
}
diff --git a/libk3b/projects/audiocd/k3baudiocdtracksource.h b/libk3b/projects/audiocd/k3baudiocdtracksource.h
index 6eaaa5b..b6e4ea4 100644
--- a/libk3b/projects/audiocd/k3baudiocdtracksource.h
+++ b/libk3b/projects/audiocd/k3baudiocdtracksource.h
@@ -50,8 +50,8 @@ class LIBK3B_EXPORT K3bAudioCdTrackSource : public K3bAudioDataSource
* Constructor to create sources when loading from a project file without toc information
*/
K3bAudioCdTrackSource( unsigned int discid, const K3b::Msf& length, int cdTrackNumber,
- const QString& artist, const QString& title,
- const QString& cdartist, const QString& cdtitle );
+ const TQString& artist, const TQString& title,
+ const TQString& cdartist, const TQString& cdtitle );
K3bAudioCdTrackSource( const K3bAudioCdTrackSource& );
~K3bAudioCdTrackSource();
@@ -62,8 +62,8 @@ class LIBK3B_EXPORT K3bAudioCdTrackSource : public K3bAudioDataSource
K3b::Msf originalLength() const;
bool seek( const K3b::Msf& );
int read( char* data, unsigned int max );
- QString type() const;
- QString sourceComment() const;
+ TQString type() const;
+ TQString sourceComment() const;
K3bAudioDataSource* copy() const;
/**
diff --git a/libk3b/projects/audiocd/k3baudiodatasource.h b/libk3b/projects/audiocd/k3baudiodatasource.h
index d12fd10..5ac7336 100644
--- a/libk3b/projects/audiocd/k3baudiodatasource.h
+++ b/libk3b/projects/audiocd/k3baudiodatasource.h
@@ -79,12 +79,12 @@ class LIBK3B_EXPORT K3bAudioDataSource
/**
* Type of the data in readable form.
*/
- virtual QString type() const = 0;
+ virtual TQString type() const = 0;
/**
* The source in readable form (this is the filename for files)
*/
- virtual QString sourceComment() const = 0;
+ virtual TQString sourceComment() const = 0;
/**
* Used in case an error occurred. For now this is used if the
@@ -150,7 +150,7 @@ class LIBK3B_EXPORT K3bAudioDataSource
protected:
/**
- * Informs the parent track about changes.
+ * Informs the tqparent track about changes.
*/
void emitChange();
diff --git a/libk3b/projects/audiocd/k3baudiodatasourceiterator.h b/libk3b/projects/audiocd/k3baudiodatasourceiterator.h
index 7a0ce59..f340fce 100644
--- a/libk3b/projects/audiocd/k3baudiodatasourceiterator.h
+++ b/libk3b/projects/audiocd/k3baudiodatasourceiterator.h
@@ -26,7 +26,7 @@ class K3bAudioDoc;
*
* Be aware that this iterator does not properly update when the doc
* changes. A manual update can be issued with first(). This is becasue
- * an update would either involve slots (this being a QObject) which is
+ * an update would either involve slots (this being a TQObject) which is
* too much overhead or the AudioDoc would need to have knowledge of all
* the iterators which is also overhead that would be overkill.
*/
diff --git a/libk3b/projects/audiocd/k3baudiodoc.cpp b/libk3b/projects/audiocd/k3baudiodoc.cpp
index e7661ba..817d5fa 100644
--- a/libk3b/projects/audiocd/k3baudiodoc.cpp
+++ b/libk3b/projects/audiocd/k3baudiodoc.cpp
@@ -29,16 +29,16 @@
// QT-includes
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdatastream.h>
-#include <qdir.h>
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
-#include <qsemaphore.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdatastream.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
+#include <tqsemaphore.h>
// KDE-includes
#include <kprocess.h>
@@ -69,8 +69,8 @@ public:
};
-K3bAudioDoc::K3bAudioDoc( QObject* parent )
- : K3bDoc( parent ),
+K3bAudioDoc::K3bAudioDoc( TQObject* tqparent )
+ : K3bDoc( tqparent ),
m_firstTrack(0),
m_lastTrack(0)
{
@@ -111,7 +111,7 @@ bool K3bAudioDoc::newDocument()
}
-QString K3bAudioDoc::name() const
+TQString K3bAudioDoc::name() const
{
if( !m_cdTextData.title().isEmpty() )
return m_cdTextData.title();
@@ -212,7 +212,7 @@ KURL::List K3bAudioDoc::extractUrlList( const KURL::List& urls )
while( it != allUrls.end() ) {
const KURL& url = *it;
- QFileInfo fi( url.path() );
+ TQFileInfo fi( url.path() );
if( !url.isLocalFile() ) {
kdDebug() << url.path() << " no local file" << endl;
@@ -227,11 +227,11 @@ KURL::List K3bAudioDoc::extractUrlList( const KURL::List& urls )
else if( fi.isDir() ) {
it = allUrls.remove( it );
// add all files in the dir
- QDir dir(fi.filePath());
- QStringList entries = dir.entryList( QDir::Files );
+ TQDir dir(fi.filePath());
+ TQStringList entries = dir.entryList( TQDir::Files );
KURL::List::iterator oldIt = it;
// add all files into the list after the current item
- for( QStringList::iterator dirIt = entries.begin();
+ for( TQStringList::iterator dirIt = entries.begin();
dirIt != entries.end(); ++dirIt )
it = allUrls.insert( oldIt, KURL::fromPathOrURL( dir.absPath() + "/" + *dirIt ) );
}
@@ -256,14 +256,14 @@ bool K3bAudioDoc::readPlaylistFile( const KURL& url, KURL::List& playlist )
// check if the file is a m3u playlist
// and if so add all listed files
- QFile f( url.path() );
+ TQFile f( url.path() );
if( !f.open( IO_ReadOnly ) )
return false;
- QTextStream t( &f );
+ TQTextStream t( &f );
char buf[7];
t.readRawBytes( buf, 7 );
- if( QString::fromLatin1( buf, 7 ) != "#EXTM3U" )
+ if( TQString::tqfromLatin1( buf, 7 ) != "#EXTM3U" )
return false;
// skip the first line
@@ -271,7 +271,7 @@ bool K3bAudioDoc::readPlaylistFile( const KURL& url, KURL::List& playlist )
// read the file
while( !t.atEnd() ) {
- QString line = t.readLine();
+ TQString line = t.readLine();
if( line[0] != '#' ) {
KURL mp3url;
// relative paths
@@ -288,11 +288,11 @@ bool K3bAudioDoc::readPlaylistFile( const KURL& url, KURL::List& playlist )
}
-void K3bAudioDoc::addSources( K3bAudioTrack* parent,
+void K3bAudioDoc::addSources( K3bAudioTrack* tqparent,
const KURL::List& urls,
K3bAudioDataSource* sourceAfter )
{
- kdDebug() << "(K3bAudioDoc::addSources( " << parent << ", "
+ kdDebug() << "(K3bAudioDoc::addSources( " << tqparent << ", "
<< urls.first().path() << ", "
<< sourceAfter << " )" << endl;
KURL::List allUrls = extractUrlList( urls );
@@ -302,7 +302,7 @@ void K3bAudioDoc::addSources( K3bAudioTrack* parent,
if( sourceAfter )
file->moveAfter( sourceAfter );
else
- file->moveAhead( parent->firstSource() );
+ file->moveAhead( tqparent->firstSource() );
sourceAfter = file;
}
}
@@ -312,7 +312,7 @@ void K3bAudioDoc::addSources( K3bAudioTrack* parent,
}
-K3bAudioTrack* K3bAudioDoc::importCueFile( const QString& cuefile, K3bAudioTrack* after, K3bAudioDecoder* decoder )
+K3bAudioTrack* K3bAudioDoc::importCueFile( const TQString& cuefile, K3bAudioTrack* after, K3bAudioDecoder* decoder )
{
if( !after )
after = m_lastTrack;
@@ -382,7 +382,7 @@ K3bAudioDecoder* K3bAudioDoc::getDecoderForUrl( const KURL& url, bool* reused )
K3bAudioDecoder* decoder = 0;
// check if we already have a proper decoder
- if( m_decoderPresenceMap.contains( url.path() ) ) {
+ if( m_decoderPresenceMap.tqcontains( url.path() ) ) {
decoder = m_decoderPresenceMap[url.path()];
*reused = true;
}
@@ -400,7 +400,7 @@ K3bAudioDecoder* K3bAudioDoc::getDecoderForUrl( const KURL& url, bool* reused )
K3bAudioFile* K3bAudioDoc::createAudioFile( const KURL& url )
{
- if( !QFile::exists( url.path() ) ) {
+ if( !TQFile::exists( url.path() ) ) {
m_notFoundFiles.append( url.path() );
kdDebug() << "(K3bAudioDoc) could not find file " << url.path() << endl;
return 0;
@@ -488,24 +488,24 @@ void K3bAudioDoc::moveTrack( K3bAudioTrack* track, K3bAudioTrack* after )
}
-QString K3bAudioDoc::typeString() const
+TQString K3bAudioDoc::typeString() const
{
return "audio";
}
-bool K3bAudioDoc::loadDocumentData( QDomElement* root )
+bool K3bAudioDoc::loadDocumentData( TQDomElement* root )
{
newDocument();
// we will parse the dom-tree and create a K3bAudioTrack for all entries immediately
// this should not take long and so not block the gui
- QDomNodeList nodes = root->childNodes();
+ TQDomNodeList nodes = root->childNodes();
for( uint i = 0; i < nodes.count(); i++ ) {
- QDomElement e = nodes.item(i).toElement();
+ TQDomElement e = nodes.item(i).toElement();
if( e.isNull() )
return false;
@@ -522,7 +522,7 @@ bool K3bAudioDoc::loadDocumentData( QDomElement* root )
setHideFirstTrack( e.text() == "yes" );
else if( e.nodeName() == "audio_ripping" ) {
- QDomNodeList ripNodes = e.childNodes();
+ TQDomNodeList ripNodes = e.childNodes();
for( uint j = 0; j < ripNodes.length(); j++ ) {
if( ripNodes.item(j).nodeName() == "paranoia_mode" )
setAudioRippingParanoiaMode( ripNodes.item(j).toElement().text().toInt() );
@@ -540,7 +540,7 @@ bool K3bAudioDoc::loadDocumentData( QDomElement* root )
writeCdText( e.attributeNode( "activated" ).value() == "yes" );
- QDomNodeList cdTextNodes = e.childNodes();
+ TQDomNodeList cdTextNodes = e.childNodes();
for( uint j = 0; j < cdTextNodes.length(); j++ ) {
if( cdTextNodes.item(j).nodeName() == "title" )
setTitle( cdTextNodes.item(j).toElement().text() );
@@ -570,11 +570,11 @@ bool K3bAudioDoc::loadDocumentData( QDomElement* root )
else if( e.nodeName() == "contents" ) {
- QDomNodeList contentNodes = e.childNodes();
+ TQDomNodeList contentNodes = e.childNodes();
for( uint j = 0; j< contentNodes.length(); j++ ) {
- QDomElement trackElem = contentNodes.item(j).toElement();
+ TQDomElement trackElem = contentNodes.item(j).toElement();
// first of all we need a track
K3bAudioTrack* track = new K3bAudioTrack();
@@ -582,7 +582,7 @@ bool K3bAudioDoc::loadDocumentData( QDomElement* root )
// backwards compatibility
// -----------------------------------------------------------------------------------------------------
- QDomAttr oldUrlAttr = trackElem.attributeNode( "url" );
+ TQDomAttr oldUrlAttr = trackElem.attributeNode( "url" );
if( !oldUrlAttr.isNull() ) {
if( K3bAudioFile* file =
createAudioFile( KURL::fromPathOrURL( oldUrlAttr.value() ) ) ) {
@@ -592,13 +592,13 @@ bool K3bAudioDoc::loadDocumentData( QDomElement* root )
// -----------------------------------------------------------------------------------------------------
- QDomNodeList trackNodes = trackElem.childNodes();
+ TQDomNodeList trackNodes = trackElem.childNodes();
for( uint trackJ = 0; trackJ < trackNodes.length(); trackJ++ ) {
if( trackNodes.item(trackJ).nodeName() == "sources" ) {
- QDomNodeList sourcesNodes = trackNodes.item(trackJ).childNodes();
+ TQDomNodeList sourcesNodes = trackNodes.item(trackJ).childNodes();
for( unsigned int sourcesIndex = 0; sourcesIndex < sourcesNodes.length(); sourcesIndex++ ) {
- QDomElement sourceElem = sourcesNodes.item(sourcesIndex).toElement();
+ TQDomElement sourceElem = sourcesNodes.item(sourcesIndex).toElement();
if( sourceElem.nodeName() == "file" ) {
if( K3bAudioFile* file =
createAudioFile( KURL::fromPathOrURL( sourceElem.attributeNode( "url" ).value() ) ) ) {
@@ -616,11 +616,11 @@ bool K3bAudioDoc::loadDocumentData( QDomElement* root )
K3b::Msf length = K3b::Msf::fromString( sourceElem.attributeNode( "length" ).value() );
int titlenum = 0;
unsigned int discid = 0;
- QString title, artist, cdTitle, cdArtist;
+ TQString title, artist, cdTitle, cdArtist;
- QDomNodeList cdTrackSourceNodes = sourceElem.childNodes();
+ TQDomNodeList cdTrackSourceNodes = sourceElem.childNodes();
for( unsigned int cdTrackSourceIndex = 0; cdTrackSourceIndex < cdTrackSourceNodes.length(); ++cdTrackSourceIndex ) {
- QDomElement cdTrackSourceItemElem = cdTrackSourceNodes.item(cdTrackSourceIndex).toElement();
+ TQDomElement cdTrackSourceItemElem = cdTrackSourceNodes.item(cdTrackSourceIndex).toElement();
if( cdTrackSourceItemElem.nodeName() == "title_number" )
titlenum = cdTrackSourceItemElem.text().toInt();
else if( cdTrackSourceItemElem.nodeName() == "disc_id" )
@@ -657,7 +657,7 @@ bool K3bAudioDoc::loadDocumentData( QDomElement* root )
// load cd-text
else if( trackNodes.item(trackJ).nodeName() == "cd-text" ) {
- QDomNodeList cdTextNodes = trackNodes.item(trackJ).childNodes();
+ TQDomNodeList cdTextNodes = trackNodes.item(trackJ).childNodes();
for( uint trackCdTextJ = 0; trackCdTextJ < cdTextNodes.length(); trackCdTextJ++ ) {
if( cdTextNodes.item(trackCdTextJ).nodeName() == "title" )
track->setTitle( cdTextNodes.item(trackCdTextJ).toElement().text() );
@@ -713,33 +713,33 @@ bool K3bAudioDoc::loadDocumentData( QDomElement* root )
return true;
}
-bool K3bAudioDoc::saveDocumentData( QDomElement* docElem )
+bool K3bAudioDoc::saveDocumentData( TQDomElement* docElem )
{
- QDomDocument doc = docElem->ownerDocument();
+ TQDomDocument doc = docElem->ownerDocument();
saveGeneralDocumentData( docElem );
// add normalize
- QDomElement normalizeElem = doc.createElement( "normalize" );
+ TQDomElement normalizeElem = doc.createElement( "normalize" );
normalizeElem.appendChild( doc.createTextNode( normalize() ? "yes" : "no" ) );
docElem->appendChild( normalizeElem );
// add hide track
- QDomElement hideFirstTrackElem = doc.createElement( "hide_first_track" );
+ TQDomElement hideFirstTrackElem = doc.createElement( "hide_first_track" );
hideFirstTrackElem.appendChild( doc.createTextNode( hideFirstTrack() ? "yes" : "no" ) );
docElem->appendChild( hideFirstTrackElem );
// save the audio cd ripping settings
// paranoia mode, read retries, and ignore read errors
// ------------------------------------------------------------
- QDomElement ripMain = doc.createElement( "audio_ripping" );
+ TQDomElement ripMain = doc.createElement( "audio_ripping" );
docElem->appendChild( ripMain );
- QDomElement ripElem = doc.createElement( "paranoia_mode" );
- ripElem.appendChild( doc.createTextNode( QString::number( audioRippingParanoiaMode() ) ) );
+ TQDomElement ripElem = doc.createElement( "paranoia_mode" );
+ ripElem.appendChild( doc.createTextNode( TQString::number( audioRippingParanoiaMode() ) ) );
ripMain.appendChild( ripElem );
ripElem = doc.createElement( "read_retries" );
- ripElem.appendChild( doc.createTextNode( QString::number( audioRippingRetries() ) ) );
+ ripElem.appendChild( doc.createTextNode( TQString::number( audioRippingRetries() ) ) );
ripMain.appendChild( ripElem );
ripElem = doc.createElement( "ignore_read_errors" );
@@ -749,9 +749,9 @@ bool K3bAudioDoc::saveDocumentData( QDomElement* docElem )
// save disc cd-text
// -------------------------------------------------------------
- QDomElement cdTextMain = doc.createElement( "cd-text" );
+ TQDomElement cdTextMain = doc.createElement( "cd-text" );
cdTextMain.setAttribute( "activated", cdText() ? "yes" : "no" );
- QDomElement cdTextElem = doc.createElement( "title" );
+ TQDomElement cdTextElem = doc.createElement( "title" );
cdTextElem.appendChild( doc.createTextNode( (title())) );
cdTextMain.appendChild( cdTextElem );
@@ -788,42 +788,42 @@ bool K3bAudioDoc::saveDocumentData( QDomElement* docElem )
// save the tracks
// -------------------------------------------------------------
- QDomElement contentsElem = doc.createElement( "contents" );
+ TQDomElement contentsElem = doc.createElement( "contents" );
for( K3bAudioTrack* track = firstTrack(); track != 0; track = track->next() ) {
- QDomElement trackElem = doc.createElement( "track" );
+ TQDomElement trackElem = doc.createElement( "track" );
// add sources
- QDomElement sourcesParent = doc.createElement( "sources" );
+ TQDomElement sourcesParent = doc.createElement( "sources" );
for( K3bAudioDataSource* source = track->firstSource(); source; source = source->next() ) {
// TODO: save a source element with a type attribute and start- and endoffset
// then distict between the different source types.
if( K3bAudioFile* file = dynamic_cast<K3bAudioFile*>(source) ) {
- QDomElement sourceElem = doc.createElement( "file" );
+ TQDomElement sourceElem = doc.createElement( "file" );
sourceElem.setAttribute( "url", file->filename() );
sourceElem.setAttribute( "start_offset", file->startOffset().toString() );
sourceElem.setAttribute( "end_offset", file->endOffset().toString() );
sourcesParent.appendChild( sourceElem );
}
else if( K3bAudioZeroData* zero = dynamic_cast<K3bAudioZeroData*>(source) ) {
- QDomElement sourceElem = doc.createElement( "silence" );
+ TQDomElement sourceElem = doc.createElement( "silence" );
sourceElem.setAttribute( "length", zero->length().toString() );
sourcesParent.appendChild( sourceElem );
}
else if( K3bAudioCdTrackSource* cdTrack = dynamic_cast<K3bAudioCdTrackSource*>(source) ) {
- QDomElement sourceElem = doc.createElement( "cdtrack" );
+ TQDomElement sourceElem = doc.createElement( "cdtrack" );
sourceElem.setAttribute( "length", cdTrack->originalLength().toString() );
sourceElem.setAttribute( "start_offset", cdTrack->startOffset().toString() );
sourceElem.setAttribute( "end_offset", cdTrack->endOffset().toString() );
- QDomElement subElem = doc.createElement( "title_number" );
- subElem.appendChild( doc.createTextNode( QString::number(cdTrack->cdTrackNumber()) ) );
+ TQDomElement subElem = doc.createElement( "title_number" );
+ subElem.appendChild( doc.createTextNode( TQString::number(cdTrack->cdTrackNumber()) ) );
sourceElem.appendChild( subElem );
subElem = doc.createElement( "disc_id" );
- subElem.appendChild( doc.createTextNode( QString::number(cdTrack->discId(), 16) ) );
+ subElem.appendChild( doc.createTextNode( TQString::number(cdTrack->discId(), 16) ) );
sourceElem.appendChild( subElem );
subElem = doc.createElement( "title" );
@@ -852,7 +852,7 @@ bool K3bAudioDoc::saveDocumentData( QDomElement* docElem )
trackElem.appendChild( sourcesParent );
// index 0
- QDomElement index0Elem = doc.createElement( "index0" );
+ TQDomElement index0Elem = doc.createElement( "index0" );
index0Elem.appendChild( doc.createTextNode( track->index0().toString() ) );
trackElem.appendChild( index0Elem );
@@ -891,7 +891,7 @@ bool K3bAudioDoc::saveDocumentData( QDomElement* docElem )
trackElem.appendChild( cdTextMain );
// add copy protection
- QDomElement copyElem = doc.createElement( "copy_protection" );
+ TQDomElement copyElem = doc.createElement( "copy_protection" );
copyElem.appendChild( doc.createTextNode( track->copyProtection() ? "yes" : "no" ) );
trackElem.appendChild( copyElem );
@@ -916,20 +916,20 @@ int K3bAudioDoc::numOfTracks() const
}
-K3bBurnJob* K3bAudioDoc::newBurnJob( K3bJobHandler* hdl, QObject* parent )
+K3bBurnJob* K3bAudioDoc::newBurnJob( K3bJobHandler* hdl, TQObject* tqparent )
{
- return new K3bAudioJob( this, hdl, parent );
+ return new K3bAudioJob( this, hdl, tqparent );
}
void K3bAudioDoc::informAboutNotFoundFiles()
{
if( !m_notFoundFiles.isEmpty() ) {
- QStringList l;
+ TQStringList l;
for( KURL::List::const_iterator it = m_notFoundFiles.begin();
it != m_notFoundFiles.end(); ++it )
l.append( (*it).path() );
- KMessageBox::informationList( qApp->activeWindow(),
+ KMessageBox::informationList( TQT_TQWIDGET(tqApp->activeWindow()),
i18n("Could not find the following files:"),
l,
i18n("Not Found") );
@@ -937,11 +937,11 @@ void K3bAudioDoc::informAboutNotFoundFiles()
m_notFoundFiles.clear();
}
if( !m_unknownFileFormatFiles.isEmpty() ) {
- QStringList l;
+ TQStringList l;
for( KURL::List::const_iterator it = m_unknownFileFormatFiles.begin();
it != m_unknownFileFormatFiles.end(); ++it )
l.append( (*it).path() );
- KMessageBox::informationList( qApp->activeWindow(),
+ KMessageBox::informationList( TQT_TQWIDGET(tqApp->activeWindow()),
i18n("<p>Unable to handle the following files due to an unsupported format:"
"<p>You may manually convert these audio files to wave using another "
"application supporting the audio format and then add the wave files "
@@ -997,7 +997,7 @@ void K3bAudioDoc::slotTrackRemoved( K3bAudioTrack* track )
void K3bAudioDoc::increaseDecoderUsage( K3bAudioDecoder* decoder )
{
kdDebug() << "(K3bAudioDoc::increaseDecoderUsage)" << endl;
- if( !m_decoderUsageCounterMap.contains( decoder ) ) {
+ if( !m_decoderUsageCounterMap.tqcontains( decoder ) ) {
m_decoderUsageCounterMap[decoder] = 1;
m_decoderPresenceMap[decoder->filename()] = decoder;
}
@@ -1049,76 +1049,76 @@ K3bDevice::Toc K3bAudioDoc::toToc() const
}
-void K3bAudioDoc::setTitle( const QString& v )
+void K3bAudioDoc::setTitle( const TQString& v )
{
m_cdTextData.setTitle( v );
emit changed();
}
-void K3bAudioDoc::setArtist( const QString& v )
+void K3bAudioDoc::setArtist( const TQString& v )
{
setPerformer( v );
}
-void K3bAudioDoc::setPerformer( const QString& v )
+void K3bAudioDoc::setPerformer( const TQString& v )
{
- QString s( v );
+ TQString s( v );
d->cdTextValidator->fixup( s );
m_cdTextData.setPerformer( s );
emit changed();
}
-void K3bAudioDoc::setDisc_id( const QString& v )
+void K3bAudioDoc::setDisc_id( const TQString& v )
{
- QString s( v );
+ TQString s( v );
d->cdTextValidator->fixup( s );
m_cdTextData.setDiscId( s );
emit changed();
}
-void K3bAudioDoc::setArranger( const QString& v )
+void K3bAudioDoc::setArranger( const TQString& v )
{
- QString s( v );
+ TQString s( v );
d->cdTextValidator->fixup( s );
m_cdTextData.setArranger( s );
emit changed();
}
-void K3bAudioDoc::setSongwriter( const QString& v )
+void K3bAudioDoc::setSongwriter( const TQString& v )
{
- QString s( v );
+ TQString s( v );
d->cdTextValidator->fixup( s );
m_cdTextData.setSongwriter( s );
emit changed();
}
-void K3bAudioDoc::setComposer( const QString& v )
+void K3bAudioDoc::setComposer( const TQString& v )
{
- QString s( v );
+ TQString s( v );
d->cdTextValidator->fixup( s );
m_cdTextData.setComposer( s );
emit changed();
}
-void K3bAudioDoc::setUpc_ean( const QString& v )
+void K3bAudioDoc::setUpc_ean( const TQString& v )
{
- QString s( v );
+ TQString s( v );
d->cdTextValidator->fixup( s );
m_cdTextData.setUpcEan( s );
emit changed();
}
-void K3bAudioDoc::setCdTextMessage( const QString& v )
+void K3bAudioDoc::setCdTextMessage( const TQString& v )
{
- QString s( v );
+ TQString s( v );
d->cdTextValidator->fixup( s );
m_cdTextData.setMessage( s );
emit changed();
diff --git a/libk3b/projects/audiocd/k3baudiodoc.h b/libk3b/projects/audiocd/k3baudiodoc.h
index 87a512e..943bf14 100644
--- a/libk3b/projects/audiocd/k3baudiodoc.h
+++ b/libk3b/projects/audiocd/k3baudiodoc.h
@@ -22,21 +22,21 @@
#include <k3bcdtext.h>
#include <k3btoc.h>
-#include <qptrlist.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
+#include <tqptrlist.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
#include "k3b_export.h"
#include <kurl.h>
class K3bApp;
class K3bAudioTrack;
-class QWidget;
-class QTimer;
-class QDomDocument;
-class QDomElement;
+class TQWidget;
+class TQTimer;
+class TQDomDocument;
+class TQDomElement;
class K3bThreadJob;
class KConfig;
class K3bAudioDataSource;
@@ -50,16 +50,17 @@ class K3bAudioFile;
class LIBK3B_EXPORT K3bAudioDoc : public K3bDoc
{
Q_OBJECT
+ TQ_OBJECT
friend class K3bMixedDoc;
friend class K3bAudioTrack;
friend class K3bAudioFile;
public:
- K3bAudioDoc( QObject* );
+ K3bAudioDoc( TQObject* );
~K3bAudioDoc();
- QString name() const;
+ TQString name() const;
bool newDocument();
@@ -88,14 +89,14 @@ class LIBK3B_EXPORT K3bAudioDoc : public K3bDoc
// CD-Text
bool cdText() const { return m_cdText; }
- const QString& title() const { return m_cdTextData.title(); }
- const QString& artist() const { return m_cdTextData.performer(); }
- const QString& disc_id() const { return m_cdTextData.discId(); }
- const QString& arranger() const { return m_cdTextData.arranger(); }
- const QString& songwriter() const { return m_cdTextData.songwriter(); }
- const QString& composer() const { return m_cdTextData.composer(); }
- const QString& upc_ean() const { return m_cdTextData.upcEan(); }
- const QString& cdTextMessage() const { return m_cdTextData.message(); }
+ const TQString& title() const { return m_cdTextData.title(); }
+ const TQString& artist() const { return m_cdTextData.performer(); }
+ const TQString& disc_id() const { return m_cdTextData.discId(); }
+ const TQString& arranger() const { return m_cdTextData.arranger(); }
+ const TQString& songwriter() const { return m_cdTextData.songwriter(); }
+ const TQString& composer() const { return m_cdTextData.composer(); }
+ const TQString& upc_ean() const { return m_cdTextData.upcEan(); }
+ const TQString& cdTextMessage() const { return m_cdTextData.message(); }
/**
* Create complete CD-Text including the tracks' data.
@@ -111,7 +112,7 @@ class LIBK3B_EXPORT K3bAudioDoc : public K3bDoc
*/
K3bDevice::Toc toToc() const;
- K3bBurnJob* newBurnJob( K3bJobHandler*, QObject* parent = 0 );
+ K3bBurnJob* newBurnJob( K3bJobHandler*, TQObject* tqparent = 0 );
/**
* Shows dialogs.
@@ -130,7 +131,7 @@ class LIBK3B_EXPORT K3bAudioDoc : public K3bDoc
*
* BE AWARE THAT THE DECODER HAS TO FIT THE AUDIO FILE IN THE CUE.
*/
- K3bAudioTrack* importCueFile( const QString& cuefile, K3bAudioTrack* after, K3bAudioDecoder* decoder = 0 );
+ K3bAudioTrack* importCueFile( const TQString& cuefile, K3bAudioTrack* after, K3bAudioDecoder* decoder = 0 );
/**
* Create a decoder for a specific url. If another AudioFileSource with this
@@ -158,7 +159,7 @@ class LIBK3B_EXPORT K3bAudioDoc : public K3bDoc
*/
void addTrack( K3bAudioTrack* track, uint position = 0 );
- void addSources( K3bAudioTrack* parent, const KURL::List& urls, K3bAudioDataSource* sourceAfter = 0 );
+ void addSources( K3bAudioTrack* tqparent, const KURL::List& urls, K3bAudioDataSource* sourceAfter = 0 );
void removeTrack( K3bAudioTrack* );
void moveTrack( K3bAudioTrack* track, K3bAudioTrack* after );
@@ -168,15 +169,15 @@ class LIBK3B_EXPORT K3bAudioDoc : public K3bDoc
// CD-Text
void writeCdText( bool b ) { m_cdText = b; }
- void setTitle( const QString& v );
- void setArtist( const QString& v );
- void setPerformer( const QString& v );
- void setDisc_id( const QString& v );
- void setArranger( const QString& v );
- void setSongwriter( const QString& v );
- void setComposer( const QString& v );
- void setUpc_ean( const QString& v );
- void setCdTextMessage( const QString& v );
+ void setTitle( const TQString& v );
+ void setArtist( const TQString& v );
+ void setPerformer( const TQString& v );
+ void setDisc_id( const TQString& v );
+ void setArranger( const TQString& v );
+ void setSongwriter( const TQString& v );
+ void setComposer( const TQString& v );
+ void setUpc_ean( const TQString& v );
+ void setCdTextMessage( const TQString& v );
// Audio-CD Ripping
void setAudioRippingParanoiaMode( int i ) { m_audioRippingParanoiaMode = i; }
@@ -195,11 +196,11 @@ class LIBK3B_EXPORT K3bAudioDoc : public K3bDoc
protected:
/** reimplemented from K3bDoc */
- bool loadDocumentData( QDomElement* );
+ bool loadDocumentData( TQDomElement* );
/** reimplemented from K3bDoc */
- bool saveDocumentData( QDomElement* );
+ bool saveDocumentData( TQDomElement* );
- QString typeString() const;
+ TQString typeString() const;
private:
// the stuff for adding files
@@ -251,9 +252,9 @@ class LIBK3B_EXPORT K3bAudioDoc : public K3bDoc
// decoder housekeeping
// --------------------------------------------------
// used to check if we may delete a decoder
- QMap<K3bAudioDecoder*, int> m_decoderUsageCounterMap;
+ TQMap<K3bAudioDecoder*, int> m_decoderUsageCounterMap;
// used to check if we already have a decoder for a specific file
- QMap<QString, K3bAudioDecoder*> m_decoderPresenceMap;
+ TQMap<TQString, K3bAudioDecoder*> m_decoderPresenceMap;
class Private;
Private* d;
diff --git a/libk3b/projects/audiocd/k3baudiofile.cpp b/libk3b/projects/audiocd/k3baudiofile.cpp
index 2011e73..955dab0 100644
--- a/libk3b/projects/audiocd/k3baudiofile.cpp
+++ b/libk3b/projects/audiocd/k3baudiofile.cpp
@@ -47,19 +47,19 @@ K3bAudioFile::~K3bAudioFile()
}
-QString K3bAudioFile::type() const
+TQString K3bAudioFile::type() const
{
return m_decoder->fileType();
}
-QString K3bAudioFile::sourceComment() const
+TQString K3bAudioFile::sourceComment() const
{
return m_decoder->filename().section( "/", -1 );
}
-const QString& K3bAudioFile::filename() const
+const TQString& K3bAudioFile::filename() const
{
return m_decoder->filename();
}
diff --git a/libk3b/projects/audiocd/k3baudiofile.h b/libk3b/projects/audiocd/k3baudiofile.h
index 83f75eb..74d0a12 100644
--- a/libk3b/projects/audiocd/k3baudiofile.h
+++ b/libk3b/projects/audiocd/k3baudiofile.h
@@ -55,15 +55,15 @@ class LIBK3B_EXPORT K3bAudioFile : public K3bAudioDataSource
*/
~K3bAudioFile();
- const QString& filename() const;
+ const TQString& filename() const;
/**
* The complete length of the file used by this source.
*/
K3b::Msf originalLength() const;
- QString type() const;
- QString sourceComment() const;
+ TQString type() const;
+ TQString sourceComment() const;
bool isValid() const;
diff --git a/libk3b/projects/audiocd/k3baudioimager.cpp b/libk3b/projects/audiocd/k3baudioimager.cpp
index b8a7a11..0a385e9 100644
--- a/libk3b/projects/audiocd/k3baudioimager.cpp
+++ b/libk3b/projects/audiocd/k3baudioimager.cpp
@@ -24,7 +24,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <unistd.h>
@@ -40,7 +40,7 @@ public:
bool m_canceled;
int m_fd;
- QStringList m_imageNames;
+ TQStringList m_imageNames;
K3bAudioImager::ErrorType lastError;
private:
@@ -68,7 +68,7 @@ void K3bAudioImager::WorkThread::run()
//
//
//
- QStringList::iterator imageFileIt = m_imageNames.begin();
+ TQStringList::iterator imageFileIt = m_imageNames.begin();
K3bWaveFileWriter waveFileWriter;
K3bAudioTrack* track = m_doc->firstTrack();
@@ -85,7 +85,7 @@ void K3bAudioImager::WorkThread::run()
// Seek to the beginning of the track
//
if( !track->seek(0) ) {
- emitInfoMessage( i18n("Unable to seek in track %1.").arg(trackNumber), K3bJob::ERROR );
+ emitInfoMessage( i18n("Unable to seek in track %1.").tqarg(trackNumber), K3bJob::ERROR );
emitFinished(false);
return;
}
@@ -101,7 +101,7 @@ void K3bAudioImager::WorkThread::run()
//
if( m_fd == -1 ) {
if( !waveFileWriter.open( *imageFileIt ) ) {
- emitInfoMessage( i18n("Could not open %1 for writing").arg(*imageFileIt), K3bJob::ERROR );
+ emitInfoMessage( i18n("Could not open %1 for writing").tqarg(*imageFileIt), K3bJob::ERROR );
emitFinished(false);
return;
}
@@ -142,7 +142,7 @@ void K3bAudioImager::WorkThread::run()
}
if( read < 0 ) {
- emitInfoMessage( i18n("Error while decoding track %1.").arg(trackNumber), K3bJob::ERROR );
+ emitInfoMessage( i18n("Error while decoding track %1.").tqarg(trackNumber), K3bJob::ERROR );
kdDebug() << "(K3bAudioImager::WorkThread) read error on track " << trackNumber
<< " at pos " << K3b::Msf(trackRead/2352) << endl;
lastError = K3bAudioImager::ERROR_DECODING_TRACK;
@@ -167,8 +167,8 @@ void K3bAudioImager::WorkThread::cancel()
-K3bAudioImager::K3bAudioImager( K3bAudioDoc* doc, K3bJobHandler* jh, QObject* parent, const char* name )
- : K3bThreadJob( jh, parent, name ),
+K3bAudioImager::K3bAudioImager( K3bAudioDoc* doc, K3bJobHandler* jh, TQObject* tqparent, const char* name )
+ : K3bThreadJob( jh, tqparent, name ),
m_doc(doc)
{
m_thread = new WorkThread(doc);
@@ -188,7 +188,7 @@ void K3bAudioImager::writeToFd( int fd )
}
-void K3bAudioImager::setImageFilenames( const QStringList& p )
+void K3bAudioImager::setImageFilenames( const TQStringList& p )
{
m_thread->m_imageNames = p;
m_thread->m_fd = -1;
diff --git a/libk3b/projects/audiocd/k3baudioimager.h b/libk3b/projects/audiocd/k3baudioimager.h
index df4ae7a..bfa1d83 100644
--- a/libk3b/projects/audiocd/k3baudioimager.h
+++ b/libk3b/projects/audiocd/k3baudioimager.h
@@ -23,9 +23,10 @@ class K3bAudioDoc;
class K3bAudioImager : public K3bThreadJob
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bAudioImager( K3bAudioDoc*, K3bJobHandler*, QObject* parent = 0, const char* name = 0 );
+ K3bAudioImager( K3bAudioDoc*, K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 );
~K3bAudioImager();
/**
@@ -39,7 +40,7 @@ class K3bAudioImager : public K3bThreadJob
* Image path. Should be an empty directory or a non-existing
* directory in which case it will be created.
*/
- void setImageFilenames( const QStringList& p );
+ void setImageFilenames( const TQStringList& p );
enum ErrorType {
ERROR_FD_WRITE,
diff --git a/libk3b/projects/audiocd/k3baudiojob.cpp b/libk3b/projects/audiocd/k3baudiojob.cpp
index c2e62c2..ddf15a3 100644
--- a/libk3b/projects/audiocd/k3baudiojob.cpp
+++ b/libk3b/projects/audiocd/k3baudiojob.cpp
@@ -38,8 +38,8 @@
#include <k3btocfilewriter.h>
#include <k3binffilewriter.h>
-#include <qfile.h>
-#include <qvaluevector.h>
+#include <tqfile.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include <klocale.h>
@@ -48,11 +48,11 @@
-static QString createNonExistingFilesString( const QValueList<K3bAudioFile*>& items, unsigned int max )
+static TQString createNonExistingFilesString( const TQValueList<K3bAudioFile*>& items, unsigned int max )
{
- QString s;
+ TQString s;
unsigned int cnt = 0;
- for( QValueList<K3bAudioFile*>::const_iterator it = items.begin();
+ for( TQValueList<K3bAudioFile*>::const_iterator it = items.begin();
it != items.end(); ++it ) {
s += KStringHandler::csqueeze( (*it)->filename(), 60 );
@@ -92,8 +92,8 @@ class K3bAudioJob::Private
};
-K3bAudioJob::K3bAudioJob( K3bAudioDoc* doc, K3bJobHandler* hdl, QObject* parent )
- : K3bBurnJob( hdl, parent ),
+K3bAudioJob::K3bAudioJob( K3bAudioDoc* doc, K3bJobHandler* hdl, TQObject* tqparent )
+ : K3bBurnJob( hdl, tqparent ),
m_doc( doc ),
m_normalizeJob(0),
m_maxSpeedJob(0)
@@ -101,16 +101,16 @@ K3bAudioJob::K3bAudioJob( K3bAudioDoc* doc, K3bJobHandler* hdl, QObject* parent
d = new Private;
m_audioImager = new K3bAudioImager( m_doc, this, this );
- connect( m_audioImager, SIGNAL(infoMessage(const QString&, int)),
- this, SIGNAL(infoMessage(const QString&, int)) );
- connect( m_audioImager, SIGNAL(percent(int)),
- this, SLOT(slotAudioDecoderPercent(int)) );
- connect( m_audioImager, SIGNAL(subPercent(int)),
- this, SLOT(slotAudioDecoderSubPercent(int)) );
- connect( m_audioImager, SIGNAL(finished(bool)),
- this, SLOT(slotAudioDecoderFinished(bool)) );
- connect( m_audioImager, SIGNAL(nextTrack(int, int)),
- this, SLOT(slotAudioDecoderNextTrack(int, int)) );
+ connect( m_audioImager, TQT_SIGNAL(infoMessage(const TQString&, int)),
+ this, TQT_SIGNAL(infoMessage(const TQString&, int)) );
+ connect( m_audioImager, TQT_SIGNAL(percent(int)),
+ this, TQT_SLOT(slotAudioDecoderPercent(int)) );
+ connect( m_audioImager, TQT_SIGNAL(subPercent(int)),
+ this, TQT_SLOT(slotAudioDecoderSubPercent(int)) );
+ connect( m_audioImager, TQT_SIGNAL(finished(bool)),
+ this, TQT_SLOT(slotAudioDecoderFinished(bool)) );
+ connect( m_audioImager, TQT_SIGNAL(nextTrack(int, int)),
+ this, TQT_SLOT(slotAudioDecoderNextTrack(int, int)) );
m_writer = 0;
m_tempData = new K3bAudioJobTempData( m_doc, this );
@@ -159,13 +159,13 @@ void K3bAudioJob::start()
//
// Check if all files exist
//
- QValueList<K3bAudioFile*> nonExistingFiles;
+ TQValueList<K3bAudioFile*> nonExistingFiles;
K3bAudioTrack* track = m_doc->firstTrack();
while( track ) {
K3bAudioDataSource* source = track->firstSource();
while( source ) {
if( K3bAudioFile* file = dynamic_cast<K3bAudioFile*>( source ) ) {
- if( !QFile::exists( file->filename() ) )
+ if( !TQFile::exists( file->filename() ) )
nonExistingFiles.append( file );
}
source = source->next();
@@ -179,7 +179,7 @@ void K3bAudioJob::start()
i18n("Warning"),
i18n("Remove missing files and continue"),
i18n("Cancel and go back") ) ) {
- for( QValueList<K3bAudioFile*>::const_iterator it = nonExistingFiles.begin();
+ for( TQValueList<K3bAudioFile*>::const_iterator it = nonExistingFiles.begin();
it != nonExistingFiles.end(); ++it ) {
delete *it;
}
@@ -297,7 +297,7 @@ void K3bAudioJob::start()
d->useCdText ) {
if( !cdrecordCdText ) {
emit infoMessage( i18n("Cdrecord %1 does not support CD-Text writing.")
- .arg(k3bcore->externalBinManager()->binObject("cdrecord")->version), ERROR );
+ .tqarg(k3bcore->externalBinManager()->binObject("cdrecord")->version), ERROR );
d->useCdText = false;
}
else if( m_usedWritingMode == K3b::TAO ) {
@@ -314,10 +314,10 @@ void K3bAudioJob::start()
emit newSubTask( i18n("Determining maximum writing speed") );
if( !m_maxSpeedJob ) {
m_maxSpeedJob = new K3bAudioMaxSpeedJob( m_doc, this, this );
- connect( m_maxSpeedJob, SIGNAL(percent(int)),
- this, SIGNAL(subPercent(int)) );
- connect( m_maxSpeedJob, SIGNAL(finished(bool)),
- this, SLOT(slotMaxSpeedJobFinished(bool)) );
+ connect( m_maxSpeedJob, TQT_SIGNAL(percent(int)),
+ this, TQT_SIGNAL(subPercent(int)) );
+ connect( m_maxSpeedJob, TQT_SIGNAL(finished(bool)),
+ this, TQT_SLOT(slotMaxSpeedJobFinished(bool)) );
}
m_maxSpeedJob->start();
return;
@@ -346,10 +346,10 @@ void K3bAudioJob::start()
}
else {
emit burning(false);
- emit infoMessage( i18n("Creating image files in %1").arg(m_doc->tempDir()), INFO );
+ emit infoMessage( i18n("Creating image files in %1").tqarg(m_doc->tempDir()), INFO );
emit newTask( i18n("Creating image files") );
m_tempData->prepareTempFileNames( doc()->tempDir() );
- QStringList filenames;
+ TQStringList filenames;
for( int i = 1; i <= m_doc->numOfTracks(); ++i )
filenames += m_tempData->bufferFileName( i );
m_audioImager->setImageFilenames( filenames );
@@ -480,10 +480,10 @@ void K3bAudioJob::slotAudioDecoderNextTrack( int t, int tt )
if( m_doc->onlyCreateImages() || !m_doc->onTheFly() ) {
K3bAudioTrack* track = m_doc->getTrack(t);
emit newSubTask( i18n("Decoding audio track %1 of %2%3")
- .arg(t)
- .arg(tt)
- .arg( track->title().isEmpty() || track->artist().isEmpty()
- ? QString::null
+ .tqarg(t)
+ .tqarg(tt)
+ .tqarg( track->title().isEmpty() || track->artist().isEmpty()
+ ? TQString()
: " (" + track->artist() + " - " + track->title() + ")" ) );
}
}
@@ -533,10 +533,10 @@ bool K3bAudioJob::prepareWriter()
while( track ) {
if( m_doc->onTheFly() ) {
// this is only supported by cdrecord versions >= 2.01a13
- writer->addArgument( QFile::encodeName( m_tempData->infFileName( track ) ) );
+ writer->addArgument( TQFile::encodeName( m_tempData->infFileName( track ) ) );
}
else {
- writer->addArgument( QFile::encodeName( m_tempData->bufferFileName( track ) ) );
+ writer->addArgument( TQFile::encodeName( m_tempData->bufferFileName( track ) ) );
}
track = track->next();
}
@@ -562,20 +562,20 @@ bool K3bAudioJob::prepareWriter()
m_writer = writer;
}
- connect( m_writer, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) );
- connect( m_writer, SIGNAL(percent(int)), this, SLOT(slotWriterJobPercent(int)) );
- connect( m_writer, SIGNAL(processedSize(int, int)), this, SIGNAL(processedSize(int, int)) );
- connect( m_writer, SIGNAL(subPercent(int)), this, SIGNAL(subPercent(int)) );
- connect( m_writer, SIGNAL(processedSubSize(int, int)), this, SIGNAL(processedSubSize(int, int)) );
- connect( m_writer, SIGNAL(nextTrack(int, int)), this, SLOT(slotWriterNextTrack(int, int)) );
- connect( m_writer, SIGNAL(buffer(int)), this, SIGNAL(bufferStatus(int)) );
- connect( m_writer, SIGNAL(deviceBuffer(int)), this, SIGNAL(deviceBuffer(int)) );
- connect( m_writer, SIGNAL(writeSpeed(int, int)), this, SIGNAL(writeSpeed(int, int)) );
- connect( m_writer, SIGNAL(finished(bool)), this, SLOT(slotWriterFinished(bool)) );
- // connect( m_writer, SIGNAL(newTask(const QString&)), this, SIGNAL(newTask(const QString&)) );
- connect( m_writer, SIGNAL(newSubTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) );
- connect( m_writer, SIGNAL(debuggingOutput(const QString&, const QString&)),
- this, SIGNAL(debuggingOutput(const QString&, const QString&)) );
+ connect( m_writer, TQT_SIGNAL(infoMessage(const TQString&, int)), this, TQT_SIGNAL(infoMessage(const TQString&, int)) );
+ connect( m_writer, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotWriterJobPercent(int)) );
+ connect( m_writer, TQT_SIGNAL(processedSize(int, int)), this, TQT_SIGNAL(processedSize(int, int)) );
+ connect( m_writer, TQT_SIGNAL(subPercent(int)), this, TQT_SIGNAL(subPercent(int)) );
+ connect( m_writer, TQT_SIGNAL(processedSubSize(int, int)), this, TQT_SIGNAL(processedSubSize(int, int)) );
+ connect( m_writer, TQT_SIGNAL(nextTrack(int, int)), this, TQT_SLOT(slotWriterNextTrack(int, int)) );
+ connect( m_writer, TQT_SIGNAL(buffer(int)), this, TQT_SIGNAL(buffertqStatus(int)) );
+ connect( m_writer, TQT_SIGNAL(deviceBuffer(int)), this, TQT_SIGNAL(deviceBuffer(int)) );
+ connect( m_writer, TQT_SIGNAL(writeSpeed(int, int)), this, TQT_SIGNAL(writeSpeed(int, int)) );
+ connect( m_writer, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotWriterFinished(bool)) );
+ // connect( m_writer, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newTask(const TQString&)) );
+ connect( m_writer, TQT_SIGNAL(newSubTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) );
+ connect( m_writer, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)),
+ this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) );
return true;
}
@@ -588,10 +588,10 @@ void K3bAudioJob::slotWriterNextTrack( int t, int tt )
if( m_doc->hideFirstTrack() )
track = m_doc->getTrack(t+1);
emit newSubTask( i18n("Writing track %1 of %2%3")
- .arg(t)
- .arg(tt)
- .arg( track->title().isEmpty() || track->artist().isEmpty()
- ? QString::null
+ .tqarg(t)
+ .tqarg(tt)
+ .tqarg( track->title().isEmpty() || track->artist().isEmpty()
+ ? TQString()
: " (" + track->artist() + " - " + track->title() + ")" ) );
}
@@ -650,7 +650,7 @@ bool K3bAudioJob::startWriting()
if( m_doc->dummy() )
emit newTask( i18n("Simulating") );
else if( d->copies > 1 )
- emit newTask( i18n("Writing Copy %1").arg(d->copiesDone+1) );
+ emit newTask( i18n("Writing Copy %1").tqarg(d->copiesDone+1) );
else
emit newTask( i18n("Writing") );
@@ -706,19 +706,19 @@ void K3bAudioJob::normalizeFiles()
if( !m_normalizeJob ) {
m_normalizeJob = new K3bAudioNormalizeJob( this, this );
- connect( m_normalizeJob, SIGNAL(infoMessage(const QString&, int)),
- this, SIGNAL(infoMessage(const QString&, int)) );
- connect( m_normalizeJob, SIGNAL(percent(int)), this, SLOT(slotNormalizeProgress(int)) );
- connect( m_normalizeJob, SIGNAL(subPercent(int)), this, SLOT(slotNormalizeSubProgress(int)) );
- connect( m_normalizeJob, SIGNAL(finished(bool)), this, SLOT(slotNormalizeJobFinished(bool)) );
- connect( m_normalizeJob, SIGNAL(newTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) );
- connect( m_normalizeJob, SIGNAL(debuggingOutput(const QString&, const QString&)),
- this, SIGNAL(debuggingOutput(const QString&, const QString&)) );
+ connect( m_normalizeJob, TQT_SIGNAL(infoMessage(const TQString&, int)),
+ this, TQT_SIGNAL(infoMessage(const TQString&, int)) );
+ connect( m_normalizeJob, TQT_SIGNAL(percent(int)), this, TQT_SLOT(slotNormalizeProgress(int)) );
+ connect( m_normalizeJob, TQT_SIGNAL(subPercent(int)), this, TQT_SLOT(slotNormalizeSubProgress(int)) );
+ connect( m_normalizeJob, TQT_SIGNAL(finished(bool)), this, TQT_SLOT(slotNormalizeJobFinished(bool)) );
+ connect( m_normalizeJob, TQT_SIGNAL(newTask(const TQString&)), this, TQT_SIGNAL(newSubTask(const TQString&)) );
+ connect( m_normalizeJob, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)),
+ this, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)) );
}
// add all the files
// TODO: we may need to split the wave files and put them back together!
- QValueVector<QString> files;
+ TQValueVector<TQString> files;
K3bAudioTrack* track = m_doc->firstTrack();
while( track ) {
files.append( m_tempData->bufferFileName(track) );
@@ -779,7 +779,7 @@ bool K3bAudioJob::writeTocFile()
if( d->useCdText )
tocWriter.setCdText( m_doc->cdTextData() );
if( !m_doc->onTheFly() ) {
- QStringList filenames;
+ TQStringList filenames;
for( int i = 1; i <= m_doc->numOfTracks(); ++i )
filenames += m_tempData->bufferFileName( i );
tocWriter.setFilenames( filenames );
@@ -842,23 +842,23 @@ bool K3bAudioJob::checkAudioSources()
}
-QString K3bAudioJob::jobDescription() const
+TQString K3bAudioJob::jobDescription() const
{
return i18n("Writing Audio CD")
+ ( m_doc->title().isEmpty()
- ? QString::null
- : QString( " (%1)" ).arg(m_doc->title()) );
+ ? TQString()
+ : TQString( " (%1)" ).tqarg(m_doc->title()) );
}
-QString K3bAudioJob::jobDetails() const
+TQString K3bAudioJob::jobDetails() const
{
return ( i18n( "1 track (%1 minutes)",
"%n tracks (%1 minutes)",
- m_doc->numOfTracks() ).arg(m_doc->length().toString())
+ m_doc->numOfTracks() ).tqarg(m_doc->length().toString())
+ ( m_doc->copies() > 1 && !m_doc->dummy()
? i18n(" - %n copy", " - %n copies", m_doc->copies())
- : QString::null ) );
+ : TQString() ) );
}
#include "k3baudiojob.moc"
diff --git a/libk3b/projects/audiocd/k3baudiojob.h b/libk3b/projects/audiocd/k3baudiojob.h
index af37639..309d3f3 100644
--- a/libk3b/projects/audiocd/k3baudiojob.h
+++ b/libk3b/projects/audiocd/k3baudiojob.h
@@ -22,8 +22,8 @@
class K3bAudioDoc;
class K3bAudioImager;
-class QFile;
-class QDataStream;
+class TQFile;
+class TQDataStream;
class K3bAbstractWriter;
class KTempFile;
class K3bCdrecordWriter;
@@ -38,16 +38,17 @@ class K3bAudioMaxSpeedJob;
class K3bAudioJob : public K3bBurnJob
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bAudioJob( K3bAudioDoc*, K3bJobHandler*, QObject* parent = 0 );
+ K3bAudioJob( K3bAudioDoc*, K3bJobHandler*, TQObject* tqparent = 0 );
~K3bAudioJob();
K3bDoc* doc() const;
K3bDevice::Device* writer() const;
- QString jobDescription() const;
- QString jobDetails() const;
+ TQString jobDescription() const;
+ TQString jobDetails() const;
public slots:
void cancel();
diff --git a/libk3b/projects/audiocd/k3baudiojobtempdata.cpp b/libk3b/projects/audiocd/k3baudiojobtempdata.cpp
index af98c2e..538d454 100644
--- a/libk3b/projects/audiocd/k3baudiojobtempdata.cpp
+++ b/libk3b/projects/audiocd/k3baudiojobtempdata.cpp
@@ -21,9 +21,9 @@
#include <k3bmsf.h>
#include <k3bcore.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qvaluevector.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
@@ -35,16 +35,16 @@ public:
: doc(_doc) {
}
- QValueVector<QString> bufferFiles;
- QValueVector<QString> infFiles;
- QString tocFile;
+ TQValueVector<TQString> bufferFiles;
+ TQValueVector<TQString> infFiles;
+ TQString tocFile;
K3bAudioDoc* doc;
};
-K3bAudioJobTempData::K3bAudioJobTempData( K3bAudioDoc* doc, QObject* parent, const char* name )
- : QObject( parent, name )
+K3bAudioJobTempData::K3bAudioJobTempData( K3bAudioDoc* doc, TQObject* tqparent, const char* name )
+ : TQObject( tqparent, name )
{
d = new Private( doc );
}
@@ -56,20 +56,20 @@ K3bAudioJobTempData::~K3bAudioJobTempData()
}
-const QString& K3bAudioJobTempData::bufferFileName( int track )
+const TQString& K3bAudioJobTempData::bufferFileName( int track )
{
if( (int)d->bufferFiles.count() < track )
prepareTempFileNames();
return d->bufferFiles.at(track-1);
}
-const QString& K3bAudioJobTempData::bufferFileName( K3bAudioTrack* track )
+const TQString& K3bAudioJobTempData::bufferFileName( K3bAudioTrack* track )
{
return bufferFileName( track->trackNumber() );
}
-const QString& K3bAudioJobTempData::tocFileName()
+const TQString& K3bAudioJobTempData::tocFileName()
{
if( d->tocFile.isEmpty() )
prepareTempFileNames();
@@ -77,14 +77,14 @@ const QString& K3bAudioJobTempData::tocFileName()
}
-const QString& K3bAudioJobTempData::infFileName( int track )
+const TQString& K3bAudioJobTempData::infFileName( int track )
{
if( (int)d->infFiles.count() < track )
prepareTempFileNames();
return d->infFiles.at( track - 1 );
}
-const QString& K3bAudioJobTempData::infFileName( K3bAudioTrack* track )
+const TQString& K3bAudioJobTempData::infFileName( K3bAudioTrack* track )
{
return infFileName( track->trackNumber() );
}
@@ -96,16 +96,16 @@ K3bAudioDoc* K3bAudioJobTempData::doc() const
}
-void K3bAudioJobTempData::prepareTempFileNames( const QString& path )
+void K3bAudioJobTempData::prepareTempFileNames( const TQString& path )
{
d->bufferFiles.clear();
d->infFiles.clear();
- QString prefix = K3b::findUniqueFilePrefix( "k3b_audio_", path ) + "_";
+ TQString prefix = K3b::findUniqueFilePrefix( "k3b_audio_", path ) + "_";
for( int i = 0; i < d->doc->numOfTracks(); i++ ) {
- d->bufferFiles.append( prefix + QString::number( i+1 ).rightJustify( 2, '0' ) + ".wav" );
- d->infFiles.append( prefix + QString::number( i+1 ).rightJustify( 2, '0' ) + ".inf" );
+ d->bufferFiles.append( prefix + TQString::number( i+1 ).rightJustify( 2, '0' ) + ".wav" );
+ d->infFiles.append( prefix + TQString::number( i+1 ).rightJustify( 2, '0' ) + ".inf" );
}
d->tocFile = prefix + ".toc";
@@ -115,17 +115,17 @@ void K3bAudioJobTempData::prepareTempFileNames( const QString& path )
void K3bAudioJobTempData::cleanup()
{
for( uint i = 0; i < d->infFiles.count(); ++i ) {
- if( QFile::exists( d->infFiles[i] ) )
- QFile::remove( d->infFiles[i] );
+ if( TQFile::exists( d->infFiles[i] ) )
+ TQFile::remove( d->infFiles[i] );
}
for( uint i = 0; i < d->bufferFiles.count(); ++i ) {
- if( QFile::exists( d->bufferFiles[i] ) )
- QFile::remove( d->bufferFiles[i] );
+ if( TQFile::exists( d->bufferFiles[i] ) )
+ TQFile::remove( d->bufferFiles[i] );
}
- if( QFile::exists( d->tocFile ) )
- QFile::remove( d->tocFile );
+ if( TQFile::exists( d->tocFile ) )
+ TQFile::remove( d->tocFile );
}
diff --git a/libk3b/projects/audiocd/k3baudiojobtempdata.h b/libk3b/projects/audiocd/k3baudiojobtempdata.h
index 72b753f..62bc7e7 100644
--- a/libk3b/projects/audiocd/k3baudiojobtempdata.h
+++ b/libk3b/projects/audiocd/k3baudiojobtempdata.h
@@ -17,29 +17,30 @@
#ifndef _K3B_AUDIO_JOB_TEMPDATA_H_
#define _K3B_AUDIO_JOB_TEMPDATA_H_
-#include <qobject.h>
+#include <tqobject.h>
#include <k3bmsf.h>
class K3bAudioTrack;
class K3bAudioDoc;
-class QTextStream;
+class TQTextStream;
-class K3bAudioJobTempData : public QObject
+class K3bAudioJobTempData : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bAudioJobTempData( K3bAudioDoc* doc, QObject* parent = 0, const char* name = 0 );
+ K3bAudioJobTempData( K3bAudioDoc* doc, TQObject* tqparent = 0, const char* name = 0 );
~K3bAudioJobTempData();
- const QString& bufferFileName( int track );
- const QString& bufferFileName( K3bAudioTrack* track );
+ const TQString& bufferFileName( int track );
+ const TQString& bufferFileName( K3bAudioTrack* track );
- const QString& infFileName( int track );
- const QString& infFileName( K3bAudioTrack* track );
+ const TQString& infFileName( int track );
+ const TQString& infFileName( K3bAudioTrack* track );
- const QString& tocFileName();
+ const TQString& tocFileName();
K3bAudioDoc* doc() const;
@@ -48,7 +49,7 @@ class K3bAudioJobTempData : public QObject
* a specific directory
* it defaults to the default K3b temp dir
*/
- void prepareTempFileNames( const QString& path = QString::null );
+ void prepareTempFileNames( const TQString& path = TQString() );
/**
* remove all temp files (this does not include the audio buffer files
diff --git a/libk3b/projects/audiocd/k3baudiomaxspeedjob.cpp b/libk3b/projects/audiocd/k3baudiomaxspeedjob.cpp
index 975ab89..cde09c9 100644
--- a/libk3b/projects/audiocd/k3baudiomaxspeedjob.cpp
+++ b/libk3b/projects/audiocd/k3baudiomaxspeedjob.cpp
@@ -27,7 +27,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
class K3bAudioMaxSpeedJob::WorkThread : public K3bThread
@@ -106,7 +106,7 @@ void K3bAudioMaxSpeedJob::WorkThread::run()
}
else if( speed > 0 ) {
// update the max speed
- maxSpeed = QMIN( maxSpeed, speed );
+ maxSpeed = TQMIN( maxSpeed, speed );
}
it.next();
@@ -142,7 +142,7 @@ int K3bAudioMaxSpeedJob::WorkThread::speedTest( K3bAudioDataSource* source )
}
}
- QTime t;
+ TQTime t;
int dataRead = 0;
int r = 0;
@@ -183,11 +183,11 @@ int K3bAudioMaxSpeedJob::WorkThread::maxSpeedByMedia() const
{
int s = 0;
- QValueList<int> speeds = m_doc->burner()->determineSupportedWriteSpeeds();
+ TQValueList<int> speeds = m_doc->burner()->determineSupportedWriteSpeeds();
// simply use what we have and let the writer decide if the speeds are empty
if( !speeds.isEmpty() ) {
// start with the highest speed and go down the list until we are below our max
- QValueListIterator<int> it = speeds.end();
+ TQValueListIterator<int> it = speeds.end();
--it;
while( *it > maxSpeed && it != speeds.begin() )
--it;
@@ -203,8 +203,8 @@ int K3bAudioMaxSpeedJob::WorkThread::maxSpeedByMedia() const
-K3bAudioMaxSpeedJob::K3bAudioMaxSpeedJob( K3bAudioDoc* doc, K3bJobHandler* jh, QObject* parent, const char* name )
- : K3bThreadJob( jh, parent, name )
+K3bAudioMaxSpeedJob::K3bAudioMaxSpeedJob( K3bAudioDoc* doc, K3bJobHandler* jh, TQObject* tqparent, const char* name )
+ : K3bThreadJob( jh, tqparent, name )
{
m_thread = new WorkThread( doc );
setThread( m_thread );
diff --git a/libk3b/projects/audiocd/k3baudiomaxspeedjob.h b/libk3b/projects/audiocd/k3baudiomaxspeedjob.h
index 876bc7f..9526d4a 100644
--- a/libk3b/projects/audiocd/k3baudiomaxspeedjob.h
+++ b/libk3b/projects/audiocd/k3baudiomaxspeedjob.h
@@ -24,9 +24,10 @@ class K3bAudioDoc;
class K3bAudioMaxSpeedJob : public K3bThreadJob
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bAudioMaxSpeedJob( K3bAudioDoc* doc, K3bJobHandler*, QObject* parent = 0, const char* name = 0 );
+ K3bAudioMaxSpeedJob( K3bAudioDoc* doc, K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 );
~K3bAudioMaxSpeedJob();
/**
diff --git a/libk3b/projects/audiocd/k3baudionormalizejob.cpp b/libk3b/projects/audiocd/k3baudionormalizejob.cpp
index 782712b..a732bb5 100644
--- a/libk3b/projects/audiocd/k3baudionormalizejob.cpp
+++ b/libk3b/projects/audiocd/k3baudionormalizejob.cpp
@@ -23,8 +23,8 @@
#include <klocale.h>
-K3bAudioNormalizeJob::K3bAudioNormalizeJob( K3bJobHandler* hdl, QObject* parent, const char* name )
- : K3bJob( hdl, parent, name ),
+K3bAudioNormalizeJob::K3bAudioNormalizeJob( K3bJobHandler* hdl, TQObject* tqparent, const char* name )
+ : K3bJob( hdl, tqparent, name ),
m_process(0)
{
}
@@ -49,8 +49,8 @@ void K3bAudioNormalizeJob::start()
delete m_process;
m_process = new K3bProcess();
- connect( m_process, SIGNAL(stderrLine(const QString&)), this, SLOT(slotStdLine(const QString&)) );
- connect( m_process, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcessExited(KProcess*)) );
+ connect( m_process, TQT_SIGNAL(stderrLine(const TQString&)), this, TQT_SLOT(slotStdLine(const TQString&)) );
+ connect( m_process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessExited(KProcess*)) );
const K3bExternalBin* bin = k3bcore->externalBinManager()->binObject( "normalize-audio" );
@@ -61,14 +61,14 @@ void K3bAudioNormalizeJob::start()
}
if( !bin->copyright.isEmpty() )
- emit infoMessage( i18n("Using %1 %2 - Copyright (C) %3").arg(bin->name()).arg(bin->version).arg(bin->copyright), INFO );
+ emit infoMessage( i18n("Using %1 %2 - Copyright (C) %3").tqarg(bin->name()).tqarg(bin->version).tqarg(bin->copyright), INFO );
// create the commandline
*m_process << bin;
// additional user parameters from config
- const QStringList& params = bin->userParameters();
- for( QStringList::const_iterator it = params.begin(); it != params.end(); ++it )
+ const TQStringList& params = bin->userParameters();
+ for( TQStringList::const_iterator it = params.begin(); it != params.end(); ++it )
*m_process << *it;
// end the options
@@ -100,11 +100,11 @@ void K3bAudioNormalizeJob::cancel()
}
-void K3bAudioNormalizeJob::slotStdLine( const QString& line )
+void K3bAudioNormalizeJob::slotStdLine( const TQString& line )
{
// percent, subPercent, newTask (compute level and adjust)
- // emit newSubTask( i18n("Normalizing track %1 of %2 (%3)").arg(t).arg(tt).arg(m_files.at(t-1)) );
+ // emit newSubTask( i18n("Normalizing track %1 of %2 (%3)").tqarg(t).tqarg(tt).tqarg(m_files.at(t-1)) );
emit debuggingOutput( "normalize-audio", line );
@@ -121,15 +121,15 @@ void K3bAudioNormalizeJob::slotStdLine( const QString& line )
}
}
- else if( line.contains( "already normalized" ) ) {
+ else if( line.tqcontains( "already normalized" ) ) {
// no normalization necessary for the current track
- emit infoMessage( i18n("Track %1 is already normalized.").arg(m_currentTrack), INFO );
+ emit infoMessage( i18n("Track %1 is already normalized.").tqarg(m_currentTrack), INFO );
m_currentTrack++;
}
- else if( line.contains( "--% done") ) {
+ else if( line.tqcontains( "--% done") ) {
if( m_currentAction == ADJUSTING_LEVELS ) {
- emit newTask( i18n("Adjusting volume level for track %1 of %2").arg(m_currentTrack).arg(m_files.count()) );
+ emit newTask( i18n("Adjusting volume level for track %1 of %2").tqarg(m_currentTrack).tqarg(m_files.count()) );
kdDebug() << "(K3bAudioNormalizeJob) adjusting level for track "
<< m_currentTrack
<< " "
@@ -137,7 +137,7 @@ void K3bAudioNormalizeJob::slotStdLine( const QString& line )
<< endl;
}
else {
- emit newTask( i18n("Computing level for track %1 of %2").arg(m_currentTrack).arg(m_files.count()) );
+ emit newTask( i18n("Computing level for track %1 of %2").tqarg(m_currentTrack).tqarg(m_files.count()) );
kdDebug() << "(K3bAudioNormalizeJob) computing level for track "
<< m_currentTrack
<< " "
@@ -148,7 +148,7 @@ void K3bAudioNormalizeJob::slotStdLine( const QString& line )
m_currentTrack++;
}
- else if( int pos = line.find( "% done" ) > 0 ) {
+ else if( int pos = line.tqfind( "% done" ) > 0 ) {
// parse progress: "XXX% done" and "batch XXX% done"
pos -= 3;
bool ok;
@@ -185,7 +185,7 @@ void K3bAudioNormalizeJob::slotProcessExited( KProcess* p )
break;
default:
if( !m_canceled ) {
- emit infoMessage( i18n("%1 returned an unknown error (code %2).").arg("normalize-audio").arg(p->exitStatus()),
+ emit infoMessage( i18n("%1 returned an unknown error (code %2).").tqarg("normalize-audio").tqarg(p->exitStatus()),
K3bJob::ERROR );
emit infoMessage( i18n("Please send me an email with the last output."), K3bJob::ERROR );
emit infoMessage( i18n("Error while normalizing tracks."), ERROR );
@@ -197,7 +197,7 @@ void K3bAudioNormalizeJob::slotProcessExited( KProcess* p )
}
}
else {
- emit infoMessage( i18n("%1 did not exit cleanly.").arg("Normalize"), K3bJob::ERROR );
+ emit infoMessage( i18n("%1 did not exit cleanly.").tqarg("Normalize"), K3bJob::ERROR );
jobFinished( false );
}
}
diff --git a/libk3b/projects/audiocd/k3baudionormalizejob.h b/libk3b/projects/audiocd/k3baudionormalizejob.h
index e56086b..b623a41 100644
--- a/libk3b/projects/audiocd/k3baudionormalizejob.h
+++ b/libk3b/projects/audiocd/k3baudionormalizejob.h
@@ -20,7 +20,7 @@
#include <k3bjob.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class K3bProcess;
class KProcess;
@@ -29,25 +29,26 @@ class KProcess;
class K3bAudioNormalizeJob : public K3bJob
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bAudioNormalizeJob( K3bJobHandler*, QObject* parent = 0, const char* name = 0 );
+ K3bAudioNormalizeJob( K3bJobHandler*, TQObject* tqparent = 0, const char* name = 0 );
~K3bAudioNormalizeJob();
public slots:
void start();
void cancel();
- void setFilesToNormalize( const QValueVector<QString>& files ) { m_files = files; }
+ void setFilesToNormalize( const TQValueVector<TQString>& files ) { m_files = files; }
private slots:
- void slotStdLine( const QString& line );
+ void slotStdLine( const TQString& line );
void slotProcessExited( KProcess* p );
private:
K3bProcess* m_process;
- QValueVector<QString> m_files;
+ TQValueVector<TQString> m_files;
bool m_canceled;
enum Action {
diff --git a/libk3b/projects/audiocd/k3baudiotrack.cpp b/libk3b/projects/audiocd/k3baudiotrack.cpp
index a1d12e4..53d1d34 100644
--- a/libk3b/projects/audiocd/k3baudiotrack.cpp
+++ b/libk3b/projects/audiocd/k3baudiotrack.cpp
@@ -22,7 +22,7 @@
#include <k3bcore.h>
#include <k3bcdtextvalidator.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
@@ -59,8 +59,8 @@ K3bAudioTrack::K3bAudioTrack()
}
-K3bAudioTrack::K3bAudioTrack( K3bAudioDoc* parent )
- : m_parent(parent),
+K3bAudioTrack::K3bAudioTrack( K3bAudioDoc* tqparent )
+ : m_parent(tqparent),
m_copy(false),
m_preEmp(false),
m_index0Offset(150),
@@ -106,67 +106,67 @@ void K3bAudioTrack::emitChanged()
}
-void K3bAudioTrack::setArtist( const QString& a )
+void K3bAudioTrack::setArtist( const TQString& a )
{
setPerformer( a );
}
-void K3bAudioTrack::setPerformer( const QString& a )
+void K3bAudioTrack::setPerformer( const TQString& a )
{
- QString s( a );
+ TQString s( a );
d->cdTextValidator->fixup( s );
m_cdText.setPerformer(s);
emitChanged();
}
-void K3bAudioTrack::setTitle( const QString& t )
+void K3bAudioTrack::setTitle( const TQString& t )
{
- QString s( t );
+ TQString s( t );
d->cdTextValidator->fixup( s );
m_cdText.setTitle(s);
emitChanged();
}
-void K3bAudioTrack::setArranger( const QString& t )
+void K3bAudioTrack::setArranger( const TQString& t )
{
- QString s( t );
+ TQString s( t );
d->cdTextValidator->fixup( s );
m_cdText.setArranger(s);
emitChanged();
}
-void K3bAudioTrack::setSongwriter( const QString& t )
+void K3bAudioTrack::setSongwriter( const TQString& t )
{
- QString s( t );
+ TQString s( t );
d->cdTextValidator->fixup( s );
m_cdText.setSongwriter(s);
emitChanged();
}
-void K3bAudioTrack::setComposer( const QString& t )
+void K3bAudioTrack::setComposer( const TQString& t )
{
- QString s( t );
+ TQString s( t );
d->cdTextValidator->fixup( s );
m_cdText.setComposer(s);
emitChanged();
}
-void K3bAudioTrack::setIsrc( const QString& t )
+void K3bAudioTrack::setIsrc( const TQString& t )
{
m_cdText.setIsrc(t);
emitChanged();
}
-void K3bAudioTrack::setCdTextMessage( const QString& t )
+void K3bAudioTrack::setCdTextMessage( const TQString& t )
{
- QString s( t );
+ TQString s( t );
d->cdTextValidator->fixup( s );
m_cdText.setMessage(s);
emitChanged();
@@ -282,7 +282,7 @@ void K3bAudioTrack::moveAfter( K3bAudioTrack* track )
kdDebug() << "(K3bAudioTrack::moveAfter( " << track << " )" << endl;
if( !track ) {
if( !doc() ) {
- kdDebug() << "(K3bAudioTrack::moveAfter) no parent set" << endl;
+ kdDebug() << "(K3bAudioTrack::moveAfter) no tqparent set" << endl;
return;
}
@@ -302,7 +302,7 @@ void K3bAudioTrack::moveAfter( K3bAudioTrack* track )
// remove this from the list
take();
- // set the new parent doc
+ // set the new tqparent doc
m_parent = track->doc();
K3bAudioTrack* oldNext = track->m_next;
@@ -330,7 +330,7 @@ void K3bAudioTrack::moveAhead( K3bAudioTrack* track )
{
if( !track ) {
if( !doc() ) {
- kdDebug() << "(K3bAudioTrack::moveAfter) no parent set" << endl;
+ kdDebug() << "(K3bAudioTrack::moveAfter) no tqparent set" << endl;
return;
}
@@ -350,7 +350,7 @@ void K3bAudioTrack::moveAhead( K3bAudioTrack* track )
// remove this from the list
take();
- // set the new parent doc
+ // set the new tqparent doc
m_parent = track->doc();
K3bAudioTrack* oldPrev = track->m_prev;
@@ -568,7 +568,7 @@ K3bAudioTrack* K3bAudioTrack::split( const K3b::Msf& pos )
splitTrack->addSource( addSource );
}
- kdDebug() << "(K3bAudioTrack) moving track " << splitTrack << " after this (" << this << ") with parent " << doc() << endl;
+ kdDebug() << "(K3bAudioTrack) moving track " << splitTrack << " after this (" << this << ") with tqparent " << doc() << endl;
splitTrack->moveAfter( this );
return splitTrack;
@@ -604,7 +604,7 @@ K3bDevice::Track K3bAudioTrack::toCdTrack() const
if( doc()->lastTrack() != this )
cdTrack.setIndex0( index0() );
- // FIXME: convert to QCString
+ // FIXME: convert to TQCString
// cdTrack.setIsrc( isrc() );
return cdTrack;
diff --git a/libk3b/projects/audiocd/k3baudiotrack.h b/libk3b/projects/audiocd/k3baudiotrack.h
index ab0ee1b..0edef0a 100644
--- a/libk3b/projects/audiocd/k3baudiotrack.h
+++ b/libk3b/projects/audiocd/k3baudiotrack.h
@@ -17,10 +17,10 @@
#ifndef K3BAUDIOTRACK_H
#define K3BAUDIOTRACK_H
-#include <qstring.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
#include <kio/global.h>
@@ -45,7 +45,7 @@ class LIBK3B_EXPORT K3bAudioTrack
public:
K3bAudioTrack();
- K3bAudioTrack( K3bAudioDoc* parent );
+ K3bAudioTrack( K3bAudioDoc* tqparent );
~K3bAudioTrack();
K3bAudioDoc* doc() const { return m_parent; }
@@ -58,14 +58,14 @@ class LIBK3B_EXPORT K3bAudioTrack
K3b::Msf length() const;
KIO::filesize_t size() const;
- const QString& artist() const { return m_cdText.performer(); }
- const QString& performer() const { return m_cdText.performer(); }
- const QString& title() const { return m_cdText.title(); }
- const QString& arranger() const { return m_cdText.arranger(); }
- const QString& songwriter() const { return m_cdText.songwriter(); }
- const QString& composer() const { return m_cdText.composer(); }
- const QString& isrc() const { return m_cdText.isrc(); }
- const QString& cdTextMessage() const { return m_cdText.message(); }
+ const TQString& artist() const { return m_cdText.performer(); }
+ const TQString& performer() const { return m_cdText.performer(); }
+ const TQString& title() const { return m_cdText.title(); }
+ const TQString& arranger() const { return m_cdText.arranger(); }
+ const TQString& songwriter() const { return m_cdText.songwriter(); }
+ const TQString& composer() const { return m_cdText.composer(); }
+ const TQString& isrc() const { return m_cdText.isrc(); }
+ const TQString& cdTextMessage() const { return m_cdText.message(); }
const K3bDevice::TrackCdText& cdText() const { return m_cdText; }
bool copyProtection() const { return m_copy; }
@@ -74,14 +74,14 @@ class LIBK3B_EXPORT K3bAudioTrack
/**
* @obsolete use setPerformer
**/
- void setArtist( const QString& a );
- void setPerformer( const QString& a );
- void setTitle( const QString& t );
- void setArranger( const QString& t );
- void setSongwriter( const QString& t );
- void setComposer( const QString& t );
- void setIsrc( const QString& t );
- void setCdTextMessage( const QString& t );
+ void setArtist( const TQString& a );
+ void setPerformer( const TQString& a );
+ void setTitle( const TQString& t );
+ void setArranger( const TQString& t );
+ void setSongwriter( const TQString& t );
+ void setComposer( const TQString& t );
+ void setIsrc( const TQString& t );
+ void setCdTextMessage( const TQString& t );
void setCdText( const K3bDevice::TrackCdText& cdtext );
diff --git a/libk3b/projects/audiocd/k3baudiozerodata.cpp b/libk3b/projects/audiocd/k3baudiozerodata.cpp
index f5c985d..aff0cf9 100644
--- a/libk3b/projects/audiocd/k3baudiozerodata.cpp
+++ b/libk3b/projects/audiocd/k3baudiozerodata.cpp
@@ -55,15 +55,15 @@ void K3bAudioZeroData::setLength( const K3b::Msf& msf )
}
-QString K3bAudioZeroData::type() const
+TQString K3bAudioZeroData::type() const
{
return i18n("Silence");
}
-QString K3bAudioZeroData::sourceComment() const
+TQString K3bAudioZeroData::sourceComment() const
{
- return QString::null;
+ return TQString();
}
diff --git a/libk3b/projects/audiocd/k3baudiozerodata.h b/libk3b/projects/audiocd/k3baudiozerodata.h
index 8cb2911..6475cd1 100644
--- a/libk3b/projects/audiocd/k3baudiozerodata.h
+++ b/libk3b/projects/audiocd/k3baudiozerodata.h
@@ -29,8 +29,8 @@ class LIBK3B_EXPORT K3bAudioZeroData : public K3bAudioDataSource
K3b::Msf originalLength() const { return m_length; }
void setLength( const K3b::Msf& msf );
- QString type() const;
- QString sourceComment() const;
+ TQString type() const;
+ TQString sourceComment() const;
bool seek( const K3b::Msf& );
int read( char* data, unsigned int max );