svgui  1.9
SliceableLayer.h
Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     Sonic Visualiser
00005     An audio file viewer and annotation editor.
00006     Centre for Digital Music, Queen Mary, University of London.
00007     This file copyright 2007 QMUL.
00008     
00009     This program is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU General Public License as
00011     published by the Free Software Foundation; either version 2 of the
00012     License, or (at your option) any later version.  See the file
00013     COPYING included with this distribution for more information.
00014 */
00015 
00016 #ifndef _SLICEABLE_LAYER_H_
00017 #define _SLICEABLE_LAYER_H_
00018 
00019 #include "Layer.h"
00020 
00026 class SliceableLayer : public Layer
00027 {
00028     Q_OBJECT
00029 
00030 public:
00031     // Get a model that can be sliced, i.e. a
00032     // DenseThreeDimensionalModel.  This may be the layer's usual
00033     // model, or it may be a model derived from it (e.g. FFTModel in a
00034     // spectrogram that was constructed from a DenseTimeValueModel).
00035     // The SliceableLayer retains ownership of the model, and will
00036     // emit sliceableModelReplaced if it is about to become invalid.
00037     virtual const Model *getSliceableModel() const = 0;
00038 
00039 signals:
00040     // Emitted when a model that was obtained through
00041     // getSliceableModel is about to be deleted.  If replacement is
00042     // non-NULL, it may be used instead.
00043     void sliceableModelReplaced(const Model *modelToBeReplaced,
00044                                 const Model *replacement);
00045 };
00046 
00047 #endif
00048 
00049 
00050