ConfigurationDialog.cpp   ConfigurationDialog.cpp 
skipping to change at line 36 skipping to change at line 36
#include "ui_configurationDialog.h" #include "ui_configurationDialog.h"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelObjectMgr.hpp" #include "StelObjectMgr.hpp"
#include "StelActionMgr.hpp" #include "StelActionMgr.hpp"
#include "StelProgressController.hpp" #include "StelProgressController.hpp"
#include "StelUtils.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelSkyDrawer.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelGuiItems.hpp" #include "StelGuiItems.hpp"
#include "StelLocation.hpp" #include "StelLocation.hpp"
#include "LandscapeMgr.hpp"
#include "StelSkyCultureMgr.hpp" #include "StelSkyCultureMgr.hpp"
#include "StelSkyLayerMgr.hpp" #include "StelSkyLayerMgr.hpp"
#include "SolarSystem.hpp"
#include "SporadicMeteorMgr.hpp"
#include "ConstellationMgr.hpp" #include "ConstellationMgr.hpp"
#include "StarMgr.hpp" #include "StarMgr.hpp"
#include "NebulaMgr.hpp" #include "NebulaMgr.hpp"
#include "GridLinesMgr.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 "EphemWrapper.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)
: StelDialog(parent) : StelDialog(parent)
, nextStarCatalogToDownloadIndex(0) , nextStarCatalogToDownloadIndex(0)
, starCatalogsCount(0) , starCatalogsCount(0)
, starCatalogDownloadReply(NULL) , starCatalogDownloadReply(NULL)
, currentDownloadFile(NULL) , currentDownloadFile(NULL)
, progressBar(NULL) , progressBar(NULL)
, gui(agui) , gui(agui)
{ {
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 // Get info about operating system
QString platform = StelUtils::getOperatingSystemInfo(); QString platform = StelUtils::getOperatingSystemInfo();
if (platform.contains("Linux")) if (platform.contains("Linux"))
platform = "Linux"; platform = "Linux";
if (platform.contains("FreeBSD")) if (platform.contains("FreeBSD"))
skipping to change at line 151 skipping to change at line 147
StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementMgr); StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementMgr);
ui->setupUi(dialog); ui->setupUi(dialog);
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate())); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate()));
// Set the main tab activated by default // Set the main tab activated by default
ui->configurationStackedWidget->setCurrentIndex(0); ui->configurationStackedWidget->setCurrentIndex(0);
ui->stackListWidget->setCurrentRow(0); ui->stackListWidget->setCurrentRow(0);
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMove dTo(QPoint)));
// 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: // Do the same for sky language:
cb = ui->skycultureLanguageComboBox; cb = ui->skycultureLanguageComboBox;
cb->clear(); cb->clear();
cb->addItems(StelTranslator::globalTranslator->getAvailableLanguages NamesNative(StelFileMgr::getLocaleDir())); cb->addItems(StelTranslator::globalTranslator->getAvailableLanguages NamesNative(StelFileMgr::getLocaleDir(), "skycultures"));
cb->model()->sort(0); cb->model()->sort(0);
updateCurrentSkyLanguage(); updateCurrentSkyLanguage();
connect(cb->lineEdit(), SIGNAL(editingFinished()), this, SLOT(update CurrentSkyLanguage())); connect(cb->lineEdit(), SIGNAL(editingFinished()), this, SLOT(update CurrentSkyLanguage()));
connect(cb, SIGNAL(currentIndexChanged(const QString&)), this, SLOT( selectSkyLanguage(const QString&))); connect(cb, SIGNAL(currentIndexChanged(const QString&)), this, SLOT( selectSkyLanguage(const QString&)));
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();
connect(ui->de430checkBox, SIGNAL(clicked()), this, SLOT(de430Button
Clicked()));
connect(ui->de431checkBox, SIGNAL(clicked()), this, SLOT(de431Button
Clicked()));
resetEphemControls();
ui->nutationCheckBox->setChecked(core->getUseNutation()); ui->nutationCheckBox->setChecked(core->getUseNutation());
connect(ui->nutationCheckBox, SIGNAL(toggled(bool)), core, SLOT(setU seNutation(bool))); connect(ui->nutationCheckBox, SIGNAL(toggled(bool)), core, SLOT(setU seNutation(bool)));
ui->topocentricCheckBox->setChecked(core->getUseTopocentricCoordinat es()); ui->topocentricCheckBox->setChecked(core->getUseTopocentricCoordinat es());
connect(ui->topocentricCheckBox, SIGNAL(toggled(bool)), core, SLOT(s etUseTopocentricCoordinates(bool))); connect(ui->topocentricCheckBox, SIGNAL(toggled(bool)), core, SLOT(s etUseTopocentricCoordinates(bool)));
#ifdef Q_OS_WIN #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 #endif
skipping to change at line 250 skipping to change at line 252
// 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);
// Tools tab // Tools tab
ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr);
Q_ASSERT(cmgr);
ui->sphericMirrorCheckbox->setChecked(StelApp::getInstance().getView portEffect() == "sphericMirrorDistorter"); ui->sphericMirrorCheckbox->setChecked(StelApp::getInstance().getView portEffect() == "sphericMirrorDistorter");
connect(ui->sphericMirrorCheckbox, SIGNAL(toggled(bool)), this, SLOT (setSphericMirror(bool))); connect(ui->sphericMirrorCheckbox, SIGNAL(toggled(bool)), this, SLOT (setSphericMirror(bool)));
ui->gravityLabelCheckbox->setChecked(proj->getFlagGravityLabels()); ui->gravityLabelCheckbox->setChecked(proj->getFlagGravityLabels());
connect(ui->gravityLabelCheckbox, SIGNAL(toggled(bool)), StelApp::ge tInstance().getCore(), SLOT(setFlagGravityLabels(bool))); connect(ui->gravityLabelCheckbox, SIGNAL(toggled(bool)), StelApp::ge tInstance().getCore(), SLOT(setFlagGravityLabels(bool)));
ui->selectSingleConstellationButton->setChecked(cmgr->getFlagIsolate connectBoolProperty(ui->selectSingleConstellationButton, "Constellat
Selected()); ionMgr.isolateSelected");
connect(ui->selectSingleConstellationButton, SIGNAL(toggled(bool)),
cmgr, SLOT(setFlagIsolateSelected(bool)));
ui->diskViewportCheckbox->setChecked(proj->getMaskType() == StelProj ector::MaskDisk); ui->diskViewportCheckbox->setChecked(proj->getMaskType() == StelProj ector::MaskDisk);
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->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 lagOldAzimuthUsage()); 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)));
connect(ui->setViewingOptionAsDefaultPushButton, SIGNAL(clicked()), this, SLOT(saveCurrentViewOptions())); connect(ui->setViewingOptionAsDefaultPushButton, SIGNAL(clicked()), this, SLOT(saveCurrentViewOptions()));
connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(set DefaultViewOptions())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(set DefaultViewOptions()));
ui->screenshotDirEdit->setText(StelFileMgr::getScreenshotDir()); ui->screenshotDirEdit->setText(StelFileMgr::getScreenshotDir());
connect(ui->screenshotDirEdit, SIGNAL(textChanged(QString)), this, S LOT(selectScreenshotDir(QString))); connect(ui->screenshotDirEdit, SIGNAL(textChanged(QString)), this, S LOT(selectScreenshotDir(QString)));
connect(ui->screenshotBrowseButton, SIGNAL(clicked()), this, SLOT(br owseForScreenshotDir())); connect(ui->screenshotBrowseButton, SIGNAL(clicked()), this, SLOT(br owseForScreenshotDir()));
ui->invertScreenShotColorsCheckBox->setChecked(StelMainView::getInst ance().getFlagInvertScreenShotColors()); ui->invertScreenShotColorsCheckBox->setChecked(StelMainView::getInst ance().getFlagInvertScreenShotColors());
connect(ui->invertScreenShotColorsCheckBox, SIGNAL(toggled(bool)), & StelMainView::getInstance(), SLOT(setFlagInvertScreenShotColors(bool))); connect(ui->invertScreenShotColorsCheckBox, SIGNAL(toggled(bool)), & StelMainView::getInstance(), SLOT(setFlagInvertScreenShotColors(bool)));
LandscapeMgr *lmgr = GETSTELMODULE(LandscapeMgr); connectBoolProperty(ui->autoEnableAtmosphereCheckBox, "LandscapeMgr.
ui->autoEnableAtmosphereCheckBox->setChecked(lmgr->getFlagAtmosphere flagAtmosphereAutoEnabling");
AutoEnable()); connectBoolProperty(ui->autoChangeLandscapesCheckBox, "LandscapeMgr.
connect(ui->autoEnableAtmosphereCheckBox, SIGNAL(toggled(bool)), lmg flagLandscapeAutoSelection");
r, SLOT(setFlagAtmosphereAutoEnable(bool)));
// script tab controls // script tab controls
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
StelScriptMgr& scriptMgr = StelApp::getInstance().getScriptMgr(); StelScriptMgr& scriptMgr = StelApp::getInstance().getScriptMgr();
connect(ui->scriptListWidget, SIGNAL(currentTextChanged(const QStrin g&)), this, SLOT(scriptSelectionChanged(const QString&))); connect(ui->scriptListWidget, SIGNAL(currentTextChanged(const QStrin g&)), this, SLOT(scriptSelectionChanged(const QString&)));
connect(ui->runScriptButton, SIGNAL(clicked()), this, SLOT(runScript Clicked())); connect(ui->runScriptButton, SIGNAL(clicked()), this, SLOT(runScript Clicked()));
connect(ui->stopScriptButton, SIGNAL(clicked()), this, SLOT(stopScri ptClicked())); connect(ui->stopScriptButton, SIGNAL(clicked()), this, SLOT(stopScri ptClicked()));
if (scriptMgr.scriptIsRunning()) if (scriptMgr.scriptIsRunning())
aScriptIsRunning(); aScriptIsRunning();
else else
skipping to change at line 483 skipping to change at line 481
if (ui->checkBoxType->isChecked()) if (ui->checkBoxType->isChecked())
flags |= StelObject::ObjectType; flags |= StelObject::ObjectType;
if (ui->checkBoxEclipticCoords->isChecked()) if (ui->checkBoxEclipticCoords->isChecked())
flags |= StelObject::EclipticCoord; flags |= StelObject::EclipticCoord;
gui->setInfoTextFilters(flags); gui->setInfoTextFilters(flags);
} }
void ConfigurationDialog::updateStartPointForAzimuth(bool b) void ConfigurationDialog::updateStartPointForAzimuth(bool b)
{ {
StelApp::getInstance().setFlagOldAzimuthUsage(b); StelApp::getInstance().setFlagSouthAzimuthUsage(b);
} }
void ConfigurationDialog::cursorTimeOutChanged() void ConfigurationDialog::cursorTimeOutChanged()
{ {
StelMainView::getInstance().setFlagCursorTimeout(ui->mouseTimeoutChe ckbox->isChecked()); StelMainView::getInstance().setFlagCursorTimeout(ui->mouseTimeoutChe ckbox->isChecked());
StelMainView::getInstance().setCursorTimeout(ui->mouseTimeoutSpinBox ->value()); StelMainView::getInstance().setCursorTimeout(ui->mouseTimeoutSpinBox ->value());
} }
void ConfigurationDialog::browseForScreenshotDir() void ConfigurationDialog::browseForScreenshotDir()
{ {
skipping to change at line 527 skipping to change at line 525
} }
} }
// Save the current viewing option including landscape, location and sky cu lture // Save the current viewing option including landscape, location and sky cu lture
// This doesn't include the current viewing direction, time and FOV since t hose have specific controls // This doesn't include the current viewing direction, time and FOV since t hose have specific controls
void ConfigurationDialog::saveCurrentViewOptions() void ConfigurationDialog::saveCurrentViewOptions()
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr); // TBD: store more properties directly, avoid to query all modules.
Q_ASSERT(lmgr); StelPropertyMgr* propMgr=StelApp::getInstance().getStelPropertyManag
SolarSystem* ssmgr = GETSTELMODULE(SolarSystem); er();
Q_ASSERT(ssmgr); Q_ASSERT(propMgr);
SporadicMeteorMgr* mmgr = GETSTELMODULE(SporadicMeteorMgr);
Q_ASSERT(mmgr);
StelSkyDrawer* skyd = StelApp::getInstance().getCore()->getSkyDrawer
();
Q_ASSERT(skyd);
ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr);
Q_ASSERT(cmgr);
StarMgr* smgr = GETSTELMODULE(StarMgr);
Q_ASSERT(smgr);
NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr); NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
Q_ASSERT(nmgr); Q_ASSERT(nmgr);
GridLinesMgr* glmgr = GETSTELMODULE(GridLinesMgr);
Q_ASSERT(glmgr);
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", skyd->getAbsoluteStarScale()) conf->setValue("stars/absolute_scale", propMgr->getStel
; PropertyValue("StelSkyDrawer.absoluteStarScale").toFloat());
conf->setValue("stars/relative_scale", skyd->getRelativeStarScale()) conf->setValue("stars/relative_scale", propMgr->getStel
; PropertyValue("StelSkyDrawer.relativeStarScale").toFloat());
conf->setValue("stars/flag_star_twinkle", skyd->getFlagTwinkle()); conf->setValue("stars/flag_star_twinkle", propMgr->getStel
conf->setValue("stars/star_twinkle_amount", skyd->getTwinkleAmount() PropertyValue("StelSkyDrawer.flagTwinkle").toFloat());
); conf->setValue("stars/star_twinkle_amount", propMgr->getStel
conf->setValue("astro/flag_star_magnitude_limit", skyd->getFlagStarM PropertyValue("StelSkyDrawer.twinkleAmount").toFloat());
agnitudeLimit()); conf->setValue("astro/flag_star_magnitude_limit", propMgr->getStel
conf->setValue("astro/star_magnitude_limit", skyd->getCustomStarMagn PropertyValue("StelSkyDrawer.flagStarMagnitudeLimit").toBool());
itudeLimit()); conf->setValue("astro/star_magnitude_limit", propMgr->getStel
conf->setValue("astro/flag_planet_magnitude_limit", skyd->getFlagPla PropertyValue("StelSkyDrawer.customStarMagLimit").toFloat());
netMagnitudeLimit()); conf->setValue("astro/flag_planet_magnitude_limit", propMgr->getStel
conf->setValue("astro/planet_magnitude_limit", skyd->getCustomPlanet PropertyValue("StelSkyDrawer.flagPlanetMagnitudeLimit").toBool());
MagnitudeLimit()); conf->setValue("astro/planet_magnitude_limit", propMgr->getStel
conf->setValue("astro/flag_nebula_magnitude_limit", skyd->getFlagNeb PropertyValue("StelSkyDrawer.customPlanetMagLimit").toFloat());
ulaMagnitudeLimit()); conf->setValue("astro/flag_nebula_magnitude_limit", propMgr->getStel
conf->setValue("astro/nebula_magnitude_limit", skyd->getCustomNebula PropertyValue("StelSkyDrawer.flagNebulaMagnitudeLimit").toBool());
MagnitudeLimit()); conf->setValue("astro/nebula_magnitude_limit", propMgr->getStel
conf->setValue("viewing/use_luminance_adaptation", skyd->getFlagLumi PropertyValue("StelSkyDrawer.customNebulaMagLimit").toFloat());
nanceAdaptation()); conf->setValue("viewing/use_luminance_adaptation", propMgr->getStel
conf->setValue("astro/flag_planets", ssmgr->getFlagPlanets()); PropertyValue("StelSkyDrawer.flagLuminanceAdaptation").toBool());
conf->setValue("astro/flag_planets_hints", ssmgr->getFlagHints()); conf->setValue("astro/flag_planets", propMgr->getStel
conf->setValue("astro/flag_planets_orbits", ssmgr->getFlagOrbits()); PropertyValue("SolarSystem.planetsDisplayed").toBool());
conf->setValue("viewing/flag_isolated_trails", ssmgr->getFlagIsolate conf->setValue("astro/flag_planets_hints", propMgr->getStel
dTrails()); PropertyValue("SolarSystem.flagHints").toBool());
conf->setValue("viewing/flag_isolated_orbits", ssmgr->getFlagIsolate conf->setValue("astro/flag_planets_orbits", propMgr->getStel
dOrbits()); PropertyValue("SolarSystem.flagOrbits").toBool());
conf->setValue("astro/flag_light_travel_time", ssmgr->getFlagLightTr conf->setValue("viewing/flag_isolated_trails", propMgr->getStel
avelTime()); PropertyValue("SolarSystem.flagIsolatedTrails").toBool());
conf->setValue("viewing/flag_moon_scaled", ssmgr->getFlagMoonScale() conf->setValue("viewing/flag_isolated_orbits", propMgr->getStel
); PropertyValue("SolarSystem.flagIsolatedOrbits").toBool());
conf->setValue("viewing/moon_scale", ssmgr->getMoonScale()); conf->setValue("astro/flag_light_travel_time", propMgr->getStel
conf->setValue("astro/meteor_rate", mmgr->getZHR()); PropertyValue("SolarSystem.flagLightTravelTime").toBool());
conf->setValue("astro/milky_way_intensity", GETSTELMODULE(MilkyWay)- conf->setValue("viewing/flag_moon_scaled", propMgr->getStel
>getIntensity()); PropertyValue("SolarSystem.flagMoonScale").toBool());
conf->setValue("astro/zodiacal_light_intensity", GETSTELMODULE(Zodia conf->setValue("viewing/moon_scale", propMgr->getStel
calLight)->getIntensity()); PropertyValue("SolarSystem.moonScale").toDouble());
conf->setValue("astro/meteor_zhr", propMgr->getStel
PropertyValue("SporadicMeteorMgr.zhr").toInt());
conf->setValue("astro/milky_way_intensity", propMgr->getStel
PropertyValue("MilkyWay.intensity").toDouble());
conf->setValue("astro/zodiacal_light_intensity", propMgr->getStel
PropertyValue("ZodiacalLight.intensity").toDouble());
conf->setValue("astro/flag_grs_custom", propMgr->getStel
PropertyValue("SolarSystem.flagCustomGrsSettings").toBool());
conf->setValue("astro/grs_longitude", propMgr->getStel
PropertyValue("SolarSystem.customGrsLongitude").toInt());
conf->setValue("astro/grs_drift", propMgr->getStel
PropertyValue("SolarSystem.customGrsDrift").toDouble());
conf->setValue("astro/grs_jd", propMgr->getStel
PropertyValue("SolarSystem.customGrsJD").toDouble());
conf->setValue("astro/flag_planets_labels", propMgr->getStel
PropertyValue("SolarSystem.labelsDisplayed").toBool());
conf->setValue("astro/labels_amount", propMgr->getStel
PropertyValue("SolarSystem.labelsAmount").toDouble());
conf->setValue("viewing/flag_planets_native_names", propMgr->getStel
PropertyValue("SolarSystem.flagNativeNames").toBool());
// view dialog / markings tab settings // view dialog / markings tab settings
conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimutha conf->setValue("viewing/flag_azimuthal_grid", propMgr->getSte
lGrid()); lPropertyValue("GridLinesMgr.azimuthalGridDisplayed").toBool());
conf->setValue("viewing/flag_equatorial_grid", glmgr->getFlagEquator conf->setValue("viewing/flag_equatorial_grid", propMgr->getSte
Grid()); lPropertyValue("GridLinesMgr.equatorGridDisplayed").toBool());
conf->setValue("viewing/flag_equatorial_J2000_grid", glmgr->getFlagE conf->setValue("viewing/flag_equatorial_J2000_grid", propMgr->getSte
quatorJ2000Grid()); lPropertyValue("GridLinesMgr.equatorJ2000GridDisplayed").toBool());
conf->setValue("viewing/flag_equator_line", glmgr->getFlagEquatorLin conf->setValue("viewing/flag_equator_line", propMgr->getSte
e()); lPropertyValue("GridLinesMgr.equatorLineDisplayed").toBool());
conf->setValue("viewing/flag_equator_J2000_line", glmgr->getFlagEqua conf->setValue("viewing/flag_equator_J2000_line", propMgr->getSte
torJ2000Line()); lPropertyValue("GridLinesMgr.equatorJ2000LineDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_line", glmgr->getFlagEclipticL conf->setValue("viewing/flag_ecliptic_line", propMgr->getSte
ine()); lPropertyValue("GridLinesMgr.eclipticLineDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_J2000_line", glmgr->getFlagEcl conf->setValue("viewing/flag_ecliptic_J2000_line", propMgr->getSte
ipticJ2000Line()); lPropertyValue("GridLinesMgr.eclipticJ2000LineDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_grid", glmgr->getFlagEclipticG conf->setValue("viewing/flag_ecliptic_grid", propMgr->getSte
rid()); lPropertyValue("GridLinesMgr.eclipticGridDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_J2000_grid", glmgr->getFlagEcl conf->setValue("viewing/flag_ecliptic_J2000_grid", propMgr->getSte
ipticJ2000Grid()); lPropertyValue("GridLinesMgr.eclipticJ2000GridDisplayed").toBool());
conf->setValue("viewing/flag_meridian_line", glmgr->getFlagMeridianL conf->setValue("viewing/flag_meridian_line", propMgr->getSte
ine()); lPropertyValue("GridLinesMgr.meridianLineDisplayed").toBool());
conf->setValue("viewing/flag_longitude_line", glmgr->getFlagLongitud conf->setValue("viewing/flag_longitude_line", propMgr->getSte
eLine()); lPropertyValue("GridLinesMgr.longitudeLineDisplayed").toBool());
conf->setValue("viewing/flag_horizon_line", glmgr->getFlagHorizonLin conf->setValue("viewing/flag_horizon_line", propMgr->getSte
e()); lPropertyValue("GridLinesMgr.horizonLineDisplayed").toBool());
conf->setValue("viewing/flag_galactic_grid", glmgr->getFlagGalacticG conf->setValue("viewing/flag_galactic_grid", propMgr->getSte
rid()); lPropertyValue("GridLinesMgr.galacticGridDisplayed").toBool());
conf->setValue("viewing/flag_galactic_equator_line", glmgr->getFlagG conf->setValue("viewing/flag_galactic_equator_line", propMgr->getSte
alacticEquatorLine()); lPropertyValue("GridLinesMgr.galacticEquatorLineDisplayed").toBool());
conf->setValue("viewing/flag_cardinal_points", lmgr->getFlagCardinal conf->setValue("viewing/flag_cardinal_points", propMgr->getSte
sPoints()); lPropertyValue("LandscapeMgr.cardinalsPointsDisplayed").toBool());
conf->setValue("viewing/flag_constellation_drawing", cmgr->getFlagLi conf->setValue("viewing/flag_prime_vertical_line", propMgr->getSte
nes()); lPropertyValue("GridLinesMgr.primeVerticalLineDisplayed").toBool());
conf->setValue("viewing/flag_constellation_name", cmgr->getFlagLabel conf->setValue("viewing/flag_colure_lines", propMgr->getSte
s()); lPropertyValue("GridLinesMgr.colureLinesDisplayed").toBool());
conf->setValue("viewing/flag_constellation_boundaries", cmgr->getFla conf->setValue("viewing/flag_precession_circles", propMgr->getSte
gBoundaries()); lPropertyValue("GridLinesMgr.precessionCirclesDisplayed").toBool());
conf->setValue("viewing/flag_constellation_art", cmgr->getFlagArt()) conf->setValue("viewing/flag_circumpolar_circles", propMgr->getSte
; lPropertyValue("GridLinesMgr.circumpolarCirclesDisplayed").toBool());
conf->setValue("viewing/flag_constellation_isolate_selected", cmgr->
getFlagIsolateSelected()); conf->setValue("viewing/flag_constellation_drawing", propMg
conf->setValue("viewing/flag_landscape_autoselection", lmgr->getFlag r->getStelPropertyValue("ConstellationMgr.linesDisplayed").toBool());
LandscapeAutoSelection()); conf->setValue("viewing/flag_constellation_name", propMg
conf->setValue("viewing/flag_light_pollution_database", lmgr->getFla r->getStelPropertyValue("ConstellationMgr.namesDisplayed").toBool());
gUseLightPollutionFromDatabase()); conf->setValue("viewing/flag_constellation_boundaries", propMg
conf->setValue("viewing/flag_atmosphere_auto_enable", lmgr->getFlagA r->getStelPropertyValue("ConstellationMgr.boundariesDisplayed").toBool());
tmosphereAutoEnable()); conf->setValue("viewing/flag_constellation_art", propMg
conf->setValue("viewing/flag_planets_native_names", ssmgr->getFlagNa r->getStelPropertyValue("ConstellationMgr.artDisplayed").toBool());
tiveNames()); conf->setValue("viewing/flag_constellation_isolate_selected", propMg
conf->setValue("viewing/constellation_art_intensity", cmgr->getArtIn r->getStelPropertyValue("ConstellationMgr.isolateSelected").toBool());
tensity()); conf->setValue("viewing/flag_landscape_autoselection", propMg
conf->setValue("viewing/constellation_name_style", cmgr->getConstell r->getStelPropertyValue("LandscapeMgr.flagLandscapeAutoSelection").toBool()
ationDisplayStyleString()); );
conf->setValue("viewing/constellation_line_thickness", cmgr->getCons conf->setValue("viewing/flag_light_pollution_database", propMg
tellationLineThickness()); r->getStelPropertyValue("LandscapeMgr.databaseUsage").toBool());
conf->setValue("viewing/flag_atmosphere_auto_enable", propMg
r->getStelPropertyValue("LandscapeMgr.flagAtmosphereAutoEnabling").toBool()
);
conf->setValue("viewing/constellation_art_intensity", propMg
r->getStelPropertyValue("ConstellationMgr.artIntensity").toFloat());
conf->setValue("viewing/constellation_name_style", Conste
llationMgr::getConstellationDisplayStyleString(
static_cast<ConstellationMgr::ConstellationDi
splayStyle> (propMgr->getStelPropertyValue("ConstellationMgr.constellationD
isplayStyle").toInt()) ));
conf->setValue("viewing/constellation_line_thickness", propMg
r->getStelPropertyValue("ConstellationMgr.constellationLineThickness").toFl
oat());
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_stars", propMgr->getStelPropertyValue
conf->setValue("stars/labels_amount", smgr->getLabelsAmount()); ("StarMgr.flagStarsDisplayed").toBool());
conf->setValue("astro/flag_planets_labels", ssmgr->getFlagLabels()); conf->setValue("astro/flag_star_name", propMgr->getStelPropertyValue
conf->setValue("astro/labels_amount", ssmgr->getLabelsAmount()); ("StarMgr.flagLabelsDisplayed").toBool());
conf->setValue("stars/labels_amount", propMgr->getStelPropertyValue
("StarMgr.labelsAmount").toDouble());
conf->setValue("astro/nebula_hints_amount", nmgr->getHintsAmount()); conf->setValue("astro/nebula_hints_amount", nmgr->getHintsAmount());
conf->setValue("astro/nebula_labels_amount", nmgr->getLabelsAmount() ); conf->setValue("astro/nebula_labels_amount", nmgr->getLabelsAmount() );
conf->setValue("astro/flag_nebula_hints_proportional", nmgr->getHint sProportional()); conf->setValue("astro/flag_nebula_hints_proportional", nmgr->getHint sProportional());
conf->setValue("astro/flag_surface_brightness_usage", nmgr->getFlagS urfaceBrightnessUsage()); conf->setValue("astro/flag_surface_brightness_usage", nmgr->getFlagS urfaceBrightnessUsage());
conf->setValue("gui/flag_dso_designation_usage", nmgr->getDesignatio nUsage());
conf->setValue("astro/flag_nebula_name", nmgr->getFlagHints()); conf->setValue("astro/flag_nebula_name", nmgr->getFlagHints());
conf->setValue("astro/flag_nebula_display_no_texture", !GETSTELMODUL conf->setValue("astro/flag_nebula_display_no_texture", ! propMgr->ge
E(StelSkyLayerMgr)->getFlagShow()); tStelPropertyValue("StelSkyLayerMgr.flagShow").toBool() );
conf->setValue("astro/flag_use_type_filter", nmgr->getFlagTypeFilter conf->setValue("astro/flag_use_type_filter", nmgr->getFlagUseTypeFil
sUsage()); ters());
conf->setValue("projection/type", core->getCurrentProjectionTypeKey( )); conf->setValue("projection/type", core->getCurrentProjectionTypeKey( ));
conf->setValue("astro/flag_nutation", core->getUseNutation()); conf->setValue("astro/flag_nutation", core->getUseNutation());
conf->setValue("astro/flag_topocentric_coordinates", core->getUseTop ocentricCoordinates()); conf->setValue("astro/flag_topocentric_coordinates", core->getUseTop ocentricCoordinates());
// 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));
skipping to change at line 654 skipping to change at line 654
conf->setValue("flag_show_clusters", (bool) (tflags & Ne bula::TypeStarClusters)); conf->setValue("flag_show_clusters", (bool) (tflags & Ne bula::TypeStarClusters));
conf->setValue("flag_show_bright_nebulae", (bool) (tflags & Ne bula::TypeBrightNebulae)); conf->setValue("flag_show_bright_nebulae", (bool) (tflags & Ne bula::TypeBrightNebulae));
conf->setValue("flag_show_dark_nebulae", (bool) (tflags & Ne bula::TypeDarkNebulae)); conf->setValue("flag_show_dark_nebulae", (bool) (tflags & Ne bula::TypeDarkNebulae));
conf->setValue("flag_show_planetary_nebulae", (bool) (tflags & Ne bula::TypePlanetaryNebulae)); conf->setValue("flag_show_planetary_nebulae", (bool) (tflags & Ne bula::TypePlanetaryNebulae));
conf->setValue("flag_show_hydrogen_regions", (bool) (tflags & Ne bula::TypeHydrogenRegions)); conf->setValue("flag_show_hydrogen_regions", (bool) (tflags & Ne bula::TypeHydrogenRegions));
conf->setValue("flag_show_supernova_remnants", (bool) (tflags & Ne bula::TypeSupernovaRemnants)); conf->setValue("flag_show_supernova_remnants", (bool) (tflags & Ne bula::TypeSupernovaRemnants));
conf->setValue("flag_show_other", (bool) (tflags & Ne bula::TypeOther)); conf->setValue("flag_show_other", (bool) (tflags & Ne bula::TypeOther));
conf->endGroup(); conf->endGroup();
// view dialog / landscape tab settings // view dialog / landscape tab settings
lmgr->setDefaultLandscapeID(lmgr->getCurrentLandscapeID()); conf->setValue("init_location/landscape_name", p
conf->setValue("landscape/flag_landscape_sets_location", lmgr->getFl ropMgr->getStelPropertyValue("LandscapeMgr.currentLandscapeID").toString())
agLandscapeSetsLocation()); ;
conf->setValue("landscape/flag_landscape", lmgr->getFlagLandscape()) conf->setValue("landscape/flag_landscape_sets_location", p
; ropMgr->getStelPropertyValue("LandscapeMgr.flagLandscapeSetsLocation").toBo
conf->setValue("landscape/flag_atmosphere", lmgr->getFlagAtmosphere( ol());
)); conf->setValue("landscape/flag_landscape", p
conf->setValue("landscape/flag_brightness", lmgr->getFlagLandscapeSe ropMgr->getStelPropertyValue("LandscapeMgr.landscapeDisplayed").toBool());
tsMinimalBrightness()); conf->setValue("landscape/flag_atmosphere", p
conf->setValue("landscape/flag_fog", lmgr->getFlagFog()); ropMgr->getStelPropertyValue("LandscapeMgr.atmosphereDisplayed").toBool());
conf->setValue("landscape/flag_enable_illumination_layer", lmgr->get conf->setValue("landscape/flag_fog", p
FlagIllumination()); ropMgr->getStelPropertyValue("LandscapeMgr.fogDisplayed").toBool());
conf->setValue("landscape/flag_enable_labels", lmgr->getFlagLabels() conf->setValue("landscape/flag_enable_illumination_layer", p
); ropMgr->getStelPropertyValue("LandscapeMgr.illuminationDisplayed").toBool()
conf->setValue("stars/init_bortle_scale", core->getSkyDrawer()->getB );
ortleScaleIndex()); conf->setValue("landscape/flag_enable_labels", p
conf->setValue("landscape/atmospheric_extinction_coefficient", core ropMgr->getStelPropertyValue("LandscapeMgr.labelsDisplayed").toBool());
->getSkyDrawer()->getExtinctionCoefficient()); conf->setValue("landscape/flag_minimal_brightness", p
conf->setValue("landscape/pressure_mbar", core->getSkyDrawer()->get ropMgr->getStelPropertyValue("LandscapeMgr.flagLandscapeUseMinimalBrightnes
AtmospherePressure()); s").toBool());
conf->setValue("landscape/temperature_C", core->getSkyDrawer()->get conf->setValue("landscape/flag_landscape_sets_minimal_brightness", p
AtmosphereTemperature()); ropMgr->getStelPropertyValue("LandscapeMgr.flagLandscapeSetsMinimalBrightne
conf->setValue("landscape/flag_minimal_brightness", lmgr->getFlagLan ss").toBool());
dscapeUseMinimalBrightness()); conf->setValue("landscape/minimal_brightness", p
conf->setValue("landscape/flag_landscape_sets_minimal_brightness", l ropMgr->getStelPropertyValue("LandscapeMgr.defaultMinimalBrightness").toFlo
mgr->getFlagLandscapeSetsMinimalBrightness()); at());
conf->setValue("landscape/minimal_brightness", lmgr->getDefaultMinim conf->setValue("stars/init_bortle_scale", p
alBrightness()); ropMgr->getStelPropertyValue("StelSkyDrawer.bortleScaleIndex").toInt());
conf->setValue("landscape/atmospheric_extinction_coefficient", p
ropMgr->getStelPropertyValue("StelSkyDrawer.extinctionCoefficient").toFloat
());
conf->setValue("landscape/pressure_mbar", p
ropMgr->getStelPropertyValue("StelSkyDrawer.atmospherePressure").toFloat())
;
conf->setValue("landscape/temperature_C", p
ropMgr->getStelPropertyValue("StelSkyDrawer.atmosphereTemperature").toFloat
());
// 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 730 skipping to change at line 729
conf->setValue("flag_show_eclcoord", conf->setValue("flag_show_eclcoord",
(bool) (flags & StelObject::EclipticCoord)); (bool) (flags & StelObject::EclipticCoord));
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_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().getFlagOldAzimuthUsage()); conf->setValue("gui/flag_use_azimuth_from_south", StelApp::getInstan ce().getFlagSouthAzimuthUsage());
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());
skipping to change at line 755 skipping to change at line 754
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");
// 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_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());
conf->setValue("gui/flag_mouse_cursor_timeout", StelMainView::getIns tance().getFlagCursorTimeout()); conf->setValue("gui/flag_mouse_cursor_timeout", StelMainView::getIns tance().getFlagCursorTimeout());
conf->setValue("gui/mouse_cursor_timeout", StelMainView::getInstance ().getCursorTimeout()); conf->setValue("gui/mouse_cursor_timeout", StelMainView::getInstance ().getCursorTimeout());
conf->setValue("main/screenshot_dir", StelFileMgr::getScreenshotDir( )); conf->setValue("main/screenshot_dir", StelFileMgr::getScreenshotDir( ));
conf->setValue("main/invert_screenshots_colors", StelMainView::getIn stance().getFlagInvertScreenShotColors()); conf->setValue("main/invert_screenshots_colors", StelMainView::getIn stance().getFlagInvertScreenShotColors());
int screenNum = qApp->desktop()->screenNumber(&StelMainView::getInst ance()); int screenNum = qApp->desktop()->screenNumber(&StelMainView::getInst ance());
conf->setValue("video/screen_number", screenNum); conf->setValue("video/screen_number", screenNum);
skipping to change at line 803 skipping to change at line 804
az -= M_PI*2; az -= M_PI*2;
ui->startupDirectionOfViewlabel->setText(q_("Startup direction of vi ew Az/Alt: %1/%2").arg(StelUtils::radToDmsStr(az), StelUtils::radToDmsStr(a lt))); ui->startupDirectionOfViewlabel->setText(q_("Startup direction of vi ew Az/Alt: %1/%2").arg(StelUtils::radToDmsStr(az), StelUtils::radToDmsStr(a lt)));
} }
void ConfigurationDialog::setDefaultViewOptions() void ConfigurationDialog::setDefaultViewOptions()
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
conf->setValue("main/restore_defaults", true); conf->setValue("main/restore_defaults", true);
// reset all stored panel locations
conf->beginGroup("DialogPositions");
conf->remove("");
conf->endGroup();
} }
void ConfigurationDialog::populatePluginsList() void ConfigurationDialog::populatePluginsList()
{ {
QListWidget *plugins = ui->pluginsListWidget; QListWidget *plugins = ui->pluginsListWidget;
plugins->blockSignals(true); plugins->blockSignals(true);
int currentRow = plugins->currentRow(); int currentRow = plugins->currentRow();
QString selectedPluginId = ""; QString selectedPluginId = "";
if (currentRow>0) if (currentRow>0)
selectedPluginId = plugins->currentItem()->data(Qt::UserRol e).toString(); selectedPluginId = plugins->currentItem()->data(Qt::UserRol e).toString();
skipping to change at line 855 skipping to change at line 861
QString html = "<html><head></head><body>"; QString html = "<html><head></head><body>";
html += "<h2>" + q_(desc.info.displayedName) + "</h2 >"; html += "<h2>" + q_(desc.info.displayedName) + "</h2 >";
QString d = desc.info.description; QString d = desc.info.description;
d.replace("\n", "<br />"); d.replace("\n", "<br />");
html += "<p>" + q_(d) + "</p>"; html += "<p>" + q_(d) + "</p>";
html += "<p><strong>" + q_("Authors") + "</strong>: " + desc.info.authors; html += "<p><strong>" + q_("Authors") + "</strong>: " + desc.info.authors;
html += "<br /><strong>" + q_("Contact") + "</strong >: " + desc.info.contact; html += "<br /><strong>" + q_("Contact") + "</strong >: " + desc.info.contact;
if (!desc.info.version.isEmpty()) if (!desc.info.version.isEmpty())
html += "<br /><strong>" + q_("Version") + " </strong>: " + desc.info.version; html += "<br /><strong>" + q_("Version") + " </strong>: " + desc.info.version;
html += "</p></body></html>"; html += "</p></body></html>";
ui->pluginsInfoBrowser->document()->setDefaultStyleS heet(QString(gui->getStelStyle().htmlStyleSheet));
ui->pluginsInfoBrowser->setHtml(html); ui->pluginsInfoBrowser->setHtml(html);
ui->pluginLoadAtStartupCheckBox->setChecked(desc.loa dAtStartup); ui->pluginLoadAtStartupCheckBox->setChecked(desc.loa dAtStartup);
StelModule* pmod = StelApp::getInstance().getModuleM gr().getModule(desc.info.id, true); StelModule* pmod = StelApp::getInstance().getModuleM gr().getModule(desc.info.id, true);
if (pmod != NULL) if (pmod != NULL)
ui->pluginConfigureButton->setEnabled(pmod-> configureGui(false)); ui->pluginConfigureButton->setEnabled(pmod-> configureGui(false));
else else
ui->pluginConfigureButton->setEnabled(false) ; ui->pluginConfigureButton->setEnabled(false) ;
return; return;
} }
} }
skipping to change at line 927 skipping to change at line 934
else else
ui->scriptListWidget->setCurrentRow(0); ui->scriptListWidget->setCurrentRow(0);
} }
void ConfigurationDialog::scriptSelectionChanged(const QString& s) void ConfigurationDialog::scriptSelectionChanged(const QString& s)
{ {
if (s.isEmpty()) if (s.isEmpty())
return; return;
StelScriptMgr& scriptMgr = StelApp::getInstance().getScriptMgr(); StelScriptMgr& scriptMgr = StelApp::getInstance().getScriptMgr();
//ui->scriptInfoBrowser->document()->setDefaultStyleSheet(QString(St elApp::getInstance().getCurrentStelStyle()->htmlStyleSheet)); //ui->scriptInfoBrowser->document()->setDefaultStyleSheet(QString(St elApp::getInstance().getCurrentStelStyle()->htmlStyleSheet));
QString html = "<html><head></head><body>"; QString html = scriptMgr.getHtmlDescription(s);
html += "<h2>" + q_(scriptMgr.getName(s).trimmed()) + "</h2>";
QString d = scriptMgr.getDescription(s).trimmed();
d.replace("\n", "<br />");
d.replace(QRegExp("\\s{2,}"), " ");
html += "<p>" + q_(d) + "</p>";
html += "<p>";
if (!scriptMgr.getAuthor(s).trimmed().isEmpty())
{
html += "<strong>" + q_("Author") + "</strong>: " + scriptMg
r.getAuthor(s) + "<br />";
}
if (!scriptMgr.getLicense(s).trimmed().isEmpty())
{
html += "<strong>" + q_("License") + "</strong>: " + scriptM
gr.getLicense(s) + "<br />";
}
if (!scriptMgr.getShortcut(s).trimmed().isEmpty())
{
html += "<strong>" + q_("Shortcut") + "</strong>: " + script
Mgr.getShortcut(s);
}
html += "</p></body></html>";
ui->scriptInfoBrowser->setHtml(html); ui->scriptInfoBrowser->setHtml(html);
} }
void ConfigurationDialog::runScriptClicked(void) void ConfigurationDialog::runScriptClicked(void)
{ {
if (ui->closeWindowAtScriptRunCheckbox->isChecked()) if (ui->closeWindowAtScriptRunCheckbox->isChecked())
this->close(); this->close();
StelScriptMgr& scriptMgr = StelApp::getInstance().getScriptMgr(); StelScriptMgr& scriptMgr = StelApp::getInstance().getScriptMgr();
if (ui->scriptListWidget->currentItem()) if (ui->scriptListWidget->currentItem())
{ {
skipping to change at line 1209 skipping to change at line 1197
ui->downloadRetryButton->setVisible(true); ui->downloadRetryButton->setVisible(true);
} }
else else
{ {
hasDownloadedStarCatalog = true; hasDownloadedStarCatalog = true;
} }
resetStarCatalogControls(); resetStarCatalogControls();
} }
void ConfigurationDialog::de430ButtonClicked()
{
QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf);
StelApp::getInstance().getCore()->setDe430Active(!StelApp::getInstan
ce().getCore()->de430IsActive());
conf->setValue("astro/flag_use_de430", StelApp::getInstance().getCor
e()->de430IsActive());
resetEphemControls(); //refresh labels
}
void ConfigurationDialog::de431ButtonClicked()
{
QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf);
StelApp::getInstance().getCore()->setDe431Active(!StelApp::getInstan
ce().getCore()->de431IsActive());
conf->setValue("astro/flag_use_de431", StelApp::getInstance().getCor
e()->de431IsActive());
resetEphemControls(); //refresh labels
}
void ConfigurationDialog::resetEphemControls()
{
ui->de430checkBox->setEnabled(StelApp::getInstance().getCore()->de43
0IsAvailable());
ui->de431checkBox->setEnabled(StelApp::getInstance().getCore()->de43
1IsAvailable());
ui->de430checkBox->setChecked(StelApp::getInstance().getCore()->de43
0IsActive());
ui->de431checkBox->setChecked(StelApp::getInstance().getCore()->de43
1IsActive());
if(StelApp::getInstance().getCore()->de430IsActive())
ui->de430label->setText("1550..2650");
else
{
if (StelApp::getInstance().getCore()->de430IsAvailable())
ui->de430label->setText(q_("Available"));
else
ui->de430label->setText(q_("Not Available"));
}
if(StelApp::getInstance().getCore()->de431IsActive())
ui->de431label->setText("-13000..17000");
else
{
if (StelApp::getInstance().getCore()->de431IsAvailable())
ui->de431label->setText(q_("Available"));
else
ui->de431label->setText(q_("Not Available"));
}
}
void ConfigurationDialog::updateSelectedInfoCheckBoxes() void ConfigurationDialog::updateSelectedInfoCheckBoxes()
{ {
const StelObject::InfoStringGroup& flags = gui->getInfoTextFilters() ; const StelObject::InfoStringGroup& flags = gui->getInfoTextFilters() ;
ui->checkBoxName->setChecked(flags & StelObject::Name); ui->checkBoxName->setChecked(flags & StelObject::Name);
ui->checkBoxCatalogNumbers->setChecked(flags & StelObject::CatalogNu mber); ui->checkBoxCatalogNumbers->setChecked(flags & StelObject::CatalogNu mber);
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) ;
skipping to change at line 1307 skipping to change at line 1344
// The dropdown label is too long for the string, and Meeus 1998 is very popular, this should be in the beginning of the tag. // The dropdown label is too long for the string, and Meeus 1998 is very popular, this should be in the beginning of the tag.
algorithms->addItem(q_("Meeus (1998) (with Chapront, Chapront-Touze & Francou (1997))"), "ChaprontMeeus"); algorithms->addItem(q_("Meeus (1998) (with Chapront, Chapront-Touze & Francou (1997))"), "ChaprontMeeus");
algorithms->addItem(q_("JPL Horizons"), "JPLHorizons"); algorithms->addItem(q_("JPL Horizons"), "JPLHorizons");
algorithms->addItem(q_("Meeus & Simons (2000)"), "MeeusSimons"); algorithms->addItem(q_("Meeus & Simons (2000)"), "MeeusSimons");
algorithms->addItem(q_("Montenbruck & Pfleger (2000)"), "Montenbruck Pfleger"); algorithms->addItem(q_("Montenbruck & Pfleger (2000)"), "Montenbruck Pfleger");
algorithms->addItem(q_("Reingold & Dershowitz (2002, 2007)"), "Reing oldDershowitz"); algorithms->addItem(q_("Reingold & Dershowitz (2002, 2007)"), "Reing oldDershowitz");
algorithms->addItem(q_("Morrison & Stephenson (2004, 2005)"), "Morri sonStephenson2004"); algorithms->addItem(q_("Morrison & Stephenson (2004, 2005)"), "Morri sonStephenson2004");
// Espenak & Meeus (2006) used by default // Espenak & Meeus (2006) used by default
algorithms->addItem(q_("Espenak & Meeus (2006)").append(" *"), "Espe nakMeeus"); algorithms->addItem(q_("Espenak & Meeus (2006)").append(" *"), "Espe nakMeeus");
// GZ: I want to try out some things. Something is still wrong with eclipses, see lp:1275092. // GZ: I want to try out some things. Something is still wrong with eclipses, see lp:1275092.
//algorithms->addItem(q_("Espenak & Meeus (2006) no extra moon accel #ifndef NDEBUG
eration"), "EspenakMeeusZeroMoonAccel"); algorithms->addItem(q_("Espenak & Meeus (2006) no extra moon acceler
ation"), "EspenakMeeusZeroMoonAccel");
#endif
algorithms->addItem(q_("Reijs (2006)"), "Reijs"); algorithms->addItem(q_("Reijs (2006)"), "Reijs");
algorithms->addItem(q_("Banjevic (2006)"), "Banjevic"); algorithms->addItem(q_("Banjevic (2006)"), "Banjevic");
algorithms->addItem(q_("Islam, Sadiq & Qureshi (2008, 2013)"), "Isla mSadiqQureshi"); algorithms->addItem(q_("Islam, Sadiq & Qureshi (2008, 2013)"), "Isla mSadiqQureshi");
algorithms->addItem(q_("Khalid, Sultana & Zaidi (2014)"), "KhalidSul tanaZaidi"); algorithms->addItem(q_("Khalid, Sultana & Zaidi (2014)"), "KhalidSul tanaZaidi");
algorithms->addItem(q_("Custom equation of %1T").arg(QChar(0x0394)), "Custom"); algorithms->addItem(q_("Custom equation of %1T").arg(QChar(0x0394)), "Custom");
//Restore the selection //Restore the selection
index = algorithms->findData(selectedAlgorithmId, Qt::UserRole, Qt:: MatchCaseSensitive); index = algorithms->findData(selectedAlgorithmId, Qt::UserRole, Qt:: MatchCaseSensitive);
algorithms->setCurrentIndex(index); algorithms->setCurrentIndex(index);
//algorithms->model()->sort(0); //algorithms->model()->sort(0);
 End of changes. 30 change blocks. 
190 lines changed or deleted 271 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/