*/
+#include <settings.h>
#include "settingsdialog.h"
#include "ui_settingsdialog.h"
#endif
ui(new Ui::SettingsDialog)
{
+ Settings *settings = Settings::instance();
+
ui->setupUi(this);
+
+ bool showStationPreference = settings->stationViewPreferred();
+ ui->showLastStationCheckBox->setChecked(showStationPreference);
+ connect(ui->showLastStationCheckBox, SIGNAL(toggled(bool)),
+ SLOT(showStationChanged(bool)));
+
+ bool checkingInterval = settings->checkingInterval();
+ ui->periodicUpdateCheckBox->setChecked(checkingInterval > 30000);
+ connect(ui->periodicUpdateCheckBox, SIGNAL(toggled(bool)),
+ SLOT(periodicUpdateToggled(bool)));
+#if 0
#ifdef Q_WS_MAEMO_5
ui->formLayout->addWidget(updateIntervalButton);
#endif
+#endif
}
SettingsDialog::~SettingsDialog()
{
delete ui;
}
+
+void SettingsDialog::showStationChanged(bool newValue)
+{
+ Settings *settings = Settings::instance();
+ settings->setStationViewPreferred(newValue);
+}
+
+void SettingsDialog::periodicUpdateToggled(bool checked)
+{
+ Settings *settings = Settings::instance();
+ settings->setCheckingInterval(checked ? 120000 : 0);
+}