"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"), false);
"developer", tr("Developer"));
#endif
- addToolBarSpace();
+ rotateAction = addToolBarAction(this, SLOT(rotate()),
+ "rotate", tr("Rotate"), true);
+ // addToolBarSpace();
fullScreenAction = addToolBarAction(this, SLOT(showBig()),
"view-fullscreen", tr("Full screen"), true);
// Re-parent children
fullScreenWindow->leaveBookView();
takeBookView(view, prog, prev, next);
-
fullScreenWindow->hide();
- show();
-#if defined(Q_OS_SYMBIAN)
- activateWindow();
+#ifdef Q_OS_SYMBIAN
+ view->setFixedSize(Platform::availableSize().width(),
+ Platform::availableSize().height() - Platform::softKeyHeight());
#endif
+ show();
}
void MainWindow::showBig()
// Re-parent children
leaveBookView();
fullScreenWindow->takeBookView(view, prog, prev, next);
-
- fullScreenWindow->showFullScreen();
hide();
#ifdef Q_OS_SYMBIAN
- fullScreenWindow->activateWindow();
+ view->setFixedSize(Platform::size());
#endif
+ fullScreenWindow->showFullScreen();
}
void MainWindow::setCurrentBook(const QModelIndex ¤t)
(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();