File indexing completed on 2024-04-14 03:42:55

0001 /*
0002     SPDX-FileCopyrightText: 2021 Jasem Mutlaq
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 #pragma once
0007 
0008 #include "oal/oal.h"
0009 
0010 #include <QString>
0011 
0012 /**
0013  * @class OAL::DSLRLens
0014  *
0015  * Information on DSLR lens used in astrophotography
0016  */
0017 class OAL::DSLRLens
0018 {
0019     public:
0020         DSLRLens(const QString &id, const QString &model, const QString &vendor, double focalLength, double focalRatio)
0021         {
0022             setDSLRLens(id, model, vendor, focalLength, focalRatio);
0023         }
0024         QString id() const
0025         {
0026             return m_Id;
0027         }
0028         QString model() const
0029         {
0030             return m_Model;
0031         }
0032         QString vendor() const
0033         {
0034             return m_Vendor;
0035         }
0036         QString name() const
0037         {
0038             return m_Name;
0039         }
0040         double focalLength() const
0041         {
0042             return m_FocalLength;
0043         }
0044         double focalRatio() const
0045         {
0046             return m_FocalRatio;
0047         }
0048         void setDSLRLens(const QString &_id, const QString &_model, const QString &_vendor, double _focalLength, double _focalRatio);
0049 
0050         QJsonObject toJson() const;
0051 
0052     private:
0053         QString m_Id, m_Model, m_Vendor, m_Name;
0054         double m_FocalLength, m_FocalRatio;
0055 };