annotate layer/SliceableLayer.h @ 335:2f83b6e3b8ca
* Add Erase tool and mode
* Add icons for Normalize buttons in property boxes, and for Show Peaks
* Add support for velocity in notes -- not yet reflected in display or
editable in the note edit dialog, but they are imported from MIDI,
played, and exported
* Begin work on making pastes align pasted times (subtler than I thought)
author |
Chris Cannam |
date |
Fri, 23 Nov 2007 16:48:23 +0000 |
parents |
57c2350a8c40 |
children |
05d614f6e46d |
rev |
line source |
Chris@193
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@193
|
2
|
Chris@193
|
3 /*
|
Chris@193
|
4 Sonic Visualiser
|
Chris@193
|
5 An audio file viewer and annotation editor.
|
Chris@193
|
6 Centre for Digital Music, Queen Mary, University of London.
|
Chris@193
|
7 This file copyright 2007 QMUL.
|
Chris@193
|
8
|
Chris@193
|
9 This program is free software; you can redistribute it and/or
|
Chris@193
|
10 modify it under the terms of the GNU General Public License as
|
Chris@193
|
11 published by the Free Software Foundation; either version 2 of the
|
Chris@193
|
12 License, or (at your option) any later version. See the file
|
Chris@193
|
13 COPYING included with this distribution for more information.
|
Chris@193
|
14 */
|
Chris@193
|
15
|
Chris@193
|
16 #ifndef _SLICEABLE_LAYER_H_
|
Chris@193
|
17 #define _SLICEABLE_LAYER_H_
|
Chris@193
|
18
|
Chris@193
|
19 #include "Layer.h"
|
Chris@193
|
20
|
Chris@193
|
21 /**
|
Chris@193
|
22 * Base class for layers that can be sliced, that is, that contain
|
Chris@193
|
23 * models appropriate for use in a SliceLayer.
|
Chris@193
|
24 */
|
Chris@193
|
25
|
Chris@193
|
26 class SliceableLayer : public Layer
|
Chris@193
|
27 {
|
Chris@193
|
28 Q_OBJECT
|
Chris@193
|
29
|
Chris@193
|
30 public:
|
Chris@193
|
31 // Get a model that can be sliced, i.e. a
|
Chris@193
|
32 // DenseThreeDimensionalModel. This may be the layer's usual
|
Chris@193
|
33 // model, or it may be a model derived from it (e.g. FFTModel in a
|
Chris@193
|
34 // spectrogram that was constructed from a DenseTimeValueModel).
|
Chris@193
|
35 // The SliceableLayer retains ownership of the model, and will
|
Chris@193
|
36 // emit sliceableModelReplaced if it is about to become invalid.
|
Chris@193
|
37 virtual const Model *getSliceableModel() const = 0;
|
Chris@193
|
38
|
Chris@193
|
39 signals:
|
Chris@193
|
40 // Emitted when a model that was obtained through
|
Chris@193
|
41 // getSliceableModel is about to be deleted. If replacement is
|
Chris@193
|
42 // non-NULL, it may be used instead.
|
Chris@193
|
43 void sliceableModelReplaced(const Model *modelToBeReplaced,
|
Chris@193
|
44 const Model *replacement);
|
Chris@193
|
45 };
|
Chris@193
|
46
|
Chris@193
|
47 #endif
|
Chris@193
|
48
|
Chris@193
|
49
|
Chris@193
|
50
|