1 /*
2 	Actiona
3 	Copyright (C) 2005 Jonathan Mercier-Ganady
4 
5 	Actiona is free software: you can redistribute it and/or modify
6 	it under the terms of the GNU General Public License as published by
7 	the Free Software Foundation, either version 3 of the License, or
8 	(at your option) any later version.
9 
10 	Actiona is distributed in the hope that it will be useful,
11 	but WITHOUT ANY WARRANTY; without even the implied warranty of
12 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 	GNU General Public License for more details.
14 
15 	You should have received a copy of the GNU General Public License
16 	along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 	Contact : jmgr@jmgr.info
19 */
20 
21 #pragma once
22 
23 #include "actioninstance.h"
24 
25 #include <QApplication>
26 #include <QWidget>
27 
28 namespace Actions
29 {
30 	class ExitInstance : public ActionTools::ActionInstance
31 	{
32 		Q_OBJECT
33 
34 	public:
35 		ExitInstance(const ActionTools::ActionDefinition *definition, QObject *parent = nullptr)
ActionInstance(definition,parent)36 			: ActionTools::ActionInstance(definition, parent)										{}
37 
startExecution()38 		void startExecution() override
39 		{
40 			QApplication::quit();
41 
42 			executionEnded();
43 		}
44 
45 	private:
46 		Q_DISABLE_COPY(ExitInstance)
47 	};
48 }
49 
50