Kstars

wiequipsettings.h
1/*
2 SPDX-FileCopyrightText: 2013 Samikshan Bairagya <samikshan@gmail.com>
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 */
23class WIEquipSettings : public QFrame, public Ui::WIEquipSettings
24{
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
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};
TelescopeType
Telescope Type (Reflector/Refractor)
User interface for "Equipment Type and Parameters" page in WI settings dialog.
void populateScopeListWidget()
Populates scope list widget in UI with list of telescopes from KStars userdb.
double getAperture()
Inline method to return aperture.
ScopeItemRoles
User-defined roles for scope item.
void setAperture()
Set aperture to use.
ObsConditions::TelescopeType getTelType()
Inline method to return telescope type.
Q_OBJECTQ_OBJECT
UserRole
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:55:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.