ConfigurationDialog.cpp   ConfigurationDialog.cpp 
skipping to change at line 68 skipping to change at line 68
#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("Configuration", parent)
, isDownloadingStarCatalog(false)
, nextStarCatalogToDownloadIndex(0) , nextStarCatalogToDownloadIndex(0)
, starCatalogsCount(0) , starCatalogsCount(0)
, hasDownloadedStarCatalog(false)
, starCatalogDownloadReply(NULL) , starCatalogDownloadReply(NULL)
, currentDownloadFile(NULL) , currentDownloadFile(NULL)
, progressBar(NULL) , progressBar(NULL)
, gui(agui) , gui(agui)
, customDeltaTEquationDialog(NULL)
, savedProjectionType(StelApp::getInstance().getCore()->getCurrentPr
ojectionType())
{ {
dialogName = "Configuration";
ui = new Ui_configurationDialogForm; ui = new Ui_configurationDialogForm;
customDeltaTEquationDialog = NULL;
hasDownloadedStarCatalog = false;
isDownloadingStarCatalog = false;
savedProjectionType = StelApp::getInstance().getCore()->getCurrentPr
ojectionType();
} }
ConfigurationDialog::~ConfigurationDialog() ConfigurationDialog::~ConfigurationDialog()
{ {
delete ui; delete ui;
ui = NULL; ui = NULL;
delete customDeltaTEquationDialog; delete customDeltaTEquationDialog;
customDeltaTEquationDialog = NULL; customDeltaTEquationDialog = NULL;
} }
skipping to change at line 238 skipping to change at line 237
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( ); StelLocaleMgr & localeManager = StelApp::getInstance().getLocaleMgr( );
// Display formats of date // Display formats of date
populateDateFormatsList(); populateDateFormatsList();
int idx = ui->dateFormatsComboBox->findData(localeManager.getDateFor matStr(), Qt::UserRole, Qt::MatchCaseSensitive); int idx = ui->dateFormatsComboBox->findData(localeManager.getDateFor matStr(), Qt::UserRole, Qt::MatchCaseSensitive);
if (idx==-1) if (idx==-1)
{ {
// Use system_deafult as default // Use system_default as default
idx = ui->dateFormatsComboBox->findData(QVariant("system_dea idx = ui->dateFormatsComboBox->findData(QVariant("system_def
fult"), Qt::UserRole, Qt::MatchCaseSensitive); ault"), Qt::UserRole, Qt::MatchCaseSensitive);
} }
ui->dateFormatsComboBox->setCurrentIndex(idx); ui->dateFormatsComboBox->setCurrentIndex(idx);
connect(ui->dateFormatsComboBox, SIGNAL(currentIndexChanged(const QS tring&)), this, SLOT(setDateFormat())); connect(ui->dateFormatsComboBox, SIGNAL(currentIndexChanged(const QS tring&)), this, SLOT(setDateFormat()));
// Display formats of time // Display formats of time
populateTimeFormatsList(); populateTimeFormatsList();
idx = ui->timeFormatsComboBox->findData(localeManager.getTimeFormatS tr(), Qt::UserRole, Qt::MatchCaseSensitive); idx = ui->timeFormatsComboBox->findData(localeManager.getTimeFormatS tr(), Qt::UserRole, Qt::MatchCaseSensitive);
if (idx==-1) if (idx==-1)
{ {
// Use system_deafult as default // Use system_default as default
idx = ui->timeFormatsComboBox->findData(QVariant("system_dea idx = ui->timeFormatsComboBox->findData(QVariant("system_def
fult"), Qt::UserRole, Qt::MatchCaseSensitive); ault"), Qt::UserRole, Qt::MatchCaseSensitive);
} }
ui->timeFormatsComboBox->setCurrentIndex(idx); ui->timeFormatsComboBox->setCurrentIndex(idx);
connect(ui->timeFormatsComboBox, SIGNAL(currentIndexChanged(const QS tring&)), this, SLOT(setTimeFormat())); connect(ui->timeFormatsComboBox, SIGNAL(currentIndexChanged(const QS tring&)), this, SLOT(setTimeFormat()));
if (StelApp::getInstance().getSettings()->value("gui/flag_time_jd", false).toBool()) if (StelApp::getInstance().getSettings()->value("gui/flag_time_jd", false).toBool())
ui->jdRadioButton->setChecked(true); ui->jdRadioButton->setChecked(true);
else else
ui->dtRadioButton->setChecked(true); ui->dtRadioButton->setChecked(true);
connect(ui->jdRadioButton, SIGNAL(clicked(bool)), this, SLOT(setButt onBarDTFormat())); connect(ui->jdRadioButton, SIGNAL(clicked(bool)), this, SLOT(setButt onBarDTFormat()));
connect(ui->dtRadioButton, SIGNAL(clicked(bool)), this, SLOT(setButt onBarDTFormat())); connect(ui->dtRadioButton, SIGNAL(clicked(bool)), this, SLOT(setButt onBarDTFormat()));
skipping to change at line 283 skipping to change at line 282
ui->pushButtonCustomDeltaTEquationDialog->setEnabled(true); ui->pushButtonCustomDeltaTEquationDialog->setEnabled(true);
// Tools tab // Tools tab
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)));
connectBoolProperty(ui->selectSingleConstellationButton, "Constellat ionMgr.isolateSelected"); connectBoolProperty(ui->selectSingleConstellationButton, "Constellat ionMgr.isolateSelected");
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 connectBoolProperty(ui->autoZoomResetsDirectionCheckbox, "StelMoveme
omOutResetsDirection()); ntMgr.flagAutoZoomOutResetsDirection");
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()); ui->showToastSurveyButtonCheckbox->setChecked(gui->getFlagShowToastS urveyButton());
connect(ui->showToastSurveyButtonCheckbox, SIGNAL(toggled(bool)), gu i, SLOT(setFlagShowToastSurveyButton(bool))); connect(ui->showToastSurveyButtonCheckbox, SIGNAL(toggled(bool)), gu i, SLOT(setFlagShowToastSurveyButton(bool)));
skipping to change at line 309 skipping to change at line 307
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)));
connect(ui->setViewingOptionAsDefaultPushButton, SIGNAL(clicked()), // General Option Save
this, SLOT(saveCurrentViewOptions())); connect(ui->saveViewDirAsDefaultPushButton, SIGNAL(clicked()), this,
SLOT(saveCurrentViewDirSettings()));
connect(ui->saveSettingsAsDefaultPushButton, SIGNAL(clicked()), this
, SLOT(saveAllSettings()));
connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(set DefaultViewOptions())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(set DefaultViewOptions()));
// Screenshots
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)));
connectBoolProperty(ui->autoEnableAtmosphereCheckBox, "LandscapeMgr. flagAtmosphereAutoEnabling"); connectBoolProperty(ui->autoEnableAtmosphereCheckBox, "LandscapeMgr. flagAtmosphereAutoEnabling");
connectBoolProperty(ui->autoChangeLandscapesCheckBox, "LandscapeMgr. flagLandscapeAutoSelection"); connectBoolProperty(ui->autoChangeLandscapesCheckBox, "LandscapeMgr. flagLandscapeAutoSelection");
skipping to change at line 516 skipping to change at line 517
if (ui->checkBoxSupergalacticCoordinates->isChecked()) if (ui->checkBoxSupergalacticCoordinates->isChecked())
flags |= StelObject::SupergalacticCoord; flags |= StelObject::SupergalacticCoord;
if (ui->checkBoxType->isChecked()) if (ui->checkBoxType->isChecked())
flags |= StelObject::ObjectType; flags |= StelObject::ObjectType;
if (ui->checkBoxEclipticCoordsJ2000->isChecked()) if (ui->checkBoxEclipticCoordsJ2000->isChecked())
flags |= StelObject::EclipticCoordJ2000; flags |= StelObject::EclipticCoordJ2000;
if (ui->checkBoxEclipticCoordsOfDate->isChecked()) if (ui->checkBoxEclipticCoordsOfDate->isChecked())
flags |= StelObject::EclipticCoordOfDate; flags |= StelObject::EclipticCoordOfDate;
if (ui->checkBoxConstellation->isChecked()) if (ui->checkBoxConstellation->isChecked())
flags |= StelObject::IAUConstellation; flags |= StelObject::IAUConstellation;
if (ui->checkBoxSiderealTime->isChecked())
flags |= StelObject::SiderealTime;
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 559 skipping to change at line 562
StelFileMgr::setScreenshotDir(dir); StelFileMgr::setScreenshotDir(dir);
} }
catch (std::runtime_error& e) catch (std::runtime_error& e)
{ {
Q_UNUSED(e); Q_UNUSED(e);
// nop // nop
// this will happen when people are only half way through ty ping dirs // this will happen when people are only half way through ty ping dirs
} }
} }
// Store FOV and viewing dir.
void ConfigurationDialog::saveCurrentViewDirSettings()
{
StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementMgr);
Q_ASSERT(mvmgr);
mvmgr->setInitFov(mvmgr->getCurrentFov());
mvmgr->setInitViewDirectionToCurrent();
}
// 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::saveAllSettings()
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
// TBD: store more properties directly, avoid to query all modules. // TBD: store more properties directly, avoid to query all modules.
StelPropertyMgr* propMgr=StelApp::getInstance().getStelPropertyManag er(); StelPropertyMgr* propMgr=StelApp::getInstance().getStelPropertyManag er();
Q_ASSERT(propMgr); Q_ASSERT(propMgr);
NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr); NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
Q_ASSERT(nmgr); Q_ASSERT(nmgr);
skipping to change at line 600 skipping to change at line 613
conf->setValue("viewing/use_luminance_adaptation", propMgr->get StelPropertyValue("StelSkyDrawer.flagLuminanceAdaptation").toBool()); conf->setValue("viewing/use_luminance_adaptation", propMgr->get StelPropertyValue("StelSkyDrawer.flagLuminanceAdaptation").toBool());
conf->setValue("astro/flag_planets", propMgr->get StelPropertyValue("SolarSystem.planetsDisplayed").toBool()); conf->setValue("astro/flag_planets", propMgr->get StelPropertyValue("SolarSystem.planetsDisplayed").toBool());
conf->setValue("astro/flag_planets_hints", propMgr->get StelPropertyValue("SolarSystem.flagHints").toBool()); conf->setValue("astro/flag_planets_hints", propMgr->get StelPropertyValue("SolarSystem.flagHints").toBool());
conf->setValue("astro/flag_planets_orbits", propMgr->get StelPropertyValue("SolarSystem.flagOrbits").toBool()); conf->setValue("astro/flag_planets_orbits", propMgr->get StelPropertyValue("SolarSystem.flagOrbits").toBool());
conf->setValue("viewing/flag_isolated_trails", propMgr->get StelPropertyValue("SolarSystem.flagIsolatedTrails").toBool()); conf->setValue("viewing/flag_isolated_trails", propMgr->get StelPropertyValue("SolarSystem.flagIsolatedTrails").toBool());
conf->setValue("viewing/flag_isolated_orbits", propMgr->get StelPropertyValue("SolarSystem.flagIsolatedOrbits").toBool()); conf->setValue("viewing/flag_isolated_orbits", propMgr->get StelPropertyValue("SolarSystem.flagIsolatedOrbits").toBool());
conf->setValue("astro/flag_light_travel_time", propMgr->get StelPropertyValue("SolarSystem.flagLightTravelTime").toBool()); conf->setValue("astro/flag_light_travel_time", propMgr->get StelPropertyValue("SolarSystem.flagLightTravelTime").toBool());
conf->setValue("viewing/flag_moon_scaled", propMgr->get StelPropertyValue("SolarSystem.flagMoonScale").toBool()); conf->setValue("viewing/flag_moon_scaled", propMgr->get StelPropertyValue("SolarSystem.flagMoonScale").toBool());
conf->setValue("viewing/moon_scale", propMgr->get StelPropertyValue("SolarSystem.moonScale").toDouble()); conf->setValue("viewing/moon_scale", propMgr->get StelPropertyValue("SolarSystem.moonScale").toDouble());
conf->setValue("astro/meteor_zhr", propMgr->get StelPropertyValue("SporadicMeteorMgr.zhr").toInt()); conf->setValue("astro/meteor_zhr", propMgr->get StelPropertyValue("SporadicMeteorMgr.zhr").toInt());
conf->setValue("astro/flag_milky_way", propMgr->get StelPropertyValue("MilkyWay.flagMilkyWayDisplayed").toBool());
conf->setValue("astro/milky_way_intensity", propMgr->get StelPropertyValue("MilkyWay.intensity").toDouble()); conf->setValue("astro/milky_way_intensity", propMgr->get StelPropertyValue("MilkyWay.intensity").toDouble());
conf->setValue("astro/flag_zodiacal_light", propMgr->get StelPropertyValue("ZodiacalLight.flagZodiacalLightDisplayed").toBool());
conf->setValue("astro/zodiacal_light_intensity", propMgr->get StelPropertyValue("ZodiacalLight.intensity").toDouble()); conf->setValue("astro/zodiacal_light_intensity", propMgr->get StelPropertyValue("ZodiacalLight.intensity").toDouble());
conf->setValue("astro/flag_grs_custom", propMgr->get StelPropertyValue("SolarSystem.flagCustomGrsSettings").toBool()); conf->setValue("astro/flag_grs_custom", propMgr->get StelPropertyValue("SolarSystem.flagCustomGrsSettings").toBool());
conf->setValue("astro/grs_longitude", propMgr->get StelPropertyValue("SolarSystem.customGrsLongitude").toInt()); conf->setValue("astro/grs_longitude", propMgr->get StelPropertyValue("SolarSystem.customGrsLongitude").toInt());
conf->setValue("astro/grs_drift", propMgr->get StelPropertyValue("SolarSystem.customGrsDrift").toDouble()); conf->setValue("astro/grs_drift", propMgr->get StelPropertyValue("SolarSystem.customGrsDrift").toDouble());
conf->setValue("astro/grs_jd", propMgr->get StelPropertyValue("SolarSystem.customGrsJD").toDouble()); conf->setValue("astro/grs_jd", propMgr->get StelPropertyValue("SolarSystem.customGrsJD").toDouble());
conf->setValue("astro/flag_planets_labels", propMgr->get StelPropertyValue("SolarSystem.labelsDisplayed").toBool()); conf->setValue("astro/flag_planets_labels", propMgr->get StelPropertyValue("SolarSystem.labelsDisplayed").toBool());
conf->setValue("astro/labels_amount", propMgr->get StelPropertyValue("SolarSystem.labelsAmount").toDouble()); conf->setValue("astro/labels_amount", propMgr->get StelPropertyValue("SolarSystem.labelsAmount").toDouble());
conf->setValue("viewing/flag_planets_native_names", propMgr->get StelPropertyValue("SolarSystem.flagNativeNames").toBool()); conf->setValue("viewing/flag_planets_native_names", propMgr->get StelPropertyValue("SolarSystem.flagNativePlanetNames").toBool());
// view dialog / markings tab settings // view dialog / markings tab settings
conf->setValue("viewing/flag_azimuthal_grid", propMgr->get StelPropertyValue("GridLinesMgr.azimuthalGridDisplayed").toBool()); conf->setValue("viewing/flag_azimuthal_grid", propMgr->get StelPropertyValue("GridLinesMgr.azimuthalGridDisplayed").toBool());
conf->setValue("viewing/flag_equatorial_grid", propMgr->get StelPropertyValue("GridLinesMgr.equatorGridDisplayed").toBool()); conf->setValue("viewing/flag_equatorial_grid", propMgr->get StelPropertyValue("GridLinesMgr.equatorGridDisplayed").toBool());
conf->setValue("viewing/flag_equatorial_J2000_grid", propMgr->get StelPropertyValue("GridLinesMgr.equatorJ2000GridDisplayed").toBool()); conf->setValue("viewing/flag_equatorial_J2000_grid", propMgr->get StelPropertyValue("GridLinesMgr.equatorJ2000GridDisplayed").toBool());
conf->setValue("viewing/flag_equator_line", propMgr->get StelPropertyValue("GridLinesMgr.equatorLineDisplayed").toBool()); conf->setValue("viewing/flag_equator_line", propMgr->get StelPropertyValue("GridLinesMgr.equatorLineDisplayed").toBool());
conf->setValue("viewing/flag_equator_J2000_line", propMgr->get StelPropertyValue("GridLinesMgr.equatorJ2000LineDisplayed").toBool()); conf->setValue("viewing/flag_equator_J2000_line", propMgr->get StelPropertyValue("GridLinesMgr.equatorJ2000LineDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_line", propMgr->get StelPropertyValue("GridLinesMgr.eclipticLineDisplayed").toBool()); conf->setValue("viewing/flag_ecliptic_line", propMgr->get StelPropertyValue("GridLinesMgr.eclipticLineDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_J2000_line", propMgr->get StelPropertyValue("GridLinesMgr.eclipticJ2000LineDisplayed").toBool()); conf->setValue("viewing/flag_ecliptic_J2000_line", propMgr->get StelPropertyValue("GridLinesMgr.eclipticJ2000LineDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_grid", propMgr->get StelPropertyValue("GridLinesMgr.eclipticGridDisplayed").toBool()); conf->setValue("viewing/flag_ecliptic_grid", propMgr->get StelPropertyValue("GridLinesMgr.eclipticGridDisplayed").toBool());
skipping to change at line 641 skipping to change at line 656
conf->setValue("viewing/flag_supergalactic_equator_line", propMgr->g etStelPropertyValue("GridLinesMgr.supergalacticEquatorLineDisplayed").toBoo l()); conf->setValue("viewing/flag_supergalactic_equator_line", propMgr->g etStelPropertyValue("GridLinesMgr.supergalacticEquatorLineDisplayed").toBoo l());
conf->setValue("viewing/flag_celestial_J2000_poles", propMgr->get StelPropertyValue("GridLinesMgr.celestialJ2000PolesDisplayed").toBool()); conf->setValue("viewing/flag_celestial_J2000_poles", propMgr->get StelPropertyValue("GridLinesMgr.celestialJ2000PolesDisplayed").toBool());
conf->setValue("viewing/flag_celestial_poles", propMgr->get StelPropertyValue("GridLinesMgr.celestialPolesDisplayed").toBool()); conf->setValue("viewing/flag_celestial_poles", propMgr->get StelPropertyValue("GridLinesMgr.celestialPolesDisplayed").toBool());
conf->setValue("viewing/flag_zenith_nadir", propMgr->get StelPropertyValue("GridLinesMgr.zenithNadirDisplayed").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_J2000_poles", propMgr->get StelPropertyValue("GridLinesMgr.eclipticJ2000PolesDisplayed").toBool());
conf->setValue("viewing/flag_ecliptic_poles", propMgr->get StelPropertyValue("GridLinesMgr.eclipticPolesDisplayed").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_galactic_poles", propMgr->get StelPropertyValue("GridLinesMgr.galacticPolesDisplayed").toBool());
conf->setValue("viewing/flag_supergalactic_poles", propMgr->get StelPropertyValue("GridLinesMgr.supergalacticPolesDisplayed").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_J2000_points", propMgr->get StelPropertyValue("GridLinesMgr.equinoxJ2000PointsDisplayed").toBool());
conf->setValue("viewing/flag_equinox_points", propMgr->get StelPropertyValue("GridLinesMgr.equinoxPointsDisplayed").toBool()); conf->setValue("viewing/flag_equinox_points", propMgr->get StelPropertyValue("GridLinesMgr.equinoxPointsDisplayed").toBool());
conf->setValue("viewing/flag_solstice_J2000_points", propMgr->get
StelPropertyValue("GridLinesMgr.solsticeJ2000PointsDisplayed").toBool());
conf->setValue("viewing/flag_solstice_points", propMgr->get
StelPropertyValue("GridLinesMgr.solsticePointsDisplayed").toBool());
conf->setValue("viewing/flag_constellation_drawing", propMgr->get StelPropertyValue("ConstellationMgr.linesDisplayed").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_name", propMgr->get StelPropertyValue("ConstellationMgr.namesDisplayed").toBool());
conf->setValue("viewing/flag_constellation_boundaries", propMgr->get StelPropertyValue("ConstellationMgr.boundariesDisplayed").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_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", propMgr->get StelPropertyValue("LandscapeMgr.flagLandscapeAutoSelection").toBool()); conf->setValue("viewing/flag_landscape_autoselection", propMgr->get StelPropertyValue("LandscapeMgr.flagLandscapeAutoSelection").toBool());
conf->setValue("viewing/flag_light_pollution_database", propMgr->get StelPropertyValue("LandscapeMgr.databaseUsage").toBool()); conf->setValue("viewing/flag_light_pollution_database", propMgr->get StelPropertyValue("LandscapeMgr.flagUseLightPollutionFromDatabase").toBool( ));
conf->setValue("viewing/flag_atmosphere_auto_enable", propMgr->get StelPropertyValue("LandscapeMgr.flagAtmosphereAutoEnabling").toBool()); conf->setValue("viewing/flag_atmosphere_auto_enable", propMgr->get StelPropertyValue("LandscapeMgr.flagAtmosphereAutoEnabling").toBool());
conf->setValue("viewing/constellation_art_intensity", propMgr->get StelPropertyValue("ConstellationMgr.artIntensity").toFloat()); conf->setValue("viewing/constellation_art_intensity", propMgr->get StelPropertyValue("ConstellationMgr.artIntensity").toFloat());
conf->setValue("viewing/constellation_name_style", Constellatio nMgr::getConstellationDisplayStyleString(static_cast<ConstellationMgr::Cons tellationDisplayStyle> (propMgr->getStelPropertyValue("ConstellationMgr.con stellationDisplayStyle").toInt()) )); conf->setValue("viewing/constellation_name_style", Constellatio nMgr::getConstellationDisplayStyleString(static_cast<ConstellationMgr::Cons tellationDisplayStyle> (propMgr->getStelPropertyValue("ConstellationMgr.con stellationDisplayStyle").toInt()) ));
conf->setValue("viewing/constellation_line_thickness", propMgr->get StelPropertyValue("ConstellationMgr.constellationLineThickness").toFloat()) ; conf->setValue("viewing/constellation_line_thickness", propMgr->get StelPropertyValue("ConstellationMgr.constellationLineThickness").toFloat()) ;
conf->setValue("viewing/flag_night", StelApp::get Instance().getVisionModeNight()); conf->setValue("viewing/flag_night", StelApp::get Instance().getVisionModeNight());
conf->setValue("astro/flag_stars", propMgr->get StelPropertyValue("StarMgr.flagStarsDisplayed").toBool()); conf->setValue("astro/flag_stars", propMgr->get StelPropertyValue("StarMgr.flagStarsDisplayed").toBool());
conf->setValue("astro/flag_star_name", propMgr->get StelPropertyValue("StarMgr.flagLabelsDisplayed").toBool()); conf->setValue("astro/flag_star_name", propMgr->get StelPropertyValue("StarMgr.flagLabelsDisplayed").toBool());
conf->setValue("stars/labels_amount", propMgr->get StelPropertyValue("StarMgr.labelsAmount").toDouble()); conf->setValue("stars/labels_amount", propMgr->get StelPropertyValue("StarMgr.labelsAmount").toDouble());
conf->setValue("astro/nebula_hints_amount", nmgr->getHin tsAmount()); conf->setValue("astro/nebula_hints_amount", nmgr->getHin tsAmount());
conf->setValue("astro/nebula_labels_amount", nmgr->getLab elsAmount()); conf->setValue("astro/nebula_labels_amount", nmgr->getLab elsAmount());
skipping to change at line 778 skipping to change at line 795
conf->setValue("flag_show_supergalcoord", conf->setValue("flag_show_supergalcoord",
(bool) (flags & StelObject::SupergalacticCoor d)); (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_eclcoordofdate", conf->setValue("flag_show_eclcoordofdate",
(bool) (flags & StelObject::EclipticCoordOfDa te)); (bool) (flags & StelObject::EclipticCoordOfDa te));
conf->setValue("flag_show_eclcoordj2000", conf->setValue("flag_show_eclcoordj2000",
(bool) (flags & StelObject::EclipticCoordJ200 0)); (bool) (flags & StelObject::EclipticCoordJ200 0));
conf->setValue("flag_show_constellation", conf->setValue("flag_show_constellation",
(bool) (flags & StelObject::IAUConstellation) ); (bool) (flags & StelObject::IAUConstellation) );
conf->setValue("flag_show_sidereal_time",
(bool) (flags & StelObject::SiderealTime));
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_toast_survey_button", gui->getFlagShow ToastSurveyButton());
conf->setValue("gui/flag_show_bookmarks_button", gui->getFlagShowBoo kmarksButton());
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()); conf->setValue("gui/flag_time_jd", gui->getButtonBar()->getFlagTimeJ d());
mvmgr->setInitFov(mvmgr->getCurrentFov());
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)
skipping to change at line 1330 skipping to change at line 1347
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->checkBoxSupergalacticCoordinates->setChecked(flags & StelObject: :SupergalacticCoord);
ui->checkBoxType->setChecked(flags & StelObject::ObjectType); ui->checkBoxType->setChecked(flags & StelObject::ObjectType);
ui->checkBoxEclipticCoordsJ2000->setChecked(flags & StelObject::Ecli pticCoordJ2000); ui->checkBoxEclipticCoordsJ2000->setChecked(flags & StelObject::Ecli pticCoordJ2000);
ui->checkBoxEclipticCoordsOfDate->setChecked(flags & StelObject::Ecl ipticCoordOfDate); ui->checkBoxEclipticCoordsOfDate->setChecked(flags & StelObject::Ecl ipticCoordOfDate);
ui->checkBoxConstellation->setChecked(flags & StelObject::IAUConstel lation); ui->checkBoxConstellation->setChecked(flags & StelObject::IAUConstel lation);
ui->checkBoxSiderealTime->setChecked(flags & StelObject::SiderealTim e);
} }
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 1393 skipping to change at line 1411
//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");
algorithms->addItem(q_("Schoch (1931)"), "Schoch"); algorithms->addItem(q_("Schoch (1931)"), "Schoch");
algorithms->addItem(q_("Clemence (1948)"), "Clemence"); algorithms->addItem(q_("Clemence (1948)"), "Clemence");
algorithms->addItem(q_("IAU (1952)"), "IAU"); algorithms->addItem(q_("IAU (1952)"), "IAU");
algorithms->addItem(q_("Astronomical Ephemeris (1960)"), "Astronomic alEphemeris"); algorithms->addItem(q_("Astronomical Ephemeris (1960)"), "Astronomic alEphemeris");
algorithms->addItem(q_("Tuckerman (1962, 1964) & Goldstine (1973)"), "TuckermanGoldstine"); algorithms->addItem(q_("Tuckerman (1962, 1964) & Goldstine (1973)"), "TuckermanGoldstine");
algorithms->addItem(q_("Muller & Stephenson (1975)"), "MullerStephen son"); algorithms->addItem(q_("Muller & Stephenson (1975)"), "MullerStephen son");
algorithms->addItem(q_("Stephenson (1978)"), "Stephenson1978"); algorithms->addItem(q_("Stephenson (1978)"), "Stephenson1978");
algorithms->addItem(q_("Schmadel & Zech (1979)"), "SchmadelZech1979" ); algorithms->addItem(q_("Schmadel & Zech (1979)"), "SchmadelZech1979" );
algorithms->addItem(q_("Schmadel & Zech (1988)"), "SchmadelZech1988" );
algorithms->addItem(q_("Morrison & Stephenson (1982)"), "MorrisonSte phenson1982"); algorithms->addItem(q_("Morrison & Stephenson (1982)"), "MorrisonSte phenson1982");
algorithms->addItem(q_("Stephenson & Morrison (1984)"), "StephensonM orrison1984"); algorithms->addItem(q_("Stephenson & Morrison (1984)"), "StephensonM orrison1984");
algorithms->addItem(q_("Stephenson & Houlden (1986)"), "StephensonHo ulden"); algorithms->addItem(q_("Stephenson & Houlden (1986)"), "StephensonHo ulden");
algorithms->addItem(q_("Espenak (1987, 1989)"), "Espenak"); algorithms->addItem(q_("Espenak (1987, 1989)"), "Espenak");
algorithms->addItem(q_("Borkowski (1988)"), "Borkowski"); algorithms->addItem(q_("Borkowski (1988)"), "Borkowski");
algorithms->addItem(q_("Schmadel & Zech (1988)"), "SchmadelZech1988" );
algorithms->addItem(q_("Chapront-Touze & Chapront (1991)"), "Chapron tTouze"); algorithms->addItem(q_("Chapront-Touze & Chapront (1991)"), "Chapron tTouze");
algorithms->addItem(q_("Stephenson & Morrison (1995)"), "StephensonM orrison1995"); algorithms->addItem(q_("Stephenson & Morrison (1995)"), "StephensonM orrison1995");
algorithms->addItem(q_("Stephenson (1997)"), "Stephenson1997"); algorithms->addItem(q_("Stephenson (1997)"), "Stephenson1997");
// 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_("Reingold & Dershowitz (2002, 2007)"), "Reing
oldDershowitz");
algorithms->addItem(q_("Morrison & Stephenson (2004, 2005)"), "Morri sonStephenson2004"); algorithms->addItem(q_("Morrison & Stephenson (2004, 2005)"), "Morri sonStephenson2004");
algorithms->addItem(q_("Stephenson, Morrison & Hohenkerk (2016)"), " StephensonMorrisonHohenkerk2016");
// 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.
#ifndef NDEBUG #ifndef NDEBUG
algorithms->addItem(q_("Espenak & Meeus (2006) no extra moon acceler ation"), "EspenakMeeusZeroMoonAccel"); algorithms->addItem(q_("Espenak & Meeus (2006) no extra moon acceler ation"), "EspenakMeeusZeroMoonAccel");
#endif #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_("Montenbruck & Pfleger (2000)"), "Montenbruck
Pfleger");
algorithms->addItem(q_("Reingold & Dershowitz (2002, 2007)"), "Reing
oldDershowitz");
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);
algorithms->blockSignals(false); algorithms->blockSignals(false);
setDeltaTAlgorithmDescription(); setDeltaTAlgorithmDescription();
 End of changes. 27 change blocks. 
30 lines changed or deleted 51 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/