Kstars

wiequipsettings.h
1 /*
2  SPDX-FileCopyrightText: 2013 Samikshan Bairagya <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "ui_wiequipsettings.h"
10 #include "obsconditions.h"
11 #include "oal/scope.h"
12 
13 #define INVALID_APERTURE -1
14 
15 /**
16  * @class WIEquipSettings
17  * @brief User interface for "Equipment Type and Parameters" page in WI settings dialog
18  *
19  * @author Samikshan Bairagya
20  * @author Jasem Mutlaq
21  * @version 1.1
22  */
23 class WIEquipSettings : public QFrame, public Ui::WIEquipSettings
24 {
25  Q_OBJECT
26 
27  public:
28  /** @enum ScopeItemRoles User-defined roles for scope item */
30  {
31  Vendor = Qt::UserRole + 4,
32  Model,
33  Aperture,
34  FocalLength,
35  Type
36  };
37 
38  WIEquipSettings();
39 
40  /** Inline method to return aperture */
41  inline double getAperture() { return m_Aperture; }
42 
43  /** Set aperture to use */
44  void setAperture();
45 
46  /** Inline method to return telescope type */
47  inline ObsConditions::TelescopeType getTelType() { return m_TelType; }
48 
49  /** Populates scope list widget in UI with list of telescopes from KStars userdb. */
51 
52  private:
53  QList<OAL::Scope *> m_ScopeList;
54  /// Aperture of equipment to use
55  double m_Aperture { 0 };
56  /// Telescope type
57  ObsConditions::TelescopeType m_TelType { ObsConditions::Invalid };
58 
59  private slots:
60  /** Private slot - Equipment type selected - Telescope */
61  void slotTelescopeCheck(bool on);
62 
63  /** Private slot - Equipment type selected - Binoculars */
64  void slotBinocularsCheck(bool on);
65 
66  /** Private slot - Telescope selected from KStars userdb */
67  void slotScopeSelected(int row);
68 
69  /** Private slot - Add new telescope to KStars userdb */
70  void slotAddNewScope();
71 };
Q_OBJECTQ_OBJECT
UserRole
void populateScopeListWidget()
Populates scope list widget in UI with list of telescopes from KStars userdb.
ObsConditions::TelescopeType getTelType()
Inline method to return telescope type.
double getAperture()
Inline method to return aperture.
void setAperture()
Set aperture to use.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.