[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents
Jason Harris
kstars at 30doradus.org
Fri Jan 6 01:49:46 CET 2006
SVN commit 494697 by harris:
Adding functions which return a reference to lists of SkyObjects stored
in the SkyComponents hierarchy. For example:
SkyMapComposite::deepSkyObjects() returns the QList<DeepSkyObjects*>
containing all of the deep-sky objects
SolarSystemComposite::asteroids() returns the QList containing the
asteroids
SolarSystemComposite::comets() returns the QList containing the
comets
CCMAIL: kstars-devel at kde.org
M +1 -0 deepskycomponent.h
M +1 -0 skymapcomposite.h
M +8 -0 solarsystemcomposite.cpp
M +3 -0 solarsystemcomposite.h
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/deepskycomponent.h #494696:494697
@@ -71,6 +71,7 @@
virtual SkyObject* findByName( const QString &name );
virtual SkyObject* objectNearest( SkyPoint *p, double &maxrad );
+ QList<DeepSkyObject*>& objectList() { return m_MessierList << m_NGCList << m_ICList << m_OtherList; }
void clear();
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymapcomposite.h #494696:494697
@@ -117,6 +117,7 @@
void emitProgressText( const QString &message );
+ QList<DeepSkyObject*>& deepSkyObjects() { return m_DeepSkyComponent->objectList(); }
QList<SkyComponent*> solarSystem() { return m_SSComposite->components(); }
KSPlanet* earth() { return m_SSComposite->earth(); }
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/solarsystemcomposite.cpp #494696:494697
@@ -101,6 +101,14 @@
}
}
+QList<SkyObject*>& SolarSystemComposite::asteroids() {
+ return m_AsteroidsComponent->objectList();
+}
+
+QList<SkyObject*>& SolarSystemComposite::comets() {
+ return m_CometsComponent->objectList();
+}
+
void SolarSystemComposite::reloadAsteroids( KStarsData *data ) {
m_AsteroidsComponent->clear();
m_AsteroidsComponent->init( data );
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/solarsystemcomposite.h #494696:494697
@@ -40,6 +40,9 @@
~SolarSystemComposite();
KSPlanet* earth() { return Earth; }
+ QList<SkyObject*>& asteroids();
+ QList<SkyObject*>& comets();
+
virtual void init(KStarsData *data);
More information about the Kstars-devel
mailing list