Kstars

guideview.h
1/* Ekos GuideView
2 Child of FITSView with few additions necessary for Internal Guider
3
4 SPDX-FileCopyrightText: 2020 Hy Murveit <hy@murveit.com>
5
6 SPDX-License-Identifier: GPL-2.0-or-later
7*/
8
9#pragma once
10
11#include "fitsviewer/fitsview.h"
12
13#include <QList>
14
15class QPainter;
16
17/**
18 * The main change relative to fitsview is to add the capability of displaying
19 * the 'neighbor guide stars' for the SEP Multi Star guide algorithm.
20 */
21class GuideView : public FITSView
22{
24 public:
25 explicit GuideView(QWidget *parent = nullptr, FITSMode mode = FITS_NORMAL, FITSScale filter = FITS_NONE);
26
27 // Calls the parent drawOverlay, then draws circles around the guide-star
28 // neighbors and lines between the guide star and the neighbors.
29 void drawOverlay(QPainter *, double scale) override;
30
31 // Adds a neighbor at x,y. Set found to true if the neighbor was associated
32 // with a detected star. Coordinates of the detected star are optional.
33 void addGuideStarNeighbor(double targetX, double targetY, bool found,
34 double detectedX = 0, double detectedY = 0,
35 bool isGuideStar = false);
36
37 // Remove all the neighbors.
38 void clearNeighbors();
39
40 // Refresh the neighbor graphics if necessary.
41 void updateNeighbors();
42
43 protected:
44
45 private:
46 struct Neighbor
47 {
48 // x and y input-image coordinates for the guide star neighbor target position.
49 double targetX;
50 double targetY;
51
52 // Was the neighbor at the above location was associated with a detected star.
53 bool found;
54
55 // x and y input-image coordinates for the guide star neighbor that was detected.
56 double detectedX;
57 double detectedY;
58
59 bool isGuideStar;
60 };
61
62 void drawNeighbor(QPainter *painter, const Neighbor &neighbor);
63 QList<Neighbor> neighbors;
64
65 // True if neighbors have been added but not yet displayed.
66 bool newNeighbors { false };
67 signals:
68};
The main change relative to fitsview is to add the capability of displaying the 'neighbor guide stars...
Definition guideview.h:22
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.