diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /kioslave/audiocd/plugins | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave/audiocd/plugins')
-rw-r--r-- | kioslave/audiocd/plugins/audiocdencoder.cpp | 26 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/audiocdencoder.h | 10 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/flac/encoderflac.cpp | 18 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/flac/encoderflac.h | 4 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/lame/collectingprocess.cpp | 44 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/lame/collectingprocess.h | 6 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/lame/encoderlame.cpp | 84 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/lame/encoderlame.h | 14 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/vorbis/encodervorbis.cpp | 22 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/vorbis/encodervorbis.h | 6 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/wav/encodercda.cpp | 2 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/wav/encodercda.h | 4 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/wav/encoderwav.cpp | 4 | ||||
-rw-r--r-- | kioslave/audiocd/plugins/wav/encoderwav.h | 4 |
14 files changed, 124 insertions, 124 deletions
diff --git a/kioslave/audiocd/plugins/audiocdencoder.cpp b/kioslave/audiocd/plugins/audiocdencoder.cpp index 32f13914..6dfbec18 100644 --- a/kioslave/audiocd/plugins/audiocdencoder.cpp +++ b/kioslave/audiocd/plugins/audiocdencoder.cpp @@ -19,8 +19,8 @@ #include <audiocdencoder.h> #include <klibloader.h> #include <kdebug.h> -#include <qdir.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqregexp.h> #include <kstandarddirs.h> /** @@ -28,7 +28,7 @@ * @param libFileName file to try to load. * @returns pointer to the symbol or NULL */ -void *loadPlugin(const QString &libFileName) +void *loadPlugin(const TQString &libFileName) { #ifdef DEBUG kdDebug(7117) << "Trying to load library. File: \"" << libFileName.latin1() << "\"." << endl; @@ -59,24 +59,24 @@ void *loadPlugin(const QString &libFileName) * but I do know that this does work. :) Feel free to improve the loading system, * there isn't much code anyway. */ -void AudioCDEncoder::findAllPlugins(KIO::SlaveBase *slave, QPtrList<AudioCDEncoder> &encoders){ - QString foundEncoders; +void AudioCDEncoder::findAllPlugins(KIO::SlaveBase *slave, TQPtrList<AudioCDEncoder> &encoders){ + TQString foundEncoders; KStandardDirs standardDirs; - QStringList dirs = standardDirs.findDirs("module", ""); - for (QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it) { - QDir dir(*it); + TQStringList dirs = standardDirs.findDirs("module", ""); + for (TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it) { + TQDir dir(*it); if (!dir.exists()) { kdDebug(7117) << "Directory given by KStandardDirs: " << dir.path() << " doesn't exists!" << endl; continue; } - dir.setFilter(QDir::Files | QDir::Hidden); + dir.setFilter(TQDir::Files | TQDir::Hidden); - QStringList list = dir.entryList( "libaudiocd_encoder_*.so"); + TQStringList list = dir.entryList( "libaudiocd_encoder_*.so"); kdDebug() << "list " << list << endl; - for (QStringList::ConstIterator it2 = list.begin(); it2 != list.end(); ++it2) + for (TQStringList::ConstIterator it2 = list.begin(); it2 != list.end(); ++it2) { - QString fileName = *it2; + TQString fileName = *it2; kdDebug() << fileName << endl; if (foundEncoders.contains(fileName)) { kdDebug(7117) << "Warning, encoder has been found twice!" << endl; @@ -86,7 +86,7 @@ void AudioCDEncoder::findAllPlugins(KIO::SlaveBase *slave, QPtrList<AudioCDEncod fileName = fileName.mid(0, fileName.find('.')); void *function = loadPlugin(fileName); if(function){ - void (*functionPointer)(KIO::SlaveBase *, QPtrList<AudioCDEncoder> &) = (void (*)(KIO::SlaveBase *slave, QPtrList<AudioCDEncoder> &encoders)) function; + void (*functionPointer)(KIO::SlaveBase *, TQPtrList<AudioCDEncoder> &) = (void (*)(KIO::SlaveBase *slave, TQPtrList<AudioCDEncoder> &encoders)) function; functionPointer(slave, encoders); } } diff --git a/kioslave/audiocd/plugins/audiocdencoder.h b/kioslave/audiocd/plugins/audiocdencoder.h index a9ff691f..cac9b2aa 100644 --- a/kioslave/audiocd/plugins/audiocdencoder.h +++ b/kioslave/audiocd/plugins/audiocdencoder.h @@ -65,7 +65,7 @@ public: * @returns the generic user string type/name of this encoder * Examples: "MP3", "Ogg Vorbis", "Wav", "FID Level 2", etc */ - virtual QString type() const = 0; + virtual TQString type() const = 0; /** * @returns the mime type for the files this encoder produces. @@ -86,7 +86,7 @@ public: * information if they want to so it can be inserted * where neccessary (start, middle, end, or combos etc). */ - virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ) = 0; + virtual void fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ) = 0; /** * Perform any initial file creation necessary for a new song (that @@ -114,13 +114,13 @@ public: /** * Returns a configure widget for the encoder */ - virtual QWidget* getConfigureWidget(KConfigSkeleton** manager) const + virtual TQWidget* getConfigureWidget(KConfigSkeleton** manager) const { Q_UNUSED(manager); return NULL; }; /** * Returns the last error message; called when e.g. read() returns -1. */ - virtual QString lastErrorMessage() const { return QString::null; } + virtual TQString lastErrorMessage() const { return TQString::null; } /** * Helper function to load all of the AudioCD Encoders from libraries. @@ -130,7 +130,7 @@ public: * @param slave ioslave needed if the plugin is going to be used to encode something. * @param encoders container for new encoders. */ - static void findAllPlugins(KIO::SlaveBase *slave, QPtrList<AudioCDEncoder> &encoders); + static void findAllPlugins(KIO::SlaveBase *slave, TQPtrList<AudioCDEncoder> &encoders); protected: /** diff --git a/kioslave/audiocd/plugins/flac/encoderflac.cpp b/kioslave/audiocd/plugins/flac/encoderflac.cpp index a787984b..86d30a89 100644 --- a/kioslave/audiocd/plugins/flac/encoderflac.cpp +++ b/kioslave/audiocd/plugins/flac/encoderflac.cpp @@ -32,7 +32,7 @@ extern "C" { - KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, QPtrList<AudioCDEncoder> &encoders) + KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, TQPtrList<AudioCDEncoder> &encoders) { encoders.append(new EncoderFLAC(slave)); } @@ -53,7 +53,7 @@ static FLAC__StreamEncoderWriteStatus WriteCallback(const FLAC__StreamEncoder *e d->data += bytes; - QByteArray output; + TQByteArray output; if (bytes) { output.setRawData((const char*)buffer, bytes); @@ -153,29 +153,29 @@ long EncoderFLAC::readCleanup() return 0; } -void EncoderFLAC::fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ) +void EncoderFLAC::fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ) { d->metadata = new FLAC__StreamMetadata*[1]; d->metadata[0] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT); // d->metadata[1] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_PADDING); // d->metadata[2] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE) - typedef QPair<QString, QVariant> Comment; + typedef QPair<TQString, TQVariant> Comment; Comment comments[7] = { Comment("Title", info.trackInfoList[track].get("title")), Comment("Artist", info.get("artist")), Comment("Album", info.get("title")), Comment("Genre", info.get("genre")), - Comment("Tracknumber", QString::number(track+1)), + Comment("Tracknumber", TQString::number(track+1)), Comment("Comment", comment), - Comment("Date", QString::null )}; + Comment("Date", TQString::null )}; if (info.get("Year").toInt() > 0) { - QDateTime dt(QDate(info.get("Year").toInt(), 1, 1)); + TQDateTime dt(TQDate(info.get("Year").toInt(), 1, 1)); comments[6] = Comment("Date", dt.toString(Qt::ISODate)); } FLAC__StreamMetadata_VorbisComment_Entry entry; - QString field; - QCString cfield; + TQString field; + TQCString cfield; int num_comments = 0; for(int i=0; i<7; i++) { diff --git a/kioslave/audiocd/plugins/flac/encoderflac.h b/kioslave/audiocd/plugins/flac/encoderflac.h index 0dd285b8..9bec8bf4 100644 --- a/kioslave/audiocd/plugins/flac/encoderflac.h +++ b/kioslave/audiocd/plugins/flac/encoderflac.h @@ -38,13 +38,13 @@ public: EncoderFLAC(KIO::SlaveBase *slave); ~EncoderFLAC(); - virtual QString type() const { return "FLAC"; }; + virtual TQString type() const { return "FLAC"; }; virtual bool init(); virtual void loadSettings(); virtual unsigned long size(long time_secs) const; virtual const char * fileType() const { return "flac"; }; virtual const char * mimeType() const { return "audio/x-flac"; } - virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ); + virtual void fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ); virtual long readInit(long size); virtual long read(int16_t * buf, int frames); virtual long readCleanup(); diff --git a/kioslave/audiocd/plugins/lame/collectingprocess.cpp b/kioslave/audiocd/plugins/lame/collectingprocess.cpp index b3a13755..42bdf206 100644 --- a/kioslave/audiocd/plugins/lame/collectingprocess.cpp +++ b/kioslave/audiocd/plugins/lame/collectingprocess.cpp @@ -32,7 +32,7 @@ #include "collectingprocess.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <string.h> @@ -41,13 +41,13 @@ struct CollectingProcess::Private { {} uint stdoutSize; - QValueList<QByteArray> stdoutBuffer; + TQValueList<TQByteArray> stdoutBuffer; uint stderrSize; - QValueList<QByteArray> stderrBuffer; + TQValueList<TQByteArray> stderrBuffer; }; -CollectingProcess::CollectingProcess( QObject * parent, const char * name ) +CollectingProcess::CollectingProcess( TQObject * parent, const char * name ) : KProcess( parent, name ) { d = new Private(); @@ -59,25 +59,25 @@ CollectingProcess::~CollectingProcess() { bool CollectingProcess::start( RunMode runmode, Communication comm ) { // prevent duplicate connection - disconnect( this, SIGNAL( receivedStdout( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); + disconnect( this, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); if ( comm & Stdout ) { - connect( this, SIGNAL( receivedStdout( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); + connect( this, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); } // prevent duplicate connection - disconnect( this, SIGNAL( receivedStderr( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); + disconnect( this, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); if ( comm & Stderr ) { - connect( this, SIGNAL( receivedStderr( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); + connect( this, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); } return KProcess::start( runmode, comm ); } void CollectingProcess::slotReceivedStdout( KProcess *, char *buf, int len ) { - QByteArray b; + TQByteArray b; b.duplicate( buf, len ); d->stdoutBuffer.append( b ); d->stdoutSize += len; @@ -85,21 +85,21 @@ void CollectingProcess::slotReceivedStdout( KProcess *, char *buf, int len ) void CollectingProcess::slotReceivedStderr( KProcess *, char *buf, int len ) { - QByteArray b; + TQByteArray b; b.duplicate( buf, len ); d->stderrBuffer.append( b ); d->stderrSize += len; } -QByteArray CollectingProcess::collectedStdout() +TQByteArray CollectingProcess::collectedStdout() { if ( d->stdoutSize == 0 ) { - return QByteArray(); + return TQByteArray(); } uint offset = 0; - QByteArray b( d->stdoutSize ); - for ( QValueList<QByteArray>::const_iterator it = d->stdoutBuffer.begin(); + TQByteArray b( d->stdoutSize ); + for ( TQValueList<TQByteArray>::const_iterator it = d->stdoutBuffer.begin(); it != d->stdoutBuffer.end(); ++it ) { memcpy( b.data() + offset, (*it).data(), (*it).size() ); @@ -111,15 +111,15 @@ QByteArray CollectingProcess::collectedStdout() return b; } -QByteArray CollectingProcess::collectedStderr() +TQByteArray CollectingProcess::collectedStderr() { if ( d->stderrSize == 0 ) { - return QByteArray(); + return TQByteArray(); } uint offset = 0; - QByteArray b( d->stderrSize ); - for ( QValueList<QByteArray>::const_iterator it = d->stderrBuffer.begin(); + TQByteArray b( d->stderrSize ); + for ( TQValueList<TQByteArray>::const_iterator it = d->stderrBuffer.begin(); it != d->stderrBuffer.end(); ++it ) { memcpy( b.data() + offset, (*it).data(), (*it).size() ); diff --git a/kioslave/audiocd/plugins/lame/collectingprocess.h b/kioslave/audiocd/plugins/lame/collectingprocess.h index 7549fee3..e9f0def4 100644 --- a/kioslave/audiocd/plugins/lame/collectingprocess.h +++ b/kioslave/audiocd/plugins/lame/collectingprocess.h @@ -46,7 +46,7 @@ class CollectingProcess : public KProcess { Q_OBJECT public: - CollectingProcess( QObject * parent = 0, const char * name = 0 ); + CollectingProcess( TQObject * parent = 0, const char * name = 0 ); ~CollectingProcess(); /** Starts the process in NotifyOnExit mode and writes in to stdin of @@ -55,9 +55,9 @@ public: bool start( RunMode runmode, Communication comm ); /** Returns the contents of the stdout buffer and clears it afterwards. */ - QByteArray collectedStdout(); + TQByteArray collectedStdout(); /** Returns the contents of the stderr buffer and clears it afterwards. */ - QByteArray collectedStderr(); + TQByteArray collectedStderr(); private slots: void slotReceivedStdout( KProcess *, char *, int ); diff --git a/kioslave/audiocd/plugins/lame/encoderlame.cpp b/kioslave/audiocd/plugins/lame/encoderlame.cpp index 16cf2bee..5e59c6a4 100644 --- a/kioslave/audiocd/plugins/lame/encoderlame.cpp +++ b/kioslave/audiocd/plugins/lame/encoderlame.cpp @@ -23,21 +23,21 @@ #include "audiocd_lame_encoder.h" #include <kdebug.h> -#include <qgroupbox.h> +#include <tqgroupbox.h> #include <kprocess.h> #include <kdebug.h> #include <kglobal.h> #include <klocale.h> #include <kapplication.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include <ktempfile.h> #include <kstandarddirs.h> #include "collectingprocess.h" extern "C" { - KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, QPtrList<AudioCDEncoder> &encoders) { + KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, TQPtrList<AudioCDEncoder> &encoders) { encoders.append(new EncoderLame(slave)); } } @@ -50,14 +50,14 @@ public: int bitrate; bool waitingForWrite; bool processHasExited; - QString lastErrorMessage; - QStringList genreList; + TQString lastErrorMessage; + TQStringList genreList; uint lastSize; KProcess *currentEncodeProcess; KTempFile *tempFile; }; -EncoderLame::EncoderLame(KIO::SlaveBase *slave) : QObject(), AudioCDEncoder(slave) { +EncoderLame::EncoderLame(KIO::SlaveBase *slave) : TQObject(), AudioCDEncoder(slave) { d = new Private(); d->waitingForWrite = false; d->processHasExited = false; @@ -69,7 +69,7 @@ EncoderLame::~EncoderLame(){ delete d; } -QWidget* EncoderLame::getConfigureWidget(KConfigSkeleton** manager) const { +TQWidget* EncoderLame::getConfigureWidget(KConfigSkeleton** manager) const { (*manager) = Settings::self(); KGlobal::locale()->insertCatalogue("audiocd_encoder_lame"); EncoderLameConfig *config = new EncoderLameConfig(); @@ -91,15 +91,15 @@ bool EncoderLame::init(){ if(proc.exitStatus() != 0) return false; - const QByteArray data = proc.collectedStdout(); - QString str; + const TQByteArray data = proc.collectedStdout(); + TQString str; if ( !data.isEmpty() ) - str = QString::fromLocal8Bit( data, data.size() ); + str = TQString::fromLocal8Bit( data, data.size() ); - d->genreList = QStringList::split( '\n', str ); + d->genreList = TQStringList::split( '\n', str ); // Remove the numbers in front of every genre - for( QStringList::Iterator it = d->genreList.begin(); it != d->genreList.end(); ++it ) { - QString& genre = *it; + for( TQStringList::Iterator it = d->genreList.begin(); it != d->genreList.end(); ++it ) { + TQString& genre = *it; uint i = 0; while ( i < genre.length() && ( genre[i].isSpace() || genre[i].isDigit() ) ) ++i; @@ -126,31 +126,31 @@ void EncoderLame::loadSettings(){ if (method == 0) { // Constant Bitrate Encoding args.append("-b"); - args.append(QString("%1").arg(bitrates[settings->cbr_bitrate()])); + args.append(TQString("%1").arg(bitrates[settings->cbr_bitrate()])); d->bitrate = bitrates[settings->cbr_bitrate()]; args.append("-q"); - args.append(QString("%1").arg(quality)); + args.append(TQString("%1").arg(quality)); } else { // Variable Bitrate Encoding if (settings->vbr_average_br()) { args.append("--abr"); - args.append(QString("%1").arg(bitrates[settings->vbr_mean_brate()])); + args.append(TQString("%1").arg(bitrates[settings->vbr_mean_brate()])); d->bitrate = bitrates[settings->vbr_mean_brate()]; if (settings->vbr_min_br()){ args.append("-b"); - args.append(QString("%1").arg(bitrates[settings->vbr_min_brate()])); + args.append(TQString("%1").arg(bitrates[settings->vbr_min_brate()])); } if (settings->vbr_min_hard()) args.append("-F"); if (settings->vbr_max_br()){ args.append("-B"); - args.append(QString("%1").arg(bitrates[settings->vbr_max_brate()])); + args.append(TQString("%1").arg(bitrates[settings->vbr_max_brate()])); } } else { d->bitrate = 128; args.append("-V"); - args.append(QString("%1").arg(quality)); + args.append(TQString("%1").arg(quality)); } if ( !settings->vbr_xing_tag() ) args.append("-t"); @@ -186,21 +186,21 @@ void EncoderLame::loadSettings(){ if ( settings->enable_lowpass() ) { args.append("--lowpass"); - args.append(QString("%1").arg(settings->lowfilterfreq())); + args.append(TQString("%1").arg(settings->lowfilterfreq())); if (settings->set_lpf_width()){ args.append("--lowpass-width"); - args.append(QString("%1").arg(settings->lowfilterwidth())); + args.append(TQString("%1").arg(settings->lowfilterwidth())); } } if ( settings->enable_highpass()) { args.append("--hipass"); - args.append(QString("%1").arg(settings->highfilterfreq())); + args.append(TQString("%1").arg(settings->highfilterfreq())); if (settings->set_hpf_width()){ args.append("--hipass-width"); - args.append(QString("%1").arg(settings->highfilterwidth())); + args.append(TQString("%1").arg(settings->highfilterwidth())); } } } @@ -212,10 +212,10 @@ unsigned long EncoderLame::size(long time_secs) const { long EncoderLame::readInit(long /*size*/){ // Create KProcess d->currentEncodeProcess = new KProcess(0); - QString prefix = locateLocal("tmp", ""); + TQString prefix = locateLocal("tmp", ""); d->tempFile = new KTempFile(prefix, ".mp3"); d->tempFile->setAutoDelete(true); - d->lastErrorMessage = QString::null; + d->lastErrorMessage = TQString::null; d->processHasExited = false; // -x bitswap @@ -237,15 +237,15 @@ long EncoderLame::readInit(long /*size*/){ //kdDebug(7117) << d->currentEncodeProcess->args() << endl; - connect(d->currentEncodeProcess, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(receivedStdout(KProcess *, char *, int))); - connect(d->currentEncodeProcess, SIGNAL(receivedStderr(KProcess *, char *, int)), - this, SLOT(receivedStderr(KProcess *, char *, int))); - connect(d->currentEncodeProcess, SIGNAL(wroteStdin(KProcess *)), - this, SLOT(wroteStdin(KProcess *))); + connect(d->currentEncodeProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(receivedStdout(KProcess *, char *, int))); + connect(d->currentEncodeProcess, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this, TQT_SLOT(receivedStderr(KProcess *, char *, int))); + connect(d->currentEncodeProcess, TQT_SIGNAL(wroteStdin(KProcess *)), + this, TQT_SLOT(wroteStdin(KProcess *))); - connect(d->currentEncodeProcess, SIGNAL(processExited(KProcess *)), - this, SLOT(processExited(KProcess *))); + connect(d->currentEncodeProcess, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(processExited(KProcess *))); // Launch! d->currentEncodeProcess->start(KProcess::NotifyOnExit, KShellProcess::All); @@ -261,7 +261,7 @@ void EncoderLame::receivedStderr( KProcess * /*process*/, char *buffer, int /*bu kdDebug(7117) << "Lame stderr: " << buffer << endl; if ( !d->lastErrorMessage.isEmpty() ) d->lastErrorMessage += '\t'; - d->lastErrorMessage += QString::fromLocal8Bit( buffer ); + d->lastErrorMessage += TQString::fromLocal8Bit( buffer ); } void EncoderLame::receivedStdout( KProcess * /*process*/, char *buffer, int /*length*/ ){ @@ -290,7 +290,7 @@ long EncoderLame::read(int16_t *buf, int frames){ } // Determine the file size increase - QFileInfo file(d->tempFile->name()); + TQFileInfo file(d->tempFile->name()); uint change = file.size() - d->lastSize; d->lastSize = file.size(); return change; @@ -308,9 +308,9 @@ long EncoderLame::readCleanup(){ } // Now copy the file out of the temp into kio - QFile file( d->tempFile->name() ); + TQFile file( d->tempFile->name() ); if ( file.open( IO_ReadOnly ) ) { - QByteArray output; + TQByteArray output; char data[1024]; while ( !file.atEnd() ) { uint read = file.readBlock(data, 1024); @@ -329,7 +329,7 @@ long EncoderLame::readCleanup(){ return 0; } -void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ){ +void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ){ trackInfo.clear(); trackInfo.append("--tt"); trackInfo.append(info.trackInfoList[track].get("title").toString()); @@ -341,15 +341,15 @@ void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const QString &co trackInfo.append(info.get("title").toString()); trackInfo.append("--ty"); - trackInfo.append(QString("%1").arg(info.get("year").toString())); + trackInfo.append(TQString("%1").arg(info.get("year").toString())); trackInfo.append("--tc"); trackInfo.append(comment); trackInfo.append("--tn"); - trackInfo.append(QString("%1").arg(track+1)); + trackInfo.append(TQString("%1").arg(track+1)); - const QString genre = info.get( "genre" ).toString(); + const TQString genre = info.get( "genre" ).toString(); if ( d->genreList.find( genre ) != d->genreList.end() ) { trackInfo.append("--tg"); @@ -358,7 +358,7 @@ void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const QString &co } -QString EncoderLame::lastErrorMessage() const +TQString EncoderLame::lastErrorMessage() const { return d->lastErrorMessage; } diff --git a/kioslave/audiocd/plugins/lame/encoderlame.h b/kioslave/audiocd/plugins/lame/encoderlame.h index b1b2b702..ba02cf4f 100644 --- a/kioslave/audiocd/plugins/lame/encoderlame.h +++ b/kioslave/audiocd/plugins/lame/encoderlame.h @@ -27,7 +27,7 @@ class KProcess; * MP3 encoder using the LAME encoder. * Go to http://lame.sourceforge.net/ for lots of information. */ -class EncoderLame : public QObject, public AudioCDEncoder { +class EncoderLame : public TQObject, public AudioCDEncoder { Q_OBJECT @@ -35,19 +35,19 @@ public: EncoderLame(KIO::SlaveBase *slave); ~EncoderLame(); - virtual QString type() const { return "MP3"; }; + virtual TQString type() const { return "MP3"; }; virtual bool init(); virtual void loadSettings(); virtual unsigned long size(long time_secs) const; virtual const char * fileType() const { return "mp3"; }; virtual const char * mimeType() const { return "audio/x-mp3"; }; - virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ); + virtual void fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ); virtual long readInit(long size); virtual long read(int16_t * buf, int frames); virtual long readCleanup(); - virtual QString lastErrorMessage() const; + virtual TQString lastErrorMessage() const; - virtual QWidget* getConfigureWidget(KConfigSkeleton** manager) const; + virtual TQWidget* getConfigureWidget(KConfigSkeleton** manager) const; protected slots: void wroteStdin(KProcess *proc); @@ -59,8 +59,8 @@ private: class Private; Private * d; - QStringList args; - QStringList trackInfo; + TQStringList args; + TQStringList trackInfo; }; #endif // ENCODER_LAME_H diff --git a/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp b/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp index 5b61f6ea..739e1c8f 100644 --- a/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp +++ b/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp @@ -33,14 +33,14 @@ #include <stdlib.h> #include <kconfig.h> #include <knuminput.h> -#include <qgroupbox.h> +#include <tqgroupbox.h> #include <kglobal.h> #include <klocale.h> extern "C" { - KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, QPtrList<AudioCDEncoder> &encoders) + KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, TQPtrList<AudioCDEncoder> &encoders) { encoders.append(new EncoderVorbis(slave)); } @@ -79,7 +79,7 @@ EncoderVorbis::~EncoderVorbis(){ delete d; } -QWidget* EncoderVorbis::getConfigureWidget(KConfigSkeleton** manager) const { +TQWidget* EncoderVorbis::getConfigureWidget(KConfigSkeleton** manager) const { (*manager) = Settings::self(); KGlobal::locale()->insertCatalogue("audiocd_encoder_vorbis"); EncoderVorbisConfig *config = new EncoderVorbisConfig(); @@ -170,7 +170,7 @@ long EncoderVorbis::flush_vorbis(void) { while(int result=ogg_stream_pageout(&d->os,&d->og)) { if (!result) break; - QByteArray output; + TQByteArray output; char * oggheader = reinterpret_cast<char *>(d->og.header); char * oggbody = reinterpret_cast<char *>(d->og.body); @@ -250,7 +250,7 @@ long EncoderVorbis::readInit(long /*size*/){ if (!result) break; - QByteArray output; + TQByteArray output; char * oggheader = reinterpret_cast<char *>(d->og.header); char * oggbody = reinterpret_cast<char *>(d->og.body); @@ -296,27 +296,27 @@ long EncoderVorbis::readCleanup(){ return processed; } -void EncoderVorbis::fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ) +void EncoderVorbis::fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ) { if( !d->write_vorbis_comments ) return; - typedef QPair<QCString, QVariant> CommentField; - QValueList<CommentField> commentFields; + typedef QPair<TQCString, TQVariant> CommentField; + TQValueList<CommentField> commentFields; commentFields.append(CommentField("title", info.trackInfoList[track].get("title"))); commentFields.append(CommentField("artist", info.get("artist"))); commentFields.append(CommentField("album", info.get("title"))); commentFields.append(CommentField("genre", info.get("genre"))); - commentFields.append(CommentField("tracknumber", QString::number(track+1))); + commentFields.append(CommentField("tracknumber", TQString::number(track+1))); commentFields.append(CommentField("comment", comment)); if (info.get("year").toInt() > 0) { - QDateTime dt(QDate(info.get("year").toInt(), 1, 1)); + TQDateTime dt(TQDate(info.get("year").toInt(), 1, 1)); commentFields.append(CommentField("date", dt.toString(Qt::ISODate).utf8().data())); } - for(QValueListIterator<CommentField> it = commentFields.begin(); it != commentFields.end(); ++it) { + for(TQValueListIterator<CommentField> it = commentFields.begin(); it != commentFields.end(); ++it) { // if the value is not empty if(!(*it).second.toString().isEmpty()) { diff --git a/kioslave/audiocd/plugins/vorbis/encodervorbis.h b/kioslave/audiocd/plugins/vorbis/encodervorbis.h index a6ad22ff..fbf649c7 100644 --- a/kioslave/audiocd/plugins/vorbis/encodervorbis.h +++ b/kioslave/audiocd/plugins/vorbis/encodervorbis.h @@ -42,17 +42,17 @@ public: EncoderVorbis(KIO::SlaveBase *slave); ~EncoderVorbis(); - virtual QString type() const { return "Ogg Vorbis"; }; + virtual TQString type() const { return "Ogg Vorbis"; }; virtual bool init(); virtual void loadSettings(); virtual unsigned long size(long time_secs) const; virtual const char * fileType() const { return "ogg"; }; virtual const char * mimeType() const; - virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ); + virtual void fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ); virtual long readInit(long size); virtual long read(int16_t * buf, int frames); virtual long readCleanup(); - virtual QWidget* getConfigureWidget(KConfigSkeleton** manager) const; + virtual TQWidget* getConfigureWidget(KConfigSkeleton** manager) const; private: long flush_vorbis(); diff --git a/kioslave/audiocd/plugins/wav/encodercda.cpp b/kioslave/audiocd/plugins/wav/encodercda.cpp index 4fb534bd..ef8522d9 100644 --- a/kioslave/audiocd/plugins/wav/encodercda.cpp +++ b/kioslave/audiocd/plugins/wav/encodercda.cpp @@ -51,7 +51,7 @@ inline int16_t swap16 (int16_t i) } long EncoderCda::read(int16_t * buf, int frames){ - QByteArray output; + TQByteArray output; int16_t i16 = 1; /* WAV is defined to be little endian, so we need to swap it on big endian platforms. */ diff --git a/kioslave/audiocd/plugins/wav/encodercda.h b/kioslave/audiocd/plugins/wav/encodercda.h index 04a946ea..814432b3 100644 --- a/kioslave/audiocd/plugins/wav/encodercda.h +++ b/kioslave/audiocd/plugins/wav/encodercda.h @@ -43,10 +43,10 @@ public: virtual bool init(){ return true; }; virtual void loadSettings(){}; virtual unsigned long size(long time_secs) const; - virtual QString type() const { return "CDA"; }; + virtual TQString type() const { return "CDA"; }; virtual const char * mimeType() const; virtual const char * fileType() const { return "cda"; }; - virtual void fillSongInfo( KCDDB::CDInfo, int, const QString &){}; + virtual void fillSongInfo( KCDDB::CDInfo, int, const TQString &){}; virtual long readInit(long){ return 0; }; virtual long read(int16_t * buf, int frames); virtual long readCleanup(){ return 0; }; diff --git a/kioslave/audiocd/plugins/wav/encoderwav.cpp b/kioslave/audiocd/plugins/wav/encoderwav.cpp index bcf3ba64..8052ce41 100644 --- a/kioslave/audiocd/plugins/wav/encoderwav.cpp +++ b/kioslave/audiocd/plugins/wav/encoderwav.cpp @@ -26,7 +26,7 @@ extern "C" { - KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, QPtrList<AudioCDEncoder> &encoders) + KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, TQPtrList<AudioCDEncoder> &encoders) { encoders.append( new EncoderWav(slave)); encoders.append( new EncoderCda(slave)); @@ -76,7 +76,7 @@ long EncoderWav::readInit(long byteCount){ riffHeader[42] = (byteCount >> 16) & 0xff; riffHeader[43] = (byteCount >> 24) & 0xff; - QByteArray output; + TQByteArray output; output.setRawData(riffHeader, 44); ioslave->data(output); output.resetRawData(riffHeader, 44); diff --git a/kioslave/audiocd/plugins/wav/encoderwav.h b/kioslave/audiocd/plugins/wav/encoderwav.h index 3be07f9c..128faa87 100644 --- a/kioslave/audiocd/plugins/wav/encoderwav.h +++ b/kioslave/audiocd/plugins/wav/encoderwav.h @@ -41,10 +41,10 @@ public: ~EncoderWav(){}; virtual bool init(){ return true; }; virtual unsigned long size(long time_secs) const; - virtual QString type() const { return "Wav"; }; + virtual TQString type() const { return "Wav"; }; virtual const char * fileType() const { return "wav"; }; virtual const char * mimeType() const; - virtual void fillSongInfo( KCDDB::CDInfo, int, const QString &){}; + virtual void fillSongInfo( KCDDB::CDInfo, int, const TQString &){}; virtual long readInit(long size); private: |