Tweaks to auto objects and fixup filesyncdialog compile

This commit is contained in:
elecpower
2021-03-16 23:16:11 +11:00
parent 099d5f7608
commit 38f1d249c9
6 changed files with 39 additions and 81 deletions
+6 -55
View File
@@ -112,10 +112,14 @@ void TimerPanel::update()
ui->persistentValue->setText(timer.pvalueToString());
}
ui->countdownStart->updateValue();
if(timer.countdownBeep == TimerData::COUNTDOWNBEEP_SILENT)
if(timer.countdownBeep == TimerData::COUNTDOWNBEEP_SILENT) {
ui->countdownStartLabel->setEnabled(false);
ui->countdownStart->setEnabled(false);
else
}
else {
ui->countdownStartLabel->setEnabled(true);
ui->countdownStart->setEnabled(true);
}
lock = false;
}
@@ -124,17 +128,6 @@ QWidget * TimerPanel::getLastFocus()
return ui->persistent;
}
void TimerPanel::on_countdownBeep_currentIndexChanged(int index)
{
if (!lock) {
const unsigned int val = ui->countdownStart->itemData(index).toUInt();
if (val != timer.countdownBeep) {
timer.setCountdownBeep(val);
emit modified();
}
}
}
void TimerPanel::on_value_editingFinished()
{
if (!lock) {
@@ -158,26 +151,6 @@ void TimerPanel::onModeChanged(int index)
}
}
void TimerPanel::on_minuteBeep_toggled(bool checked)
{
if (!lock) {
timer.minuteBeep = checked;
emit modified();
}
}
void TimerPanel::on_name_editingFinished()
{
if (!lock) {
if (QString(timer.name) != ui->name->text()) {
int length = ui->name->maxLength();
strncpy(timer.name, ui->name->text().toLatin1(), length);
emit nameChanged();
emit modified();
}
}
}
void TimerPanel::connectItemModelEvents(const FilteredItemModel * itemModel)
{
connect(itemModel, &FilteredItemModel::aboutToBeUpdated, this, &TimerPanel::onItemModelAboutToBeUpdated);
@@ -199,28 +172,6 @@ void TimerPanel::onItemModelUpdateComplete()
}
}
void TimerPanel::on_countdownStart_currentIndexChanged(int index)
{
if (!lock) {
const int val = ui->countdownStart->itemData(index).toInt();
if (val != timer.countdownStart) {
timer.countdownStart = val;
emit modified();
}
}
}
void TimerPanel::on_persistent_currentIndexChanged(int index)
{
if (!lock) {
const unsigned int val = ui->persistent->itemData(index).toUInt();
if (val != timer.persistent) {
timer.persistent = val;
emit modified();
}
}
}
/******************************************************************************/
#define FAILSAFE_CHANNEL_HOLD 2000