Mercurial > hg > svcore
comparison base/Layer.h @ 20:742e6882e187
* 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 | 4563a72c1d8b |
children | 6ace4286ba06 |
comparison
equal
deleted
inserted
replaced
19:a7ed14263fe4 | 20:742e6882e187 |
---|---|
61 } | 61 } |
62 | 62 |
63 virtual int getVerticalScaleWidth(QPainter &) const { return 0; } | 63 virtual int getVerticalScaleWidth(QPainter &) const { return 0; } |
64 virtual void paintVerticalScale(QPainter &, QRect) const { } | 64 virtual void paintVerticalScale(QPainter &, QRect) const { } |
65 | 65 |
66 //!!! I don't like these. The layer should return a structured | 66 virtual QString getFeatureDescription(QPoint &) const { |
67 //string-based description list and the pane should render it | 67 return ""; |
68 //itself. | |
69 | |
70 virtual QRect getFeatureDescriptionRect(QPainter &, QPoint) const { | |
71 return QRect(0, 0, 0, 0); | |
72 } | |
73 virtual void paintLocalFeatureDescription(QPainter &, QRect, QPoint) const { | |
74 } | 68 } |
75 | 69 |
76 //!!! We also need a method (like the vertical scale method) for | 70 //!!! We also need a method (like the vertical scale method) for |
77 //drawing additional scales like a colour scale. That is, unless | 71 //drawing additional scales like a colour scale. That is, unless |
78 //all applicable layers can actually do this from | 72 //all applicable layers can actually do this from |