|
|
@ -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) |
|
|
|