comparison base/ViewManagerBase.h @ 394:44d1e22918f3

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