diff options
Diffstat (limited to 'src/convert.cpp')
-rwxr-xr-x | src/convert.cpp | 476 |
1 files changed, 238 insertions, 238 deletions
diff --git a/src/convert.cpp b/src/convert.cpp index ce435ab..6b274e3 100755 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -22,8 +22,8 @@ //#include <kprocess.h> #include <kstandarddirs.h> -#include <qfile.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqtimer.h> ConvertItem::ConvertItem() { @@ -47,26 +47,26 @@ Convert::Convert( Config* _config, TagEngine* _tagEngine, CDManager* _cdManager, tagEngine = _tagEngine; cdManager = _cdManager; fileList = _fileList; - connect( fileList, SIGNAL(convertItem(FileListItem*)), - this, SLOT(add(FileListItem*)) + connect( fileList, TQT_SIGNAL(convertItem(FileListItem*)), + this, TQT_SLOT(add(FileListItem*)) ); - connect( fileList, SIGNAL(stopItem(FileListItem*)), - this, SLOT(stop(FileListItem*)) + connect( fileList, TQT_SIGNAL(stopItem(FileListItem*)), + this, TQT_SLOT(stop(FileListItem*)) ); - connect( this, SIGNAL(finished(FileListItem*,int)), - fileList, SLOT(itemFinished(FileListItem*,int)) + connect( this, TQT_SIGNAL(finished(FileListItem*,int)), + fileList, TQT_SLOT(itemFinished(FileListItem*,int)) ); - connect( this, SIGNAL(rippingFinished(const QString&)), - fileList, SLOT(rippingFinished(const QString&)) + connect( this, TQT_SIGNAL(rippingFinished(const TQString&)), + fileList, TQT_SLOT(rippingFinished(const TQString&)) ); logger = _logger; - connect( this, SIGNAL(finishedProcess(int,int)), - logger, SLOT(processCompleted(int,int)) + connect( this, TQT_SIGNAL(finishedProcess(int,int)), + logger, TQT_SLOT(processCompleted(int,int)) ); - tUpdateProgressIndicator = new QTimer( this, "tUpdateProgressIndicator" ); - connect( tUpdateProgressIndicator, SIGNAL(timeout()), - this, SLOT(updateProgressIndicator()) + tUpdateProgressIndicator = new TQTimer( this, "tUpdateProgressIndicator" ); + connect( tUpdateProgressIndicator, TQT_SIGNAL(timeout()), + this, TQT_SLOT(updateProgressIndicator()) ); } @@ -85,7 +85,7 @@ void Convert::get( ConvertItem* item ) item->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting file")+"... 00 %" ); - KURL source( item->fileListItem->options.filePathName.replace("?","%3f") ); + KURL source( item->fileListItem->options.filePathName.tqreplace("?","%3f") ); KURL destination( item->tempInFile->name() ); if( source.isLocalFile() && destination.isLocalFile() ) { @@ -102,11 +102,11 @@ void Convert::get( ConvertItem* item ) } else { item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, true, false, false ); - connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)), - this, SLOT(moveProgress(KIO::Job*,unsigned long)) + connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), + this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long)) ); - connect( item->moveJob, SIGNAL(result(KIO::Job*)), - this, SLOT(moveFinished(KIO::Job*)) + connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(moveFinished(KIO::Job*)) ); } } @@ -117,7 +117,7 @@ void Convert::getCorrection( ConvertItem* item ) item->state = ConvertItem::get_correction; // calculate the name of the correction input file - QFile file( OutputDirectory::changeExtension(item->fileListItem->options.filePathName,item->correctionInputExtension) ); + TQFile file( OutputDirectory::changeExtension(item->fileListItem->options.filePathName,item->correctionInputExtension) ); if( !file.exists() ) { logger->log( item->logID, " " + i18n("Aborting, file does not exist") + " (" + file.name() + ")" ); executeNextStep( item ); @@ -143,11 +143,11 @@ void Convert::getCorrection( ConvertItem* item ) } else { item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, true, false, false ); - connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)), - this, SLOT(moveProgress(KIO::Job*,unsigned long)) + connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), + this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long)) ); - connect( item->moveJob, SIGNAL(result(KIO::Job*)), - this, SLOT(moveFinished(KIO::Job*)) + connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(moveFinished(KIO::Job*)) ); } } @@ -158,15 +158,15 @@ void Convert::rip( ConvertItem* item ) item->state = ConvertItem::rip; /** kaudiocreator - QString wavFile; - QString args = job->device; + TQString wavFile; + TQString args = job->device; if(!args.isEmpty()) - args = QString("?device=%1").arg(args); + args = TQString("?device=%1").tqarg(args); args = args+"&fileNameTemplate=Track %{number}"; if(job->track < 10) - wavFile = QString("audiocd:/Wav/Track 0%1.wav%2").arg(job->track).arg(args); + wavFile = TQString("audiocd:/Wav/Track 0%1.wav%2").tqarg(job->track).tqarg(args); else - wavFile = QString("audiocd:/Wav/Track %1.wav%2").arg(job->track).arg(args); + wavFile = TQString("audiocd:/Wav/Track %1.wav%2").tqarg(job->track).tqarg(args); */ RipperPlugin* plugin = config->getCurrentRipper(); @@ -174,7 +174,7 @@ void Convert::rip( ConvertItem* item ) if( plugin == 0 ) { // NOTE process devices like '/dev/cdrom' - seems to be done // TODO implement process priority (nice level) - QString src; + TQString src; if( item->fileListItem->track != 0 ) { // TODO does it work with cds with less than 10 tracks? src.sprintf( "audiocd:/Wav/Track %02i.wav?device=" + item->fileListItem->device + "&fileNameTemplate=Track %%{number}", item->fileListItem->track ); @@ -191,21 +191,21 @@ void Convert::rip( ConvertItem* item ) item->fileListItem->ripping = true; item->moveJob = new KIO::FileCopyJob( source, dest, -1, false, true, false, false ); - connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)), - this, SLOT(moveProgress(KIO::Job*,unsigned long)) + connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), + this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long)) ); - connect( item->moveJob, SIGNAL(result(KIO::Job*)), - this, SLOT(moveFinished(KIO::Job*)) + connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(moveFinished(KIO::Job*)) ); } else { - QStringList params; - QString param, paramSplinter; + TQStringList params; + TQString param, paramSplinter; item->convertProcess->clearArguments(); - param = QString::null; + param = TQString(); if( plugin->rip.param ) param.append( " " + plugin->rip.param ); if( plugin->rip.device ) param.append( " " + plugin->rip.device ); if( plugin->rip.overwrite ) param.append( " " + plugin->rip.overwrite ); @@ -219,37 +219,37 @@ void Convert::rip( ConvertItem* item ) item->track = 0; } -// if( plugin->rip.out_file.find("%p") != -1 ) { -// QString t_str = plugin->rip.out_file; -// t_str.replace( "%p", param ); +// if( plugin->rip.out_file.tqfind("%p") != -1 ) { +// TQString t_str = plugin->rip.out_file; +// t_str.tqreplace( "%p", param ); // param = plugin->rip.bin + " " + t_str; // } // else { // param = plugin->rip.bin + param + " " + plugin->rip.out_file; // } - QString t_str = plugin->rip.out_file; - t_str.replace( "%p", param ); + TQString t_str = plugin->rip.out_file; + t_str.tqreplace( "%p", param ); param = config->binaries[plugin->rip.bin] + " " + t_str; param.simplifyWhiteSpace(); - params = QStringList::split( ' ', param ); + params = TQStringList::split( ' ', param ); - for( QStringList::Iterator it = params.begin(); it != params.end(); ++it ) + for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it ) { paramSplinter = *it; - paramSplinter.replace( "%d", item->fileListItem->device ); - paramSplinter.replace( "%t", QString().sprintf("%i",item->fileListItem->track) ); - paramSplinter.replace( "%n", QString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) ); - paramSplinter.replace( "%o", item->tempWavFile->name() ); + paramSplinter.tqreplace( "%d", item->fileListItem->device ); + paramSplinter.tqreplace( "%t", TQString().sprintf("%i",item->fileListItem->track) ); + paramSplinter.tqreplace( "%n", TQString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) ); + paramSplinter.tqreplace( "%o", item->tempWavFile->name() ); *(item->convertProcess) << paramSplinter; } - param.replace( "%d", item->fileListItem->device ); - param.replace( "%t", QString().sprintf("%i",item->fileListItem->track) ); - param.replace( "%n", QString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) ); - param.replace( "%o", "\""+item->tempWavFile->name()+"\"" ); + param.tqreplace( "%d", item->fileListItem->device ); + param.tqreplace( "%t", TQString().sprintf("%i",item->fileListItem->track) ); + param.tqreplace( "%n", TQString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) ); + param.tqreplace( "%o", "\""+item->tempWavFile->name()+"\"" ); logger->log( item->logID, param ); //kdDebug() << " Executing: `" << param << "'" << endl; @@ -270,8 +270,8 @@ void Convert::decode( ConvertItem* item ) logger->log( item->logID, i18n("Decoding") ); item->state = ConvertItem::decode; - QStringList params; - QString param, paramSplinter; + TQStringList params; + TQString param, paramSplinter; item->convertProcess->clearArguments(); @@ -285,24 +285,24 @@ void Convert::decode( ConvertItem* item ) if( !plugin->dec.param.isEmpty() ) param.append( " " + plugin->dec.param ); if( !plugin->dec.overwrite.isEmpty() ) param.append( " " + plugin->dec.overwrite ); - QString t_str = plugin->dec.in_out_files; - t_str.replace( "%p", param ); + TQString t_str = plugin->dec.in_out_files; + t_str.tqreplace( "%p", param ); param = config->binaries[plugin->dec.bin] + " " + t_str; param = param.simplifyWhiteSpace(); - params = QStringList::split( ' ', param ); + params = TQStringList::split( ' ', param ); - for( QStringList::Iterator it = params.begin(); it != params.end(); ++it ) + for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it ) { paramSplinter = *it; - paramSplinter.replace( "%i", item->tempInFile->name() ); - paramSplinter.replace( "%o", item->tempWavFile->name() ); + paramSplinter.tqreplace( "%i", item->tempInFile->name() ); + paramSplinter.tqreplace( "%o", item->tempWavFile->name() ); *(item->convertProcess) << paramSplinter; } - param.replace( "%i", "\""+item->tempInFile->name()+"\"" ); - param.replace( "%o", "\""+item->tempWavFile->name()+"\"" ); + param.tqreplace( "%i", "\""+item->tempInFile->name()+"\"" ); + param.tqreplace( "%o", "\""+item->tempWavFile->name()+"\"" ); //item->log = param; logger->log( item->logID, param ); @@ -321,12 +321,12 @@ void Convert::encode( ConvertItem* item ) { // TODO test quality profiles (never done) - QString sStrength; - QString sBitrate; - QString sQuality; - QString sMinBitrate; - QString sMaxBitrate; - QString sSamplingRate; + TQString sStrength; + TQString sBitrate; + TQString sQuality; + TQString sMinBitrate; + TQString sMaxBitrate; + TQString sSamplingRate; int t_int; float t_float; @@ -334,8 +334,8 @@ void Convert::encode( ConvertItem* item ) logger->log( item->logID, i18n("Encoding") ); item->state = ConvertItem::encode; - QStringList params; - QString param, paramSplinter; + TQStringList params; + TQString param, paramSplinter; item->convertProcess->clearArguments(); @@ -366,20 +366,20 @@ void Convert::encode( ConvertItem* item ) if( plugin->enc.strength.profiles.empty() ) { if( plugin->enc.strength.step < 1 ) { if( plugin->enc.strength.range_max >= plugin->enc.strength.range_min ) - sStrength = QString::number( compressionLevel * plugin->enc.strength.step ); + sStrength = TQString::number( compressionLevel * plugin->enc.strength.step ); else - sStrength = QString::number( plugin->enc.strength.range_min - compressionLevel * plugin->enc.strength.step ); + sStrength = TQString::number( plugin->enc.strength.range_min - compressionLevel * plugin->enc.strength.step ); } else { if( plugin->enc.strength.range_max >= plugin->enc.strength.range_min ) - sStrength = QString::number( int(compressionLevel * plugin->enc.strength.step) ); + sStrength = TQString::number( int(compressionLevel * plugin->enc.strength.step) ); else - sStrength = QString::number( int(plugin->enc.strength.range_min - compressionLevel * plugin->enc.strength.step) ); + sStrength = TQString::number( int(plugin->enc.strength.range_min - compressionLevel * plugin->enc.strength.step) ); } - if( plugin->enc.strength.separator != '.' ) sStrength.replace( QChar('.'), plugin->enc.strength.separator ); + if( plugin->enc.strength.separator != '.' ) sStrength.tqreplace( TQChar('.'), plugin->enc.strength.separator ); } else { - QStringList::Iterator it = plugin->enc.strength.profiles.at( compressionLevel ); + TQStringList::Iterator it = plugin->enc.strength.profiles.at( compressionLevel ); sStrength = *it; } } @@ -387,16 +387,16 @@ void Convert::encode( ConvertItem* item ) if( item->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") ) { if( item->fileListItem->options.encodingOptions.sBitrateMode == "cbr" && plugin->enc.lossy.bitrate.cbr.enabled ) { param.append( " " + plugin->enc.lossy.bitrate.cbr.param ); - sBitrate = QString::number( item->fileListItem->options.encodingOptions.iQuality ); + sBitrate = TQString::number( item->fileListItem->options.encodingOptions.iQuality ); } else if( item->fileListItem->options.encodingOptions.sBitrateMode == "abr" && plugin->enc.lossy.bitrate.abr.enabled ) { param.append( " " + plugin->enc.lossy.bitrate.abr.param ); - sBitrate = QString::number( item->fileListItem->options.encodingOptions.iQuality ); + sBitrate = TQString::number( item->fileListItem->options.encodingOptions.iQuality ); if( item->fileListItem->options.encodingOptions.bBitrateRange && plugin->enc.lossy.bitrate.abr.bitrate_range.enabled ) { param.append( " " + plugin->enc.lossy.bitrate.abr.bitrate_range.param_min ); - sMinBitrate = QString::number( item->fileListItem->options.encodingOptions.iMinBitrate ); + sMinBitrate = TQString::number( item->fileListItem->options.encodingOptions.iMinBitrate ); param.append( " " + plugin->enc.lossy.bitrate.abr.bitrate_range.param_max ); - sMaxBitrate = QString::number( item->fileListItem->options.encodingOptions.iMaxBitrate ); + sMaxBitrate = TQString::number( item->fileListItem->options.encodingOptions.iMaxBitrate ); } } } @@ -409,8 +409,8 @@ void Convert::encode( ConvertItem* item ) else t_float = ( (100.0f - (float)item->fileListItem->options.encodingOptions.iQuality) * ( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100 ) + plugin->enc.lossy.quality.range_max; //t_float -= t_float%plugin->enc.quality.step; - //sQuality = QString().sprintf( "%.2f", t_float ); - sQuality = QString::number( t_float ); + //sQuality = TQString().sprintf( "%.2f", t_float ); + sQuality = TQString::number( t_float ); } else { if( plugin->enc.lossy.quality.range_max >= plugin->enc.lossy.quality.range_min) @@ -418,13 +418,13 @@ void Convert::encode( ConvertItem* item ) else t_int = ( (100 - item->fileListItem->options.encodingOptions.iQuality) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max; //t_int -= t_int%plugin->enc.quality.step; - sQuality = QString::number( t_int ); + sQuality = TQString::number( t_int ); } - if( plugin->enc.bin == "oggenc" ) sQuality.replace(QChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges - else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.replace(QChar('.'),plugin->enc.lossy.quality.separator); + if( plugin->enc.bin == "oggenc" ) sQuality.tqreplace(TQChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges + else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.tqreplace(TQChar('.'),plugin->enc.lossy.quality.separator); } else { - QStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( rint(item->fileListItem->options.encodingOptions.iQuality*plugin->enc.lossy.quality.range_max/100) ); + TQStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( rint(item->fileListItem->options.encodingOptions.iQuality*plugin->enc.lossy.quality.range_max/100) ); sQuality = *it; } } @@ -433,16 +433,16 @@ void Convert::encode( ConvertItem* item ) } else if( item->fileListItem->options.encodingOptions.sQualityMode == i18n("Hybrid") && plugin->enc.hybrid.enabled ) { param.append( " " + plugin->enc.hybrid.param ); - sBitrate = QString::number( item->fileListItem->options.encodingOptions.iQuality ); + sBitrate = TQString::number( item->fileListItem->options.encodingOptions.iQuality ); } if( item->fileListItem->options.encodingOptions.samplingRate.bEnabled && plugin->enc.lossy.samplingrate.enabled ) { param.append( " " + plugin->enc.lossy.samplingrate.param ); if( plugin->enc.lossy.samplingrate.unit == PluginLoaderBase::Hz ) { - sSamplingRate = QString::number( item->fileListItem->options.encodingOptions.samplingRate.iSamplingRate ); + sSamplingRate = TQString::number( item->fileListItem->options.encodingOptions.samplingRate.iSamplingRate ); } else { - sSamplingRate = QString::number( (float)item->fileListItem->options.encodingOptions.samplingRate.iSamplingRate/1000 ); + sSamplingRate = TQString::number( (float)item->fileListItem->options.encodingOptions.samplingRate.iSamplingRate/1000 ); } } @@ -485,64 +485,64 @@ void Convert::encode( ConvertItem* item ) if( !plugin->enc.tag.year.isEmpty() && item->fileListItem->tags->year != 0 ) param.append( " " + plugin->enc.tag.year ); } - QString sInOutFiles = item->fileListItem->options.encodingOptions.sInOutFiles; - param = sInOutFiles.replace( "%p", param ); + TQString sInOutFiles = item->fileListItem->options.encodingOptions.sInOutFiles; + param = sInOutFiles.tqreplace( "%p", param ); // cosmetic surgery param = param.simplifyWhiteSpace(); - params = QStringList::split( ' ', param ); + params = TQStringList::split( ' ', param ); - QString inputFile; + TQString inputFile; if( item->mode & ConvertItem::decode || item->mode & ConvertItem::rip ) inputFile = item->tempWavFile->name(); else inputFile = item->tempInFile->name(); - for( QStringList::Iterator it = params.begin(); it != params.end(); ++it ) + for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it ) { paramSplinter = *it; - paramSplinter.replace( "%i", inputFile ); - paramSplinter.replace( "%o", item->tempOutFile->name() ); - paramSplinter.replace( "%c", sStrength ); - paramSplinter.replace( "%b", sBitrate ); - paramSplinter.replace( "%q", sQuality ); - paramSplinter.replace( "%m", sMinBitrate ); - paramSplinter.replace( "%M", sMaxBitrate ); - paramSplinter.replace( "%s", sSamplingRate ); + paramSplinter.tqreplace( "%i", inputFile ); + paramSplinter.tqreplace( "%o", item->tempOutFile->name() ); + paramSplinter.tqreplace( "%c", sStrength ); + paramSplinter.tqreplace( "%b", sBitrate ); + paramSplinter.tqreplace( "%q", sQuality ); + paramSplinter.tqreplace( "%m", sMinBitrate ); + paramSplinter.tqreplace( "%M", sMaxBitrate ); + paramSplinter.tqreplace( "%s", sSamplingRate ); if( item->fileListItem->tags ) { - paramSplinter.replace( "%ta", ( item->fileListItem->tags->artist != "" ) ? item->fileListItem->tags->artist : i18n("Unknown") ); - paramSplinter.replace( "%tb", ( item->fileListItem->tags->album != "" ) ? item->fileListItem->tags->album : i18n("Unknown") ); - paramSplinter.replace( "%tc", ( item->fileListItem->tags->comment != "" ) ? item->fileListItem->tags->comment : i18n("Unknown") ); - paramSplinter.replace( "%td", ( QString::number(item->fileListItem->tags->disc) != "" ) ? QString::number(item->fileListItem->tags->disc) : "0" ); - paramSplinter.replace( "%tg", ( item->fileListItem->tags->genre != "" ) ? item->fileListItem->tags->genre : i18n("Unknown") ); - paramSplinter.replace( "%tn", ( QString::number(item->fileListItem->tags->track) != "" ) ? QString::number(item->fileListItem->tags->track) : "0" ); - paramSplinter.replace( "%tp", ( item->fileListItem->tags->composer != "" ) ? item->fileListItem->tags->composer : i18n("Unknown") ); - paramSplinter.replace( "%tt", ( item->fileListItem->tags->title != "" ) ? item->fileListItem->tags->title : i18n("Unknown") ); - paramSplinter.replace( "%ty", ( QString::number(item->fileListItem->tags->year) != "" ) ? QString::number(item->fileListItem->tags->year) : "0" ); + paramSplinter.tqreplace( "%ta", ( item->fileListItem->tags->artist != "" ) ? item->fileListItem->tags->artist : i18n("Unknown") ); + paramSplinter.tqreplace( "%tb", ( item->fileListItem->tags->album != "" ) ? item->fileListItem->tags->album : i18n("Unknown") ); + paramSplinter.tqreplace( "%tc", ( item->fileListItem->tags->comment != "" ) ? item->fileListItem->tags->comment : i18n("Unknown") ); + paramSplinter.tqreplace( "%td", ( TQString::number(item->fileListItem->tags->disc) != "" ) ? TQString::number(item->fileListItem->tags->disc) : "0" ); + paramSplinter.tqreplace( "%tg", ( item->fileListItem->tags->genre != "" ) ? item->fileListItem->tags->genre : i18n("Unknown") ); + paramSplinter.tqreplace( "%tn", ( TQString::number(item->fileListItem->tags->track) != "" ) ? TQString::number(item->fileListItem->tags->track) : "0" ); + paramSplinter.tqreplace( "%tp", ( item->fileListItem->tags->composer != "" ) ? item->fileListItem->tags->composer : i18n("Unknown") ); + paramSplinter.tqreplace( "%tt", ( item->fileListItem->tags->title != "" ) ? item->fileListItem->tags->title : i18n("Unknown") ); + paramSplinter.tqreplace( "%ty", ( TQString::number(item->fileListItem->tags->year) != "" ) ? TQString::number(item->fileListItem->tags->year) : "0" ); } if( paramSplinter != "" && paramSplinter != " " ) *(item->convertProcess) << paramSplinter; // NOTE fixes wavpack encoding } - param.replace( "%i", "\""+inputFile+"\"" ); - param.replace( "%o", "\""+item->tempOutFile->name()+"\"" ); - param.replace( "%c", sStrength ); - param.replace( "%b", sBitrate ); - param.replace( "%q", sQuality ); - param.replace( "%m", sMinBitrate ); - param.replace( "%M", sMaxBitrate ); - param.replace( "%s", sSamplingRate ); + param.tqreplace( "%i", "\""+inputFile+"\"" ); + param.tqreplace( "%o", "\""+item->tempOutFile->name()+"\"" ); + param.tqreplace( "%c", sStrength ); + param.tqreplace( "%b", sBitrate ); + param.tqreplace( "%q", sQuality ); + param.tqreplace( "%m", sMinBitrate ); + param.tqreplace( "%M", sMaxBitrate ); + param.tqreplace( "%s", sSamplingRate ); if( item->fileListItem->tags ) { - param.replace( "%ta", "\""+item->fileListItem->tags->artist+"\"" ); - param.replace( "%tb", "\""+item->fileListItem->tags->album+"\"" ); - param.replace( "%tc", "\""+item->fileListItem->tags->comment+"\"" ); - param.replace( "%td", QString::number(item->fileListItem->tags->disc) ); - param.replace( "%tg", "\""+item->fileListItem->tags->genre+"\"" ); - param.replace( "%tn", QString::number(item->fileListItem->tags->track) ); - param.replace( "%tp", "\""+item->fileListItem->tags->composer+"\"" ); - param.replace( "%tt", "\""+item->fileListItem->tags->title+"\"" ); - param.replace( "%ty", QString::number(item->fileListItem->tags->year) ); + param.tqreplace( "%ta", "\""+item->fileListItem->tags->artist+"\"" ); + param.tqreplace( "%tb", "\""+item->fileListItem->tags->album+"\"" ); + param.tqreplace( "%tc", "\""+item->fileListItem->tags->comment+"\"" ); + param.tqreplace( "%td", TQString::number(item->fileListItem->tags->disc) ); + param.tqreplace( "%tg", "\""+item->fileListItem->tags->genre+"\"" ); + param.tqreplace( "%tn", TQString::number(item->fileListItem->tags->track) ); + param.tqreplace( "%tp", "\""+item->fileListItem->tags->composer+"\"" ); + param.tqreplace( "%tt", "\""+item->fileListItem->tags->title+"\"" ); + param.tqreplace( "%ty", TQString::number(item->fileListItem->tags->year) ); } logger->log( item->logID, param ); @@ -611,12 +611,12 @@ void Convert::put( ConvertItem* item ) logger->log( item->logID, i18n("Moving file") ); item->state = ConvertItem::put; - QString src; + TQString src; if( item->mode & ConvertItem::encode ) src = item->tempOutFile->name(); else src = item->tempWavFile->name(); item->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving file")+"... 00 %" ); - item->outputFilePathName = OutputDirectory::makePath( OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item->fileListItem,config)) ).replace("%2f","%252f"); + item->outputFilePathName = OutputDirectory::makePath( OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item->fileListItem,config)) ).tqreplace("%2f","%252f"); KURL source( src ); KURL destination( item->outputFilePathName ); @@ -635,11 +635,11 @@ void Convert::put( ConvertItem* item ) } else { item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, false, false, false ); - connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)), - this, SLOT(moveProgress(KIO::Job*,unsigned long)) + connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), + this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long)) ); - connect( item->moveJob, SIGNAL(result(KIO::Job*)), - this, SLOT(moveFinished(KIO::Job*)) + connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(moveFinished(KIO::Job*)) ); } } @@ -649,9 +649,9 @@ void Convert::putCorrection( ConvertItem* item ) logger->log( item->logID, i18n("Moving correction file") ); item->state = ConvertItem::put_correction; - QString src = item->correctionOutFile; + TQString src = item->correctionOutFile; - QString dest = OutputDirectory::makePath( OutputDirectory::calcPath(item->fileListItem,config,item->correctionOutputExtension) ).replace("%2f","%252f"); + TQString dest = OutputDirectory::makePath( OutputDirectory::calcPath(item->fileListItem,config,item->correctionOutputExtension) ).tqreplace("%2f","%252f"); KURL source( src ); // KURL destination( dest ); @@ -674,11 +674,11 @@ void Convert::putCorrection( ConvertItem* item ) } else { item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, false, false, false ); - connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)), - this, SLOT(moveProgress(KIO::Job*,unsigned long)) + connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), + this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long)) ); - connect( item->moveJob, SIGNAL(result(KIO::Job*)), - this, SLOT(moveFinished(KIO::Job*)) + connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(moveFinished(KIO::Job*)) ); } } @@ -695,7 +695,7 @@ void Convert::executeUserScript( ConvertItem* item ) item->convertProcess->clearArguments(); - QString userscript = locate( "data", "soundkonverter/userscript.sh" ); + TQString userscript = locate( "data", "soundkonverter/userscript.sh" ); if( userscript == "" ) executeNextStep( item ); *(item->convertProcess) << userscript; @@ -833,7 +833,7 @@ void Convert::executeNextStep( ConvertItem* item ) void Convert::moveProgress( KIO::Job* job, unsigned long percent ) { // search the item list for our item - for( QValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) { + for( TQValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) { if( (*item)->moveJob == job ) { (*item)->percent = percent; } @@ -843,7 +843,7 @@ void Convert::moveProgress( KIO::Job* job, unsigned long percent ) void Convert::moveFinished( KIO::Job* job ) { // search the item list for our item - for( QValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) { + for( TQValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) { if( (*item)->moveJob == job ) { (*item)->percent = 0; @@ -888,7 +888,7 @@ void Convert::moveFinished( KIO::Job* job ) } else if( (*item)->state == ConvertItem::put ) { if( job->error() != 0 ) { - logger->log( (*item)->logID, i18n("Could not write to file: `%1'").arg(OutputDirectory::calcPath((*item)->fileListItem,config)) ); + logger->log( (*item)->logID, i18n("Could not write to file: `%1'").tqarg(OutputDirectory::calcPath((*item)->fileListItem,config)) ); emit uncountTime( (*item)->getTime ); emit uncountTime( (*item)->getCorrectionTime ); emit uncountTime( (*item)->ripTime ); @@ -929,15 +929,15 @@ void Convert::processOutput( KProcess* proc, char* data, int ) int iPercent = 0, iTime = 0, iPos = 0, iNum = 0; // search the item list for our item - for( QValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) + for( TQValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) { if( (*item)->convertProcess == proc ) { - QString log_data = data; -/* log_data.replace("\n","\\n"); - log_data.replace("\t","\\t"); - log_data.replace("\r","\\r"); - log_data.replace("\b","\\b");*/ + TQString log_data = data; +/* log_data.tqreplace("\n","\\n"); + log_data.tqreplace("\t","\\t"); + log_data.tqreplace("\r","\\r"); + log_data.tqreplace("\b","\\b");*/ logger->log( (*item)->logID, " " + i18n("Output") + ": " + log_data ); //if( (*item)->readOutputTimer.elapsed() < /*config->pauseTime*/ 100 ) return; // TODO use config value @@ -950,27 +950,27 @@ void Convert::processOutput( KProcess* proc, char* data, int ) ConvertPlugin* plugin = config->decoderForFormat( (*item)->fileListItem->mimeType ); // TODO null pointer check - QString outputPattern = plugin->dec.output; - //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins + TQString outputPattern = plugin->dec.output; + //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins - if( outputPattern.find("%p") != -1 ) { - outputPattern.replace( "%p", "%i" ); + if( outputPattern.tqfind("%p") != -1 ) { + outputPattern.tqreplace( "%p", "%i" ); sscanf( data, outputPattern, &iPercent ); } - else if( outputPattern.find("%t") != -1 ) { - outputPattern.replace( "%t", "%i" ); + else if( outputPattern.tqfind("%t") != -1 ) { + outputPattern.tqreplace( "%t", "%i" ); sscanf( data, outputPattern, &iTime ); iPercent = iTime * 100 / (*item)->fileListItem->time; } - else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) { - if( outputPattern.find("%0") < outputPattern.find("%1") ) { - outputPattern.replace( "%0", "%i" ); - outputPattern.replace( "%1", "%i" ); + else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) { + if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) { + outputPattern.tqreplace( "%0", "%i" ); + outputPattern.tqreplace( "%1", "%i" ); sscanf( data, outputPattern, &iPos, &iNum ); } else { - outputPattern.replace( "%0", "%i" ); - outputPattern.replace( "%1", "%i" ); + outputPattern.tqreplace( "%0", "%i" ); + outputPattern.tqreplace( "%1", "%i" ); sscanf( data, outputPattern, &iNum, &iPos ); } if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum; @@ -991,31 +991,31 @@ void Convert::processOutput( KProcess* proc, char* data, int ) ConvertPlugin* plugin = config->encoderForFormat( (*item)->fileListItem->options.encodingOptions.sFormat ); // TODO null pointer check - QString outputPattern; + TQString outputPattern; if( (*item)->fileListItem->options.encodingOptions.sQualityMode == i18n("Quality") ) outputPattern = plugin->enc.lossy.quality.output; else if( (*item)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*item)->fileListItem->options.encodingOptions.sBitrateMode == "cbr" ) outputPattern = plugin->enc.lossy.bitrate.cbr.output; else if( (*item)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*item)->fileListItem->options.encodingOptions.sBitrateMode == "abr" ) outputPattern = plugin->enc.lossy.bitrate.abr.output; - //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins + //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins - if( outputPattern.find("%p") != -1 ) { - outputPattern.replace( "%p", "%i" ); + if( outputPattern.tqfind("%p") != -1 ) { + outputPattern.tqreplace( "%p", "%i" ); sscanf( data, outputPattern, &iPercent ); } - else if( outputPattern.find("%t") != -1 ) { - outputPattern.replace( "%t", "%i" ); + else if( outputPattern.tqfind("%t") != -1 ) { + outputPattern.tqreplace( "%t", "%i" ); sscanf( data, outputPattern, &iTime ); iPercent = iTime * 100 / (*item)->fileListItem->time; } - else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) { - if( outputPattern.find("%0") < outputPattern.find("%1") ) { - outputPattern.replace( "%0", "%i" ); - outputPattern.replace( "%1", "%i" ); + else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) { + if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) { + outputPattern.tqreplace( "%0", "%i" ); + outputPattern.tqreplace( "%1", "%i" ); sscanf( data, outputPattern, &iPos, &iNum ); } else { - outputPattern.replace( "%0", "%i" ); - outputPattern.replace( "%1", "%i" ); + outputPattern.tqreplace( "%0", "%i" ); + outputPattern.tqreplace( "%1", "%i" ); sscanf( data, outputPattern, &iNum, &iPos ); } if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum; @@ -1035,30 +1035,30 @@ void Convert::processOutput( KProcess* proc, char* data, int ) RipperPlugin* plugin = config->getCurrentRipper(); // TODO null pointer check - QString outputPattern; + TQString outputPattern; if( (*item)->fileListItem->track != 0 ) outputPattern = plugin->rip.output; else outputPattern = plugin->rip.full_disc.output; - //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins + //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins - if( outputPattern.find("%p") != -1 || outputPattern.find("%a") != -1 ) { - outputPattern.replace( "%p", "%i" ); - outputPattern.replace( "%a", "%i" ); + if( outputPattern.tqfind("%p") != -1 || outputPattern.tqfind("%a") != -1 ) { + outputPattern.tqreplace( "%p", "%i" ); + outputPattern.tqreplace( "%a", "%i" ); sscanf( data, outputPattern, &iPercent ); } - else if( outputPattern.find("%t") != -1 ) { - outputPattern.replace( "%t", "%i" ); + else if( outputPattern.tqfind("%t") != -1 ) { + outputPattern.tqreplace( "%t", "%i" ); sscanf( data, outputPattern, &iTime ); iPercent = iTime * 100 / (*item)->fileListItem->time; } - else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) { - if( outputPattern.find("%0") < outputPattern.find("%1") ) { - outputPattern.replace( "%0", "%i" ); - outputPattern.replace( "%1", "%i" ); + else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) { + if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) { + outputPattern.tqreplace( "%0", "%i" ); + outputPattern.tqreplace( "%1", "%i" ); sscanf( data, outputPattern, &iPos, &iNum ); } else { - outputPattern.replace( "%0", "%i" ); - outputPattern.replace( "%1", "%i" ); + outputPattern.tqreplace( "%0", "%i" ); + outputPattern.tqreplace( "%1", "%i" ); sscanf( data, outputPattern, &iNum, &iPos ); } if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum; @@ -1068,7 +1068,7 @@ void Convert::processOutput( KProcess* proc, char* data, int ) { // TODO guess progress, when no signal is received (*item)->lastOutputTimer.start(); - if( (*item)->fileListItem->track == 0 && plugin->rip.full_disc.output.find("%a") != -1 ) { + if( (*item)->fileListItem->track == 0 && plugin->rip.full_disc.output.tqfind("%a") != -1 ) { if( iPercent < (*item)->lastPercent ) (*item)->track++; (*item)->lastPercent = iPercent; (*item)->percent = (*item)->track * 100 / (*item)->tracks + iPercent / (*item)->tracks; @@ -1086,7 +1086,7 @@ void Convert::processOutput( KProcess* proc, char* data, int ) void Convert::processExit( KProcess* proc ) { // search the item list for our item - for( QValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) { + for( TQValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) { // if( (*item)->convertProcess == proc && (*item)->fileListItem != 0 ) { if( (*item)->convertProcess == proc ) { @@ -1201,7 +1201,7 @@ void Convert::processExit( KProcess* proc ) } if( (*item)->state == ConvertItem::put ) { if( proc->signalled() ) { - logger->log( (*item)->logID, i18n("Could not write to file: `%1'").arg(OutputDirectory::calcPath((*item)->fileListItem,config)) ); + logger->log( (*item)->logID, i18n("Could not write to file: `%1'").tqarg(OutputDirectory::calcPath((*item)->fileListItem,config)) ); emit uncountTime( (*item)->getTime ); emit uncountTime( (*item)->getCorrectionTime ); emit uncountTime( (*item)->ripTime ); @@ -1213,7 +1213,7 @@ void Convert::processExit( KProcess* proc ) return; } if( !proc->normalExit() ) { - logger->log( (*item)->logID, i18n("Could not write to file: `%1'").arg(OutputDirectory::calcPath((*item)->fileListItem,config)) ); + logger->log( (*item)->logID, i18n("Could not write to file: `%1'").tqarg(OutputDirectory::calcPath((*item)->fileListItem,config)) ); emit uncountTime( (*item)->getTime ); emit uncountTime( (*item)->getCorrectionTime ); emit uncountTime( (*item)->ripTime ); @@ -1289,14 +1289,14 @@ void Convert::processExit( KProcess* proc ) void Convert::add( FileListItem* item ) { - logger->log( 1000, i18n("Adding new item to conversion list: `%1'").arg(item->options.filePathName) ); + logger->log( 1000, i18n("Adding new item to conversion list: `%1'").tqarg(item->options.filePathName) ); // append the item to the item list and store the iterator - QValueList<ConvertItem*>::Iterator newItem = items.append( new ConvertItem( item ) ); + TQValueList<ConvertItem*>::Iterator newItem = items.append( new ConvertItem( item ) ); // register at the logger (*newItem)->logID = logger->registerProcess( item->options.filePathName ); - logger->log( 1000, " " + i18n("Got log ID: %1").arg((*newItem)->logID) ); + logger->log( 1000, " " + i18n("Got log ID: %1").tqarg((*newItem)->logID) ); logger->log( (*newItem)->logID, "Mime Type: " + (*newItem)->fileListItem->mimeType ); if( (*newItem)->fileListItem->tags ) logger->log( (*newItem)->logID, i18n("Tags successfully read") ); @@ -1310,35 +1310,35 @@ void Convert::add( FileListItem* item ) (*newItem)->replayGain = 0; /* seems to be unnecessary - (*newItem)->correctionInFile = QString::null(); - (*newItem)->correctionOutFile = QString::null(); - (*newItem)->correctionInputExtension = QString::null(); - (*newItem)->correctionOutputExtension = QString::null();*/ + (*newItem)->correctionInFile = TQString()(); + (*newItem)->correctionOutFile = TQString()(); + (*newItem)->correctionInputExtension = TQString()(); + (*newItem)->correctionOutputExtension = TQString()();*/ // connect convertProcess of our new item with the slots of Convert (*newItem)->convertProcess = new KProcess(); - connect( (*newItem)->convertProcess, SIGNAL(receivedStdout(KProcess*,char*,int)), - this, SLOT(processOutput(KProcess*,char*,int)) + connect( (*newItem)->convertProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this, TQT_SLOT(processOutput(KProcess*,char*,int)) ); - connect( (*newItem)->convertProcess, SIGNAL(receivedStderr(KProcess*,char*,int)), - this, SLOT(processOutput(KProcess*,char*,int)) + connect( (*newItem)->convertProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + this, TQT_SLOT(processOutput(KProcess*,char*,int)) ); - connect( (*newItem)->convertProcess, SIGNAL(processExited(KProcess*)), - this, SLOT(processExit(KProcess*)) + connect( (*newItem)->convertProcess, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(processExit(KProcess*)) ); // NOTE the tempInFile is also created if the file is a audio cd track // set up the names of our temp files - (*newItem)->tempInFile = new KTempFile( QString::null, "." + item->fileFormat ); + (*newItem)->tempInFile = new KTempFile( TQString(), "." + item->fileFormat ); (*newItem)->tempInFile->setAutoDelete( true ); (*newItem)->tempInFile->close(); - (*newItem)->tempWavFile = new KTempFile( QString::null, ".wav" ); + (*newItem)->tempWavFile = new KTempFile( TQString(), ".wav" ); (*newItem)->tempWavFile->setAutoDelete( true ); (*newItem)->tempWavFile->close(); - (*newItem)->tempOutFile = new KTempFile( QString::null, "." + item->options.encodingOptions.sFormat ); + (*newItem)->tempOutFile = new KTempFile( TQString(), "." + item->options.encodingOptions.sFormat ); (*newItem)->tempOutFile->setAutoDelete( true ); (*newItem)->tempOutFile->close(); @@ -1364,7 +1364,7 @@ void Convert::add( FileListItem* item ) (*newItem)->mode = ConvertItem::Mode( (*newItem)->mode | ConvertItem::replaygain ); } - QString extension; + TQString extension; extension = config->getCorrectionExtension( item->mimeType ); if( !extension.isEmpty() ) { @@ -1432,7 +1432,7 @@ void Convert::add( FileListItem* item ) void Convert::stop( FileListItem* item ) { // search the item list for our item to stop - for( QValueList<ConvertItem*>::Iterator stopItem = items.begin(); stopItem != items.end(); stopItem++ ) { + for( TQValueList<ConvertItem*>::Iterator stopItem = items.begin(); stopItem != items.end(); stopItem++ ) { // is fileListItem pointing at the same address, as item if( (*stopItem)->fileListItem == item ) { @@ -1465,25 +1465,25 @@ void Convert::remove( ConvertItem* item, int state ) //emit uncountTime( item->getTime + item->getCorrectionTime + item->ripTime + // item->decodeTime + item->encodeTime + item->replaygainTime ); - logger->log( item->logID, i18n("Removing file from conversion list. Exit code %1").arg(state) ); + logger->log( item->logID, i18n("Removing file from conversion list. Exit code %1").tqarg(state) ); if( item->fileListItem->notify != "" ) { - QString command = item->fileListItem->notify; - command.replace( "%u", item->fileListItem->url ); - command.replace( "%i", item->fileListItem->options.filePathName.replace(" ","%20") ); - command.replace( "%o", item->outputFilePathName.replace(" ","%20") ); - logger->log( item->logID, " "+i18n("Executing command: \"%1\"").arg(command) ); + TQString command = item->fileListItem->notify; + command.tqreplace( "%u", item->fileListItem->url ); + command.tqreplace( "%i", item->fileListItem->options.filePathName.tqreplace(" ","%20") ); + command.tqreplace( "%o", item->outputFilePathName.tqreplace(" ","%20") ); + logger->log( item->logID, " "+i18n("Executing command: \"%1\"").tqarg(command) ); notify.clearArguments(); - QString paramSplinter; + TQString paramSplinter; // FIXME split correct (strings with spaces are splited by mistake) // FIXME only one command can be executed at once!? - QStringList params = QStringList::split( ' ', item->fileListItem->notify ); - for( QStringList::Iterator it = params.begin(); it != params.end(); ++it ) + TQStringList params = TQStringList::split( ' ', item->fileListItem->notify ); + for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it ) { paramSplinter = *it; - paramSplinter.replace( "%u", item->fileListItem->url ); - paramSplinter.replace( "%i", item->fileListItem->options.filePathName ); - paramSplinter.replace( "%o", item->outputFilePathName ); + paramSplinter.tqreplace( "%u", item->fileListItem->url ); + paramSplinter.tqreplace( "%i", item->fileListItem->options.filePathName ); + paramSplinter.tqreplace( "%o", item->outputFilePathName ); notify << paramSplinter; } notify.start( KProcess::DontCare ); @@ -1507,13 +1507,13 @@ void Convert::remove( ConvertItem* item, int state ) item->tempWavFile = 0; if( item->tempOutFile != 0 ) delete item->tempOutFile; item->tempOutFile = 0; - QFile file; + TQFile file; file.setName( item->correctionInFile ); if( file.exists() ) file.remove(); file.setName( item->correctionOutFile ); if( file.exists() ) file.remove(); - for( QValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) { + for( TQValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) { if( (*it) == item ) { items.remove( it ); break; @@ -1532,14 +1532,14 @@ void Convert::updateProgressIndicator() { float time = 0; - for( QValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) { + for( TQValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) { if( (*it)->state == ConvertItem::get ) { time += (*it)->getTime * (*it)->percent / 100; - (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting file")+"... "+QString().sprintf("%02i %%",(*it)->percent) ); + (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting file")+"... "+TQString().sprintf("%02i %%",(*it)->percent) ); } else if( (*it)->state == ConvertItem::get_correction ) { time += (*it)->getCorrectionTime * (*it)->percent / 100; - (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting correction file")+"... "+QString().sprintf("%02i %%",(*it)->percent) ); + (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting correction file")+"... "+TQString().sprintf("%02i %%",(*it)->percent) ); } else if( (*it)->state == ConvertItem::rip ) { RipperPlugin* plugin = config->getCurrentRipper(); @@ -1548,7 +1548,7 @@ void Convert::updateProgressIndicator() } else { time += (*it)->ripTime * (*it)->percent / 100; - (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Ripping")+"... "+QString().sprintf("%02i %%",(*it)->percent) ); + (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Ripping")+"... "+TQString().sprintf("%02i %%",(*it)->percent) ); } } else if( (*it)->state == ConvertItem::decode ) { @@ -1558,12 +1558,12 @@ void Convert::updateProgressIndicator() } else { time += (*it)->decodeTime * (*it)->percent / 100; - (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Decoding")+"... "+QString().sprintf("%02i %%",(*it)->percent) ); + (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Decoding")+"... "+TQString().sprintf("%02i %%",(*it)->percent) ); } } else if( (*it)->state == ConvertItem::encode ) { ConvertPlugin* plugin = config->encoderForFormat( (*it)->fileListItem->options.encodingOptions.sFormat ); - QString outputPattern; + TQString outputPattern; if( plugin != 0 && (*it)->fileListItem->options.encodingOptions.sQualityMode == i18n("Quality") ) outputPattern = plugin->enc.lossy.quality.output; else if( plugin != 0 && (*it)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*it)->fileListItem->options.encodingOptions.sBitrateMode == "cbr" ) outputPattern = plugin->enc.lossy.bitrate.cbr.output; else if( plugin != 0 && (*it)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*it)->fileListItem->options.encodingOptions.sBitrateMode == "abr" ) outputPattern = plugin->enc.lossy.bitrate.abr.output; @@ -1572,19 +1572,19 @@ void Convert::updateProgressIndicator() } else { time += (*it)->encodeTime * (*it)->percent / 100; - (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Encoding")+"... "+QString().sprintf("%02i %%",(*it)->percent) ); + (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Encoding")+"... "+TQString().sprintf("%02i %%",(*it)->percent) ); } } else if( (*it)->state == ConvertItem::replaygain ) { time += (*it)->replaygainTime * (*it)->percent / 100; - (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Replay Gain")+"... "+QString().sprintf("%02i %%",(*it)->percent) ); + (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Replay Gain")+"... "+TQString().sprintf("%02i %%",(*it)->percent) ); } else if( (*it)->state == ConvertItem::put ) { - (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving file")+"... "+QString().sprintf("%02i %%",(*it)->percent) ); + (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving file")+"... "+TQString().sprintf("%02i %%",(*it)->percent) ); } else if( (*it)->state == ConvertItem::put_correction ) { time += (*it)->getCorrectionTime * (*it)->percent / 100; - (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving correction file")+"... "+QString().sprintf("%02i %%",(*it)->percent) ); + (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving correction file")+"... "+TQString().sprintf("%02i %%",(*it)->percent) ); } } emit update( time ); @@ -1594,18 +1594,18 @@ void Convert::updateProgressIndicator() // { // FIXME setting a higher priority does not work // KProcess pChangePriority; // -// for( QValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) { +// for( TQValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) { // if( (*it)->convertProcess->isRunning() ) { // //(*it)->convertProcess->setPriority( priority ); // pChangePriority.clearArguments(); // pChangePriority << "renice"; -// QString prio; +// TQString prio; // prio.sprintf( "%i", priority ); // pChangePriority << prio; -// QString pid; +// TQString pid; // pid.sprintf( "%i", (*it)->convertProcess->pid() ); // pChangePriority << pid; -// //QString cmd; +// //TQString cmd; // //cmd.sprintf( "renice %i %i", ); // pChangePriority.start( KProcess::Block ); // } |