Kstars

flagmanager.h
1/*
2 SPDX-FileCopyrightText: 2009 Jerome SONRIER <jsid@emor3j.fr.eu.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "ui_flagmanager.h"
10
11#include <QAbstractTableModel>
12#include <QDialog>
13
16class KStars;
17
18class FlagManagerUI : public QFrame, public Ui::FlagManager
19{
21
22 public:
23 /** @short Constructor */
24 explicit FlagManagerUI(QWidget *parent);
25};
26
27/**
28 * @class FlagManager
29 * @short Flag manager
30 * Dialog box to add and remove flags
31 *
32 * @version 1.1
33 * @author Jerome SONRIER
34 */
35class FlagManager : public QDialog
36{
38 public:
39 explicit FlagManager(QWidget *ks);
40
41 virtual ~FlagManager() override = default;
42
43 void setRaDec(const dms &ra, const dms &dec);
44 void clearFields();
45 void showFlag(const int flagIdx);
46
47 bool validatePoint();
48
49 void deleteFlagItem(int flagIdx);
50
51 public slots:
52 /** @short Verify coordinates and add a flag */
53 void slotAddFlag();
54
55 /** @short Delete a flag */
56 void slotDeleteFlag();
57
58 /** @short Center the selected flag in the display */
59 void slotCenterFlag();
60
61 /** @brief Center the selected flag in the telescope. */
63
64 private slots:
65 void slotSaveChanges();
66 void slotSetShownFlag(QModelIndex idx);
67
68 private:
69 void insertFlag(bool isNew, int row = 0);
70
71 KStars *m_Ks { nullptr };
72 FlagManagerUI *ui { nullptr };
73 QStandardItemModel *m_Model { nullptr };
74 QSortFilterProxyModel *m_SortModel { nullptr };
75};
Flag manager Dialog box to add and remove flags.
Definition flagmanager.h:36
void slotCenterTelescope()
Center the selected flag in the telescope.
void slotCenterFlag()
Center the selected flag in the display.
void slotAddFlag()
Verify coordinates and add a flag.
void slotDeleteFlag()
Delete a flag.
This is the main window for KStars.
Definition kstars.h:89
An angle, stored as degrees, but expressible in many ways.
Definition dms.h:38
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 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.