[Kstars-devel] kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Tue Mar 30 10:13:11 CEST 2004
CVS commit by harris:
Fixed image dump mode, which has been broken since I ported to
KConfigXT. The problem was that setting the geographic location is no
longer handled in KStarsData::slotInitialize(), so it wasn't being set
for dump mode. To fix, I had to add a function
KStarsData::setLocationFromConfig(), which is now called both in
KStars::Kstars() (for normal GUI startup) and in main() (for non-GUI
image-dump mode).
CCMAIL: kstars-devel at kde.org
M +1 -4 kstars.cpp 1.81
M +7 -0 kstarsdata.cpp 1.125
M +1 -0 kstarsdata.h 1.76
M +6 -0 main.cpp 1.33
--- kdeedu/kstars/kstars/kstars.cpp #1.80:1.81
@@ -62,8 +62,5 @@ KStars::KStars( bool doSplash ) :
//Set Geographic Location
- QMap<QString, TimeZoneRule>::Iterator it = pd->kstarsData->Rulebook.find( Options::dST() );
- pd->kstarsData->setLocation( GeoLocation ( Options::longitude(), Options::latitude(),
- Options::cityName(), Options::provinceName(), Options::countryName(),
- Options::timeZone(), &(it.data()), 4, Options::elevation() ) );
+ pd->kstarsData->setLocationFromOptions();
//set up Dark color scheme for application windows
--- kdeedu/kstars/kstars/kstarsdata.cpp #1.124:1.125
@@ -1948,4 +1948,11 @@ void KStarsData::setFullTimeUpdate() {
}
+void KStarsData::setLocationFromOptions() {
+ QMap<QString, TimeZoneRule>::Iterator it = Rulebook.find( Options::dST() );
+ setLocation( GeoLocation ( Options::longitude(), Options::latitude(),
+ Options::cityName(), Options::provinceName(), Options::countryName(),
+ Options::timeZone(), &(it.data()), 4, Options::elevation() ) );
+}
+
void KStarsData::setLocation( const GeoLocation &l ) {
GeoLocation g( l );
--- kdeedu/kstars/kstars/kstarsdata.h #1.75:1.76
@@ -392,4 +392,5 @@ public:
GeoLocation *geo() { return &Geo; }
void setLocation( const GeoLocation &l );
+ void setLocationFromOptions();
ColorScheme *colorScheme() { return &CScheme; }
--- kdeedu/kstars/kstars/main.cpp #1.32:1.33
@@ -93,4 +93,10 @@ int main(int argc, char *argv[])
while (!dat->startupComplete) { kapp->processEvents(50); }
+ //Set Geographic Location
+ dat->setLocationFromOptions();
+
+ //Set color scheme
+ dat->colorScheme()->loadFromConfig( kapp->config() );
+
//reset clock now that we have a location:
dat->clock()->setUTC( QDateTime::currentDateTime().addSecs( -3600 * dat->geo()->TZ() ) );
More information about the Kstars-devel
mailing list