1
0
Fork 0
forked from len0rd/rockbox

rbutil: improve accessibility a little bit.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21300 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Wenger 2009-06-15 19:41:16 +00:00
parent b386406707
commit 18e74c9d81
4 changed files with 21 additions and 3 deletions

View file

@ -655,7 +655,7 @@ void Config::configTts()
int index = ui.comboTts->currentIndex();
TTSBase* tts = TTSBase::getTTS(this,ui.comboTts->itemData(index).toString());
EncTtsCfgGui gui(this,tts,TTSBase::getTTSName(RbSettings::value(RbSettings::Tts).toString()));
EncTtsCfgGui gui(this,tts,TTSBase::getTTSName(ui.comboTts->itemData(index).toString()));
gui.exec();
updateTtsState(ui.comboTts->currentIndex());
}

View file

@ -43,7 +43,11 @@
</widget>
</item>
<item row="1" column="1" colspan="2" >
<widget class="QComboBox" name="comboLanguage" />
<widget class="QComboBox" name="comboLanguage" >
<property name="accessibleName" >
<string>Language</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2" >
<widget class="QGroupBox" name="groupBox_2" >
@ -155,6 +159,9 @@
</item>
<item>
<widget class="QSpinBox" name="wavtrimthreshold" >
<property name="accessibleName" >
<string>Wavtrim Threshold</string>
</property>
<property name="maximum" >
<number>5000</number>
</property>
@ -168,7 +175,9 @@
</layout>
</widget>
<tabstops>
<tabstop>comboLanguage</tabstop>
<tabstop>change</tabstop>
<tabstop>wavtrimthreshold</tabstop>
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>

View file

@ -91,6 +91,7 @@ QLayout* EncTtsCfgGui::createWidgets(EncTtsSetting* setting)
case EncTtsSetting::eDOUBLE:
{
QDoubleSpinBox *spinBox = new QDoubleSpinBox(this);
spinBox->setAccessibleName(setting->name());
spinBox->setMinimum(setting->min().toDouble());
spinBox->setMaximum(setting->max().toDouble());
spinBox->setSingleStep(0.01);
@ -102,6 +103,7 @@ QLayout* EncTtsCfgGui::createWidgets(EncTtsSetting* setting)
case EncTtsSetting::eINT:
{
QSpinBox *spinBox = new QSpinBox(this);
spinBox->setAccessibleName(setting->name());
spinBox->setMinimum(setting->min().toInt());
spinBox->setMaximum(setting->max().toInt());
spinBox->setValue(setting->current().toInt());
@ -112,6 +114,7 @@ QLayout* EncTtsCfgGui::createWidgets(EncTtsSetting* setting)
case EncTtsSetting::eSTRING:
{
QLineEdit *lineEdit = new QLineEdit(this);
lineEdit->setAccessibleName(setting->name());
lineEdit->setText(setting->current().toString());
connect(lineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateSetting()));
value = lineEdit;
@ -125,6 +128,7 @@ QLayout* EncTtsCfgGui::createWidgets(EncTtsSetting* setting)
case EncTtsSetting::eSTRINGLIST:
{
QComboBox *comboBox = new QComboBox(this);
comboBox->setAccessibleName(setting->name());
comboBox->addItems(setting->list());
int index = comboBox->findText(setting->current().toString());
comboBox->setCurrentIndex(index);
@ -135,6 +139,7 @@ QLayout* EncTtsCfgGui::createWidgets(EncTtsSetting* setting)
case EncTtsSetting::eBOOL:
{
QCheckBox *checkbox = new QCheckBox(this);
checkbox->setAccessibleName(setting->name());
checkbox->setCheckState(setting->current().toBool() == true ? Qt::Checked : Qt::Unchecked);
connect(checkbox,SIGNAL(stateChanged(int)),this,SLOT(updateSetting()));
value = checkbox;

View file

@ -37,7 +37,11 @@
</widget>
</item>
<item row="1" column="1" colspan="2" >
<widget class="QLineEdit" name="lineTalkFolder" />
<widget class="QLineEdit" name="lineTalkFolder" >
<property name="accessibleName" >
<string>Talkfile Folder</string>
</property>
</widget>
</item>
<item row="1" column="3" >
<widget class="QPushButton" name="buttonBrowse" >