# HG changeset patch # User Chris Cannam # Date 1161093017 0 # Node ID bdba24db044622a56810044751f3c3d15a509b1d # Parent 86cee2b060c73e7bd869883aa179a224f01d5444 * minor fixes to tooltip diff -r 86cee2b060c7 -r bdba24db0446 widgets/AudioDial.cpp --- a/widgets/AudioDial.cpp Tue Oct 17 13:49:31 2006 +0000 +++ b/widgets/AudioDial.cpp Tue Oct 17 13:50:17 2006 +0000 @@ -69,7 +69,8 @@ // Constructor. AudioDial::AudioDial(QWidget *parent) : QDial(parent), - m_knobColor(Qt::black), m_meterColor(Qt::white), + m_knobColor(Qt::black), + m_meterColor(Qt::white), m_defaultValue(0), m_mappedValue(0), m_noMappedUpdate(false), @@ -90,13 +91,19 @@ void AudioDial::setRangeMapper(RangeMapper *mapper) { - if (!m_rangeMapper) { + if (!m_rangeMapper && mapper) { connect(this, SIGNAL(valueChanged(int)), this, SLOT(updateMappedValue(int))); } + delete m_rangeMapper; m_rangeMapper = mapper; - m_mappedValue = m_rangeMapper->getValueForPosition(value()); + + if (m_rangeMapper) { + m_mappedValue = m_rangeMapper->getValueForPosition(value()); + } else { + m_mappedValue = value(); + } } @@ -346,9 +353,11 @@ void AudioDial::updateMappedValue(int value) { - if (m_rangeMapper) { - if (!m_noMappedUpdate) { + if (!m_noMappedUpdate) { + if (m_rangeMapper) { m_mappedValue = m_rangeMapper->getValueForPosition(value); + } else { + m_mappedValue = value; } } diff -r 86cee2b060c7 -r bdba24db0446 widgets/PropertyBox.cpp --- a/widgets/PropertyBox.cpp Tue Oct 17 13:49:31 2006 +0000 +++ b/widgets/PropertyBox.cpp Tue Oct 17 13:50:17 2006 +0000 @@ -181,7 +181,6 @@ gainDial->setFixedWidth(24); gainDial->setFixedHeight(24); gainDial->setNotchesVisible(false); -//!!! gainDial->setToolTip(tr("Playback Level")); gainDial->setDefaultValue(0); gainDial->setObjectName(tr("Playback Gain")); gainDial->setRangeMapper(new LinearRangeMapper @@ -333,7 +332,6 @@ if (inGroup) { dial->setFixedWidth(24); dial->setFixedHeight(24); -//!!! dial->setToolTip(propertyLabel); m_groupLayouts[groupName]->addWidget(dial); } else { dial->setFixedWidth(32);