diff --git a/doc/img/SatelliteTracker_plugin_passchart.png b/doc/img/SatelliteTracker_plugin_passchart.png index 92fda83d2..d995710fc 100644 Binary files a/doc/img/SatelliteTracker_plugin_passchart.png and b/doc/img/SatelliteTracker_plugin_passchart.png differ diff --git a/doc/img/SatelliteTracker_plugin_passchart.xcf b/doc/img/SatelliteTracker_plugin_passchart.xcf new file mode 100644 index 000000000..5cdad1ffc Binary files /dev/null and b/doc/img/SatelliteTracker_plugin_passchart.xcf differ diff --git a/doc/img/StarTracker_chart_theme.png b/doc/img/StarTracker_chart_theme.png new file mode 100644 index 000000000..449461d9f Binary files /dev/null and b/doc/img/StarTracker_chart_theme.png differ diff --git a/doc/img/StarTracker_chart_theme.xcf b/doc/img/StarTracker_chart_theme.xcf new file mode 100644 index 000000000..aa54f684c Binary files /dev/null and b/doc/img/StarTracker_chart_theme.xcf differ diff --git a/doc/img/StarTracker_plugin.png b/doc/img/StarTracker_plugin.png index de4c6d8c2..b5ab9c137 100644 Binary files a/doc/img/StarTracker_plugin.png and b/doc/img/StarTracker_plugin.png differ diff --git a/doc/img/StarTracker_plugin.xcf b/doc/img/StarTracker_plugin.xcf new file mode 100644 index 000000000..2713ab17b Binary files /dev/null and b/doc/img/StarTracker_plugin.xcf differ diff --git a/doc/img/StarTracker_skytemp.png b/doc/img/StarTracker_skytemp.png index 85ea42da3..5e10dae47 100644 Binary files a/doc/img/StarTracker_skytemp.png and b/doc/img/StarTracker_skytemp.png differ diff --git a/doc/img/StarTracker_skytemp.xcf b/doc/img/StarTracker_skytemp.xcf new file mode 100644 index 000000000..e7fdc0445 Binary files /dev/null and b/doc/img/StarTracker_skytemp.xcf differ diff --git a/plugins/feature/satellitetracker/readme.md b/plugins/feature/satellitetracker/readme.md index 789297875..234b5069d 100644 --- a/plugins/feature/satellitetracker/readme.md +++ b/plugins/feature/satellitetracker/readme.md @@ -152,6 +152,8 @@ Pass charts can be plotted showing the azimuth and elevation of the target satel The arrows next to the chart combobox, allow the pass number to be selected. Pass 0 is the next pass, with higher numbered passes occurring later in time. The amount of passes is determined by the prediction period, which can be set in the Settings dialog. +click on this icon ![Star Tracker Chart theme](../../../doc/img/StarTracker_chart_theme.png) to switch between light and dark themes for the charts. +

Satellite Data

The satellite data table displays calculated data about the selected satellites. diff --git a/plugins/feature/satellitetracker/satellitetrackergui.cpp b/plugins/feature/satellitetracker/satellitetrackergui.cpp index d578fabc8..cf3677e6a 100644 --- a/plugins/feature/satellitetracker/satellitetrackergui.cpp +++ b/plugins/feature/satellitetracker/satellitetrackergui.cpp @@ -326,6 +326,7 @@ void SatelliteTrackerGUI::displaySettings() ui->dateTimeSelect->setCurrentIndex(1); } ui->autoTarget->setChecked(m_settings.m_autoTarget); + ui->darkTheme->setChecked(m_settings.m_chartsDarkTheme); plotChart(); blockApplySettings(false); } @@ -649,6 +650,13 @@ void SatelliteTrackerGUI::on_prevPass_clicked() } } +void SatelliteTrackerGUI::on_darkTheme_clicked(bool checked) +{ + m_settings.m_chartsDarkTheme = checked; + plotChart(); + applySettings(); +} + void SatelliteTrackerGUI::on_chartSelect_currentIndexChanged(int index) { (void) index; @@ -689,6 +697,7 @@ void SatelliteTrackerGUI::plotPolarChart() // Always create a new chart, otherwise sometimes they aren't drawn properly m_polarChart = new QPolarChart(); + m_polarChart->setTheme(m_settings.m_chartsDarkTheme ? QChart::ChartThemeDark : QChart::ChartThemeLight); QValueAxis *angularAxis = new QValueAxis(); QCategoryAxis *radialAxis = new QCategoryAxis(); @@ -892,6 +901,7 @@ void SatelliteTrackerGUI::plotAzElChart() // Always create a new chart, otherwise sometimes they aren't drawn properly m_lineChart = new QChart(); + m_lineChart->setTheme(m_settings.m_chartsDarkTheme ? QChart::ChartThemeDark : QChart::ChartThemeLight); QDateTimeAxis *xAxis = new QDateTimeAxis(); QValueAxis *yLeftAxis = new QValueAxis(); QValueAxis *yRightAxis = new QValueAxis(); diff --git a/plugins/feature/satellitetracker/satellitetrackergui.h b/plugins/feature/satellitetracker/satellitetrackergui.h index f355e66a7..78ee5de75 100644 --- a/plugins/feature/satellitetracker/satellitetrackergui.h +++ b/plugins/feature/satellitetracker/satellitetrackergui.h @@ -143,6 +143,7 @@ private slots: void on_chartSelect_currentIndexChanged(int index); void on_nextPass_clicked(); void on_prevPass_clicked(); + void on_darkTheme_clicked(bool checked); void on_satTable_cellDoubleClicked(int row, int column); void satTable_sectionMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex); void satTable_sectionResized(int logicalIndex, int oldSize, int newSize); diff --git a/plugins/feature/satellitetracker/satellitetrackergui.ui b/plugins/feature/satellitetracker/satellitetrackergui.ui index ee816eca4..10cc0dd68 100644 --- a/plugins/feature/satellitetracker/satellitetrackergui.ui +++ b/plugins/feature/satellitetracker/satellitetrackergui.ui @@ -482,6 +482,24 @@ + + + + Choose between light and dark themes + + + + + + + :/lightdark.png + :/darklight.png:/lightdark.png + + + true + + + diff --git a/plugins/feature/satellitetracker/satellitetrackersettings.cpp b/plugins/feature/satellitetracker/satellitetrackersettings.cpp index 53fe10f14..d6ef05050 100644 --- a/plugins/feature/satellitetracker/satellitetrackersettings.cpp +++ b/plugins/feature/satellitetracker/satellitetrackersettings.cpp @@ -71,6 +71,7 @@ void SatelliteTrackerSettings::resetToDefaults() m_reverseAPIPort = 8888; m_reverseAPIFeatureSetIndex = 0; m_reverseAPIFeatureIndex = 0; + m_chartsDarkTheme = false; for (int i = 0; i < SAT_COL_COLUMNS; i++) { m_columnIndexes[i] = i; @@ -118,6 +119,7 @@ QByteArray SatelliteTrackerSettings::serialize() const s.writeU32(33, m_reverseAPIPort); s.writeU32(34, m_reverseAPIFeatureSetIndex); s.writeU32(35, m_reverseAPIFeatureIndex); + s.writeBool(36, m_chartsDarkTheme); for (int i = 0; i < SAT_COL_COLUMNS; i++) s.writeS32(100 + i, m_columnIndexes[i]); @@ -194,6 +196,7 @@ bool SatelliteTrackerSettings::deserialize(const QByteArray& data) m_reverseAPIFeatureSetIndex = utmp > 99 ? 99 : utmp; d.readU32(35, &utmp, 0); m_reverseAPIFeatureIndex = utmp > 99 ? 99 : utmp; + d.readBool(36, &m_chartsDarkTheme, false); for (int i = 0; i < SAT_COL_COLUMNS; i++) d.readS32(100 + i, &m_columnIndexes[i], i); diff --git a/plugins/feature/satellitetracker/satellitetrackersettings.h b/plugins/feature/satellitetracker/satellitetrackersettings.h index 6caa0bdd9..169fc7cf3 100644 --- a/plugins/feature/satellitetracker/satellitetrackersettings.h +++ b/plugins/feature/satellitetracker/satellitetrackersettings.h @@ -74,6 +74,7 @@ struct SatelliteTrackerSettings QString m_losSpeech; //!< Text to say on LOS QString m_aosCommand; //!< Command/script to execute on AOS QString m_losCommand; //!< Command/script to execute on LOS + bool m_chartsDarkTheme; //!< Set dark theme for charts (effective for GUI only) QHash *> m_deviceSettings; //!< Settings for each device set for each satellite int m_columnIndexes[SAT_COL_COLUMNS];//!< How the columns are ordered in the table diff --git a/plugins/feature/startracker/readme.md b/plugins/feature/startracker/readme.md index c38c5b881..b1071ad7b 100644 --- a/plugins/feature/startracker/readme.md +++ b/plugins/feature/startracker/readme.md @@ -120,6 +120,10 @@ Displays the calculated elevation (angle in degrees - 0 to horizon and 90 to zen

Plots

+

Light or dark theme

+ +click on this icon ![Star Tracker Chart theme](../../../doc/img/StarTracker_chart_theme.png) to switch between light and dark themes for the charts. +

Elevation vs time

![Star Tracker Elevation vs Time](../../../doc/img/StarTracker_elevationvstime.png) @@ -137,11 +141,11 @@ The Solar flux vs frequency plot, shows the solar flux density data from the Lea ![Star Tracker sky temperature](../../../doc/img/StarTracker_skytemp.png) -Background sky temperature maps are available for display at 150MHz, 408MHz and 1420MHz, in both equatorial and galactic coordinates. -For these first six temperature maps, the temperature reported, which is in Kelvin, is for the single pixel corresponding to the target coordinates. -This temperature is therefore valid for a beamwidth of less than 1 degree. +Background sky temperature maps are available for display at 150MHz, 408MHz and 1420MHz, in both equatorial and galactic coordinates. +For these first six temperature maps, the temperature reported, which is in Kelvin, is for the single pixel corresponding to the target coordinates. +This temperature is therefore valid for a beamwidth of less than 1 degree. -The Star Tracker plugin can also estimate a sky temperature based on the user entered observation frequency and beamwidth. +The Star Tracker plugin can also estimate a sky temperature based on the user entered observation frequency and beamwidth. To see this figure, which will be typically lower than the above, select one of the last two temperature maps from the right hand combo box.

Map

diff --git a/plugins/feature/startracker/startrackergui.cpp b/plugins/feature/startracker/startrackergui.cpp index 95e13f8ba..77ea86537 100644 --- a/plugins/feature/startracker/startrackergui.cpp +++ b/plugins/feature/startracker/startrackergui.cpp @@ -304,6 +304,9 @@ void StarTrackerGUI::displaySettings() setTitleColor(m_settings.m_rgbColor); setWindowTitle(m_settings.m_title); blockApplySettings(true); + ui->darkTheme->setChecked(m_settings.m_chartsDarkTheme); + m_solarFluxChart.setTheme(m_settings.m_chartsDarkTheme ? QChart::ChartThemeDark : QChart::ChartThemeLight); + m_chart.setTheme(m_settings.m_chartsDarkTheme ? QChart::ChartThemeDark : QChart::ChartThemeLight); ui->latitude->setValue(m_settings.m_latitude); ui->longitude->setValue(m_settings.m_longitude); ui->target->setCurrentIndex(ui->target->findText(m_settings.m_target)); @@ -944,6 +947,7 @@ void StarTrackerGUI::plotElevationLineChart() QChart *oldChart = m_azElLineChart; m_azElLineChart = new QChart(); + m_azElLineChart->setTheme(m_settings.m_chartsDarkTheme ? QChart::ChartThemeDark : QChart::ChartThemeLight); QDateTimeAxis *xAxis = new QDateTimeAxis(); QValueAxis *yLeftAxis = new QValueAxis(); QValueAxis *yRightAxis = new QValueAxis(); @@ -1060,6 +1064,7 @@ void StarTrackerGUI::plotElevationPolarChart() QChart *oldChart = m_azElPolarChart; m_azElPolarChart = new QPolarChart(); + m_azElPolarChart->setTheme(m_settings.m_chartsDarkTheme ? QChart::ChartThemeDark : QChart::ChartThemeLight); QValueAxis *angularAxis = new QValueAxis(); QCategoryAxis *radialAxis = new QCategoryAxis(); @@ -1453,7 +1458,7 @@ void StarTrackerGUI::updateSolarFlux(bool all) QString solarFluxFile = getSolarFluxFilename(); if (m_dlm.confirmDownload(solarFluxFile, nullptr, 1)) { - QString urlString = QString("http://www.sws.bom.gov.au/Category/World Data Centre/Data Display and Download/Solar Radio/station/learmonth/SRD/%1/L%2.SRD") + QString urlString = QString("https://www.sws.bom.gov.au/Category/World Data Centre/Data Display and Download/Solar Radio/station/learmonth/SRD/%1/L%2.SRD") .arg(today.year()).arg(today.toString("yyMMdd")); m_dlm.download(QUrl(urlString), solarFluxFile, this); } @@ -1475,6 +1480,15 @@ void StarTrackerGUI::on_downloadSolarFlux_clicked() updateSolarFlux(true); } +void StarTrackerGUI::on_darkTheme_clicked(bool checked) +{ + m_settings.m_chartsDarkTheme = checked; + m_solarFluxChart.setTheme(m_settings.m_chartsDarkTheme ? QChart::ChartThemeDark : QChart::ChartThemeLight); + m_chart.setTheme(m_settings.m_chartsDarkTheme ? QChart::ChartThemeDark : QChart::ChartThemeLight); + plotChart(); + applySettings(); +} + void StarTrackerGUI::downloadFinished(const QString& filename, bool success) { (void) filename; diff --git a/plugins/feature/startracker/startrackergui.h b/plugins/feature/startracker/startrackergui.h index 316e2c4b4..4830fa145 100644 --- a/plugins/feature/startracker/startrackergui.h +++ b/plugins/feature/startracker/startrackergui.h @@ -146,6 +146,7 @@ private slots: void plotAreaChanged(const QRectF &plotArea); void autoUpdateSolarFlux(); void on_downloadSolarFlux_clicked(); + void on_darkTheme_clicked(bool checked); void networkManagerFinished(QNetworkReply *reply); void downloadFinished(const QString& filename, bool success); }; diff --git a/plugins/feature/startracker/startrackergui.ui b/plugins/feature/startracker/startrackergui.ui index 95944389b..53dc1c121 100644 --- a/plugins/feature/startracker/startrackergui.ui +++ b/plugins/feature/startracker/startrackergui.ui @@ -563,6 +563,24 @@ This can be specified as a decimal (E.g. 12.23) or in hours, minutes and seconds + + + + Choose between light and dark themes + + + + + + + :/lightdark.png + :/darklight.png:/lightdark.png + + + true + + +
diff --git a/plugins/feature/startracker/startrackersettings.cpp b/plugins/feature/startracker/startrackersettings.cpp index c91d8f031..a1032a9a2 100644 --- a/plugins/feature/startracker/startrackersettings.cpp +++ b/plugins/feature/startracker/startrackersettings.cpp @@ -54,6 +54,7 @@ void StarTrackerSettings::resetToDefaults() m_drawSunOnMap = true; m_drawMoonOnMap = true; m_drawStarOnMap = true; + m_chartsDarkTheme = false; m_title = "Star Tracker"; m_rgbColor = QColor(225, 25, 99).rgb(); m_useReverseAPI = false; @@ -98,6 +99,7 @@ QByteArray StarTrackerSettings::serialize() const s.writeU32(29, m_solarFluxUnits); s.writeDouble(30, m_beamwidth); s.writeU32(31, m_solarFluxData); + s.writeBool(32, m_chartsDarkTheme); return s.final(); } @@ -165,6 +167,7 @@ bool StarTrackerSettings::deserialize(const QByteArray& data) d.readU32(29, (quint32 *)&m_solarFluxUnits, SFU); d.readDouble(30, &m_beamwidth, 25.0); d.readU32(31, (quint32 *)&m_solarFluxData, DRAO_2800); + d.readBool(32, &m_chartsDarkTheme, false); return true; } diff --git a/plugins/feature/startracker/startrackersettings.h b/plugins/feature/startracker/startrackersettings.h index 725016de7..777191e28 100644 --- a/plugins/feature/startracker/startrackersettings.h +++ b/plugins/feature/startracker/startrackersettings.h @@ -52,6 +52,7 @@ struct StarTrackerSettings bool m_drawSunOnMap; bool m_drawMoonOnMap; bool m_drawStarOnMap; + bool m_chartsDarkTheme; // Dark theme for charts QString m_title; quint32 m_rgbColor; diff --git a/sdrgui/resources/darklight.png b/sdrgui/resources/darklight.png new file mode 100644 index 000000000..fd1adad36 Binary files /dev/null and b/sdrgui/resources/darklight.png differ diff --git a/sdrgui/resources/lightdark.png b/sdrgui/resources/lightdark.png new file mode 100644 index 000000000..71f854cfb Binary files /dev/null and b/sdrgui/resources/lightdark.png differ diff --git a/sdrgui/resources/res.qrc b/sdrgui/resources/res.qrc index 44b9a16c4..ba5b32884 100644 --- a/sdrgui/resources/res.qrc +++ b/sdrgui/resources/res.qrc @@ -1,6 +1,8 @@ info.png + darklight.png + lightdark.png arrow_left.png arrow_right.png star.png