X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=bookview.cpp;h=9c2ed9ec006fcd09371f9372f14b60c922a69a6b;hb=a19dd9d0cc0263e5fe354a2df63e82f30f30faf5;hp=c28bc879b317d4b6aef2e1c554b7c73a4bfcc356;hpb=51791f2941458065f5859d7dd8b838e651d76bcd;p=dorian diff --git a/bookview.cpp b/bookview.cpp index c28bc87..9c2ed9e 100644 --- a/bookview.cpp +++ b/bookview.cpp @@ -99,7 +99,7 @@ void BookView::loadContent(int index) else { loaded = false; decorated = false; - emit chapterLoadStart(index); + emit partLoadStart(index); load(QUrl(contentFile)); } contentIndex = index; @@ -173,12 +173,12 @@ void BookView::goToBookmark(const Book::Bookmark &bookmark) { Trace t("BookView::goToBookmark"); if (mBook) { - if (bookmark.chapter != contentIndex) { - t.trace(QString("Loading new chapter %1").arg(bookmark.chapter)); - mBook->setLastBookmark(bookmark.chapter, bookmark.pos); + if (bookmark.part != contentIndex) { + t.trace(QString("Loading new part %1").arg(bookmark.part)); + mBook->setLastBookmark(bookmark.part, bookmark.pos); restorePositionAfterLoad = true; positionAfterLoad = bookmark.pos; - loadContent(bookmark.chapter); + loadContent(bookmark.part); } else { goToPosition(bookmark.pos); } @@ -195,7 +195,7 @@ void BookView::onLoadFinished(bool ok) loaded = true; addNavigationBar(); onSettingsChanged("scheme"); - emit chapterLoadEnd(contentIndex); + emit partLoadEnd(contentIndex); } void BookView::onSettingsChanged(const QString &key) @@ -235,7 +235,7 @@ void BookView::paintEvent(QPaintEvent *e) QPixmap bookmarkPixmap = QPixmap::fromImage(bookmarkImage); QPainter painter(this); foreach (Book::Bookmark b, mBook->bookmarks()) { - if (b.chapter != contentIndex) { + if (b.part != contentIndex) { continue; } int height = contentsHeight;