|
|
@ -38,6 +38,7 @@ EditDlg::EditDlg(int idx, QWidget *parent, Qt::WindowFlags f) : QWidget(parent, |
|
|
|
set_font(room_name); |
|
|
|
|
|
|
|
m_idx = idx; |
|
|
|
m_progs = r.progs; |
|
|
|
m_default_temperature.setDecimals(1); |
|
|
|
m_default_temperature.setValue(r.default_temperature); |
|
|
|
m_default_temperature.setSingleStep(0.1); |
|
|
@ -89,9 +90,9 @@ EditDlg::EditDlg(int idx, QWidget *parent, Qt::WindowFlags f) : QWidget(parent, |
|
|
|
topLayout->addLayout(upperLayout); |
|
|
|
|
|
|
|
QGridLayout *progLayout = new QGridLayout; |
|
|
|
for (int i = 0; i < r.progs.count(); i++) { |
|
|
|
for (int i = 0; i < m_progs.count(); i++) { |
|
|
|
|
|
|
|
p = &(r.progs.at(i)); |
|
|
|
p = &(m_progs.at(i)); |
|
|
|
|
|
|
|
text = QString(""); |
|
|
|
if (p->temperature == FORCE_OFF) { |
|
|
@ -186,6 +187,11 @@ void EditDlg::set_font(QWidget *widget) |
|
|
|
|
|
|
|
void EditDlg::save(void) |
|
|
|
{ |
|
|
|
Settings *s = Settings::getInstance(); |
|
|
|
|
|
|
|
s->setRoomDefaultTemperature(m_idx, m_default_temperature.value()); |
|
|
|
s->setRoomPrograms(m_idx, m_progs); |
|
|
|
|
|
|
|
emit close_edit_dlg(); |
|
|
|
} |
|
|
|
|
|
|
|