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/dirdialog.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/dirdialog.cpp')
-rwxr-xr-x | src/dirdialog.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/dirdialog.cpp b/src/dirdialog.cpp index 924036d..a585296 100755 --- a/src/dirdialog.cpp +++ b/src/dirdialog.cpp @@ -2,10 +2,10 @@ #include "dirdialog.h" #include "config.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qdir.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqdir.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kiconloader.h> @@ -15,8 +15,8 @@ #include <klistbox.h> #include <kfiledialog.h> -DirDialog::DirDialog( Config* config, Mode mode, QWidget *parent, const char *name, bool modal, WFlags f ) - : KDialog( parent, name, modal, f ) +DirDialog::DirDialog( Config* config, Mode mode, TQWidget *tqparent, const char *name, bool modal, WFlags f ) + : KDialog( tqparent, name, modal, f ) { // create an icon loader object for loading icons KIconLoader* iconLoader = new KIconLoader(); @@ -25,17 +25,17 @@ DirDialog::DirDialog( Config* config, Mode mode, QWidget *parent, const char *na resize( 400, 235 ); setIcon( iconLoader->loadIcon("folder_open",KIcon::Small) ); - QGridLayout* grid = new QGridLayout( this, 4, 1, 11, 6 ); + TQGridLayout* grid = new TQGridLayout( this, 4, 1, 11, 6 ); - QHBoxLayout* directoryBox = new QHBoxLayout(); + TQHBoxLayout* directoryBox = new TQHBoxLayout(); grid->addLayout( directoryBox, 0, 0 ); - QLabel* labelDirectory = new QLabel( i18n("Directory:"), this, "labelDirectory" ); + TQLabel* labelDirectory = new TQLabel( i18n("Directory:"), this, "labelDirectory" ); directoryBox->addWidget( labelDirectory ); // uDirectory = new KURLRequester( this, "uDirectory" ); // uDirectory->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); -// uDirectory->setURL( QDir::homeDirPath() ); +// uDirectory->setURL( TQDir::homeDirPath() ); // directoryBox->addWidget( uDirectory ); lDirectory = new KLineEdit( this, "lDirectory" ); @@ -43,52 +43,52 @@ DirDialog::DirDialog( Config* config, Mode mode, QWidget *parent, const char *na pDirectory = new KPushButton( iconLoader->loadIcon("folder_open",KIcon::Small), "", this, "pDirectory" ); directoryBox->addWidget( pDirectory ); - connect( pDirectory, SIGNAL(clicked()), - this, SLOT(selectDirectoryClicked()) + connect( pDirectory, TQT_SIGNAL(clicked()), + this, TQT_SLOT(selectDirectoryClicked()) ); - QHBoxLayout* fileTypesBox = new QHBoxLayout(); + TQHBoxLayout* fileTypesBox = new TQHBoxLayout(); grid->addLayout( fileTypesBox, 1, 0 ); fileTypes = new KListBox( this, "fileTypes" ); if( mode == Convert ) fileTypes->insertStringList( config->fileTypes() ); else if( mode == ReplayGain ) fileTypes->insertStringList( config->replayGainFileTypes() ); - fileTypes->setSelectionMode( QListBox::Multi ); + fileTypes->setSelectionMode( TQListBox::Multi ); for( int i = 0; i < fileTypes->count(); i++ ) fileTypes->setSelected( i, true ); fileTypesBox->addWidget( fileTypes ); - QVBoxLayout* fileTypesButtonsBox = new QVBoxLayout(); + TQVBoxLayout* fileTypesButtonsBox = new TQVBoxLayout(); fileTypesBox->addLayout( fileTypesButtonsBox ); pSelectAll = new KPushButton( iconLoader->loadIcon("font",KIcon::Small), i18n("Select all"), this, "pSelectAll" ); fileTypesButtonsBox->addWidget( pSelectAll ); - connect( pSelectAll, SIGNAL(clicked()), - this, SLOT(selectAllClicked()) + connect( pSelectAll, TQT_SIGNAL(clicked()), + this, TQT_SLOT(selectAllClicked()) ); pSelectNone = new KPushButton( iconLoader->loadIcon("empty",KIcon::Small), i18n("Select none"), this, "pSelectNone" ); fileTypesButtonsBox->addWidget( pSelectNone ); - connect( pSelectNone, SIGNAL(clicked()), - this, SLOT(selectNoneClicked()) + connect( pSelectNone, TQT_SIGNAL(clicked()), + this, TQT_SLOT(selectNoneClicked()) ); - cRecursive = new QCheckBox( i18n("Recursive"), this, "cRecursive" ); + cRecursive = new TQCheckBox( i18n("Recursive"), this, "cRecursive" ); cRecursive->setChecked( true ); recursive = true; fileTypesButtonsBox->addWidget( cRecursive ); - connect( cRecursive, SIGNAL(toggled(bool)), - this, SLOT(recursiveToggled(bool)) + connect( cRecursive, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(recursiveToggled(bool)) ); fileTypesButtonsBox->addStretch(); - QHBoxLayout* buttonBox = new QHBoxLayout(); + TQHBoxLayout* buttonBox = new TQHBoxLayout(); grid->addLayout( buttonBox, 2, 0 ); pOk = new KPushButton( iconLoader->loadIcon("folder_open",KIcon::Small), i18n("Open"), this, "pOk" ); buttonBox->addWidget( pOk ); - connect( pOk, SIGNAL(clicked()), - this, SLOT(okClicked()) + connect( pOk, TQT_SIGNAL(clicked()), + this, TQT_SLOT(okClicked()) ); buttonBox->addStretch(); @@ -96,21 +96,21 @@ DirDialog::DirDialog( Config* config, Mode mode, QWidget *parent, const char *na pCancel = new KPushButton( iconLoader->loadIcon("cancel",KIcon::Small),i18n("Cancel"), this, "pCancel" ); pOk->setFocus(); buttonBox->addWidget( pCancel ); - connect( pCancel, SIGNAL(clicked()), - this, SLOT(reject()) + connect( pCancel, TQT_SIGNAL(clicked()), + this, TQT_SLOT(reject()) ); // delete the icon loader object delete iconLoader; - QString directory = KFileDialog::getExistingDirectory( ":file_open", this, i18n("Choose a directory") ); + TQString directory = KFileDialog::getExistingDirectory( ":file_open", this, i18n("Choose a directory") ); if( !directory.isEmpty() ) { lDirectory->setText( directory ); } else { - lDirectory->setText( QDir::homeDirPath() ); + lDirectory->setText( TQDir::homeDirPath() ); } } @@ -121,7 +121,7 @@ void DirDialog::okClicked() { selectedFileTypes.clear(); for( int i = 0; i < fileTypes->count(); i++ ) { - if( fileTypes->isSelected(i) ) selectedFileTypes += QStringList::split(", ",fileTypes->text(i)); + if( fileTypes->isSelected(i) ) selectedFileTypes += TQStringList::split(", ",fileTypes->text(i)); } directory = lDirectory->text(); @@ -130,7 +130,7 @@ void DirDialog::okClicked() void DirDialog::selectDirectoryClicked() { - QString directory = KFileDialog::getExistingDirectory( lDirectory->text(), this, i18n("Choose a directory") ); + TQString directory = KFileDialog::getExistingDirectory( lDirectory->text(), this, i18n("Choose a directory") ); if( !directory.isEmpty() ) { lDirectory->setText( directory ); |