QVariant ret = page()->mainFrame()->evaluateJavaScript(
QString("window.location='") + fragment + "'");
qDebug() << ret;
- // FIXME: setLastBookmark();
}
}
void BookView::goPreviousPage()
{
QWebFrame *frame = page()->mainFrame();
- int pos = frame->scrollPosition().y();
- frame->scroll(0, -(height() - 19));
+ const int pos = frame->scrollPosition().y();
+ frame->scroll(0, -1);
if (pos == frame->scrollPosition().y()) {
if (contentIndex > 0) {
Book::Bookmark bookmark(contentIndex - 1, 1.0);
}
} else {
showProgress();
+ QPropertyAnimation *slide =
+ new QPropertyAnimation(frame, "scrollPosition");
+ const QPoint *offset = new QPoint(0, height() - 18);
+ slide->setDuration(400);
+ slide->setStartValue(frame->scrollPosition());
+ slide->setEndValue(frame->scrollPosition() - *offset);
+ slide->setEasingCurve(QEasingCurve::OutQuad);
+ slide->start(QAbstractAnimation::DeleteWhenStopped);
+ delete offset;
}
}
{
TRACE;
QWebFrame *frame = page()->mainFrame();
- int pos = frame->scrollPosition().y();
- frame->scroll(0, height() - 19);
+ const int pos = frame->scrollPosition().y();
+ frame->scroll(0, 1);
if (pos == frame->scrollPosition().y()) {
goNext();
} else {
showProgress();
+ QPropertyAnimation *slide =
+ new QPropertyAnimation(frame, "scrollPosition");
+ const QPoint *offset = new QPoint(0, (height() - 18));
+ slide->setDuration(400);
+ slide->setStartValue(frame->scrollPosition());
+ slide->setEndValue(frame->scrollPosition() + *offset);
+ slide->setEasingCurve(QEasingCurve::OutQuad);
+ slide->start(QAbstractAnimation::DeleteWhenStopped);
+ delete offset;
}
}
# FIXME: Package header for Qt 4.6.2:
packageheader = \
- "$${LITERAL_HASH}{\"Dorian\"},(0xA89FC85B),0,4,6" \
+ "$${LITERAL_HASH}{\"Dorian\"},(0xA89FC85B),0,4,7" \
"[0x101F7961],0,0,0,{\"S60ProductID\"}" \
"[0x102032BE],0,0,0,{\"S60ProductID\"}" \
"[0x102752AE],0,0,0,{\"S60ProductID\"}" \
default_deployment.pkg_prerules = packageheader
# FIXME: Package header for Qt 4.6.3 or later:
- # packageheader = "$${LITERAL_HASH}{\"Dorian\"},(0xA89FC85B),0,4,6"
+ # packageheader = "$${LITERAL_HASH}{\"Dorian\"},(0xA89FC85B),0,4,7"
# my_deployment.pkg_prerules = packageheader
# DEPLOYMENT += my_deployment
Illustrations by Frederick S. Church and James H. Moser. New York: D. Appleton
and Company, 1881. The cover image is in the public domain in the United
States: http://commons.wikimedia.org/wiki/File:Brer_Rabbit_cover,_1881.jpg.
+
+Smooth paging patch by Felix Braun <Felix.Braun@mail.McGill.ca>, released
+under the GNU GPL version 3.