AstRawDark
Manage your astrophoto dark frames
 All Classes Functions Variables Enumerations Enumerator Pages
plotManager.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 PLOTMANAGER_H
21 #define PLOTMANAGER_H
22 
23 #include <QObject>
24 
25 #include "data/dataStore.h"
26 #include "commands/signalDispatcher.h"
27 #include "contrib/qCustomPlot/qcustomplot.h"
28 
32 class PlotManager : public QObject
33 {
34  Q_OBJECT
35 public:
44  explicit PlotManager(QCustomPlot* darkTempPlot,
45  QCustomPlot* darkTempDistriPlot,
46  QCustomPlot* lightsTempPlot,
47  QCustomPlot* lightsTempDistriPlot,
48  QObject *parent = 0);
49 
50 private:
51  QCustomPlot* _darkTempEvoPlot;
52  QCustomPlot* _darkTempDistriPlot;
53  QCustomPlot* _lightsTempEvoPlot;
54  QCustomPlot* _lightsTempDistriPlot;
55 
56  void clearDarkTempEvoGraph();
57  void clearDarkTempDistriGraph();
58  void clearLightsTempEvoGraph();
59  void clearLightsTempDistriGraph();
60 
61  void refreshDarkTempEvoGraph();
62  void refreshDarkTempDistriGraph();
63  void refreshLightsTempEvoGraph();
64  void refreshLightsTempDistriGraph();
65 
66  void setupTempEvoPlot(QCustomPlot* plot, QString xLabel, QString yLabel);
67  void setupTempDisrtiPlot(QCustomPlot* plot, QString xLabel, QString yLabel);
68 
69  void refreshTempEvoPlot(QCustomPlot* plot, QList<ImageInfo> infos);
70  void refreshTempDistriPlot(QCustomPlot* plot, QList<ImageInfo> infos);
71 
72  void clearPlot(QCustomPlot* plot);
73 
74  int roundUp(int numToRound, int multiple);
75 
76 signals:
77 
78 private slots:
80  void on_darkModelChanged();
81 
83  void on_darkScanStarted();
84 
86  void on_lightsScanDone();
87 
89  void on_lightsScanStarted();
90 };
91 
92 #endif // PLOTMANAGER_H