aboutsummaryrefslogtreecommitdiff
path: root/notebookview.cc
diff options
context:
space:
mode:
Diffstat (limited to 'notebookview.cc')
-rw-r--r--notebookview.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/notebookview.cc b/notebookview.cc
index aa37ac9..9553451 100644
--- a/notebookview.cc
+++ b/notebookview.cc
@@ -88,6 +88,11 @@ void NotebookView::setZoom(int zoom)
}
}
+void NotebookView::requestPaperReplay(const QString &file, qint64 time)
+{
+ emit paperReplayRequested(file, time);
+}
+
void NotebookView::clear()
{
removePages();
@@ -158,7 +163,7 @@ bool NotebookView::createPages()
if (pens.isEmpty()) return false;
// Failure to open paperreplay data is not fatal
- _replay->open(_replayPath, pens[0], _nb->guid());
+ bool haveReplay = _replay->open(_replayPath, pens[0], _nb->guid());
QList<int> pagesWithStrokes = _nb->pagesWithStrokes(pens.first());
Q_ASSERT(_pages.isEmpty());
@@ -166,7 +171,7 @@ bool NotebookView::createPages()
_maxPageSize.setWidth(0);
_maxPageSize.setHeight(0);
foreach (int pageNum, pagesWithStrokes) {
- PageItem *page = new PageItem(_nb, pageNum);
+ PageItem *page = new PageItem(_nb, haveReplay ? _replay : 0, pageNum);
QRectF box = page->boundingRect();
if (box.width() > _maxPageSize.width()) {
_maxPageSize.setWidth(box.width());