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/configenvironmentpage.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/configenvironmentpage.cpp')
-rwxr-xr-x | src/configenvironmentpage.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/src/configenvironmentpage.cpp b/src/configenvironmentpage.cpp index 26dbd5b..ebe7487 100755 --- a/src/configenvironmentpage.cpp +++ b/src/configenvironmentpage.cpp @@ -12,14 +12,14 @@ #include <kfiledialog.h> #include <kstandarddirs.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qmap.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqmap.h> -ConfigEnvironmentPage::ConfigEnvironmentPage( Config* _config, QMap<QString, QString>* _binaries, QWidget *parent, const char *name ) - : ConfigPageBase( parent, name ) +ConfigEnvironmentPage::ConfigEnvironmentPage( Config* _config, TQMap<TQString, TQString>* _binaries, TQWidget *tqparent, const char *name ) + : ConfigPageBase( tqparent, name ) { config = _config; binaries = _binaries; @@ -27,81 +27,81 @@ ConfigEnvironmentPage::ConfigEnvironmentPage( Config* _config, QMap<QString, QSt // create an icon loader object for loading icons KIconLoader* iconLoader = new KIconLoader(); - QVBoxLayout* box = new QVBoxLayout( parent, 0, 6 ); + TQVBoxLayout* box = new TQVBoxLayout( tqparent, 0, 6 ); - QLabel* lDirectoriesLabel = new QLabel( i18n("Directories to be scanned")+":", parent, "lDirectoriesLabel" ); + TQLabel* lDirectoriesLabel = new TQLabel( i18n("Directories to be scanned")+":", tqparent, "lDirectoriesLabel" ); box->addWidget( lDirectoriesLabel ); -// KEditListBox* eDirectories = new KEditListBox( parent, "eDirectories" ); +// KEditListBox* eDirectories = new KEditListBox( tqparent, "eDirectories" ); // box->addWidget( eDirectories ); - QHBoxLayout* directoriesBox = new QHBoxLayout( box ); - lDirectories = new KListBox( parent, "lDirectories" ); + TQHBoxLayout* directoriesBox = new TQHBoxLayout( box ); + lDirectories = new KListBox( tqparent, "lDirectories" ); lDirectories->insertStringList( config->data.environment.directories ); directoriesBox->addWidget( lDirectories ); - connect( lDirectories, SIGNAL(highlighted(int)), - this, SLOT(directoriesSelectionChanged(int)) + connect( lDirectories, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(directoriesSelectionChanged(int)) ); - QVBoxLayout* directoriesMiddleBox = new QVBoxLayout( directoriesBox ); - pDirUp = new KPushButton( "", parent, "pDirUp" ); + TQVBoxLayout* directoriesMiddleBox = new TQVBoxLayout( directoriesBox ); + pDirUp = new KPushButton( "", tqparent, "pDirUp" ); pDirUp->setPixmap( iconLoader->loadIcon("up",KIcon::Toolbar) ); pDirUp->setEnabled( false ); - QToolTip::add( pDirUp, i18n("Move selected directory one position up.\nThis effects which backend will be chosen, if there are several versions.") ); + TQToolTip::add( pDirUp, i18n("Move selected directory one position up.\nThis effects which backend will be chosen, if there are several versions.") ); directoriesMiddleBox->addWidget( pDirUp ); - connect( pDirUp, SIGNAL(clicked()), - this, SLOT(dirUp()) + connect( pDirUp, TQT_SIGNAL(clicked()), + this, TQT_SLOT(dirUp()) ); directoriesMiddleBox->addStretch(); - pDirDown = new KPushButton( "", parent, "pDirDown" ); + pDirDown = new KPushButton( "", tqparent, "pDirDown" ); pDirDown->setPixmap( iconLoader->loadIcon("down",KIcon::Toolbar) ); pDirDown->setEnabled( false ); - QToolTip::add( pDirDown, i18n("Move selected directory one position down.\nThis effects which backend will be chosen, if there are several versions.") ); + TQToolTip::add( pDirDown, i18n("Move selected directory one position down.\nThis effects which backend will be chosen, if there are several versions.") ); directoriesMiddleBox->addWidget( pDirDown ); - connect( pDirDown, SIGNAL(clicked()), - this, SLOT(dirDown()) + connect( pDirDown, TQT_SIGNAL(clicked()), + this, TQT_SLOT(dirDown()) ); - QVBoxLayout* directoriesRightBox = new QVBoxLayout( directoriesBox ); - pAddDirectory = new KPushButton( iconLoader->loadIcon("add",KIcon::Small), i18n("Add ..."), parent, "pAddDirectory" ); + TQVBoxLayout* directoriesRightBox = new TQVBoxLayout( directoriesBox ); + pAddDirectory = new KPushButton( iconLoader->loadIcon("add",KIcon::Small), i18n("Add ..."), tqparent, "pAddDirectory" ); directoriesRightBox->addWidget( pAddDirectory ); - connect( pAddDirectory, SIGNAL(clicked()), - this, SLOT(addDirectory()) + connect( pAddDirectory, TQT_SIGNAL(clicked()), + this, TQT_SLOT(addDirectory()) ); - pRemoveDirectory = new KPushButton( iconLoader->loadIcon("remove",KIcon::Small), i18n("Remove"), parent, "pRemoveDirectory" ); + pRemoveDirectory = new KPushButton( iconLoader->loadIcon("remove",KIcon::Small), i18n("Remove"), tqparent, "pRemoveDirectory" ); directoriesRightBox->addWidget( pRemoveDirectory ); pRemoveDirectory->setEnabled( false ); - connect( pRemoveDirectory, SIGNAL(clicked()), - this, SLOT(removeDirectory()) + connect( pRemoveDirectory, TQT_SIGNAL(clicked()), + this, TQT_SLOT(removeDirectory()) ); directoriesRightBox->addStretch(); box->addSpacing( 5 ); - QHBoxLayout* programsBox = new QHBoxLayout( box ); + TQHBoxLayout* programsBox = new TQHBoxLayout( box ); - QVBoxLayout* foundProgramsBox = new QVBoxLayout( programsBox ); - QLabel* lFoundProgramsLabel = new QLabel( i18n("Programs found")+":", parent, "lFoundProgramsLabel" ); + TQVBoxLayout* foundProgramsBox = new TQVBoxLayout( programsBox ); + TQLabel* lFoundProgramsLabel = new TQLabel( i18n("Programs found")+":", tqparent, "lFoundProgramsLabel" ); foundProgramsBox->addWidget( lFoundProgramsLabel ); - lFoundPrograms = new KListBox( parent, "lFoundPrograms" ); - lFoundPrograms->setSelectionMode( QListBox::NoSelection ); + lFoundPrograms = new KListBox( tqparent, "lFoundPrograms" ); + lFoundPrograms->setSelectionMode( TQListBox::NoSelection ); foundProgramsBox->addWidget( lFoundPrograms ); - //connect(lPrograms,SIGNAL(highlighted(int)),this,SLOT(programsSelectionChanged(int))); + //connect(lPrograms,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(programsSelectionChanged(int))); programsBox->setStretchFactor( foundProgramsBox, 3 ); - QVBoxLayout* notFoundProgramsBox = new QVBoxLayout( programsBox ); - QLabel* lNotFoundProgramsLabel = new QLabel( i18n("Programs not found")+":", parent, "lNotFoundProgramsLabel" ); + TQVBoxLayout* notFoundProgramsBox = new TQVBoxLayout( programsBox ); + TQLabel* lNotFoundProgramsLabel = new TQLabel( i18n("Programs not found")+":", tqparent, "lNotFoundProgramsLabel" ); notFoundProgramsBox->addWidget( lNotFoundProgramsLabel ); - lNotFoundPrograms = new KListBox( parent, "lNotFoundPrograms" ); - lNotFoundPrograms->setSelectionMode( QListBox::NoSelection ); + lNotFoundPrograms = new KListBox( tqparent, "lNotFoundPrograms" ); + lNotFoundPrograms->setSelectionMode( TQListBox::NoSelection ); notFoundProgramsBox->addWidget( lNotFoundPrograms ); - //connect(lPrograms,SIGNAL(highlighted(int)),this,SLOT(programsSelectionChanged(int))); + //connect(lPrograms,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(programsSelectionChanged(int))); programsBox->setStretchFactor( notFoundProgramsBox, 2 ); - for( QMap<QString, QString>::Iterator it = config->binaries.begin(); it != config->binaries.end(); ++it ) { + for( TQMap<TQString, TQString>::Iterator it = config->binaries.begin(); it != config->binaries.end(); ++it ) { if( it.data() != "" ) { lFoundPrograms->insertItem( it.data() ); } @@ -122,10 +122,10 @@ ConfigEnvironmentPage::~ConfigEnvironmentPage() void ConfigEnvironmentPage::resetDefaults() { lDirectories->clear(); - QString datadir = locateLocal( "data", "soundkonverter/bin/" ); + TQString datadir = locateLocal( "data", "soundkonverter/bin/" ); datadir.remove( datadir.length() - 1, 1 ); lDirectories->insertItem( datadir ); - lDirectories->insertItem( QDir::homeDirPath() + "/bin" ); + lDirectories->insertItem( TQDir::homeDirPath() + "/bin" ); lDirectories->insertItem( "/usr/local/bin" ); lDirectories->insertItem( "/usr/bin" ); @@ -156,7 +156,7 @@ void ConfigEnvironmentPage::dirUp() { int index = lDirectories->currentItem(); if( index > 0 ) { - QString text = lDirectories->currentText(); + TQString text = lDirectories->currentText(); lDirectories->removeItem( index ); lDirectories->insertItem( text, index - 1 ); lDirectories->setSelected( index - 1, true ); @@ -169,7 +169,7 @@ void ConfigEnvironmentPage::dirDown() { int index = lDirectories->currentItem(); if( (uint)index < lDirectories->count() - 1 ) { - QString text = lDirectories->currentText(); + TQString text = lDirectories->currentText(); lDirectories->removeItem( index ); lDirectories->insertItem( text, index + 1 ); lDirectories->setSelected( index + 1, true ); @@ -180,7 +180,7 @@ void ConfigEnvironmentPage::dirDown() void ConfigEnvironmentPage::addDirectory() { - QString dirname = KFileDialog::getExistingDirectory( "/", 0 ); + TQString dirname = KFileDialog::getExistingDirectory( "/", 0 ); if( dirname != NULL ) { lDirectories->insertItem( dirname ); refill(); @@ -197,10 +197,10 @@ void ConfigEnvironmentPage::removeDirectory() void ConfigEnvironmentPage::refill() { - for( QMap<QString, QString>::Iterator it = binaries->begin(); it != binaries->end(); ++it ) { + for( TQMap<TQString, TQString>::Iterator it = binaries->begin(); it != binaries->end(); ++it ) { it.data() = ""; for( uint i = 0; i < lDirectories->count(); i++ ) { - if( it.data() == "" && QFile::exists(lDirectories->text(i) + "/" + it.key()) ) { + if( it.data() == "" && TQFile::exists(lDirectories->text(i) + "/" + it.key()) ) { it.data() = lDirectories->text(i) + "/" + it.key(); } } @@ -208,7 +208,7 @@ void ConfigEnvironmentPage::refill() lFoundPrograms->clear(); lNotFoundPrograms->clear(); - for( QMap<QString, QString>::Iterator it = binaries->begin(); it != binaries->end(); ++it ) { + for( TQMap<TQString, TQString>::Iterator it = binaries->begin(); it != binaries->end(); ++it ) { if( it.data() != "" ) { lFoundPrograms->insertItem( it.data() ); } |