Kstars

scope.cpp
1 /*
2  SPDX-FileCopyrightText: 2009 Prakash Mohan <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "oal/scope.h"
8 #include <QJsonObject>
9 void OAL::Scope::setScope(const QString &_id, const QString &_model, const QString &_vendor, const QString &_type,
10  double _focalLength, double _aperture)
11 {
12  m_Id = _id;
13  m_Model = _model;
14  m_Vendor = _vendor;
15  m_Type = _type;
16  m_FocalLength = _focalLength;
17  m_Aperture = _aperture;
18  //m_Name.append ( _vendor + ' ' + _model + ' ' + QString::number( _aperture ) + "mm f/" + QString::number( (_focalLength/_aperture), 'g', 1 ) + " (" + _id + ')' ) ;
19 
20  m_Name = _vendor + ' ' + _model + " (" + _id + ')';
21 }
22 
23 QJsonObject OAL::Scope::toJson() const
24 {
25  return
26  {
27  {"id", m_Id},
28  {"model", m_Model},
29  {"vendor", m_Vendor},
30  {"type", m_Type},
31  {"name", m_Name},
32  {"focal_length", m_FocalLength},
33  {"aperture", m_Aperture},
34  };
35 }
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.