Mercurial > hg > easaier-soundaccess
diff widgets/PropertyBox.cpp @ 276:a9af42a93073
New property box for time stretching
some labels updated
author | benoitrigolleau |
---|---|
date | Wed, 15 Oct 2008 16:18:18 +0000 |
parents | e006f4a57f86 |
children | 960531792d88 |
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp Thu Jul 03 10:17:46 2008 +0000 +++ b/widgets/PropertyBox.cpp Wed Oct 15 16:18:18 2008 +0000 @@ -38,6 +38,8 @@ #include "NotifyingComboBox.h" #include "Plotter.h" +#include "LabelForTimeStrechFilter.h" + #include <QGridLayout> #include <QHBoxLayout> #include <QVBoxLayout> @@ -45,6 +47,9 @@ #include <QLabel> #include <QFrame> #include <QApplication> +#include <QSpinBox> +#include <QLCDNumber> + #include <cassert> #include <iostream> @@ -408,6 +413,7 @@ break; }*/ case PropertyContainer::RangeProperty: + case PropertyContainer::RangePropertyWithLabel: { Slider *slider; @@ -445,6 +451,25 @@ slider->setFixedHeight(32); m_layout->addWidget(slider, row, 1); } + //HoTFIX to add a dynamique label for the TimeStrechFilter + if(type==PropertyContainer::RangePropertyWithLabel){ + if(propertyLabel=="Time"){ + m_layout->addWidget(new QLabel("% "), row, 2); + m_layout->addWidget(new QLabel(tr("Tempo")), row, 3); + LabelForTimeStrechFilter* lab = new LabelForTimeStrechFilter(); + lab->setType(0); + connect(slider,SIGNAL(valueChanged(int)),lab,SLOT(setValue(int))); + m_layout->addWidget(lab,row,4); + }else if(propertyLabel=="Pitch"){ + m_layout->addWidget(new QLabel("% "), row, 2); + m_layout->addWidget(new QLabel(tr("Semitones")), row, 3); + LabelForTimeStrechFilter* lab = new LabelForTimeStrechFilter(); + lab->setType(1); + connect(slider,SIGNAL(valueChanged(int)),lab,SLOT(setValue(int))); + m_layout->addWidget(lab,row,4); + } + } + // </HoTFIX> m_propertyControllers[name] = slider; }