From e6b32e719881757230398269a30e49a8e80975a6 Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 18 Jun 2015 17:11:01 +0200 Subject: Synchronize zoom value back to zoom slider --- mainwindow.ui | 29 ++++++++++++++++++++++++----- notebookview.cc | 2 +- notebookview.h | 2 +- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/mainwindow.ui b/mainwindow.ui index 83c5105..1cfff9a 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -349,14 +349,14 @@ - + &Help - + @@ -387,7 +387,9 @@ - + + + About... @@ -403,6 +405,7 @@ curPageChanged() paperReplayRequested(QString,qint64) + zoomChanged(int) setZoom(int) prevPage() nextPage() @@ -648,8 +651,8 @@ handleAbout() - 358 - 193 + -1 + -1 358 @@ -657,6 +660,22 @@ + + notebookView + zoomChanged(int) + zoomSlider + setValue(int) + + + 361 + 193 + + + 671 + 42 + + + handleNotebookSelected(QModelIndex) diff --git a/notebookview.cc b/notebookview.cc index 3d0a964..1f97ead 100644 --- a/notebookview.cc +++ b/notebookview.cc @@ -196,7 +196,7 @@ void NotebookView::removePages() _maxPageSize.setHeight(0); if (_zoom > 100) { _zoom = 100; - emit zoomChanged(); + emit zoomChanged(_zoom); } resetTransform(); } diff --git a/notebookview.h b/notebookview.h index 2f1e50a..605db5c 100644 --- a/notebookview.h +++ b/notebookview.h @@ -61,7 +61,7 @@ public: signals: void pageNumbersChanged(); void curPageChanged(); - void zoomChanged(); + void zoomChanged(int zoom); void paperReplayRequested(const QString &file, qint64 time); public slots: -- cgit v1.2.3