diff options
Diffstat (limited to 'kioslave/audiocd')
-rw-r--r-- | kioslave/audiocd/audiocd.cpp | 126 | ||||
-rw-r--r-- | kioslave/audiocd/audiocd.h | 12 | ||||
-rw-r--r-- | kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp | 84 | ||||
-rw-r--r-- | kioslave/audiocd/kcmaudiocd/kcmaudiocd.h | 6 | ||||
-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 |
18 files changed, 238 insertions, 238 deletions
diff --git a/kioslave/audiocd/audiocd.cpp b/kioslave/audiocd/audiocd.cpp index af81c13d..d092ffda 100644 --- a/kioslave/audiocd/audiocd.cpp +++ b/kioslave/audiocd/audiocd.cpp @@ -44,13 +44,13 @@ extern "C" #include <sys/resource.h> #include <kmacroexpander.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqfile.h> +#include <tqfileinfo.h> #include <kcmdlineargs.h> #include <kdebug.h> #include <kapplication.h> #include <klocale.h> -#include <qregexp.h> +#include <tqregexp.h> // CDDB #include <client.h> @@ -59,7 +59,7 @@ extern "C" using namespace KIO; using namespace KCDDB; -#define QFL1(x) QString::fromLatin1(x) +#define QFL1(x) TQString::fromLatin1(x) #define DEFAULT_CD_DEVICE "/dev/cdrom" #define CDDB_INFORMATION "CDDB Information" @@ -121,17 +121,17 @@ public: bool req_allTracks; Which_dir which_dir; int req_track; - QString fname; + TQString fname; AudioCDEncoder *encoder_dir_type; // Misc settings - QString device; // URL settable + TQString device; // URL settable int paranoiaLevel; // URL settable bool reportErrors; // Directory strings, never change after init - QString s_info; - QString s_fullCD; + TQString s_info; + TQString s_fullCD; // Current CD unsigned discid; @@ -146,19 +146,19 @@ public: KCDDB::CDInfo cddbBestChoice; // Template for .. - QString fileNameTemplate; // URL settable - QString albumTemplate; // URL settable - QString rsearch; - QString rreplace; + TQString fileNameTemplate; // URL settable + TQString albumTemplate; // URL settable + TQString rsearch; + TQString rreplace; // Current strings for this CD and or cddb selection - QStringList templateTitles; - QString templateAlbumName; + TQStringList templateTitles; + TQString templateAlbumName; }; int paranoia_read_limited_error; -AudioCDProtocol::AudioCDProtocol(const QCString & protocol, const QCString & pool, const QCString & app) +AudioCDProtocol::AudioCDProtocol(const TQCString & protocol, const TQCString & pool, const TQCString & app) : SlaveBase(protocol, pool, app) { d = new Private; @@ -175,18 +175,18 @@ AudioCDProtocol::~AudioCDProtocol() delete d; } -AudioCDEncoder *AudioCDProtocol::encoderFromExtension(const QString& extension) +AudioCDEncoder *AudioCDProtocol::encoderFromExtension(const TQString& extension) { AudioCDEncoder *encoder; for ( encoder = encoders.first(); encoder; encoder = encoders.next() ){ - if(QString(".")+encoder->fileType() == extension) + if(TQString(".")+encoder->fileType() == extension) return encoder; } Q_ASSERT(false); return NULL; } -AudioCDEncoder *AudioCDProtocol::determineEncoder(const QString & filename) +AudioCDEncoder *AudioCDProtocol::determineEncoder(const TQString & filename) { int len = filename.length(); int pos = filename.findRev('.'); @@ -251,7 +251,7 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url) // circumstances, so build a representation from // the unit number and SCSI device name. // - QString devname = QString::fromLatin1( "/dev/%1%2" ) + TQString devname = TQString::fromLatin1( "/dev/%1%2" ) .arg( drive->dev->given_dev_name ) .arg( drive->dev->given_unit_number ) ; kdDebug(7117) << " Using derived name " << devname << endl; @@ -275,7 +275,7 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url) // Determine what file or folder that is wanted. d->fname = url.fileName(false); - QString dname = url.directory(true, false); + TQString dname = url.directory(true, false); if (!dname.isEmpty() && dname[0] == '/') dname = dname.mid(1); @@ -323,7 +323,7 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url) // See if the url is a track d->req_track = -1; if (!d->fname.isEmpty()){ - QString name(d->fname); + TQString name(d->fname); // Remove extension int dot = name.findRev('.'); @@ -399,7 +399,7 @@ void AudioCDProtocol::get(const KURL & url) if( d->fname.contains(i18n(CDDB_INFORMATION))){ uint choice = 1; - if(d->fname != QString("%1.txt").arg(i18n(CDDB_INFORMATION))){ + if(d->fname != TQString("%1.txt").arg(i18n(CDDB_INFORMATION))){ choice= d->fname.section('_',1,1).section('.',0,0).toInt(); } uint count = 1; @@ -408,9 +408,9 @@ void AudioCDProtocol::get(const KURL & url) for ( it = d->cddbList.begin(); it != d->cddbList.end(); ++it ){ if(count == choice){ mimeType("text/html"); - data(QCString( (*it).toString().latin1() )); - // send an empty QByteArray to signal end of data. - data(QByteArray()); + data(TQCString( (*it).toString().latin1() )); + // send an empty TQByteArray to signal end of data. + data(TQByteArray()); finished(); found = true; break; @@ -419,9 +419,9 @@ void AudioCDProtocol::get(const KURL & url) } if(!found && d->fname.contains(i18n(CDDB_INFORMATION)+":")){ mimeType("text/html"); - //data(QCString( d->fname.latin1() )); - // send an empty QByteArray to signal end of data. - data(QByteArray()); + //data(TQCString( d->fname.latin1() )); + // send an empty TQByteArray to signal end of data. + data(TQByteArray()); finished(); found = true; } @@ -470,8 +470,8 @@ void AudioCDProtocol::get(const KURL & url) // Read data (track/disk) from the cd paranoiaRead(drive, firstSector, lastSector, encoder, url.fileName(), size); - // send an empty QByteArray to signal end of data. - data(QByteArray()); + // send an empty TQByteArray to signal end of data. + data(TQByteArray()); cdda_close(drive); @@ -541,7 +541,7 @@ void AudioCDProtocol::stat(const KURL & url) finished(); } -static void app_entry(UDSEntry& e, unsigned int uds, const QString& str) +static void app_entry(UDSEntry& e, unsigned int uds, const TQString& str) { UDSAtom a; a.m_uds = uds; @@ -557,20 +557,20 @@ static void app_entry(UDSEntry& e, unsigned int uds, long l) e.append(a); } -static void app_dir(UDSEntry& e, const QString & n, size_t s) +static void app_dir(UDSEntry& e, const TQString & n, size_t s) { e.clear(); - app_entry(e, KIO::UDS_NAME, QFile::decodeName(n.local8Bit())); + app_entry(e, KIO::UDS_NAME, TQFile::decodeName(n.local8Bit())); app_entry(e, KIO::UDS_FILE_TYPE, S_IFDIR); app_entry(e, KIO::UDS_ACCESS, 0400); app_entry(e, KIO::UDS_SIZE, s); app_entry(e, KIO::UDS_MIME_TYPE, "inode/directory"); } -static void app_file(UDSEntry& e, const QString & n, size_t s) +static void app_file(UDSEntry& e, const TQString & n, size_t s) { e.clear(); - app_entry(e, KIO::UDS_NAME, QFile::decodeName(n.local8Bit())); + app_entry(e, KIO::UDS_NAME, TQFile::decodeName(n.local8Bit())); app_entry(e, KIO::UDS_FILE_TYPE, S_IFREG); app_entry(e, KIO::UDS_ACCESS, 0400); app_entry(e, KIO::UDS_SIZE, s); @@ -610,15 +610,15 @@ void AudioCDProtocol::listDir(const KURL & url) for ( it = d->cddbList.begin(); it != d->cddbList.end(); ++it ){ (*it).toString(); if(count == 1) - app_file(entry, QString("%1.txt").arg(i18n(CDDB_INFORMATION)), ((*it).toString().length())+1); + app_file(entry, TQString("%1.txt").arg(i18n(CDDB_INFORMATION)), ((*it).toString().length())+1); else - app_file(entry, QString("%1_%2.txt").arg(i18n(CDDB_INFORMATION)).arg(count), ((*it).toString().length())+1); + app_file(entry, TQString("%1_%2.txt").arg(i18n(CDDB_INFORMATION)).arg(count), ((*it).toString().length())+1); count++; listEntry(entry, false); } // Error if( count == 1 ) { - app_file(entry, QString("%1: %2.txt").arg(i18n(CDDB_INFORMATION)).arg(CDDB::resultToString(d->cddbResult)), ((*it).toString().length())+1); + app_file(entry, TQString("%1: %2.txt").arg(i18n(CDDB_INFORMATION)).arg(CDDB::resultToString(d->cddbResult)), ((*it).toString().length())+1); count++; listEntry(entry, false); } @@ -694,7 +694,7 @@ void AudioCDProtocol::listDir(const KURL & url) finished(); } -void AudioCDProtocol::addEntry(const QString& trackTitle, AudioCDEncoder *encoder, struct cdrom_drive * drive, int trackNo) +void AudioCDProtocol::addEntry(const TQString& trackTitle, AudioCDEncoder *encoder, struct cdrom_drive * drive, int trackNo) { if(!encoder || !drive) return; @@ -713,7 +713,7 @@ void AudioCDProtocol::addEntry(const QString& trackTitle, AudioCDEncoder *encode theFileSize = fileSize(firstSector, lastSector, encoder); } UDSEntry entry; - app_file(entry, trackTitle + QString(".")+encoder->fileType(), theFileSize); + app_file(entry, trackTitle + TQString(".")+encoder->fileType(), theFileSize); listEntry(entry, false); } @@ -730,7 +730,7 @@ long AudioCDProtocol::fileSize(long firstSector, long lastSector, AudioCDEncoder struct cdrom_drive *AudioCDProtocol::getDrive() { - QCString device(QFile::encodeName(d->device)); + TQCString device(TQFile::encodeName(d->device)); struct cdrom_drive * drive = 0; @@ -742,7 +742,7 @@ struct cdrom_drive *AudioCDProtocol::getDrive() if (0 == drive) { - if (QFile(QFile::decodeName(DEFAULT_CD_DEVICE)).exists()) + if (TQFile(TQFile::decodeName(DEFAULT_CD_DEVICE)).exists()) drive = cdda_identify(DEFAULT_CD_DEVICE, CDDA_MESSAGE_PRINTIT, 0); } } @@ -750,7 +750,7 @@ struct cdrom_drive *AudioCDProtocol::getDrive() if (0 == drive) { kdDebug(7117) << "Can't find an audio CD on: \"" << d->device << "\"" << endl; - QFileInfo fi(d->device); + TQFileInfo fi(d->device); if(!fi.isReadable()) error(KIO::ERR_SLAVE_DEFINED, i18n("Device doesn't have read permissions for this account. Check the read permissions on the device.")); else if(!fi.isWritable()) @@ -778,7 +778,7 @@ void AudioCDProtocol::paranoiaRead( long firstSector, long lastSector, AudioCDEncoder* encoder, - const QString& fileName, + const TQString& fileName, unsigned long size ) { @@ -848,8 +848,8 @@ void AudioCDProtocol::paranoiaRead( if(encoderProcessed == -1){ kdDebug(7117) << "Encoder processing error, stopping." << endl; ok = false; - QString errMsg = i18n( "Couldn't read %1: encoding failed" ).arg( fileName ); - QString details = encoder->lastErrorMessage(); + TQString errMsg = i18n( "Couldn't read %1: encoding failed" ).arg( fileName ); + TQString details = encoder->lastErrorMessage(); if ( !details.isEmpty() ) errMsg += "\n" + details; error( ERR_SLAVE_DEFINED, errMsg ); @@ -940,25 +940,25 @@ void AudioCDProtocol::parseURLArgs(const KURL & url) { d->clearURLargs(); - QString query(KURL::decode_string(url.query())); + TQString query(KURL::decode_string(url.query())); if (query.isEmpty() || query[0] != '?') return; query = query.mid(1); // Strip leading '?'. - QStringList tokens(QStringList::split('&', query)); + TQStringList tokens(TQStringList::split('&', query)); - for (QStringList::ConstIterator it(tokens.begin()); it != tokens.end(); ++it) + for (TQStringList::ConstIterator it(tokens.begin()); it != tokens.end(); ++it) { - QString token(*it); + TQString token(*it); int equalsPos(token.find('=')); if (-1 == equalsPos) continue; - QString attribute(token.left(equalsPos)); - QString value(token.mid(equalsPos + 1)); + TQString attribute(token.left(equalsPos)); + TQString value(token.mid(equalsPos + 1)); if (attribute == QFL1("device")) d->device = value; @@ -1021,7 +1021,7 @@ void AudioCDProtocol::loadSettings() // otherwise it is not possible to search for a space " ", since an empty (only spaces) value is not // supported by KConfig, so the space has to be qouted, but then here the regexp searches really for " " // instead of just the space. Alex - QRegExp qoutedString("^\".*\"$"); + TQRegExp qoutedString("^\".*\"$"); if (qoutedString.exactMatch(d->rsearch)) { d->rsearch=d->rsearch.mid(1, d->rsearch.length()-2); @@ -1057,7 +1057,7 @@ void AudioCDProtocol::generateTemplateTitles() if (d->cddbResult != KCDDB::CDDB::Success) { for (unsigned int i = 0; i < d->tracks; i++){ - QString n; + TQString n; d->templateTitles.append( i18n("Track %1").arg(n.sprintf("%02d", i + 1))); } return; @@ -1070,28 +1070,28 @@ void AudioCDProtocol::generateTemplateTitles() // Then generate the templates d->templateTitles.clear(); for (uint i = 0; i < d->tracks; i++) { - QMap<QString, QString> macros; + TQMap<TQString, TQString> macros; macros["albumartist"] = info.artist; macros["albumtitle"] = info.title; macros["title"] = (info.trackInfoList[i].title); - QString n; + TQString n; macros["number"] = n.sprintf("%02d", i + 1); - //macros["number"] = QString("%1").arg(i+1, 2, 10); + //macros["number"] = TQString("%1").arg(i+1, 2, 10); macros["genre"] = info.genre; - macros["year"] = QString::number(info.year); + macros["year"] = TQString::number(info.year); - QString title = KMacroExpander::expandMacros(d->fileNameTemplate, macros, '%').replace('/', QFL1("%2F")); - title.replace( QRegExp(d->rsearch), d->rreplace ); + TQString title = KMacroExpander::expandMacros(d->fileNameTemplate, macros, '%').replace('/', QFL1("%2F")); + title.replace( TQRegExp(d->rsearch), d->rreplace ); d->templateTitles.append(title); } - QMap<QString, QString> macros; + TQMap<TQString, TQString> macros; macros["albumartist"] = info.artist; macros["albumtitle"] = info.title; macros["genre"] = info.genre; - macros["year"] = QString::number(info.year); + macros["year"] = TQString::number(info.year); d->templateAlbumName = KMacroExpander::expandMacros(d->albumTemplate, macros, '%').replace('/', QFL1("%2F")); - d->templateAlbumName.replace( QRegExp(d->rsearch), d->rreplace ); + d->templateAlbumName.replace( TQRegExp(d->rsearch), d->rreplace ); } /** diff --git a/kioslave/audiocd/audiocd.h b/kioslave/audiocd/audiocd.h index c2ebdda7..45271b16 100644 --- a/kioslave/audiocd/audiocd.h +++ b/kioslave/audiocd/audiocd.h @@ -42,7 +42,7 @@ class AudioCDProtocol : public KIO::SlaveBase { public: - AudioCDProtocol(const QCString & protocol, const QCString & pool, const QCString & app); + AudioCDProtocol(const TQCString & protocol, const TQCString & pool, const TQCString & app); virtual ~AudioCDProtocol(); virtual void get(const KURL &); @@ -50,8 +50,8 @@ class AudioCDProtocol : public KIO::SlaveBase virtual void listDir(const KURL &); protected: - AudioCDEncoder *encoderFromExtension(const QString& extension); - AudioCDEncoder *determineEncoder(const QString & filename); + AudioCDEncoder *encoderFromExtension(const TQString& extension); + AudioCDEncoder *determineEncoder(const TQString & filename); struct cdrom_drive *findDrive(bool &noPermission); void parseURLArgs(const KURL &); @@ -82,7 +82,7 @@ class AudioCDProtocol : public KIO::SlaveBase long firstSector, long lastSector, AudioCDEncoder* encoder, - const QString& fileName, + const TQString& fileName, unsigned long size ); @@ -101,7 +101,7 @@ class AudioCDProtocol : public KIO::SlaveBase * so NO NEED to wrap your calls with #ifdef for lame or vorbis. * this function will do the right thing. */ - void addEntry(const QString& trackTitle, AudioCDEncoder *encoder, + void addEntry(const TQString& trackTitle, AudioCDEncoder *encoder, struct cdrom_drive * drive, int trackNo); class Private; @@ -111,7 +111,7 @@ private: void generateTemplateTitles(); - QPtrList<AudioCDEncoder> encoders; + TQPtrList<AudioCDEncoder> encoders; cdrom_drive * getDrive(); // These are the only garenteed encoders to be built, the rest diff --git a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp index 7c952726..87614806 100644 --- a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp +++ b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp @@ -20,39 +20,39 @@ #include <klineedit.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qslider.h> -#include <qtabwidget.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqslider.h> +#include <tqtabwidget.h> #include <kaboutdata.h> #include <knuminput.h> -#include <qregexp.h> -#include <qlabel.h> +#include <tqregexp.h> +#include <tqlabel.h> #include <audiocdencoder.h> #include "kcmaudiocd.moc" #include <kconfigdialogmanager.h> -KAudiocdModule::KAudiocdModule(QWidget *parent, const char *name) +KAudiocdModule::KAudiocdModule(TQWidget *parent, const char *name) : AudiocdConfig(parent, name), configChanged(false) { - QString foo = i18n("Report errors found on the cd."); + TQString foo = i18n("Report errors found on the cd."); setButtons(Default|Apply); config = new KConfig("kcmaudiocdrc"); - QPtrList<AudioCDEncoder> encoders; + TQPtrList<AudioCDEncoder> encoders; AudioCDEncoder::findAllPlugins(0, encoders); AudioCDEncoder *encoder; for ( encoder = encoders.first(); encoder; encoder = encoders.next() ){ if (encoder->init()) { KConfigSkeleton *config = NULL; - QWidget *widget = encoder->getConfigureWidget(&config); + TQWidget *widget = encoder->getConfigureWidget(&config); if(widget && config){ tabWidget->addTab(widget, i18n("%1 Encoder").arg(encoder->type())); - KConfigDialogManager *configManager = new KConfigDialogManager(widget, config, QString(encoder->type()+" EncoderConfigManager").latin1()); + KConfigDialogManager *configManager = new KConfigDialogManager(widget, config, TQString(encoder->type()+" EncoderConfigManager").latin1()); encoderSettings.append(configManager); } } @@ -62,25 +62,25 @@ KAudiocdModule::KAudiocdModule(QWidget *parent, const char *name) KConfigDialogManager *widget; for ( widget = encoderSettings.first(); widget; widget = encoderSettings.next() ){ - connect(widget, SIGNAL(widgetModified()), this, SLOT(slotModuleChanged())); + connect(widget, TQT_SIGNAL(widgetModified()), this, TQT_SLOT(slotModuleChanged())); } //CDDA Options - connect(cd_specify_device,SIGNAL(clicked()),this,SLOT(slotConfigChanged())); - connect(ec_enable_check,SIGNAL(clicked()),this,SLOT(slotEcEnable())); - connect(ec_skip_check,SIGNAL(clicked()),SLOT(slotConfigChanged())); - connect(cd_device_string,SIGNAL(textChanged(const QString &)),SLOT(slotConfigChanged())); - connect(niceLevel,SIGNAL(valueChanged(int)),SLOT(slotConfigChanged())); + connect(cd_specify_device,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotConfigChanged())); + connect(ec_enable_check,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotEcEnable())); + connect(ec_skip_check,TQT_SIGNAL(clicked()),TQT_SLOT(slotConfigChanged())); + connect(cd_device_string,TQT_SIGNAL(textChanged(const TQString &)),TQT_SLOT(slotConfigChanged())); + connect(niceLevel,TQT_SIGNAL(valueChanged(int)),TQT_SLOT(slotConfigChanged())); // File Name - connect(fileNameLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotConfigChanged())); - connect(albumNameLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotConfigChanged())); - connect( kcfg_replaceInput, SIGNAL( textChanged(const QString&) ), this, SLOT( updateExample() ) ); - connect( kcfg_replaceOutput, SIGNAL( textChanged(const QString&) ), this, SLOT( updateExample() ) ); - connect( example, SIGNAL( textChanged(const QString&) ), this, SLOT( updateExample() ) ); - connect( kcfg_replaceInput, SIGNAL( textChanged(const QString&) ), this, SLOT( slotConfigChanged() ) ); - connect( kcfg_replaceOutput, SIGNAL( textChanged(const QString&) ), this, SLOT( slotConfigChanged() ) ); - connect( example, SIGNAL( textChanged(const QString&) ), this, SLOT( slotConfigChanged() ) ); + connect(fileNameLineEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotConfigChanged())); + connect(albumNameLineEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotConfigChanged())); + connect( kcfg_replaceInput, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( updateExample() ) ); + connect( kcfg_replaceOutput, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( updateExample() ) ); + connect( example, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( updateExample() ) ); + connect( kcfg_replaceInput, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slotConfigChanged() ) ); + connect( kcfg_replaceOutput, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slotConfigChanged() ) ); + connect( example, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slotConfigChanged() ) ); KAboutData *about = new KAboutData(I18N_NOOP("kcmaudiocd"), I18N_NOOP("KDE Audio CD IO Slave"), @@ -97,10 +97,10 @@ KAudiocdModule::~KAudiocdModule() delete config; } -QString removeQoutes(const QString& text) +TQString removeQoutes(const TQString& text) { - QString deqoutedString=text; - QRegExp qoutedStringRegExp("^\".*\"$"); + TQString deqoutedString=text; + TQRegExp qoutedStringRegExp("^\".*\"$"); if (qoutedStringRegExp.exactMatch(text)) { deqoutedString=text.mid(1, text.length()-2); @@ -108,10 +108,10 @@ QString removeQoutes(const QString& text) return deqoutedString; } -bool needsQoutes(const QString& text) +bool needsQoutes(const TQString& text) { - QRegExp spaceAtTheBeginning("^\\s+.*$"); - QRegExp spaceAtTheEnd("^.*\\s+$"); + TQRegExp spaceAtTheBeginning("^\\s+.*$"); + TQRegExp spaceAtTheEnd("^.*\\s+$"); return (spaceAtTheBeginning.exactMatch(text) || spaceAtTheEnd.exactMatch(text)); @@ -119,11 +119,11 @@ bool needsQoutes(const QString& text) void KAudiocdModule::updateExample() { - QString text = example->text(); - QString deqoutedReplaceInput=removeQoutes(kcfg_replaceInput->text()); - QString deqoutedReplaceOutput=removeQoutes(kcfg_replaceOutput->text()); + TQString text = example->text(); + TQString deqoutedReplaceInput=removeQoutes(kcfg_replaceInput->text()); + TQString deqoutedReplaceOutput=removeQoutes(kcfg_replaceOutput->text()); - text.replace( QRegExp(deqoutedReplaceInput), deqoutedReplaceOutput ); + text.replace( TQRegExp(deqoutedReplaceInput), deqoutedReplaceOutput ); exampleOutput->setText(text); } @@ -154,15 +154,15 @@ void KAudiocdModule::save() { config->writeEntry("album_name_template", albumNameLineEdit->text()); config->writeEntry("regexp_example", example->text()); // save qouted if required - QString replaceInput=kcfg_replaceInput->text(); - QString replaceOutput=kcfg_replaceOutput->text(); + TQString replaceInput=kcfg_replaceInput->text(); + TQString replaceOutput=kcfg_replaceOutput->text(); if (needsQoutes(replaceInput)) { - replaceInput=QString("\"")+replaceInput+QString("\""); + replaceInput=TQString("\"")+replaceInput+TQString("\""); } if (needsQoutes(replaceOutput)) { - replaceOutput=QString("\"")+replaceOutput+QString("\""); + replaceOutput=TQString("\"")+replaceOutput+TQString("\""); } config->writeEntry("regexp_search", replaceInput); config->writeEntry("regexp_replace", replaceOutput); @@ -246,7 +246,7 @@ void KAudiocdModule::slotEcEnable() { slotConfigChanged(); } -QString KAudiocdModule::quickHelp() const +TQString KAudiocdModule::quickHelp() const { return i18n("<h1>Audio CDs</h1> The Audio CD IO-Slave enables you to easily" " create wav, MP3 or Ogg Vorbis files from your audio CD-ROMs or DVDs." @@ -259,7 +259,7 @@ QString KAudiocdModule::quickHelp() const extern "C" { - KCModule *create_audiocd(QWidget *parent, const char */*name*/) + KCModule *create_audiocd(TQWidget *parent, const char */*name*/) { return new KAudiocdModule(parent, "kcmaudiocd"); } diff --git a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h index c0d9a65e..4d51134d 100644 --- a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h +++ b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h @@ -35,10 +35,10 @@ class KAudiocdModule : public AudiocdConfig public: - KAudiocdModule(QWidget *parent=0, const char *name=0); + KAudiocdModule(TQWidget *parent=0, const char *name=0); ~KAudiocdModule(); - QString quickHelp() const; + TQString quickHelp() const; public slots: void defaults(); @@ -58,7 +58,7 @@ private: int getBitrateIndex(int value); - QPtrList<KConfigDialogManager> encoderSettings; + TQPtrList<KConfigDialogManager> encoderSettings; }; #endif // KAUDIOCDCONFIG_H 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: |