comparison layer/Colour3DPlotLayer.h @ 25:dcdb21b62dbb

* Refactor sparse models. Previously the 1D and time-value models duplicated a lot of code; now there is a base class (SparseModel) templated on the stored point type, and the subclasses define point types with the necessary characteristics. * Add NoteModel, a new SparseModel subclass. * Reorganise local feature description display. Instead of asking the layer to draw its own, just query it for a textual description and draw that in Pane. Greatly simplifies this part of the layer code. * Add local feature descriptions to colour 3D plot and waveform layers. * Add pitch in MIDI-pitch-and-cents to spectrogram layer. * Give AudioGenerator its own mutex to shorten lock times in CallbackPlaySource. * Minor adjustments to layers menu &c
author Chris Cannam
date Thu, 02 Feb 2006 16:10:19 +0000
parents 6b794a2af3d9
children 202d1dca67d2
comparison
equal deleted inserted replaced
24:6b794a2af3d9 25:dcdb21b62dbb
41 41
42 virtual const ZoomConstraint *getZoomConstraint() const { return m_model; } 42 virtual const ZoomConstraint *getZoomConstraint() const { return m_model; }
43 virtual const Model *getModel() const { return m_model; } 43 virtual const Model *getModel() const { return m_model; }
44 virtual void paint(QPainter &paint, QRect rect) const; 44 virtual void paint(QPainter &paint, QRect rect) const;
45 45
46 virtual int getVerticalScaleWidth(QPainter &) const;
47 virtual void paintVerticalScale(QPainter &paint, QRect rect) const;
48
49 virtual QString getFeatureDescription(QPoint &) const;
50
46 virtual int getNearestFeatureFrame(int frame, 51 virtual int getNearestFeatureFrame(int frame,
47 size_t &resolution, 52 size_t &resolution,
48 bool snapRight = true) const; 53 bool snapRight = true) const;
54
55 virtual bool isLayerScrollable() const;
49 56
50 void setModel(const DenseThreeDimensionalModel *model); 57 void setModel(const DenseThreeDimensionalModel *model);
51 58
52 virtual int getCompletion() const { return m_model->getCompletion(); } 59 virtual int getCompletion() const { return m_model->getCompletion(); }
53 60