comparison widgets/PropertyBox.cpp @ 979:98827470ada2 3.0-integration

Merge from branch normalize_hybrid_option
author Chris Cannam
date Fri, 26 Jun 2015 14:13:31 +0100
parents 4a578a360011 1986c9b0d9c3
children 3f7cdfc56dce
comparison
equal deleted inserted replaced
978:64c2b3a4435a 979:98827470ada2
441 cb->setEditable(false); 441 cb->setEditable(false);
442 442
443 if (type == PropertyContainer::ValueProperty) { 443 if (type == PropertyContainer::ValueProperty) {
444 444
445 for (int i = min; i <= max; ++i) { 445 for (int i = min; i <= max; ++i) {
446 cb->addItem(m_container->getPropertyValueLabel(name, i)); 446
447 QString label = m_container->getPropertyValueLabel(name, i);
448 QString iname = m_container->getPropertyValueIconName(name, i);
449
450 if (iname != "") {
451 QIcon icon(IconLoader().load(iname));
452 cb->addItem(icon, label);
453 } else {
454 cb->addItem(label);
455 }
447 } 456 }
448 457
449 } else if (type == PropertyContainer::UnitsProperty) { 458 } else if (type == PropertyContainer::UnitsProperty) {
450 459
451 QStringList units = UnitDatabase::getInstance()->getKnownUnits(); 460 QStringList units = UnitDatabase::getInstance()->getKnownUnits();