1 /* 2 SPDX-FileCopyrightText: 2004 Jasem Mutlaq 3 SPDX-FileCopyrightText: 2020 Eric Dejouhanet <eric.dejouhanet@gmail.com> 4 5 SPDX-License-Identifier: GPL-2.0-or-later 6 7 Some code fragments were adapted from Peter Kirchgessner's FITS plugin 8 SPDX-FileCopyrightText: Peter Kirchgessner <http://members.aol.com/pkirchg> 9 */ 10 11 #ifndef FITSSKYOBJECT_H 12 #define FITSSKYOBJECT_H 13 14 #include <QObject> 15 16 class SkyObject; 17 18 class FITSSkyObject : public QObject 19 { 20 Q_OBJECT 21 22 public: 23 /** @brief Locate a SkyObject at a pixel position. 24 * @param object is the SkyObject to locate in the frame. 25 * @param xPos and yPos are the pixel position of the SkyObject in the frame. 26 */ 27 explicit FITSSkyObject(SkyObject /*const*/ *object, int xPos, int yPos); 28 29 public: 30 /** @brief Getting the SkyObject this instance locates. 31 */ 32 SkyObject /*const*/ *skyObject(); 33 34 public: 35 /** @brief Getting the pixel position of the SkyObject this instance locates. */ 36 /** @{ */ 37 int x() const; 38 int y() const; 39 /** @} */ 40 41 public: 42 /** @brief Setting the pixel position of the SkyObject this instance locates. */ 43 /** @{ */ 44 void setX(int xPos); 45 void setY(int yPos); 46 /** @} */ 47 48 protected: 49 SkyObject /*const*/ *skyObjectStored { nullptr }; 50 int xLoc { 0 }; 51 int yLoc { 0 }; 52 }; 53 54 #endif // FITSSKYOBJECT_H 55