AstRawDark
Manage your astrophoto dark frames
 All Classes Functions Variables Enumerations Enumerator Pages
commandManager.cpp
1 /*
2  * AstRawDark
3  *
4  * Copyright (C) 2015 - Frédéric CORNU
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #include "commandManager.h"
21 #include "commandFactory.h"
22 #include "data/dataStore.h"
23 #include "globals.h"
24 #include "signalDispatcher.h"
25 #include "abstractCommand.h"
26 
27 #include <QSettings>
28 
29 #ifndef QT_NO_DEBUG
30 #include <QDebug>
31 #endif
32 
34  : QObject(parent),
35  _queue(new CommandQueue()),
36  _executor(_queue)
37 {
40  this,
42 
45  this,
47 
50  this,
52 
55  this,
57 
60  this,
62 
65  this,
67 
68 
69  _executor.start();
70 
71  // launch a dark scan on startup, if user wants it
72  if ( QSettings().value(Globals::SETTINGKEY_SCANDARKS_ON_STARTUP, false).toBool() ) {
73 
75  }
76 }
77 
79 {
80  _executor.stop();
81 }
82 
84 {
85  return _queue->getCommand(serial);
86 }
87 
89 {
91 }
92 
94 {
96 }
97 
99 {
101 }
102 
104 
106 }
107 
109 
111 }
112 
114 
116 }