[Kstars-devel] branches/kstars/summer/kdeedu/kstars/kstars
Akarsh Simha
akarshsimha at gmail.com
Sat Jun 28 00:29:26 CEST 2008
SVN commit 825361 by asimha:
The memory usage slider now actually works.
+ Fixing type of Options::memUsage() to double
+ Changing default value of slider to 8
+ Making sure that settings apply correctly in slotApply()
+ Using Options::memUsage() in the maglim formula in StarComponent. I
cooked up the formula ad-hoc, but it seems to work pretty well. The
typical memory usage at small zoom levels with the slider at value
'2' is about 50K (total) and is about 90K with the slider at value
'10'. I found that 8 gives a good star density, to my satisfaction.
CCMAIL: kstars-devel at kde.org
M +2 -2 kstars.kcfg
M +2 -2 opscatalog.cpp
M +1 -2 skycomponents/starcomponent.cpp
--- branches/kstars/summer/kdeedu/kstars/kstars/kstars.kcfg #825360:825361
@@ -627,10 +627,10 @@
<default>8.0</default>
</entry>
-->
- <entry name="MemUsage" type="Double">
+ <entry name="MemUsage" type="Int">
<label>Memory usage for star blocks</label>
<whatsthis>Amount of memory to use for stars. KStars will adjust the star density accordingly</whatsthis>
- <default>1.0</default>
+ <default>8</default>
</entry>
<entry name="MagLimitDrawStarZoomOut" type="Double">
--- branches/kstars/summer/kdeedu/kstars/kstars/opscatalog.cpp #825360:825361
@@ -204,8 +204,8 @@
*/
void OpsCatalog::slotApply() {
- Options::setMemUsage( m_MemUsage );
- Options::setMagLimitDrawStarZoomOut( m_MagLimitDrawStarZoomOut );
+ Options::setMemUsage( kcfg_MemUsage->value() );
+ Options::setMagLimitDrawStarZoomOut( kcfg_MagLimitDrawStarZoomOut->value() );
//FIXME: need to add the ShowDeepSky meta-option to the config dialog!
//For now, I'll set showDeepSky to true if any catalog options changed
--- branches/kstars/summer/kdeedu/kstars/kstars/skycomponents/starcomponent.cpp #825360:825361
@@ -214,8 +214,7 @@
double lgmax = log10(MAXZOOM);
double lgz = log10(Options::zoomFactor());
-
- float maglim = 4.444 * ( lgz - lgmin ) + Options::magLimitDrawStarZoomOut();
+ float maglim = ( 2.000 + 2.444 * Options::memUsage() / 10.0 ) * ( lgz - lgmin ) + Options::magLimitDrawStarZoomOut();
m_zoomMagLimit = maglim;
More information about the Kstars-devel
mailing list