Changeset View
Changeset View
Standalone View
Standalone View
kstars/skycomponents/planetmoonscomponent.cpp
Context not available. | |||||
17 | 17 | | |||
---|---|---|---|---|---|
18 | #include "planetmoonscomponent.h" | 18 | #include "planetmoonscomponent.h" | ||
19 | 19 | | |||
20 | #include <QList> | | |||
21 | #include <QPoint> | | |||
22 | | ||||
23 | #include "skyobjects/jupitermoons.h" | | |||
24 | #include "skyobjects/ksplanetbase.h" | | |||
25 | #include "kstarsdata.h" | | |||
26 | #ifdef KSTARS_LITE | | |||
27 | #include "skymaplite.h" | | |||
28 | #include "kstarslite/skyitems/planetsitem.h" | | |||
29 | #else | | |||
30 | #include "skymap.h" | | |||
31 | #endif | | |||
32 | #include "skyobjects/skypoint.h" | | |||
33 | #include "skyobjects/trailobject.h" | | |||
34 | #include "dms.h" | | |||
35 | #include "Options.h" | 20 | #include "Options.h" | ||
36 | #include "solarsystemsinglecomponent.h" | 21 | #include "kstarsdata.h" | ||
37 | #include "solarsystemcomposite.h" | | |||
38 | #include "skylabeler.h" | 22 | #include "skylabeler.h" | ||
39 | #include "skypainter.h" | 23 | #include "skypainter.h" | ||
40 | 24 | #include "solarsystemcomposite.h" | |||
25 | #include "solarsystemsinglecomponent.h" | ||||
41 | #include "projections/projector.h" | 26 | #include "projections/projector.h" | ||
27 | #include "skyobjects/jupitermoons.h" | ||||
42 | 28 | | |||
43 | PlanetMoonsComponent::PlanetMoonsComponent(SkyComposite *p, SolarSystemSingleComponent *planetComponent, | 29 | PlanetMoonsComponent::PlanetMoonsComponent(SkyComposite *p, SolarSystemSingleComponent *planetComponent, | ||
44 | KSPlanetBase::Planets _planet) | 30 | KSPlanetBase::Planets& _planet) | ||
45 | : SkyComponent(p), planet(_planet), pmoons(0), m_Planet(planetComponent) | 31 | : SkyComponent(p), planet(_planet), m_Planet(planetComponent) | ||
46 | { | 32 | { | ||
47 | /* | 33 | /* | ||
48 | if (planet == KSPlanetBase::JUPITER) | 34 | if (planet == KSPlanetBase::JUPITER) | ||
Context not available. | |||||
51 | pmoons = new SaturnMoons(); | 37 | pmoons = new SaturnMoons(); | ||
52 | */ | 38 | */ | ||
53 | Q_ASSERT(planet == KSPlanetBase::JUPITER); | 39 | Q_ASSERT(planet == KSPlanetBase::JUPITER); | ||
54 | delete pmoons; | 40 | // delete pmoons; | ||
55 | // pmoons = new JupiterMoons(); | 41 | // pmoons = new JupiterMoons(); | ||
56 | int nmoons = pmoons->nMoons(); | 42 | // int nmoons = pmoons->nMoons(); | ||
57 | for (int i = 0; i < nmoons; ++i) | 43 | | ||
58 | { | 44 | // for (int i = 0; i < nmoons; ++i) | ||
45 | // { | ||||
59 | // objectNames(SkyObject::MOON).append( pmoons->name(i) ); | 46 | // objectNames(SkyObject::MOON).append( pmoons->name(i) ); | ||
60 | // objectLists(SkyObject::MOON).append( QPair<QString, const SkyObject*>(pmoons->name(i),pmoons->moon(i)) ); | 47 | // objectLists(SkyObject::MOON).append( QPair<QString, const SkyObject*>(pmoons->name(i),pmoons->moon(i)) ); | ||
61 | } | 48 | // } | ||
62 | } | 49 | } | ||
63 | 50 | | |||
64 | PlanetMoonsComponent::~PlanetMoonsComponent() | 51 | PlanetMoonsComponent::~PlanetMoonsComponent() | ||
65 | { | 52 | { | ||
66 | delete pmoons; | | |||
67 | } | 53 | } | ||
68 | 54 | | |||
69 | bool PlanetMoonsComponent::selected() | 55 | bool PlanetMoonsComponent::selected() | ||
Context not available. |