[Kstars-devel] kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Fri Feb 6 17:58:46 CET 2004


CVS commit by harris: 

Adding transient object labels on mouse hover.  To detect 
mouse hovering, KStarsData::updateTime() calls 
SkyMap::checkHoverPoint(), which checks to see if the mouse
has been stationary for >0.5 sec.  

If a hover event is trigered, it searches for the nearest 
object to the mouse cursor, sets the TransientObject pointer 
to that object,  and adds a label with color UserLabelColor.  

checkHoverPoint() also determines when the mouse is moved, 
thus ending the hover event.  In this case, 
fadeTransientLabel() is called, which slowly fades the label 
into SkyColor and then sets TransientObject to NULL.

In implementing this feature, I added 
SkyMap::objectNearest( SkyPoint* ), which returns a pointer to 
the SkyObject nearest the agument.  This code used to be inside 
SkyMap::mousePressEvent().

Please review the new functions (especially 
SkyMap::checkHoverPoint(), and SkyMap::slotTransientTimeout() ).

CCMAIL: kstars-devel at kde.org


  M +9 -0      deepskyobject.h   1.2
  M +9 -0      ksplanetbase.h   1.19
  M +3 -0      kstarsdata.cpp   1.116
  M +320 -2    skymap.cpp   1.119
  M +40 -2     skymap.h   1.53
  M +14 -0     skymapdraw.cpp   1.46
  M +9 -261    skymapevents.cpp   1.82
  M +9 -0      skyobject.h   1.34
  M +2 -0      skypoint.h   1.18
  M +10 -0     starobject.h   1.17





More information about the Kstars-devel mailing list