Chris@394: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@394: Chris@394: /* Chris@394: Sonic Visualiser Chris@394: An audio file viewer and annotation editor. Chris@394: Centre for Digital Music, Queen Mary, University of London. Chris@394: This file copyright 2006 Chris Cannam and QMUL. Chris@394: Chris@394: This program is free software; you can redistribute it and/or Chris@394: modify it under the terms of the GNU General Public License as Chris@394: published by the Free Software Foundation; either version 2 of the Chris@394: License, or (at your option) any later version. See the file Chris@394: COPYING included with this distribution for more information. Chris@394: */ Chris@394: Chris@394: #ifndef _VIEW_MANAGER_BASE_H_ Chris@394: #define _VIEW_MANAGER_BASE_H_ Chris@394: Chris@394: #include Chris@394: Chris@394: #include "Selection.h" Chris@394: Chris@394: class AudioPlaySource; Chris@394: Chris@394: /** Chris@394: * Base class for ViewManager, with no GUI content. This should Chris@394: * define all of the ViewManager interface that e.g. audio I/O classes Chris@394: * need to refer to. Chris@394: */ Chris@394: Chris@394: class ViewManagerBase : public QObject Chris@394: { Chris@394: Q_OBJECT Chris@394: Chris@394: public: Chris@396: virtual ~ViewManagerBase(); Chris@396: Chris@394: virtual void setAudioPlaySource(AudioPlaySource *source) = 0; Chris@394: Chris@394: virtual size_t alignPlaybackFrameToReference(size_t) const = 0; Chris@394: virtual size_t alignReferenceToPlaybackFrame(size_t) const = 0; Chris@394: Chris@394: virtual const MultiSelection &getSelection() const = 0; Chris@394: virtual const MultiSelection::SelectionList &getSelections() const = 0; Chris@394: virtual size_t constrainFrameToSelection(size_t frame) const = 0; Chris@394: Chris@394: virtual Selection getContainingSelection Chris@394: (size_t frame, bool defaultToFollowing) const = 0; Chris@394: Chris@394: virtual bool getPlayLoopMode() const = 0; Chris@394: virtual bool getPlaySelectionMode() const = 0; Chris@394: virtual bool getPlaySoloMode() const = 0; Chris@394: virtual bool getAlignMode() const = 0; Chris@394: Chris@394: signals: Chris@394: /** Emitted when the selection has changed. */ Chris@394: void selectionChanged(); Chris@394: Chris@394: /** Emitted when the play loop mode has been changed. */ Chris@394: void playLoopModeChanged(); Chris@394: void playLoopModeChanged(bool); Chris@394: Chris@394: /** Emitted when the play selection mode has been changed. */ Chris@394: void playSelectionModeChanged(); Chris@394: void playSelectionModeChanged(bool); Chris@394: Chris@394: /** Emitted when the play solo mode has been changed. */ Chris@394: void playSoloModeChanged(); Chris@394: void playSoloModeChanged(bool); Chris@394: Chris@394: /** Emitted when the alignment mode has been changed. */ Chris@394: void alignModeChanged(); Chris@394: void alignModeChanged(bool); Chris@394: }; Chris@394: Chris@394: #endif Chris@394: