comparison widgets/PropertyBox.cpp @ 1377:d18ca558049e

Use label of property for tooltip, not just id of it
author Chris Cannam
date Tue, 06 Nov 2018 13:34:56 +0000
parents 13e17e61f898
children 78eecb19e688
comparison
equal deleted inserted replaced
1376:5a051ca3170e 1377:d18ca558049e
832 } else { 832 } else {
833 extraText = tr(" (current value: %1)").arg(mv); 833 extraText = tr(" (current value: %1)").arg(mv);
834 } 834 }
835 } 835 }
836 836
837 QString propertyLabel;
838 if (wname != "") {
839 propertyLabel = m_container->getPropertyLabel(wname);
840 }
841
837 if (w == m_showButton) { 842 if (w == m_showButton) {
838 emit contextHelpChanged(tr("Toggle Visibility of %1").arg(cname)); 843 emit contextHelpChanged(tr("Toggle Visibility of %1").arg(cname));
839 } else if (w == m_playButton) { 844 } else if (w == m_playButton) {
840 emit contextHelpChanged(tr("Toggle Playback of %1").arg(cname)); 845 emit contextHelpChanged(tr("Toggle Playback of %1").arg(cname));
841 } else if (wname == "") { 846 } else if (wname == "") {
842 return; 847 return;
843 } else if (qobject_cast<QAbstractButton *>(w)) { 848 } else if (qobject_cast<QAbstractButton *>(w)) {
844 emit contextHelpChanged(tr("Toggle %1 property of %2") 849 emit contextHelpChanged(tr("Toggle %1 property of %2")
845 .arg(wname).arg(cname)); 850 .arg(propertyLabel).arg(cname));
846 } else { 851 } else {
847 emit contextHelpChanged(tr("Adjust %1 property of %2%3") 852 emit contextHelpChanged(tr("Adjust %1 property of %2%3")
848 .arg(wname).arg(cname).arg(extraText)); 853 .arg(propertyLabel).arg(cname).arg(extraText));
849 } 854 }
850 } 855 }
851 856
852 void 857 void
853 PropertyBox::mouseLeftWidget() 858 PropertyBox::mouseLeftWidget()