Mercurial > hg > svgui
comparison widgets/PropertyBox.cpp @ 216:34bbbcb3c01f sv1-1.0pre1
* Make getPropertyRangeAndValue return the default separately from the current
value. Previously some contexts were incorrectly treating the current value
as a default.
author | Chris Cannam |
---|---|
date | Fri, 02 Mar 2007 14:00:12 +0000 |
parents | 6969f21da18a |
children | 21a5e4e7cb92 |
comparison
equal
deleted
inserted
replaced
215:d2334a77db73 | 216:34bbbcb3c01f |
---|---|
252 bool rangeChanged) | 252 bool rangeChanged) |
253 { | 253 { |
254 PropertyContainer::PropertyType type = m_container->getPropertyType(name); | 254 PropertyContainer::PropertyType type = m_container->getPropertyType(name); |
255 int row = m_layout->rowCount(); | 255 int row = m_layout->rowCount(); |
256 | 256 |
257 int min = 0, max = 0, value = 0; | 257 int min = 0, max = 0, value = 0, deflt = 0; |
258 value = m_container->getPropertyRangeAndValue(name, &min, &max); | 258 value = m_container->getPropertyRangeAndValue(name, &min, &max, &deflt); |
259 | 259 |
260 bool have = (m_propertyControllers.find(name) != | 260 bool have = (m_propertyControllers.find(name) != |
261 m_propertyControllers.end()); | 261 m_propertyControllers.end()); |
262 | 262 |
263 QString groupName = m_container->getPropertyGroupName(name); | 263 QString groupName = m_container->getPropertyGroupName(name); |
356 dial->setObjectName(name); | 356 dial->setObjectName(name); |
357 dial->setMinimum(min); | 357 dial->setMinimum(min); |
358 dial->setMaximum(max); | 358 dial->setMaximum(max); |
359 dial->setPageStep(1); | 359 dial->setPageStep(1); |
360 dial->setNotchesVisible((max - min) <= 12); | 360 dial->setNotchesVisible((max - min) <= 12); |
361 dial->setDefaultValue(value); | 361 dial->setDefaultValue(deflt); |
362 dial->setRangeMapper(m_container->getNewPropertyRangeMapper(name)); | 362 dial->setRangeMapper(m_container->getNewPropertyRangeMapper(name)); |
363 dial->setShowToolTip(true); | 363 dial->setShowToolTip(true); |
364 connect(dial, SIGNAL(valueChanged(int)), | 364 connect(dial, SIGNAL(valueChanged(int)), |
365 this, SLOT(propertyControllerChanged(int))); | 365 this, SLOT(propertyControllerChanged(int))); |
366 connect(dial, SIGNAL(mouseEntered()), | 366 connect(dial, SIGNAL(mouseEntered()), |