svcore  1.9
ViewManagerBase.h
Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     Sonic Visualiser
00005     An audio file viewer and annotation editor.
00006     Centre for Digital Music, Queen Mary, University of London.
00007     This file copyright 2006 Chris Cannam and QMUL.
00008     
00009     This program is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU General Public License as
00011     published by the Free Software Foundation; either version 2 of the
00012     License, or (at your option) any later version.  See the file
00013     COPYING included with this distribution for more information.
00014 */
00015 
00016 #ifndef _VIEW_MANAGER_BASE_H_
00017 #define _VIEW_MANAGER_BASE_H_
00018 
00019 #include <QObject>
00020 
00021 #include "Selection.h"
00022 
00023 class AudioPlaySource;
00024 
00031 class ViewManagerBase : public QObject
00032 {
00033     Q_OBJECT
00034 
00035 public:
00036     virtual ~ViewManagerBase();
00037 
00038     virtual void setAudioPlaySource(AudioPlaySource *source) = 0;
00039 
00040     virtual int alignPlaybackFrameToReference(int) const = 0;
00041     virtual int alignReferenceToPlaybackFrame(int) const = 0;
00042 
00043     virtual const MultiSelection &getSelection() const = 0;
00044     virtual const MultiSelection::SelectionList &getSelections() const = 0;
00045     virtual int constrainFrameToSelection(int frame) const = 0;
00046 
00047     virtual Selection getContainingSelection
00048     (int frame, bool defaultToFollowing) const = 0;
00049 
00050     virtual bool getPlayLoopMode() const = 0;
00051     virtual bool getPlaySelectionMode() const = 0;
00052     virtual bool getPlaySoloMode() const = 0;
00053     virtual bool getAlignMode() const = 0;
00054 
00055 signals:
00057     void selectionChanged();
00058 
00060     void playLoopModeChanged();
00061     void playLoopModeChanged(bool);
00062 
00064     void playSelectionModeChanged();
00065     void playSelectionModeChanged(bool);
00066 
00068     void playSoloModeChanged();
00069     void playSoloModeChanged(bool);
00070 
00072     void alignModeChanged();
00073     void alignModeChanged(bool);
00074 };
00075 
00076 #endif
00077