Kstars

guidedriftgraph.h
1/*
2 SPDX-FileCopyrightText: 2012 Jasem Mutlaq <mutlaqja@ikarustech.com>
3 SPDX-FileCopyrightText: 2021 Wolfgang Reissenberger <sterne-jaeger@openfuture.de>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#pragma once
9
10
11#include <QObject>
12#include <QWidget>
13
14#include "qcustomplot.h"
15#include "guidegraph.h"
16
17namespace Ekos
18{
19class GuideInterface;
20}
21class GuideDriftGraph : public QCustomPlot
22{
24
25public:
26 GuideDriftGraph(QWidget *parent = nullptr);
27 void guideHistory(int sliderValue, bool graphOnLatestPt);
28 /**
29 * @brief setRMSVisibility Decides which RMS plot is visible.
30 */
31 void setRMSVisibility();
32 void exportGuideData();
33 void resetTimer();
34 void connectGuider(Ekos::GuideInterface *guider);
35
36public slots:
37 void handleVerticalPlotSizeChange();
38 void handleHorizontalPlotSizeChange();
39
40 void setupNSEWLabels();
41 void autoScaleGraphs();
42 void zoomX(int zoomLevel);
43 void zoomInX();
44 void zoomOutX();
45 void setCorrectionGraphScale(int value);
46 void setLatestGuidePoint(bool isChecked) {graphOnLatestPt = isChecked;}
47 void clear();
48
49 void toggleShowPlot(GuideGraph::DRIFT_GRAPH_INDICES plot, bool isChecked);
50 void setAxisDelta(double ra, double de);
51 void setAxisSigma(double ra, double de);
52 void setAxisPulse(double ra, double de);
53 void setSNR(double snr);
54 void updateCorrectionsScaleVisibility();
55
56 // Display guide information when hovering over the drift graph
57 void mouseOverLine(QMouseEvent *event);
58
59 // Reset graph if right clicked
60 void mouseClicked(QMouseEvent *event);
61
62 /** @brief Update colors following a color scheme update notification.
63 */
64 void refreshColorScheme();
65
66private:
67 // The scales of these zoom levels are defined in Guide::zoomX().
68 static constexpr int defaultXZoomLevel = 3;
69 int driftGraphZoomLevel {defaultXZoomLevel};
70 bool graphOnLatestPt = true;
71
72 // Axis for the SNR part of the driftGraph. Qt owns this pointer's memory.
73 QCPAxis *snrAxis;
74
75 // Guide timer
76 QTime guideTimer;
77 QElapsedTimer guideElapsedTimer;
78
79 QUrl guideURLPath;
80};
Interface skeleton for implementation of different guiding applications and/or routines.
Manages a single axis inside a QCustomPlot.
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:78
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:02 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.