Mercurial > hg > svgui
comparison widgets/Pane.cpp @ 50:75cfbc6e709b
* more MainWindow/Document stuff
author | Chris Cannam |
---|---|
date | Wed, 08 Mar 2006 17:47:58 +0000 |
parents | 2818ec5d1985 |
children | d2eac322d71b |
comparison
equal
deleted
inserted
replaced
49:2818ec5d1985 | 50:75cfbc6e709b |
---|---|
298 } | 298 } |
299 paint.drawText(x, y, text); | 299 paint.drawText(x, y, text); |
300 | 300 |
301 if (waveformModel) { | 301 if (waveformModel) { |
302 | 302 |
303 size_t mainModelRate = m_manager->getMainModelSampleRate(); | |
304 size_t playbackRate = m_manager->getPlaybackSampleRate(); | |
305 | |
306 QString srNote = ""; | |
307 | |
303 // Show (R) for waveform models that will be resampled on | 308 // Show (R) for waveform models that will be resampled on |
304 // playback. | 309 // playback, and (X) for waveform models that will be |
305 | 310 // played at the wrong rate because their rate differs |
306 //!!! Inadequate for auxiliary waveform layers, which are | 311 // from that of the main model. |
307 //played at the wrong rate if their rate differs from the | 312 |
308 //main model. Need to discover and label with (X) or | 313 if (sampleRate == mainModelRate) { |
309 //something. | 314 if (sampleRate != playbackRate) srNote = " " + tr("(R)"); |
310 | 315 } else { |
316 srNote = " " + tr("(X)"); | |
317 } | |
318 | |
311 QString desc = tr("%1 / %2Hz%3") | 319 QString desc = tr("%1 / %2Hz%3") |
312 .arg(RealTime::frame2RealTime(waveformModel->getEndFrame(), | 320 .arg(RealTime::frame2RealTime(waveformModel->getEndFrame(), |
313 sampleRate) | 321 sampleRate) |
314 .toText(false).c_str()) | 322 .toText(false).c_str()) |
315 .arg(sampleRate) | 323 .arg(sampleRate) |
316 .arg((m_manager && | 324 .arg(srNote); |
317 sampleRate != m_manager->getPlaybackSampleRate()) ? " (R)" : ""); | |
318 | 325 |
319 paint.drawText(width() - paint.fontMetrics().width(desc) - 5, | 326 paint.drawText(width() - paint.fontMetrics().width(desc) - 5, |
320 height() - paint.fontMetrics().height() + | 327 height() - paint.fontMetrics().height() + |
321 paint.fontMetrics().ascent() - 6, | 328 paint.fontMetrics().ascent() - 6, |
322 desc); | 329 desc); |