You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			38 lines
		
	
	
		
			927 B
		
	
	
	
		
			C++
		
	
			
		
		
	
	
			38 lines
		
	
	
		
			927 B
		
	
	
	
		
			C++
		
	
| #include "change_shift.h"
 | |
| 
 | |
| change_shift::change_shift(QDialog *parent)
 | |
| 	: QDialog(parent)
 | |
| {
 | |
| 	ui.setupUi(this);
 | |
| 	this->setWindowFlags(windowFlags()&~Qt::WindowContextHelpButtonHint);
 | |
| }
 | |
| 
 | |
| change_shift::~change_shift()
 | |
| {
 | |
| }
 | |
| 
 | |
| void change_shift::on_pushButton_released()
 | |
| {
 | |
| 	QTime timeA;
 | |
| 	QTime timeB;
 | |
| 	QTime timeC;
 | |
| 	timeA.setHMS(ui.A_hour->text().toInt(), ui.A_minute->text().toInt(), 0);
 | |
| 	timeB.setHMS(ui.B_hour->text().toInt(), ui.B_minute->text().toInt(), 0);
 | |
| 	timeC.setHMS(ui.C_hour->text().toInt(), ui.C_minute->text().toInt(), 0);
 | |
| 	emit sendMsgToDialogSetup(timeA, timeB, timeC);
 | |
| 	this->close();
 | |
| }
 | |
| 
 | |
| void change_shift::recMsgFromDialogSetup(QTime timeA, QTime timeB, QTime timeC)
 | |
| {
 | |
| 	ui.A_hour->setValue(timeA.hour());
 | |
| 	ui.A_minute->setValue(timeA.minute());
 | |
| 
 | |
| 	ui.B_hour->setValue(timeB.hour());
 | |
| 	ui.B_minute->setValue(timeB.minute());
 | |
| 
 | |
| 	ui.C_hour->setValue(timeC.hour());
 | |
| 	ui.C_minute->setValue(timeC.minute());
 | |
| 
 | |
| 	this->show();
 | |
| } |