Mercurial > hg > svgui
comparison widgets/AudioDial.cpp @ 1216:dc2af6616c83
Merge from branch 3.0-integration
author | Chris Cannam |
---|---|
date | Fri, 13 Jan 2017 10:29:50 +0000 |
parents | 1badacff7ab2 |
children | a34a2a25907c |
comparison
equal
deleted
inserted
replaced
1048:e8102ff5573b | 1216:dc2af6616c83 |
---|---|
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 |