Kstars

pointlistcomponent.cpp
1 /*
2  SPDX-FileCopyrightText: 2005 Jason Harris <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "pointlistcomponent.h"
8 
9 #include "kstarsdata.h"
10 #include "skyobjects/skypoint.h"
11 
12 PointListComponent::PointListComponent(SkyComposite *parent) : SkyComponent(parent)
13 {
14 }
15 
17 {
18  if (!selected())
19  return;
20 
21  KStarsData *data = KStarsData::Instance();
22 
23  for (auto &p : pointList())
24  {
25  if (num)
26  p->updateCoords(num);
27 
28  p->EquatorialToHorizontal(data->lst(), data->geo()->lat());
29  }
30 }
CachingDms * lst()
Definition: kstarsdata.h:223
virtual bool selected()
Definition: skycomponent.h:131
Store several time-dependent astronomical quantities.
Definition: ksnumbers.h:42
const CachingDms * lat() const
Definition: geolocation.h:70
GeoLocation * geo()
Definition: kstarsdata.h:229
void update(KSNumbers *num=nullptr) override
Update the sky positions of this component.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Aug 13 2022 04:01:56 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.