summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCsaba Kertesz <[email protected]>2017-07-04 00:09:59 +0300
committerCsaba Kertesz <[email protected]>2017-07-04 00:38:56 +0300
commitd89cd042883ef0a5f6fb6bdf4d689bf88aca92a5 (patch)
tree7c44f0d5ee4d5021cb64e26e02bec0adb27c7d33
parent32ffa4864dc753c0128dbb7a96ab463cba8b79b1 (diff)
Fix the Android build errors
-rw-r--r--datahandlers/CMakeLists.txt1
-rw-r--r--kstars/fitsviewer/fitsdata.cpp1
-rw-r--r--kstars/fitsviewer/fitsdata.h4
-rw-r--r--kstars/kstarslite/skyitems/satellitesitem.cpp1
-rw-r--r--kstars/kstarslite/skyitems/skynodes/deepskynode.cpp18
-rw-r--r--kstars/kstarslite/skyitems/skynodes/deepskynode.h58
-rw-r--r--kstars/kstarslite/skyitems/skynodes/guidelabelnode.cpp9
-rw-r--r--kstars/kstarslite/skyitems/skynodes/guidelabelnode.h39
-rw-r--r--kstars/kstarslite/skyitems/skynodes/labelnode.cpp1
-rw-r--r--kstars/kstarslite/skyitems/skynodes/labelnode.h77
-rw-r--r--kstars/kstarslite/skyitems/skynodes/satellitenode.cpp14
-rw-r--r--kstars/kstarslite/skyitems/skynodes/satellitenode.h55
-rw-r--r--kstars/kstarslite/skyitems/skynodes/skynode.cpp3
-rw-r--r--kstars/kstarslite/skyitems/skynodes/skynode.h71
-rw-r--r--kstars/kstarslite/skyitems/skynodes/supernovanode.cpp10
-rw-r--r--kstars/kstarslite/skyitems/skynodes/supernovanode.h32
-rw-r--r--kstars/skyobjects/skypoint.h2
-rw-r--r--kstars/skyobjects/starobject.h4
18 files changed, 207 insertions, 193 deletions
diff --git a/datahandlers/CMakeLists.txt b/datahandlers/CMakeLists.txt
index d5b9ed9..59ec65c 100644
--- a/datahandlers/CMakeLists.txt
+++ b/datahandlers/CMakeLists.txt
@@ -1,5 +1,4 @@
include_directories(
- ${kstars_SOURCE_DIR}/kstars
${kstars_SOURCE_DIR}/kstars/tools
${kstars_SOURCE_DIR}/kstars/skyobjects
${kstars_SOURCE_DIR}/kstars/skycomponents
diff --git a/kstars/fitsviewer/fitsdata.cpp b/kstars/fitsviewer/fitsdata.cpp
index 3b0fc5a..88a3e8b 100644
--- a/kstars/fitsviewer/fitsdata.cpp
+++ b/kstars/fitsviewer/fitsdata.cpp
@@ -26,6 +26,7 @@
#include "skymapcomposite.h"
#include <QApplication>
+#include <QImage>
#if !defined(KSTARS_LITE) && defined(HAVE_WCSLIB)
#include <wcshdr.h>
diff --git a/kstars/fitsviewer/fitsdata.h b/kstars/fitsviewer/fitsdata.h
index be8afd3..501c556 100644
--- a/kstars/fitsviewer/fitsdata.h
+++ b/kstars/fitsviewer/fitsdata.h
@@ -29,11 +29,13 @@
#include <fitsio.h>
+#include <QRect>
+#include <QRectF>
+
#ifndef KSTARS_LITE
#include "fitshistogram.h"
#include <kxmlguiwindow.h>
-
#ifdef HAVE_WCSLIB
#include <wcs.h>
#endif
diff --git a/kstars/kstarslite/skyitems/satellitesitem.cpp b/kstars/kstarslite/skyitems/satellitesitem.cpp
index 415fb1a..59e3ed8 100644
--- a/kstars/kstarslite/skyitems/satellitesitem.cpp
+++ b/kstars/kstarslite/skyitems/satellitesitem.cpp
@@ -23,6 +23,7 @@
#include "rootnode.h"
#include "labelsitem.h"
+#include "satellite.h"
#include "skylabeler.h"
#include "skynodes/satellitenode.h"
diff --git a/kstars/kstarslite/skyitems/skynodes/deepskynode.cpp b/kstars/kstarslite/skyitems/skynodes/deepskynode.cpp
index 4bd55ec..d0f2992 100644
--- a/kstars/kstarslite/skyitems/skynodes/deepskynode.cpp
+++ b/kstars/kstarslite/skyitems/skynodes/deepskynode.cpp
@@ -13,20 +13,22 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#include "skyobject.h"
-#include "Options.h"
-
-#include <QSGSimpleTextureNode>
-#include <QQuickWindow>
#include "deepskynode.h"
-#include "nodes/pointnode.h"
+
+#include "deepskyobject.h"
#include "dsosymbolnode.h"
+#include "labelnode.h"
+#include "Options.h"
+#include "skyobject.h"
#include "trixelnode.h"
-#include "deepskyobject.h"
+#include "nodes/pointnode.h"
#include "../rootnode.h"
#include "../labelsitem.h"
-#include "labelnode.h"
+
+#include <QSGSimpleTextureNode>
+#include <QQuickWindow>
+
DeepSkyNode::DeepSkyNode(DeepSkyObject *skyObject, DSOSymbolNode *symbol, LabelsItem::label_t labelType, short trixel)
: m_dso(skyObject), m_objImg(0), m_symbol(symbol), m_trixel(trixel), m_labelType(labelType), m_label(0)
diff --git a/kstars/kstarslite/skyitems/skynodes/deepskynode.h b/kstars/kstarslite/skyitems/skynodes/deepskynode.h
index e129e1a..f863256 100644
--- a/kstars/kstarslite/skyitems/skynodes/deepskynode.h
+++ b/kstars/kstarslite/skyitems/skynodes/deepskynode.h
@@ -13,8 +13,9 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#ifndef DEEPSKYNODE_H_
-#define DEEPSKYNODE_H_
+
+#pragma once
+
#include "skynode.h"
#include "../labelsitem.h"
@@ -25,7 +26,8 @@ class LabelNode;
class QSGSimpleTextureNode;
class DSOSymbolNode;
-/** @class DeepSkyNode
+/**
+ * @class DeepSkyNode
*
* @short A SkyNode derived class used for displaying DeepSkyObjects.
*
@@ -42,42 +44,42 @@ class DeepSkyNode : public SkyNode
{
public:
/**
- * @short Constructor.
- * @param skyObject - DSOs that is represented by this node
- * @param symbol - DSOSymbolNode of this DSO
- * @param trixel - trixelID, with which this node is indexed
- */
+ * @short Constructor.
+ * @param skyObject - DSOs that is represented by this node
+ * @param symbol - DSOSymbolNode of this DSO
+ * @param trixel - trixelID, with which this node is indexed
+ */
DeepSkyNode(DeepSkyObject *skyObject, DSOSymbolNode *symbol, LabelsItem::label_t labelType, short trixel = -1);
/**
- * @short Destructor. Call delete routines of label
- */
+ * @short Destructor. Call delete routines of label
+ */
virtual ~DeepSkyNode();
/**
- * @short changePos changes the position of this node and rotate it according to m_angle
- * @param pos new position
- */
- void changePos(QPointF pos);
+ * @short changePos changes the position of this node and rotate it according to m_angle
+ * @param pos new position
+ */
+ virtual void changePos(QPointF pos) override;
/**
- * @short Update position and visibility of this node
- * @param drawImage - true if image (if exists) should be drawn
- * @param drawLabel - true if label should be drawn
- * @param pos - new position of the object. If default parameter is passed, the visibility and
- * position of node is calculated.
- * There is one case when we pass this parameter - in DeepSkyItem::updateDeepSkyNode() when
- * we check whether DeepSkyObject is visible or no and instantiate it accordingly. There is no
- * need to calculate the position again and we pass it as a parameter.
- */
+ * @short Update position and visibility of this node
+ * @param drawImage - true if image (if exists) should be drawn
+ * @param drawLabel - true if label should be drawn
+ * @param pos - new position of the object. If default parameter is passed, the visibility and
+ * position of node is calculated.
+ * There is one case when we pass this parameter - in DeepSkyItem::updateDeepSkyNode() when
+ * we check whether DeepSkyObject is visible or no and instantiate it accordingly. There is no
+ * need to calculate the position again and we pass it as a parameter.
+ */
void update(bool drawImage, bool drawLabel, QPointF pos = QPointF(-1, -1));
virtual void hide() override;
/**
- * @short sets color of DSO symbol and label
- * To not increase the code for symbols we just recreate the symbol painted with desired color
- * @param symbolTrixel the TrixelNode to which symbol node should be appended
- */
+ * @short sets color of DSO symbol and label
+ * To not increase the code for symbols we just recreate the symbol painted with desired color
+ * @param symbolTrixel the TrixelNode to which symbol node should be appended
+ */
void setColor(QColor color, TrixelNode *symbolTrixel);
DeepSkyObject *dsObject() { return m_dso; }
@@ -95,5 +97,3 @@ class DeepSkyNode : public SkyNode
float m_angle;
QPointF pos;
};
-
-#endif
diff --git a/kstars/kstarslite/skyitems/skynodes/guidelabelnode.cpp b/kstars/kstarslite/skyitems/skynodes/guidelabelnode.cpp
index 147ee4d..d3534bd 100644
--- a/kstars/kstarslite/skyitems/skynodes/guidelabelnode.cpp
+++ b/kstars/kstarslite/skyitems/skynodes/guidelabelnode.cpp
@@ -13,13 +13,14 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#include "skyobject.h"
-#include "Options.h"
-#include <QSGSimpleTextureNode>
+#include "guidelabelnode.h"
+#include "Options.h"
#include "skymaplite.h"
-#include "guidelabelnode.h"
+#include "skyobject.h"
+
+#include <QSGSimpleTextureNode>
GuideLabelNode::GuideLabelNode(QString name, LabelsItem::label_t type)
: m_textTexture(new QSGSimpleTextureNode), m_name(name)
diff --git a/kstars/kstarslite/skyitems/skynodes/guidelabelnode.h b/kstars/kstarslite/skyitems/skynodes/guidelabelnode.h
index 98581f7..b0dd5de 100644
--- a/kstars/kstarslite/skyitems/skynodes/guidelabelnode.h
+++ b/kstars/kstarslite/skyitems/skynodes/guidelabelnode.h
@@ -13,11 +13,12 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#ifndef GUIDELABELNODE_H_
-#define GUIDELABELNODE_H_
+
+#pragma once
#include "skynode.h"
#include "../labelsitem.h"
+
#include <QSGSimpleRectNode>
class PlanetItemNode;
@@ -26,7 +27,8 @@ class PointNode;
class QSGSimpleTextureNode;
class SkyLabeler;
-/** @class GuideLabelNode
+/**
+ * @class GuideLabelNode
* Currently this class is not used anywhere.
*
*@author Artem Fedoskin
@@ -39,27 +41,28 @@ class GuideLabelNode : public SkyNode
{
public:
/**
- * @short Constructor
- * @param skyObject pointer to SkyObject that has to be displayed on SkyMapLite
- * @param parentNode pointer to the top parent node, which holds texture cache
- * @param spType spectral class of PointNode
- * @param size initial size of PointNode
- */
+ * @short Constructor
+ * @param skyObject pointer to SkyObject that has to be displayed on SkyMapLite
+ * @param parentNode pointer to the top parent node, which holds texture cache
+ * @param spType spectral class of PointNode
+ * @param size initial size of PointNode
+ */
GuideLabelNode(QString name, LabelsItem::label_t type);
/**
- * @short changePos changes the position m_point
- * @param pos new position
- */
+ * @short changePos changes the position m_point
+ * @param pos new position
+ */
virtual void changePos(QPointF pos) override;
+
/**
- * @short setLabelPos sets the position of label with the given offset from SkyObject's position and
- * makes the label visible if it was hidden
- * @param pos position of label
- */
+ * @short setLabelPos sets the position of label with the given offset from SkyObject's position and
+ * makes the label visible if it was hidden
+ * @param pos position of label
+ */
void setLabelPos(QPointF pos, float angle);
- void update();
+ virtual void update() override;
inline const QString name() const { return m_name; }
@@ -79,5 +82,3 @@ class GuideLabelNode : public SkyNode
QPointF m_translatePos;
};
-
-#endif
diff --git a/kstars/kstarslite/skyitems/skynodes/labelnode.cpp b/kstars/kstarslite/skyitems/skynodes/labelnode.cpp
index 92fc4a3..3901684 100644
--- a/kstars/kstarslite/skyitems/skynodes/labelnode.cpp
+++ b/kstars/kstarslite/skyitems/skynodes/labelnode.cpp
@@ -13,6 +13,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
+
#include "skyobject.h"
#include "Options.h"
diff --git a/kstars/kstarslite/skyitems/skynodes/labelnode.h b/kstars/kstarslite/skyitems/skynodes/labelnode.h
index 5632aed..ae49d49 100644
--- a/kstars/kstarslite/skyitems/skynodes/labelnode.h
+++ b/kstars/kstarslite/skyitems/skynodes/labelnode.h
@@ -13,8 +13,8 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#ifndef LABELNODE_H_
-#define LABELNODE_H_
+
+#pragma once
#include "skynode.h"
#include "../labelsitem.h"
@@ -26,45 +26,46 @@ class QSGSimpleTextureNode;
class SkyLabeler;
class RootNode;
-/** @class LabelNode
+/**
+ * @class LabelNode
*
- *@short A SkyNode derived class used for displaying labels
- *@author Artem Fedoskin
- *@version 1.0
+ * @short A SkyNode derived class used for displaying labels
+ * @author Artem Fedoskin
+ * @version 1.0
*/
class LabelNode : public SkyNode
{
public:
/**
- * @short Constructor. Use name of skyObject as a text
- * @param skyObject - target object, for which this label is created.
- * @param type - type of label (corresponds to type of SkyObject)
- */
+ * @short Constructor. Use name of skyObject as a text
+ * @param skyObject - target object, for which this label is created.
+ * @param type - type of label (corresponds to type of SkyObject)
+ */
LabelNode(SkyObject *skyObject, LabelsItem::label_t type);
/**
- * @short Constructor. Use string parameter name as a text
- * @param skyObject - text of label
- * @param type - type of label (corresponds to type of SkyObject)
- */
+ * @short Constructor. Use string parameter name as a text
+ * @param skyObject - text of label
+ * @param type - type of label (corresponds to type of SkyObject)
+ */
LabelNode(QString name, LabelsItem::label_t type);
/**
- * @short Destructor.
- */
+ * @short Destructor.
+ */
virtual ~LabelNode();
/**
- * @short Convenience function to not to repeat the same code in 2 constructors. Set parameters of label
- * based on its type
- */
+ * @short Convenience function to not to repeat the same code in 2 constructors. Set parameters of label
+ * based on its type
+ */
void initialize();
/**
- * @short Changes position of the label
- * @param pos - new position
- */
+ * @short Changes position of the label
+ * @param pos - new position
+ */
virtual void changePos(QPointF pos) override;
inline QString name() { return m_name; }
@@ -72,30 +73,30 @@ class LabelNode : public SkyNode
inline LabelsItem::label_t labelType() { return m_labelType; }
/**
- * @short Create texture from label's name
- * @param color - color of the label
- */
+ * @short Create texture from label's name
+ * @param color - color of the label
+ */
void createTexture(QColor color = QColor());
/**
- * @return true if the size of text depends on zoom
- */
+ * @return true if the size of text depends on zoom
+ */
inline bool zoomFont() { return m_zoomFont; }
/**
- * @short set the position of label with the given offset from SkyObject's position and
- * makes the label visible if it was hidden
- * @warning Keep mind that to update labels position, you should first set it with setLabelPos()
- * and then call update()
- * @param pos position of label
- */
+ * @short set the position of label with the given offset from SkyObject's position and
+ * makes the label visible if it was hidden
+ * @warning Keep mind that to update labels position, you should first set it with setLabelPos()
+ * and then call update()
+ * @param pos position of label
+ */
void setLabelPos(QPointF pos);
/**
- * @short Update position of label according to labelPos and recreate texture if label's size
- * depends on zoom level
- */
- void update();
+ * @short Update position of label according to labelPos and recreate texture if label's size
+ * depends on zoom level
+ */
+ virtual void update() override;
QPointF labelPos;
@@ -110,5 +111,3 @@ class LabelNode : public SkyNode
QString m_schemeColor;
QColor m_color;
};
-
-#endif
diff --git a/kstars/kstarslite/skyitems/skynodes/satellitenode.cpp b/kstars/kstarslite/skyitems/skynodes/satellitenode.cpp
index cea3921..67bbce6 100644
--- a/kstars/kstarslite/skyitems/skynodes/satellitenode.cpp
+++ b/kstars/kstarslite/skyitems/skynodes/satellitenode.cpp
@@ -15,19 +15,21 @@
***************************************************************************/
#include "satellitenode.h"
-#include "satellite.h"
-#include "nodes/polynode.h"
-#include "Options.h"
+
#include "ksutils.h"
+#include "labelnode.h"
#include "linelist.h"
+#include "Options.h"
+#include "satellite.h"
#include "nodes/pointnode.h"
-#include <QSGFlatColorMaterial>
+#include "nodes/polynode.h"
#include "../rootnode.h"
#include "../labelsitem.h"
-#include "labelnode.h"
+
+#include <QSGFlatColorMaterial>
SatelliteNode::SatelliteNode(Satellite *sat, RootNode *rootNode)
- : m_sat(sat), m_rootNode(rootNode), m_lines(0), m_label(0), m_point(0)
+ : m_sat(sat), m_rootNode(rootNode)
{
}
diff --git a/kstars/kstarslite/skyitems/skynodes/satellitenode.h b/kstars/kstarslite/skyitems/skynodes/satellitenode.h
index df10030..350d460 100644
--- a/kstars/kstarslite/skyitems/skynodes/satellitenode.h
+++ b/kstars/kstarslite/skyitems/skynodes/satellitenode.h
@@ -13,8 +13,9 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#ifndef SATELLITENODE_H_
-#define SATELLITENODE_H_
+
+#pragma once
+
#include "skynode.h"
class PolyNode;
@@ -23,41 +24,43 @@ class PointNode;
class QSGFlatColorMaterial;
class LabelNode;
-/** @class SatelliteNode
+/**
+ * @class SatelliteNode
*
- *@short A SkyNode derived class that represents satellite
- *@author Artem Fedoskin
- *@version 1.0
+ * @short A SkyNode derived class that represents satellite
+ * @author Artem Fedoskin
+ * @version 1.0
*/
class SatelliteNode : public SkyNode
{
public:
/**
- * @short Constructor.
- * @param sat - satellite that is represented by this node
- * @param rootNode - pointer to the top parent node
- */
+ * @short Constructor.
+ * @param sat - satellite that is represented by this node
+ * @param rootNode - pointer to the top parent node
+ */
SatelliteNode(Satellite *sat, RootNode *rootNode);
/**
- * @short Update position and visibility of satellite.
- * We also check user settings (Options::drawSatellitesLikeStars()) and based on that draw satellite
- * either like star or with lines
- */
+ * @short Update position and visibility of satellite.
+ * We also check user settings (Options::drawSatellitesLikeStars()) and based on that draw satellite
+ * either like star or with lines
+ */
virtual void update() override;
virtual void hide() override;
/**
- * @short Initialize m_lines (if not already) to draw satellite with lines
- */
+ * @short Initialize m_lines (if not already) to draw satellite with lines
+ */
void initLines();
+
/**
- * @short Initialize m_point (if not already) to draw satellite as a star
- */
+ * @short Initialize m_point (if not already) to draw satellite as a star
+ */
void initPoint();
- void changePos(QPointF pos);
+ virtual void changePos(QPointF pos) override;
inline Satellite *sat() { return m_sat; }
@@ -65,15 +68,13 @@ class SatelliteNode : public SkyNode
Satellite *m_sat;
RootNode *m_rootNode;
- SkyOpacityNode *m_linesOpacity;
- QSGGeometryNode *m_lines;
+ SkyOpacityNode *m_linesOpacity { nullptr };
+ QSGGeometryNode *m_lines { nullptr };
- LabelNode *m_label;
+ LabelNode *m_label { nullptr };
- QSGFlatColorMaterial *m_material;
- QSGGeometry *m_geometry;
+ QSGFlatColorMaterial *m_material { nullptr };
+ QSGGeometry *m_geometry { nullptr };
- PointNode *m_point;
+ PointNode *m_point { nullptr };
};
-
-#endif
diff --git a/kstars/kstarslite/skyitems/skynodes/skynode.cpp b/kstars/kstarslite/skyitems/skynodes/skynode.cpp
index f8eb68f..38326d3 100644
--- a/kstars/kstarslite/skyitems/skynodes/skynode.cpp
+++ b/kstars/kstarslite/skyitems/skynodes/skynode.cpp
@@ -14,9 +14,10 @@
* *
***************************************************************************/
-#include "skymaplite.h"
#include "skynode.h"
+#include "skymaplite.h"
+
SkyNode::SkyNode(SkyObject *skyObject)
: m_opacity(new SkyOpacityNode), m_skyObject(skyObject), m_drawLabel(false), m_hideCount(0)
{
diff --git a/kstars/kstarslite/skyitems/skynodes/skynode.h b/kstars/kstarslite/skyitems/skynodes/skynode.h
index 78abc56..4b1d353 100644
--- a/kstars/kstarslite/skyitems/skynodes/skynode.h
+++ b/kstars/kstarslite/skyitems/skynodes/skynode.h
@@ -13,19 +13,20 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#ifndef SKYNODE_H_
-#define SKYNODE_H_
-#include <QSGTransformNode>
+#pragma once
+
#include "skymaplite.h"
#include "projections/projector.h"
-
#include "../skyopacitynode.h"
+#include <QSGTransformNode>
+
class Projector;
class SkyMapLite;
-/** @class SkyNode
+/**
+ * @class SkyNode
*
* A QSGTransformNode derived class that has to be subclassed by node containers like PlanetNode and
* PointSourceNode. SkyObject * that is passed as parameter to constructor is used in subclasses
@@ -41,66 +42,68 @@ class SkyNode : public QSGTransformNode
{
public:
/**
- * @brief Constructor
- * @param skyObject that is represented on the SkyMapLIte
- */
+ * @brief Constructor
+ * @param skyObject that is represented on the SkyMapLIte
+ */
SkyNode(SkyObject *skyObject);
SkyNode();
- /** @short short function that returns pointer to the current projector
- * @return pointer to current projector of SkyMapLite
- */
+ /**
+ * @short short function that returns pointer to the current projector
+ * @return pointer to current projector of SkyMapLite
+ */
- // All children nodes allocated on heap are deleted when parent is destroyed
+ /// All children nodes allocated on heap are deleted when parent is destroyed
virtual ~SkyNode() {}
inline const Projector *projector() { return SkyMapLite::Instance()->projector(); }
- /** @short short function to access SkyMapLite
- * @return pointer to instance of SkyMapLite class
- */
+ /**
+ * @short short function to access SkyMapLite
+ * @return pointer to instance of SkyMapLite class
+ */
inline SkyMapLite *map() const { return SkyMapLite::Instance(); }
/**
- * @short updates coordinate of the object on SkyMapLite
- */
+ * @short updates coordinate of the object on SkyMapLite
+ */
virtual void update() {}
/**
- * @short sets m_drawLabel to true if it is needed to be drawn and calls update()
- * @param drawLabel true of label has to be drawn
- */
+ * @short sets m_drawLabel to true if it is needed to be drawn and calls update()
+ * @param drawLabel true of label has to be drawn
+ */
void update(bool drawLabel);
inline void addChildNode(QSGNode *node) { m_opacity->appendChildNode(node); }
/**
- * @short hides all child nodes (sets opacity of m_opacity to 0)
- */
+ * @short hides all child nodes (sets opacity of m_opacity to 0)
+ */
virtual void hide();
/**
- * @short shows all child nodes (sets opacity of m_opacity to 1)
- */
+ * @short shows all child nodes (sets opacity of m_opacity to 1)
+ */
virtual void show();
inline int hideCount() { return m_hideCount; }
/**
- * @short changes the position of SkyNode on SkyMapLite. Has to be overridden by the classes
- * that support moving
- * @param pos new position
- */
+ * @short changes the position of SkyNode on SkyMapLite. Has to be overridden by the classes
+ * that support moving
+ * @param pos new position
+ */
virtual void changePos(QPointF pos) { Q_UNUSED(pos); }
/**
- * @return true if object is visible (m_opacity->opacity() != 0) else returns false
- */
+ * @return true if object is visible (m_opacity->opacity() != 0) else returns false
+ */
inline bool visible() { return m_opacity->visible(); }
/**
- * @short returns SkyObject associated with this SkyNode
- * @return pointer to the object of type SkyObject
- */
+ * @short returns SkyObject associated with this SkyNode
+ * @return pointer to the object of type SkyObject
+ */
SkyObject *skyObject() const { return m_skyObject; }
SkyOpacityNode *m_opacity;
@@ -109,5 +112,3 @@ class SkyNode : public QSGTransformNode
bool m_drawLabel;
int m_hideCount;
};
-
-#endif
diff --git a/kstars/kstarslite/skyitems/skynodes/supernovanode.cpp b/kstars/kstarslite/skyitems/skynodes/supernovanode.cpp
index d25bbf8..e60d7c5 100644
--- a/kstars/kstarslite/skyitems/skynodes/supernovanode.cpp
+++ b/kstars/kstarslite/skyitems/skynodes/supernovanode.cpp
@@ -15,15 +15,17 @@
***************************************************************************/
#include "supernovanode.h"
-#include "supernova.h"
-#include "nodes/polynode.h"
-#include "Options.h"
+
#include "ksutils.h"
#include "linelist.h"
+#include "Options.h"
+#include "supernova.h"
#include "nodes/pointnode.h"
+#include "nodes/polynode.h"
+
#include <QSGFlatColorMaterial>
-SupernovaNode::SupernovaNode(Supernova *snova) : m_snova(snova), m_lines(0)
+SupernovaNode::SupernovaNode(Supernova *snova) : m_snova(snova)
{
}
diff --git a/kstars/kstarslite/skyitems/skynodes/supernovanode.h b/kstars/kstarslite/skyitems/skynodes/supernovanode.h
index 0328594..eb00366 100644
--- a/kstars/kstarslite/skyitems/skynodes/supernovanode.h
+++ b/kstars/kstarslite/skyitems/skynodes/supernovanode.h
@@ -13,8 +13,9 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#ifndef SUPERNOVANODE_H_
-#define SUPERNOVANODE_H_
+
+#pragma once
+
#include "skynode.h"
class PolyNode;
@@ -22,7 +23,8 @@ class Supernova;
class PointNode;
class QSGFlatColorMaterial;
-/** @class SupernovaNode
+/**
+ * @class SupernovaNode
*
* @short A SkyNode derived class that represents supernova
* @author Artem Fedoskin
@@ -33,29 +35,27 @@ class SupernovaNode : public SkyNode
{
public:
/**
- * @short Constructor.
- * @param snova - pointer to supernova that needs to be represented by this node
- */
- SupernovaNode(Supernova *snova);
+ * @short Constructor.
+ * @param snova - pointer to supernova that needs to be represented by this node
+ */
+ explicit SupernovaNode(Supernova *snova);
/**
- * @short Update position and visibility of supernova. Initialize m_lines if not already done
- */
+ * @short Update position and visibility of supernova. Initialize m_lines if not already done
+ */
virtual void update() override;
- void changePos(QPointF pos);
+ virtual void changePos(QPointF pos) override;
inline Supernova *snova() { return m_snova; }
private:
Supernova *m_snova;
- QSGGeometryNode *m_lines;
+ QSGGeometryNode *m_lines { nullptr };
- QSGFlatColorMaterial *m_material;
- QSGGeometry *m_geometry;
+ QSGFlatColorMaterial *m_material { nullptr };
+ QSGGeometry *m_geometry { nullptr };
- PointNode *m_point;
+ PointNode *m_point { nullptr };
};
-
-#endif
diff --git a/kstars/skyobjects/skypoint.h b/kstars/skyobjects/skypoint.h
index 4833e69..6a74e26 100644
--- a/kstars/skyobjects/skypoint.h
+++ b/kstars/skyobjects/skypoint.h
@@ -20,13 +20,13 @@
#pragma once
#include "cachingdms.h"
-#include "ksnumbers.h"
#include "kstarsdatetime.h"
#include <QList>
//#define PROFILE_COORDINATE_CONVERSION
+class KSNumbers;
class KSSun;
class GeoLocation;
diff --git a/kstars/skyobjects/starobject.h b/kstars/skyobjects/starobject.h
index af9c41d..e824bf0 100644
--- a/kstars/skyobjects/starobject.h
+++ b/kstars/skyobjects/starobject.h
@@ -17,13 +17,13 @@
#pragma once
-#include "ksnumbers.h"
+#include "deepstardata.h"
#include "skyobject.h"
#include "stardata.h"
-#include "deepstardata.h"
//#define PROFILE_UPDATECOORDS
+class KSNumbers;
class KSPopupMenu;
/** @class StarObject