Kstars

focusdialog.h
1/*
2 SPDX-FileCopyrightText: 2002 Jason Harris <kstars@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "ui_focusdialog.h"
10
11#include <QDialog>
12
13class QPushButton;
14
15class SkyPoint;
16
17class FocusDialogUI : public QFrame, public Ui::FocusDialog
18{
20
21 public:
22 explicit FocusDialogUI(QWidget *parent = nullptr);
23};
24
25/**
26 * @class FocusDialog
27 * @short A small dialog for setting the focus coordinates manually.
28 *
29 * @author Jason Harris
30 * @version 1.0
31 */
32class FocusDialog : public QDialog
33{
35
36 public:
37 /** Constructor. */
39
40 /** @return pointer to the SkyPoint described by the entered RA, Dec */
41 inline SkyPoint *point()
42 {
43 return Point;
44 }
45
46 /** @return suggested size of focus window. */
47 QSize sizeHint() const override;
48
49 /** @return whether user set the AltAz coords */
50 inline bool usedAltAz() const
51 {
52 return UsedAltAz;
53 }
54
55 /** Show the Az/Alt page instead of the RA/Dec page. */
56 void activateAzAltPage() const;
57
58 public slots:
59 /** If text has been entered in both KLineEdits, enable the Ok button. */
60 void checkLineEdits();
61
62 /**
63 * Attempt to interpret the text in the KLineEdits as Ra and Dec values.
64 * If the point is validated, close the window.
65 */
66 void validatePoint();
67
68 private:
69 SkyPoint *Point { nullptr };
70 FocusDialogUI *fd { nullptr };
71 bool UsedAltAz { false };
72 QPushButton *okB { nullptr };
73};
A small dialog for setting the focus coordinates manually.
Definition focusdialog.h:33
bool usedAltAz() const
Definition focusdialog.h:50
void activateAzAltPage() const
Show the Az/Alt page instead of the RA/Dec page.
void checkLineEdits()
If text has been entered in both KLineEdits, enable the Ok button.
void validatePoint()
Attempt to interpret the text in the KLineEdits as Ra and Dec values.
FocusDialog()
Constructor.
QSize sizeHint() const override
SkyPoint * point()
Definition focusdialog.h:41
The sky coordinates of a point in the sky.
Definition skypoint.h:45
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.