// Tool bar actions
-#ifdef Q_OS_SYMBIAN
- fullScreenAction = addToolBarAction(this, SLOT(showBig()),
- "view-fullscreen", tr("Full screen"));
-#endif
-
chaptersAction = addToolBarAction(this, SLOT(showChapters()),
"chapters", tr("Chapters"), true);
bookmarksAction = addToolBarAction(this, SLOT(showBookmarks()),
"bookmarks", tr("Bookmarks"), true);
- infoAction = addToolBarAction(this, SLOT(showInfo()),
- "info", tr("Book info"), true);
libraryAction = addToolBarAction(this, SLOT(showLibrary()),
- "library", tr("Library"), true);
+ "library", tr("Library"), false);
#ifdef Q_WS_MAEMO_5
settingsAction = menuBar()->addAction(tr("Settings"));
connect(settingsAction, SIGNAL(triggered()), this, SLOT(showSettings()));
devToolsAction = menuBar()->addAction(tr("Developer"));
connect(devToolsAction, SIGNAL(triggered()), this, SLOT(showDevTools()));
- QAction *aboutAction = menuBar()->addAction(tr("About"));
- connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
#else
settingsAction = addToolBarAction(this, SLOT(showSettings()),
"preferences-system", tr("Settings"));
devToolsAction = addToolBarAction(this, SLOT(showDevTools()),
"developer", tr("Developer"));
- addToolBarAction(this, SLOT(about()), "about", tr("About"));
-#endif // Q_WS_MAEMO_5
+#endif
-#ifndef Q_OS_SYMBIAN
- addToolBarSpace();
+ rotateAction = addToolBarAction(this, SLOT(rotate()),
+ "rotate", tr("Rotate"), true);
+ // addToolBarSpace();
fullScreenAction = addToolBarAction(this, SLOT(showBig()),
- "view-fullscreen", tr("Full screen"));
+ "view-fullscreen", tr("Full screen"), true);
+
+#if defined(Q_WS_MAEMO_5)
+ QAction *aboutAction = menuBar()->addAction(tr("About"));
+ connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
#else
- (void)addToolBarAction(this, SLOT(close()), "", tr("Exit"));
-#endif
+ addToolBarAction(this, SLOT(about()), "about", tr("About"));
+#endif // defined(Q_WS_MAEMO_5)
+
+#if defined(Q_OS_SYMBIAN)
+ (void)addToolBarAction(this, SLOT(close()), "", tr("Exit"), false);
+#endif // defined(Q_OS_SYMBIAN)
// Decorations
prev = new TranslucentButton("back", this);
(new SettingsWindow(this))->show();
}
-void MainWindow::showInfo()
+void MainWindow::rotate()
{
- if (mCurrent.isValid()) {
- (new InfoDialog(Library::instance()->book(mCurrent), this, false))->
- exec();
- }
+ QString current = Settings::instance()->value("orientation",
+ Platform::instance()->defaultOrientation()).toString();
+ QString target = (current == "landscape")? "portrait": "landscape";
+ Settings::instance()->setValue("orientation", target);
}
void MainWindow::showDevTools()
label->setTextFormat(Qt::RichText);
label->setOpenExternalLinks(true);
label->setWordWrap(true);
- label->setText(tr("<b>Dorian %1</b><br><br>Copyright © 2010 "
- "Akos Polster <akos@pipacs.com><br>"
- "Licensed under GNU General Public License, Version 3<br>"
- "Source code:<br><a href='http://dorian.garage.maemo.org/'>"
- "dorian.garage.maemo.org</a>").arg(version));
+ label->setText(tr("<b>Dorian %1</b><br><br>"
+ "Copyright © 2010-2011 by "
+ "Akos Polster <akos@pipacs.com><br><br>"
+ "Licensed under GNU General Public License, Version 3<br><br>"
+ "<a href='http://dorian.garage.maemo.org/'>"
+ "dorian.garage.maemo.org</a><br><br>"
+ ).arg(version));
aboutDialog->addWidget(label);
aboutDialog->addStretch();
aboutDialog->show();