Browse Source

thermostat: edit_dlg: finalize "add" button

master
Richard Genoud 4 years ago
parent
commit
8120df46b6
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      soft/thermostat/src/edit_dlg.cpp

+ 17
- 0
soft/thermostat/src/edit_dlg.cpp View File

@ -222,6 +222,23 @@ void EditDlg::reject(void)
void EditDlg::add(void)
{
QHBoxLayout *layout;
struct Program p;
int idx = m_progsLayout->count();
if (m_progsLayout->count() != m_progs.count()) {
// TODO ERROR: index mismatch
return;
}
p.temperature = 20;
p.DoW = 0;
p.start_time = QTime(0,0);
p.end_time = QTime(0,0);
m_progs << p;
layout = add_prog_layout(&(m_progs.at(idx)), idx);
m_progsLayout->addLayout(layout);
}
void EditDlg::delete_prog_clicked(void)


Loading…
Cancel
Save