| 
						
						
						
					 | 
				
				 | 
				
					@ -0,0 +1,71 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					// SPDX-License-Identifier: GPL-3.0-or-later
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					/*
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * Qt mutizone MQTT thermostat | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * Copyright (C) 2020 Richard Genoud | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					#include <QApplication>
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					#include <QPushButton>
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					#include <QMessageBox>
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					#include <QGridLayout>
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					#include <QLocale>
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					#include "settings.h"
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					#include "menu_dlg.h"
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					MenuDlg::MenuDlg(QWidget *parent, Qt::WindowFlags f) : | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						QDialog(parent, f) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						QGridLayout *mainLayout = new QGridLayout; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						QPushButton *holiday_btn = new QPushButton(tr("Holidays"), this); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						QPushButton *save_cfg_btn = new QPushButton(tr("Save configuration"), this); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						QPushButton *load_cfg_btn = new QPushButton(tr("Load configuration"), this); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						QPushButton *exit_btn = new QPushButton(tr("Exit Application"), this); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						QPushButton *back_btn = new QPushButton(tr("Back"), this); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						mainLayout->addWidget(holiday_btn, 0, 0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						mainLayout->addWidget(save_cfg_btn, 0, 1); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						mainLayout->addWidget(load_cfg_btn, 0, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						mainLayout->addWidget(exit_btn, 1, 0); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						mainLayout->addWidget(back_btn, 1, 2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						connect(holiday_btn, SIGNAL(clicked(void)), this, SLOT(show_holiday_dlg(void))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						connect(save_cfg_btn, SIGNAL(clicked(void)), this, SLOT(show_save_cfg_dlg(void))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						connect(load_cfg_btn, SIGNAL(clicked(void)), this, SLOT(show_load_cfg_dlg(void))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						connect(back_btn, SIGNAL(clicked(void)), this, SLOT(accept(void))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						connect(exit_btn, SIGNAL(clicked(void)), this, SLOT(show_confirm_exit_dlg(void))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						this->setLayout(mainLayout); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					void MenuDlg::show_holiday_dlg(void) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					void MenuDlg::show_save_cfg_dlg(void) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					void MenuDlg::show_load_cfg_dlg(void) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					void MenuDlg::show_confirm_exit_dlg(void) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						QMessageBox::StandardButton retval; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						retval = QMessageBox::question(this, tr("Exit application"), tr("Are you sure ?")); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						if (retval == QMessageBox::Yes) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							qApp->quit(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					MenuDlg::~MenuDlg() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					/* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 |