Kstars

shfovexporter.h
1/*
2 SPDX-FileCopyrightText: 2011 Rafał Kułaga <rl.kulaga@gmail.com>
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
12class PrintingWizard;
13class 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};
Class representing Printing Wizard for KStars printed documents (currently only finder charts).
Helper class used as a wrapper for StarHopper when capturing FOV snapshots.
bool calculatePath(const SkyPoint &src, const SkyPoint &dest, double fov, double maglim)
Calculate path between source and destination SkyPoints.
bool exportPath()
Export FOV snapshots across calculated path.
ShFovExporter(PrintingWizard *wizard, SkyMap *map)
Constructor.
This is the canvas on which the sky is painted.
Definition skymap.h:54
The sky coordinates of a point in the sky.
Definition skypoint.h:45
Helps planning star hopping.
Definition starhopper.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.