Revision 837078
Go back to digest for 27th July 2008Features in Educational
Use different colors for each planet in the Sky Calendar tool, which helps a lot.
Along the way, added a static member QVector<QColor> KSPlanetBase::planetColor to hold the color for each planet (it's indexed on the recent KSPlanetBase enum for major planets).
This way we don't have to repeat hard-coded colors all over the codebase.
I also added a member function SkyMapComposite::planet(int n) that retrieves the planet pointer using the same enum. This lets us avoid using findByName() for planets, although it still uses findByName() internally.
Finally, I am not creating temporary planet objects in SkyCalendar::addPlanetEvents() anymore, because the needed SkyObject functions (riseSetTime() and transitTime() are set up to modify the position of a planet as needed, and then restore the original position when they are finished.
Unfortunately, this didn't have any noticeable impact on the time it takes to populate the plot.
File Changes
- /trunk/KDE/kdeedu/kstars/kstars
- /ksplanet.cpp
- /ksplanetbase.cpp
- /ksplanetbase.h
- /skymapevents.cpp
- /skyobject.cpp
- /skyobject.h
- /skycomponents/skymapcomposite.cpp
- /skycomponents/skymapcomposite.h
- /skycomponents/solarsystemcomposite.cpp
- /tools/skycalendar.cpp