diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 23:15:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 23:15:51 +0000 |
commit | 6b1b516f42036cf9eff691dba3fd6e9eab82a7e1 (patch) | |
tree | 6830f75fd57d0fac7e33c097ee98b210e90c5239 /src/outputdirectory.cpp | |
parent | 6318b8bb3ef964cfa99ba454a2630779cc9ac3ec (diff) | |
download | soundkonverter-6b1b516f42036cf9eff691dba3fd6e9eab82a7e1.tar.gz soundkonverter-6b1b516f42036cf9eff691dba3fd6e9eab82a7e1.zip |
TQt4 port soundkonverter
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1239038 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/outputdirectory.cpp')
-rwxr-xr-x | src/outputdirectory.cpp | 308 |
1 files changed, 154 insertions, 154 deletions
diff --git a/src/outputdirectory.cpp b/src/outputdirectory.cpp index 88a5466..161c1a5 100755 --- a/src/outputdirectory.cpp +++ b/src/outputdirectory.cpp @@ -5,14 +5,14 @@ #include "tagengine.h" #include "config.h" -#include <qlayout.h> -#include <qtooltip.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqlabel.h> #include <klocale.h> #include <kiconloader.h> @@ -25,20 +25,20 @@ #include <kmountpoint.h> -OutputDirectory::OutputDirectory( Config* _config, QWidget* parent, const char* name ) - : QWidget( parent, name ) +OutputDirectory::OutputDirectory( Config* _config, TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { config = _config; // create an icon loader object for loading icons KIconLoader *iconLoader = new KIconLoader(); - QGridLayout *grid = new QGridLayout( this, 1, 1, 0, 3, "grid" ); + TQGridLayout *grid = new TQGridLayout( this, 1, 1, 0, 3, "grid" ); - QHBoxLayout *box = new QHBoxLayout( ); + TQHBoxLayout *box = new TQHBoxLayout( ); grid->addLayout( box, 0, 0 ); - QLabel *lOutput = new QLabel( i18n("Output")+":", this, "lOutput" ); + TQLabel *lOutput = new TQLabel( i18n("Output")+":", this, "lOutput" ); box->addWidget(lOutput); cMode = new KComboBox( this ); @@ -47,49 +47,49 @@ OutputDirectory::OutputDirectory( Config* _config, QWidget* parent, const char* cMode->insertItem( i18n("Source directory") ); cMode->insertItem( i18n("Specify output directory") ); cMode->insertItem( i18n("Copy directory structure") ); - //QToolTip::add( cMode, i18n("Output all converted files into...") ); + //TQToolTip::add( cMode, i18n("Output all converted files into...") ); box->addWidget( cMode ); - connect( cMode, SIGNAL(activated(int)), - this, SLOT(modeChangedSlot(int)) + connect( cMode, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(modeChangedSlot(int)) ); modeJustChanged = false; /*pModeInfo = new KToolBarButton( "messagebox_info", 1010, this, "pModeInfo" ); - QToolTip::add( pModeInfo, i18n("Information about the output mode") ); + TQToolTip::add( pModeInfo, i18n("Information about the output mode") ); box->addWidget( pModeInfo ); - connect( pModeInfo, SIGNAL(clicked()), - this, SLOT(modeInfo()) + connect( pModeInfo, TQT_SIGNAL(clicked()), + this, TQT_SLOT(modeInfo()) );*/ pClear = new KToolBarButton( "locationbar_erase", 1001, this, "pClear" ); - QToolTip::add( pClear, i18n("Clear the directory input field") ); + TQToolTip::add( pClear, i18n("Clear the directory input field") ); box->addWidget( pClear ); lDir = new KLineEdit( this, "lDir" ); box->addWidget( lDir ); - connect( lDir, SIGNAL(textChanged(const QString&)), - this, SLOT(directoryChangedSlot(const QString&)) + connect( lDir, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(directoryChangedSlot(const TQString&)) ); - connect( pClear, SIGNAL(clicked()), - lDir, SLOT(setFocus()) + connect( pClear, TQT_SIGNAL(clicked()), + lDir, TQT_SLOT(setFocus()) ); - connect( pClear, SIGNAL(clicked()), - lDir, SLOT(clear()) + connect( pClear, TQT_SIGNAL(clicked()), + lDir, TQT_SLOT(clear()) ); /*pDirInfo = new KToolBarButton( "messagebox_info", 1011, this, "pDirInfo" ); - QToolTip::add( pDirInfo, i18n("Information about the wildcards") ); + TQToolTip::add( pDirInfo, i18n("Information about the wildcards") ); box->addWidget( pDirInfo ); - connect( pDirInfo, SIGNAL(clicked()), - this, SLOT(dirInfo()) + connect( pDirInfo, TQT_SIGNAL(clicked()), + this, TQT_SLOT(dirInfo()) );*/ pDirSelect = new KToolBarButton( "folder", 1012, this, "pDirSelect" ); - QToolTip::add( pDirSelect, i18n("Choose an output directory") ); + TQToolTip::add( pDirSelect, i18n("Choose an output directory") ); box->addWidget( pDirSelect ); - connect( pDirSelect, SIGNAL(clicked()), - this, SLOT(selectDir()) + connect( pDirSelect, TQT_SIGNAL(clicked()), + this, TQT_SLOT(selectDir()) ); pDirGoto = new KToolBarButton( "konqueror", 1013, this, "pDirGoto" ); - QToolTip::add( pDirGoto, i18n("Open Konqueror with the output directory") ); + TQToolTip::add( pDirGoto, i18n("Open Konqueror with the output directory") ); box->addWidget( pDirGoto ); - connect( pDirGoto, SIGNAL(clicked()), - this, SLOT(gotoDir()) + connect( pDirGoto, TQT_SIGNAL(clicked()), + this, TQT_SLOT(gotoDir()) ); // delete the icon loader object @@ -127,29 +127,29 @@ void OutputDirectory::setMode( OutputDirectory::Mode mode ) modeChangedSlot( (int)mode ); } -QString OutputDirectory::directory() +TQString OutputDirectory::directory() { if( /*(Mode)cMode->currentItem() != Default && */(Mode)cMode->currentItem() != Source ) return lDir->text(); else return ""; } -void OutputDirectory::setDirectory( const QString& directory ) +void OutputDirectory::setDirectory( const TQString& directory ) { if( /*(Mode)cMode->currentItem() != Default && */(Mode)cMode->currentItem() != Source ) lDir->setText( directory ); } -QString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, QString extension ) +TQString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, TQString extension ) { - // TODO replace '//' by '/' ??? + // TODO tqreplace '//' by '/' ??? // FIXME test fvat names - QString path; + TQString path; if( extension.isEmpty() ) extension = fileListItem->options.encodingOptions.sFormat; // FIXME file name - QString fileName; + TQString fileName; if( fileListItem->track == -1 ) fileName = fileListItem->fileName; - else if( fileListItem->tags != 0 ) fileName = QString().sprintf("%02i",fileListItem->tags->track) + " - " + fileListItem->tags->title + "." + extension; - else fileName = "track" + QString::number(fileListItem->track) + "." + extension; // NOTE shouldn't be possible + else if( fileListItem->tags != 0 ) fileName = TQString().sprintf("%02i",fileListItem->tags->track) + " - " + fileListItem->tags->title + "." + extension; + else fileName = "track" + TQString::number(fileListItem->track) + "." + extension; // NOTE shouldn't be possible // if the user wants to change the output directory/file name per file! if( !fileListItem->options.outputFilePathName.isEmpty() ) { @@ -170,55 +170,55 @@ QString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, Q else */path = fileListItem->options.outputOptions.directory; if( path.right(1) == "/" ) path += "%f"; - else if( path.findRev(QRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}")) < path.findRev("/") ) path += "/%f"; + else if( path.tqfindRev(TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}")) < path.tqfindRev("/") ) path += "/%f"; - path.replace( "%a", "$replace_by_artist$" ); - path.replace( "%b", "$replace_by_album$" ); - path.replace( "%c", "$replace_by_comment$" ); - path.replace( "%d", "$replace_by_disc$" ); - path.replace( "%g", "$replace_by_genre$" ); - path.replace( "%n", "$replace_by_track$" ); - path.replace( "%p", "$replace_by_composer$" ); - path.replace( "%t", "$replace_by_title$" ); - path.replace( "%y", "$replace_by_year$" ); - path.replace( "%f", "$replace_by_filename$" ); + path.tqreplace( "%a", "$replace_by_artist$" ); + path.tqreplace( "%b", "$replace_by_album$" ); + path.tqreplace( "%c", "$replace_by_comment$" ); + path.tqreplace( "%d", "$replace_by_disc$" ); + path.tqreplace( "%g", "$replace_by_genre$" ); + path.tqreplace( "%n", "$replace_by_track$" ); + path.tqreplace( "%p", "$replace_by_composer$" ); + path.tqreplace( "%t", "$replace_by_title$" ); + path.tqreplace( "%y", "$replace_by_year$" ); + path.tqreplace( "%f", "$replace_by_filename$" ); - QString artist = ( fileListItem->tags == 0 || fileListItem->tags->artist.isEmpty() ) ? i18n("Unknown Artist") : fileListItem->tags->artist; -/// artist.replace("/","\\"); - path.replace( "$replace_by_artist$", KURL::encode_string(artist).replace("/","%2f") ); + TQString artist = ( fileListItem->tags == 0 || fileListItem->tags->artist.isEmpty() ) ? i18n("Unknown Artist") : fileListItem->tags->artist; +/// artist.tqreplace("/","\\"); + path.tqreplace( "$replace_by_artist$", KURL::encode_string(artist).tqreplace("/","%2f") ); - QString album = ( fileListItem->tags == 0 || fileListItem->tags->album.isEmpty() ) ? i18n("Unknown Album") : fileListItem->tags->album; -/// album.replace("/","\\"); - path.replace( "$replace_by_album$", KURL::encode_string(album).replace("/","%2f") ); + TQString album = ( fileListItem->tags == 0 || fileListItem->tags->album.isEmpty() ) ? i18n("Unknown Album") : fileListItem->tags->album; +/// album.tqreplace("/","\\"); + path.tqreplace( "$replace_by_album$", KURL::encode_string(album).tqreplace("/","%2f") ); - QString comment = ( fileListItem->tags == 0 || fileListItem->tags->comment.isEmpty() ) ? i18n("No Comment") : fileListItem->tags->comment; -/// comment.replace("/","\\"); - path.replace( "$replace_by_comment$", KURL::encode_string(comment).replace("/","%2f") ); + TQString comment = ( fileListItem->tags == 0 || fileListItem->tags->comment.isEmpty() ) ? i18n("No Comment") : fileListItem->tags->comment; +/// comment.tqreplace("/","\\"); + path.tqreplace( "$replace_by_comment$", KURL::encode_string(comment).tqreplace("/","%2f") ); - QString disc = ( fileListItem->tags == 0 ) ? "0" : QString().sprintf("%i",fileListItem->tags->disc); - path.replace( "$replace_by_disc$", disc ); + TQString disc = ( fileListItem->tags == 0 ) ? "0" : TQString().sprintf("%i",fileListItem->tags->disc); + path.tqreplace( "$replace_by_disc$", disc ); - QString genre = ( fileListItem->tags == 0 || fileListItem->tags->genre.isEmpty() ) ? i18n("Unknown Genre") : fileListItem->tags->genre; -/// genre.replace("/","\\"); - path.replace( "$replace_by_genre$", KURL::encode_string(genre).replace("/","%2f") ); + TQString genre = ( fileListItem->tags == 0 || fileListItem->tags->genre.isEmpty() ) ? i18n("Unknown Genre") : fileListItem->tags->genre; +/// genre.tqreplace("/","\\"); + path.tqreplace( "$replace_by_genre$", KURL::encode_string(genre).tqreplace("/","%2f") ); - QString track = ( fileListItem->tags == 0 ) ? "00" : QString().sprintf("%02i",fileListItem->tags->track); - path.replace( "$replace_by_track$", track ); + TQString track = ( fileListItem->tags == 0 ) ? "00" : TQString().sprintf("%02i",fileListItem->tags->track); + path.tqreplace( "$replace_by_track$", track ); - QString composer = ( fileListItem->tags == 0 || fileListItem->tags->composer.isEmpty() ) ? i18n("Unknown Composer") : fileListItem->tags->composer; -/// composer.replace("/","\\"); - path.replace( "$replace_by_composer$", KURL::encode_string(composer).replace("/","%2f") ); + TQString composer = ( fileListItem->tags == 0 || fileListItem->tags->composer.isEmpty() ) ? i18n("Unknown Composer") : fileListItem->tags->composer; +/// composer.tqreplace("/","\\"); + path.tqreplace( "$replace_by_composer$", KURL::encode_string(composer).tqreplace("/","%2f") ); - QString title = ( fileListItem->tags == 0 || fileListItem->tags->title.isEmpty() ) ? i18n("Unknown Title") : fileListItem->tags->title; -/// title.replace("/","\\"); - path.replace( "$replace_by_title$", KURL::encode_string(title).replace("/","%2f") ); + TQString title = ( fileListItem->tags == 0 || fileListItem->tags->title.isEmpty() ) ? i18n("Unknown Title") : fileListItem->tags->title; +/// title.tqreplace("/","\\"); + path.tqreplace( "$replace_by_title$", KURL::encode_string(title).tqreplace("/","%2f") ); - QString year = ( fileListItem->tags == 0 ) ? "0000" : QString().sprintf("%04i",fileListItem->tags->year); - path.replace( "$replace_by_year$", year ); + TQString year = ( fileListItem->tags == 0 ) ? "0000" : TQString().sprintf("%04i",fileListItem->tags->year); + path.tqreplace( "$replace_by_year$", year ); - QString filename = fileName.left( fileName.findRev(".") ); -/// filename.replace("/","\\"); - path.replace( "$replace_by_filename$", filename ); + TQString filename = fileName.left( fileName.tqfindRev(".") ); +/// filename.tqreplace("/","\\"); + path.tqreplace( "$replace_by_filename$", filename ); // path = uniqueFileName( path + "." + extension ); path = path + "." + extension; @@ -226,17 +226,17 @@ QString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, Q return path; } else if( fileListItem->options.outputOptions.mode == CopyStructure ) { // TODO is that correct ??? - QString basePath = fileListItem->options.outputOptions.directory; - QString originalPath = fileListItem->options.filePathName; - QString cutted; + TQString basePath = fileListItem->options.outputOptions.directory; + TQString originalPath = fileListItem->options.filePathName; + TQString cutted; while( basePath.length() > 0 ) { - if( fileListItem->options.filePathName.find(basePath) == 0 ) { - originalPath.replace( basePath, "" ); + if( fileListItem->options.filePathName.tqfind(basePath) == 0 ) { + originalPath.tqreplace( basePath, "" ); return uniqueFileName( changeExtension(basePath+cutted+originalPath,extension) ); } else { - cutted = basePath.right( basePath.length() - basePath.findRev("/") ) + cutted; - basePath = basePath.left( basePath.findRev("/") ); + cutted = basePath.right( basePath.length() - basePath.tqfindRev("/") ) + cutted; + basePath = basePath.left( basePath.tqfindRev("/") ); } } // path = uniqueFileName( changeExtension(fileListItem->options.outputOptions.directory+"/"+fileListItem->options.filePathName,extension) ); @@ -252,14 +252,14 @@ QString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, Q } } -QString OutputDirectory::changeExtension( const QString& filename, const QString& extension ) +TQString OutputDirectory::changeExtension( const TQString& filename, const TQString& extension ) { - return filename.left( filename.findRev(".") + 1 ) + extension; + return filename.left( filename.tqfindRev(".") + 1 ) + extension; } -QString OutputDirectory::uniqueFileName( const QString& filename ) +TQString OutputDirectory::uniqueFileName( const TQString& filename ) { - QString filePathName; + TQString filePathName; if( filename.left( 1 ) == "/" ) { filePathName = filename; @@ -271,13 +271,13 @@ QString OutputDirectory::uniqueFileName( const QString& filename ) else if( filename.left( 13 ) == "system:/home/" ) { filePathName = filename; filePathName.remove( 0, 13 ); - filePathName = QDir::homeDirPath() + "/" + filePathName; + filePathName = TQDir::homeDirPath() + "/" + filePathName; } else if( filename.left( 14 ) == "system:/users/" || filename.left( 6 ) == "home:/" ) { int length = ( filename.left(6) == "home:/" ) ? 6 : 14; - QString username = filename; + TQString username = filename; username.remove( 0, length ); - username = username.left( username.find("/") ); + username = username.left( username.tqfind("/") ); filePathName = filename; filePathName.remove( 0, length + username.length() ); KUser user( username ); @@ -285,9 +285,9 @@ QString OutputDirectory::uniqueFileName( const QString& filename ) } else if( filename.left( 14 ) == "system:/media/" || filename.left( 7 ) == "media:/" ) { int length = ( filename.left(7) == "media:/" ) ? 7 : 14; - QString device = filename; + TQString device = filename; device.remove( 0, length ); - device = "/dev/" + device.left( device.find( "/" ) ); + device = "/dev/" + device.left( device.tqfind( "/" ) ); KMountPoint::List mountPoints = KMountPoint::possibleMountPoints(); @@ -305,25 +305,25 @@ QString OutputDirectory::uniqueFileName( const QString& filename ) filePathName = filename; } - QFileInfo fileInfo( KURL::decode_string(filePathName) ); + TQFileInfo fileInfo( KURL::decode_string(filePathName) ); // generate a unique file name while( fileInfo.exists() ) { - fileInfo.setFile( fileInfo.filePath().left( fileInfo.filePath().findRev(".")+1 ) + i18n("new") + fileInfo.filePath().right( fileInfo.filePath().length() - fileInfo.filePath().findRev(".") ) ); + fileInfo.setFile( fileInfo.filePath().left( fileInfo.filePath().tqfindRev(".")+1 ) + i18n("new") + fileInfo.filePath().right( fileInfo.filePath().length() - fileInfo.filePath().tqfindRev(".") ) ); } - return KURL::encode_string( fileInfo.filePath() ); // was: .replace( "//", "/" ) + return KURL::encode_string( fileInfo.filePath() ); // was: .tqreplace( "//", "/" ) } -QString OutputDirectory::makePath( const QString& path ) +TQString OutputDirectory::makePath( const TQString& path ) { - QFileInfo fileInfo( path ); + TQFileInfo fileInfo( path ); - QStringList dirs = QStringList::split( "/", fileInfo.dirPath() ); - QString mkDir; - QDir dir; - for( QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) { - mkDir += "/" + KURL::decode_string(*it).replace("/","%2f"); + TQStringList dirs = TQStringList::split( "/", fileInfo.dirPath() ); + TQString mkDir; + TQDir dir; + for( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) { + mkDir += "/" + KURL::decode_string(*it).tqreplace("/","%2f"); dir.setPath( mkDir ); if( !dir.exists() ) dir.mkdir( mkDir ); } @@ -334,15 +334,15 @@ QString OutputDirectory::makePath( const QString& path ) // copyright : (C) 2002 by Mark Kretschmann // email : [email protected] // modified : 2008 Daniel Faust <[email protected]> -QString OutputDirectory::vfatPath( const QString& path ) +TQString OutputDirectory::vfatPath( const TQString& path ) { - QString s = KURL::decode_string(path.right( path.length() - path.findRev("/") - 1 )); - QString p = KURL::decode_string(path.left( path.findRev("/") + 1 )); + TQString s = KURL::decode_string(path.right( path.length() - path.tqfindRev("/") - 1 )); + TQString p = KURL::decode_string(path.left( path.tqfindRev("/") + 1 )); for( uint i = 0; i < s.length(); i++ ) { - QChar c = s.ref( i ); - if( c < QChar(0x20) + TQChar c = s.ref( i ); + if( c < TQChar(0x20) || c=='*' || c=='?' || c=='<' || c=='>' || c=='|' || c=='"' || c==':' || c=='/' || c=='\\' ) @@ -353,14 +353,14 @@ QString OutputDirectory::vfatPath( const QString& path ) uint len = s.length(); if( len == 3 || (len > 3 && s[3] == '.') ) { - QString l = s.left(3).lower(); + TQString l = s.left(3).lower(); if( l=="aux" || l=="con" || l=="nul" || l=="prn" ) s = "_" + s; } else if( len == 4 || (len > 4 && s[4] == '.') ) { - QString l = s.left(3).lower(); - QString d = s.mid(3,1); + TQString l = s.left(3).lower(); + TQString d = s.mid(3,1); if( (l=="com" || l=="lpt") && (d=="0" || d=="1" || d=="2" || d=="3" || d=="4" || d=="5" || d=="6" || d=="7" || d=="8" || d=="9") ) @@ -378,25 +378,25 @@ QString OutputDirectory::vfatPath( const QString& path ) if( s[len-1] == ' ' ) s[len-1] = '_'; - return QString( p + s ).replace("%2f","_"); + return TQString( p + s ).tqreplace("%2f","_"); // return p + s; } void OutputDirectory::selectDir() { - QString startDir = lDir->text(); - int i = startDir.find( QRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); + TQString startDir = lDir->text(); + int i = startDir.tqfind( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); if( i != -1 ) { - i = startDir.findRev( "/", i ); + i = startDir.tqfindRev( "/", i ); startDir = startDir.left( i ); } - QString directory = KFileDialog::getExistingDirectory( startDir, this, i18n("Choose an output directory") ); + TQString directory = KFileDialog::getExistingDirectory( startDir, this, i18n("Choose an output directory") ); if( !directory.isEmpty() ) { - QString dir = lDir->text(); - i = dir.find( QRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); + TQString dir = lDir->text(); + i = dir.tqfind( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); if( i != -1 && (Mode)cMode->currentItem() == MetaData ) { - i = dir.findRev( "/", i ); + i = dir.tqfindRev( "/", i ); lDir->setText( directory + dir.mid(i) ); } else { @@ -408,10 +408,10 @@ void OutputDirectory::selectDir() void OutputDirectory::gotoDir() { - QString startDir = lDir->originalText(); - int i = startDir.find( QRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); + TQString startDir = lDir->originalText(); + int i = startDir.tqfind( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") ); if( i != -1 ) { - i = startDir.findRev( "/", i ); + i = startDir.tqfindRev( "/", i ); startDir = startDir.left( i ); } @@ -436,14 +436,14 @@ void OutputDirectory::modeChangedSlot( int mode ) // TODO hide pDirSelect and show pDirEdit pDirGoto->setEnabled( true ); //pDirInfo->hide(); - QToolTip::remove( cMode ); - QToolTip::add( cMode, i18n("Output all converted files into the soundKonverter default output directory") ); - QToolTip::remove( lDir ); + TQToolTip::remove( cMode ); + TQToolTip::add( cMode, i18n("Output all converted files into the soundKonverter default output directory") ); + TQToolTip::remove( lDir ); } else */ if( (Mode)mode == MetaData ) { pClear->setEnabled( true ); - if( config->data.general.metaDataOutputDirectory.isEmpty() ) config->data.general.metaDataOutputDirectory = QDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t"; + if( config->data.general.metaDataOutputDirectory.isEmpty() ) config->data.general.metaDataOutputDirectory = TQDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t"; lDir->setText( config->data.general.metaDataOutputDirectory ); lDir->setEnabled( true ); lDir->setReadOnly( false ); @@ -451,10 +451,10 @@ void OutputDirectory::modeChangedSlot( int mode ) pDirSelect->setEnabled( true ); pDirGoto->setEnabled( true ); //pDirInfo->show(); - QToolTip::remove( cMode ); - QToolTip::add( cMode, i18n("Name all converted files according to the specified pattern") ); - QToolTip::remove( lDir ); - QToolTip::add( lDir, i18n("<p>The following strings are wildcards, that will be replaced by the information in the meta data:</p><p>%a - Artist<br>%b - Album<br>%c - Comment<br>%d - Disc number<br>%g - Genre<br>%n - Track number<br>%p - Composer<br>%t - Title<br>%y - Year<br>%f - Original file name<p>") ); + TQToolTip::remove( cMode ); + TQToolTip::add( cMode, i18n("Name all converted files according to the specified pattern") ); + TQToolTip::remove( lDir ); + TQToolTip::add( lDir, i18n("<p>The following strings are wildcards, that will be replaced by the information in the meta data:</p><p>%a - Artist<br>%b - Album<br>%c - Comment<br>%d - Disc number<br>%g - Genre<br>%n - Track number<br>%p - Composer<br>%t - Title<br>%y - Year<br>%f - Original file name<p>") ); } else if( (Mode)mode == Source ) { pClear->setEnabled( false ); @@ -465,13 +465,13 @@ void OutputDirectory::modeChangedSlot( int mode ) pDirSelect->setEnabled( false ); pDirGoto->setEnabled( false ); //pDirInfo->hide(); - QToolTip::remove( cMode ); - QToolTip::add( cMode, i18n("Output all converted files into the same directory as the original files") ); - QToolTip::remove( lDir ); + TQToolTip::remove( cMode ); + TQToolTip::add( cMode, i18n("Output all converted files into the same directory as the original files") ); + TQToolTip::remove( lDir ); } else if( (Mode)mode == Specify ) { pClear->setEnabled( true ); - if( config->data.general.specifyOutputDirectory.isEmpty() ) config->data.general.specifyOutputDirectory = QDir::homeDirPath() + "/soundKonverter"; + if( config->data.general.specifyOutputDirectory.isEmpty() ) config->data.general.specifyOutputDirectory = TQDir::homeDirPath() + "/soundKonverter"; lDir->setText( config->data.general.specifyOutputDirectory ); lDir->setEnabled( true ); lDir->setReadOnly( false ); @@ -479,13 +479,13 @@ void OutputDirectory::modeChangedSlot( int mode ) pDirSelect->setEnabled( true ); pDirGoto->setEnabled( true ); //pDirInfo->hide(); - QToolTip::remove( cMode ); - QToolTip::add( cMode, i18n("Output all converted files into the specified output directory") ); - QToolTip::remove( lDir ); + TQToolTip::remove( cMode ); + TQToolTip::add( cMode, i18n("Output all converted files into the specified output directory") ); + TQToolTip::remove( lDir ); } else if( (Mode)mode == CopyStructure ) { pClear->setEnabled( true ); - if( config->data.general.copyStructureOutputDirectory.isEmpty() ) config->data.general.copyStructureOutputDirectory = QDir::homeDirPath() + "/soundKonverter"; + if( config->data.general.copyStructureOutputDirectory.isEmpty() ) config->data.general.copyStructureOutputDirectory = TQDir::homeDirPath() + "/soundKonverter"; lDir->setText( config->data.general.copyStructureOutputDirectory ); lDir->setEnabled( true ); lDir->setReadOnly( false ); @@ -493,9 +493,9 @@ void OutputDirectory::modeChangedSlot( int mode ) pDirSelect->setEnabled( true ); pDirGoto->setEnabled( true ); //pDirInfo->hide(); - QToolTip::remove( cMode ); - QToolTip::add( cMode, i18n("Copy the whole directory structure for all converted files") ); - QToolTip::remove( lDir ); + TQToolTip::remove( cMode ); + TQToolTip::add( cMode, i18n("Copy the whole directory structure for all converted files") ); + TQToolTip::remove( lDir ); } emit modeChanged( (Mode)mode ); @@ -503,7 +503,7 @@ void OutputDirectory::modeChangedSlot( int mode ) modeJustChanged = false; } -void OutputDirectory::directoryChangedSlot( const QString& directory ) +void OutputDirectory::directoryChangedSlot( const TQString& directory ) { if( modeJustChanged ) { modeJustChanged = false; @@ -528,37 +528,37 @@ void OutputDirectory::directoryChangedSlot( const QString& directory ) /*void OutputDirectory::modeInfo() { int mode = cMode->currentItem(); - QString sModeString = cMode->currentText(); + TQString sModeString = cMode->currentText(); if( (Mode)mode == Default ) { KMessageBox::information( this, i18n("This will output each file into the soundKonverter default directory."), - QString(i18n("Mode")+": ").append(sModeString) ); + TQString(i18n("Mode")+": ").append(sModeString) ); } else if( (Mode)mode == Source ) { KMessageBox::information( this, i18n("This will output each file into the same directory as the original file."), - QString(i18n("Mode")+": ").append(sModeString) ); + TQString(i18n("Mode")+": ").append(sModeString) ); } else if( (Mode)mode == Specify ) { KMessageBox::information( this, i18n("This will output each file into the directory specified in the editbox behind."), - QString(i18n("Mode")+": ").append(sModeString) ); + TQString(i18n("Mode")+": ").append(sModeString) ); } else if( (Mode)mode == MetaData ) { KMessageBox::information( this, i18n("This will output each file into a directory, which is created based on the metadata in the audio files. Select a directory, where the new directories should be created."), - QString(i18n("Mode")+": ").append(sModeString) ); + TQString(i18n("Mode")+": ").append(sModeString) ); } else if( (Mode)mode == CopyStructure ) { KMessageBox::information( this, i18n("This will output each file into a directory, which is created based on the name of the original directory. So you can copy a whole directory structure, in one you have the original files, in the other the converted."), - QString(i18n("Mode")+": ").append(sModeString) ); + TQString(i18n("Mode")+": ").append(sModeString) ); } else { KMessageBox::error( this, i18n("This mode (%s) doesn't exist.", sModeString), - QString(i18n("Mode")+": ").append(sModeString) ); + TQString(i18n("Mode")+": ").append(sModeString) ); } }*/ @@ -566,6 +566,6 @@ void OutputDirectory::directoryChangedSlot( const QString& directory ) { KMessageBox::information( this, i18n("<p>The following strings are space holders, that will be replaced by the information in the metatags.</p><p>%a - Artist<br>%b - Album<br>%c - Comment<br>%d - Disc number<br>%g - Genre<br>%n - Track number<br>%p - Composer<br>%t - Title<br>%y - Year<br>%f - Original file name<p>"), - QString(i18n("Legend")) ); + TQString(i18n("Legend")) ); }*/ |