[Kstars-devel] branches/kstars/summer/kstars
Prakash Mohan
prak902000 at gmail.com
Mon Jun 8 12:46:23 CEST 2009
SVN commit 978834 by prakash:
Merging changes into trunk - 1
CCMAIL: kstars-devel at kde.org
_M . (directory)
M +2 -1 kstars/byteswap.h
M +5 -4 kstars/data/README.binfileformat
M +10 -2 kstars/skycomponents/README
A kstars/skycomponents/README.stars trunk/KDE/kdeedu/kstars/kstars/skycomponents/README.stars#978804
M +12 -1 kstars/skycomponents/deepstarcomponent.cpp
M +3 -3 kstars/skycomponents/deepstarcomponent.h
M +18 -10 kstars/skycomponents/starcomponent.h
M +2 -2 kstars/tools/wutdialog.cpp
** branches/kstars/summer/kstars #property svnmerge-integrated
- /trunk/KDE/kdeedu/kstars:1-978552 /branches/kstars/unfrozen/kstars:1-822093,823176-826602,826607-826609,826612,826614-826640,826642-827470,827472-827647,827649-829108,829110-829310,829312-829464
+ /trunk/KDE/kdeedu/kstars:1-978804 /branches/kstars/unfrozen/kstars:1-822093,823176-826602,826607-826609,826612,826614-826640,826642-827470,827472-827647,827649-829108,829110-829310,829312-829464
--- branches/kstars/summer/kstars/kstars/byteswap.h #978833:978834
@@ -15,7 +15,8 @@
* *
***************************************************************************/
-// Modified appropriately and incorporated for use in KStars on 9 Jun 2008
+// Modified appropriately and incorporated for use in KStars on 9 Jun
+// 2008 by Akarsh Simha <akarsh.simha at kdemail.net>
#ifndef BYTESWAP_H
#define BYTESWAP_H
--- branches/kstars/summer/kstars/kstars/data/README.binfileformat #978833:978834
@@ -102,9 +102,9 @@
details of whose fields (assumed to be placed continuously, without
any gaps) are as described in the field descriptor in the header.
- NOTE: KStars _overrides_ this convention for performance gains and
- ease of programming in the star names file, where records are stored
- as single blocks of the "starName" structure defined in
+ NOTE: KStars _overrides_ the above defined convention for performance
+ gains and ease of programming in the star names file, where records
+ are stored as single blocks of the "starName" structure defined in
kstars/kstars/skycomponents/starcomponent.h
3. Licensing Information
@@ -112,5 +112,6 @@
(c) 2008. Akarsh Simha <akarshsimha at gmail.com>
-This document is released under the GPL.
+This document is released under the GNU GPL v2 or, at your option, any
+later version.
--- branches/kstars/summer/kstars/kstars/skycomponents/README #978833:978834
@@ -37,10 +37,11 @@
+ SkyComposite
- StarComponent [ListComponent]
+ - DeepStarComponent [ListComponent]
- DeepSkyComponent [ListComponent]
- ConstellationNamesComponent [ListComponent]
+ SolarSystemComposite
- - SolarSystemSingleComponent (Sun [SingleComponent]
+ - SolarSystemSingleComponent (Sun) [SingleComponent]
- SolarSystemSingleComponent (Moon) [SingleComponent]
- SolarSystemSingleComponent (Mercury) [SingleComponent]
- SolarSystemSingleComponent (Venus) [SingleComponent]
@@ -120,9 +121,16 @@
the 4 Jupiter moons have their own class (JMoons) not derived
directly from a SkyPoint.
+4. DeepStarComponent and StarComponent
-4. Functions
+StarComponent and DeepStarComponent manage stars in
+KStars. StarComponent maintains a QVector of instances of
+DeepStarComponents and takes care of calling their draw routines
+etc. The machinery for handling stars is documented in great detail in
+README.stars
+5. Functions
+
TBD. Describe important functions, and in which classes they are
defined (i.e., update() is only defined in SkyComponent[pure virtual],
SkyComposite, SingleComponent, ListComponent, and PointListComponent).
--- branches/kstars/summer/kstars/kstars/skycomponents/deepstarcomponent.cpp #978833:978834
@@ -119,7 +119,7 @@
* and then calling StarObject::init() to replace the default data with the correct
* data.
* This means that this section of the code plays around with pointers to a great
- * extend and has a chance of breaking down / causing segfaults.
+ * extent and has a chance of breaking down / causing segfaults.
*/
/* Make a copy of the star template and set up the data in it */
@@ -370,6 +370,8 @@
// build an index for just the named stars which would make this go
// much faster still. -jbb
//
+
+
SkyObject* DeepStarComponent::objectNearest( SkyPoint *p, double &maxrad )
{
StarObject *oBest = 0;
@@ -398,6 +400,15 @@
}
}
}
+
+ // TODO: What if we are looking around a point that's not on
+ // screen? objectNearest() will need to keep on filling up all
+ // trixels around the SkyPoint to find the best match in case it
+ // has not been found. Ideally, this should be implemented in a
+ // different method and should be called after all other
+ // candidates (eg: DeepSkyObject::objectNearest()) have been
+ // called.
+
return (SkyObject*) oBest;
}
--- branches/kstars/summer/kstars/kstars/skycomponents/deepstarcomponent.h #978833:978834
@@ -2,8 +2,8 @@
deepstarcomponent.h - K Desktop Planetarium
-------------------
begin : Fri 1st Aug 2008
- copyright : (C) 2008 Akarsh Simha
- email : akarshsimha at gmail.com
+ copyright : (C) 2008 Akarsh Simha, Thomas Kabelmann
+ email : akarshsimha at gmail.com, thomas.kabelmann at gmx.de
***************************************************************************/
/***************************************************************************
@@ -20,7 +20,7 @@
/**
*@class DeepStarComponent
- *Stores and manages stars from fainter catalogs
+ *Stores and manages unnamed stars, most of which are dynamically loaded into memory.
*
*@author Akarsh Simha
*@note Much of the code here is copied from class StarComponent authored by Thomas Kabelmann
--- branches/kstars/summer/kstars/kstars/skycomponents/starcomponent.h #978833:978834
@@ -19,11 +19,18 @@
#define STARCOMPONENT_H
/**
- *@class StarComponent
- *Represents the stars on the sky map. For optimization reasons the stars are
- *not separate objects and are stored in a list.
+ *@class StarComponent
*
+ *@short Represents the stars on the sky map. For optimization reasons the
+ *stars are not separate objects and are stored in a list.
+ *
+ *The StarComponent class manages all stars drawn in KStars. While it
+ *handles all stars having names using its own member methods, it
+ *shunts the responsibility of unnamed stars to the class
+ *'DeepStarComponent', objects of which it maintains.
+ *
*@author Thomas Kabelmann
+ *@author Akarsh Simha
*@version 1.0
*/
@@ -87,7 +94,7 @@
void init(KStarsData *data);
- KStarsData *data() { return m_Data; }
+ inline KStarsData *data() { return m_Data; }
/**@return the current setting of the color mode for stars (0=real colors,
*1=solid red, 2=solid white or 3=solid black).
@@ -120,12 +127,13 @@
/**
*@short Read data for stars which will remain static in the memory
*
- *This method reads data for 'shallow' stars (stars having names, and all
- *stars down to mag 8) which are stored by default in "shallowstars.dat" into
- *memory. These stars are always kept in memory, as against 'deep' stars
- *which are dynamically loaded into memory when required, depending on region
- *and magnitude limit. Once loading is successful, this method sets the
- *starsLoaded flag to true
+ *This method reads data for named stars (stars having names,
+ *which are stored by default in "namedstars.dat") into
+ *memory. These stars are always kept in memory, as against 'deep'
+ *stars which are mostly loaded dynamically (KStars treats all
+ *unnamed stars as 'deep' stars) into memory when required,
+ *depending on region and magnitude limit. Once loading is
+ *successful, this method sets the starsLoaded flag to true
*/
bool loadStaticData();
--- branches/kstars/summer/kstars/kstars/tools/wutdialog.cpp #978833:978834
@@ -166,8 +166,8 @@
sDuration = KGlobal::locale()->formatTime( tDur );
}
- WUT->SunSetLabel->setText( i18n( "Sunset: %1 on %2" , sSet, KGlobal::locale()->formatDate( Evening.date(), KLocale::LongDate) ) );
- WUT->SunRiseLabel->setText( i18n( "Sunrise: %1 on %2" , sRise, KGlobal::locale()->formatDate( Tomorrow.date(), KLocale::LongDate) ) );
+ WUT->SunSetLabel->setText( i18nc( "Sunset at time %1 on date %2", "Sunset: %1 on %2" , sSet, KGlobal::locale()->formatDate( Evening.date(), KLocale::LongDate) ) );
+ WUT->SunRiseLabel->setText( i18nc( "Sunrise at time %1 on date %2", "Sunrise: %1 on %2" , sRise, KGlobal::locale()->formatDate( Tomorrow.date(), KLocale::LongDate) ) );
WUT->NightDurationLabel->setText( i18n("Night duration: %1 hours", sDuration ) );
// moon almanac information
More information about the Kstars-devel
mailing list