comparison view/LayerGeometryProvider.h @ 918:4fe7a09be0fe osx-retina

Many fixes for the previous stuff
author Chris Cannam
date Tue, 17 Mar 2015 16:56:03 +0000
parents 94e4952a6774
children a5488775f880
comparison
equal deleted inserted replaced
917:77a1d42353ce 918:4fe7a09be0fe
16 #define LAYER_GEOMETRY_PROVIDER_H 16 #define LAYER_GEOMETRY_PROVIDER_H
17 17
18 #include "base/BaseTypes.h" 18 #include "base/BaseTypes.h"
19 19
20 class ViewManager; 20 class ViewManager;
21 class View;
21 class Layer; 22 class Layer;
22 23
23 class LayerGeometryProvider 24 class LayerGeometryProvider
24 { 25 {
25 public: 26 public:
74 * Not thread-safe in logarithmic mode. Call only from GUI thread. 75 * Not thread-safe in logarithmic mode. Call only from GUI thread.
75 */ 76 */
76 virtual double getFrequencyForY(int y, double minFreq, double maxFreq, 77 virtual double getFrequencyForY(int y, double minFreq, double maxFreq,
77 bool logarithmic) const = 0; 78 bool logarithmic) const = 0;
78 79
80 virtual int getTextLabelHeight(const Layer *layer, QPainter &) const = 0;
81
82 virtual bool getValueExtents(QString unit, double &min, double &max,
83 bool &log) const = 0;
84
79 /** 85 /**
80 * Return the zoom level, i.e. the number of frames per pixel 86 * Return the zoom level, i.e. the number of frames per pixel
81 */ 87 */
82 virtual int getZoomLevel() const = 0; 88 virtual int getZoomLevel() const = 0;
83 89
111 QString text, TextStyle style) const = 0; 117 QString text, TextStyle style) const = 0;
112 118
113 virtual void drawMeasurementRect(QPainter &p, const Layer *, 119 virtual void drawMeasurementRect(QPainter &p, const Layer *,
114 QRect rect, bool focus) const = 0; 120 QRect rect, bool focus) const = 0;
115 121
116 virtual QWidget *getWidget() const = 0; 122 virtual View *getView() = 0;
123 virtual const View *getView() const = 0;
117 }; 124 };
118 125
119 #endif 126 #endif