comparison widgets/PropertyBox.cpp @ 376:e1a9e478b7f2

* juggle some files around in order to free audioio, base, and system libraries from dependency on QtGui
author Chris Cannam
date Wed, 12 Mar 2008 17:42:56 +0000
parents 67834ac56f2b
children 0bcb449d15f4
comparison
equal deleted inserted replaced
375:daaf1c435d98 376:e1a9e478b7f2
17 #include "PluginParameterDialog.h" 17 #include "PluginParameterDialog.h"
18 18
19 #include "base/PropertyContainer.h" 19 #include "base/PropertyContainer.h"
20 #include "base/PlayParameters.h" 20 #include "base/PlayParameters.h"
21 #include "layer/Layer.h" 21 #include "layer/Layer.h"
22 #include "layer/ColourDatabase.h"
22 #include "base/UnitDatabase.h" 23 #include "base/UnitDatabase.h"
23 #include "base/ColourDatabase.h"
24 #include "base/RangeMapper.h" 24 #include "base/RangeMapper.h"
25 25
26 #include "plugin/RealTimePluginFactory.h" 26 #include "plugin/RealTimePluginFactory.h"
27 #include "plugin/RealTimePluginInstance.h" 27 #include "plugin/RealTimePluginInstance.h"
28 #include "plugin/PluginXml.h" 28 #include "plugin/PluginXml.h"
605 << ", " << value << ")" << std::endl; 605 << ", " << value << ")" << std::endl;
606 #endif 606 #endif
607 607
608 PropertyContainer::PropertyType type = m_container->getPropertyType(name); 608 PropertyContainer::PropertyType type = m_container->getPropertyType(name);
609 609
610 Command *c = 0;
611
610 if (type == PropertyContainer::UnitsProperty) { 612 if (type == PropertyContainer::UnitsProperty) {
611 613
612 NotifyingComboBox *cb = dynamic_cast<NotifyingComboBox *>(obj); 614 NotifyingComboBox *cb = dynamic_cast<NotifyingComboBox *>(obj);
613 if (cb) { 615 if (cb) {
614 QString unit = cb->currentText(); 616 QString unit = cb->currentText();
615 m_container->setPropertyWithCommand 617 c = m_container->getSetPropertyCommand
616 (name, UnitDatabase::getInstance()->getUnitId(unit)); 618 (name, UnitDatabase::getInstance()->getUnitId(unit));
617 } 619 }
618 620
619 } else if (type == PropertyContainer::ColourProperty) { 621 } else if (type == PropertyContainer::ColourProperty) {
620 622
623 if (value == int(ColourDatabase::getInstance()->getColourCount())) { 625 if (value == int(ColourDatabase::getInstance()->getColourCount())) {
624 propertyContainerPropertyChanged(m_container); 626 propertyContainerPropertyChanged(m_container);
625 return; 627 return;
626 } 628 }
627 } 629 }
628 m_container->setPropertyWithCommand(name, value); 630 c = m_container->getSetPropertyCommand(name, value);
629 631
630 } else if (type != PropertyContainer::InvalidProperty) { 632 } else if (type != PropertyContainer::InvalidProperty) {
631 633
632 m_container->setPropertyWithCommand(name, value); 634 c = m_container->getSetPropertyCommand(name, value);
633 } 635 }
636
637 if (c) CommandHistory::getInstance()->addCommand(c, true, true);
634 638
635 updateContextHelp(obj); 639 updateContextHelp(obj);
636 } 640 }
637 641
638 void 642 void