Kstars

fovdialog.h
1/*
2 SPDX-FileCopyrightText: 2003 Jason Harris <kstars@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#ifndef FOVDIALOG_H_
8#define FOVDIALOG_H_
9
10#include <QPaintEvent>
11#include <QDialog>
12#include <QDoubleSpinBox>
13
14#include "fov.h"
15#include "ui_fovdialog.h"
16#include "ui_newfov.h"
17
18class FOVDialogUI : public QFrame, public Ui::FOVDialog
19{
21 public:
22 explicit FOVDialogUI(QWidget *parent = nullptr);
23};
24
25class NewFOVUI : public QFrame, public Ui::NewFOV
26{
28 public:
29 explicit NewFOVUI(QWidget *parent = nullptr);
30};
31
32/** @class FOVDialog
33 * FOVDialog is dialog to select a Field-of-View indicator (or create a new one)
34 *@author Jason Harris
35 *@version 1.0
36 */
37class FOVDialog : public QDialog
38{
40 public:
41 explicit FOVDialog(QWidget *parent = nullptr);
42 ~FOVDialog() override;
43 private slots:
44 void slotNewFOV();
45 void slotEditFOV();
46 void slotRemoveFOV();
47 void slotSelect(int);
48
49 private:
50 /** Add new widget to list box */
51 QListWidgetItem *addListWidget(FOV *f);
52
53 unsigned int currentItem() const;
54 FOVDialogUI *fov;
55 static int fovID;
56};
57
58/** @class NewFOV
59 * Dialog for defining a new FOV symbol
60 *@author Jason Harris
61 *@version 1.0
62 */
63class NewFOV : public QDialog
64{
66 public:
67 /** Create new dialog
68 * @param parent parent widget
69 * @param fov widget to copy data from. If it's empty will create empty one.
70 */
71 explicit NewFOV(QWidget *parent = nullptr, const FOV *fov = nullptr);
72 ~NewFOV() override = default;
73 /** Return reference to FOV. */
74 const FOV &getFOV() const
75 {
76 return f;
77 }
78
79 public slots:
80 void slotBinocularFOVDistanceChanged(int index);
81 void slotUpdateFOV();
82 void slotComputeFOV();
83 void slotEyepieceAFOVChanged(int index);
84 void slotComputeTelescopeFL();
85 void slotDetectFromINDI();
86
87 private:
88 FOV f;
89 NewFOVUI *ui;
90 QPushButton *okB;
91};
92
93/**
94 *@class TelescopeFL
95 *Dialog for calculating telescope focal length from f-number and diameter
96 *@author Akarsh Simha
97 *@version 1.0
98 */
99
100class TelescopeFL : public QDialog
101{
103 public:
104 /**
105 * Create a telescope focal length dialog
106 * @param parent parent widget
107 */
108 explicit TelescopeFL(QWidget *parent = nullptr);
109
110 ~TelescopeFL() override = default;
111
112 /**
113 * Compute and return the focal length in mm
114 * @return focal length in mm
115 */
116 double computeFL() const;
117
118 private:
119 QDoubleSpinBox *aperture, *fNumber;
120 QComboBox *apertureUnit;
121};
122
123#endif
FOVDialog is dialog to select a Field-of-View indicator (or create a new one)
Definition fovdialog.h:38
A simple class encapsulating a Field-of-View symbol.
Definition fov.h:28
Dialog for defining a new FOV symbol.
Definition fovdialog.h:64
const FOV & getFOV() const
Return reference to FOV.
Definition fovdialog.h:74
NewFOV(QWidget *parent=nullptr, const FOV *fov=nullptr)
Create new dialog.
Dialog for calculating telescope focal length from f-number and diameter.
Definition fovdialog.h:101
double computeFL() const
Compute and return the focal length in mm.
TelescopeFL(QWidget *parent=nullptr)
Create a telescope focal length dialog.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:57:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.