funcionando sin la parte de las settings.

This commit is contained in:
snt 2024-04-23 20:16:24 +02:00
parent b59cc92c5f
commit 8b5d9414d1
20 changed files with 239 additions and 343 deletions

30
src/slidergroup.cpp Normal file
View file

@ -0,0 +1,30 @@
#include "slidergroup.h"
SliderGroup::SliderGroup(const QString &title, \
int min,
int max,
QWidget *parent)
: QGroupBox(title, parent)
{
this->setFlat(true);
this->setTitle(title);
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->setInvertedAppearance(false);
//slider->setInvertedControls(false);
valueBox = new QSpinBox();
valueBox->setFocusPolicy(Qt::NoFocus);
valueBox->setButtonSymbols(QAbstractSpinBox::NoButtons);
valueBox->setMaximumWidth(40);
valueBox->setRange(min, max);
connect(slider, &QSlider::valueChanged, valueBox, &QSpinBox::setValue);
connect(slider, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged(int)));
QVBoxLayout *slidersLayout = new QVBoxLayout();
slidersLayout->addWidget(valueBox);
slidersLayout->addWidget(slider);
setLayout(slidersLayout);
}