when changing settings from the Talk and Voice window also update the main widgets settings.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16668 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2008-03-14 18:27:39 +00:00
parent da6b43b25b
commit 77e036af7d
4 changed files with 14 additions and 7 deletions

View file

@ -36,7 +36,7 @@ void CreateVoiceWindow::change()
Config *cw = new Config(this,4);
cw->setSettings(settings);
cw->show();
connect(cw, SIGNAL(settingsUpdated()), this, SLOT(settingsUpdated()));
connect(cw, SIGNAL(settingsUpdated()), this, SLOT(updateSettings()));
}
void CreateVoiceWindow::accept()
@ -70,13 +70,13 @@ void CreateVoiceWindow::accept()
void CreateVoiceWindow::setSettings(RbSettings* sett)
{
settings = sett;
settingsUpdated();
updateSettings();
}
/** @brief update displayed settings
*/
void CreateVoiceWindow::settingsUpdated(void)
void CreateVoiceWindow::updateSettings(void)
{
// fill in language combobox
QStringList languages = settings->allLanguages();
@ -118,7 +118,7 @@ void CreateVoiceWindow::settingsUpdated(void)
else
ui.labelEncProfile->setText(tr("Selected Encoder: <b>%1</b>").arg("Invalid encoder configuration!"));
ui.wavtrimthreshold->setValue(settings->wavtrimTh());
emit settingsUpdated();
}

View file

@ -38,6 +38,9 @@ class CreateVoiceWindow : public QDialog
public slots:
void accept(void);
void change(void);
void updateSettings(void);
signals:
void settingsUpdated(void);
private:

View file

@ -68,7 +68,7 @@ void InstallTalkWindow::change()
Config *cw = new Config(this,4);
cw->setSettings(settings);
cw->show();
connect(cw, SIGNAL(settingsUpdated()), this, SLOT(settingsUpdated()));
connect(cw, SIGNAL(settingsUpdated()), this, SLOT(updateSettings()));
}
void InstallTalkWindow::accept()
@ -109,11 +109,11 @@ void InstallTalkWindow::accept()
void InstallTalkWindow::setSettings(RbSettings* sett)
{
settings = sett;
settingsUpdated();
updateSettings();
}
void InstallTalkWindow::settingsUpdated(void)
void InstallTalkWindow::updateSettings(void)
{
QString ttsName = settings->curTTS();
TTSBase* tts = TTSBase::getTTS(ttsName);
@ -136,5 +136,6 @@ void InstallTalkWindow::settingsUpdated(void)
ui.labelEncProfile->setText(tr("Selected Encoder: <b>%1</b>").arg("Invalid encoder configuration!"));
setTalkFolder(settings->lastTalkedFolder());
emit settingsUpdated();
}

View file

@ -41,6 +41,9 @@ class InstallTalkWindow : public QDialog
private slots:
void browseFolder(void);
void setTalkFolder(QString folder);
void updateSettings(void);
signals:
void settingsUpdated(void);
private: