| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -27,6 +27,8 @@ MainWindow::MainWindow(QWidget *parent) : | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						ZoneItem *zone; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						m_boost = NULL; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						Settings *s = Settings::getInstance(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						for (int i = 0; i < s->nbZones(); i++) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -109,11 +111,23 @@ MainWindow::~MainWindow() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					void MainWindow::boost_slot(int idx, struct boost_data &data) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						if (idx == -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							/*
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							 * user has hit cancel | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							 */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							goto out; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						qDebug() << "room " << m_zones.at(idx)->m_name << " new BOOST " << data.temperature << " end: " << data.end_date; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						m_zones.at(idx)->m_boost = data; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						apply_order_to_heaters(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					out: | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						m_central_widget.removeWidget(m_boost); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						delete m_boost; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						m_boost = NULL; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						show_main(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					void MainWindow::show_boost(void) | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -130,11 +144,11 @@ void MainWindow::show_boost(void) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						if ((idx < 0) || (idx >= MAX_NB_ZONES)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						BoostDlg boost(idx, m_zones.at(idx)->m_name, m_zones.at(idx)->m_target_temperature, this); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						m_boost = new BoostDlg(idx, m_zones.at(idx)->m_name, m_zones.at(idx)->m_target_temperature, NULL); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						connect(&boost, SIGNAL(boost_changed(int, struct boost_data &)), this, SLOT(boost_slot(int, struct boost_data &))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						boost.showFullScreen(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						boost.exec(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						connect(m_boost, SIGNAL(boost_changed(int, struct boost_data &)), this, SLOT(boost_slot(int, struct boost_data &))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						m_central_widget.addWidget(m_boost); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						m_central_widget.setCurrentWidget(m_boost); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					void MainWindow::show_menu(void) | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -146,6 +160,11 @@ void MainWindow::show_menu(void) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						menu.exec(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					void MainWindow::show_main(void) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						m_central_widget.setCurrentIndex(0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					void MainWindow::update_state_btn(enum power_states st) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						switch (st) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |