Kstars

opssatellites.h
1 /*
2  SPDX-FileCopyrightText: 2011 Jérôme SONRIER <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "ui_opssatellites.h"
10 
11 #include <kconfigdialog.h>
12 
13 #include <QFrame>
14 #include <QSortFilterProxyModel>
15 
16 class QStandardItem;
17 class QStandardItemModel;
18 class KStars;
19 
20 class SatelliteSortFilterProxyModel : public QSortFilterProxyModel
21 {
22  Q_OBJECT
23 
24  public:
25  explicit SatelliteSortFilterProxyModel(QObject *parent);
26  bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
27 };
28 
29 /**
30  * @class OpsSatellites
31  *
32  * The Satellites Tab of the Options window. In this Tab the user can configure
33  * satellites options and select satellites that should be draw
34  *
35  * @author Jérôme SONRIER
36  * @version 1.0
37  */
38 class OpsSatellites : public QFrame, public Ui::OpsSatellites
39 {
40  Q_OBJECT
41 
42  public:
43  /** Constructor */
44  OpsSatellites();
45 
46  virtual ~OpsSatellites() override = default;
47 
48  private:
49  /** Refresh satellites list */
50  void updateListView();
51 
52  /**
53  * @brief saveSatellitesList Saves list of checked satellites in the configuration file
54  */
55  void saveSatellitesList();
56 
57  private slots:
58  void slotUpdateTLEs();
59  void slotShowSatellites(bool on);
60  void slotApply();
61  void slotCancel();
62  void slotFilterReg(const QString &);
63  void slotItemChanged(QStandardItem *);
64 
65 private:
66  KConfigDialog *m_ConfigDialog { nullptr };
67  QStandardItemModel *m_Model { nullptr };
68  QSortFilterProxyModel *m_SortModel { nullptr };
69  bool isDirty { false };
70 };
Q_OBJECTQ_OBJECT
OpsSatellites()
Constructor.
This is the main window for KStars. In addition to the GUI elements, the class contains the program c...
Definition: kstars.h:92
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 16 2022 04:00:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.