|
|
@ -33,8 +33,6 @@ MainWindow::MainWindow(QWidget *parent) : |
|
|
|
m_boost = NULL; |
|
|
|
m_menu = NULL; |
|
|
|
|
|
|
|
m_end_holiday = QDate::currentDate();; |
|
|
|
|
|
|
|
Settings *s = Settings::getInstance(); |
|
|
|
|
|
|
|
for (int i = 0; i < s->nbZones(); i++) { |
|
|
@ -191,7 +189,7 @@ void MainWindow::do_show_holiday_dlg(void) |
|
|
|
m_central_widget.addWidget(holiday_dlg); |
|
|
|
m_central_widget.setCurrentWidget(holiday_dlg); |
|
|
|
connect(holiday_dlg, SIGNAL(close_holiday_dlg(void)), this, SLOT(do_close_holiday_dlg(void))); |
|
|
|
connect(holiday_dlg, SIGNAL(holiday_mode(QDate)), this, SLOT(set_holiday_mode(QDate))); |
|
|
|
connect(holiday_dlg, SIGNAL(holiday_mode(QDateTime)), this, SLOT(set_holiday_mode(QDateTime))); |
|
|
|
} |
|
|
|
|
|
|
|
void MainWindow::do_close_holiday_dlg(void) |
|
|
@ -205,9 +203,11 @@ void MainWindow::do_close_holiday_dlg(void) |
|
|
|
delete current; |
|
|
|
} |
|
|
|
|
|
|
|
void MainWindow::set_holiday_mode(QDate end_date) |
|
|
|
void MainWindow::set_holiday_mode(QDateTime end_date) |
|
|
|
{ |
|
|
|
m_end_holiday = end_date; |
|
|
|
Settings *s = Settings::getInstance(); |
|
|
|
|
|
|
|
s->m_end_holiday = end_date; |
|
|
|
apply_order_to_heaters(); |
|
|
|
} |
|
|
|
|
|
|
@ -430,7 +430,7 @@ void MainWindow::apply_order_to_heaters(void) |
|
|
|
Settings *s = Settings::getInstance(); |
|
|
|
bool heating_order = false; |
|
|
|
|
|
|
|
if (m_end_holiday > QDate::currentDate()) { |
|
|
|
if (s->m_end_holiday > QDateTime::currentDateTime()) { |
|
|
|
qDebug() << "Holiday mode => emit ALL_OFF order"; |
|
|
|
emit setAllHeatersOn(false); |
|
|
|
} else { |
|
|
|