Mercurial > hg > svgui
comparison widgets/AudioDial.cpp @ 1148:c0d841cb8ab9 tony-2.0-integration
Merge latest SV 3.0 branch code
author | Chris Cannam |
---|---|
date | Fri, 19 Aug 2016 15:58:57 +0100 |
parents | 1badacff7ab2 |
children | a34a2a25907c |
comparison
equal
deleted
inserted
replaced
1009:96cf499fad62 | 1148:c0d841cb8ab9 |
---|---|
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 if (m_showTooltip) { | 410 if (m_showTooltip) { |
411 QString name = objectName(); | 411 QString name = objectName(); |
412 QString unit = ""; | 412 QString label; |
413 if (m_rangeMapper) { | |
414 label = m_rangeMapper->getLabel(value); | |
415 } | |
413 QString text; | 416 QString text; |
414 if (m_rangeMapper) unit = m_rangeMapper->getUnit(); | 417 if (label != "") { |
415 if (name != "") { | 418 if (name != "") { |
416 text = tr("%1: %2%3").arg(name).arg(m_mappedValue).arg(unit); | 419 text = tr("%1: %2").arg(name).arg(label); |
420 } else { | |
421 text = label; | |
422 } | |
417 } else { | 423 } else { |
418 text = tr("%2%3").arg(m_mappedValue).arg(unit); | 424 QString unit = ""; |
425 if (m_rangeMapper) { | |
426 unit = m_rangeMapper->getUnit(); | |
427 } | |
428 if (name != "") { | |
429 text = tr("%1: %2%3").arg(name).arg(m_mappedValue).arg(unit); | |
430 } else { | |
431 text = tr("%2%3").arg(m_mappedValue).arg(unit); | |
432 } | |
419 } | 433 } |
420 setToolTip(text); | 434 setToolTip(text); |
421 } | 435 } |
422 } | 436 } |
423 | 437 |