Kstars

observation.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/observation.h"
8 
9 void OAL::Observation::setObservation(QString _id, QString _observer, QString _site, QString _session, QString _target,
10  KStarsDateTime _begin, double _faintestStar, double _seeing, QString _scope,
11  QString _eyepiece, QString _lens, QString _filter, QString _result, QString _lang)
12 {
13  m_Name = _id;
14  m_Observer = _observer;
15  m_Site = _site;
16  m_Session = _session;
17  m_Target = _target;
18  m_Begin = _begin;
19  m_FaintestStar = _faintestStar;
20  m_Seeing = _seeing;
21  m_Scope = _scope;
22  m_Eyepiece = _eyepiece;
23  m_Lens = _lens;
24  m_Filter = _filter;
25  m_Result = _result;
26  m_Lang = _lang;
27 }
28 
29 Observation::Observation(QString id, Observer *observer, Session *session, SkyObject *target, KStarsDateTime begin,
30  double faintestStar, double seeing, Scope *scope, Eyepiece *eyepiece, Lens *lens,
31  Filter *filter, QString result, QString lang)
32 {
33  if (observer)
34  m_Observer = observer->id();
35  if (target)
36  m_Target = target->name();
37  if (session)
38  {
39  m_Session = session->id();
40  m_Site = session->site();
41  }
42  if (scope)
43  m_Scope = scope->id();
44  if (lens)
45  m_Lens = lens->id();
46  if (filter)
47  m_Filter = filter->id();
48  if (eyepiece)
49  m_Eyepiece = eyepiece->id();
50  m_Name = id;
51  m_Begin = begin;
52  m_FaintestStar = faintestStar;
53  m_Seeing = seeing;
54  m_Result = result;
55  m_Lang = lang;
56 }
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
virtual QString name(void) const
Definition: skyobject.h:145
const QList< QKeySequence > & begin()
QFuture< void > filter(Sequence &sequence, KeepFunctor filterFunction)
Definition: lens.h:17
FIXME: why not just use a QHash?
Definition: observer.h:19
Information about an object in the sky.
Definition: skyobject.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.