summaryrefslogtreecommitdiffstats
path: root/plugins/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/decoder')
-rw-r--r--plugins/decoder/ffmpeg/k3bffmpegdecoder.cpp14
-rw-r--r--plugins/decoder/ffmpeg/k3bffmpegdecoder.h12
-rw-r--r--plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp32
-rw-r--r--plugins/decoder/ffmpeg/k3bffmpegwrapper.h16
-rw-r--r--plugins/decoder/flac/k3bflacdecoder.cpp68
-rw-r--r--plugins/decoder/flac/k3bflacdecoder.h14
-rw-r--r--plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp28
-rw-r--r--plugins/decoder/libsndfile/k3blibsndfiledecoder.h10
-rw-r--r--plugins/decoder/mp3/k3bmad.cpp14
-rw-r--r--plugins/decoder/mp3/k3bmad.h12
-rw-r--r--plugins/decoder/mp3/k3bmaddecoder.cpp50
-rw-r--r--plugins/decoder/mp3/k3bmaddecoder.h16
-rw-r--r--plugins/decoder/musepack/k3bmpcdecoder.cpp14
-rw-r--r--plugins/decoder/musepack/k3bmpcdecoder.h10
-rw-r--r--plugins/decoder/musepack/k3bmpcwrapper.cpp14
-rw-r--r--plugins/decoder/musepack/k3bmpcwrapper.h10
-rw-r--r--plugins/decoder/ogg/k3boggvorbisdecoder.cpp38
-rw-r--r--plugins/decoder/ogg/k3boggvorbisdecoder.h10
-rw-r--r--plugins/decoder/skeleton.cpp14
-rw-r--r--plugins/decoder/skeleton.h10
-rw-r--r--plugins/decoder/wave/k3bwavedecoder.cpp52
-rw-r--r--plugins/decoder/wave/k3bwavedecoder.h18
22 files changed, 246 insertions, 230 deletions
diff --git a/plugins/decoder/ffmpeg/k3bffmpegdecoder.cpp b/plugins/decoder/ffmpeg/k3bffmpegdecoder.cpp
index fd47c52..d4ab6a9 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegdecoder.cpp
+++ b/plugins/decoder/ffmpeg/k3bffmpegdecoder.cpp
@@ -31,8 +31,8 @@ extern "C" {
K_EXPORT_COMPONENT_FACTORY( libk3bffmpegdecoder, K3bPluginFactory<K3bFFMpegDecoderFactory>( "k3bffmpegdecoder" ) )
-K3bFFMpegDecoderFactory::K3bFFMpegDecoderFactory( QObject* parent, const char* name )
- : K3bAudioDecoderFactory( parent, name )
+K3bFFMpegDecoderFactory::K3bFFMpegDecoderFactory( TQObject* tqparent, const char* name )
+ : K3bAudioDecoderFactory( tqparent, name )
{
}
@@ -42,10 +42,10 @@ K3bFFMpegDecoderFactory::~K3bFFMpegDecoderFactory()
}
-K3bAudioDecoder* K3bFFMpegDecoderFactory::createDecoder( QObject* parent,
+K3bAudioDecoder* K3bFFMpegDecoderFactory::createDecoder( TQObject* tqparent,
const char* name ) const
{
- return new K3bFFMpegDecoder( parent, name );
+ return new K3bFFMpegDecoder( tqparent, name );
}
@@ -66,8 +66,8 @@ bool K3bFFMpegDecoderFactory::canDecode( const KURL& url )
-K3bFFMpegDecoder::K3bFFMpegDecoder( QObject* parent, const char* name )
- : K3bAudioDecoder( parent, name ),
+K3bFFMpegDecoder::K3bFFMpegDecoder( TQObject* tqparent, const char* name )
+ : K3bAudioDecoder( tqparent, name ),
m_file(0)
{
}
@@ -78,7 +78,7 @@ K3bFFMpegDecoder::~K3bFFMpegDecoder()
}
-QString K3bFFMpegDecoder::fileType() const
+TQString K3bFFMpegDecoder::fileType() const
{
return m_type;
}
diff --git a/plugins/decoder/ffmpeg/k3bffmpegdecoder.h b/plugins/decoder/ffmpeg/k3bffmpegdecoder.h
index 1c21827..59d7ef0 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegdecoder.h
+++ b/plugins/decoder/ffmpeg/k3bffmpegdecoder.h
@@ -24,9 +24,10 @@ class K3bFFMpegFile;
class K3bFFMpegDecoderFactory : public K3bAudioDecoderFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bFFMpegDecoderFactory( QObject* parent = 0, const char* name = 0 );
+ K3bFFMpegDecoderFactory( TQObject* tqparent = 0, const char* name = 0 );
~K3bFFMpegDecoderFactory();
bool canDecode( const KURL& filename );
@@ -35,7 +36,7 @@ class K3bFFMpegDecoderFactory : public K3bAudioDecoderFactory
bool multiFormatDecoder() const { return true; }
- K3bAudioDecoder* createDecoder( QObject* parent = 0,
+ K3bAudioDecoder* createDecoder( TQObject* tqparent = 0,
const char* name = 0 ) const;
};
@@ -43,12 +44,13 @@ class K3bFFMpegDecoderFactory : public K3bAudioDecoderFactory
class K3bFFMpegDecoder : public K3bAudioDecoder
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bFFMpegDecoder( QObject* parent = 0, const char* name = 0 );
+ K3bFFMpegDecoder( TQObject* tqparent = 0, const char* name = 0 );
~K3bFFMpegDecoder();
- QString fileType() const;
+ TQString fileType() const;
void cleanup();
@@ -61,7 +63,7 @@ class K3bFFMpegDecoder : public K3bAudioDecoder
private:
K3bFFMpegFile* m_file;
- QString m_type;
+ TQString m_type;
};
#endif
diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
index 514fd67..898c47d 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
@@ -48,12 +48,12 @@ public:
char* outputBufferPos;
int outputBufferSize;
AVPacket packet;
- Q_UINT8* packetData;
+ TQ_UINT8* packetData;
int packetSize;
};
-K3bFFMpegFile::K3bFFMpegFile( const QString& filename )
+K3bFFMpegFile::K3bFFMpegFile( const TQString& filename )
: m_filename(filename)
{
d = new Private;
@@ -187,7 +187,7 @@ int K3bFFMpegFile::type() const
}
-QString K3bFFMpegFile::typeComment() const
+TQString K3bFFMpegFile::typeComment() const
{
switch( type() ) {
case CODEC_ID_WMAV1:
@@ -199,45 +199,45 @@ QString K3bFFMpegFile::typeComment() const
case CODEC_ID_AAC:
return i18n("Advanced Audio Coding (AAC)");
default:
- return QString::fromLocal8Bit( d->codec->name );
+ return TQString::fromLocal8Bit( d->codec->name );
}
}
-QString K3bFFMpegFile::title() const
+TQString K3bFFMpegFile::title() const
{
// FIXME: is this UTF8 or something??
if( d->formatContext->title[0] != '\0' )
- return QString::fromLocal8Bit( d->formatContext->title );
+ return TQString::fromLocal8Bit( d->formatContext->title );
else
- return QString::null;
+ return TQString();
}
-QString K3bFFMpegFile::author() const
+TQString K3bFFMpegFile::author() const
{
// FIXME: is this UTF8 or something??
if( d->formatContext->author[0] != '\0' )
- return QString::fromLocal8Bit( d->formatContext->author );
+ return TQString::fromLocal8Bit( d->formatContext->author );
else
- return QString::null;
+ return TQString();
}
-QString K3bFFMpegFile::comment() const
+TQString K3bFFMpegFile::comment() const
{
// FIXME: is this UTF8 or something??
if( d->formatContext->comment[0] != '\0' )
- return QString::fromLocal8Bit( d->formatContext->comment );
+ return TQString::fromLocal8Bit( d->formatContext->comment );
else
- return QString::null;
+ return TQString();
}
int K3bFFMpegFile::read( char* buf, int bufLen )
{
if( fillOutputBuffer() > 0 ) {
- int len = QMIN(bufLen, d->outputBufferSize);
+ int len = TQMIN(bufLen, d->outputBufferSize);
::memcpy( buf, d->outputBufferPos, len );
// TODO: only swap if needed
@@ -316,7 +316,7 @@ bool K3bFFMpegFile::seek( const K3b::Msf& msf )
d->packetSize = 0;
double seconds = (double)msf.totalFrames()/75.0;
- Q_UINT64 timestamp = (Q_UINT64)(seconds * (double)AV_TIME_BASE);
+ TQ_UINT64 timestamp = (TQ_UINT64)(seconds * (double)AV_TIME_BASE);
// FIXME: do we really need the start_time and why?
#if LIBAVFORMAT_BUILD >= 4619
@@ -353,7 +353,7 @@ K3bFFMpegWrapper* K3bFFMpegWrapper::instance()
}
-K3bFFMpegFile* K3bFFMpegWrapper::open( const QString& filename ) const
+K3bFFMpegFile* K3bFFMpegWrapper::open( const TQString& filename ) const
{
K3bFFMpegFile* file = new K3bFFMpegFile( filename );
if( file->open() ) {
diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.h b/plugins/decoder/ffmpeg/k3bffmpegwrapper.h
index 63b5f58..60d6dd3 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.h
+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.h
@@ -30,7 +30,7 @@ class K3bFFMpegFile
public:
~K3bFFMpegFile();
- const QString& filename() const { return m_filename; }
+ const TQString& filename() const { return m_filename; }
bool open();
void close();
@@ -43,21 +43,21 @@ class K3bFFMpegFile
* ffmpeg internal enumeration
*/
int type() const;
- QString typeComment() const;
+ TQString typeComment() const;
- QString title() const;
- QString author() const;
- QString comment() const;
+ TQString title() const;
+ TQString author() const;
+ TQString comment() const;
int read( char* buf, int bufLen );
bool seek( const K3b::Msf& );
private:
- K3bFFMpegFile( const QString& filename );
+ K3bFFMpegFile( const TQString& filename );
int readPacket();
int fillOutputBuffer();
- QString m_filename;
+ TQString m_filename;
class Private;
Private* d;
@@ -72,7 +72,7 @@ class K3bFFMpegWrapper
/**
* returns 0 on failure.
*/
- K3bFFMpegFile* open( const QString& filename ) const;
+ K3bFFMpegFile* open( const TQString& filename ) const;
static K3bFFMpegWrapper* instance();
diff --git a/plugins/decoder/flac/k3bflacdecoder.cpp b/plugins/decoder/flac/k3bflacdecoder.cpp
index 762403f..4e537b0 100644
--- a/plugins/decoder/flac/k3bflacdecoder.cpp
+++ b/plugins/decoder/flac/k3bflacdecoder.cpp
@@ -17,9 +17,9 @@
#include <k3bpluginfactory.h>
-#include <qbuffer.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kdebug.h>
@@ -52,7 +52,7 @@ class K3bFLACDecoder::Private
#endif
{
public:
- void open(QFile* f) {
+ void open(TQFile* f) {
file = f;
file->open(IO_ReadOnly);
@@ -72,14 +72,14 @@ public:
comments = 0;
}
- Private(QFile* f)
+ Private(TQFile* f)
#ifdef LEGACY_FLAC
: FLAC::Decoder::SeekableStream(),
#else
: FLAC::Decoder::Stream(),
#endif
comments(0) {
- internalBuffer = new QBuffer();
+ internalBuffer = new TQBuffer();
internalBuffer->open(IO_ReadWrite);
open(f);
@@ -93,8 +93,8 @@ public:
bool seekToFrame(int frame);
- QFile* file;
- QBuffer* internalBuffer;
+ TQFile* file;
+ TQBuffer* internalBuffer;
FLAC::Metadata::VorbisComment* comments;
unsigned rate;
unsigned channels;
@@ -240,8 +240,8 @@ FLAC__StreamDecoderWriteStatus K3bFLACDecoder::Private::write_callback(const FLA
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
}
-K3bFLACDecoder::K3bFLACDecoder( QObject* parent, const char* name )
- : K3bAudioDecoder( parent, name )
+K3bFLACDecoder::K3bFLACDecoder( TQObject* tqparent, const char* name )
+ : K3bAudioDecoder( tqparent, name )
{
d = 0;
}
@@ -256,10 +256,10 @@ void K3bFLACDecoder::cleanup()
{
if (d) {
d->cleanup();
- d->open(new QFile(filename()));
+ d->open(new TQFile(filename()));
}
else
- d = new Private(new QFile(filename()));
+ d = new Private(new TQFile(filename()));
}
bool K3bFLACDecoder::analyseFileInternal( K3b::Msf& frames, int& samplerate, int& ch )
@@ -274,9 +274,9 @@ bool K3bFLACDecoder::analyseFileInternal( K3b::Msf& frames, int& samplerate, int
if( d->comments != 0 ) {
kdDebug() << "(K3bFLACDecoder) unpacking Vorbis tags" << endl;
for( unsigned int i = 0; i < d->comments->get_num_comments(); ++i ) {
- QString key = QString::fromUtf8( d->comments->get_comment(i).get_field_name(),
+ TQString key = TQString::fromUtf8( d->comments->get_comment(i).get_field_name(),
d->comments->get_comment(i).get_field_name_length() );
- QString value = QString::fromUtf8( d->comments->get_comment(i).get_field_value(),
+ TQString value = TQString::fromUtf8( d->comments->get_comment(i).get_field_value(),
d->comments->get_comment(i).get_field_value_length() );
if( key.upper() == "TITLE" )
@@ -291,7 +291,7 @@ bool K3bFLACDecoder::analyseFileInternal( K3b::Msf& frames, int& samplerate, int
if ((d->comments == 0) || (d->comments->get_num_comments() == 0)) {
// no Vorbis comments, check for ID3 tags
kdDebug() << "(K3bFLACDecoder) using taglib to read tag" << endl;
- TagLib::FLAC::File f( QFile::encodeName(filename()) );
+ TagLib::FLAC::File f( TQFile::encodeName(filename()) );
if( f.isOpen() ) {
addMetaInfo( META_TITLE, TStringToQString( f.tag()->title() ) );
addMetaInfo( META_ARTIST, TStringToQString( f.tag()->artist() ) );
@@ -348,7 +348,7 @@ int K3bFLACDecoder::decodeInternal( char* _data, int maxLen )
#endif
bytesAvailable = d->internalBuffer->size() - d->internalBuffer->at();
- bytesToCopy = QMIN(maxLen, bytesAvailable);
+ bytesToCopy = TQMIN(maxLen, bytesAvailable);
bytesCopied = (int)d->internalBuffer->readBlock(_data, bytesToCopy);
if(bytesCopied == bytesAvailable) {
@@ -367,45 +367,45 @@ bool K3bFLACDecoder::seekInternal( const K3b::Msf& pos )
}
-QString K3bFLACDecoder::fileType() const
+TQString K3bFLACDecoder::fileType() const
{
return i18n("FLAC");
}
-QStringList K3bFLACDecoder::supportedTechnicalInfos() const
+TQStringList K3bFLACDecoder::supportedTechnicalInfos() const
{
- return QStringList::split( ";",
+ return TQStringList::split( ";",
i18n("Channels") + ";" +
i18n("Sampling Rate") + ";" +
i18n("Sample Size") );
}
-QString K3bFLACDecoder::technicalInfo( const QString& info ) const
+TQString K3bFLACDecoder::technicalInfo( const TQString& info ) const
{
if( d->comments != 0 ) {
if( info == i18n("Vendor") )
#ifdef FLAC_NEWER_THAN_1_1_1
- return QString::fromUtf8((char*)d->comments->get_vendor_string());
+ return TQString::fromUtf8((char*)d->comments->get_vendor_string());
#else
- return QString::fromUtf8(d->comments->get_vendor_string().get_field());
+ return TQString::fromUtf8(d->comments->get_vendor_string().get_field());
#endif
else if( info == i18n("Channels") )
- return QString::number(d->channels);
+ return TQString::number(d->channels);
else if( info == i18n("Sampling Rate") )
- return i18n("%1 Hz").arg(d->rate);
+ return i18n("%1 Hz").tqarg(d->rate);
else if( info == i18n("Sample Size") )
- return i18n("%1 bits").arg(d->bitsPerSample);
+ return i18n("%1 bits").tqarg(d->bitsPerSample);
}
- return QString::null;
+ return TQString();
}
-K3bFLACDecoderFactory::K3bFLACDecoderFactory( QObject* parent, const char* name )
- : K3bAudioDecoderFactory( parent, name )
+K3bFLACDecoderFactory::K3bFLACDecoderFactory( TQObject* tqparent, const char* name )
+ : K3bAudioDecoderFactory( tqparent, name )
{
}
@@ -415,10 +415,10 @@ K3bFLACDecoderFactory::~K3bFLACDecoderFactory()
}
-K3bAudioDecoder* K3bFLACDecoderFactory::createDecoder( QObject* parent,
+K3bAudioDecoder* K3bFLACDecoderFactory::createDecoder( TQObject* tqparent,
const char* name ) const
{
- return new K3bFLACDecoder( parent, name );
+ return new K3bFLACDecoder( tqparent, name );
}
@@ -429,7 +429,7 @@ bool K3bFLACDecoderFactory::canDecode( const KURL& url )
// Note: since file is created on the stack it will be closed automatically
// by its destructor when this method (i.e. canDecode) returns.
- QFile file(url.path());
+ TQFile file(url.path());
if(!file.open(IO_ReadOnly)) {
kdDebug() << "(K3bFLACDecoder) Could not open file " << url.path() << endl;
@@ -482,11 +482,11 @@ bool K3bFLACDecoderFactory::canDecode( const KURL& url )
} else {
kdDebug() << "(K3bFLACDecoder) " << url.path() << ": wrong format:" << endl
<< " channels: "
- << QString::number(info.get_channels()) << endl
+ << TQString::number(info.get_channels()) << endl
<< " samplerate: "
- << QString::number(info.get_sample_rate()) << endl
+ << TQString::number(info.get_sample_rate()) << endl
<< " bits/sample: "
- << QString::number(info.get_bits_per_sample()) << endl;
+ << TQString::number(info.get_bits_per_sample()) << endl;
return false;
}
}
diff --git a/plugins/decoder/flac/k3bflacdecoder.h b/plugins/decoder/flac/k3bflacdecoder.h
index aace651..2e3bccf 100644
--- a/plugins/decoder/flac/k3bflacdecoder.h
+++ b/plugins/decoder/flac/k3bflacdecoder.h
@@ -24,16 +24,17 @@ class KURL;
class K3bFLACDecoderFactory : public K3bAudioDecoderFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bFLACDecoderFactory( QObject* parent = 0, const char* name = 0 );
+ K3bFLACDecoderFactory( TQObject* tqparent = 0, const char* name = 0 );
~K3bFLACDecoderFactory();
bool canDecode( const KURL& filename );
int pluginSystemVersion() const { return 3; }
- K3bAudioDecoder* createDecoder( QObject* parent = 0,
+ K3bAudioDecoder* createDecoder( TQObject* tqparent = 0,
const char* name = 0 ) const;
};
@@ -41,18 +42,19 @@ class K3bFLACDecoderFactory : public K3bAudioDecoderFactory
class K3bFLACDecoder : public K3bAudioDecoder
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bFLACDecoder( QObject* parent = 0, const char* name = 0 );
+ K3bFLACDecoder( TQObject* tqparent = 0, const char* name = 0 );
~K3bFLACDecoder();
void cleanup();
bool seekInternal( const K3b::Msf& );
- QString fileType() const;
- QStringList supportedTechnicalInfos() const;
- QString technicalInfo( const QString& ) const;
+ TQString fileType() const;
+ TQStringList supportedTechnicalInfos() const;
+ TQString technicalInfo( const TQString& ) const;
protected:
bool analyseFileInternal( K3b::Msf& frames, int& samplerate, int& ch );
diff --git a/plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp b/plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp
index ea3d014..0f23d4e 100644
--- a/plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp
+++ b/plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp
@@ -20,8 +20,8 @@
#include <k3bpluginfactory.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kdebug.h>
@@ -57,8 +57,8 @@ public:
-K3bLibsndfileDecoder::K3bLibsndfileDecoder( QObject* parent, const char* name )
- : K3bAudioDecoder( parent, name )
+K3bLibsndfileDecoder::K3bLibsndfileDecoder( TQObject* tqparent, const char* name )
+ : K3bAudioDecoder( tqparent, name )
{
d = new Private();
}
@@ -70,10 +70,10 @@ K3bLibsndfileDecoder::~K3bLibsndfileDecoder()
}
-QString K3bLibsndfileDecoder::fileType() const
+TQString K3bLibsndfileDecoder::fileType() const
{
if( d->format_info.name )
- return QString::fromLocal8Bit(d->format_info.name);
+ return TQString::fromLocal8Bit(d->format_info.name);
else
return "-";
}
@@ -87,7 +87,7 @@ bool K3bLibsndfileDecoder::openFile()
cleanup();
d->sndinfo.format = 0;
- d->sndfile = sf_open (QFile::encodeName(filename()), SFM_READ, &d->sndinfo);
+ d->sndfile = sf_open (TQFile::encodeName(filename()), SFM_READ, &d->sndinfo);
if ( !d->sndfile ) {
kdDebug() << "(K3bLibsndfileDecoder::openLibsndfileFile) : " << sf_strerror(d->sndfile) << endl;
return false;
@@ -124,8 +124,8 @@ bool K3bLibsndfileDecoder::analyseFileInternal( K3b::Msf& frames, int& samplerat
addMetaInfo( META_ARTIST, sf_get_string(d->sndfile, SF_STR_ARTIST) );
addMetaInfo( META_COMMENT, sf_get_string(d->sndfile, SF_STR_COMMENT) );
- addTechnicalInfo( i18n("Channels"), QString::number(d->sndinfo.channels) );
- addTechnicalInfo( i18n("Sampling Rate"), i18n("%1 Hz").arg(d->sndinfo.samplerate) );
+ addTechnicalInfo( i18n("Channels"), TQString::number(d->sndinfo.channels) );
+ addTechnicalInfo( i18n("Sampling Rate"), i18n("%1 Hz").tqarg(d->sndinfo.samplerate) );
frames = (unsigned long)ceil(d->sndinfo.frames / d->sndinfo.samplerate * 75.0);
samplerate = d->sndinfo.samplerate;
@@ -202,8 +202,8 @@ void K3bLibsndfileDecoder::cleanup()
/********************************************************/
-K3bLibsndfileDecoderFactory::K3bLibsndfileDecoderFactory( QObject* parent, const char* name )
- : K3bAudioDecoderFactory( parent, name )
+K3bLibsndfileDecoderFactory::K3bLibsndfileDecoderFactory( TQObject* tqparent, const char* name )
+ : K3bAudioDecoderFactory( tqparent, name )
{
}
@@ -213,10 +213,10 @@ K3bLibsndfileDecoderFactory::~K3bLibsndfileDecoderFactory()
}
-K3bAudioDecoder* K3bLibsndfileDecoderFactory::createDecoder( QObject* parent,
+K3bAudioDecoder* K3bLibsndfileDecoderFactory::createDecoder( TQObject* tqparent,
const char* name ) const
{
- return new K3bLibsndfileDecoder( parent, name );
+ return new K3bLibsndfileDecoder( tqparent, name );
}
@@ -224,7 +224,7 @@ bool K3bLibsndfileDecoderFactory::canDecode( const KURL& url )
{
SF_INFO infos;
infos.format = 0;
- SNDFILE* sndfile = sf_open (QFile::encodeName(url.path()), SFM_READ, &infos);
+ SNDFILE* sndfile = sf_open (TQFile::encodeName(url.path()), SFM_READ, &infos);
//is it supported by libsndfile?
if ( !sndfile ) {
diff --git a/plugins/decoder/libsndfile/k3blibsndfiledecoder.h b/plugins/decoder/libsndfile/k3blibsndfiledecoder.h
index 7ffbe2d..005cb0b 100644
--- a/plugins/decoder/libsndfile/k3blibsndfiledecoder.h
+++ b/plugins/decoder/libsndfile/k3blibsndfiledecoder.h
@@ -25,9 +25,10 @@ class KURL;
class K3bLibsndfileDecoderFactory : public K3bAudioDecoderFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bLibsndfileDecoderFactory( QObject* parent = 0, const char* name = 0 );
+ K3bLibsndfileDecoderFactory( TQObject* tqparent = 0, const char* name = 0 );
~K3bLibsndfileDecoderFactory();
bool canDecode( const KURL& filename );
@@ -36,7 +37,7 @@ class K3bLibsndfileDecoderFactory : public K3bAudioDecoderFactory
bool multiFormatDecoder() const { return true; }
- K3bAudioDecoder* createDecoder( QObject* parent = 0,
+ K3bAudioDecoder* createDecoder( TQObject* tqparent = 0,
const char* name = 0 ) const;
};
@@ -44,12 +45,13 @@ class K3bLibsndfileDecoderFactory : public K3bAudioDecoderFactory
class K3bLibsndfileDecoder : public K3bAudioDecoder
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bLibsndfileDecoder( QObject* parent = 0, const char* name = 0 );
+ K3bLibsndfileDecoder( TQObject* tqparent = 0, const char* name = 0 );
~K3bLibsndfileDecoder();
void cleanup();
- QString fileType() const;
+ TQString fileType() const;
protected:
bool analyseFileInternal( K3b::Msf& frames, int& samplerate, int& ch );
diff --git a/plugins/decoder/mp3/k3bmad.cpp b/plugins/decoder/mp3/k3bmad.cpp
index cb4cf6c..74aeee3 100644
--- a/plugins/decoder/mp3/k3bmad.cpp
+++ b/plugins/decoder/mp3/k3bmad.cpp
@@ -15,7 +15,7 @@
#include "k3bmad.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
@@ -52,7 +52,7 @@ K3bMad::~K3bMad()
}
-bool K3bMad::open( const QString& filename )
+bool K3bMad::open( const TQString& filename )
{
cleanup();
@@ -105,7 +105,7 @@ bool K3bMad::fillStreamBuffer()
}
// Fill-in the buffer.
- Q_LONG result = m_inputFile.readBlock( (char*)readStart, readSize );
+ TQ_LONG result = m_inputFile.readBlock( (char*)readStart, readSize );
if( result < 0 ) {
kdDebug() << "(K3bMad) read error on bitstream)" << endl;
m_bInputError = true;
@@ -192,7 +192,7 @@ bool K3bMad::seekFirstHeader()
// take way to long for non-mp3 files.
//
bool headerFound = findNextHeader();
- QIODevice::Offset inputPos = streamPos();
+ TQIODevice::Offset inputPos = streamPos();
while( !headerFound &&
!m_inputFile.atEnd() &&
streamPos() <= inputPos+1024 ) {
@@ -222,19 +222,19 @@ bool K3bMad::eof() const
}
-QIODevice::Offset K3bMad::inputPos() const
+TQIODevice::Offset K3bMad::inputPos() const
{
return m_inputFile.at();
}
-QIODevice::Offset K3bMad::streamPos() const
+TQIODevice::Offset K3bMad::streamPos() const
{
return inputPos() - (madStream->bufend - madStream->this_frame + 1);
}
-bool K3bMad::inputSeek( QIODevice::Offset pos )
+bool K3bMad::inputSeek( TQIODevice::Offset pos )
{
return m_inputFile.at( pos );
}
diff --git a/plugins/decoder/mp3/k3bmad.h b/plugins/decoder/mp3/k3bmad.h
index a4d9aae..d526c1d 100644
--- a/plugins/decoder/mp3/k3bmad.h
+++ b/plugins/decoder/mp3/k3bmad.h
@@ -20,7 +20,7 @@ extern "C" {
#include <mad.h>
}
-#include <qfile.h>
+#include <tqfile.h>
class K3bMad
@@ -29,7 +29,7 @@ public:
K3bMad();
~K3bMad();
- bool open( const QString& filename );
+ bool open( const TQString& filename );
/**
* @return true if the mad stream contains data
@@ -59,13 +59,13 @@ public:
* care about the status of the mad stream. Use streamPos()
* in that case.
*/
- QIODevice::Offset inputPos() const;
+ TQIODevice::Offset inputPos() const;
/**
* Current absolut position of the decoder stream.
*/
- QIODevice::Offset streamPos() const;
- bool inputSeek( QIODevice::Offset pos );
+ TQIODevice::Offset streamPos() const;
+ bool inputSeek( TQIODevice::Offset pos );
void initMad();
void cleanup();
@@ -80,7 +80,7 @@ public:
mad_timer_t* madTimer;
private:
- QFile m_inputFile;
+ TQFile m_inputFile;
bool m_madStructuresInitialized;
unsigned char* m_inputBuffer;
bool m_bInputError;
diff --git a/plugins/decoder/mp3/k3bmaddecoder.cpp b/plugins/decoder/mp3/k3bmaddecoder.cpp
index e3aef56..6f606c8 100644
--- a/plugins/decoder/mp3/k3bmaddecoder.cpp
+++ b/plugins/decoder/mp3/k3bmaddecoder.cpp
@@ -35,9 +35,9 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqvaluevector.h>
#include <stdlib.h>
#include <cmath>
@@ -70,7 +70,7 @@ public:
K3bMad* handle;
- QValueVector<unsigned long long> seekPositions;
+ TQValueVector<unsigned long long> seekPositions;
bool bOutputFinished;
@@ -86,8 +86,8 @@ public:
-K3bMadDecoder::K3bMadDecoder( QObject* parent, const char* name )
- : K3bAudioDecoder( parent, name )
+K3bMadDecoder::K3bMadDecoder( TQObject* tqparent, const char* name )
+ : K3bAudioDecoder( tqparent, name )
{
d = new MadDecoderPrivate();
d->handle = new K3bMad();
@@ -102,10 +102,10 @@ K3bMadDecoder::~K3bMadDecoder()
}
-QString K3bMadDecoder::metaInfo( MetaDataField f )
+TQString K3bMadDecoder::metaInfo( MetaDataField f )
{
#ifdef HAVE_TAGLIB
- TagLib::MPEG::File file( QFile::encodeName( filename() ).data() );
+ TagLib::MPEG::File file( TQFile::encodeName( filename() ).data() );
if ( file.tag() ) {
switch( f ) {
@@ -116,11 +116,11 @@ QString K3bMadDecoder::metaInfo( MetaDataField f )
case META_COMMENT:
return TStringToQString( file.tag()->comment() );
default:
- return QString::null;
+ return TQString();
}
}
else {
- return QString::null;
+ return TQString();
}
#else
@@ -370,7 +370,7 @@ bool K3bMadDecoder::seekInternal( const K3b::Msf& pos )
}
-QString K3bMadDecoder::fileType() const
+TQString K3bMadDecoder::fileType() const
{
switch( d->firstHeader.layer ) {
case MAD_LAYER_I:
@@ -384,9 +384,9 @@ QString K3bMadDecoder::fileType() const
}
}
-QStringList K3bMadDecoder::supportedTechnicalInfos() const
+TQStringList K3bMadDecoder::supportedTechnicalInfos() const
{
- return QStringList::split( ";",
+ return TQStringList::split( ";",
i18n("Channels") + ";" +
i18n("Sampling Rate") + ";" +
i18n("Bitrate") + ";" +
@@ -398,7 +398,7 @@ QStringList K3bMadDecoder::supportedTechnicalInfos() const
}
-QString K3bMadDecoder::technicalInfo( const QString& name ) const
+TQString K3bMadDecoder::technicalInfo( const TQString& name ) const
{
if( name == i18n("Channels") ) {
switch( d->firstHeader.mode ) {
@@ -415,12 +415,12 @@ QString K3bMadDecoder::technicalInfo( const QString& name ) const
}
}
else if( name == i18n("Sampling Rate") )
- return i18n("%1 Hz").arg(d->firstHeader.samplerate);
+ return i18n("%1 Hz").tqarg(d->firstHeader.samplerate);
else if( name == i18n("Bitrate") ) {
if( d->vbr )
return i18n("VBR");
else
- return i18n("%1 bps").arg(d->firstHeader.bitrate);
+ return i18n("%1 bps").tqarg(d->firstHeader.bitrate);
}
else if( name == i18n("Layer") ){
switch( d->firstHeader.layer ) {
@@ -453,12 +453,12 @@ QString K3bMadDecoder::technicalInfo( const QString& name ) const
else if( name == i18n("CRC") )
return ( d->firstHeader.flags & MAD_FLAG_PROTECTION ? i18n("Yes") : i18n("No") );
else
- return QString::null;
+ return TQString();
}
-K3bMadDecoderFactory::K3bMadDecoderFactory( QObject* parent, const char* name )
- : K3bAudioDecoderFactory( parent, name )
+K3bMadDecoderFactory::K3bMadDecoderFactory( TQObject* tqparent, const char* name )
+ : K3bAudioDecoderFactory( tqparent, name )
{
}
@@ -468,10 +468,10 @@ K3bMadDecoderFactory::~K3bMadDecoderFactory()
}
-K3bAudioDecoder* K3bMadDecoderFactory::createDecoder( QObject* parent,
+K3bAudioDecoder* K3bMadDecoderFactory::createDecoder( TQObject* tqparent,
const char* name ) const
{
- return new K3bMadDecoder( parent, name );
+ return new K3bMadDecoder( tqparent, name );
}
@@ -484,14 +484,14 @@ bool K3bMadDecoderFactory::canDecode( const KURL& url )
// It always takes waves for mp3 files so we introduce this hack to
// filter out wave files. :(
//
- QFile f( url.path() );
+ TQFile f( url.path() );
if( !f.open( IO_ReadOnly ) )
return false;
char buffer[12];
if( f.readBlock( buffer, 12 ) != 12 )
return false;
- if( !qstrncmp( buffer, "RIFF", 4 ) &&
- !qstrncmp( buffer + 8, "WAVE", 4 ) )
+ if( !tqstrncmp( buffer, "RIFF", 4 ) &&
+ !tqstrncmp( buffer + 8, "WAVE", 4 ) )
return false;
f.close();
@@ -510,7 +510,7 @@ bool K3bMadDecoderFactory::canDecode( const KURL& url )
unsigned int s = handle.madFrame->header.samplerate;
//
- // find 4 more mp3 headers (random value since 2 was not enough)
+ // tqfind 4 more mp3 headers (random value since 2 was not enough)
// This way we get most of the mp3 files while sorting out
// for example wave files.
//
diff --git a/plugins/decoder/mp3/k3bmaddecoder.h b/plugins/decoder/mp3/k3bmaddecoder.h
index 91e0f6c..8eef755 100644
--- a/plugins/decoder/mp3/k3bmaddecoder.h
+++ b/plugins/decoder/mp3/k3bmaddecoder.h
@@ -27,16 +27,17 @@ extern "C" {
class K3bMadDecoderFactory : public K3bAudioDecoderFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bMadDecoderFactory( QObject* parent = 0, const char* name = 0 );
+ K3bMadDecoderFactory( TQObject* tqparent = 0, const char* name = 0 );
~K3bMadDecoderFactory();
bool canDecode( const KURL& filename );
int pluginSystemVersion() const { return 3; }
- K3bAudioDecoder* createDecoder( QObject* parent = 0,
+ K3bAudioDecoder* createDecoder( TQObject* tqparent = 0,
const char* name = 0 ) const;
};
@@ -44,20 +45,21 @@ class K3bMadDecoderFactory : public K3bAudioDecoderFactory
class K3bMadDecoder : public K3bAudioDecoder
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bMadDecoder( QObject* parent = 0, const char* name = 0 );
+ K3bMadDecoder( TQObject* tqparent = 0, const char* name = 0 );
~K3bMadDecoder();
- QString metaInfo( MetaDataField );
+ TQString metaInfo( MetaDataField );
void cleanup();
bool seekInternal( const K3b::Msf& );
- QString fileType() const;
- QStringList supportedTechnicalInfos() const;
- QString technicalInfo( const QString& ) const;
+ TQString fileType() const;
+ TQStringList supportedTechnicalInfos() const;
+ TQString technicalInfo( const TQString& ) const;
protected:
bool analyseFileInternal( K3b::Msf& frames, int& samplerate, int& ch );
diff --git a/plugins/decoder/musepack/k3bmpcdecoder.cpp b/plugins/decoder/musepack/k3bmpcdecoder.cpp
index 0cdf644..6975bee 100644
--- a/plugins/decoder/musepack/k3bmpcdecoder.cpp
+++ b/plugins/decoder/musepack/k3bmpcdecoder.cpp
@@ -26,8 +26,8 @@
K_EXPORT_COMPONENT_FACTORY( libk3bmpcdecoder, K3bPluginFactory<K3bMpcDecoderFactory>( "libk3bmpcdecoder" ) )
-K3bMpcDecoderFactory::K3bMpcDecoderFactory( QObject* parent, const char* name )
- : K3bAudioDecoderFactory( parent, name )
+K3bMpcDecoderFactory::K3bMpcDecoderFactory( TQObject* tqparent, const char* name )
+ : K3bAudioDecoderFactory( tqparent, name )
{
}
@@ -37,10 +37,10 @@ K3bMpcDecoderFactory::~K3bMpcDecoderFactory()
}
-K3bAudioDecoder* K3bMpcDecoderFactory::createDecoder( QObject* parent,
+K3bAudioDecoder* K3bMpcDecoderFactory::createDecoder( TQObject* tqparent,
const char* name ) const
{
- return new K3bMpcDecoder( parent, name );
+ return new K3bMpcDecoder( tqparent, name );
}
@@ -55,8 +55,8 @@ bool K3bMpcDecoderFactory::canDecode( const KURL& url )
-K3bMpcDecoder::K3bMpcDecoder( QObject* parent, const char* name )
- : K3bAudioDecoder( parent, name )
+K3bMpcDecoder::K3bMpcDecoder( TQObject* tqparent, const char* name )
+ : K3bAudioDecoder( tqparent, name )
{
m_mpc = new K3bMpcWrapper();
}
@@ -68,7 +68,7 @@ K3bMpcDecoder::~K3bMpcDecoder()
}
-QString K3bMpcDecoder::fileType() const
+TQString K3bMpcDecoder::fileType() const
{
return i18n("Musepack");
}
diff --git a/plugins/decoder/musepack/k3bmpcdecoder.h b/plugins/decoder/musepack/k3bmpcdecoder.h
index 74dc509..d0f6935 100644
--- a/plugins/decoder/musepack/k3bmpcdecoder.h
+++ b/plugins/decoder/musepack/k3bmpcdecoder.h
@@ -24,16 +24,17 @@ class K3bMpcWrapper;
class K3bMpcDecoderFactory : public K3bAudioDecoderFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bMpcDecoderFactory( QObject* parent = 0, const char* name = 0 );
+ K3bMpcDecoderFactory( TQObject* tqparent = 0, const char* name = 0 );
~K3bMpcDecoderFactory();
bool canDecode( const KURL& filename );
int pluginSystemVersion() const { return 3; }
- K3bAudioDecoder* createDecoder( QObject* parent = 0,
+ K3bAudioDecoder* createDecoder( TQObject* tqparent = 0,
const char* name = 0 ) const;
};
@@ -41,12 +42,13 @@ class K3bMpcDecoderFactory : public K3bAudioDecoderFactory
class K3bMpcDecoder : public K3bAudioDecoder
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bMpcDecoder( QObject* parent = 0, const char* name = 0 );
+ K3bMpcDecoder( TQObject* tqparent = 0, const char* name = 0 );
~K3bMpcDecoder();
- QString fileType() const;
+ TQString fileType() const;
protected:
bool analyseFileInternal( K3b::Msf& frames, int& samplerate, int& ch );
diff --git a/plugins/decoder/musepack/k3bmpcwrapper.cpp b/plugins/decoder/musepack/k3bmpcwrapper.cpp
index 9f54b28..75153b5 100644
--- a/plugins/decoder/musepack/k3bmpcwrapper.cpp
+++ b/plugins/decoder/musepack/k3bmpcwrapper.cpp
@@ -16,31 +16,31 @@
#include "k3bmpcwrapper.h"
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
mpc_int32_t read_impl( void* data, void* ptr, mpc_int32_t size )
{
- QFile* input = static_cast<QFile*>( data );
+ TQFile* input = static_cast<TQFile*>( data );
return input->readBlock( (char*)ptr, size );
}
mpc_bool_t seek_impl( void* data, mpc_int32_t offset )
{
- QFile* input = static_cast<QFile*>( data );
+ TQFile* input = static_cast<TQFile*>( data );
return input->at( offset );
}
mpc_int32_t tell_impl( void* data )
{
- QFile* input = static_cast<QFile*>( data );
+ TQFile* input = static_cast<TQFile*>( data );
return input->at();
}
mpc_int32_t get_size_impl( void* data )
{
- QFile* input = static_cast<QFile*>( data );
+ TQFile* input = static_cast<TQFile*>( data );
return input->size();
}
@@ -64,7 +64,7 @@ static int shift_signed( MPC_SAMPLE_FORMAT val, int shift )
K3bMpcWrapper::K3bMpcWrapper()
{
- m_input = new QFile();
+ m_input = new TQFile();
m_reader = new mpc_reader;
m_reader->read = read_impl;
@@ -91,7 +91,7 @@ K3bMpcWrapper::~K3bMpcWrapper()
}
-bool K3bMpcWrapper::open( const QString& filename )
+bool K3bMpcWrapper::open( const TQString& filename )
{
close();
diff --git a/plugins/decoder/musepack/k3bmpcwrapper.h b/plugins/decoder/musepack/k3bmpcwrapper.h
index 743e25f..e0f42de 100644
--- a/plugins/decoder/musepack/k3bmpcwrapper.h
+++ b/plugins/decoder/musepack/k3bmpcwrapper.h
@@ -20,13 +20,13 @@
#include <config.h>
#endif
-#include <qstring.h>
+#include <tqstring.h>
#include <k3bmsf.h>
#include MPC_HEADER_FILE
-class QFile;
+class TQFile;
class K3bMpcWrapper
@@ -35,7 +35,7 @@ class K3bMpcWrapper
K3bMpcWrapper();
~K3bMpcWrapper();
- bool open( const QString& filename );
+ bool open( const TQString& filename );
void close();
int decode( char*, int max );
@@ -46,10 +46,10 @@ class K3bMpcWrapper
int samplerate() const;
unsigned int channels() const;
- QFile* input() const { return m_input; }
+ TQFile* input() const { return m_input; }
private:
- QFile* m_input;
+ TQFile* m_input;
mpc_reader* m_reader;
mpc_decoder* m_decoder;
mpc_streaminfo* m_info;
diff --git a/plugins/decoder/ogg/k3boggvorbisdecoder.cpp b/plugins/decoder/ogg/k3boggvorbisdecoder.cpp
index 15ca665..29b3805 100644
--- a/plugins/decoder/ogg/k3boggvorbisdecoder.cpp
+++ b/plugins/decoder/ogg/k3boggvorbisdecoder.cpp
@@ -19,8 +19,8 @@
#include <k3bpluginfactory.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kdebug.h>
@@ -51,8 +51,8 @@ public:
};
-K3bOggVorbisDecoder::K3bOggVorbisDecoder( QObject* parent, const char* name )
- : K3bAudioDecoder( parent, name )
+K3bOggVorbisDecoder::K3bOggVorbisDecoder( TQObject* tqparent, const char* name )
+ : K3bAudioDecoder( tqparent, name )
{
d = new Private();
}
@@ -67,7 +67,7 @@ K3bOggVorbisDecoder::~K3bOggVorbisDecoder()
bool K3bOggVorbisDecoder::openOggVorbisFile()
{
if( !d->isOpen ) {
- FILE* file = fopen( QFile::encodeName(filename()), "r" );
+ FILE* file = fopen( TQFile::encodeName(filename()), "r" );
if( !file ) {
kdDebug() << "(K3bOggVorbisDecoder) Could not open file " << filename() << endl;
return false;
@@ -104,8 +104,8 @@ bool K3bOggVorbisDecoder::analyseFileInternal( K3b::Msf& frames, int& samplerate
// add meta tags
for( int i = 0; i < d->vComment->comments; ++i ) {
- QString comment = QString::fromUtf8( d->vComment->user_comments[i] );
- QStringList values = QStringList::split( "=", comment );
+ TQString comment = TQString::fromUtf8( d->vComment->user_comments[i] );
+ TQStringList values = TQStringList::split( "=", comment );
if( values.count() > 1 ) {
if( values[0].lower() == "title" )
addMetaInfo( META_TITLE, values[1] );
@@ -118,15 +118,15 @@ bool K3bOggVorbisDecoder::analyseFileInternal( K3b::Msf& frames, int& samplerate
// add technical infos
- addTechnicalInfo( i18n("Version"), QString::number(d->vInfo->version) );
- addTechnicalInfo( i18n("Channels"), QString::number(d->vInfo->channels) );
- addTechnicalInfo( i18n("Sampling Rate"), i18n("%1 Hz").arg(d->vInfo->rate) );
+ addTechnicalInfo( i18n("Version"), TQString::number(d->vInfo->version) );
+ addTechnicalInfo( i18n("Channels"), TQString::number(d->vInfo->channels) );
+ addTechnicalInfo( i18n("Sampling Rate"), i18n("%1 Hz").tqarg(d->vInfo->rate) );
if( d->vInfo->bitrate_upper > 0 )
- addTechnicalInfo( i18n("Bitrate Upper"), i18n( "%1 bps" ).arg(d->vInfo->bitrate_upper) );
+ addTechnicalInfo( i18n("Bitrate Upper"), i18n( "%1 bps" ).tqarg(d->vInfo->bitrate_upper) );
if( d->vInfo->bitrate_nominal > 0 )
- addTechnicalInfo( i18n("Bitrate Nominal"), i18n( "%1 bps" ).arg(d->vInfo->bitrate_nominal) );
+ addTechnicalInfo( i18n("Bitrate Nominal"), i18n( "%1 bps" ).tqarg(d->vInfo->bitrate_nominal) );
if( d->vInfo->bitrate_lower > 0 )
- addTechnicalInfo( i18n("Bitrate Lower"), i18n( "%1 bps" ).arg(d->vInfo->bitrate_lower) );
+ addTechnicalInfo( i18n("Bitrate Lower"), i18n( "%1 bps" ).tqarg(d->vInfo->bitrate_lower) );
frames = K3b::Msf::fromSeconds(seconds);
samplerate = d->vInfo->rate;
@@ -203,14 +203,14 @@ bool K3bOggVorbisDecoder::seekInternal( const K3b::Msf& pos )
}
-QString K3bOggVorbisDecoder::fileType() const
+TQString K3bOggVorbisDecoder::fileType() const
{
return i18n("Ogg-Vorbis");
}
-K3bOggVorbisDecoderFactory::K3bOggVorbisDecoderFactory( QObject* parent, const char* name )
- : K3bAudioDecoderFactory( parent, name )
+K3bOggVorbisDecoderFactory::K3bOggVorbisDecoderFactory( TQObject* tqparent, const char* name )
+ : K3bAudioDecoderFactory( tqparent, name )
{
}
@@ -220,16 +220,16 @@ K3bOggVorbisDecoderFactory::~K3bOggVorbisDecoderFactory()
}
-K3bAudioDecoder* K3bOggVorbisDecoderFactory::createDecoder( QObject* parent,
+K3bAudioDecoder* K3bOggVorbisDecoderFactory::createDecoder( TQObject* tqparent,
const char* name ) const
{
- return new K3bOggVorbisDecoder( parent, name );
+ return new K3bOggVorbisDecoder( tqparent, name );
}
bool K3bOggVorbisDecoderFactory::canDecode( const KURL& url )
{
- FILE* file = fopen( QFile::encodeName(url.path()), "r" );
+ FILE* file = fopen( TQFile::encodeName(url.path()), "r" );
if( !file ) {
kdDebug() << "(K3bOggVorbisDecoder) Could not open file " << url.path() << endl;
return false;
diff --git a/plugins/decoder/ogg/k3boggvorbisdecoder.h b/plugins/decoder/ogg/k3boggvorbisdecoder.h
index 20ae094..47c1709 100644
--- a/plugins/decoder/ogg/k3boggvorbisdecoder.h
+++ b/plugins/decoder/ogg/k3boggvorbisdecoder.h
@@ -26,16 +26,17 @@ class KURL;
class K3bOggVorbisDecoderFactory : public K3bAudioDecoderFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bOggVorbisDecoderFactory( QObject* parent = 0, const char* name = 0 );
+ K3bOggVorbisDecoderFactory( TQObject* tqparent = 0, const char* name = 0 );
~K3bOggVorbisDecoderFactory();
bool canDecode( const KURL& filename );
int pluginSystemVersion() const { return 3; }
- K3bAudioDecoder* createDecoder( QObject* parent = 0,
+ K3bAudioDecoder* createDecoder( TQObject* tqparent = 0,
const char* name = 0 ) const;
};
@@ -46,14 +47,15 @@ class K3bOggVorbisDecoderFactory : public K3bAudioDecoderFactory
class K3bOggVorbisDecoder : public K3bAudioDecoder
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bOggVorbisDecoder( QObject* parent = 0, const char* name = 0 );
+ K3bOggVorbisDecoder( TQObject* tqparent = 0, const char* name = 0 );
~K3bOggVorbisDecoder();
void cleanup();
- QString fileType() const;
+ TQString fileType() const;
protected:
bool analyseFileInternal( K3b::Msf& frames, int& samplerate, int& ch );
diff --git a/plugins/decoder/skeleton.cpp b/plugins/decoder/skeleton.cpp
index 940814b..7b627b1 100644
--- a/plugins/decoder/skeleton.cpp
+++ b/plugins/decoder/skeleton.cpp
@@ -23,8 +23,8 @@
K_EXPORT_COMPONENT_FACTORY( libk3b<name>decoder, K3bPluginFactory<K3b<name>DecoderFactory>( "libk3b<name>decoder" ) )
-K3b<name>DecoderFactory::K3b<name>DecoderFactory( QObject* parent, const char* name )
- : K3bAudioDecoderFactory( parent, name )
+K3b<name>DecoderFactory::K3b<name>DecoderFactory( TQObject* tqparent, const char* name )
+ : K3bAudioDecoderFactory( tqparent, name )
{
}
@@ -34,10 +34,10 @@ K3b<name>DecoderFactory::~K3b<name>DecoderFactory()
}
-K3bAudioDecoder* K3b<name>DecoderFactory::createDecoder( QObject* parent,
+K3bAudioDecoder* K3b<name>DecoderFactory::createDecoder( TQObject* tqparent,
const char* name ) const
{
- return new K3b<name>Decoder( parent, name );
+ return new K3b<name>Decoder( tqparent, name );
}
@@ -52,8 +52,8 @@ bool K3b<name>DecoderFactory::canDecode( const KURL& url )
-K3b<name>Decoder::K3b<name>Decoder( QObject* parent, const char* name )
- : K3bAudioDecoder( parent, name )
+K3b<name>Decoder::K3b<name>Decoder( TQObject* tqparent, const char* name )
+ : K3bAudioDecoder( tqparent, name )
{
}
@@ -63,7 +63,7 @@ K3b<name>Decoder::~K3b<name>Decoder()
}
-QString K3b<name>Decoder::fileType() const
+TQString K3b<name>Decoder::fileType() const
{
// PUT YOUR CODE HERE
}
diff --git a/plugins/decoder/skeleton.h b/plugins/decoder/skeleton.h
index 00f5d15..7b22113 100644
--- a/plugins/decoder/skeleton.h
+++ b/plugins/decoder/skeleton.h
@@ -22,16 +22,17 @@
class K3b<name>DecoderFactory : public K3bAudioDecoderFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3b<name>DecoderFactory( QObject* parent = 0, const char* name = 0 );
+ K3b<name>DecoderFactory( TQObject* tqparent = 0, const char* name = 0 );
~K3b<name>DecoderFactory();
bool canDecode( const KURL& filename );
int pluginSystemVersion() const { return 3; }
- K3bAudioDecoder* createDecoder( QObject* parent = 0,
+ K3bAudioDecoder* createDecoder( TQObject* tqparent = 0,
const char* name = 0 ) const;
};
@@ -39,12 +40,13 @@ class K3b<name>DecoderFactory : public K3bAudioDecoderFactory
class K3b<name>Decoder : public K3bAudioDecoder
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3b<name>Decoder( QObject* parent = 0, const char* name = 0 );
+ K3b<name>Decoder( TQObject* tqparent = 0, const char* name = 0 );
~K3b<name>Decoder();
- QString fileType() const;
+ TQString fileType() const;
protected:
bool analyseFileInternal( K3b::Msf& frames, int& samplerate, int& ch );
diff --git a/plugins/decoder/wave/k3bwavedecoder.cpp b/plugins/decoder/wave/k3bwavedecoder.cpp
index 6494e5c..21f385e 100644
--- a/plugins/decoder/wave/k3bwavedecoder.cpp
+++ b/plugins/decoder/wave/k3bwavedecoder.cpp
@@ -19,8 +19,8 @@
#include <k3bpluginfactory.h>
-#include <qfile.h>
-#include <qcstring.h>
+#include <tqfile.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -50,7 +50,7 @@ static unsigned long le_a_to_u_long( unsigned char* a ) {
* Otherwise 0 is returned.
* leave file seek pointer past WAV header.
*/
-static unsigned long identifyWaveFile( QFile* f, int* samplerate = 0, int* channels = 0, int* samplesize = 0 )
+static unsigned long identifyWaveFile( TQFile* f, int* samplerate = 0, int* channels = 0, int* samplesize = 0 )
{
typedef struct {
unsigned char ckid[4];
@@ -85,7 +85,7 @@ static unsigned long identifyWaveFile( QFile* f, int* samplerate = 0, int* chann
kdDebug() << "(K3bWaveDecoder) unable to read from " << f->name() << endl;
return 0;
}
- if( qstrncmp( (char*)chunk.ckid, WAV_RIFF_MAGIC, 4 ) ) {
+ if( tqstrncmp( (char*)chunk.ckid, WAV_RIFF_MAGIC, 4 ) ) {
kdDebug() << "(K3bWaveDecoder) " << f->name() << ": not a RIFF file." << endl;
return 0;
}
@@ -95,7 +95,7 @@ static unsigned long identifyWaveFile( QFile* f, int* samplerate = 0, int* chann
kdDebug() << "(K3bWaveDecoder) unable to read from " << f->name() << endl;
return 0;
}
- if( qstrncmp( (char*)riff.wave, WAV_WAVE_MAGIC, 4 ) ) {
+ if( tqstrncmp( (char*)riff.wave, WAV_WAVE_MAGIC, 4 ) ) {
kdDebug() << "(K3bWaveDecoder) " << f->name() << ": not a WAVE file." << endl;
return 0;
}
@@ -106,7 +106,7 @@ static unsigned long identifyWaveFile( QFile* f, int* samplerate = 0, int* chann
kdDebug() << "(K3bWaveDecoder) unable to read from " << f->name() << endl;
return 0;
}
- if( qstrncmp( (char*)chunk.ckid, WAV_FMT_MAGIC, 4 ) ) {
+ if( tqstrncmp( (char*)chunk.ckid, WAV_FMT_MAGIC, 4 ) ) {
kdDebug() << "(K3bWaveDecoder) " << f->name() << ": could not find format chunk." << endl;
return 0;
}
@@ -152,7 +152,7 @@ static unsigned long identifyWaveFile( QFile* f, int* samplerate = 0, int* chann
}
// skip chunk data of unknown chunk
- if( qstrncmp( (char*)chunk.ckid, WAV_DATA_MAGIC, 4 ) ) {
+ if( tqstrncmp( (char*)chunk.ckid, WAV_DATA_MAGIC, 4 ) ) {
kdDebug() << "(K3bWaveDecoder) skipping chunk: " << (char*)chunk.ckid << endl;
if( !f->at( f->at() + le_a_to_u_long(chunk.cksize) ) ) {
kdDebug() << "(K3bWaveDecoder) " << f->name() << ": could not seek in file." << endl;
@@ -183,7 +183,7 @@ public:
bufferSize(0) {
}
- QFile* file;
+ TQFile* file;
long headerLength;
int sampleRate;
@@ -197,11 +197,11 @@ public:
};
-K3bWaveDecoder::K3bWaveDecoder( QObject* parent, const char* name )
- : K3bAudioDecoder( parent, name )
+K3bWaveDecoder::K3bWaveDecoder( TQObject* tqparent, const char* name )
+ : K3bAudioDecoder( tqparent, name )
{
d = new Private();
- d->file = new QFile();
+ d->file = new TQFile();
}
@@ -216,7 +216,7 @@ int K3bWaveDecoder::decodeInternal( char* _data, int maxLen )
{
int read = 0;
- maxLen = QMIN( maxLen, (int)(d->size - d->alreadyRead) );
+ maxLen = TQMIN( maxLen, (int)(d->size - d->alreadyRead) );
if( d->sampleSize == 16 ) {
read = d->file->readBlock( _data, maxLen );
@@ -243,7 +243,7 @@ int K3bWaveDecoder::decodeInternal( char* _data, int maxLen )
d->bufferSize = maxLen/2;
}
- read = d->file->readBlock( d->buffer, QMIN(maxLen/2, d->bufferSize) );
+ read = d->file->readBlock( d->buffer, TQMIN(maxLen/2, d->bufferSize) );
d->alreadyRead += read;
// stretch samples to 16 bit
@@ -330,36 +330,36 @@ void K3bWaveDecoder::cleanup()
}
-QString K3bWaveDecoder::fileType() const
+TQString K3bWaveDecoder::fileType() const
{
return i18n("WAVE");
}
-QStringList K3bWaveDecoder::supportedTechnicalInfos() const
+TQStringList K3bWaveDecoder::supportedTechnicalInfos() const
{
- return QStringList::split( ";",
+ return TQStringList::split( ";",
i18n("Channels") + ";" +
i18n("Sampling Rate") + ";" +
i18n("Sample Size") );
}
-QString K3bWaveDecoder::technicalInfo( const QString& name ) const
+TQString K3bWaveDecoder::technicalInfo( const TQString& name ) const
{
if( name == i18n("Channels") )
- return QString::number(d->channels);
+ return TQString::number(d->channels);
else if( name == i18n("Sampling Rate") )
- return i18n("%1 Hz").arg(d->sampleRate);
+ return i18n("%1 Hz").tqarg(d->sampleRate);
else if( name == i18n("Sample Size") )
- return i18n("%1 bits").arg(d->sampleSize);
+ return i18n("%1 bits").tqarg(d->sampleSize);
else
- return QString::null;
+ return TQString();
}
-K3bWaveDecoderFactory::K3bWaveDecoderFactory( QObject* parent, const char* name )
- : K3bAudioDecoderFactory( parent, name )
+K3bWaveDecoderFactory::K3bWaveDecoderFactory( TQObject* tqparent, const char* name )
+ : K3bAudioDecoderFactory( tqparent, name )
{
}
@@ -369,16 +369,16 @@ K3bWaveDecoderFactory::~K3bWaveDecoderFactory()
}
-K3bAudioDecoder* K3bWaveDecoderFactory::createDecoder( QObject* parent,
+K3bAudioDecoder* K3bWaveDecoderFactory::createDecoder( TQObject* tqparent,
const char* name ) const
{
- return new K3bWaveDecoder( parent, name );
+ return new K3bWaveDecoder( tqparent, name );
}
bool K3bWaveDecoderFactory::canDecode( const KURL& url )
{
- QFile f( url.path() );
+ TQFile f( url.path() );
if( !f.open( IO_ReadOnly ) ) {
kdDebug() << "(K3bWaveDecoder) could not open file " << url.path() << endl;
return false;
diff --git a/plugins/decoder/wave/k3bwavedecoder.h b/plugins/decoder/wave/k3bwavedecoder.h
index 3f92e9a..ddef738 100644
--- a/plugins/decoder/wave/k3bwavedecoder.h
+++ b/plugins/decoder/wave/k3bwavedecoder.h
@@ -20,25 +20,26 @@
#include <k3b_export.h>
#include <kurl.h>
-#include <qcstring.h>
+#include <tqcstring.h>
-class QFile;
+class TQFile;
class LIBK3B_EXPORT K3bWaveDecoderFactory : public K3bAudioDecoderFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bWaveDecoderFactory( QObject* parent = 0, const char* name = 0 );
+ K3bWaveDecoderFactory( TQObject* tqparent = 0, const char* name = 0 );
~K3bWaveDecoderFactory();
bool canDecode( const KURL& filename );
int pluginSystemVersion() const { return 3; }
- K3bAudioDecoder* createDecoder( QObject* parent = 0,
+ K3bAudioDecoder* createDecoder( TQObject* tqparent = 0,
const char* name = 0 ) const;
};
@@ -46,20 +47,21 @@ class LIBK3B_EXPORT K3bWaveDecoderFactory : public K3bAudioDecoderFactory
class LIBK3B_EXPORT K3bWaveDecoder : public K3bAudioDecoder
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bWaveDecoder( QObject* parent = 0, const char* name = 0 );
+ K3bWaveDecoder( TQObject* tqparent = 0, const char* name = 0 );
~K3bWaveDecoder();
void cleanup();
bool seekInternal( const K3b::Msf& );
- QString fileType() const;
+ TQString fileType() const;
- QStringList supportedTechnicalInfos() const;
+ TQStringList supportedTechnicalInfos() const;
- QString technicalInfo( const QString& ) const;
+ TQString technicalInfo( const TQString& ) const;
protected:
bool analyseFileInternal( K3b::Msf& frames, int& samplerate, int& channels );