Satellites.cpp   Satellites.cpp 
skipping to change at line 510 skipping to change at line 510
} }
void Satellites::restoreDefaultSettings() void Satellites::restoreDefaultSettings()
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
conf->beginGroup("Satellites"); conf->beginGroup("Satellites");
// delete all existing Satellite settings... // delete all existing Satellite settings...
conf->remove(""); conf->remove("");
conf->setValue("show_satellite_hints", false); conf->setValue("show_satellite_hints", true);
conf->setValue("show_satellite_labels", true); conf->setValue("show_satellite_labels", false);
conf->setValue("updates_enabled", true); conf->setValue("updates_enabled", true);
conf->setValue("auto_add_enabled", true); conf->setValue("auto_add_enabled", true);
conf->setValue("auto_remove_enabled", true); conf->setValue("auto_remove_enabled", true);
conf->setValue("hint_color", "0.0,0.4,0.6"); conf->setValue("hint_color", "0.0,0.4,0.6");
conf->setValue("hint_font_size", 10); conf->setValue("hint_font_size", 10);
conf->setValue("update_frequency_hours", 72); conf->setValue("update_frequency_hours", 72);
conf->setValue("orbit_line_flag", true); conf->setValue("orbit_line_flag", false);
conf->setValue("orbit_line_segments", 90); conf->setValue("orbit_line_segments", 90);
conf->setValue("orbit_fade_segments", 5); conf->setValue("orbit_fade_segments", 5);
conf->setValue("orbit_segment_duration", 20); conf->setValue("orbit_segment_duration", 20);
conf->setValue("realistic_mode_enabled", false); conf->setValue("realistic_mode_enabled", true);
conf->endGroup(); // saveTleSources() opens it for itself conf->endGroup(); // saveTleSources() opens it for itself
// TLE update sources // TLE update sources
QStringList urls; QStringList urls;
urls << "1,http://celestrak.com/NORAD/elements/visual.txt" // Auto-a urls << "1,http://www.celestrak.com/NORAD/elements/visual.txt" // Au
dd ON! to-add ON!
<< "http://celestrak.com/NORAD/elements/tle-new.txt" << "http://www.celestrak.com/NORAD/elements/tle-new.txt"
<< "http://celestrak.com/NORAD/elements/science.txt" << "1,http://www.celestrak.com/NORAD/elements/science.txt"
<< "http://celestrak.com/NORAD/elements/noaa.txt" << "http://www.celestrak.com/NORAD/elements/noaa.txt"
<< "http://celestrak.com/NORAD/elements/goes.txt" << "http://www.celestrak.com/NORAD/elements/goes.txt"
<< "http://celestrak.com/NORAD/elements/amateur.txt" << "1,http://www.celestrak.com/NORAD/elements/amateur.txt"
<< "http://celestrak.com/NORAD/elements/gps-ops.txt" << "1,http://www.celestrak.com/NORAD/elements/gps-ops.txt"
<< "http://celestrak.com/NORAD/elements/galileo.txt" << "1,http://www.celestrak.com/NORAD/elements/galileo.txt"
<< "http://celestrak.com/NORAD/elements/iridium.txt" << "1,http://www.celestrak.com/NORAD/elements/iridium.txt"
<< "http://celestrak.com/NORAD/elements/geo.txt"; << "http://www.celestrak.com/NORAD/elements/geo.txt"
<< "1,http://www.celestrak.com/NORAD/elements/stations.txt"
<< "http://www.celestrak.com/NORAD/elements/weather.txt"
<< "http://www.celestrak.com/NORAD/elements/resource.txt"
<< "http://www.celestrak.com/NORAD/elements/sarsat.txt"
<< "http://www.celestrak.com/NORAD/elements/dmc.txt"
<< "http://www.celestrak.com/NORAD/elements/tdrss.txt"
<< "http://www.celestrak.com/NORAD/elements/argos.txt"
<< "http://www.celestrak.com/NORAD/elements/intelsat.txt"
<< "http://www.celestrak.com/NORAD/elements/gorizont.txt"
<< "http://www.celestrak.com/NORAD/elements/raduga.txt"
<< "http://www.celestrak.com/NORAD/elements/molniya.txt"
<< "http://www.celestrak.com/NORAD/elements/orbcomm.txt"
<< "http://www.celestrak.com/NORAD/elements/globalstar.txt"
<< "http://www.celestrak.com/NORAD/elements/x-comm.txt"
<< "http://www.celestrak.com/NORAD/elements/other-comm.txt"
<< "1,http://www.celestrak.com/NORAD/elements/glo-ops.txt"
<< "http://www.celestrak.com/NORAD/elements/beidou.txt"
<< "http://www.celestrak.com/NORAD/elements/sbas.txt"
<< "http://www.celestrak.com/NORAD/elements/nnss.txt"
<< "http://www.celestrak.com/NORAD/elements/engineering.txt"
<< "http://www.celestrak.com/NORAD/elements/education.txt"
<< "http://www.celestrak.com/NORAD/elements/geodetic.txt"
<< "http://www.celestrak.com/NORAD/elements/radar.txt"
<< "http://www.celestrak.com/NORAD/elements/cubesat.txt"
<< "http://www.celestrak.com/NORAD/elements/other.txt";
saveTleSources(urls); saveTleSources(urls);
} }
void Satellites::restoreDefaultCatalog() void Satellites::restoreDefaultCatalog()
{ {
if (QFileInfo(catalogPath).exists()) if (QFileInfo(catalogPath).exists())
backupCatalog(true); backupCatalog(true);
QFile src(":/satellites/satellites.json"); QFile src(":/satellites/satellites.json");
if (!src.copy(catalogPath)) if (!src.copy(catalogPath))
skipping to change at line 563 skipping to change at line 588
qDebug() << "Satellites::init copied default satellites.json to " << QDir::toNativeSeparators(catalogPath); qDebug() << "Satellites::init copied default satellites.json to " << QDir::toNativeSeparators(catalogPath);
// The resource is read only, and the new file inherits this ... make sure the new file // The resource is read only, and the new file inherits this ... make sure the new file
// is writable by the Stellarium process so that updates can be done. // is writable by the Stellarium process so that updates can be done.
QFile dest(catalogPath); QFile dest(catalogPath);
dest.setPermissions(dest.permissions() | QFile::WriteOwner); dest.setPermissions(dest.permissions() | QFile::WriteOwner);
// Make sure that in the case where an online update has pre viously been done, but // Make sure that in the case where an online update has pre viously been done, but
// the json file has been manually removed, that an update i s schreduled in a timely // the json file has been manually removed, that an update i s schreduled in a timely
// manner // manner
StelApp::getInstance().getSettings()->remove("Satellites/las t_update"); StelApp::getInstance().getSettings()->remove("Satellites/las t_update");
lastUpdate = QDateTime::fromString("2001-05-25T12:00:00", Qt ::ISODate); lastUpdate = QDateTime::fromString("2015-05-01T12:00:00", Qt ::ISODate);
} }
} }
void Satellites::restoreDefaultQSMagFile() void Satellites::restoreDefaultQSMagFile()
{ {
QFile src(":/satellites/qs.mag"); QFile src(":/satellites/qs.mag");
if (!src.copy(qsMagFilePath)) if (!src.copy(qsMagFilePath))
{ {
qWarning() << "Satellites::restoreDefaultQSMagFile cannot co py qs.mag resource to " + QDir::toNativeSeparators(qsMagFilePath); qWarning() << "Satellites::restoreDefaultQSMagFile cannot co py qs.mag resource to " + QDir::toNativeSeparators(qsMagFilePath);
skipping to change at line 642 skipping to change at line 667
} }
conf->endArray(); conf->endArray();
} }
// NOTE: Providing default values AND using restoreDefaultSettings() to create the section seems redundant. --BM // NOTE: Providing default values AND using restoreDefaultSettings() to create the section seems redundant. --BM
// updater related settings... // updater related settings...
updateFrequencyHours = conf->value("update_frequency_hours", 72).toI nt(); updateFrequencyHours = conf->value("update_frequency_hours", 72).toI nt();
// last update default is the first Towell Day. <3 DA // last update default is the first Towell Day. <3 DA
lastUpdate = QDateTime::fromString(conf->value("last_update", "2001- 05-25T12:00:00").toString(), Qt::ISODate); lastUpdate = QDateTime::fromString(conf->value("last_update", "2001- 05-25T12:00:00").toString(), Qt::ISODate);
setFlagHints(conf->value("show_satellite_hints", false).toBool()); setFlagHints(conf->value("show_satellite_hints", true).toBool());
Satellite::showLabels = conf->value("show_satellite_labels", true).t Satellite::showLabels = conf->value("show_satellite_labels", false).
oBool(); toBool();
updatesEnabled = conf->value("updates_enabled", true).toBool(); updatesEnabled = conf->value("updates_enabled", true).toBool();
autoAddEnabled = conf->value("auto_add_enabled", true).toBool(); autoAddEnabled = conf->value("auto_add_enabled", true).toBool();
autoRemoveEnabled = conf->value("auto_remove_enabled", true).toBool( ); autoRemoveEnabled = conf->value("auto_remove_enabled", true).toBool( );
// Get a font for labels // Get a font for labels
labelFont.setPixelSize(conf->value("hint_font_size", 10).toInt()); labelFont.setPixelSize(conf->value("hint_font_size", 10).toInt());
// orbit drawing params // orbit drawing params
Satellite::orbitLinesFlag = conf->value("orbit_line_flag", true).toB ool(); Satellite::orbitLinesFlag = conf->value("orbit_line_flag", false).to Bool();
Satellite::orbitLineSegments = conf->value("orbit_line_segments", 90 ).toInt(); Satellite::orbitLineSegments = conf->value("orbit_line_segments", 90 ).toInt();
Satellite::orbitLineFadeSegments = conf->value("orbit_fade_segments" , 5).toInt(); Satellite::orbitLineFadeSegments = conf->value("orbit_fade_segments" , 5).toInt();
Satellite::orbitLineSegmentDuration = conf->value("orbit_segment_dur ation", 20).toInt(); Satellite::orbitLineSegmentDuration = conf->value("orbit_segment_dur ation", 20).toInt();
// realistic mode // realistic mode
setFlagRelisticMode(conf->value("realistic_mode_enabled", false).toB ool()); setFlagRelisticMode(conf->value("realistic_mode_enabled", true).toBo ol());
conf->endGroup(); conf->endGroup();
} }
void Satellites::saveSettings() void Satellites::saveSettings()
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
conf->beginGroup("Satellites"); conf->beginGroup("Satellites");
// updater related settings... // updater related settings...
skipping to change at line 1702 skipping to change at line 1727
// TRANSLATORS: Satellite group: Amateur radio (ham) satellites // TRANSLATORS: Satellite group: Amateur radio (ham) satellites
N_("amateur"); N_("amateur");
// TRANSLATORS: Satellite group: Weather (meteorological) satellites // TRANSLATORS: Satellite group: Weather (meteorological) satellites
N_("weather"); N_("weather");
// TRANSLATORS: Satellite group: Satellites in geostationary orbit // TRANSLATORS: Satellite group: Satellites in geostationary orbit
N_("geostationary"); N_("geostationary");
// TRANSLATORS: Satellite group: Satellites that are no longer funct ioning // TRANSLATORS: Satellite group: Satellites that are no longer funct ioning
N_("non-operational"); N_("non-operational");
// TRANSLATORS: Satellite group: Satellites belonging to the GPS con stellation (the Global Positioning System) // TRANSLATORS: Satellite group: Satellites belonging to the GPS con stellation (the Global Positioning System)
N_("gps"); N_("gps");
// TRANSLATORS: Satellite group: Satellites belonging to the GLONASS
constellation (GLObal NAvigation Satellite System)
N_("glonass");
// TRANSLATORS: Satellite group: Satellites belonging to the Galileo
constellation (global navigation satellite system by the European Union)
N_("galileo");
// TRANSLATORS: Satellite group: Satellites belonging to the Iridium constellation (Iridium is a proper name) // TRANSLATORS: Satellite group: Satellites belonging to the Iridium constellation (Iridium is a proper name)
N_("iridium"); N_("iridium");
// TRANSLATORS: Satellite group: Space stations
N_("stations");
// TRANSLATORS: Satellite group: Education satellites
N_("education");
// TRANSLATORS: Satellite group: Satellites belonging to the space o
bservatories
N_("observatory");
/* For copy/paste: /* For copy/paste:
// TRANSLATORS: Satellite group: // TRANSLATORS: Satellite group:
N_(""); N_("");
*/ */
// Satellite descriptions - bright and/or famous objects // Satellite descriptions - bright and/or famous objects
// Just A FEW objects please! (I'm looking at you, Alex!) // Just A FEW objects please! (I'm looking at you, Alex!)
// TRANSLATORS: Satellite description. "Hubble" is a person's name. // TRANSLATORS: Satellite description. "Hubble" is a person's name.
N_("The Hubble Space Telescope"); N_("The Hubble Space Telescope");
// TRANSLATORS: Satellite description. // TRANSLATORS: Satellite description.
N_("The International Space Station"); N_("The International Space Station");
// TRANSLATORS: Satellite description.
N_("China's first space station");
#endif #endif
} }
 End of changes. 11 change blocks. 
21 lines changed or deleted 61 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/