summaryrefslogtreecommitdiffstats
path: root/src/configgeneralpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configgeneralpage.cpp')
-rwxr-xr-xsrc/configgeneralpage.cpp178
1 files changed, 89 insertions, 89 deletions
diff --git a/src/configgeneralpage.cpp b/src/configgeneralpage.cpp
index 9408ffd..295b700 100755
--- a/src/configgeneralpage.cpp
+++ b/src/configgeneralpage.cpp
@@ -11,44 +11,44 @@
#include <kpushbutton.h>
#include <kfiledialog.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqdir.h>
+#include <tqregexp.h>
// ### soundkonverter 0.4: add an option to use vfat save names when the output device is vfat
-ConfigGeneralPage::ConfigGeneralPage( Config* _config, QWidget *parent, const char *name )
- : ConfigPageBase( parent, name )
+ConfigGeneralPage::ConfigGeneralPage( Config* _config, TQWidget *tqparent, const char *name )
+ : ConfigPageBase( tqparent, name )
{
config = _config;
// 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 );
- QHBoxLayout* startTabBox = new QHBoxLayout( box, 6 );
- QLabel* lStartTab = new QLabel( i18n("Start in Mode")+":", parent, "lStartTab" );
+ TQHBoxLayout* startTabBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lStartTab = new TQLabel( i18n("Start in Mode")+":", tqparent, "lStartTab" );
startTabBox->addWidget( lStartTab );
- cStartTab = new KComboBox( parent, "cStartTab" );
+ cStartTab = new KComboBox( tqparent, "cStartTab" );
cStartTab->insertItem( i18n("Last used") );
cStartTab->insertItem( i18n("Simple") );
cStartTab->insertItem( i18n("Detailed") );
cStartTab->setCurrentItem( config->data.general.startTab );
startTabBox->addWidget( cStartTab );
- connect( cStartTab, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cStartTab, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* defaultProfileBox = new QHBoxLayout( box, 6 );
- QLabel* lDefaultProfile = new QLabel( i18n("Default profile")+":", parent, "lDefaultProfile" );
+ TQHBoxLayout* defaultProfileBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lDefaultProfile = new TQLabel( i18n("Default profile")+":", tqparent, "lDefaultProfile" );
defaultProfileBox->addWidget( lDefaultProfile );
- cDefaultProfile = new KComboBox( parent, "cDefaultProfile" );
+ cDefaultProfile = new KComboBox( tqparent, "cDefaultProfile" );
sDefaultProfile += i18n("Very low");
sDefaultProfile += i18n("Low");
sDefaultProfile += i18n("Medium");
@@ -63,129 +63,129 @@ ConfigGeneralPage::ConfigGeneralPage( Config* _config, QWidget *parent, const ch
cDefaultProfile->insertStringList( sDefaultProfile );
cDefaultProfile->setCurrentItem( profileIndex(config->data.general.defaultProfile) );
defaultProfileBox->addWidget( cDefaultProfile );
- connect( cDefaultProfile, SIGNAL(activated(int)),
- this, SLOT(profileChanged())
+ connect( cDefaultProfile, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(profileChanged())
);
- connect( cDefaultProfile, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cDefaultProfile, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
- QLabel* lDefaultFormat = new QLabel( i18n("Default format")+":", parent, "lDefaultFormat" );
+ TQLabel* lDefaultFormat = new TQLabel( i18n("Default format")+":", tqparent, "lDefaultFormat" );
defaultProfileBox->addWidget( lDefaultFormat );
- cDefaultFormat = new KComboBox( parent, "cDefaultFormat" );
+ cDefaultFormat = new KComboBox( tqparent, "cDefaultFormat" );
defaultProfileBox->addWidget( cDefaultFormat );
- connect( cDefaultFormat, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cDefaultFormat, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
profileChanged();
box->addSpacing( 5 );
-/* QHBoxLayout* defaultDirBox = new QHBoxLayout( box, 6 );
- QLabel* lDefaultDir = new QLabel( i18n("Default output directory")+":", parent, "lDefaultDir" );
+/* TQHBoxLayout* defaultDirBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lDefaultDir = new TQLabel( i18n("Default output directory")+":", tqparent, "lDefaultDir" );
defaultDirBox->addWidget( lDefaultDir );
- lDir = new KLineEdit( parent, "lDir" );
+ lDir = new KLineEdit( tqparent, "lDir" );
lDir->setText( config->data.general.defaultOutputDirectory );
- QToolTip::add( lDir, i18n("<p>The following strings are space holders, 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::add( lDir, i18n("<p>The following strings are space holders, 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>") );
defaultDirBox->addWidget( lDir );
- connect( lDir, SIGNAL(textChanged(const QString&)),
- this, SLOT(cfgChanged())
+ connect( lDir, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(cfgChanged())
);*/
- /*pDirInfo = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), "", parent, "pDirInfo" );
- QToolTip::add( pDirInfo, i18n("Information about the wildcards.") );
+ /*pDirInfo = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), "", tqparent, "pDirInfo" );
+ TQToolTip::add( pDirInfo, i18n("Information about the wildcards.") );
defaultDirBox->addWidget( pDirInfo );
- connect( pDirInfo, SIGNAL(clicked()),
- this, SLOT(dirInfo())
+ connect( pDirInfo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirInfo())
);*/
-// pDirSelect = new KPushButton( iconLoader->loadIcon("folder",KIcon::Small), "", parent, "pDirSelect" );
-// QToolTip::add( pDirSelect, i18n("Choose an output directory") );
+// pDirSelect = new KPushButton( iconLoader->loadIcon("folder",KIcon::Small), "", tqparent, "pDirSelect" );
+// TQToolTip::add( pDirSelect, i18n("Choose an output directory") );
// defaultDirBox->addWidget( pDirSelect );
-// connect( pDirSelect, SIGNAL(clicked()),
-// this, SLOT(selectDir())
+// connect( pDirSelect, TQT_SIGNAL(clicked()),
+// this, TQT_SLOT(selectDir())
// );
- QHBoxLayout* priorityBox = new QHBoxLayout( box, 6 );
- QLabel* lPriority = new QLabel( i18n("Process priority of the backends")+":", parent, "lPriority" );
+ TQHBoxLayout* priorityBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lPriority = new TQLabel( i18n("Process priority of the backends")+":", tqparent, "lPriority" );
priorityBox->addWidget( lPriority );
- cPriority = new KComboBox( parent, "cPriority" );
+ cPriority = new KComboBox( tqparent, "cPriority" );
sPriority += i18n("Normal");
sPriority += i18n("Low");
cPriority->insertStringList( sPriority );
cPriority->setCurrentItem( config->data.general.priority / 10 ); // NOTE that just works for 'normal' and 'low'
priorityBox->addWidget( cPriority );
- connect( cPriority, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cPriority, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* useVFATNamesBox = new QHBoxLayout( box, 6 );
- cUseVFATNames = new QCheckBox( i18n("Use FAT compatible output file names"), parent, "cUseVFATNames" );
- QToolTip::add( cUseVFATNames, i18n("Replaces some special characters like \'?\' by \'_\'.") );
+ TQHBoxLayout* useVFATNamesBox = new TQHBoxLayout( box, 6 );
+ cUseVFATNames = new TQCheckBox( i18n("Use FAT compatible output file names"), tqparent, "cUseVFATNames" );
+ TQToolTip::add( cUseVFATNames, i18n("Replaces some special characters like \'?\' by \'_\'.") );
cUseVFATNames->setChecked( config->data.general.useVFATNames );
useVFATNamesBox->addWidget( cUseVFATNames );
- connect( cUseVFATNames, SIGNAL(toggled(bool)),
- this, SLOT(cfgChanged())
+ connect( cUseVFATNames, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* conflictHandlingBox = new QHBoxLayout( box, 6 );
- QLabel* lConflictHandling = new QLabel( i18n("Conflict handling")+":", parent, "lConflictHandling" );
+ TQHBoxLayout* conflictHandlingBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lConflictHandling = new TQLabel( i18n("Conflict handling")+":", tqparent, "lConflictHandling" );
conflictHandlingBox->addWidget( lConflictHandling );
- cConflictHandling = new KComboBox( parent, "cConflictHandling" );
- QToolTip::add( cConflictHandling, i18n("Do that if the output file already exists") );
+ cConflictHandling = new KComboBox( tqparent, "cConflictHandling" );
+ TQToolTip::add( cConflictHandling, i18n("Do that if the output file already exists") );
sConflictHandling += i18n("Generate new file name");
sConflictHandling += i18n("Skip file");
cConflictHandling->insertStringList( sConflictHandling );
cConflictHandling->setCurrentItem( config->data.general.conflictHandling );
conflictHandlingBox->addWidget( cConflictHandling );
- connect( cConflictHandling, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cConflictHandling, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* numFilesBox = new QHBoxLayout( box, 6 );
- QLabel* lNumFiles = new QLabel( i18n("Number of files to convert at once")+":", parent, "lNumFiles" );
+ TQHBoxLayout* numFilesBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lNumFiles = new TQLabel( i18n("Number of files to convert at once")+":", tqparent, "lNumFiles" );
numFilesBox->addWidget( lNumFiles );
- iNumFiles = new KIntSpinBox( 1, 100, 1, config->data.general.numFiles, 10, parent, "iNumFiles" );
+ iNumFiles = new KIntSpinBox( 1, 100, 1, config->data.general.numFiles, 10, tqparent, "iNumFiles" );
numFilesBox->addWidget( iNumFiles );
- connect( iNumFiles, SIGNAL(valueChanged(int)),
- this, SLOT(cfgChanged())
+ connect( iNumFiles, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* updateDelayBox = new QHBoxLayout( box, 6 );
- QLabel* lUpdateDelay = new QLabel( i18n("Status update delay (time in msec.)")+":", parent, "lUpdateDelay" );
+ TQHBoxLayout* updateDelayBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lUpdateDelay = new TQLabel( i18n("tqStatus update delay (time in msec.)")+":", tqparent, "lUpdateDelay" );
updateDelayBox->addWidget( lUpdateDelay );
- iUpdateDelay = new KIntSpinBox( 100, 5000, 100, config->data.general.updateDelay, 10, parent, "iUpdateDelay" );
- QToolTip::add( iUpdateDelay, i18n("Update the progress bar in this interval (time in milliseconds)") );
+ iUpdateDelay = new KIntSpinBox( 100, 5000, 100, config->data.general.updateDelay, 10, tqparent, "iUpdateDelay" );
+ TQToolTip::add( iUpdateDelay, i18n("Update the progress bar in this interval (time in milliseconds)") );
updateDelayBox->addWidget( iUpdateDelay );
- connect( iUpdateDelay, SIGNAL(valueChanged(int)),
- this, SLOT(cfgChanged())
+ connect( iUpdateDelay, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* askForNewOptionsBox = new QHBoxLayout( box, 6 );
- cAskForNewOptions = new QCheckBox( i18n("Ask for new options, when adding files from external program"), parent, "cAskForNewOptions" );
- QToolTip::add( cAskForNewOptions, i18n("If you open a file with soundKonverter and soundKonverter is already running,\nyou can either be asked to define new converting options\nor the current settings from the soundKonverter main window are used.") );
+ TQHBoxLayout* askForNewOptionsBox = new TQHBoxLayout( box, 6 );
+ cAskForNewOptions = new TQCheckBox( i18n("Ask for new options, when adding files from external program"), tqparent, "cAskForNewOptions" );
+ TQToolTip::add( cAskForNewOptions, i18n("If you open a file with soundKonverter and soundKonverter is already running,\nyou can either be asked to define new converting options\nor the current settings from the soundKonverter main window are used.") );
cAskForNewOptions->setChecked( config->data.general.askForNewOptions );
askForNewOptionsBox->addWidget( cAskForNewOptions );
- connect( cAskForNewOptions, SIGNAL(toggled(bool)),
- this, SLOT(cfgChanged())
+ connect( cAskForNewOptions, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* executeUserScriptBox = new QHBoxLayout( box, 6 );
- cExecuteUserScript = new QCheckBox( i18n("Execute user script (for advanced users)"), parent, "cAskForNewOptions" );
- QToolTip::add( cExecuteUserScript, i18n("Executes a script after every finished conversion. Have a look at $KDEDIR/soundkonverter/userscript.sh") );
+ TQHBoxLayout* executeUserScriptBox = new TQHBoxLayout( box, 6 );
+ cExecuteUserScript = new TQCheckBox( i18n("Execute user script (for advanced users)"), tqparent, "cAskForNewOptions" );
+ TQToolTip::add( cExecuteUserScript, i18n("Executes a script after every finished conversion. Have a look at $KDEDIR/soundkonverter/userscript.sh") );
cExecuteUserScript->setChecked( config->data.general.executeUserScript );
executeUserScriptBox->addWidget( cExecuteUserScript );
- connect( cExecuteUserScript, SIGNAL(toggled(bool)),
- this, SLOT(cfgChanged())
+ connect( cExecuteUserScript, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(cfgChanged())
);
box->addStretch();
@@ -202,7 +202,7 @@ void ConfigGeneralPage::resetDefaults()
cStartTab->setCurrentItem( 0 );
cDefaultProfile->setCurrentItem( 0 );
cDefaultFormat->setCurrentItem( 0 );
-// lDir->setText( QDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t" );
+// lDir->setText( TQDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t" );
cPriority->setCurrentItem( 1 );
cUseVFATNames->setChecked( true );
cConflictHandling->setCurrentItem( 0 );
@@ -229,31 +229,31 @@ void ConfigGeneralPage::saveSettings()
config->data.general.executeUserScript = cExecuteUserScript->isChecked();
}
-int ConfigGeneralPage::profileIndex( const QString &string )
+int ConfigGeneralPage::profileIndex( const TQString &string )
{
- return sDefaultProfile.findIndex( string );
+ return sDefaultProfile.tqfindIndex( string );
}
-int ConfigGeneralPage::formatIndex( const QString &string )
+int ConfigGeneralPage::formatIndex( const TQString &string )
{
- return sDefaultFormat.findIndex( string );
+ return sDefaultFormat.tqfindIndex( string );
}
// void ConfigGeneralPage::selectDir()
// {
-// QString startDir = lDir->text();
-// int i = startDir.find( QRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") );
+// TQString startDir = lDir->text();
+// int i = startDir.tqfind( TQRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") );
// if( i != -1 ) {
-// i = startDir.findRev( "/", i );
+// i = startDir.tqfindRev( "/", i );
// startDir = startDir.left( i );
// }
//
-// QString directory = KFileDialog::getExistingDirectory( startDir, 0, i18n("Choose an output directory") );
+// TQString directory = KFileDialog::getExistingDirectory( startDir, 0, i18n("Choose an output directory") );
// if( !directory.isEmpty() ) {
-// QString dir = lDir->text();
-// i = dir.find( QRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") );
+// TQString dir = lDir->text();
+// i = dir.tqfind( TQRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") );
// if( i != -1 ) {
-// i = dir.findRev( "/", i );
+// i = dir.tqfindRev( "/", i );
// lDir->setText( directory + dir.mid(i) );
// }
// else {
@@ -264,7 +264,7 @@ int ConfigGeneralPage::formatIndex( const QString &string )
void ConfigGeneralPage::profileChanged()
{
- QString last;
+ TQString last;
if( cDefaultProfile->currentText() == i18n("Last used") ) {
last = cDefaultFormat->currentText();