AstRawDark
Manage your astrophoto dark frames
 All Classes Functions Variables Enumerations Enumerator Pages
mainWindow.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 MAINWINDOW_H
21 #define MAINWINDOW_H
22 
23 #include <QMainWindow>
24 
25 #include "commands/commandManager.h"
26 #include "plotManager.h"
27 
28 
29 namespace Ui {
30 
31  class MainWindow;
32 }
33 
37 class MainWindow : public QMainWindow
38 {
39  Q_OBJECT
40 
41 public:
46  explicit MainWindow(QWidget *parent = 0);
47 
49  ~MainWindow();
50 
51 protected:
56  void changeEvent(QEvent *e);
57 
58 private:
60  CommandManager* _commandManager;
61 
62  const QString LBL_DARKCOUNT_BASETEXT;
63  const QString LBL_LIGHTSCOUNT_BASETEXT;
64 
66  Ui::MainWindow *ui;
67 
69  void updateDarkContentCount();
70 
72  void updateLightsContentCount();
73 
75  DataStore* _dataStore;
76 
78  PlotManager* _plotManager;
79 
80  void createProgressBarForCommand(AbstractCommand *command);
81 
82 private slots:
84  void on_actionQuit_triggered();
85 
87  void on_btnRescanDarks_clicked();
88 
90  void on_actionPrefs_triggered();
91 
97  void on_actionCommandLog_toggled(bool checked);
98 
100  void on_actionAbout_triggered();
101 
107  void on_tblCommandView_doubleClicked(const QModelIndex & index);
108 
113  void on_treeDarkView_clicked(const QModelIndex & index);
114 
116  void on_btnDarkFilterClear_clicked();
117 
119  void on_darkListModelChanged();
120 
122  void on_actionRescanDarksLibrary_triggered();
123 
125  void on_btnChooseLightsFolder_clicked();
126 
131  void on_sldDarkMatchers_valueChanged(int value);
132 
137  void on_darkSourcesChanged(const QStringList &sources);
138 
140  void on_darkScanStart();
141 
143  void on_darkScanDone();
144 
146  void on_lightsScanStart();
147 
149  void on_lightsScanDone();
150 
152  void on_consistencyResult(bool consistent);
153 
155  void on_commandCreated(AbstractCommand* command);
156 
158  void on_btnRescanLights_clicked();
159 
161  void on_btnLightsMatch_clicked();
162 
167  void on_bestMatchCount(int bestMatch);
168 
172  void on_matchFound();
173 
177  void on_btnExportDarks_clicked();
178 
183  void on_commandStatusChange(AbstractCommand* command);
184 
185 signals:
187  void scanDarkLibrary();
188 
190  void scanLightsFolder();
191 
193  void checkLights();
194 
196  void matchLights();
197 
199  void copyDarks();
200 
202  void computeBestMatch();
203 };
204 
205 #endif // MAINWINDOW_H