Changeset View
Changeset View
Standalone View
Standalone View
kstars/kstarslite.h
1 | /** ************************************************************************* | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | kstarslite.h - K Desktop Planetarium | 2 | kstarslite.h - K Desktop Planetarium | ||
3 | ------------------- | 3 | ------------------- | ||
4 | begin : 30/04/2016 | 4 | begin : 30/04/2016 | ||
5 | copyright : (C) 2016 by Artem Fedoskin | 5 | copyright : (C) 2016 by Artem Fedoskin | ||
6 | email : afedoskin3@gmail.com | 6 | email : afedoskin3@gmail.com | ||
7 | ***************************************************************************/ | 7 | ***************************************************************************/ | ||
8 | /** ************************************************************************* | 8 | /*************************************************************************** | ||
9 | * * | 9 | * * | ||
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * | ||
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * | ||
Context not available. | |||||
18 | 18 | | |||
19 | #include "config-kstars.h" | 19 | #include "config-kstars.h" | ||
20 | 20 | | |||
21 | //Needed for Projection enum | ||||
22 | #include "projections/projector.h" | ||||
23 | | ||||
21 | #include <QQuickWindow> | 24 | #include <QQuickWindow> | ||
22 | #include <QPalette> | 25 | #include <QPalette> | ||
23 | #include <QString> | 26 | #include <QString> | ||
24 | #include <QtQml/QQmlApplicationEngine> | 27 | #include <QtQml/QQmlApplicationEngine> | ||
25 | 28 | | |||
26 | //Needed for Projection enum | 29 | #include <memory> | ||
27 | #include "projections/projector.h" | | |||
28 | 30 | | |||
29 | // forward declaration is enough. We only need pointers | 31 | // forward declaration is enough. We only need pointers | ||
30 | class KStarsData; | 32 | class KStarsData; | ||
Context not available. | |||||
65 | * @param startDateString date (in string representation) to start running from. | 67 | * @param startDateString date (in string representation) to start running from. | ||
66 | */ | 68 | */ | ||
67 | explicit KStarsLite(bool doSplash, bool startClockRunning = true, const QString &startDateString = QString()); | 69 | explicit KStarsLite(bool doSplash, bool startClockRunning = true, const QString &startDateString = QString()); | ||
70 | virtual ~KStarsLite(); | ||||
68 | 71 | | |||
69 | static KStarsLite *pinstance; // Pointer to an instance of KStarsLite | 72 | static KStarsLite *pinstance; // Pointer to an instance of KStarsLite | ||
70 | 73 | | |||
Context not available. | |||||
83 | /** @return a pointer to the instance of this class */ | 86 | /** @return a pointer to the instance of this class */ | ||
84 | inline static KStarsLite *Instance() { return pinstance; } | 87 | inline static KStarsLite *Instance() { return pinstance; } | ||
85 | 88 | | |||
86 | /** Destructor. Does nothing yet */ | | |||
87 | virtual ~KStarsLite(); | | |||
88 | | ||||
89 | /** @return pointer to SkyMapLite object which draws SkyMap. */ | 89 | /** @return pointer to SkyMapLite object which draws SkyMap. */ | ||
90 | inline SkyMapLite *map() const { return m_SkyMapLite; } | 90 | inline SkyMapLite *map() const { return m_SkyMapLite; } | ||
91 | 91 | | |||
Context not available. | |||||
96 | inline KStarsData *data() const { return m_KStarsData; } | 96 | inline KStarsData *data() const { return m_KStarsData; } | ||
97 | 97 | | |||
98 | /** @return pointer to ImageProvider that is used in QML to display image fetched from CCD **/ | 98 | /** @return pointer to ImageProvider that is used in QML to display image fetched from CCD **/ | ||
99 | inline ImageProvider *imageProvider() const { return m_imgProvider; } | 99 | inline ImageProvider *imageProvider() const { return m_imgProvider.get(); } | ||
100 | 100 | | |||
101 | /** @return pointer to QQmlApplicationEngine that runs QML **/ | 101 | /** @return pointer to QQmlApplicationEngine that runs QML **/ | ||
102 | inline QQmlApplicationEngine *qmlEngine() { return &m_Engine; } | 102 | inline QQmlApplicationEngine *qmlEngine() { return &m_Engine; } | ||
Context not available. | |||||
120 | * @defgroup kconfigwrappers QML wrappers around KConfig | 120 | * @defgroup kconfigwrappers QML wrappers around KConfig | ||
121 | * @{ | 121 | * @{ | ||
122 | */ | 122 | */ | ||
123 | enum ObjectsToToggle | 123 | enum class ObjectsToToggle | ||
124 | { | 124 | { | ||
125 | Stars, | 125 | Stars, | ||
126 | DeepSky, | 126 | DeepSky, | ||
Context not available. | |||||
228 | void initFocus(); | 228 | void initFocus(); | ||
229 | 229 | | |||
230 | QQmlApplicationEngine m_Engine; | 230 | QQmlApplicationEngine m_Engine; | ||
231 | SkyMapLite *m_SkyMapLite; | 231 | SkyMapLite *m_SkyMapLite { nullptr }; | ||
232 | QPalette OriginalPalette, DarkPalette; | 232 | QPalette OriginalPalette, DarkPalette; | ||
233 | 233 | | |||
234 | QObject *m_RootObject; | 234 | QObject *m_RootObject { nullptr }; | ||
235 | bool StartClockRunning; | 235 | bool StartClockRunning { false }; | ||
236 | 236 | | |||
237 | KStarsData *m_KStarsData; | 237 | KStarsData *m_KStarsData { nullptr }; | ||
238 | ImageProvider *m_imgProvider; | 238 | std::unique_ptr<ImageProvider> m_imgProvider; | ||
239 | 239 | | |||
240 | //Dialogs | 240 | //Dialogs | ||
241 | FindDialogLite *m_findDialogLite; | 241 | FindDialogLite *m_findDialogLite { nullptr }; | ||
242 | DetailDialogLite *m_detailDialogLite; | 242 | DetailDialogLite *m_detailDialogLite { nullptr }; | ||
243 | LocationDialogLite *m_locationDialogLite; | 243 | LocationDialogLite *m_locationDialogLite { nullptr }; | ||
244 | 244 | | |||
245 | ClientManagerLite *m_clientManager; | 245 | ClientManagerLite *m_clientManager { nullptr }; | ||
246 | }; | 246 | }; | ||
Context not available. |