AstRawDark
Manage your astrophoto dark frames
 All Classes Functions Variables Enumerations Enumerator Pages
signalDispatcher.h
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 #ifndef SIGNALDISPATCHER_H
21 #define SIGNALDISPATCHER_H
22 
23 #include <QObject>
24 #include <QStringList>
25 
26 #include "data/dto/imageInfo.h"
27 #include "abstractCommand.h"
28 
32 class SignalDispatcher : public QObject
33 {
34  Q_OBJECT
35 private:
40  explicit SignalDispatcher(QObject *parent = 0);
41 
43  static SignalDispatcher* _instance;
44 
45 public:
50  static SignalDispatcher* getInstance();
51 
52 signals:
54  void darkScanStarted();
55 
57  void lightsScanStarted();
58 
63  void darkScanDone(QList<ImageInfo> result);
64 
69  void lightsScanDone(QList<ImageInfo> result);
70 
75  void commandCreated(AbstractCommand* command);
76 
81  void commandStatusChange(AbstractCommand* command);
82 
87  void darkSourcesChanged(QStringList sources);
88 
90  void createDarkScanCommand();
91 
93  void darkListModelChanged();
94 
97 
100 
103 
105  void createDarkCopyCommand();
106 
111  void consistencyResult(bool consistent);
112 
115 
120  void matchFound(QList<ImageInfo> matchedDarks);
121 
126  void bestMatchCount(int matchedDarksCount);
127 
128 
129 public slots:
132 
137  void on_darkScanDone(QList<ImageInfo> result) {emit darkScanDone(result);}
138 
143  void on_lightsScanDone(QList<ImageInfo> result) {emit lightsScanDone(result);}
144 
149  void on_commandCreated(AbstractCommand* command) {emit commandCreated(command);}
150 
156 
161  void on_darkSourcesChanged(QStringList sources) { emit darkSourcesChanged(sources);}
162 
165 
168 
171 
174 
177 
180 
183 
185  void on_consistencyResult(bool consistent) {emit consistencyResult(consistent);}
186 
189 
194  void on_matchFound(QList<ImageInfo> matchedDarks) { emit matchFound(matchedDarks); }
195 
200  void on_bestMatchCount(int matchedDarksCount) { emit bestMatchCount(matchedDarksCount); }
201 
202 };
203 
204 #endif // SIGNALDISPATCHER_H