lbajardsilogic@0
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
lbajardsilogic@0
|
2
|
lbajardsilogic@0
|
3 /*
|
lbajardsilogic@0
|
4 Sonic Visualiser
|
lbajardsilogic@0
|
5 An audio file viewer and annotation editor.
|
lbajardsilogic@0
|
6 Centre for Digital Music, Queen Mary, University of London.
|
lbajardsilogic@0
|
7 This file copyright 2007 QMUL.
|
lbajardsilogic@0
|
8
|
lbajardsilogic@0
|
9 This program is free software; you can redistribute it and/or
|
lbajardsilogic@0
|
10 modify it under the terms of the GNU General Public License as
|
lbajardsilogic@0
|
11 published by the Free Software Foundation; either version 2 of the
|
lbajardsilogic@0
|
12 License, or (at your option) any later version. See the file
|
lbajardsilogic@0
|
13 COPYING included with this distribution for more information.
|
lbajardsilogic@0
|
14 */
|
lbajardsilogic@0
|
15
|
lbajardsilogic@0
|
16 #ifndef _SLICEABLE_LAYER_H_
|
lbajardsilogic@0
|
17 #define _SLICEABLE_LAYER_H_
|
lbajardsilogic@0
|
18
|
lbajardsilogic@0
|
19 #include "Layer.h"
|
lbajardsilogic@0
|
20
|
lbajardsilogic@0
|
21 /**
|
lbajardsilogic@0
|
22 * Base class for layers that can be sliced, that is, that contain
|
lbajardsilogic@0
|
23 * models appropriate for use in a SliceLayer.
|
lbajardsilogic@0
|
24 */
|
lbajardsilogic@0
|
25
|
lbajardsilogic@0
|
26 class SliceableLayer : public Layer
|
lbajardsilogic@0
|
27 {
|
lbajardsilogic@0
|
28 Q_OBJECT
|
lbajardsilogic@0
|
29
|
lbajardsilogic@0
|
30 public:
|
lbajardsilogic@0
|
31 // Get a model that can be sliced, i.e. a
|
lbajardsilogic@0
|
32 // DenseThreeDimensionalModel. This may be the layer's usual
|
lbajardsilogic@0
|
33 // model, or it may be a model derived from it (e.g. FFTModel in a
|
lbajardsilogic@0
|
34 // spectrogram that was constructed from a DenseTimeValueModel).
|
lbajardsilogic@0
|
35 // The SliceableLayer retains ownership of the model, and will
|
lbajardsilogic@0
|
36 // emit sliceableModelReplaced if it is about to become invalid.
|
lbajardsilogic@0
|
37 virtual const Model *getSliceableModel() const = 0;
|
lbajardsilogic@0
|
38
|
lbajardsilogic@0
|
39 signals:
|
lbajardsilogic@0
|
40 // Emitted when a model that was obtained through
|
lbajardsilogic@0
|
41 // getSliceableModel is about to be deleted. If replacement is
|
lbajardsilogic@0
|
42 // non-NULL, it may be used instead.
|
lbajardsilogic@0
|
43 void sliceableModelReplaced(const Model *modelToBeReplaced,
|
lbajardsilogic@0
|
44 const Model *replacement);
|
lbajardsilogic@0
|
45 };
|
lbajardsilogic@0
|
46
|
lbajardsilogic@0
|
47 #endif
|
lbajardsilogic@0
|
48
|
lbajardsilogic@0
|
49
|
lbajardsilogic@0
|
50
|