comparison view/View.h @ 904:e0f08e108064 cxx11

Move to using double rather than float for floating-point calculations (float only for storage); more build fixes
author Chris Cannam
date Mon, 09 Mar 2015 12:02:10 +0000
parents a1226b3b7925
children 4a578a360011
comparison
equal deleted inserted replaced
903:1757933ce5a7 904:e0f08e108064
110 * not imply any policy about layer frequency ranges, but it might 110 * not imply any policy about layer frequency ranges, but it might
111 * be useful for layers to match theirs up if desired. 111 * be useful for layers to match theirs up if desired.
112 * 112 *
113 * Not thread-safe in logarithmic mode. Call only from GUI thread. 113 * Not thread-safe in logarithmic mode. Call only from GUI thread.
114 */ 114 */
115 float getYForFrequency(float frequency, float minFreq, float maxFreq, 115 double getYForFrequency(double frequency, double minFreq, double maxFreq,
116 bool logarithmic) const; 116 bool logarithmic) const;
117 117
118 /** 118 /**
119 * Return the closest frequency to the given pixel y-coordinate, 119 * Return the closest frequency to the given pixel y-coordinate,
120 * if the frequency range is as specified. 120 * if the frequency range is as specified.
121 * 121 *
122 * Not thread-safe in logarithmic mode. Call only from GUI thread. 122 * Not thread-safe in logarithmic mode. Call only from GUI thread.
123 */ 123 */
124 float getFrequencyForY(int y, float minFreq, float maxFreq, 124 double getFrequencyForY(int y, double minFreq, double maxFreq,
125 bool logarithmic) const; 125 bool logarithmic) const;
126 126
127 /** 127 /**
128 * Return the zoom level, i.e. the number of frames per pixel 128 * Return the zoom level, i.e. the number of frames per pixel
129 */ 129 */
300 virtual QSize getImageSize(int f0, int f1); 300 virtual QSize getImageSize(int f0, int f1);
301 virtual QSize getImageSize(); 301 virtual QSize getImageSize();
302 302
303 virtual int getTextLabelHeight(const Layer *layer, QPainter &) const; 303 virtual int getTextLabelHeight(const Layer *layer, QPainter &) const;
304 304
305 virtual bool getValueExtents(QString unit, float &min, float &max, 305 virtual bool getValueExtents(QString unit, double &min, double &max,
306 bool &log) const; 306 bool &log) const;
307 307
308 virtual void toXml(QTextStream &stream, QString indent = "", 308 virtual void toXml(QTextStream &stream, QString indent = "",
309 QString extraAttributes = "") const; 309 QString extraAttributes = "") const;
310 310