disabled slider scroll
This commit is contained in:
parent
6c588d068f
commit
16604277fb
2 changed files with 17 additions and 5 deletions
|
|
@ -10,6 +10,14 @@ void MeterSlider::setPeakValue(float peakValue) {
|
||||||
this->peakValue = peakValue;
|
this->peakValue = peakValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MeterSlider::event(QEvent* ev) {
|
||||||
|
if (ev->type() == QEvent::Wheel) {
|
||||||
|
ev->setAccepted(false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return QSlider::event(ev);
|
||||||
|
}
|
||||||
|
|
||||||
void MeterSlider::paintEvent(QPaintEvent *event) {
|
void MeterSlider::paintEvent(QPaintEvent *event) {
|
||||||
QStyleOptionSlider sliderComplex = QStyleOptionSlider();
|
QStyleOptionSlider sliderComplex = QStyleOptionSlider();
|
||||||
sliderComplex.initFrom(this);
|
sliderComplex.initFrom(this);
|
||||||
|
|
@ -246,7 +254,7 @@ void MainWindow::compose() {
|
||||||
windowHeight += bottom;
|
windowHeight += bottom;
|
||||||
log_debugcpp("windowHeight loop: " + std::to_string(windowHeight));
|
log_debugcpp("windowHeight loop: " + std::to_string(windowHeight));
|
||||||
}
|
}
|
||||||
windowHeight += mainMenuBar->height();
|
windowHeight += mainMenuBar->sizeHint().height();
|
||||||
log_debugcpp("windowHeight final value: " + std::to_string(windowHeight));
|
log_debugcpp("windowHeight final value: " + std::to_string(windowHeight));
|
||||||
|
|
||||||
//Undoing scrolling
|
//Undoing scrolling
|
||||||
|
|
@ -406,7 +414,7 @@ ChannelWidget::ChannelWidget(uint32_t channelCount, EndpointHandler* eph, QWidge
|
||||||
*/
|
*/
|
||||||
//uint32_t epChannelCount = eph->getChannelCount();
|
//uint32_t epChannelCount = eph->getChannelCount();
|
||||||
for(uint64_t channel = 0, col = 0, row = 0; channel < channelCount && channelCount > 1; channel++){
|
for(uint64_t channel = 0, col = 0, row = 0; channel < channelCount && channelCount > 1; channel++){
|
||||||
QSlider* tmp = new QSlider(Qt::Horizontal);
|
MeterSlider* tmp = new MeterSlider(Qt::Horizontal);
|
||||||
QLabel* tmpLb = new QLabel("");
|
QLabel* tmpLb = new QLabel("");
|
||||||
tmp->setTickInterval(5);
|
tmp->setTickInterval(5);
|
||||||
tmp->setSingleStep(1);
|
tmp->setSingleStep(1);
|
||||||
|
|
@ -656,7 +664,6 @@ void EndpointWidget::customEvent(QEvent* ev) {
|
||||||
QWidget::customEvent(ev);
|
QWidget::customEvent(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EndpointWidget::~EndpointWidget() {
|
EndpointWidget::~EndpointWidget() {
|
||||||
timer->stop();
|
timer->stop();
|
||||||
delete timer;
|
delete timer;
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,9 @@ class MeterSlider : public QSlider {
|
||||||
private:
|
private:
|
||||||
float peakValue;
|
float peakValue;
|
||||||
protected:
|
protected:
|
||||||
|
bool event(QEvent* ev) override;
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void setPeakValue(float peakValue);
|
void setPeakValue(float peakValue);
|
||||||
using QSlider::QSlider;
|
using QSlider::QSlider;
|
||||||
|
|
@ -165,6 +167,9 @@ public:
|
||||||
//void populateEndpointWidget(EndpointHandler *eph);
|
//void populateEndpointWidget(EndpointHandler *eph);
|
||||||
//void setEndpointHandlers(std::vector<EndpointHandler*> *ephs);
|
//void setEndpointHandlers(std::vector<EndpointHandler*> *ephs);
|
||||||
|
|
||||||
|
//protected:
|
||||||
|
//bool event(QEvent* ev) override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateMainVolume(int newValue);
|
void updateMainVolume(int newValue);
|
||||||
void updateMute(int checked);
|
void updateMute(int checked);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue