comparison layer/Layer.h @ 1566:1f80a514ce29

Merge from branch spectrogram-export
author Chris Cannam
date Fri, 10 Jan 2020 14:54:27 +0000
parents a0b2f3b4dd2f
children 073ef72e8e60
comparison
equal deleted inserted replaced
1553:76e4302a3fc2 1566:1f80a514ce29
69 * Return the ID of the source model for the model represented in 69 * Return the ID of the source model for the model represented in
70 * this layer. If the model has no other source, or there is no 70 * this layer. If the model has no other source, or there is no
71 * model here, return None. 71 * model here, return None.
72 */ 72 */
73 ModelId getSourceModel() const; 73 ModelId getSourceModel() const;
74
75 /**
76 * Return the ID of a model representing the contents of this
77 * layer in a form suitable for export to a tabular file format
78 * such as CSV.
79 *
80 * In most cases this will be the same as returned by
81 * getModel(). The exceptions are those layers such as
82 * SpectrogramLayer, that are "only" alternative views of
83 * time-domain sample data. For such layers, getModel() will
84 * return the backing time-domain data, for example as a
85 * ReadOnlyWaveFileModel; but getExportModel() will return a
86 * model, possibly "local to" the layer, which adapts this into
87 * the form shown in the layer for a given view so that the export
88 * matches the layer's visible contents.
89 *
90 * Because this is supposed to match the contents of the view
91 * rather than the backing model, it's necessary to pass in a view
92 * (or LayerGeometryProvider) so that the layer can retrieve its
93 * vertical extents for export.
94 */
95 virtual ModelId getExportModel(LayerGeometryProvider *) const {
96 return getModel();
97 }
74 98
75 /** 99 /**
76 * Return a zoom constraint object defining the supported zoom 100 * Return a zoom constraint object defining the supported zoom
77 * levels for this layer. If this returns zero, the layer will 101 * levels for this layer. If this returns zero, the layer will
78 * support any integer zoom level. 102 * support any integer zoom level.