comparison layer/LayerGeometryProvider.h @ 1085:179ea8a2f650 spectrogram-minor-refactor

Add VerticalBinLayer to SpectrogramLayer
author Chris Cannam
date Fri, 01 Jul 2016 17:54:31 +0100
parents 5b4fe7bb9430
children c8c747783110
comparison
equal deleted inserted replaced
1084:db976e9f385a 1085:179ea8a2f650
101 * pixel x-coordinate. 101 * pixel x-coordinate.
102 */ 102 */
103 virtual int getViewXForX(int x) const = 0; 103 virtual int getViewXForX(int x) const = 0;
104 104
105 /** 105 /**
106 * Return the pixel y-coordinate corresponding to a given 106 * Return the (maybe fractional) pixel y-coordinate corresponding
107 * frequency, if the frequency range is as specified. This does 107 * to a given frequency, if the frequency range is as specified.
108 * not imply any policy about layer frequency ranges, but it might 108 * This does not imply any policy about layer frequency ranges,
109 * be useful for layers to match theirs up if desired. 109 * but it might be useful for layers to match theirs up if
110 * desired.
110 * 111 *
111 * Not thread-safe in logarithmic mode. Call only from GUI thread. 112 * Not thread-safe in logarithmic mode. Call only from GUI thread.
112 */ 113 */
113 virtual double getYForFrequency(double frequency, double minFreq, double maxFreq, 114 virtual double getYForFrequency(double frequency,
115 double minFreq, double maxFreq,
114 bool logarithmic) const = 0; 116 bool logarithmic) const = 0;
115 117
116 /** 118 /**
117 * Return the closest frequency to the given pixel y-coordinate, 119 * Return the closest frequency to the given (maybe fractional)
118 * if the frequency range is as specified. 120 * pixel y-coordinate, if the frequency range is as specified.
119 * 121 *
120 * Not thread-safe in logarithmic mode. Call only from GUI thread. 122 * Not thread-safe in logarithmic mode. Call only from GUI thread.
121 */ 123 */
122 virtual double getFrequencyForY(int y, double minFreq, double maxFreq, 124 virtual double getFrequencyForY(double y,
125 double minFreq, double maxFreq,
123 bool logarithmic) const = 0; 126 bool logarithmic) const = 0;
124 127
125 virtual int getTextLabelHeight(const Layer *layer, QPainter &) const = 0; 128 virtual int getTextLabelHeight(const Layer *layer, QPainter &) const = 0;
126 129
127 virtual bool getValueExtents(QString unit, double &min, double &max, 130 virtual bool getValueExtents(QString unit, double &min, double &max,