mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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:
parent
b386406707
commit
18e74c9d81
4 changed files with 21 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue