Changed back signal/slot connection to old style
The described problem is one of the disadvantages of the new style,
when it comes to default values or different signatures

Also using a minimum value and adjusting the slider to any set value.
This commit is contained in:
Klaus Basan
2014-01-16 01:04:22 +01:00
parent 2cf097ae2e
commit 9470dc27ca
2 changed files with 6 additions and 2 deletions

View File

@@ -391,7 +391,9 @@ void MainWindow::changeWindowOpacity(int opacity)
return; return;
} }
qreal o = opacity / 100.0; qreal o = opacity / 100.0;
o = o < 0.3 ? 0.3 : o;
QWidget::setWindowOpacity(o); QWidget::setWindowOpacity(o);
this->ui->hs_SettingsGuiOpacity->setValue(o * 100.0);
} }
/* /*

View File

@@ -184,8 +184,10 @@ void MainWindow::initGuiSignals()
Q_ASSERT(connected); Q_ASSERT(connected);
connected = this->connect(this->ui->pb_MainWeather, SIGNAL(released()), this, SLOT(setMainPage())); connected = this->connect(this->ui->pb_MainWeather, SIGNAL(released()), this, SLOT(setMainPage()));
Q_ASSERT(connected); Q_ASSERT(connected);
this->connect(this->ui->pb_MainKeypadOpacity050, &QPushButton::clicked, this, &MainWindow::changeWindowOpacity); connected = this->connect(this->ui->pb_MainKeypadOpacity050, SIGNAL(clicked()), this, SLOT(changeWindowOpacity()));
this->connect(this->ui->pb_MainKeypadOpacity100, &QPushButton::clicked, this, &MainWindow::changeWindowOpacity); Q_ASSERT(connected);
connected = this->connect(this->ui->pb_MainKeypadOpacity100, SIGNAL(clicked()), this, SLOT(changeWindowOpacity()));
Q_ASSERT(connected);
// Sound buttons // Sound buttons
this->connect(this->ui->pb_SoundMute, &QPushButton::clicked, this, &MainWindow::audioVolumes); this->connect(this->ui->pb_SoundMute, &QPushButton::clicked, this, &MainWindow::audioVolumes);