comparison widgets/PropertyBox.cpp @ 229:7d5d51145b81

support stereo in MultiRealTimeFilter and integrate Equalizer filter
author lbajardsilogic
date Wed, 05 Mar 2008 14:08:57 +0000
parents a89ab7dfbf4c
children 70b88fbbfb5c
comparison
equal deleted inserted replaced
228:a6b881972a62 229:7d5d51145b81
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"
29 29
30 #include "main/MainWindow.h" 30 #include "main/MainWindow.h"
31 #include "filter/EqualizerFilter.h"
31 32
32 #include "AudioDial.h" 33 #include "AudioDial.h"
33 #include "Slider.h" 34 #include "Slider.h"
34 #include "LEDButton.h" 35 #include "LEDButton.h"
35 36
571 } 572 }
572 cb->blockSignals(false); 573 cb->blockSignals(false);
573 }*/ 574 }*/
574 575
575 if (!have) { 576 if (!have) {
576 connect(cb, SIGNAL(activated(int)), this, SLOT(propertyControllerChanged(int))); 577 connect(cb, SIGNAL(curveChanged(QVector<int>&)), this, SLOT(propertyControllerChanged(QVector<int>&)));
577 connect(cb, SIGNAL(mouseEntered()), this, SLOT(mouseEnteredWidget())); 578 connect(m_container, SIGNAL(signalChanged(float*)), cb, SLOT(setCurve(float*)));
579 connect(cb, SIGNAL(mouseEntered()), this, SLOT(mouseEnteredWidget()));
578 connect(cb, SIGNAL(mouseLeft()), this, SLOT(mouseLeftWidget())); 580 connect(cb, SIGNAL(mouseLeft()), this, SLOT(mouseLeftWidget()));
579 581
580 if (inGroup) { 582 if (inGroup) {
581 cb->setToolTip(propertyLabel); 583 cb->setToolTip(propertyLabel);
582 m_groupLayouts[groupName]->addWidget(cb); 584 m_groupLayouts[groupName]->addWidget(cb);
687 m_container->setPropertyWithCommand(name, value); 689 m_container->setPropertyWithCommand(name, value);
688 } 690 }
689 691
690 updateContextHelp(obj); 692 updateContextHelp(obj);
691 } 693 }
694
695 void
696 PropertyBox::propertyControllerChanged(QVector<int> &value)
697 {
698 QObject *obj = sender();
699 QString name = obj->objectName();
700
701 #ifdef DEBUG_PROPERTY_BOX
702 std::cerr << "PropertyBox::propertyControllerChanged(" << name.toStdString()
703 << ", " << value << ")" << std::endl;
704 #endif
705
706 PropertyContainer::PropertyType type = m_container->getPropertyType(name);
707
708 if (type == PropertyContainer::PlotProperty) {
709 m_container->setProperty(name, value);
710 }
711
712 updateContextHelp(obj);
713 }
692 714
693 void 715 void
694 PropertyBox::playGainChanged(float gain) 716 PropertyBox::playGainChanged(float gain)
695 { 717 {
696 int dialValue = lrint(log10(gain) * 20.0); 718 int dialValue = lrint(log10(gain) * 20.0);