comparison layer/WaveformLayer.h @ 44:ad214997dddb

* Refactor Layer classes so as no longer to store a single View pointer; instead they need to be able to draw themselves on any View on demand. Layers with caches (e.g. spectrogram) will need to be further refactored so as to maintain a per-View cache * Begin refactoring MainWindow by pulling out the document stuff (set of layers, models etc) into a Document class. Not yet in use. This revision is fairly unstable.
author Chris Cannam
date Thu, 02 Mar 2006 16:58:49 +0000
parents ea6fe8cfcdd5
children 01ab51f72e84
comparison
equal deleted inserted replaced
43:78515b1e29eb 44:ad214997dddb
24 class WaveformLayer : public Layer 24 class WaveformLayer : public Layer
25 { 25 {
26 Q_OBJECT 26 Q_OBJECT
27 27
28 public: 28 public:
29 WaveformLayer(View *w); 29 WaveformLayer();
30 ~WaveformLayer(); 30 ~WaveformLayer();
31 31
32 virtual const ZoomConstraint *getZoomConstraint() const { return m_model; } 32 virtual const ZoomConstraint *getZoomConstraint() const { return m_model; }
33 virtual const Model *getModel() const { return m_model; } 33 virtual const Model *getModel() const { return m_model; }
34 virtual void paint(QPainter &paint, QRect rect) const; 34 virtual void paint(View *v, QPainter &paint, QRect rect) const;
35 35
36 virtual QString getFeatureDescription(QPoint &) const; 36 virtual QString getFeatureDescription(View *v, QPoint &) const;
37 37
38 virtual int getVerticalScaleWidth(QPainter &) const; 38 virtual int getVerticalScaleWidth(View *v, QPainter &) const;
39 virtual void paintVerticalScale(QPainter &paint, QRect rect) const; 39 virtual void paintVerticalScale(View *v, QPainter &paint, QRect rect) const;
40 40
41 void setModel(const RangeSummarisableTimeValueModel *model); 41 void setModel(const RangeSummarisableTimeValueModel *model);
42 42
43 virtual PropertyList getProperties() const; 43 virtual PropertyList getProperties() const;
44 virtual PropertyType getPropertyType(const PropertyName &) const; 44 virtual PropertyType getPropertyType(const PropertyName &) const;