Mercurial > hg > svgui
annotate layer/SliceableLayer.h @ 1553:76e4302a3fc2
Fix note numbering - ensure stable across whole track (as it used to be, but without scanning all notes in paint in order to do that)
| author | Chris Cannam |
|---|---|
| date | Fri, 22 Nov 2019 14:12:50 +0000 |
| parents | 4eafe5a1b655 |
| children |
| 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@1407 | 16 #ifndef SV_SLICEABLE_LAYER_H |
| Chris@1407 | 17 #define SV_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@1469 | 37 virtual ModelId getSliceableModel() const = 0; |
| Chris@193 | 38 }; |
| Chris@193 | 39 |
| Chris@193 | 40 #endif |
| Chris@193 | 41 |
| Chris@193 | 42 |
| Chris@193 | 43 |
