annotate layer/SliceableLayer.h @ 1509:8145a9c4c253

The default key frame map is not working well at the moment, because its extents are not being properly updated as the models they depend on are loaded. Leave it empty for now.
author Chris Cannam
date Tue, 17 Sep 2019 12:50:34 +0100
parents 11a150e65ee1
children 4eafe5a1b655
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@1469 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@1469 45 */
Chris@193 46 };
Chris@193 47
Chris@193 48 #endif
Chris@193 49
Chris@193 50
Chris@193 51