Changeset View
Changeset View
Standalone View
Standalone View
kstars/fitsviewer/fitsskyobject.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | fitsskyobject.cpp - FITS Image | ||||
3 | ------------------- | ||||
4 | begin : Tue Apr 07 2020 | ||||
5 | copyright : (C) 2004 by Jasem Mutlaq, (C) 2020 by Eric Dejouhanet | ||||
6 | email : mutlaqja@ikarustech.com | ||||
7 | ***************************************************************************/ | ||||
8 | | ||||
9 | /*************************************************************************** | ||||
10 | * * | ||||
11 | * This program is free software; you can redistribute it and/or modify * | ||||
12 | * it under the terms of the GNU General Public License as published by * | ||||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||||
14 | * (at your option) any later version. * | ||||
15 | * * | ||||
16 | * Some code fragments were adapted from Peter Kirchgessner's FITS plugin* | ||||
17 | * See http://members.aol.com/pkirchg for more details. * | ||||
18 | ***************************************************************************/ | ||||
19 | | ||||
20 | #ifndef FITSSKYOBJECT_H | ||||
21 | #define FITSSKYOBJECT_H | ||||
22 | | ||||
23 | #include <QObject> | ||||
24 | | ||||
25 | class SkyObject; | ||||
26 | | ||||
27 | class FITSSkyObject : public QObject | ||||
28 | { | ||||
29 | Q_OBJECT | ||||
30 | | ||||
31 | public: | ||||
32 | /** @brief Locate a SkyObject at a pixel position. | ||||
33 | * @param object is the SkyObject to locate in the frame. | ||||
34 | * @param xPos and yPos are the pixel position of the SkyObject in the frame. | ||||
35 | */ | ||||
36 | explicit FITSSkyObject(SkyObject /*const*/ *object, int xPos, int yPos); | ||||
37 | | ||||
38 | public: | ||||
39 | /** @brief Getting the SkyObject this instance locates. | ||||
40 | */ | ||||
41 | SkyObject /*const*/ *skyObject(); | ||||
42 | | ||||
43 | public: | ||||
44 | /** @brief Getting the pixel position of the SkyObject this instance locates. */ | ||||
45 | /** @{ */ | ||||
46 | int x() const; | ||||
47 | int y() const; | ||||
48 | /** @} */ | ||||
49 | | ||||
50 | public: | ||||
51 | /** @brief Setting the pixel position of the SkyObject this instance locates. */ | ||||
52 | /** @{ */ | ||||
53 | void setX(int xPos); | ||||
54 | void setY(int yPos); | ||||
55 | /** @} */ | ||||
56 | | ||||
57 | protected: | ||||
58 | SkyObject /*const*/ *skyObjectStored { nullptr }; | ||||
59 | int xLoc { 0 }; | ||||
60 | int yLoc { 0 }; | ||||
61 | }; | ||||
62 | | ||||
63 | #endif // FITSSKYOBJECT_H |