Mercurial > hg > svgui
diff view/ViewManager.cpp @ 133:9e6b3e239b9d
* Add zoom thumbwheels to Pane. Implement horizontal thumbwheel, and
vertical depending on layer type (supported for waveform and spectrogram,
though wrong for log-scale spectrogram at the moment).
* Add bare bones of a spectrum layer.
* Add window icon
* Add shortcut for "insert time instant" on laptops without keypad enter (";")
* Delete FFT processing thread when it exits (at least, next time we're asked
for something interesting)
* Get audio file extensions from the file readers, and thus from libsndfile for
the wave file reader -- leads to rather a wide combo box in file dialog though
* Better refresh order for spectrogram (redraw centre section first)
author | Chris Cannam |
---|---|
date | Fri, 04 Aug 2006 17:01:37 +0000 |
parents | 33929e0c3c6b |
children | dbd34ff746c7 |
line wrap: on
line diff
--- a/view/ViewManager.cpp Thu Aug 03 15:40:11 2006 +0000 +++ b/view/ViewManager.cpp Fri Aug 04 17:01:37 2006 +0000 @@ -18,6 +18,8 @@ #include "data/model/Model.h" #include "base/CommandHistory.h" +#include <QSettings> + #include <iostream> // #define DEBUG_VIEW_MANAGER 1 @@ -34,8 +36,17 @@ m_toolMode(NavigateMode), m_playLoopMode(false), m_playSelectionMode(false), - m_overlayMode(BasicOverlays) + m_overlayMode(BasicOverlays), + m_zoomWheelsEnabled(true) { + QSettings settings; + settings.beginGroup("MainWindow"); + m_overlayMode = OverlayMode + (settings.value("overlay-mode", int(m_overlayMode)).toInt()); + m_zoomWheelsEnabled = + settings.value("zoom-wheels-enabled", m_zoomWheelsEnabled).toBool(); + settings.endGroup(); + connect(this, SIGNAL(centreFrameChanged(void *, unsigned long, bool)), SLOT(considerSeek(void *, unsigned long, bool))); @@ -337,6 +348,8 @@ void ViewManager::considerZoomChange(void *p, unsigned long z, bool locked) { + emit zoomLevelChanged(); + if (locked) { m_globalZoom = z; } @@ -353,9 +366,24 @@ m_overlayMode = mode; emit overlayModeChanged(); } + + QSettings settings; + settings.beginGroup("MainWindow"); + settings.setValue("overlay-mode", int(m_overlayMode)); + settings.endGroup(); } -#ifdef INCLUDE_MOCFILES -#include "ViewManager.moc.cpp" -#endif +void +ViewManager::setZoomWheelsEnabled(bool enabled) +{ + if (m_zoomWheelsEnabled != enabled) { + m_zoomWheelsEnabled = enabled; + emit zoomWheelsEnabledChanged(); + } + QSettings settings; + settings.beginGroup("MainWindow"); + settings.setValue("zoom-wheels-enabled", m_zoomWheelsEnabled); + settings.endGroup(); +} +