Fixed searchclients to handle new Google URLs correctly; added GUI
[movie-schedule] / src / ui / mainwindow.cpp
index d78aae4..d4e9293 100644 (file)
@@ -75,6 +75,7 @@ MainWindow::MainWindow(const CinemaSchedule *cinema_schedule, QWidget *parent) :
     ui->menubar->addAction(tr("Movies"), this, SIGNAL(SearchMovies()));
     ui->menubar->addAction(tr("Theaters"), this, SIGNAL(SearchTheaters()));
     ui->menubar->addAction(tr("Location"), this, SIGNAL(OpenLocationDialog()));
+    ui->menubar->addAction(tr("Options"), this, SIGNAL(OpenOptionsDialog()));
     ui->menubar->addAction(tr("About"), this, SIGNAL(OpenAboutDialog()));
     _theater_context_menu = new QMenu(this);
     _theater_phone_call = _theater_context_menu->addAction(tr("Call By Phone"), this, SLOT(CallTheaterByPhone()));
@@ -89,6 +90,25 @@ MainWindow::~MainWindow()
     delete ui;
 }
 
+void MainWindow::SetOrientation(Settings::OrientationMode orientation)
+{
+#ifdef Q_WS_MAEMO_5
+    switch (orientation) {
+    case Settings::LANDSCAPE:
+        setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
+        break;
+    case Settings::PORTRAIT:
+        setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+        break;
+    case Settings::AUTOROTATION:
+        setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+        break;
+    }
+#else
+    Q_UNUSED(orientation);
+#endif
+}
+
 void MainWindow::SetLocation(Location location)
 {
     _location = location;