diff options
author | Javier <dev.git@javispedro.com> | 2015-06-18 17:11:01 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-06-18 17:11:01 +0200 |
commit | e6b32e719881757230398269a30e49a8e80975a6 (patch) | |
tree | 91b8ac29cd1d6e85449ff0ed723b61becc5e4324 | |
parent | c600a58dda6e81d09f9f0f82230005477ddd79ef (diff) | |
download | scribiu-e6b32e719881757230398269a30e49a8e80975a6.tar.gz scribiu-e6b32e719881757230398269a30e49a8e80975a6.zip |
Synchronize zoom value back to zoom slider
-rw-r--r-- | mainwindow.ui | 29 | ||||
-rw-r--r-- | notebookview.cc | 2 | ||||
-rw-r--r-- | 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 @@ <addaction name="separator"/> <addaction name="actionQuit"/> </widget> - <widget class="QMenu" name="menu_Help"> + <widget class="QMenu" name="menuHelp"> <property name="title"> <string>&Help</string> </property> <addaction name="actionAbout"/> </widget> <addaction name="menuFile"/> - <addaction name="menu_Help"/> + <addaction name="menuHelp"/> </widget> <widget class="QStatusBar" name="statusBar"/> <action name="actionQuit"> @@ -387,7 +387,9 @@ </action> <action name="actionAbout"> <property name="icon"> - <iconset theme="help-about"/> + <iconset theme="help-about"> + <normaloff/> + </iconset> </property> <property name="text"> <string>About...</string> @@ -403,6 +405,7 @@ <slots> <signal>curPageChanged()</signal> <signal>paperReplayRequested(QString,qint64)</signal> + <signal>zoomChanged(int)</signal> <slot>setZoom(int)</slot> <slot>prevPage()</slot> <slot>nextPage()</slot> @@ -648,8 +651,8 @@ <slot>handleAbout()</slot> <hints> <hint type="sourcelabel"> - <x>358</x> - <y>193</y> + <x>-1</x> + <y>-1</y> </hint> <hint type="destinationlabel"> <x>358</x> @@ -657,6 +660,22 @@ </hint> </hints> </connection> + <connection> + <sender>notebookView</sender> + <signal>zoomChanged(int)</signal> + <receiver>zoomSlider</receiver> + <slot>setValue(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>361</x> + <y>193</y> + </hint> + <hint type="destinationlabel"> + <x>671</x> + <y>42</y> + </hint> + </hints> + </connection> </connections> <slots> <slot>handleNotebookSelected(QModelIndex)</slot> 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: |