refactorizada la GUI, ola y audioengine se ejecutan fuera de widgets.
Opción para ejecutar sin mostrar la GUI. Los controles de la interfaz no son reactivos, no están conectados a las órdenes de audio. cambio en la personalidad dmx para procesar los canales en mejor orden. evita mandar dos veces los canales dobles por cada dmx frame, incluyendo file/folder.
This commit is contained in:
parent
4ee82c5e5f
commit
1fccbf64fd
20 changed files with 416 additions and 323 deletions
|
@ -1,45 +1,43 @@
|
|||
#include "slidergroup.h"
|
||||
|
||||
SliderGroup::SliderGroup(const QString &title, \
|
||||
int min,
|
||||
SliderGroup::SliderGroup(int min,
|
||||
int max,
|
||||
int decimals,
|
||||
QWidget *parent)
|
||||
: QGroupBox(title, parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
this->setFlat(true);
|
||||
this->setTitle(title);
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
layout->setAlignment(Qt::AlignHCenter);
|
||||
this->setMaximumWidth(65);
|
||||
slider = new QSlider(Qt::Orientation::Vertical);
|
||||
slider->setFocusPolicy(Qt::StrongFocus);
|
||||
slider->setTickPosition(QSlider::TicksBothSides);
|
||||
slider->setTickInterval((max - min) / 11);
|
||||
slider->setSingleStep(1);
|
||||
slider->setRange(min, max);
|
||||
slider->setMaximumWidth(65);
|
||||
valueBox = new QDoubleSpinBox();
|
||||
valueBox->setFocusPolicy(Qt::NoFocus);
|
||||
valueBox->setButtonSymbols(QAbstractSpinBox::NoButtons);
|
||||
valueBox->setMaximumWidth(45);
|
||||
valueBox->setMaximumWidth(65);
|
||||
valueBox->setRange(min, max);
|
||||
valueBox->setDecimals(decimals);
|
||||
connect(slider, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged(int)));
|
||||
QVBoxLayout *slidersLayout = new QVBoxLayout();
|
||||
slidersLayout->addWidget(valueBox);
|
||||
slidersLayout->addWidget(slider);
|
||||
setLayout(slidersLayout);
|
||||
layout->addWidget(slider);
|
||||
layout->addWidget(valueBox);
|
||||
this->setLayout(layout);
|
||||
}
|
||||
|
||||
void SliderGroup::sliderValueChanged(int value)
|
||||
{
|
||||
valueBox->setValue(value);
|
||||
if (valueBox->decimals() > 1)
|
||||
value /= 100.0f;
|
||||
emit valueChanged(value);
|
||||
valueBox->setValue(value);
|
||||
};
|
||||
|
||||
void SliderGroup::setValue(float value)
|
||||
{
|
||||
if (valueBox->decimals() > 1)
|
||||
value *= 100.0f;
|
||||
slider->setValue(value);
|
||||
valueBox->setValue(value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue