X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=settingswindow.cpp;h=4bece6138b4e929c839ccb2cb2047f82f2ea9ab9;hb=fb0f700559dc6ae38e4544b66101d44077244839;hp=5c5dce4d24c2c8ef1e6f60dea79bf3601e8c913a;hpb=a0350a125756f86873ddd67bda42dd22759fd1e8;p=dorian diff --git a/settingswindow.cpp b/settingswindow.cpp index 5c5dce4..4bece61 100644 --- a/settingswindow.cpp +++ b/settingswindow.cpp @@ -41,10 +41,12 @@ SettingsWindow::SettingsWindow(QWidget *parent): QMainWindow(parent) layout->addWidget(backlight); backlight->setChecked(settings->value("lightson", false).toBool()); +#ifndef Q_OS_SYMBIAN QCheckBox *grabVolume = new QCheckBox(tr("Navigate with volume keys"), contents); layout->addWidget(grabVolume); grabVolume->setChecked(settings->value("usevolumekeys", false).toBool()); +#endif int zoom = Settings::instance()->value("zoom").toInt(); if (zoom < ZOOM_MIN) { @@ -65,7 +67,8 @@ SettingsWindow::SettingsWindow(QWidget *parent): QMainWindow(parent) QLabel *fontLabel = new QLabel(tr("Font:"), contents); layout->addWidget(fontLabel); QString defaultFamily = fontLabel->fontInfo().family(); - QString family = Settings::instance()->value("font", defaultFamily).toString(); + QString family = + Settings::instance()->value("font", defaultFamily).toString(); fontButton = new QFontComboBox(contents); fontButton->setCurrentFont(QFont(family)); fontButton->setEditable(false); @@ -115,9 +118,12 @@ SettingsWindow::SettingsWindow(QWidget *parent): QMainWindow(parent) setCentralWidget(scroller); - connect(backlight, SIGNAL(toggled(bool)), this, SLOT(onLightsToggled(bool))); + connect(backlight, SIGNAL(toggled(bool)), + this, SLOT(onLightsToggled(bool))); +#ifndef Q_OS_SYMBIAN connect(grabVolume, SIGNAL(toggled(bool)), this, SLOT(onGrabVolumeToggled(bool))); +#endif connect(zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(onSliderValueChanged(int))); connect(fontButton, SIGNAL(currentFontChanged(const QFont &)), @@ -126,6 +132,13 @@ SettingsWindow::SettingsWindow(QWidget *parent): QMainWindow(parent) this, SLOT(onSchemeButtonClicked(int))); connect(orientationBox, SIGNAL(buttonClicked(int)), this, SLOT(onOrientationButtonClicked(int))); + +#ifdef Q_OS_SYMBIAN + QAction *closeAction = new QAction(parent? tr("Back"): tr("Exit"), this); + closeAction->setSoftKeyRole(QAction::NegativeSoftKey); + connect(closeAction, SIGNAL(triggered()), this, SLOT(close())); + QMainWindow::addAction(closeAction); +#endif } void SettingsWindow::onSliderValueChanged(int value) @@ -136,8 +149,8 @@ void SettingsWindow::onSliderValueChanged(int value) return; } zoomLabel->setText(tr("Zoom level: %1%").arg(value)); -#ifdef Q_WS_MAEMO_5 - // Re-scaling the book view is too much for the N900 +#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN) + // Constant re-scaling of the book view is too much for mobiles #else Settings::instance()->setValue("zoom", value); #endif // Q_WS_MAEMO_5