[Kstars-devel] KDE/kdeedu/kstars/kstars [POSSIBLY UNSAFE]

Jason Harris kstars at 30doradus.org
Sat Oct 27 23:23:30 CEST 2007


SVN commit 730071 by harris:

Simplify object labeling code.  There were two different functions for
drawing labels on-screen, which led to some inconsistencies.  Now,
name labels are drawn to the screen only with the
SkyObject::drawNameLabel() command.  So, for example, the SkyLabeler
now calls this function to draw labels.

My attempt to clean up this labeling code led to one of those
cascading series of changes:

+ instead of overloaded "drawLabel()" functions in SkyLabeler, I am
now using more descriptive names drawObjectLabel() and
drawGuideLabel().

+ SkyLabeler::drawObjectLabel() takes a SkyObject* argument, so that
SkyObject::drawNameLabel() can be called.

+ The SkyLabel class now contains a QPointF and the SkyObject pointer,
rather than the label text.

+ Fix a few lingering issues with the SkyMap scale parameter.

+ Jupiter's moons are now SkyObjects!  Meaning they can be clicked,
labeled, trailed, focused, etc.  

To do this, I had to change the inheritance diagram for solar system
objects.  Basically, I inserted a new class, TrailObject, above
KSPlanetBase.  TrailObject contains the trail (</obvious>), and all
solar system objects are TrailObjects.  Furthermore, Jupiter's moons
are the only solar system objects that are TrailObjects, but not
KSPlanetBase objects.  Any other planetary satellites we add will be
the same.  

I added a new object type, SkyObject::MOON, to handle planetary
satellites.

TODO: Fix drawing of Trails in the map!

CCMAIL: kstars-devel at kde.org



 M  +1 -1      CMakeLists.txt  
 M  +7 -3      deepskyobject.cpp  
 M  +3 -3      deepskyobject.h  
 M  +1 -0      finddialog.cpp  
 M  +24 -14    jupitermoons.cpp  
 M  +80 -66    jupitermoons.h  
 M  +4 -1      ksmoon.cpp  
 M  +4 -12     ksplanetbase.cpp  
 M  +98 -118   ksplanetbase.h   [POSSIBLY UNSAFE: system]
 M  +2 -2      kspopupmenu.cpp  
 M  +1 -1      skycomponents/asteroidscomponent.cpp  
 M  +1 -1      skycomponents/cometscomponent.cpp  
 M  +1 -1      skycomponents/constellationnamescomponent.cpp  
 M  +2 -2      skycomponents/customcatalogcomponent.cpp  
 M  +2 -2      skycomponents/deepskycomponent.cpp  
 M  +2 -2      skycomponents/horizoncomponent.cpp  
 M  +139 -6    skycomponents/jupitermoonscomponent.cpp  
 M  +31 -0     skycomponents/jupitermoonscomponent.h  
 M  +2 -2      skycomponents/linelistcomponent.cpp  
 M  +3 -3      skycomponents/linelistlabel.cpp  
 M  +5 -4      skycomponents/skylabel.h  
 M  +29 -26    skycomponents/skylabeler.cpp  
 M  +37 -23    skycomponents/skylabeler.h  
 M  +1 -1      skycomponents/skymapcomposite.cpp  
 M  +5 -3      skycomponents/solarsystemsinglecomponent.cpp  
 M  +15 -11    skycomponents/starcomponent.cpp  
 M  +4 -3      skycomponents/starcomponent.h  
 M  +25 -17    skymapdraw.cpp  
 M  +3 -0      skymapevents.cpp  
 M  +4 -4      skyobject.cpp  
 M  +5 -6      skyobject.h  
 M  +5 -3      starobject.cpp  
 M  +2 -3      starobject.h  
 A             trailobject.cpp   [License: GPL (v2+)]
 A             trailobject.h   [License: GPL (v2+)]




More information about the Kstars-devel mailing list