Mercurial > hg > easaier-soundaccess
comparison 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 |
comparison
equal
deleted
inserted
replaced
275:acfbbd2fea47 | 276:a9af42a93073 |
---|---|
36 | 36 |
37 #include "NotifyingCheckBox.h" | 37 #include "NotifyingCheckBox.h" |
38 #include "NotifyingComboBox.h" | 38 #include "NotifyingComboBox.h" |
39 #include "Plotter.h" | 39 #include "Plotter.h" |
40 | 40 |
41 #include "LabelForTimeStrechFilter.h" | |
42 | |
41 #include <QGridLayout> | 43 #include <QGridLayout> |
42 #include <QHBoxLayout> | 44 #include <QHBoxLayout> |
43 #include <QVBoxLayout> | 45 #include <QVBoxLayout> |
44 #include <QPushButton> | 46 #include <QPushButton> |
45 #include <QLabel> | 47 #include <QLabel> |
46 #include <QFrame> | 48 #include <QFrame> |
47 #include <QApplication> | 49 #include <QApplication> |
50 #include <QSpinBox> | |
51 #include <QLCDNumber> | |
52 | |
48 | 53 |
49 #include <cassert> | 54 #include <cassert> |
50 #include <iostream> | 55 #include <iostream> |
51 #include <cmath> | 56 #include <cmath> |
52 | 57 |
406 dial->blockSignals(false); | 411 dial->blockSignals(false); |
407 } | 412 } |
408 break; | 413 break; |
409 }*/ | 414 }*/ |
410 case PropertyContainer::RangeProperty: | 415 case PropertyContainer::RangeProperty: |
416 case PropertyContainer::RangePropertyWithLabel: | |
411 { | 417 { |
412 Slider *slider; | 418 Slider *slider; |
413 | 419 |
414 if (have) { | 420 if (have) { |
415 slider = dynamic_cast<Slider *>(m_propertyControllers[name]); | 421 slider = dynamic_cast<Slider *>(m_propertyControllers[name]); |
443 } else { | 449 } else { |
444 slider->setFixedWidth(100); | 450 slider->setFixedWidth(100); |
445 slider->setFixedHeight(32); | 451 slider->setFixedHeight(32); |
446 m_layout->addWidget(slider, row, 1); | 452 m_layout->addWidget(slider, row, 1); |
447 } | 453 } |
454 //HoTFIX to add a dynamique label for the TimeStrechFilter | |
455 if(type==PropertyContainer::RangePropertyWithLabel){ | |
456 if(propertyLabel=="Time"){ | |
457 m_layout->addWidget(new QLabel("% "), row, 2); | |
458 m_layout->addWidget(new QLabel(tr("Tempo")), row, 3); | |
459 LabelForTimeStrechFilter* lab = new LabelForTimeStrechFilter(); | |
460 lab->setType(0); | |
461 connect(slider,SIGNAL(valueChanged(int)),lab,SLOT(setValue(int))); | |
462 m_layout->addWidget(lab,row,4); | |
463 }else if(propertyLabel=="Pitch"){ | |
464 m_layout->addWidget(new QLabel("% "), row, 2); | |
465 m_layout->addWidget(new QLabel(tr("Semitones")), row, 3); | |
466 LabelForTimeStrechFilter* lab = new LabelForTimeStrechFilter(); | |
467 lab->setType(1); | |
468 connect(slider,SIGNAL(valueChanged(int)),lab,SLOT(setValue(int))); | |
469 m_layout->addWidget(lab,row,4); | |
470 } | |
471 } | |
472 // </HoTFIX> | |
448 | 473 |
449 m_propertyControllers[name] = slider; | 474 m_propertyControllers[name] = slider; |
450 } | 475 } |
451 | 476 |
452 if (slider->value() != value) { | 477 if (slider->value() != value) { |