comparison layer/Colour3DPlotLayer.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 202d1dca67d2
children 01ab51f72e84
comparison
equal deleted inserted replaced
43:78515b1e29eb 44:ad214997dddb
34 class Colour3DPlotLayer : public Layer 34 class Colour3DPlotLayer : public Layer
35 { 35 {
36 Q_OBJECT 36 Q_OBJECT
37 37
38 public: 38 public:
39 Colour3DPlotLayer(View *w); 39 Colour3DPlotLayer();
40 ~Colour3DPlotLayer(); 40 ~Colour3DPlotLayer();
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(View *v, QPainter &paint, QRect rect) const;
45 45
46 virtual int getVerticalScaleWidth(QPainter &) const; 46 virtual int getVerticalScaleWidth(View *v, QPainter &) const;
47 virtual void paintVerticalScale(QPainter &paint, QRect rect) const; 47 virtual void paintVerticalScale(View *v, QPainter &paint, QRect rect) const;
48 48
49 virtual QString getFeatureDescription(QPoint &) const; 49 virtual QString getFeatureDescription(View *v, QPoint &) const;
50 50
51 virtual bool snapToFeatureFrame(int &frame, 51 virtual bool snapToFeatureFrame(View *v, int &frame,
52 size_t &resolution, 52 size_t &resolution,
53 SnapType snap) const; 53 SnapType snap) const;
54 54
55 virtual bool isLayerScrollable() const; 55 virtual bool isLayerScrollable(const View *v) const;
56 56
57 void setModel(const DenseThreeDimensionalModel *model); 57 void setModel(const DenseThreeDimensionalModel *model);
58 58
59 virtual int getCompletion() const { return m_model->getCompletion(); } 59 virtual int getCompletion() const { return m_model->getCompletion(); }
60 60