Skip to content

Commit

Permalink
auto saving all alarm data
Browse files Browse the repository at this point in the history
  • Loading branch information
CountMurphy committed Nov 6, 2020
1 parent b7f38fc commit 313a7a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aboutdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AboutDialog : public QDialog
public:
explicit AboutDialog(QWidget *parent = 0);
~AboutDialog();
const QString version="2.0.2";
const QString version="2.1.0";

private:
Ui::AboutDialog *ui;
Expand Down
1 change: 1 addition & 0 deletions alarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ void Alarm::Resume()
void Alarm::SetVolume(int Volume)
{
media->setVolume(Volume);
FileIO::SaveVolume(Volume);
}

5 changes: 5 additions & 0 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ void MainWindow::SetTime()
Schedule *Active=this->_Schedules->GetSchedule(ui->listWidget->currentRow());
Active->SetTime(ui->timeEdit->time());
UpdateListWidget();
this->_Schedules->Save();
}
}

Expand All @@ -175,6 +176,7 @@ void MainWindow::SetCustomDate()
Active->SetCust(CustomDate);
if(Active->isCustomEnabled())
UpdateListWidget();
this->_Schedules->Save();
}
}

Expand Down Expand Up @@ -253,6 +255,7 @@ void MainWindow::AddRemoveAlarm(QAbstractButton *button)
this->_Schedules->removeScheduleByIndex(ui->listWidget->currentRow());
PopulateListWidget();
}
this->_Schedules->Save();
}


Expand Down Expand Up @@ -317,6 +320,7 @@ void MainWindow::OpenDiaglog(bool isChecked)
}else{
ui->txtSoundPath->setText("");
}
this->_Schedules->Save();
}

void MainWindow::TestAlarm()
Expand Down Expand Up @@ -445,4 +449,5 @@ void MainWindow::UpdateListWidget()
int index=ui->listWidget->currentRow();
PopulateListWidget();
ui->listWidget->setCurrentRow(index);
this->_Schedules->Save();
}

0 comments on commit 313a7a4

Please sign in to comment.