annotate base/ViewManagerBase.h @ 1394:9ef1cc26024c

Add Range01 normalisation method to ColumnOp. This is the normalisation that is actually used in the Colour 3D Plot layer historically when column normalisation is enabled (not Max1 after all).
author Chris Cannam
date Tue, 28 Feb 2017 14:04:16 +0000
parents 8541563f1fd3
children ec9e65fcf749
rev   line source
Chris@394 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@394 2
Chris@394 3 /*
Chris@394 4 Sonic Visualiser
Chris@394 5 An audio file viewer and annotation editor.
Chris@394 6 Centre for Digital Music, Queen Mary, University of London.
Chris@394 7 This file copyright 2006 Chris Cannam and QMUL.
Chris@394 8
Chris@394 9 This program is free software; you can redistribute it and/or
Chris@394 10 modify it under the terms of the GNU General Public License as
Chris@394 11 published by the Free Software Foundation; either version 2 of the
Chris@394 12 License, or (at your option) any later version. See the file
Chris@394 13 COPYING included with this distribution for more information.
Chris@394 14 */
Chris@394 15
Chris@394 16 #ifndef _VIEW_MANAGER_BASE_H_
Chris@394 17 #define _VIEW_MANAGER_BASE_H_
Chris@394 18
Chris@394 19 #include <QObject>
Chris@394 20
Chris@394 21 #include "Selection.h"
Chris@394 22
Chris@394 23 class AudioPlaySource;
Chris@1338 24 class AudioRecordTarget;
Chris@394 25
Chris@394 26 /**
Chris@394 27 * Base class for ViewManager, with no GUI content. This should
Chris@394 28 * define all of the ViewManager interface that e.g. audio I/O classes
Chris@394 29 * need to refer to.
Chris@394 30 */
Chris@394 31
Chris@394 32 class ViewManagerBase : public QObject
Chris@394 33 {
Chris@394 34 Q_OBJECT
Chris@394 35
Chris@394 36 public:
Chris@396 37 virtual ~ViewManagerBase();
Chris@396 38
Chris@394 39 virtual void setAudioPlaySource(AudioPlaySource *source) = 0;
Chris@1338 40 virtual void setAudioRecordTarget(AudioRecordTarget *target) = 0;
Chris@394 41
Chris@1043 42 virtual sv_frame_t alignPlaybackFrameToReference(sv_frame_t) const = 0;
Chris@1043 43 virtual sv_frame_t alignReferenceToPlaybackFrame(sv_frame_t) const = 0;
Chris@394 44
Chris@394 45 virtual const MultiSelection &getSelection() const = 0;
Chris@394 46 virtual const MultiSelection::SelectionList &getSelections() const = 0;
Chris@1043 47 virtual sv_frame_t constrainFrameToSelection(sv_frame_t frame) const = 0;
Chris@394 48
Chris@394 49 virtual Selection getContainingSelection
Chris@1043 50 (sv_frame_t frame, bool defaultToFollowing) const = 0;
Chris@394 51
Chris@394 52 virtual bool getPlayLoopMode() const = 0;
Chris@394 53 virtual bool getPlaySelectionMode() const = 0;
Chris@394 54 virtual bool getPlaySoloMode() const = 0;
Chris@394 55 virtual bool getAlignMode() const = 0;
Chris@394 56
Chris@394 57 signals:
Chris@394 58 /** Emitted when the selection has changed. */
Chris@394 59 void selectionChanged();
Chris@394 60
Chris@394 61 /** Emitted when the play loop mode has been changed. */
Chris@394 62 void playLoopModeChanged();
Chris@394 63 void playLoopModeChanged(bool);
Chris@394 64
Chris@394 65 /** Emitted when the play selection mode has been changed. */
Chris@394 66 void playSelectionModeChanged();
Chris@394 67 void playSelectionModeChanged(bool);
Chris@394 68
Chris@394 69 /** Emitted when the play solo mode has been changed. */
Chris@394 70 void playSoloModeChanged();
Chris@394 71 void playSoloModeChanged(bool);
Chris@394 72
Chris@394 73 /** Emitted when the alignment mode has been changed. */
Chris@394 74 void alignModeChanged();
Chris@394 75 void alignModeChanged(bool);
Chris@394 76 };
Chris@394 77
Chris@394 78 #endif
Chris@394 79