Mercurial > hg > svgui
diff view/ViewManager.h @ 1324:13d9b422f7fe zoom
Merge from default branch
author | Chris Cannam |
---|---|
date | Mon, 17 Sep 2018 13:51:31 +0100 |
parents | fc9d9f1103fa |
children | 646e713a4632 |
line wrap: on
line diff
--- a/view/ViewManager.h Mon Dec 12 15:18:52 2016 +0000 +++ b/view/ViewManager.h Mon Sep 17 13:51:31 2018 +0100 @@ -13,8 +13,8 @@ COPYING included with this distribution for more information. */ -#ifndef _VIEW_MANAGER_H_ -#define _VIEW_MANAGER_H_ +#ifndef SV_VIEW_MANAGER_H +#define SV_VIEW_MANAGER_H #include <QObject> #include <QTimer> @@ -29,6 +29,7 @@ #include "base/BaseTypes.h" class AudioPlaySource; +class AudioRecordTarget; class Model; enum PlaybackFollowMode { @@ -80,8 +81,10 @@ virtual ~ViewManager(); void setAudioPlaySource(AudioPlaySource *source); + void setAudioRecordTarget(AudioRecordTarget *target); bool isPlaying() const; + bool isRecording() const; sv_frame_t getGlobalCentreFrame() const; // the set method is a slot int getGlobalZoom() const; @@ -127,13 +130,13 @@ Clipboard &getClipboard() { return m_clipboard; } enum ToolMode { - NavigateMode, - SelectMode, + NavigateMode, + SelectMode, EditMode, - DrawMode, - EraseMode, - MeasureMode, - NoteEditMode //GF: Tonioni: this tool mode will be context sensitive. + DrawMode, + EraseMode, + MeasureMode, + NoteEditMode //GF: Tonioni: this tool mode will be context sensitive. }; ToolMode getToolMode() const { return m_toolMode; } void setToolMode(ToolMode mode); @@ -190,7 +193,7 @@ * display. This is relevant to hi-dpi systems that do not do * pixel doubling (i.e. Windows and Linux rather than OS/X). */ - int scalePixelSize(int pixels); + static int scalePixelSize(int pixels); enum OverlayMode { NoOverlays, @@ -216,6 +219,9 @@ bool shouldShowVerticalColourScale() const { return m_overlayMode == AllOverlays; } + bool shouldShowHorizontalValueScale() const { // for layers where x != time + return m_overlayMode != NoOverlays; + } bool shouldShowSelectionExtents() const { return m_overlayMode != NoOverlays && m_overlayMode != GlobalOverlays; } @@ -254,8 +260,8 @@ /** Emitted when the playback frame changes. */ void playbackFrameChanged(sv_frame_t frame); - /** Emitted when the output levels change. Values in range 0.0 -> 1.0. */ - void outputLevelsChanged(float left, float right); + /** Emitted when the output or record levels change. Values in range 0.0 -> 1.0. */ + void monitoringLevelsChanged(float left, float right); /** Emitted whenever the selection has changed. */ void selectionChanged(); @@ -305,6 +311,7 @@ void setGlobalCentreFrame(sv_frame_t); void setPlaybackFrame(sv_frame_t); void playStatusChanged(bool playing); + void recordStatusChanged(bool recording); protected slots: void checkPlayStatus(); @@ -313,6 +320,8 @@ protected: AudioPlaySource *m_playSource; + AudioRecordTarget *m_recordTarget; + sv_frame_t m_globalCentreFrame; int m_globalZoom; mutable sv_frame_t m_playbackFrame; @@ -342,16 +351,16 @@ class SetSelectionCommand : public Command { public: - SetSelectionCommand(ViewManager *vm, const MultiSelection &ms); - virtual ~SetSelectionCommand(); - virtual void execute(); - virtual void unexecute(); - virtual QString getName() const; + SetSelectionCommand(ViewManager *vm, const MultiSelection &ms); + virtual ~SetSelectionCommand(); + virtual void execute(); + virtual void unexecute(); + virtual QString getName() const; protected: - ViewManager *m_vm; - MultiSelection m_oldSelection; - MultiSelection m_newSelection; + ViewManager *m_vm; + MultiSelection m_oldSelection; + MultiSelection m_newSelection; }; OverlayMode m_overlayMode;