Kstars

shfovexporter.h
1 /*
2  SPDX-FileCopyrightText: 2011 Rafał Kułaga <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "skypoint.h"
10 #include "starhopper.h"
11 
12 class PrintingWizard;
13 class SkyMap;
14 
15 /**
16  * \class ShFovExporter
17  * \brief Helper class used as a wrapper for StarHopper when capturing FOV snapshots.
18  *
19  * \author Rafał Kułaga
20  */
22 {
23  public:
24  /** Constructor */
25  ShFovExporter(PrintingWizard *wizard, SkyMap *map);
26 
27  /**
28  * \brief Calculate path between source and destination SkyPoints.
29  * \param src SkyPoint at which StarHopper will begin.
30  * \param dest SkyPoint at which StarHopper will end.
31  * \param fov Star hopping field of view angle (in deg).
32  * \param maglim Magnitude limit.
33  * \return True if path has been found.
34  */
35  bool calculatePath(const SkyPoint &src, const SkyPoint &dest, double fov, double maglim);
36 
37  /**
38  * \brief Export FOV snapshots across calculated path.
39  * \return False if path is empty.
40  * \note You should call ShFovExporter::calculatePath() before calling this method.
41  */
42  bool exportPath();
43 
44  private:
45  /**
46  * \brief Private method: center SkyMap between two SkyPoints and capture FOV snapshot.
47  * \param ptA Beginning point.
48  * \param ptB Ending point.
49  */
50  void centerBetweenAndCapture(const SkyPoint &ptA, const SkyPoint &ptB);
51 
52  SkyMap *m_Map { nullptr };
53  StarHopper m_StarHopper;
54  SkyPoint m_Src;
55  SkyPoint m_Dest;
56  PrintingWizard *m_ParentWizard { nullptr };
57  QList<SkyObject *> m_Path;
58  QList<SkyObject *> *m_skyObjList { nullptr };
59 };
Helps planning star hopping.
Definition: starhopper.h:24
ShFovExporter(PrintingWizard *wizard, SkyMap *map)
Constructor.
Class representing Printing Wizard for KStars printed documents (currently only finder charts).
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
Helper class used as a wrapper for StarHopper when capturing FOV snapshots.
Definition: shfovexporter.h:21
bool exportPath()
Export FOV snapshots across calculated path.
bool calculatePath(const SkyPoint &src, const SkyPoint &dest, double fov, double maglim)
Calculate path between source and destination SkyPoints.
Canvas widget for displaying the sky bitmap; also handles user interaction events.
Definition: skymap.h:52
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.