ConfigurationDialog.cpp   ConfigurationDialog.cpp 
skipping to change at line 52 skipping to change at line 52
#include "StelLocation.hpp" #include "StelLocation.hpp"
#include "LandscapeMgr.hpp" #include "LandscapeMgr.hpp"
#include "StelSkyCultureMgr.hpp" #include "StelSkyCultureMgr.hpp"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include "MeteorMgr.hpp" #include "MeteorMgr.hpp"
#include "ConstellationMgr.hpp" #include "ConstellationMgr.hpp"
#include "StarMgr.hpp" #include "StarMgr.hpp"
#include "NebulaMgr.hpp" #include "NebulaMgr.hpp"
#include "GridLinesMgr.hpp" #include "GridLinesMgr.hpp"
#include "MilkyWay.hpp" #include "MilkyWay.hpp"
#include "ZodiacalLight.hpp"
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
#include "StelScriptMgr.hpp" #include "StelScriptMgr.hpp"
#endif #endif
#include "LabelMgr.hpp" #include "LabelMgr.hpp"
#include "ScreenImageMgr.hpp" #include "ScreenImageMgr.hpp"
#include "SkyGui.hpp" #include "SkyGui.hpp"
#include "StelJsonParser.hpp" #include "StelJsonParser.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include <QSettings> #include <QSettings>
skipping to change at line 159 skipping to change at line 160
// Main tab // Main tab
// Fill the language list widget from the available list // Fill the language list widget from the available list
QComboBox* cb = ui->programLanguageComboBox; QComboBox* cb = ui->programLanguageComboBox;
cb->clear(); cb->clear();
cb->addItems(StelTranslator::globalTranslator->getAvailableLanguages NamesNative(StelFileMgr::getLocaleDir())); cb->addItems(StelTranslator::globalTranslator->getAvailableLanguages NamesNative(StelFileMgr::getLocaleDir()));
cb->model()->sort(0); cb->model()->sort(0);
updateCurrentLanguage(); updateCurrentLanguage();
connect(cb->lineEdit(), SIGNAL(editingFinished()), this, SLOT(update CurrentLanguage())); connect(cb->lineEdit(), SIGNAL(editingFinished()), this, SLOT(update CurrentLanguage()));
connect(cb, SIGNAL(currentIndexChanged(const QString&)), this, SLOT( selectLanguage(const QString&))); connect(cb, SIGNAL(currentIndexChanged(const QString&)), this, SLOT( selectLanguage(const QString&)));
// Do the same for sky language:
cb = ui->skycultureLanguageComboBox;
cb->clear();
cb->addItems(StelTranslator::globalTranslator->getAvailableLanguages
NamesNative(StelFileMgr::getLocaleDir()));
cb->model()->sort(0);
updateCurrentSkyLanguage();
connect(cb->lineEdit(), SIGNAL(editingFinished()), this, SLOT(update
CurrentSkyLanguage()));
connect(cb, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(
selectSkyLanguage(const QString&)));
ui->groupBoxUpdates->setChecked(StelApp::getInstance().getSettings() ->value("main/check_updates_enabled", true).toBool()); ui->groupBoxUpdates->setChecked(StelApp::getInstance().getSettings() ->value("main/check_updates_enabled", true).toBool());
connect(ui->groupBoxUpdates, SIGNAL(toggled(bool)), this, SLOT(setUp datesFlag(bool))); connect(ui->groupBoxUpdates, SIGNAL(toggled(bool)), this, SLOT(setUp datesFlag(bool)));
connect(ui->getStarsButton, SIGNAL(clicked()), this, SLOT(downloadSt ars())); connect(ui->getStarsButton, SIGNAL(clicked()), this, SLOT(downloadSt ars()));
connect(ui->downloadCancelButton, SIGNAL(clicked()), this, SLOT(canc elDownload())); connect(ui->downloadCancelButton, SIGNAL(clicked()), this, SLOT(canc elDownload()));
connect(ui->downloadRetryButton, SIGNAL(clicked()), this, SLOT(downl oadStars())); connect(ui->downloadRetryButton, SIGNAL(clicked()), this, SLOT(downl oadStars()));
resetStarCatalogControls(); resetStarCatalogControls();
#ifdef Q_OS_WIN
//Kinetic scrolling for tablet pc and pc //Kinetic scrolling for tablet pc and pc
QList<QWidget *> addscroll; QList<QWidget *> addscroll;
addscroll << ui->pluginsListWidget << ui->scriptListWidget; addscroll << ui->pluginsListWidget << ui->scriptListWidget;
installKineticScrolling(addscroll); installKineticScrolling(addscroll);
#endif
// Selected object info // Selected object info
if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(0)) if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(0))
{ {
ui->noSelectedInfoRadio->setChecked(true); ui->noSelectedInfoRadio->setChecked(true);
} }
else if (gui->getInfoTextFilters() == StelObject::ShortInfo) else if (gui->getInfoTextFilters() == StelObject::ShortInfo)
{ {
ui->briefSelectedInfoRadio->setChecked(true); ui->briefSelectedInfoRadio->setChecked(true);
} }
skipping to change at line 331 skipping to change at line 342
if (lt == -1 && appLang.contains('_')) if (lt == -1 && appLang.contains('_'))
{ {
l2 = appLang.left(appLang.indexOf('_')); l2 = appLang.left(appLang.indexOf('_'));
l2=StelTranslator::iso639_1CodeToNativeName(l2); l2=StelTranslator::iso639_1CodeToNativeName(l2);
lt = cb->findText(l2, Qt::MatchExactly); lt = cb->findText(l2, Qt::MatchExactly);
} }
if (lt!=-1) if (lt!=-1)
cb->setCurrentIndex(lt); cb->setCurrentIndex(lt);
} }
void ConfigurationDialog::updateCurrentSkyLanguage()
{
QComboBox* cb = ui->skycultureLanguageComboBox;
QString skyLang = StelApp::getInstance().getLocaleMgr().getSkyLangua
ge();
QString l2 = StelTranslator::iso639_1CodeToNativeName(skyLang);
if (cb->currentText() == l2)
return;
int lt = cb->findText(l2, Qt::MatchExactly);
if (lt == -1 && skyLang.contains('_'))
{
l2 = skyLang.left(skyLang.indexOf('_'));
l2=StelTranslator::iso639_1CodeToNativeName(l2);
lt = cb->findText(l2, Qt::MatchExactly);
}
if (lt!=-1)
cb->setCurrentIndex(lt);
}
void ConfigurationDialog::selectLanguage(const QString& langName) void ConfigurationDialog::selectLanguage(const QString& langName)
{ {
QString code = StelTranslator::nativeNameToIso639_1Code(langName); QString code = StelTranslator::nativeNameToIso639_1Code(langName);
StelApp::getInstance().getLocaleMgr().setAppLanguage(code); StelApp::getInstance().getLocaleMgr().setAppLanguage(code);
StelApp::getInstance().getLocaleMgr().setSkyLanguage(code); // StelApp::getInstance().getLocaleMgr().setSkyLanguage(code);
StelMainView::getInstance().initTitleI18n(); StelMainView::getInstance().initTitleI18n();
} }
void ConfigurationDialog::selectSkyLanguage(const QString& langName)
{
QString code = StelTranslator::nativeNameToIso639_1Code(langName);
// StelApp::getInstance().getLocaleMgr().setAppLanguage(code);
StelApp::getInstance().getLocaleMgr().setSkyLanguage(code);
// StelMainView::getInstance().initTitleI18n();
}
void ConfigurationDialog::setStartupTimeMode() void ConfigurationDialog::setStartupTimeMode()
{ {
if (ui->systemTimeRadio->isChecked()) if (ui->systemTimeRadio->isChecked())
StelApp::getInstance().getCore()->setStartupTimeMode("actual "); StelApp::getInstance().getCore()->setStartupTimeMode("actual ");
else if (ui->todayRadio->isChecked()) else if (ui->todayRadio->isChecked())
StelApp::getInstance().getCore()->setStartupTimeMode("today" ); StelApp::getInstance().getCore()->setStartupTimeMode("today" );
else else
StelApp::getInstance().getCore()->setStartupTimeMode("preset "); StelApp::getInstance().getCore()->setStartupTimeMode("preset ");
StelApp::getInstance().getCore()->setInitTodayTime(ui->todayTimeSpin Box->time()); StelApp::getInstance().getCore()->setInitTodayTime(ui->todayTimeSpin Box->time());
skipping to change at line 528 skipping to change at line 567
skyd->getCustomNebulaMagnitudeLimit()); skyd->getCustomNebulaMagnitudeLimit());
conf->setValue("viewing/use_luminance_adaptation", skyd->getFlagLumi nanceAdaptation()); conf->setValue("viewing/use_luminance_adaptation", skyd->getFlagLumi nanceAdaptation());
conf->setValue("astro/flag_planets", ssmgr->getFlagPlanets()); conf->setValue("astro/flag_planets", ssmgr->getFlagPlanets());
conf->setValue("astro/flag_planets_hints", ssmgr->getFlagHints()); conf->setValue("astro/flag_planets_hints", ssmgr->getFlagHints());
conf->setValue("astro/flag_planets_orbits", ssmgr->getFlagOrbits()); conf->setValue("astro/flag_planets_orbits", ssmgr->getFlagOrbits());
conf->setValue("astro/flag_light_travel_time", ssmgr->getFlagLightTr avelTime()); conf->setValue("astro/flag_light_travel_time", ssmgr->getFlagLightTr avelTime());
conf->setValue("viewing/flag_moon_scaled", ssmgr->getFlagMoonScale() ); conf->setValue("viewing/flag_moon_scaled", ssmgr->getFlagMoonScale() );
conf->setValue("viewing/moon_scale", ssmgr->getMoonScale()); conf->setValue("viewing/moon_scale", ssmgr->getMoonScale());
conf->setValue("astro/meteor_rate", mmgr->getZHR()); conf->setValue("astro/meteor_rate", mmgr->getZHR());
conf->setValue("astro/milky_way_intensity", GETSTELMODULE(MilkyWay)- >getIntensity()); conf->setValue("astro/milky_way_intensity", GETSTELMODULE(MilkyWay)- >getIntensity());
conf->setValue("astro/zodiacal_light_intensity", GETSTELMODULE(Zodia calLight)->getIntensity());
// view dialog / markings tab settings // view dialog / markings tab settings
conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimutha lGrid()); conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimutha lGrid());
conf->setValue("viewing/flag_equatorial_grid", glmgr->getFlagEquator Grid()); conf->setValue("viewing/flag_equatorial_grid", glmgr->getFlagEquator Grid());
conf->setValue("viewing/flag_equator_line", glmgr->getFlagEquatorLin e()); conf->setValue("viewing/flag_equator_line", glmgr->getFlagEquatorLin e());
conf->setValue("viewing/flag_ecliptic_line", glmgr->getFlagEclipticL ine()); conf->setValue("viewing/flag_ecliptic_line", glmgr->getFlagEclipticL ine());
conf->setValue("viewing/flag_ecliptic_J2000_grid", glmgr->getFlagEcl ipticJ2000Grid()); conf->setValue("viewing/flag_ecliptic_J2000_grid", glmgr->getFlagEcl ipticJ2000Grid());
conf->setValue("viewing/flag_meridian_line", glmgr->getFlagMeridianL ine()); conf->setValue("viewing/flag_meridian_line", glmgr->getFlagMeridianL ine());
conf->setValue("viewing/flag_horizon_line", glmgr->getFlagHorizonLin e()); conf->setValue("viewing/flag_horizon_line", glmgr->getFlagHorizonLin e());
conf->setValue("viewing/flag_equatorial_J2000_grid", glmgr->getFlagE quatorJ2000Grid()); conf->setValue("viewing/flag_equatorial_J2000_grid", glmgr->getFlagE quatorJ2000Grid());
conf->setValue("viewing/flag_galactic_grid", glmgr->getFlagGalacticG rid()); conf->setValue("viewing/flag_galactic_grid", glmgr->getFlagGalacticG rid());
conf->setValue("viewing/flag_galactic_equator_line", glmgr->getFlagG alacticEquatorLine()); conf->setValue("viewing/flag_galactic_equator_line", glmgr->getFlagG alacticEquatorLine());
conf->setValue("viewing/flag_cardinal_points", lmgr->getFlagCardinal sPoints()); conf->setValue("viewing/flag_cardinal_points", lmgr->getFlagCardinal sPoints());
conf->setValue("viewing/flag_constellation_drawing", cmgr->getFlagLi nes()); conf->setValue("viewing/flag_constellation_drawing", cmgr->getFlagLi nes());
conf->setValue("viewing/flag_constellation_name", cmgr->getFlagLabel s()); conf->setValue("viewing/flag_constellation_name", cmgr->getFlagLabel s());
conf->setValue("viewing/flag_constellation_boundaries", cmgr->getFla gBoundaries()); conf->setValue("viewing/flag_constellation_boundaries", cmgr->getFla gBoundaries());
conf->setValue("viewing/flag_constellation_art", cmgr->getFlagArt()) ; conf->setValue("viewing/flag_constellation_art", cmgr->getFlagArt()) ;
conf->setValue("viewing/flag_constellation_isolate_selected", cmgr-> getFlagIsolateSelected()); conf->setValue("viewing/flag_constellation_isolate_selected", cmgr-> getFlagIsolateSelected());
conf->setValue("viewing/flag_landscape_autoselection", lmgr->getFlag LandscapeAutoSelection()); conf->setValue("viewing/flag_landscape_autoselection", lmgr->getFlag LandscapeAutoSelection());
conf->setValue("viewing/flag_light_pollution_database", lmgr->getFla gUseLightPollutionFromDatabase()); conf->setValue("viewing/flag_light_pollution_database", lmgr->getFla gUseLightPollutionFromDatabase());
conf->setValue("viewing/flag_atmopshere_auto_enable", lmgr->getFlagA conf->setValue("viewing/flag_atmosphere_auto_enable", lmgr->getFlagA
tmosphereAutoEnable()); tmosphereAutoEnable());
conf->setValue("viewing/flag_planets_native_names", ssmgr->getFlagNa
tiveNames());
conf->setValue("viewing/constellation_art_intensity", cmgr->getArtIn tensity()); conf->setValue("viewing/constellation_art_intensity", cmgr->getArtIn tensity());
conf->setValue("viewing/constellation_name_style", cmgr->getConstell ationDisplayStyleString());
conf->setValue("viewing/flag_night", StelApp::getInstance().getVisio nModeNight()); conf->setValue("viewing/flag_night", StelApp::getInstance().getVisio nModeNight());
conf->setValue("astro/flag_star_name", smgr->getFlagLabels()); conf->setValue("astro/flag_star_name", smgr->getFlagLabels());
conf->setValue("stars/labels_amount", smgr->getLabelsAmount()); conf->setValue("stars/labels_amount", smgr->getLabelsAmount());
conf->setValue("astro/flag_planets_labels", ssmgr->getFlagLabels()); conf->setValue("astro/flag_planets_labels", ssmgr->getFlagLabels());
conf->setValue("astro/labels_amount", ssmgr->getLabelsAmount()); conf->setValue("astro/labels_amount", ssmgr->getLabelsAmount());
conf->setValue("astro/nebula_hints_amount", nmgr->getHintsAmount()); conf->setValue("astro/nebula_hints_amount", nmgr->getHintsAmount());
conf->setValue("astro/flag_nebula_name", nmgr->getFlagHints()); conf->setValue("astro/flag_nebula_name", nmgr->getFlagHints());
conf->setValue("projection/type", core->getCurrentProjectionTypeKey( )); conf->setValue("projection/type", core->getCurrentProjectionTypeKey( ));
// view dialog / landscape tab settings // view dialog / landscape tab settings
lmgr->setDefaultLandscapeID(lmgr->getCurrentLandscapeID()); lmgr->setDefaultLandscapeID(lmgr->getCurrentLandscapeID());
conf->setValue("landscape/flag_landscape_sets_location", lmgr->getFl agLandscapeSetsLocation()); conf->setValue("landscape/flag_landscape_sets_location", lmgr->getFl agLandscapeSetsLocation());
conf->setValue("landscape/flag_landscape", lmgr->getFlagLandscape()) ; conf->setValue("landscape/flag_landscape", lmgr->getFlagLandscape()) ;
conf->setValue("landscape/flag_atmosphere", lmgr->getFlagAtmosphere( )); conf->setValue("landscape/flag_atmosphere", lmgr->getFlagAtmosphere( ));
conf->setValue("landscape/flag_brightness", lmgr->getFlagLandscapeSe tsMinimalBrightness()); conf->setValue("landscape/flag_brightness", lmgr->getFlagLandscapeSe tsMinimalBrightness());
conf->setValue("landscape/flag_fog", lmgr->getFlagFog()); conf->setValue("landscape/flag_fog", lmgr->getFlagFog());
conf->setValue("landscape/flag_enable_illumination_layer", lmgr->get FlagIllumination());
conf->setValue("stars/init_bortle_scale", core->getSkyDrawer()->getB ortleScaleIndex()); conf->setValue("stars/init_bortle_scale", core->getSkyDrawer()->getB ortleScaleIndex());
conf->setValue("landscape/atmospheric_extinction_coefficient", core ->getSkyDrawer()->getExtinctionCoefficient()); conf->setValue("landscape/atmospheric_extinction_coefficient", core ->getSkyDrawer()->getExtinctionCoefficient());
conf->setValue("landscape/pressure_mbar", core->getSkyDrawer()->get AtmospherePressure()); conf->setValue("landscape/pressure_mbar", core->getSkyDrawer()->get AtmospherePressure());
conf->setValue("landscape/temperature_C", core->getSkyDrawer()->get AtmosphereTemperature()); conf->setValue("landscape/temperature_C", core->getSkyDrawer()->get AtmosphereTemperature());
conf->setValue("landscape/flag_minimal_brightness", lmgr->getFlagLan
dscapeUseMinimalBrightness());
conf->setValue("landscape/flag_landscape_sets_minimal_brightness", l
mgr->getFlagLandscapeSetsMinimalBrightness());
conf->setValue("landscape/minimal_brightness", lmgr->getDefaultMinim
alBrightness());
// view dialog / starlore tab // view dialog / starlore tab
StelApp::getInstance().getSkyCultureMgr().setDefaultSkyCultureID(Ste lApp::getInstance().getSkyCultureMgr().getCurrentSkyCultureID()); StelApp::getInstance().getSkyCultureMgr().setDefaultSkyCultureID(Ste lApp::getInstance().getSkyCultureMgr().getCurrentSkyCultureID());
// Save default location // Save default location
StelApp::getInstance().getCore()->setDefaultLocationID(core->getCurr entLocation().getID()); StelApp::getInstance().getCore()->setDefaultLocationID(core->getCurr entLocation().getID());
// configuration dialog / main tab // configuration dialog / main tab
QString langName = StelApp::getInstance().getLocaleMgr().getAppLangu age(); QString langName = StelApp::getInstance().getLocaleMgr().getAppLangu age();
conf->setValue("localization/app_locale", StelTranslator::nativeName ToIso639_1Code(langName)); conf->setValue("localization/app_locale", StelTranslator::nativeName ToIso639_1Code(langName));
skipping to change at line 602 skipping to change at line 648
{ {
conf->setValue("gui/selected_object_info", "custom"); conf->setValue("gui/selected_object_info", "custom");
conf->beginGroup("custom_selected_info"); conf->beginGroup("custom_selected_info");
conf->setValue("flag_show_name", (bool) (flags & StelObject: :Name)); conf->setValue("flag_show_name", (bool) (flags & StelObject: :Name));
conf->setValue("flag_show_catalognumber", conf->setValue("flag_show_catalognumber",
(bool) (flags & StelObject::CatalogNumber)); (bool) (flags & StelObject::CatalogNumber));
conf->setValue("flag_show_magnitude", conf->setValue("flag_show_magnitude",
(bool) (flags & StelObject::Magnitude)); (bool) (flags & StelObject::Magnitude));
conf->setValue("flag_show_absolutemagnitude", conf->setValue("flag_show_absolutemagnitude",
(bool) (flags & StelObject::AbsoluteMagnitude )); (bool) (flags & StelObject::AbsoluteMagnitude ));
conf->setValue("flag_show_radecj2000", conf->setValue("flag_show_radecj2000",
(bool) (flags & StelObject::RaDecJ2000)); (bool) (flags & StelObject::RaDecJ2000));
conf->setValue("flag_show_radecofdate", conf->setValue("flag_show_radecofdate",
(bool) (flags & StelObject::RaDecOfDate)); (bool) (flags & StelObject::RaDecOfDate));
conf->setValue("flag_show_hourangle", conf->setValue("flag_show_hourangle",
(bool) (flags & StelObject::HourAngle)); (bool) (flags & StelObject::HourAngle));
conf->setValue("flag_show_altaz", conf->setValue("flag_show_altaz",
(bool) (flags & StelObject::AltAzi)); (bool) (flags & StelObject::AltAzi));
conf->setValue("flag_show_distance", conf->setValue("flag_show_distance",
(bool) (flags & StelObject::Distance)); (bool) (flags & StelObject::Distance));
 End of changes. 13 change blocks. 
4 lines changed or deleted 58 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/