box->toggle(SchemeDefault);
}
-#ifndef Q_OS_SYMBIAN
+#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN)
QLabel *orientationLabel = new QLabel(tr("Orientation:"), contents);
layout->addWidget(orientationLabel);
orientationBox = new ToolButtonBox(this);
} else {
orientationBox->toggle(OrientationLandscape);
}
-#endif // !Q_OS_SYMBIAN
+#endif // defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN)
layout->addStretch();
scroller->setWidget(contents);
void SettingsWindow::onOrientationButtonClicked(int id)
{
-#ifdef Q_WS_MAEMO_5
- Q_UNUSED(id);
-#else
QString orientation;
switch (id) {
case OrientationLandscape:
break;
}
Settings::instance()->setValue("orientation", orientation);
-#endif // Q_WS_MAEMO_5
}
void SettingsWindow::closeEvent(QCloseEvent *e)
Settings *settings = Settings::instance();
settings->setValue("zoom", zoomSlider->value());
settings->setValue("font", fontButton->currentFont().family());
-#ifndef Q_OS_SYMBIAN
settings->setValue("orientation",
(orientationBox->checkedId() == OrientationLandscape)?
"landscape": "portrait");
-#endif // Q_OS_SYMBIAN
e->accept();
}