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;
|
||||
}
|
||||
|
||||
bool MeterSlider::event(QEvent* ev) {
|
||||
if (ev->type() == QEvent::Wheel) {
|
||||
ev->setAccepted(false);
|
||||
return false;
|
||||
}
|
||||
return QSlider::event(ev);
|
||||
}
|
||||
|
||||
void MeterSlider::paintEvent(QPaintEvent *event) {
|
||||
QStyleOptionSlider sliderComplex = QStyleOptionSlider();
|
||||
sliderComplex.initFrom(this);
|
||||
|
|
@ -246,7 +254,7 @@ void MainWindow::compose() {
|
|||
windowHeight += bottom;
|
||||
log_debugcpp("windowHeight loop: " + std::to_string(windowHeight));
|
||||
}
|
||||
windowHeight += mainMenuBar->height();
|
||||
windowHeight += mainMenuBar->sizeHint().height();
|
||||
log_debugcpp("windowHeight final value: " + std::to_string(windowHeight));
|
||||
|
||||
//Undoing scrolling
|
||||
|
|
@ -406,7 +414,7 @@ ChannelWidget::ChannelWidget(uint32_t channelCount, EndpointHandler* eph, QWidge
|
|||
*/
|
||||
//uint32_t epChannelCount = eph->getChannelCount();
|
||||
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("");
|
||||
tmp->setTickInterval(5);
|
||||
tmp->setSingleStep(1);
|
||||
|
|
@ -656,7 +664,6 @@ void EndpointWidget::customEvent(QEvent* ev) {
|
|||
QWidget::customEvent(ev);
|
||||
}
|
||||
|
||||
|
||||
EndpointWidget::~EndpointWidget() {
|
||||
timer->stop();
|
||||
delete timer;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,9 @@ class MeterSlider : public QSlider {
|
|||
private:
|
||||
float peakValue;
|
||||
protected:
|
||||
bool event(QEvent* ev) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
public:
|
||||
void setPeakValue(float peakValue);
|
||||
using QSlider::QSlider;
|
||||
|
|
@ -151,7 +153,7 @@ public:
|
|||
|
||||
EndpointHandler* getEndpointHandler();
|
||||
std::map<Roles, ExtendedCheckBox*> getDefaultRolesWidgets();
|
||||
|
||||
|
||||
void setIndex(uint64_t idx);
|
||||
uint64_t getIndex();
|
||||
//void setVolume(int channel, float volume);
|
||||
|
|
@ -164,7 +166,10 @@ public:
|
|||
|
||||
//void populateEndpointWidget(EndpointHandler *eph);
|
||||
//void setEndpointHandlers(std::vector<EndpointHandler*> *ephs);
|
||||
|
||||
|
||||
//protected:
|
||||
//bool event(QEvent* ev) override;
|
||||
|
||||
public slots:
|
||||
void updateMainVolume(int newValue);
|
||||
void updateMute(int checked);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue