Révision | 00403d50da6c2321254eb21fda6e5b47d3c5e5ee (tree) |
---|---|
l'heure | 2014-05-17 18:43:17 |
Auteur | alucky4416 <alucky4416@user...> |
Commiter | alucky4416 |
feature: default set SoundVolumeLevel when startup.
@@ -75,9 +75,11 @@ MainWindow::MainWindow(QWidget *parent) : | ||
75 | 75 | // this, SLOT(slot_calc_end(QString))); |
76 | 76 | ThPlayMusic->start(); |
77 | 77 | |
78 | - float vlmlevel = ThPlayMusic->GetSoundVolume() * 100.0; | |
79 | - // qDebug() << "vlmlevel=" << vlmlevel ; | |
80 | - ui->hSlider_Volume->setValue((int)vlmlevel); | |
78 | + if (ui->hSlider_Volume->value() == 0) { | |
79 | + float vlmlevel = ThPlayMusic->GetSoundVolume() * 100.0; | |
80 | + // qDebug() << "vlmlevel=" << vlmlevel ; | |
81 | + ui->hSlider_Volume->setValue((int)vlmlevel); | |
82 | + } | |
81 | 83 | |
82 | 84 | // ScheduleManager Thread |
83 | 85 | ThSchMngr = new ThSchManager(this); |
@@ -152,7 +154,7 @@ void MainWindow::LoadSaveSetting(QString filepath, bool store = false) | ||
152 | 154 | ui->checkBox_AutoStart->setChecked(settings.value("SETTING/AUTO_START", false).toBool()); |
153 | 155 | |
154 | 156 | // Sound Volume Level |
155 | - ui->hSlider_Volume->setValue((settings.value("SETTING/VOLUME_LEVEL", 10).toInt())); | |
157 | + ui->hSlider_Volume->setValue((settings.value("SETTING/VOLUME_LEVEL", 0).toInt())); | |
156 | 158 | |
157 | 159 | // Exclude SS flag |
158 | 160 | ui->checkBox_Exclude_SS->setChecked(settings.value("SETTING/EXCLUDE_SS", true).toBool()); |
@@ -279,6 +281,10 @@ void MainWindow::on_pushButton_clicked() | ||
279 | 281 | QMessageBox::warning(this, "Warning", tr("File Not Found.")); |
280 | 282 | return; |
281 | 283 | } |
284 | + if (ui->hSlider_Volume->value() == 0) { | |
285 | + QMessageBox::warning(this, "Warning", ("Sound Volume = 0")); | |
286 | + return; | |
287 | + } | |
282 | 288 | |
283 | 289 | ThSchMngr->setExcludeSS(ui->checkBox_Exclude_SS->isChecked()); |
284 | 290 | ThSchMngr->setExcludeHolidays(ui->checkBox_Exclude_Holiday->isChecked()); |