summaryrefslogtreecommitdiffstats
path: root/src/gui/settingsdlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/settingsdlg.cpp')
-rw-r--r--src/gui/settingsdlg.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/gui/settingsdlg.cpp b/src/gui/settingsdlg.cpp
index 3b42027..641a9d2 100644
--- a/src/gui/settingsdlg.cpp
+++ b/src/gui/settingsdlg.cpp
@@ -30,18 +30,18 @@
#include <knuminput.h>
#include <kpushbutton.h>
#include <kstandarddirs.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qslider.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qvalidator.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqslider.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqvalidator.h>
// Make sure that this value is the same as that in ktechlab.kcfg
const int defaultRefreshRate = 50;
-SettingsDlg::SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *config )
- : KConfigDialog( parent, name, config )
+SettingsDlg::SettingsDlg( TQWidget *tqparent, const char *name, KConfigSkeleton *config )
+ : KConfigDialog( tqparent, name, config )
{
m_generalOptionsWidget = new GeneralOptionsWidget( this, "generalOptionsWidget" );
m_gpasmSettingsWidget = new GpasmSettingsWidget( this, "gpasmSettingsWidget" );
@@ -52,8 +52,8 @@ SettingsDlg::SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *co
m_pPicProgrammerSettings = new PicProgrammerSettings;
- m_logicWidget->kcfg_LogicOutputHighImpedance->setSuffix( QString(" ") + QChar(0x3a9) );
- m_logicWidget->kcfg_LogicOutputLowImpedance->setSuffix( QString(" ") + QChar(0x3a9) );
+ m_logicWidget->kcfg_LogicOutputHighImpedance->setSuffix( TQString(" ") + TQChar(0x3a9) );
+ m_logicWidget->kcfg_LogicOutputLowImpedance->setSuffix( TQString(" ") + TQChar(0x3a9) );
addPage( m_generalOptionsWidget, i18n("General"), "misc", i18n("General Options") );
addPage( m_picProgrammerConfigWidget, i18n("Programmer"), "memory", i18n("PIC Programmer") );
@@ -62,18 +62,18 @@ SettingsDlg::SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *co
addPage( m_gpasmSettingsWidget, "Gpasm", "convert_to_hex", "gpasm" );
addPage( m_sdccOptionsWidget, "SDCC", "source_c", "SDCC" );
- connect( m_generalOptionsWidget->refreshRateSlider, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateRefreshRateLabel(int)) );
- connect( m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram, SIGNAL(activated(const QString &)), this, SLOT(slotUpdatePicProgrammerDescription()) );
- connect( m_picProgrammerConfigWidget->removeButton, SIGNAL(clicked()), this, SLOT(slotRemoveProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->addButton, SIGNAL(clicked()), this, SLOT(slotAddProgrammerConfig()) );
+ connect( m_generalOptionsWidget->refreshRateSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotUpdateRefreshRateLabel(int)) );
+ connect( m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotUpdatePicProgrammerDescription()) );
+ connect( m_picProgrammerConfigWidget->removeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->initCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->readCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->writeCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->verifyCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->blankCheckCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->eraseCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->initCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->readCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->writeCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->verifyCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->blankCheckCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->eraseCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
m_generalOptionsWidget->kcfg_GridColor->setEnabled( KTLConfig::showGrid() );
@@ -100,23 +100,23 @@ void SettingsDlg::show()
void SettingsDlg::slotUpdateRefreshRateLabel( int sliderValue )
{
- const QString number = QString::number( sliderValueToRefreshRate(sliderValue) );
+ const TQString number = TQString::number( sliderValueToRefreshRate(sliderValue) );
switch(sliderValue)
{
case 0:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("Lowest (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("Lowest (%1 FPS)").tqarg(number) );
break;
case 1:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("Low (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("Low (%1 FPS)").tqarg(number) );
break;
case 2:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("Medium (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("Medium (%1 FPS)").tqarg(number) );
break;
case 3:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("High (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("High (%1 FPS)").tqarg(number) );
break;
case 4:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("Highest (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("Highest (%1 FPS)").tqarg(number) );
break;
default:
m_generalOptionsWidget->refreshRateLabel->setText( i18n("Unknown value") );
@@ -128,22 +128,22 @@ void SettingsDlg::slotUpdateRefreshRateLabel( int sliderValue )
void SettingsDlg::slotUpdatePicProgrammerDescription()
{
- QString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText();
+ TQString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText();
ProgrammerConfig config = m_pPicProgrammerSettings->config( program );
- QString description = config.description;
+ TQString description = config.description;
bool customProgrammer = ! m_pPicProgrammerSettings->isPredefined( program );
- QString executable = config.executable;
+ TQString executable = config.executable;
if ( executable.isEmpty() )
executable = program.lower();
- QString programLocation = KStandardDirs::findExe( executable );
+ TQString programLocation = KStandardDirs::findExe( executable );
if ( programLocation.isNull() )
- description.prepend( i18n("<b>%1</b> cannot be found.<br>").arg( executable ) );
+ description.prepend( i18n("<b>%1</b> cannot be found.<br>").tqarg( executable ) );
else
- description.prepend( i18n("<b>%1</b> found: %2<br>").arg( executable ).arg(programLocation) );
+ description.prepend( i18n("<b>%1</b> found: %2<br>").tqarg( executable ).tqarg(programLocation) );
m_picProgrammerConfigWidget->m_pProgrammerDescription->setText( description );
m_picProgrammerConfigWidget->removeButton->setEnabled( customProgrammer );
@@ -154,7 +154,7 @@ void SettingsDlg::slotUpdatePicProgrammerDescription()
edit = m_picProgrammerConfigWidget->name; \
edit->setText( config.name ); \
edit->setEnabled(customProgrammer); \
- QToolTip::add( edit, customProgrammer ? 0 : config.name )
+ TQToolTip::add( edit, customProgrammer ? 0 : config.name )
SETUP_COMMAND( initCommand );
SETUP_COMMAND( readCommand );
@@ -169,7 +169,7 @@ void SettingsDlg::slotUpdatePicProgrammerDescription()
void SettingsDlg::slotSaveCurrentProgrammerConfig()
{
- QString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText();
+ TQString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText();
if ( m_pPicProgrammerSettings->isPredefined( program ) )
return;
@@ -191,9 +191,9 @@ void SettingsDlg::slotRemoveProgrammerConfig()
{
KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram;
- QString program = combo->currentText();
+ TQString program = combo->currentText();
- KMessageBox::ButtonCode confirm = (KMessageBox::ButtonCode)KMessageBox::warningContinueCancel( this, i18n("Remove programmer configuration \"%1\"?").arg(program), i18n("Remove \"%1\"").arg(program), i18n("Remove") );
+ KMessageBox::ButtonCode confirm = (KMessageBox::ButtonCode)KMessageBox::warningContinueCancel( this, i18n("Remove programmer configuration \"%1\"?").tqarg(program), i18n("Remove \"%1\"").tqarg(program), i18n("Remove") );
if ( confirm == KMessageBox::Cancel )
return;
@@ -203,20 +203,20 @@ void SettingsDlg::slotRemoveProgrammerConfig()
}
-class NameValidator : public QValidator
+class NameValidator : public TQValidator
{
public:
- NameValidator( QStringList unallowed )
- : QValidator(0) {
+ NameValidator( TQStringList unallowed )
+ : TQValidator(0) {
m_unallowed = unallowed;
}
- virtual State validate( QString & input, int & ) const {
- return (input.isEmpty() || m_unallowed.contains( input.lower() )) ? Intermediate : Acceptable;
+ virtual State validate( TQString & input, int & ) const {
+ return (input.isEmpty() || m_unallowed.tqcontains( input.lower() )) ? Intermediate : Acceptable;
}
protected:
- QStringList m_unallowed;
+ TQStringList m_unallowed;
};
@@ -224,7 +224,7 @@ void SettingsDlg::slotAddProgrammerConfig()
{
KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram;
- QStringList takenNames;
+ TQStringList takenNames;
int count = combo->count();
for ( int i = 0; i < count; ++i )
takenNames << combo->text(i).lower();
@@ -232,7 +232,7 @@ void SettingsDlg::slotAddProgrammerConfig()
NameValidator * nv = new NameValidator( takenNames );
bool ok = false;
- QString name = KInputDialog::getText( i18n("Configuration Name"), i18n("Name"), 0, &ok, this, 0, nv );
+ TQString name = KInputDialog::getText( i18n("Configuration Name"), i18n("Name"), 0, &ok, this, 0, nv );
delete nv;
@@ -300,7 +300,7 @@ void SettingsDlg::updateSettings()
emit settingsChanged();
}
- QTimer::singleShot( 0, this, SLOT(slotUpdateSettings()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateSettings()) );
}
@@ -313,7 +313,7 @@ void SettingsDlg::slotUpdateSettings()
return;
KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram;
- QString newProgram = combo->currentText();
+ TQString newProgram = combo->currentText();
if ( newProgram != KTLConfig::picProgrammerProgram() )
{
@@ -339,14 +339,14 @@ void SettingsDlg::updateWidgets()
m_pPicProgrammerSettings->load( kapp->config() );
- QStringList programmerNames = m_pPicProgrammerSettings->configNames( false );
+ TQStringList programmerNames = m_pPicProgrammerSettings->configNames( false );
KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram;
combo->clear();
combo->insertStringList( programmerNames );
combo->setSizeLimit( programmerNames.size() );
- QTimer::singleShot( 0, this, SLOT(slotUpdateWidgets()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateWidgets()) );
}