From 6b1b516f42036cf9eff691dba3fd6e9eab82a7e1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 1 Jul 2011 23:15:51 +0000 Subject: 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 --- src/dirdialog.cpp | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'src/dirdialog.cpp') 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 -#include -#include -#include +#include +#include +#include +#include #include #include @@ -15,8 +15,8 @@ #include #include -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 ); -- cgit v1.2.1