ConfigurationDialog.cpp   ConfigurationDialog.cpp 
skipping to change at line 82 skipping to change at line 82
, starCatalogDownloadReply(NULL) , starCatalogDownloadReply(NULL)
, currentDownloadFile(NULL) , currentDownloadFile(NULL)
, progressBar(NULL) , progressBar(NULL)
, gui(agui) , gui(agui)
{ {
ui = new Ui_configurationDialogForm; ui = new Ui_configurationDialogForm;
customDeltaTEquationDialog = NULL; customDeltaTEquationDialog = NULL;
hasDownloadedStarCatalog = false; hasDownloadedStarCatalog = false;
isDownloadingStarCatalog = false; isDownloadingStarCatalog = false;
savedProjectionType = StelApp::getInstance().getCore()->getCurrentPr ojectionType(); savedProjectionType = StelApp::getInstance().getCore()->getCurrentPr ojectionType();
// Get info about operating system
QString platform = StelUtils::getOperatingSystemInfo();
if (platform.contains("Linux"))
platform = "Linux";
if (platform.contains("FreeBSD"))
platform = "FreeBSD";
// Set user agent as "Stellarium/$version$ ($platform$)"
userAgent = QString("Stellarium/%1 (%2)").arg(StelUtils::getApplicat
ionVersion()).arg(platform);
} }
ConfigurationDialog::~ConfigurationDialog() ConfigurationDialog::~ConfigurationDialog()
{ {
delete ui; delete ui;
ui = NULL; ui = NULL;
delete customDeltaTEquationDialog; delete customDeltaTEquationDialog;
customDeltaTEquationDialog = NULL; customDeltaTEquationDialog = NULL;
} }
skipping to change at line 160 skipping to change at line 168
connect(cb, SIGNAL(currentIndexChanged(const QString&)), this, SLOT( selectLanguage(const QString&))); connect(cb, SIGNAL(currentIndexChanged(const QString&)), this, SLOT( selectLanguage(const QString&)));
ui->groupBoxUpdates->setChecked(StelApp::getInstance().getSettings() ->value("main/check_updates_enabled", true).toBool()); ui->groupBoxUpdates->setChecked(StelApp::getInstance().getSettings() ->value("main/check_updates_enabled", true).toBool());
connect(ui->groupBoxUpdates, SIGNAL(toggled(bool)), this, SLOT(setUp datesFlag(bool))); connect(ui->groupBoxUpdates, SIGNAL(toggled(bool)), this, SLOT(setUp datesFlag(bool)));
connect(ui->getStarsButton, SIGNAL(clicked()), this, SLOT(downloadSt ars())); connect(ui->getStarsButton, SIGNAL(clicked()), this, SLOT(downloadSt ars()));
connect(ui->downloadCancelButton, SIGNAL(clicked()), this, SLOT(canc elDownload())); connect(ui->downloadCancelButton, SIGNAL(clicked()), this, SLOT(canc elDownload()));
connect(ui->downloadRetryButton, SIGNAL(clicked()), this, SLOT(downl oadStars())); connect(ui->downloadRetryButton, SIGNAL(clicked()), this, SLOT(downl oadStars()));
resetStarCatalogControls(); resetStarCatalogControls();
//Kinetic scrolling for tablet pc and pc
QList<QWidget *> addscroll;
addscroll << ui->pluginsListWidget << ui->scriptListWidget;
installKineticScrolling(addscroll);
// Selected object info // Selected object info
if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(0)) if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(0))
{ {
ui->noSelectedInfoRadio->setChecked(true); ui->noSelectedInfoRadio->setChecked(true);
} }
else if (gui->getInfoTextFilters() == StelObject::ShortInfo) else if (gui->getInfoTextFilters() == StelObject::ShortInfo)
{ {
ui->briefSelectedInfoRadio->setChecked(true); ui->briefSelectedInfoRadio->setChecked(true);
} }
else if (gui->getInfoTextFilters() == StelObject::AllInfo) else if (gui->getInfoTextFilters() == StelObject::AllInfo)
skipping to change at line 182 skipping to change at line 195
} }
else else
{ {
ui->customSelectedInfoRadio->setChecked(true); ui->customSelectedInfoRadio->setChecked(true);
} }
updateSelectedInfoCheckBoxes(); updateSelectedInfoCheckBoxes();
connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setN oSelectedInfo())); connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setN oSelectedInfo()));
connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(set AllSelectedInfo())); connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(set AllSelectedInfo()));
connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(s etBriefSelectedInfo())); connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(s etBriefSelectedInfo()));
connect(ui->buttonGroupDisplayedFields, SIGNAL(buttonClicked(int)), connect(ui->buttonGroupDisplayedFields, SIGNAL(buttonClicked(int)),
this, SLOT(setSelectedInfoFromCheckBoxes())); this, SLOT(setSelectedInfoFromCheckBoxes()));
// Navigation tab // Navigation tab
// Startup time // Startup time
if (core->getStartupTimeMode()=="actual") if (core->getStartupTimeMode()=="actual")
ui->systemTimeRadio->setChecked(true); ui->systemTimeRadio->setChecked(true);
else if (core->getStartupTimeMode()=="today") else if (core->getStartupTimeMode()=="today")
ui->todayRadio->setChecked(true); ui->todayRadio->setChecked(true);
else else
ui->fixedTimeRadio->setChecked(true); ui->fixedTimeRadio->setChecked(true);
connect(ui->systemTimeRadio, SIGNAL(clicked(bool)), this, SLOT(setSt artupTimeMode())); connect(ui->systemTimeRadio, SIGNAL(clicked(bool)), this, SLOT(setSt artupTimeMode()));
skipping to change at line 209 skipping to change at line 221
ui->fixedDateTimeEdit->setMinimumDate(QDate(100,1,1)); ui->fixedDateTimeEdit->setMinimumDate(QDate(100,1,1));
ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(core->ge tPresetSkyTime())); ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(core->ge tPresetSkyTime()));
connect(ui->fixedDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), c ore, SLOT(setPresetSkyTime(QDateTime))); connect(ui->fixedDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), c ore, SLOT(setPresetSkyTime(QDateTime)));
ui->enableKeysNavigationCheckBox->setChecked(mvmgr->getFlagEnableMov eKeys() || mvmgr->getFlagEnableZoomKeys()); ui->enableKeysNavigationCheckBox->setChecked(mvmgr->getFlagEnableMov eKeys() || mvmgr->getFlagEnableZoomKeys());
ui->enableMouseNavigationCheckBox->setChecked(mvmgr->getFlagEnableMo useNavigation()); ui->enableMouseNavigationCheckBox->setChecked(mvmgr->getFlagEnableMo useNavigation());
connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvm gr, SLOT(setFlagEnableMoveKeys(bool))); connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvm gr, SLOT(setFlagEnableMoveKeys(bool)));
connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvm gr, SLOT(setFlagEnableZoomKeys(bool))); connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvm gr, SLOT(setFlagEnableZoomKeys(bool)));
connect(ui->enableMouseNavigationCheckBox, SIGNAL(toggled(bool)), mv mgr, SLOT(setFlagEnableMouseNavigation(bool))); connect(ui->enableMouseNavigationCheckBox, SIGNAL(toggled(bool)), mv mgr, SLOT(setFlagEnableMouseNavigation(bool)));
connect(ui->fixedDateTimeCurrentButton, SIGNAL(clicked()), this, SLO T(setFixedDateTimeToCurrent())); connect(ui->fixedDateTimeCurrentButton, SIGNAL(clicked()), this, SLO T(setFixedDateTimeToCurrent()));
connect(ui->editShortcutsPushButton, SIGNAL(clicked()), connect(ui->editShortcutsPushButton, SIGNAL(clicked()), this, SLOT(s
this, howShortcutsWindow()));
SLOT(showShortcutsWindow()));
// Delta-T // Delta-T
populateDeltaTAlgorithmsList(); populateDeltaTAlgorithmsList();
int idx = ui->deltaTAlgorithmComboBox->findData(core->getCurrentDelt aTAlgorithmKey(), Qt::UserRole, Qt::MatchCaseSensitive); int idx = ui->deltaTAlgorithmComboBox->findData(core->getCurrentDelt aTAlgorithmKey(), Qt::UserRole, Qt::MatchCaseSensitive);
if (idx==-1) if (idx==-1)
{ {
// Use Espenak & Meeus (2006) as default // Use Espenak & Meeus (2006) as default
idx = ui->deltaTAlgorithmComboBox->findData(QVariant("Espena kMeeus"), Qt::UserRole, Qt::MatchCaseSensitive); idx = ui->deltaTAlgorithmComboBox->findData(QVariant("Espena kMeeus"), Qt::UserRole, Qt::MatchCaseSensitive);
} }
ui->deltaTAlgorithmComboBox->setCurrentIndex(idx); ui->deltaTAlgorithmComboBox->setCurrentIndex(idx);
connect(ui->deltaTAlgorithmComboBox, SIGNAL(currentIndexChanged(int) ), this, SLOT(setDeltaTAlgorithm(int))); connect(ui->deltaTAlgorithmComboBox, SIGNAL(currentIndexChanged(int) ), this, SLOT(setDeltaTAlgorithm(int)));
connect(ui->pushButtonCustomDeltaTEquationDialog, SIGNAL(clicked()), this, SLOT(showCustomDeltaTEquationDialog())); connect(ui->pushButtonCustomDeltaTEquationDialog, SIGNAL(clicked()), this, SLOT(showCustomDeltaTEquationDialog()));
// Tools tab // Tools tab
ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr); ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr);
Q_ASSERT(cmgr); Q_ASSERT(cmgr);
// XXX: to reintroduce. ui->sphericMirrorCheckbox->setChecked(StelApp::getInstance().getView
// ui->sphericMirrorCheckbox->setChecked(StelMainView::getInstance() portEffect() == "sphericMirrorDistorter");
.getStelAppGraphicsWidget()->getViewportEffect() == "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 Selected()); ui->selectSingleConstellationButton->setChecked(cmgr->getFlagIsolate Selected());
connect(ui->selectSingleConstellationButton, SIGNAL(toggled(bool)), cmgr, SLOT(setFlagIsolateSelected(bool))); 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(gui->getFlagShowDecimalDegrees
());
connect(ui->decimalDegreeCheckBox, SIGNAL(toggled(bool)), gui, SLOT(
setFlagShowDecimalDegrees(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());
skipping to change at line 362 skipping to change at line 374
StelApp::getInstance().getCore()->setMaskType(StelProjector: :MaskNone); StelApp::getInstance().getCore()->setMaskType(StelProjector: :MaskNone);
} }
void ConfigurationDialog::setSphericMirror(bool b) void ConfigurationDialog::setSphericMirror(bool b)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
if (b) if (b)
{ {
savedProjectionType = core->getCurrentProjectionType(); savedProjectionType = core->getCurrentProjectionType();
core->setCurrentProjectionType(StelCore::ProjectionFisheye); core->setCurrentProjectionType(StelCore::ProjectionFisheye);
// XXX: to reintroduce StelApp::getInstance().setViewportEffect("sphericMirrorDisto
// StelMainView::getInstance().getStelAppGraphicsWidget()->s rter");
etViewportEffect("sphericMirrorDistorter");
} }
else else
{ {
core->setCurrentProjectionType((StelCore::ProjectionType)sav edProjectionType); core->setCurrentProjectionType((StelCore::ProjectionType)sav edProjectionType);
// XXX: to reintroduce StelApp::getInstance().setViewportEffect("none");
// StelMainView::getInstance().getStelAppGraphicsWidget()->s
etViewportEffect("none");
} }
} }
void ConfigurationDialog::setNoSelectedInfo(void) void ConfigurationDialog::setNoSelectedInfo(void)
{ {
gui->setInfoTextFilters(StelObject::InfoStringGroup(0)); gui->setInfoTextFilters(StelObject::InfoStringGroup(0));
updateSelectedInfoCheckBoxes(); updateSelectedInfoCheckBoxes();
} }
void ConfigurationDialog::setAllSelectedInfo(void) void ConfigurationDialog::setAllSelectedInfo(void)
skipping to change at line 426 skipping to change at line 436
if (ui->checkBoxDistance->isChecked()) if (ui->checkBoxDistance->isChecked())
flags |= StelObject::Distance; flags |= StelObject::Distance;
if (ui->checkBoxSize->isChecked()) if (ui->checkBoxSize->isChecked())
flags |= StelObject::Size; flags |= StelObject::Size;
if (ui->checkBoxExtra->isChecked()) if (ui->checkBoxExtra->isChecked())
flags |= StelObject::Extra; flags |= StelObject::Extra;
if (ui->checkBoxGalacticCoordinates->isChecked()) if (ui->checkBoxGalacticCoordinates->isChecked())
flags |= StelObject::GalacticCoord; flags |= StelObject::GalacticCoord;
if (ui->checkBoxType->isChecked()) if (ui->checkBoxType->isChecked())
flags |= StelObject::ObjectType; flags |= StelObject::ObjectType;
if (ui->checkBoxTEclipticCoords->isChecked()) if (ui->checkBoxEclipticCoords->isChecked())
flags |= StelObject::EclTopocentricCoord; flags |= StelObject::EclipticCoord;
gui->setInfoTextFilters(flags); gui->setInfoTextFilters(flags);
} }
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());
} }
skipping to change at line 529 skipping to change at line 539
// view dialog / markings tab settings // view dialog / markings tab settings
conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimutha lGrid()); conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimutha lGrid());
conf->setValue("viewing/flag_equatorial_grid", glmgr->getFlagEquator Grid()); conf->setValue("viewing/flag_equatorial_grid", glmgr->getFlagEquator Grid());
conf->setValue("viewing/flag_equator_line", glmgr->getFlagEquatorLin e()); conf->setValue("viewing/flag_equator_line", glmgr->getFlagEquatorLin e());
conf->setValue("viewing/flag_ecliptic_line", glmgr->getFlagEclipticL ine()); conf->setValue("viewing/flag_ecliptic_line", glmgr->getFlagEclipticL ine());
conf->setValue("viewing/flag_ecliptic_J2000_grid", glmgr->getFlagEcl ipticJ2000Grid()); conf->setValue("viewing/flag_ecliptic_J2000_grid", glmgr->getFlagEcl ipticJ2000Grid());
conf->setValue("viewing/flag_meridian_line", glmgr->getFlagMeridianL ine()); conf->setValue("viewing/flag_meridian_line", glmgr->getFlagMeridianL ine());
conf->setValue("viewing/flag_horizon_line", glmgr->getFlagHorizonLin e()); conf->setValue("viewing/flag_horizon_line", glmgr->getFlagHorizonLin e());
conf->setValue("viewing/flag_equatorial_J2000_grid", glmgr->getFlagE quatorJ2000Grid()); conf->setValue("viewing/flag_equatorial_J2000_grid", glmgr->getFlagE quatorJ2000Grid());
conf->setValue("viewing/flag_galactic_grid", glmgr->getFlagGalacticG rid()); conf->setValue("viewing/flag_galactic_grid", glmgr->getFlagGalacticG rid());
conf->setValue("viewing/flag_galactic_plane_line", glmgr->getFlagGal acticPlaneLine()); conf->setValue("viewing/flag_galactic_equator_line", glmgr->getFlagG alacticEquatorLine());
conf->setValue("viewing/flag_cardinal_points", lmgr->getFlagCardinal sPoints()); conf->setValue("viewing/flag_cardinal_points", lmgr->getFlagCardinal sPoints());
conf->setValue("viewing/flag_constellation_drawing", cmgr->getFlagLi nes()); conf->setValue("viewing/flag_constellation_drawing", cmgr->getFlagLi nes());
conf->setValue("viewing/flag_constellation_name", cmgr->getFlagLabel s()); conf->setValue("viewing/flag_constellation_name", cmgr->getFlagLabel s());
conf->setValue("viewing/flag_constellation_boundaries", cmgr->getFla gBoundaries()); conf->setValue("viewing/flag_constellation_boundaries", cmgr->getFla gBoundaries());
conf->setValue("viewing/flag_constellation_art", cmgr->getFlagArt()) ; conf->setValue("viewing/flag_constellation_art", cmgr->getFlagArt()) ;
conf->setValue("viewing/flag_constellation_isolate_selected", cmgr-> getFlagIsolateSelected()); conf->setValue("viewing/flag_constellation_isolate_selected", cmgr-> getFlagIsolateSelected());
conf->setValue("viewing/flag_landscape_autoselection", lmgr->getFlag LandscapeAutoSelection()); conf->setValue("viewing/flag_landscape_autoselection", lmgr->getFlag LandscapeAutoSelection());
conf->setValue("viewing/flag_light_pollution_database", lmgr->getFla gUseLightPollutionFromDatabase()); conf->setValue("viewing/flag_light_pollution_database", lmgr->getFla gUseLightPollutionFromDatabase());
conf->setValue("viewing/flag_atmopshere_auto_enable", lmgr->getFlagA tmosphereAutoEnable()); conf->setValue("viewing/flag_atmopshere_auto_enable", lmgr->getFlagA tmosphereAutoEnable());
conf->setValue("viewing/constellation_art_intensity", cmgr->getArtIn tensity()); conf->setValue("viewing/constellation_art_intensity", cmgr->getArtIn tensity());
skipping to change at line 612 skipping to change at line 622
(bool) (flags & StelObject::Distance)); (bool) (flags & StelObject::Distance));
conf->setValue("flag_show_size", conf->setValue("flag_show_size",
(bool) (flags & StelObject::Size)); (bool) (flags & StelObject::Size));
conf->setValue("flag_show_extra", conf->setValue("flag_show_extra",
(bool) (flags & StelObject::Extra)); (bool) (flags & StelObject::Extra));
conf->setValue("flag_show_galcoord", conf->setValue("flag_show_galcoord",
(bool) (flags & StelObject::GalacticCoord)); (bool) (flags & StelObject::GalacticCoord));
conf->setValue("flag_show_type", conf->setValue("flag_show_type",
(bool) (flags & StelObject::ObjectType)); (bool) (flags & StelObject::ObjectType));
conf->setValue("flag_show_eclcoord", conf->setValue("flag_show_eclcoord",
(bool) (flags & StelObject::EclTopocentricCoo rd)); (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", gui->getFlagShowDeci malDegrees());
mvmgr->setInitFov(mvmgr->getCurrentFov()); mvmgr->setInitFov(mvmgr->getCurrentFov());
mvmgr->setInitViewDirectionToCurrent(); mvmgr->setInitViewDirectionToCurrent();
// configuration dialog / navigation tab // configuration dialog / navigation tab
conf->setValue("navigation/flag_enable_zoom_keys", mvmgr->getFlagEna bleZoomKeys()); conf->setValue("navigation/flag_enable_zoom_keys", mvmgr->getFlagEna bleZoomKeys());
conf->setValue("navigation/flag_enable_mouse_navigation", mvmgr->get FlagEnableMouseNavigation()); conf->setValue("navigation/flag_enable_mouse_navigation", mvmgr->get FlagEnableMouseNavigation());
conf->setValue("navigation/flag_enable_move_keys", mvmgr->getFlagEna bleMoveKeys()); conf->setValue("navigation/flag_enable_move_keys", mvmgr->getFlagEna bleMoveKeys());
conf->setValue("navigation/startup_time_mode", core->getStartupTimeM ode()); conf->setValue("navigation/startup_time_mode", core->getStartupTimeM ode());
conf->setValue("navigation/today_time", core->getInitTodayTime()); conf->setValue("navigation/today_time", core->getInitTodayTime());
conf->setValue("navigation/preset_sky_time", core->getPresetSkyTime( )); conf->setValue("navigation/preset_sky_time", core->getPresetSkyTime( ));
conf->setValue("navigation/time_correction_algorithm", core->getCurr entDeltaTAlgorithmKey()); conf->setValue("navigation/time_correction_algorithm", core->getCurr entDeltaTAlgorithmKey());
conf->setValue("navigation/init_fov", mvmgr->getInitFov()); conf->setValue("navigation/init_fov", mvmgr->getInitFov());
if (mvmgr->getMountMode() == StelMovementMgr::MountAltAzimuthal) if (mvmgr->getMountMode() == StelMovementMgr::MountAltAzimuthal)
conf->setValue("navigation/viewing_mode", "horizon"); conf->setValue("navigation/viewing_mode", "horizon");
else else
conf->setValue("navigation/viewing_mode", "equator"); conf->setValue("navigation/viewing_mode", "equator");
// 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());
// XXX: to reintroduce. conf->setValue("video/viewport_effect", StelApp::getInstance().getVi
// conf->setValue("video/viewport_effect", StelMainView::getInstance ewportEffect());
().getStelAppGraphicsWidget()->getViewportEffect());
conf->setValue("projection/viewport", StelProjector::maskTypeToStrin g(proj->getMaskType())); conf->setValue("projection/viewport", StelProjector::maskTypeToStrin g(proj->getMaskType()));
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());
// full screen and window size // full screen and window size
skipping to change at line 1003 skipping to change at line 1013
isDownloadingStarCatalog = true; isDownloadingStarCatalog = true;
updateStarCatalogControlsText(); updateStarCatalogControlsText();
ui->downloadCancelButton->setVisible(true); ui->downloadCancelButton->setVisible(true);
ui->downloadRetryButton->setVisible(false); ui->downloadRetryButton->setVisible(false);
ui->getStarsButton->setVisible(true); ui->getStarsButton->setVisible(true);
ui->getStarsButton->setEnabled(false); ui->getStarsButton->setEnabled(false);
QNetworkRequest req(nextStarCatalogToDownload.value("url").toString( )); QNetworkRequest req(nextStarCatalogToDownload.value("url").toString( ));
req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false); req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);
req.setAttribute(QNetworkRequest::RedirectionTargetAttribute, false) ; req.setAttribute(QNetworkRequest::RedirectionTargetAttribute, false) ;
req.setRawHeader("User-Agent", StelUtils::getApplicationName().toLat in1()); req.setRawHeader("User-Agent", userAgent.toLatin1());
starCatalogDownloadReply = StelApp::getInstance().getNetworkAccessMa nager()->get(req); starCatalogDownloadReply = StelApp::getInstance().getNetworkAccessMa nager()->get(req);
starCatalogDownloadReply->setReadBufferSize(1024*1024*2); starCatalogDownloadReply->setReadBufferSize(1024*1024*2);
connect(starCatalogDownloadReply, SIGNAL(readyRead()), this, SLOT(ne wStarCatalogData()));
connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(dow nloadFinished())); connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(dow nloadFinished()));
connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply::Networ kError)), this, SLOT(downloadError(QNetworkReply::NetworkError))); connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply::Networ kError)), this, SLOT(downloadError(QNetworkReply::NetworkError)));
progressBar = StelApp::getInstance().addProgressBar(); progressBar = StelApp::getInstance().addProgressBar();
progressBar->setValue(0); progressBar->setValue(0);
progressBar->setRange(0, nextStarCatalogToDownload.value("sizeMb").t oDouble()*1024); progressBar->setRange(0, nextStarCatalogToDownload.value("sizeMb").t oDouble()*1024);
progressBar->setFormat(QString("%1: %p%").arg(nextStarCatalogToDownl oad.value("id").toString())); progressBar->setFormat(QString("%1: %p%").arg(nextStarCatalogToDownl oad.value("id").toString()));
} }
void ConfigurationDialog::downloadError(QNetworkReply::NetworkError) void ConfigurationDialog::downloadError(QNetworkReply::NetworkError)
skipping to change at line 1057 skipping to change at line 1066
Q_ASSERT(starCatalogDownloadReply->bytesAvailable()==0); Q_ASSERT(starCatalogDownloadReply->bytesAvailable()==0);
const QVariant& redirect = starCatalogDownloadReply->attribute(QNetw orkRequest::RedirectionTargetAttribute); const QVariant& redirect = starCatalogDownloadReply->attribute(QNetw orkRequest::RedirectionTargetAttribute);
if (!redirect.isNull()) if (!redirect.isNull())
{ {
// We got a redirection, we need to follow // We got a redirection, we need to follow
starCatalogDownloadReply->deleteLater(); starCatalogDownloadReply->deleteLater();
QNetworkRequest req(redirect.toUrl()); QNetworkRequest req(redirect.toUrl());
req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false); req.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);
req.setRawHeader("User-Agent", StelUtils::getApplicationName req.setAttribute(QNetworkRequest::RedirectionTargetAttribute
().toLatin1()); , false);
req.setRawHeader("User-Agent", userAgent.toLatin1());
starCatalogDownloadReply = StelApp::getInstance().getNetwork AccessManager()->get(req); starCatalogDownloadReply = StelApp::getInstance().getNetwork AccessManager()->get(req);
starCatalogDownloadReply->setReadBufferSize(1024*1024*2); starCatalogDownloadReply->setReadBufferSize(1024*1024*2);
connect(starCatalogDownloadReply, SIGNAL(readyRead()), this, SLOT(newStarCatalogData())); connect(starCatalogDownloadReply, SIGNAL(readyRead()), this, SLOT(newStarCatalogData()));
connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(downloadFinished())); connect(starCatalogDownloadReply, SIGNAL(finished()), this, SLOT(downloadFinished()));
connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply ::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError))); connect(starCatalogDownloadReply, SIGNAL(error(QNetworkReply ::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError)));
return; return;
} }
isDownloadingStarCatalog = false; isDownloadingStarCatalog = false;
currentDownloadFile->close(); currentDownloadFile->close();
skipping to change at line 1108 skipping to change at line 1118
ui->checkBoxAbsoluteMag->setChecked(flags & StelObject::AbsoluteMagn itude); ui->checkBoxAbsoluteMag->setChecked(flags & StelObject::AbsoluteMagn itude);
ui->checkBoxRaDecJ2000->setChecked(flags & StelObject::RaDecJ2000); ui->checkBoxRaDecJ2000->setChecked(flags & StelObject::RaDecJ2000);
ui->checkBoxRaDecOfDate->setChecked(flags & StelObject::RaDecOfDate) ; ui->checkBoxRaDecOfDate->setChecked(flags & StelObject::RaDecOfDate) ;
ui->checkBoxHourAngle->setChecked(flags & StelObject::HourAngle); ui->checkBoxHourAngle->setChecked(flags & StelObject::HourAngle);
ui->checkBoxAltAz->setChecked(flags & StelObject::AltAzi); ui->checkBoxAltAz->setChecked(flags & StelObject::AltAzi);
ui->checkBoxDistance->setChecked(flags & StelObject::Distance); ui->checkBoxDistance->setChecked(flags & StelObject::Distance);
ui->checkBoxSize->setChecked(flags & StelObject::Size); ui->checkBoxSize->setChecked(flags & StelObject::Size);
ui->checkBoxExtra->setChecked(flags & StelObject::Extra); ui->checkBoxExtra->setChecked(flags & StelObject::Extra);
ui->checkBoxGalacticCoordinates->setChecked(flags & StelObject::Gala cticCoord); ui->checkBoxGalacticCoordinates->setChecked(flags & StelObject::Gala cticCoord);
ui->checkBoxType->setChecked(flags & StelObject::ObjectType); ui->checkBoxType->setChecked(flags & StelObject::ObjectType);
ui->checkBoxTEclipticCoords->setChecked(flags & StelObject::EclTopoc entricCoord); ui->checkBoxEclipticCoords->setChecked(flags & StelObject::EclipticC oord);
} }
void ConfigurationDialog::updateTabBarListWidgetWidth() void ConfigurationDialog::updateTabBarListWidgetWidth()
{ {
QAbstractItemModel* model = ui->stackListWidget->model(); QAbstractItemModel* model = ui->stackListWidget->model();
if (!model) if (!model)
return; return;
// Update list item sizes after translation // Update list item sizes after translation
ui->stackListWidget->adjustSize(); ui->stackListWidget->adjustSize();
 End of changes. 17 change blocks. 
27 lines changed or deleted 40 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/