ConfigurationDialog.cpp   ConfigurationDialog.cpp 
skipping to change at line 57 skipping to change at line 57
#include "NebulaMgr.hpp" #include "NebulaMgr.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 "EphemWrapper.hpp" #include "EphemWrapper.hpp"
#include "ToastMgr.hpp"
#include <QSettings> #include <QSettings>
#include <QDebug> #include <QDebug>
#include <QFile> #include <QFile>
#include <QFileDialog> #include <QFileDialog>
#include <QComboBox> #include <QComboBox>
#include <QDir> #include <QDir>
#include <QDesktopWidget> #include <QDesktopWidget>
ConfigurationDialog::ConfigurationDialog(StelGui* agui, QObject* parent) ConfigurationDialog::ConfigurationDialog(StelGui* agui, QObject* parent)
skipping to change at line 81 skipping to change at line 82
, currentDownloadFile(NULL) , currentDownloadFile(NULL)
, progressBar(NULL) , progressBar(NULL)
, gui(agui) , gui(agui)
{ {
dialogName = "Configuration"; dialogName = "Configuration";
ui = new Ui_configurationDialogForm; ui = new Ui_configurationDialogForm;
customDeltaTEquationDialog = NULL; customDeltaTEquationDialog = NULL;
hasDownloadedStarCatalog = false; hasDownloadedStarCatalog = false;
isDownloadingStarCatalog = false; isDownloadingStarCatalog = false;
savedProjectionType = StelApp::getInstance().getCore()->getCurrentPr ojectionType(); savedProjectionType = StelApp::getInstance().getCore()->getCurrentPr ojectionType();
// Get info about operating system
QString platform = StelUtils::getOperatingSystemInfo();
if (platform.contains("Linux"))
platform = "Linux";
if (platform.contains("FreeBSD"))
platform = "FreeBSD";
// Set user agent as "Stellarium/$version$ ($platform$)"
userAgent = QString("Stellarium/%1 (%2)").arg(StelUtils::getApplicat
ionVersion()).arg(platform);
} }
ConfigurationDialog::~ConfigurationDialog() ConfigurationDialog::~ConfigurationDialog()
{ {
delete ui; delete ui;
ui = NULL; ui = NULL;
delete customDeltaTEquationDialog; delete customDeltaTEquationDialog;
customDeltaTEquationDialog = NULL; customDeltaTEquationDialog = NULL;
} }
void ConfigurationDialog::retranslate() void ConfigurationDialog::retranslate()
{ {
if (dialog) { if (dialog) {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
//Hack to shrink the tabs to optimal size after language cha
nge
//by causing the list items to be laid out again.
updateTabBarListWidgetWidth();
//Initial FOV and direction on the "Main" page //Initial FOV and direction on the "Main" page
updateConfigLabels(); updateConfigLabels();
//Star catalog download button and info //Star catalog download button and info
updateStarCatalogControlsText(); updateStarCatalogControlsText();
//Script information //Script information
//(trigger re-displaying the description of the current item ) //(trigger re-displaying the description of the current item )
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
scriptSelectionChanged(ui->scriptListWidget->currentItem()-> text()); scriptSelectionChanged(ui->scriptListWidget->currentItem()-> text());
#endif #endif
//Plug-in information //Plug-in information
populatePluginsList(); populatePluginsList();
populateDeltaTAlgorithmsList(); populateDeltaTAlgorithmsList();
populateDateFormatsList();
populateTimeFormatsList();
//Hack to shrink the tabs to optimal size after language cha
nge
//by causing the list items to be laid out again.
updateTabBarListWidgetWidth();
} }
} }
void ConfigurationDialog::styleChanged() void ConfigurationDialog::styleChanged()
{ {
// Nothing for now // Nothing for now
} }
void ConfigurationDialog::createDialogContent() void ConfigurationDialog::createDialogContent()
{ {
skipping to change at line 237 skipping to change at line 232
connect(ui->fixedDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), c ore, SLOT(setPresetSkyTime(QDateTime))); connect(ui->fixedDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), c ore, SLOT(setPresetSkyTime(QDateTime)));
ui->enableKeysNavigationCheckBox->setChecked(mvmgr->getFlagEnableMov eKeys() || mvmgr->getFlagEnableZoomKeys()); ui->enableKeysNavigationCheckBox->setChecked(mvmgr->getFlagEnableMov eKeys() || mvmgr->getFlagEnableZoomKeys());
ui->enableMouseNavigationCheckBox->setChecked(mvmgr->getFlagEnableMo useNavigation()); ui->enableMouseNavigationCheckBox->setChecked(mvmgr->getFlagEnableMo useNavigation());
connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvm gr, SLOT(setFlagEnableMoveKeys(bool))); connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvm gr, SLOT(setFlagEnableMoveKeys(bool)));
connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvm gr, SLOT(setFlagEnableZoomKeys(bool))); connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvm gr, SLOT(setFlagEnableZoomKeys(bool)));
connect(ui->enableMouseNavigationCheckBox, SIGNAL(toggled(bool)), mv mgr, SLOT(setFlagEnableMouseNavigation(bool))); connect(ui->enableMouseNavigationCheckBox, SIGNAL(toggled(bool)), mv mgr, SLOT(setFlagEnableMouseNavigation(bool)));
connect(ui->fixedDateTimeCurrentButton, SIGNAL(clicked()), this, SLO T(setFixedDateTimeToCurrent())); connect(ui->fixedDateTimeCurrentButton, SIGNAL(clicked()), this, SLO T(setFixedDateTimeToCurrent()));
connect(ui->editShortcutsPushButton, SIGNAL(clicked()), this, SLOT(s howShortcutsWindow())); connect(ui->editShortcutsPushButton, SIGNAL(clicked()), this, SLOT(s howShortcutsWindow()));
StelLocaleMgr & localeManager = StelApp::getInstance().getLocaleMgr(
);
// Display formats of date
populateDateFormatsList();
int idx = ui->dateFormatsComboBox->findData(localeManager.getDateFor
matStr(), Qt::UserRole, Qt::MatchCaseSensitive);
if (idx==-1)
{
// Use system_deafult as default
idx = ui->dateFormatsComboBox->findData(QVariant("system_dea
fult"), Qt::UserRole, Qt::MatchCaseSensitive);
}
ui->dateFormatsComboBox->setCurrentIndex(idx);
connect(ui->dateFormatsComboBox, SIGNAL(currentIndexChanged(const QS
tring&)), this, SLOT(setDateFormat()));
// Display formats of time
populateTimeFormatsList();
idx = ui->timeFormatsComboBox->findData(localeManager.getTimeFormatS
tr(), Qt::UserRole, Qt::MatchCaseSensitive);
if (idx==-1)
{
// Use system_deafult as default
idx = ui->timeFormatsComboBox->findData(QVariant("system_dea
fult"), Qt::UserRole, Qt::MatchCaseSensitive);
}
ui->timeFormatsComboBox->setCurrentIndex(idx);
connect(ui->timeFormatsComboBox, SIGNAL(currentIndexChanged(const QS
tring&)), this, SLOT(setTimeFormat()));
if (StelApp::getInstance().getSettings()->value("gui/flag_time_jd",
false).toBool())
ui->jdRadioButton->setChecked(true);
else
ui->dtRadioButton->setChecked(true);
connect(ui->jdRadioButton, SIGNAL(clicked(bool)), this, SLOT(setButt
onBarDTFormat()));
connect(ui->dtRadioButton, SIGNAL(clicked(bool)), this, SLOT(setButt
onBarDTFormat()));
// Delta-T // Delta-T
populateDeltaTAlgorithmsList(); populateDeltaTAlgorithmsList();
int idx = ui->deltaTAlgorithmComboBox->findData(core->getCurrentDelt aTAlgorithmKey(), Qt::UserRole, Qt::MatchCaseSensitive); idx = ui->deltaTAlgorithmComboBox->findData(core->getCurrentDeltaTAl gorithmKey(), Qt::UserRole, Qt::MatchCaseSensitive);
if (idx==-1) if (idx==-1)
{ {
// Use Espenak & Meeus (2006) as default // Use Espenak & Meeus (2006) as default
idx = ui->deltaTAlgorithmComboBox->findData(QVariant("Espena kMeeus"), Qt::UserRole, Qt::MatchCaseSensitive); idx = ui->deltaTAlgorithmComboBox->findData(QVariant("Espena kMeeus"), Qt::UserRole, Qt::MatchCaseSensitive);
} }
ui->deltaTAlgorithmComboBox->setCurrentIndex(idx); ui->deltaTAlgorithmComboBox->setCurrentIndex(idx);
connect(ui->deltaTAlgorithmComboBox, SIGNAL(currentIndexChanged(int) ), this, SLOT(setDeltaTAlgorithm(int))); connect(ui->deltaTAlgorithmComboBox, SIGNAL(currentIndexChanged(int) ), this, SLOT(setDeltaTAlgorithm(int)));
connect(ui->pushButtonCustomDeltaTEquationDialog, SIGNAL(clicked()), this, SLOT(showCustomDeltaTEquationDialog())); connect(ui->pushButtonCustomDeltaTEquationDialog, SIGNAL(clicked()), this, SLOT(showCustomDeltaTEquationDialog()));
if (core->getCurrentDeltaTAlgorithm()==StelCore::Custom) if (core->getCurrentDeltaTAlgorithm()==StelCore::Custom)
ui->pushButtonCustomDeltaTEquationDialog->setEnabled(true); ui->pushButtonCustomDeltaTEquationDialog->setEnabled(true);
skipping to change at line 268 skipping to change at line 292
connect(ui->diskViewportCheckbox, SIGNAL(toggled(bool)), this, SLOT( setDiskViewport(bool))); connect(ui->diskViewportCheckbox, SIGNAL(toggled(bool)), this, SLOT( setDiskViewport(bool)));
ui->autoZoomResetsDirectionCheckbox->setChecked(mvmgr->getFlagAutoZo omOutResetsDirection()); ui->autoZoomResetsDirectionCheckbox->setChecked(mvmgr->getFlagAutoZo omOutResetsDirection());
connect(ui->autoZoomResetsDirectionCheckbox, SIGNAL(toggled(bool)), mvmgr, SLOT(setFlagAutoZoomOutResetsDirection(bool))); connect(ui->autoZoomResetsDirectionCheckbox, SIGNAL(toggled(bool)), mvmgr, SLOT(setFlagAutoZoomOutResetsDirection(bool)));
ui->showFlipButtonsCheckbox->setChecked(gui->getFlagShowFlipButtons( )); ui->showFlipButtonsCheckbox->setChecked(gui->getFlagShowFlipButtons( ));
connect(ui->showFlipButtonsCheckbox, SIGNAL(toggled(bool)), gui, SLO T(setFlagShowFlipButtons(bool))); connect(ui->showFlipButtonsCheckbox, SIGNAL(toggled(bool)), gui, SLO T(setFlagShowFlipButtons(bool)));
ui->showNebulaBgButtonCheckbox->setChecked(gui->getFlagShowNebulaBac kgroundButton()); ui->showNebulaBgButtonCheckbox->setChecked(gui->getFlagShowNebulaBac kgroundButton());
connect(ui->showNebulaBgButtonCheckbox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowNebulaBackgroundButton(bool))); connect(ui->showNebulaBgButtonCheckbox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowNebulaBackgroundButton(bool)));
ui->showToastSurveyButtonCheckbox->setChecked(gui->getFlagShowToastS
urveyButton());
connect(ui->showToastSurveyButtonCheckbox, SIGNAL(toggled(bool)), gu
i, SLOT(setFlagShowToastSurveyButton(bool)));
ui->showBookmarksButtonCheckBox->setChecked(gui->getFlagShowBookmark
sButton());
connect(ui->showBookmarksButtonCheckBox, SIGNAL(toggled(bool)), gui,
SLOT(setFlagShowBookmarksButton(bool)));
ui->decimalDegreeCheckBox->setChecked(StelApp::getInstance().getFlag ShowDecimalDegrees()); ui->decimalDegreeCheckBox->setChecked(StelApp::getInstance().getFlag ShowDecimalDegrees());
connect(ui->decimalDegreeCheckBox, SIGNAL(toggled(bool)), gui, SLOT( setFlagShowDecimalDegrees(bool))); connect(ui->decimalDegreeCheckBox, SIGNAL(toggled(bool)), gui, SLOT( setFlagShowDecimalDegrees(bool)));
ui->azimuthFromSouthcheckBox->setChecked(StelApp::getInstance().getF lagSouthAzimuthUsage()); ui->azimuthFromSouthcheckBox->setChecked(StelApp::getInstance().getF lagSouthAzimuthUsage());
connect(ui->azimuthFromSouthcheckBox, SIGNAL(toggled(bool)), this, S LOT(updateStartPointForAzimuth(bool))); connect(ui->azimuthFromSouthcheckBox, SIGNAL(toggled(bool)), this, S LOT(updateStartPointForAzimuth(bool)));
ui->mouseTimeoutCheckbox->setChecked(StelMainView::getInstance().get FlagCursorTimeout()); ui->mouseTimeoutCheckbox->setChecked(StelMainView::getInstance().get FlagCursorTimeout());
ui->mouseTimeoutSpinBox->setValue(StelMainView::getInstance().getCur sorTimeout()); ui->mouseTimeoutSpinBox->setValue(StelMainView::getInstance().getCur sorTimeout());
connect(ui->mouseTimeoutCheckbox, SIGNAL(clicked()), this, SLOT(curs orTimeOutChanged())); connect(ui->mouseTimeoutCheckbox, SIGNAL(clicked()), this, SLOT(curs orTimeOutChanged()));
connect(ui->mouseTimeoutCheckbox, SIGNAL(toggled(bool)), this, SLOT( cursorTimeOutChanged())); connect(ui->mouseTimeoutCheckbox, SIGNAL(toggled(bool)), this, SLOT( cursorTimeOutChanged()));
connect(ui->mouseTimeoutSpinBox, SIGNAL(valueChanged(double)), this, SLOT(cursorTimeOutChanged(double))); connect(ui->mouseTimeoutSpinBox, SIGNAL(valueChanged(double)), this, SLOT(cursorTimeOutChanged(double)));
skipping to change at line 364 skipping to change at line 394
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::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);
StelMainView::getInstance().initTitleI18n(); StelMainView::getInstance().initTitleI18n();
} }
void ConfigurationDialog::selectSkyLanguage(const QString& langName) void ConfigurationDialog::selectSkyLanguage(const QString& langName)
{ {
QString code = StelTranslator::nativeNameToIso639_1Code(langName); QString code = StelTranslator::nativeNameToIso639_1Code(langName);
// StelApp::getInstance().getLocaleMgr().setAppLanguage(code);
StelApp::getInstance().getLocaleMgr().setSkyLanguage(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());
StelApp::getInstance().getCore()->setPresetSkyTime(ui->fixedDateTime Edit->dateTime()); StelApp::getInstance().getCore()->setPresetSkyTime(ui->fixedDateTime Edit->dateTime());
} }
void ConfigurationDialog::setButtonBarDTFormat()
{
if (ui->jdRadioButton->isChecked())
gui->getButtonBar()->setFlagTimeJd(true);
else
gui->getButtonBar()->setFlagTimeJd(false);
}
void ConfigurationDialog::showShortcutsWindow() void ConfigurationDialog::showShortcutsWindow()
{ {
StelAction* action = StelApp::getInstance().getStelActionManager()-> findAction("actionShow_Shortcuts_Window_Global"); StelAction* action = StelApp::getInstance().getStelActionManager()-> findAction("actionShow_Shortcuts_Window_Global");
if (action) if (action)
action->setChecked(true); action->setChecked(true);
} }
void ConfigurationDialog::setDiskViewport(bool b) void ConfigurationDialog::setDiskViewport(bool b)
{ {
if (b) if (b)
skipping to change at line 440 skipping to change at line 475
} }
void ConfigurationDialog::setBriefSelectedInfo(void) void ConfigurationDialog::setBriefSelectedInfo(void)
{ {
gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::Shor tInfo)); gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::Shor tInfo));
updateSelectedInfoCheckBoxes(); updateSelectedInfoCheckBoxes();
} }
void ConfigurationDialog::setSelectedInfoFromCheckBoxes() void ConfigurationDialog::setSelectedInfoFromCheckBoxes()
{ {
// As this signal will be called when a checbox is toggled, // As this signal will be called when a checkbox is toggled,
// change the general mode to Custom. // change the general mode to Custom.
if (!ui->customSelectedInfoRadio->isChecked()) if (!ui->customSelectedInfoRadio->isChecked())
ui->customSelectedInfoRadio->setChecked(true); ui->customSelectedInfoRadio->setChecked(true);
StelObject::InfoStringGroup flags(0); StelObject::InfoStringGroup flags(0);
if (ui->checkBoxName->isChecked()) if (ui->checkBoxName->isChecked())
flags |= StelObject::Name; flags |= StelObject::Name;
if (ui->checkBoxCatalogNumbers->isChecked()) if (ui->checkBoxCatalogNumbers->isChecked())
flags |= StelObject::CatalogNumber; flags |= StelObject::CatalogNumber;
skipping to change at line 471 skipping to change at line 506
if (ui->checkBoxAltAz->isChecked()) if (ui->checkBoxAltAz->isChecked())
flags |= StelObject::AltAzi; flags |= StelObject::AltAzi;
if (ui->checkBoxDistance->isChecked()) if (ui->checkBoxDistance->isChecked())
flags |= StelObject::Distance; flags |= StelObject::Distance;
if (ui->checkBoxSize->isChecked()) if (ui->checkBoxSize->isChecked())
flags |= StelObject::Size; flags |= StelObject::Size;
if (ui->checkBoxExtra->isChecked()) if (ui->checkBoxExtra->isChecked())
flags |= StelObject::Extra; flags |= StelObject::Extra;
if (ui->checkBoxGalacticCoordinates->isChecked()) if (ui->checkBoxGalacticCoordinates->isChecked())
flags |= StelObject::GalacticCoord; flags |= StelObject::GalacticCoord;
if (ui->checkBoxSupergalacticCoordinates->isChecked())
flags |= StelObject::SupergalacticCoord;
if (ui->checkBoxType->isChecked()) if (ui->checkBoxType->isChecked())
flags |= StelObject::ObjectType; flags |= StelObject::ObjectType;
if (ui->checkBoxEclipticCoords->isChecked()) if (ui->checkBoxEclipticCoordsJ2000->isChecked())
flags |= StelObject::EclipticCoord; flags |= StelObject::EclipticCoordJ2000;
if (ui->checkBoxEclipticCoordsOfDate->isChecked())
flags |= StelObject::EclipticCoordOfDate;
if (ui->checkBoxConstellation->isChecked())
flags |= StelObject::IAUConstellation;
gui->setInfoTextFilters(flags); gui->setInfoTextFilters(flags);
} }
void ConfigurationDialog::updateStartPointForAzimuth(bool b) void ConfigurationDialog::updateStartPointForAzimuth(bool b)
{ {
StelApp::getInstance().setFlagSouthAzimuthUsage(b); StelApp::getInstance().setFlagSouthAzimuthUsage(b);
} }
void ConfigurationDialog::cursorTimeOutChanged() void ConfigurationDialog::cursorTimeOutChanged()
skipping to change at line 539 skipping to change at line 580
NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr); NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
Q_ASSERT(nmgr); Q_ASSERT(nmgr);
StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementMgr); StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementMgr);
Q_ASSERT(mvmgr); Q_ASSERT(mvmgr);
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
const StelProjectorP proj = core->getProjection(StelCore::FrameJ2000 ); const StelProjectorP proj = core->getProjection(StelCore::FrameJ2000 );
Q_ASSERT(proj); Q_ASSERT(proj);
// view dialog / sky tab settings // view dialog / sky tab settings
conf->setValue("stars/absolute_scale", propMgr->getStel conf->setValue("stars/absolute_scale", propMgr->get
PropertyValue("StelSkyDrawer.absoluteStarScale").toFloat()); StelPropertyValue("StelSkyDrawer.absoluteStarScale").toFloat());
conf->setValue("stars/relative_scale", propMgr->getStel conf->setValue("stars/relative_scale", propMgr->get
PropertyValue("StelSkyDrawer.relativeStarScale").toFloat()); StelPropertyValue("StelSkyDrawer.relativeStarScale").toFloat());
conf->setValue("stars/flag_star_twinkle", propMgr->getStel conf->setValue("stars/flag_star_twinkle", propMgr->get
PropertyValue("StelSkyDrawer.flagTwinkle").toFloat()); StelPropertyValue("StelSkyDrawer.flagTwinkle").toFloat());
conf->setValue("stars/star_twinkle_amount", propMgr->getStel conf->setValue("stars/star_twinkle_amount", propMgr->get
PropertyValue("StelSkyDrawer.twinkleAmount").toFloat()); StelPropertyValue("StelSkyDrawer.twinkleAmount").toFloat());
conf->setValue("astro/flag_star_magnitude_limit", propMgr->getStel conf->setValue("astro/flag_star_magnitude_limit", propMgr->get
PropertyValue("StelSkyDrawer.flagStarMagnitudeLimit").toBool()); StelPropertyValue("StelSkyDrawer.flagStarMagnitudeLimit").toBool());
conf->setValue("astro/star_magnitude_limit", propMgr->getStel conf->setValue("astro/star_magnitude_limit", propMgr->get
PropertyValue("StelSkyDrawer.customStarMagLimit").toFloat()); StelPropertyValue("StelSkyDrawer.customStarMagLimit").toFloat());
conf->setValue("astro/flag_planet_magnitude_limit", propMgr->getStel conf->setValue("astro/flag_planet_magnitude_limit", propMgr->get
PropertyValue("StelSkyDrawer.flagPlanetMagnitudeLimit").toBool()); StelPropertyValue("StelSkyDrawer.flagPlanetMagnitudeLimit").toBool());
conf->setValue("astro/planet_magnitude_limit", propMgr->getStel conf->setValue("astro/planet_magnitude_limit", propMgr->get
PropertyValue("StelSkyDrawer.customPlanetMagLimit").toFloat()); StelPropertyValue("StelSkyDrawer.customPlanetMagLimit").toFloat());
conf->setValue("astro/flag_nebula_magnitude_limit", propMgr->getStel conf->setValue("astro/flag_nebula_magnitude_limit", propMgr->get
PropertyValue("StelSkyDrawer.flagNebulaMagnitudeLimit").toBool()); StelPropertyValue("StelSkyDrawer.flagNebulaMagnitudeLimit").toBool());
conf->setValue("astro/nebula_magnitude_limit", propMgr->getStel conf->setValue("astro/nebula_magnitude_limit", propMgr->get
PropertyValue("StelSkyDrawer.customNebulaMagLimit").toFloat()); StelPropertyValue("StelSkyDrawer.customNebulaMagLimit").toFloat());
conf->setValue("viewing/use_luminance_adaptation", propMgr->getStel conf->setValue("viewing/use_luminance_adaptation", propMgr->get
PropertyValue("StelSkyDrawer.flagLuminanceAdaptation").toBool()); StelPropertyValue("StelSkyDrawer.flagLuminanceAdaptation").toBool());
conf->setValue("astro/flag_planets", propMgr->getStel conf->setValue("astro/flag_planets", propMgr->get
PropertyValue("SolarSystem.planetsDisplayed").toBool()); StelPropertyValue("SolarSystem.planetsDisplayed").toBool());
conf->setValue("astro/flag_planets_hints", propMgr->getStel conf->setValue("astro/flag_planets_hints", propMgr->get
PropertyValue("SolarSystem.flagHints").toBool()); StelPropertyValue("SolarSystem.flagHints").toBool());
conf->setValue("astro/flag_planets_orbits", propMgr->getStel conf->setValue("astro/flag_planets_orbits", propMgr->get
PropertyValue("SolarSystem.flagOrbits").toBool()); StelPropertyValue("SolarSystem.flagOrbits").toBool());
conf->setValue("viewing/flag_isolated_trails", propMgr->getStel conf->setValue("viewing/flag_isolated_trails", propMgr->get
PropertyValue("SolarSystem.flagIsolatedTrails").toBool()); StelPropertyValue("SolarSystem.flagIsolatedTrails").toBool());
conf->setValue("viewing/flag_isolated_orbits", propMgr->getStel conf->setValue("viewing/flag_isolated_orbits", propMgr->get
PropertyValue("SolarSystem.flagIsolatedOrbits").toBool()); StelPropertyValue("SolarSystem.flagIsolatedOrbits").toBool());
conf->setValue("astro/flag_light_travel_time", propMgr->getStel conf->setValue("astro/flag_light_travel_time", propMgr->get
PropertyValue("SolarSystem.flagLightTravelTime").toBool()); StelPropertyValue("SolarSystem.flagLightTravelTime").toBool());
conf->setValue("viewing/flag_moon_scaled", propMgr->getStel conf->setValue("viewing/flag_moon_scaled", propMgr->get
PropertyValue("SolarSystem.flagMoonScale").toBool()); StelPropertyValue("SolarSystem.flagMoonScale").toBool());
conf->setValue("viewing/moon_scale", propMgr->getStel conf->setValue("viewing/moon_scale", propMgr->get
PropertyValue("SolarSystem.moonScale").toDouble()); StelPropertyValue("SolarSystem.moonScale").toDouble());
conf->setValue("astro/meteor_zhr", propMgr->getStel conf->setValue("astro/meteor_zhr", propMgr->get
PropertyValue("SporadicMeteorMgr.zhr").toInt()); StelPropertyValue("SporadicMeteorMgr.zhr").toInt());
conf->setValue("astro/milky_way_intensity", propMgr->getStel conf->setValue("astro/milky_way_intensity", propMgr->get
PropertyValue("MilkyWay.intensity").toDouble()); StelPropertyValue("MilkyWay.intensity").toDouble());
conf->setValue("astro/zodiacal_light_intensity", propMgr->getStel conf->setValue("astro/zodiacal_light_intensity", propMgr->get
PropertyValue("ZodiacalLight.intensity").toDouble()); StelPropertyValue("ZodiacalLight.intensity").toDouble());
conf->setValue("astro/flag_grs_custom", propMgr->getStel conf->setValue("astro/flag_grs_custom", propMgr->get
PropertyValue("SolarSystem.flagCustomGrsSettings").toBool()); StelPropertyValue("SolarSystem.flagCustomGrsSettings").toBool());
conf->setValue("astro/grs_longitude", propMgr->getStel conf->setValue("astro/grs_longitude", propMgr->get
PropertyValue("SolarSystem.customGrsLongitude").toInt()); StelPropertyValue("SolarSystem.customGrsLongitude").toInt());
conf->setValue("astro/grs_drift", propMgr->getStel conf->setValue("astro/grs_drift", propMgr->get
PropertyValue("SolarSystem.customGrsDrift").toDouble()); StelPropertyValue("SolarSystem.customGrsDrift").toDouble());
conf->setValue("astro/grs_jd", propMgr->getStel conf->setValue("astro/grs_jd", propMgr->get
PropertyValue("SolarSystem.customGrsJD").toDouble()); StelPropertyValue("SolarSystem.customGrsJD").toDouble());
conf->setValue("astro/flag_planets_labels", propMgr->getStel conf->setValue("astro/flag_planets_labels", propMgr->get
PropertyValue("SolarSystem.labelsDisplayed").toBool()); StelPropertyValue("SolarSystem.labelsDisplayed").toBool());
conf->setValue("astro/labels_amount", propMgr->getStel conf->setValue("astro/labels_amount", propMgr->get
PropertyValue("SolarSystem.labelsAmount").toDouble()); StelPropertyValue("SolarSystem.labelsAmount").toDouble());
conf->setValue("viewing/flag_planets_native_names", propMgr->getStel conf->setValue("viewing/flag_planets_native_names", propMgr->get
PropertyValue("SolarSystem.flagNativeNames").toBool()); StelPropertyValue("SolarSystem.flagNativeNames").toBool());
// view dialog / markings tab settings // view dialog / markings tab settings
conf->setValue("viewing/flag_azimuthal_grid", propMgr->getSte conf->setValue("viewing/flag_azimuthal_grid", propMgr->get
lPropertyValue("GridLinesMgr.azimuthalGridDisplayed").toBool()); StelPropertyValue("GridLinesMgr.azimuthalGridDisplayed").toBool());
conf->setValue("viewing/flag_equatorial_grid", propMgr->getSte conf->setValue("viewing/flag_equatorial_grid", propMgr->get
lPropertyValue("GridLinesMgr.equatorGridDisplayed").toBool()); StelPropertyValue("GridLinesMgr.equatorGridDisplayed").toBool());
conf->setValue("viewing/flag_equatorial_J2000_grid", propMgr->getSte conf->setValue("viewing/flag_equatorial_J2000_grid", propMgr->get
lPropertyValue("GridLinesMgr.equatorJ2000GridDisplayed").toBool()); StelPropertyValue("GridLinesMgr.equatorJ2000GridDisplayed").toBool());
conf->setValue("viewing/flag_equator_line", propMgr->getSte conf->setValue("viewing/flag_equator_line", propMgr->get
lPropertyValue("GridLinesMgr.equatorLineDisplayed").toBool()); StelPropertyValue("GridLinesMgr.equatorLineDisplayed").toBool());
conf->setValue("viewing/flag_equator_J2000_line", propMgr->getSte conf->setValue("viewing/flag_equator_J2000_line", propMgr->get
lPropertyValue("GridLinesMgr.equatorJ2000LineDisplayed").toBool()); StelPropertyValue("GridLinesMgr.equatorJ2000LineDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_line", propMgr->getSte conf->setValue("viewing/flag_ecliptic_line", propMgr->get
lPropertyValue("GridLinesMgr.eclipticLineDisplayed").toBool()); StelPropertyValue("GridLinesMgr.eclipticLineDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_J2000_line", propMgr->getSte conf->setValue("viewing/flag_ecliptic_J2000_line", propMgr->get
lPropertyValue("GridLinesMgr.eclipticJ2000LineDisplayed").toBool()); StelPropertyValue("GridLinesMgr.eclipticJ2000LineDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_grid", propMgr->getSte conf->setValue("viewing/flag_ecliptic_grid", propMgr->get
lPropertyValue("GridLinesMgr.eclipticGridDisplayed").toBool()); StelPropertyValue("GridLinesMgr.eclipticGridDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_J2000_grid", propMgr->getSte conf->setValue("viewing/flag_ecliptic_J2000_grid", propMgr->get
lPropertyValue("GridLinesMgr.eclipticJ2000GridDisplayed").toBool()); StelPropertyValue("GridLinesMgr.eclipticJ2000GridDisplayed").toBool());
conf->setValue("viewing/flag_meridian_line", propMgr->getSte conf->setValue("viewing/flag_meridian_line", propMgr->get
lPropertyValue("GridLinesMgr.meridianLineDisplayed").toBool()); StelPropertyValue("GridLinesMgr.meridianLineDisplayed").toBool());
conf->setValue("viewing/flag_longitude_line", propMgr->getSte conf->setValue("viewing/flag_longitude_line", propMgr->get
lPropertyValue("GridLinesMgr.longitudeLineDisplayed").toBool()); StelPropertyValue("GridLinesMgr.longitudeLineDisplayed").toBool());
conf->setValue("viewing/flag_horizon_line", propMgr->getSte conf->setValue("viewing/flag_horizon_line", propMgr->get
lPropertyValue("GridLinesMgr.horizonLineDisplayed").toBool()); StelPropertyValue("GridLinesMgr.horizonLineDisplayed").toBool());
conf->setValue("viewing/flag_galactic_grid", propMgr->getSte conf->setValue("viewing/flag_galactic_grid", propMgr->get
lPropertyValue("GridLinesMgr.galacticGridDisplayed").toBool()); StelPropertyValue("GridLinesMgr.galacticGridDisplayed").toBool());
conf->setValue("viewing/flag_galactic_equator_line", propMgr->getSte conf->setValue("viewing/flag_galactic_equator_line", propMgr->get
lPropertyValue("GridLinesMgr.galacticEquatorLineDisplayed").toBool()); StelPropertyValue("GridLinesMgr.galacticEquatorLineDisplayed").toBool());
conf->setValue("viewing/flag_cardinal_points", propMgr->getSte conf->setValue("viewing/flag_cardinal_points", propMgr->get
lPropertyValue("LandscapeMgr.cardinalsPointsDisplayed").toBool()); StelPropertyValue("LandscapeMgr.cardinalsPointsDisplayed").toBool());
conf->setValue("viewing/flag_prime_vertical_line", propMgr->getSte conf->setValue("viewing/flag_prime_vertical_line", propMgr->get
lPropertyValue("GridLinesMgr.primeVerticalLineDisplayed").toBool()); StelPropertyValue("GridLinesMgr.primeVerticalLineDisplayed").toBool());
conf->setValue("viewing/flag_colure_lines", propMgr->getSte conf->setValue("viewing/flag_colure_lines", propMgr->get
lPropertyValue("GridLinesMgr.colureLinesDisplayed").toBool()); StelPropertyValue("GridLinesMgr.colureLinesDisplayed").toBool());
conf->setValue("viewing/flag_precession_circles", propMgr->getSte conf->setValue("viewing/flag_precession_circles", propMgr->get
lPropertyValue("GridLinesMgr.precessionCirclesDisplayed").toBool()); StelPropertyValue("GridLinesMgr.precessionCirclesDisplayed").toBool());
conf->setValue("viewing/flag_circumpolar_circles", propMgr->getSte conf->setValue("viewing/flag_circumpolar_circles", propMgr->get
lPropertyValue("GridLinesMgr.circumpolarCirclesDisplayed").toBool()); StelPropertyValue("GridLinesMgr.circumpolarCirclesDisplayed").toBool());
conf->setValue("viewing/flag_supergalactic_grid", propMgr->get
conf->setValue("viewing/flag_constellation_drawing", propMg StelPropertyValue("GridLinesMgr.supergalacticGridDisplayed").toBool());
r->getStelPropertyValue("ConstellationMgr.linesDisplayed").toBool()); conf->setValue("viewing/flag_supergalactic_equator_line", propMgr->g
conf->setValue("viewing/flag_constellation_name", propMg etStelPropertyValue("GridLinesMgr.supergalacticEquatorLineDisplayed").toBoo
r->getStelPropertyValue("ConstellationMgr.namesDisplayed").toBool()); l());
conf->setValue("viewing/flag_constellation_boundaries", propMg conf->setValue("viewing/flag_celestial_J2000_poles", propMgr->get
r->getStelPropertyValue("ConstellationMgr.boundariesDisplayed").toBool()); StelPropertyValue("GridLinesMgr.celestialJ2000PolesDisplayed").toBool());
conf->setValue("viewing/flag_constellation_art", propMg conf->setValue("viewing/flag_celestial_poles", propMgr->get
r->getStelPropertyValue("ConstellationMgr.artDisplayed").toBool()); StelPropertyValue("GridLinesMgr.celestialPolesDisplayed").toBool());
conf->setValue("viewing/flag_zenith_nadir", propMgr->get
StelPropertyValue("GridLinesMgr.zenithNadirDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_J2000_poles", propMgr->get
StelPropertyValue("GridLinesMgr.eclipticJ2000PolesDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_poles", propMgr->get
StelPropertyValue("GridLinesMgr.eclipticPolesDisplayed").toBool());
conf->setValue("viewing/flag_galactic_poles", propMgr->get
StelPropertyValue("GridLinesMgr.galacticPolesDisplayed").toBool());
conf->setValue("viewing/flag_supergalactic_poles", propMgr->get
StelPropertyValue("GridLinesMgr.supergalacticPolesDisplayed").toBool());
conf->setValue("viewing/flag_equinox_J2000_points", propMgr->get
StelPropertyValue("GridLinesMgr.equinoxJ2000PointsDisplayed").toBool());
conf->setValue("viewing/flag_equinox_points", propMgr->get
StelPropertyValue("GridLinesMgr.equinoxPointsDisplayed").toBool());
conf->setValue("viewing/flag_constellation_drawing", propMgr->get
StelPropertyValue("ConstellationMgr.linesDisplayed").toBool());
conf->setValue("viewing/flag_constellation_name", propMgr->get
StelPropertyValue("ConstellationMgr.namesDisplayed").toBool());
conf->setValue("viewing/flag_constellation_boundaries", propMgr->get
StelPropertyValue("ConstellationMgr.boundariesDisplayed").toBool());
conf->setValue("viewing/flag_constellation_art", propMgr->get
StelPropertyValue("ConstellationMgr.artDisplayed").toBool());
conf->setValue("viewing/flag_constellation_isolate_selected", propMg r->getStelPropertyValue("ConstellationMgr.isolateSelected").toBool()); conf->setValue("viewing/flag_constellation_isolate_selected", propMg r->getStelPropertyValue("ConstellationMgr.isolateSelected").toBool());
conf->setValue("viewing/flag_landscape_autoselection", propMg conf->setValue("viewing/flag_landscape_autoselection", propMgr->get
r->getStelPropertyValue("LandscapeMgr.flagLandscapeAutoSelection").toBool() StelPropertyValue("LandscapeMgr.flagLandscapeAutoSelection").toBool());
); conf->setValue("viewing/flag_light_pollution_database", propMgr->get
conf->setValue("viewing/flag_light_pollution_database", propMg StelPropertyValue("LandscapeMgr.databaseUsage").toBool());
r->getStelPropertyValue("LandscapeMgr.databaseUsage").toBool()); conf->setValue("viewing/flag_atmosphere_auto_enable", propMgr->get
conf->setValue("viewing/flag_atmosphere_auto_enable", propMg StelPropertyValue("LandscapeMgr.flagAtmosphereAutoEnabling").toBool());
r->getStelPropertyValue("LandscapeMgr.flagAtmosphereAutoEnabling").toBool() conf->setValue("viewing/constellation_art_intensity", propMgr->get
); StelPropertyValue("ConstellationMgr.artIntensity").toFloat());
conf->setValue("viewing/constellation_art_intensity", propMg conf->setValue("viewing/constellation_name_style", Constellatio
r->getStelPropertyValue("ConstellationMgr.artIntensity").toFloat()); nMgr::getConstellationDisplayStyleString(static_cast<ConstellationMgr::Cons
conf->setValue("viewing/constellation_name_style", Conste tellationDisplayStyle> (propMgr->getStelPropertyValue("ConstellationMgr.con
llationMgr::getConstellationDisplayStyleString( stellationDisplayStyle").toInt()) ));
static_cast<ConstellationMgr::ConstellationDi conf->setValue("viewing/constellation_line_thickness", propMgr->get
splayStyle> (propMgr->getStelPropertyValue("ConstellationMgr.constellationD StelPropertyValue("ConstellationMgr.constellationLineThickness").toFloat())
isplayStyle").toInt()) )); ;
conf->setValue("viewing/constellation_line_thickness", propMg conf->setValue("viewing/flag_night", StelApp::get
r->getStelPropertyValue("ConstellationMgr.constellationLineThickness").toFl Instance().getVisionModeNight());
oat()); conf->setValue("astro/flag_stars", propMgr->get
conf->setValue("viewing/flag_night", StelApp::getInstance().getVisio StelPropertyValue("StarMgr.flagStarsDisplayed").toBool());
nModeNight()); conf->setValue("astro/flag_star_name", propMgr->get
conf->setValue("astro/flag_stars", propMgr->getStelPropertyValue StelPropertyValue("StarMgr.flagLabelsDisplayed").toBool());
("StarMgr.flagStarsDisplayed").toBool()); conf->setValue("stars/labels_amount", propMgr->get
conf->setValue("astro/flag_star_name", propMgr->getStelPropertyValue StelPropertyValue("StarMgr.labelsAmount").toDouble());
("StarMgr.flagLabelsDisplayed").toBool()); conf->setValue("astro/nebula_hints_amount", nmgr->getHin
conf->setValue("stars/labels_amount", propMgr->getStelPropertyValue tsAmount());
("StarMgr.labelsAmount").toDouble()); conf->setValue("astro/nebula_labels_amount", nmgr->getLab
conf->setValue("astro/nebula_hints_amount", nmgr->getHintsAmount()); elsAmount());
conf->setValue("astro/nebula_labels_amount", nmgr->getLabelsAmount() conf->setValue("astro/flag_nebula_hints_proportional", nmgr->getHin
); tsProportional());
conf->setValue("astro/flag_nebula_hints_proportional", nmgr->getHint conf->setValue("astro/flag_surface_brightness_usage", nmgr->getFla
sProportional()); gSurfaceBrightnessUsage());
conf->setValue("astro/flag_surface_brightness_usage", nmgr->getFlagS conf->setValue("gui/flag_dso_designation_usage", nmgr->getDes
urfaceBrightnessUsage()); ignationUsage());
conf->setValue("gui/flag_dso_designation_usage", nmgr->getDesignatio conf->setValue("astro/flag_nebula_name", nmgr->getFla
nUsage()); gHints());
conf->setValue("astro/flag_nebula_name", nmgr->getFlagHints()); conf->setValue("astro/flag_nebula_display_no_texture", !propMgr->ge
conf->setValue("astro/flag_nebula_display_no_texture", ! propMgr->ge tStelPropertyValue("StelSkyLayerMgr.flagShow").toBool() );
tStelPropertyValue("StelSkyLayerMgr.flagShow").toBool() ); conf->setValue("astro/flag_use_type_filter", nmgr->getFla
conf->setValue("astro/flag_use_type_filter", nmgr->getFlagUseTypeFil gUseTypeFilters());
ters()); conf->setValue("projection/type", core->getCur
conf->setValue("projection/type", core->getCurrentProjectionTypeKey( rentProjectionTypeKey());
)); conf->setValue("astro/flag_nutation", core->getUse
conf->setValue("astro/flag_nutation", core->getUseNutation()); Nutation());
conf->setValue("astro/flag_topocentric_coordinates", core->getUseTop conf->setValue("astro/flag_topocentric_coordinates", core->getUse
ocentricCoordinates()); TopocentricCoordinates());
// view dialog / DSO tag settings // view dialog / DSO tag settings
const Nebula::CatalogGroup& cflags = nmgr->getCatalogFilters(); const Nebula::CatalogGroup& cflags = nmgr->getCatalogFilters();
conf->beginGroup("dso_catalog_filters"); conf->beginGroup("dso_catalog_filters");
conf->setValue("flag_show_ngc", (bool) (cflags & Nebula::CatNGC)); conf->setValue("flag_show_ngc", (bool) (cflags & Nebula::CatNGC));
conf->setValue("flag_show_ic", (bool) (cflags & Nebula::CatIC)); conf->setValue("flag_show_ic", (bool) (cflags & Nebula::CatIC));
conf->setValue("flag_show_m", (bool) (cflags & Nebula::CatM)); conf->setValue("flag_show_m", (bool) (cflags & Nebula::CatM));
conf->setValue("flag_show_c", (bool) (cflags & Nebula::CatC)); conf->setValue("flag_show_c", (bool) (cflags & Nebula::CatC));
conf->setValue("flag_show_b", (bool) (cflags & Nebula::CatB)); conf->setValue("flag_show_b", (bool) (cflags & Nebula::CatB));
skipping to change at line 717 skipping to change at line 768
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));
conf->setValue("flag_show_size", conf->setValue("flag_show_size",
(bool) (flags & StelObject::Size)); (bool) (flags & StelObject::Size));
conf->setValue("flag_show_extra", conf->setValue("flag_show_extra",
(bool) (flags & StelObject::Extra)); (bool) (flags & StelObject::Extra));
conf->setValue("flag_show_galcoord", conf->setValue("flag_show_galcoord",
(bool) (flags & StelObject::GalacticCoord)); (bool) (flags & StelObject::GalacticCoord));
conf->setValue("flag_show_supergalcoord",
(bool) (flags & StelObject::SupergalacticCoor
d));
conf->setValue("flag_show_type", conf->setValue("flag_show_type",
(bool) (flags & StelObject::ObjectType)); (bool) (flags & StelObject::ObjectType));
conf->setValue("flag_show_eclcoord", conf->setValue("flag_show_eclcoordofdate",
(bool) (flags & StelObject::EclipticCoord)); (bool) (flags & StelObject::EclipticCoordOfDa
te));
conf->setValue("flag_show_eclcoordj2000",
(bool) (flags & StelObject::EclipticCoordJ200
0));
conf->setValue("flag_show_constellation",
(bool) (flags & StelObject::IAUConstellation)
);
conf->endGroup(); conf->endGroup();
} }
// toolbar auto-hide status // toolbar auto-hide status
conf->setValue("gui/auto_hide_horizontal_toolbar", gui->getAutoHideH orizontalButtonBar()); conf->setValue("gui/auto_hide_horizontal_toolbar", gui->getAutoHideH orizontalButtonBar());
conf->setValue("gui/auto_hide_vertical_toolbar", gui->getAutoHideVer ticalButtonBar()); conf->setValue("gui/auto_hide_vertical_toolbar", gui->getAutoHideVer ticalButtonBar());
conf->setValue("gui/flag_show_nebulae_background_button", gui->getFl agShowNebulaBackgroundButton()); conf->setValue("gui/flag_show_nebulae_background_button", gui->getFl agShowNebulaBackgroundButton());
conf->setValue("gui/flag_show_toast_survey_button", gui->getFlagShow ToastSurveyButton());
conf->setValue("gui/flag_show_decimal_degrees", StelApp::getInstance ().getFlagShowDecimalDegrees()); conf->setValue("gui/flag_show_decimal_degrees", StelApp::getInstance ().getFlagShowDecimalDegrees());
conf->setValue("gui/flag_use_azimuth_from_south", StelApp::getInstan ce().getFlagSouthAzimuthUsage()); conf->setValue("gui/flag_use_azimuth_from_south", StelApp::getInstan ce().getFlagSouthAzimuthUsage());
conf->setValue("gui/flag_time_jd", gui->getButtonBar()->getFlagTimeJ d());
mvmgr->setInitFov(mvmgr->getCurrentFov()); mvmgr->setInitFov(mvmgr->getCurrentFov());
mvmgr->setInitViewDirectionToCurrent(); mvmgr->setInitViewDirectionToCurrent();
// configuration dialog / navigation tab // configuration dialog / navigation tab
conf->setValue("navigation/flag_enable_zoom_keys", mvmgr->getFlagEna bleZoomKeys()); conf->setValue("navigation/flag_enable_zoom_keys", mvmgr->getFlagEna bleZoomKeys());
conf->setValue("navigation/flag_enable_mouse_navigation", mvmgr->get FlagEnableMouseNavigation()); conf->setValue("navigation/flag_enable_mouse_navigation", mvmgr->get FlagEnableMouseNavigation());
conf->setValue("navigation/flag_enable_move_keys", mvmgr->getFlagEna bleMoveKeys()); conf->setValue("navigation/flag_enable_move_keys", mvmgr->getFlagEna bleMoveKeys());
conf->setValue("navigation/startup_time_mode", core->getStartupTimeM ode()); conf->setValue("navigation/startup_time_mode", core->getStartupTimeM ode());
conf->setValue("navigation/today_time", core->getInitTodayTime()); conf->setValue("navigation/today_time", core->getInitTodayTime());
conf->setValue("navigation/preset_sky_time", core->getPresetSkyTime( )); conf->setValue("navigation/preset_sky_time", core->getPresetSkyTime( ));
conf->setValue("navigation/time_correction_algorithm", core->getCurr entDeltaTAlgorithmKey()); conf->setValue("navigation/time_correction_algorithm", core->getCurr entDeltaTAlgorithmKey());
conf->setValue("navigation/init_fov", mvmgr->getInitFov()); conf->setValue("navigation/init_fov", mvmgr->getInitFov());
if (mvmgr->getMountMode() == StelMovementMgr::MountAltAzimuthal) if (mvmgr->getMountMode() == StelMovementMgr::MountAltAzimuthal)
conf->setValue("navigation/viewing_mode", "horizon"); conf->setValue("navigation/viewing_mode", "horizon");
else else
conf->setValue("navigation/viewing_mode", "equator"); conf->setValue("navigation/viewing_mode", "equator");
StelLocaleMgr & localeManager = StelApp::getInstance().getLocaleMgr(
);
conf->setValue("localization/time_display_format", localeManager.get
TimeFormatStr());
conf->setValue("localization/date_display_format", localeManager.get
DateFormatStr());
// configuration dialog / tools tab // configuration dialog / tools tab
conf->setValue("gui/flag_show_flip_buttons", gui->getFlagShowFlipBut tons()); conf->setValue("gui/flag_show_flip_buttons", gui->getFlagShowFlipBut tons());
conf->setValue("video/viewport_effect", StelApp::getInstance().getVi ewportEffect()); conf->setValue("video/viewport_effect", StelApp::getInstance().getVi ewportEffect());
conf->setValue("projection/viewport", StelProjector::maskTypeToStrin g(proj->getMaskType())); conf->setValue("projection/viewport", StelProjector::maskTypeToStrin g(proj->getMaskType()));
conf->setValue("projection/viewport_center_offset_x", core->getCurre ntStelProjectorParams().viewportCenterOffset[0]); conf->setValue("projection/viewport_center_offset_x", core->getCurre ntStelProjectorParams().viewportCenterOffset[0]);
conf->setValue("projection/viewport_center_offset_y", core->getCurre ntStelProjectorParams().viewportCenterOffset[1]); conf->setValue("projection/viewport_center_offset_y", core->getCurre ntStelProjectorParams().viewportCenterOffset[1]);
conf->setValue("projection/flip_horz", core->getCurrentStelProjector Params().flipHorz); conf->setValue("projection/flip_horz", core->getCurrentStelProjector Params().flipHorz);
conf->setValue("projection/flip_vert", core->getCurrentStelProjector Params().flipVert); conf->setValue("projection/flip_vert", core->getCurrentStelProjector Params().flipVert);
conf->setValue("viewing/flag_gravity_labels", proj->getFlagGravityLa bels()); conf->setValue("viewing/flag_gravity_labels", proj->getFlagGravityLa bels());
conf->setValue("navigation/auto_zoom_out_resets_direction", mvmgr->g etFlagAutoZoomOutResetsDirection()); conf->setValue("navigation/auto_zoom_out_resets_direction", mvmgr->g etFlagAutoZoomOutResetsDirection());
skipping to change at line 973 skipping to change at line 1036
ui->scriptStatusLabel->setText(q_("Running script: [none]")); ui->scriptStatusLabel->setText(q_("Running script: [none]"));
ui->runScriptButton->setEnabled(true); ui->runScriptButton->setEnabled(true);
ui->stopScriptButton->setEnabled(false); ui->stopScriptButton->setEnabled(false);
} }
#endif #endif
void ConfigurationDialog::setFixedDateTimeToCurrent(void) void ConfigurationDialog::setFixedDateTimeToCurrent(void)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
double JD = core->getJD(); double JD = core->getJD();
ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(JD+StelU tils::getGMTShiftFromQT(JD)/24)); ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(JD+core- >getUTCOffset(JD)/24));
ui->fixedTimeRadio->setChecked(true); ui->fixedTimeRadio->setChecked(true);
setStartupTimeMode(); setStartupTimeMode();
} }
void ConfigurationDialog::resetStarCatalogControls() void ConfigurationDialog::resetStarCatalogControls()
{ {
const QVariantList& catalogConfig = GETSTELMODULE(StarMgr)->getCatal ogsDescription(); const QVariantList& catalogConfig = GETSTELMODULE(StarMgr)->getCatal ogsDescription();
nextStarCatalogToDownload.clear(); nextStarCatalogToDownload.clear();
int idx=0; int idx=0;
foreach (const QVariant& catV, catalogConfig) foreach (const QVariant& catV, catalogConfig)
skipping to change at line 1107 skipping to change at line 1170
isDownloadingStarCatalog = true; isDownloadingStarCatalog = true;
updateStarCatalogControlsText(); updateStarCatalogControlsText();
ui->downloadCancelButton->setVisible(true); ui->downloadCancelButton->setVisible(true);
ui->downloadRetryButton->setVisible(false); ui->downloadRetryButton->setVisible(false);
ui->getStarsButton->setVisible(true); ui->getStarsButton->setVisible(true);
ui->getStarsButton->setEnabled(false); ui->getStarsButton->setEnabled(false);
QNetworkRequest req(nextStarCatalogToDownload.value("url").toString( )); QNetworkRequest req(nextStarCatalogToDownload.value("url").toString( ));
req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false); req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);
req.setAttribute(QNetworkRequest::RedirectionTargetAttribute, false) ; req.setAttribute(QNetworkRequest::RedirectionTargetAttribute, false) ;
req.setRawHeader("User-Agent", userAgent.toLatin1()); req.setRawHeader("User-Agent", StelUtils::getUserAgentString().toLat in1());
starCatalogDownloadReply = StelApp::getInstance().getNetworkAccessMa nager()->get(req); starCatalogDownloadReply = StelApp::getInstance().getNetworkAccessMa nager()->get(req);
starCatalogDownloadReply->setReadBufferSize(1024*1024*2); starCatalogDownloadReply->setReadBufferSize(1024*1024*2);
connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(dow nloadFinished())); connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(dow nloadFinished()));
connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply::Networ kError)), this, SLOT(downloadError(QNetworkReply::NetworkError))); connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply::Networ kError)), this, SLOT(downloadError(QNetworkReply::NetworkError)));
progressBar = StelApp::getInstance().addProgressBar(); progressBar = StelApp::getInstance().addProgressBar();
progressBar->setValue(0); progressBar->setValue(0);
progressBar->setRange(0, nextStarCatalogToDownload.value("sizeMb").t oDouble()*1024); progressBar->setRange(0, nextStarCatalogToDownload.value("sizeMb").t oDouble()*1024);
progressBar->setFormat(QString("%1: %p%").arg(nextStarCatalogToDownl oad.value("id").toString())); progressBar->setFormat(QString("%1: %p%").arg(nextStarCatalogToDownl oad.value("id").toString()));
skipping to change at line 1161 skipping to change at line 1224
} }
const QVariant& redirect = starCatalogDownloadReply->attribute(QNetw orkRequest::RedirectionTargetAttribute); const QVariant& redirect = starCatalogDownloadReply->attribute(QNetw orkRequest::RedirectionTargetAttribute);
if (!redirect.isNull()) if (!redirect.isNull())
{ {
// We got a redirection, we need to follow // We got a redirection, we need to follow
starCatalogDownloadReply->deleteLater(); starCatalogDownloadReply->deleteLater();
QNetworkRequest req(redirect.toUrl()); QNetworkRequest req(redirect.toUrl());
req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false); req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);
req.setAttribute(QNetworkRequest::RedirectionTargetAttribute , false); req.setAttribute(QNetworkRequest::RedirectionTargetAttribute , false);
req.setRawHeader("User-Agent", userAgent.toLatin1()); req.setRawHeader("User-Agent", StelUtils::getUserAgentString ().toLatin1());
starCatalogDownloadReply = StelApp::getInstance().getNetwork AccessManager()->get(req); starCatalogDownloadReply = StelApp::getInstance().getNetwork AccessManager()->get(req);
starCatalogDownloadReply->setReadBufferSize(1024*1024*2); starCatalogDownloadReply->setReadBufferSize(1024*1024*2);
connect(starCatalogDownloadReply, SIGNAL(readyRead()), this, SLOT(newStarCatalogData())); connect(starCatalogDownloadReply, SIGNAL(readyRead()), this, SLOT(newStarCatalogData()));
connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(downloadFinished())); connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(downloadFinished()));
connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply ::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError))); connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply ::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError)));
return; return;
} }
Q_ASSERT(starCatalogDownloadReply->bytesAvailable()==0); Q_ASSERT(starCatalogDownloadReply->bytesAvailable()==0);
skipping to change at line 1262 skipping to change at line 1325
ui->checkBoxVisualMag->setChecked(flags & StelObject::Magnitude); ui->checkBoxVisualMag->setChecked(flags & StelObject::Magnitude);
ui->checkBoxAbsoluteMag->setChecked(flags & StelObject::AbsoluteMagn itude); ui->checkBoxAbsoluteMag->setChecked(flags & StelObject::AbsoluteMagn itude);
ui->checkBoxRaDecJ2000->setChecked(flags & StelObject::RaDecJ2000); ui->checkBoxRaDecJ2000->setChecked(flags & StelObject::RaDecJ2000);
ui->checkBoxRaDecOfDate->setChecked(flags & StelObject::RaDecOfDate) ; ui->checkBoxRaDecOfDate->setChecked(flags & StelObject::RaDecOfDate) ;
ui->checkBoxHourAngle->setChecked(flags & StelObject::HourAngle); ui->checkBoxHourAngle->setChecked(flags & StelObject::HourAngle);
ui->checkBoxAltAz->setChecked(flags & StelObject::AltAzi); ui->checkBoxAltAz->setChecked(flags & StelObject::AltAzi);
ui->checkBoxDistance->setChecked(flags & StelObject::Distance); ui->checkBoxDistance->setChecked(flags & StelObject::Distance);
ui->checkBoxSize->setChecked(flags & StelObject::Size); ui->checkBoxSize->setChecked(flags & StelObject::Size);
ui->checkBoxExtra->setChecked(flags & StelObject::Extra); ui->checkBoxExtra->setChecked(flags & StelObject::Extra);
ui->checkBoxGalacticCoordinates->setChecked(flags & StelObject::Gala cticCoord); ui->checkBoxGalacticCoordinates->setChecked(flags & StelObject::Gala cticCoord);
ui->checkBoxSupergalacticCoordinates->setChecked(flags & StelObject: :SupergalacticCoord);
ui->checkBoxType->setChecked(flags & StelObject::ObjectType); ui->checkBoxType->setChecked(flags & StelObject::ObjectType);
ui->checkBoxEclipticCoords->setChecked(flags & StelObject::EclipticC ui->checkBoxEclipticCoordsJ2000->setChecked(flags & StelObject::Ecli
oord); pticCoordJ2000);
ui->checkBoxEclipticCoordsOfDate->setChecked(flags & StelObject::Ecl
ipticCoordOfDate);
ui->checkBoxConstellation->setChecked(flags & StelObject::IAUConstel
lation);
} }
void ConfigurationDialog::updateTabBarListWidgetWidth() void ConfigurationDialog::updateTabBarListWidgetWidth()
{ {
ui->stackListWidget->setWrapping(false); ui->stackListWidget->setWrapping(false);
// Update list item sizes after translation // Update list item sizes after translation
ui->stackListWidget->adjustSize(); ui->stackListWidget->adjustSize();
QAbstractItemModel* model = ui->stackListWidget->model(); QAbstractItemModel* model = ui->stackListWidget->model();
skipping to change at line 1307 skipping to change at line 1373
ui->stackListWidget->setMinimumWidth(width); ui->stackListWidget->setMinimumWidth(width);
} }
void ConfigurationDialog::populateDeltaTAlgorithmsList() void ConfigurationDialog::populateDeltaTAlgorithmsList()
{ {
Q_ASSERT(ui->deltaTAlgorithmComboBox); Q_ASSERT(ui->deltaTAlgorithmComboBox);
// TRANSLATORS: Full phrase is "Algorithm of DeltaT" // TRANSLATORS: Full phrase is "Algorithm of DeltaT"
ui->deltaTLabel->setText(QString("%1 %2T:").arg(q_("Algorithm of")). arg(QChar(0x0394))); ui->deltaTLabel->setText(QString("%1 %2T:").arg(q_("Algorithm of")). arg(QChar(0x0394)));
ui->pushButtonCustomDeltaTEquationDialog->setFixedHeight(ui->deltaTA
lgorithmComboBox->height());
QComboBox* algorithms = ui->deltaTAlgorithmComboBox; QComboBox* algorithms = ui->deltaTAlgorithmComboBox;
//Save the current selection to be restored later //Save the current selection to be restored later
algorithms->blockSignals(true); algorithms->blockSignals(true);
int index = algorithms->currentIndex(); int index = algorithms->currentIndex();
QVariant selectedAlgorithmId = algorithms->itemData(index); QVariant selectedAlgorithmId = algorithms->itemData(index);
algorithms->clear(); algorithms->clear();
//For each algorithm, display the localized name and store the key a s user //For each algorithm, display the localized name and store the key a s user
//data. Unfortunately, there's no other way to do this than with a c ycle. //data. Unfortunately, there's no other way to do this than with a c ycle.
algorithms->addItem(q_("Without correction"), "WithoutCorrection"); algorithms->addItem(q_("Without correction"), "WithoutCorrection");
skipping to change at line 1386 skipping to change at line 1454
ui->deltaTAlgorithmDescription->setHtml(StelApp::getInstance().getCo re()->getCurrentDeltaTAlgorithmDescription()); ui->deltaTAlgorithmDescription->setHtml(StelApp::getInstance().getCo re()->getCurrentDeltaTAlgorithmDescription());
} }
void ConfigurationDialog::showCustomDeltaTEquationDialog() void ConfigurationDialog::showCustomDeltaTEquationDialog()
{ {
if (customDeltaTEquationDialog == NULL) if (customDeltaTEquationDialog == NULL)
customDeltaTEquationDialog = new CustomDeltaTEquationDialog( ); customDeltaTEquationDialog = new CustomDeltaTEquationDialog( );
customDeltaTEquationDialog->setVisible(true); customDeltaTEquationDialog->setVisible(true);
} }
void ConfigurationDialog::populateDateFormatsList()
{
Q_ASSERT(ui->dateFormatsComboBox);
QComboBox* dfmts = ui->dateFormatsComboBox;
//Save the current selection to be restored later
dfmts->blockSignals(true);
int index = dfmts->currentIndex();
QVariant selectedDateFormat = dfmts->itemData(index);
dfmts->clear();
//For each format, display the localized name and store the key as u
ser
//data. Unfortunately, there's no other way to do this than with a c
ycle.
dfmts->addItem(q_("System default"), "system_default");
dfmts->addItem(q_("yyyy-mm-dd (ISO 8601)"), "yyyymmdd");
dfmts->addItem(q_("dd-mm-yyyy"), "ddmmyyyy");
dfmts->addItem(q_("mm-dd-yyyy"), "mmddyyyy");
//Restore the selection
index = dfmts->findData(selectedDateFormat, Qt::UserRole, Qt::MatchC
aseSensitive);
dfmts->setCurrentIndex(index);
dfmts->blockSignals(false);
}
void ConfigurationDialog::setDateFormat()
{
QString selectedFormat = ui->dateFormatsComboBox->itemData(ui->dateF
ormatsComboBox->currentIndex()).toString();
StelLocaleMgr & localeManager = StelApp::getInstance().getLocaleMgr(
);
if (selectedFormat == localeManager.getDateFormatStr())
return;
localeManager.setDateFormatStr(selectedFormat);
}
void ConfigurationDialog::populateTimeFormatsList()
{
Q_ASSERT(ui->timeFormatsComboBox);
QComboBox* tfmts = ui->timeFormatsComboBox;
//Save the current selection to be restored later
tfmts->blockSignals(true);
int index = tfmts->currentIndex();
QVariant selectedTimeFormat = tfmts->itemData(index);
tfmts->clear();
//For each format, display the localized name and store the key as u
ser
//data. Unfortunately, there's no other way to do this than with a c
ycle.
tfmts->addItem(q_("System default"), "system_default");
tfmts->addItem(q_("12-hour format"), "12h");
tfmts->addItem(q_("24-hour format"), "24h");
//Restore the selection
index = tfmts->findData(selectedTimeFormat, Qt::UserRole, Qt::MatchC
aseSensitive);
tfmts->setCurrentIndex(index);
tfmts->blockSignals(false);
}
void ConfigurationDialog::setTimeFormat()
{
QString selectedFormat = ui->timeFormatsComboBox->itemData(ui->timeF
ormatsComboBox->currentIndex()).toString();
StelLocaleMgr & localeManager = StelApp::getInstance().getLocaleMgr(
);
if (selectedFormat == localeManager.getTimeFormatStr())
return;
localeManager.setTimeFormatStr(selectedFormat);
}
 End of changes. 29 change blocks. 
178 lines changed or deleted 282 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/