comparison layer/SpectrumLayer.cpp @ 248:28c8e8e3c537

* Fix many compile warnings, remove some debug output
author Chris Cannam
date Mon, 30 Apr 2007 13:36:23 +0000
parents 8dc50f57d480
children a2ae3d93c645
comparison
equal deleted inserted replaced
247:0e9f59f991aa 248:28c8e8e3c537
240 return; 240 return;
241 } 241 }
242 } 242 }
243 243
244 bool 244 bool
245 SpectrumLayer::getValueExtents(float &min, float &max, bool &logarithmic, 245 SpectrumLayer::getValueExtents(float &, float &, bool &, QString &) const
246 QString &units) const
247 { 246 {
248 return false; 247 return false;
249 } 248 }
250 249
251 QString 250 QString
258 (v, p, false, minbin, maxbin, range); 257 (v, p, false, minbin, maxbin, range);
259 258
260 if (genericDesc == "") return ""; 259 if (genericDesc == "") return "";
261 260
262 float minvalue = 0.f; 261 float minvalue = 0.f;
263 if (minbin < m_values.size()) minvalue = m_values[minbin]; 262 if (minbin < int(m_values.size())) minvalue = m_values[minbin];
264 263
265 float maxvalue = minvalue; 264 float maxvalue = minvalue;
266 if (maxbin < m_values.size()) maxvalue = m_values[maxbin]; 265 if (maxbin < int(m_values.size())) maxvalue = m_values[maxbin];
267 266
268 if (minvalue > maxvalue) std::swap(minvalue, maxvalue); 267 if (minvalue > maxvalue) std::swap(minvalue, maxvalue);
269 268
270 QString binstr; 269 QString binstr;
271 QString hzstr; 270 QString hzstr;
314 dbstr = tr("%1").arg(mindbstr); 313 dbstr = tr("%1").arg(mindbstr);
315 } 314 }
316 315
317 QString description; 316 QString description;
318 317
319 if (range > m_sliceableModel->getResolution()) { 318 if (range > int(m_sliceableModel->getResolution())) {
320 description = tr("%1\nBin:\t%2 (%3)\n%4 value:\t%5\ndB:\t%6") 319 description = tr("%1\nBin:\t%2 (%3)\n%4 value:\t%5\ndB:\t%6")
321 .arg(genericDesc) 320 .arg(genericDesc)
322 .arg(binstr) 321 .arg(binstr)
323 .arg(hzstr) 322 .arg(hzstr)
324 .arg(m_samplingMode == NearestSample ? tr("First") : 323 .arg(m_samplingMode == NearestSample ? tr("First") :