diff --git a/colorprefs.h b/colorprefs.h
index b0ef591..c6961aa 100644
--- a/colorprefs.h
+++ b/colorprefs.h
@@ -16,8 +16,14 @@ struct colorPrefsType{
QColor textColor;
QColor spectrumLine;
QColor spectrumFill;
+ QColor spectrumFillTop;
+ QColor spectrumFillBot;
+ bool useSpectrumFillGradient = false;
QColor underlayLine;
QColor underlayFill;
+ bool useUnderlayFillGradient = false;
+ QColor underlayFillTop;
+ QColor underlayFillBot;
QColor plotBackground;
QColor tuningLine;
QColor passband;
diff --git a/prefs.h b/prefs.h
index dac3544..4fa287d 100644
--- a/prefs.h
+++ b/prefs.h
@@ -41,23 +41,29 @@ enum prefColItem {
col_plotBackground = 1 << 3,
col_spectrumLine = 1 << 4,
col_spectrumFill = 1 << 5,
- col_underlayLine = 1 << 6,
- col_underlayFill = 1 << 7,
- col_tuningLine = 1 << 8,
- col_passband = 1 << 9,
- col_pbtIndicator = 1 << 10,
- col_meterLevel = 1 << 11,
- col_meterAverage = 1 << 12,
- col_meterPeakLevel = 1 << 13,
- col_meterHighScale = 1 << 14,
- col_meterScale = 1 << 15,
- col_meterText = 1 << 16,
- col_waterfallBack = 1 << 17,
- col_waterfallGrid = 1 << 18,
- col_waterfallAxis = 1 << 19,
- col_waterfallText = 1 << 20,
- col_clusterSpots = 1 << 21,
- col_all = 1 << 22
+ col_useSpectrumFillGradient = 1 << 6,
+ col_spectrumFillTop = 1 << 7,
+ col_spectrumFillBot = 1 << 8,
+ col_underlayLine = 1 << 9,
+ col_underlayFill = 1 << 10,
+ col_useUnderlayFillGradient = 1 << 11,
+ col_underlayFillTop = 1 << 12,
+ col_underlayFillBot = 1 << 13,
+ col_tuningLine = 1 << 14,
+ col_passband = 1 << 15,
+ col_pbtIndicator = 1 << 16,
+ col_meterLevel = 1 << 17,
+ col_meterAverage = 1 << 18,
+ col_meterPeakLevel = 1 << 19,
+ col_meterHighScale = 1 << 20,
+ col_meterScale = 1 << 21,
+ col_meterText = 1 << 22,
+ col_waterfallBack = 1 << 23,
+ col_waterfallGrid = 1 << 24,
+ col_waterfallAxis = 1 << 25,
+ col_waterfallText = 1 << 26,
+ col_clusterSpots = 1 << 27,
+ col_all = 1 << 28
};
enum prefRsItem {
diff --git a/settingswidget.cpp b/settingswidget.cpp
index 2286d1c..8625e9f 100644
--- a/settingswidget.cpp
+++ b/settingswidget.cpp
@@ -524,6 +524,23 @@ void settingswidget::updateColPref(prefColItem col)
setColorElement(c, ui->colorSwatchSpecFill, ui->colorEditSpecFill);
break;
}
+ case col_useSpectrumFillGradient:
+ {
+ quietlyUpdateCheckbox(ui->useSpectrumFillGradientChk, colorPreset[pos].useSpectrumFillGradient);
+ break;
+ }
+ case col_spectrumFillTop:
+ {
+ QColor c = (colorPreset[pos].spectrumFillTop);
+ setColorElement(c, ui->colorSwatchSpecFillTop, ui->colorEditSpecFillTop);
+ break;
+ }
+ case col_spectrumFillBot:
+ {
+ QColor c = (colorPreset[pos].spectrumFillBot);
+ setColorElement(c, ui->colorSwatchSpecFillBot, ui->colorEditSpecFillBot);
+ break;
+ }
case col_underlayLine:
{
QColor c = (colorPreset[pos].underlayLine);
@@ -536,6 +553,23 @@ void settingswidget::updateColPref(prefColItem col)
setColorElement(c, ui->colorSwatchUnderlayFill, ui->colorEditUnderlayFill);
break;
}
+ case col_useUnderlayFillGradient:
+ {
+ quietlyUpdateCheckbox(ui->useUnderlayFillGradientChk, colorPreset[pos].useUnderlayFillGradient);
+ break;
+ }
+ case col_underlayFillTop:
+ {
+ QColor c = (colorPreset[pos].underlayFillTop);
+ setColorElement(c, ui->colorSwatchUnderlayFillTop, ui->colorEditUnderlayFillTop);
+ break;
+ }
+ case col_underlayFillBot:
+ {
+ QColor c = (colorPreset[pos].underlayFillBot);
+ setColorElement(c, ui->colorSwatchUnderlayFillBot, ui->colorEditUnderlayFillBot);
+ break;
+ }
case col_tuningLine:
{
QColor c = (colorPreset[pos].tuningLine);
@@ -2147,9 +2181,16 @@ void settingswidget::loadColorPresetToUIandPlots(int presetNumber)
setEditAndLedFromColor(p.textColor, ui->colorEditText, ui->colorSwatchText);
setEditAndLedFromColor(p.spectrumLine, ui->colorEditSpecLine, ui->colorSwatchSpecLine);
setEditAndLedFromColor(p.spectrumFill, ui->colorEditSpecFill, ui->colorSwatchSpecFill);
+ quietlyUpdateCheckbox(ui->useSpectrumFillGradientChk, p.useSpectrumFillGradient);
+ setEditAndLedFromColor(p.spectrumFillTop, ui->colorEditSpecFillTop, ui->colorSwatchSpecFillTop);
+ setEditAndLedFromColor(p.spectrumFillBot, ui->colorEditSpecFillBot, ui->colorSwatchSpecFillBot);
setEditAndLedFromColor(p.underlayLine, ui->colorEditUnderlayLine, ui->colorSwatchUnderlayLine);
setEditAndLedFromColor(p.underlayFill, ui->colorEditUnderlayFill, ui->colorSwatchUnderlayFill);
+ setEditAndLedFromColor(p.underlayFillTop, ui->colorEditUnderlayFillTop, ui->colorSwatchUnderlayFillTop);
+ setEditAndLedFromColor(p.underlayFillBot, ui->colorEditUnderlayFillBot, ui->colorSwatchUnderlayFillBot);
+ quietlyUpdateCheckbox(ui->useUnderlayFillGradientChk, p.useUnderlayFillGradient);
setEditAndLedFromColor(p.plotBackground, ui->colorEditPlotBackground, ui->colorSwatchPlotBackground);
+
setEditAndLedFromColor(p.tuningLine, ui->colorEditTuningLine, ui->colorSwatchTuningLine);
setEditAndLedFromColor(p.passband, ui->colorEditPassband, ui->colorSwatchPassband);
setEditAndLedFromColor(p.pbt, ui->colorEditPBT, ui->colorSwatchPBT);
@@ -2299,6 +2340,44 @@ void settingswidget::on_colorEditSpecFill_editingFinished()
setColorLineEditOperations(c, ui->colorEditSpecFill, ui->colorSwatchSpecFill);
emit changedColPref(col_spectrumFill);
}
+void settingswidget::on_useSpectrumFillGradientChk_clicked(bool checked)
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ colorPreset[pos].useSpectrumFillGradient = checked;
+ emit changedColPref(col_useSpectrumFillGradient);
+}
+
+// SpecFill Top:
+void settingswidget::on_colorSetBtnSpectFillTop_clicked()
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ QColor *c = &(colorPreset[pos].spectrumFillTop);
+ setColorButtonOperations(c, ui->colorEditSpecFillTop, ui->colorSwatchSpecFillTop);
+ emit changedColPref(col_spectrumFillTop);
+}
+void settingswidget::on_colorEditSpecFillTop_editingFinished()
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ QColor *c = &(colorPreset[pos].spectrumFillTop);
+ setColorLineEditOperations(c, ui->colorEditSpecFillTop, ui->colorSwatchSpecFillTop);
+ emit changedColPref(col_spectrumFillTop);
+}
+
+// SpecFill Bot:
+void settingswidget::on_colorSetBtnSpectFillBot_clicked()
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ QColor *c = &(colorPreset[pos].spectrumFillBot);
+ setColorButtonOperations(c, ui->colorEditSpecFillBot, ui->colorSwatchSpecFillBot);
+ emit changedColPref(col_spectrumFillBot);
+}
+void settingswidget::on_colorEditSpecFillBot_editingFinished()
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ QColor *c = &(colorPreset[pos].spectrumFillBot);
+ setColorLineEditOperations(c, ui->colorEditSpecFillBot, ui->colorSwatchSpecFillBot);
+ emit changedColPref(col_spectrumFillBot);
+}
// PlotBackground:
void settingswidget::on_colorEditPlotBackground_editingFinished()
@@ -2348,6 +2427,44 @@ void settingswidget::on_colorEditUnderlayFill_editingFinished()
setColorLineEditOperations(c, ui->colorEditUnderlayFill, ui->colorSwatchUnderlayFill);
emit changedColPref(col_underlayFill);
}
+void settingswidget::on_useUnderlayFillGradientChk_clicked(bool checked)
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ colorPreset[pos].useUnderlayFillGradient = checked;
+ emit changedColPref(col_useUnderlayFillGradient);
+}
+
+// Underlay Fill Top:
+void settingswidget::on_colorSetBtnUnderlayFillTop_clicked()
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ QColor *c = &(colorPreset[pos].underlayFillTop);
+ setColorButtonOperations(c, ui->colorEditUnderlayFillTop, ui->colorSwatchUnderlayFillTop);
+ emit changedColPref(col_underlayFillTop);
+}
+void settingswidget::on_colorEditUnderlayFillTop_editingFinished()
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ QColor *c = &(colorPreset[pos].underlayFillTop);
+ setColorLineEditOperations(c, ui->colorEditUnderlayFillTop, ui->colorSwatchUnderlayFillTop);
+ emit changedColPref(col_underlayFillTop);
+}
+
+// Underlay Fill Bot:
+void settingswidget::on_colorSetBtnUnderlayFillBot_clicked()
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ QColor *c = &(colorPreset[pos].underlayFillBot);
+ setColorButtonOperations(c, ui->colorEditUnderlayFillBot, ui->colorSwatchUnderlayFillBot);
+ emit changedColPref(col_underlayFillBot);
+}
+void settingswidget::on_colorEditUnderlayFillBot_editingFinished()
+{
+ int pos = ui->colorPresetCombo->currentIndex();
+ QColor *c = &(colorPreset[pos].underlayFillBot);
+ setColorLineEditOperations(c, ui->colorEditUnderlayFillBot, ui->colorSwatchUnderlayFillBot);
+ emit changedColPref(col_underlayFillBot);
+}
// WF Background:
void settingswidget::on_colorSetBtnwfBackground_clicked()
@@ -2736,8 +2853,6 @@ void settingswidget::connectionStatus(bool conn)
}
}
-
-
void settingswidget::on_connectBtn_clicked()
{
emit connectButtonPressed();
@@ -2749,9 +2864,7 @@ void settingswidget::on_saveSettingsBtn_clicked()
emit saveSettingsButtonPressed();
}
-
void settingswidget::on_revertSettingsBtn_clicked()
{
emit revertSettingsButtonPressed();
}
-
diff --git a/settingswidget.h b/settingswidget.h
index 3e20578..0dabc6e 100644
--- a/settingswidget.h
+++ b/settingswidget.h
@@ -249,6 +249,26 @@ private slots:
void on_revertSettingsBtn_clicked();
+ void on_colorSetBtnSpectFillTop_clicked();
+
+ void on_colorEditSpecFillTop_editingFinished();
+
+ void on_colorSetBtnSpectFillBot_clicked();
+
+ void on_colorEditSpecFillBot_editingFinished();
+
+ void on_useSpectrumFillGradientChk_clicked(bool checked);
+
+ void on_colorSetBtnUnderlayFillTop_clicked();
+
+ void on_colorEditUnderlayFillTop_editingFinished();
+
+ void on_colorSetBtnUnderlayFillBot_clicked();
+
+ void on_colorEditUnderlayFillBot_editingFinished();
+
+ void on_useUnderlayFillGradientChk_clicked(bool checked);
+
private:
Ui::settingswidget *ui;
void createSettingsListItems();
diff --git a/settingswidget.ui b/settingswidget.ui
index 7abb81d..01f1aba 100644
--- a/settingswidget.ui
+++ b/settingswidget.ui
@@ -7,7 +7,7 @@
0
0
1118
- 561
+ 585
@@ -41,7 +41,7 @@
-
- 0
+ 1
@@ -1296,8 +1296,8 @@ ONLY use Manual CI-V when Transceive mode is not supported
0
0
- 582
- 254
+ 916
+ 327
@@ -1322,28 +1322,11 @@ ONLY use Manual CI-V when Transceive mode is not supported
6
- -
-
-
-
- 10
- 0
-
-
-
+
-
+
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
+
-
+
90
@@ -1355,96 +1338,6 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
-
- Meter Text
-
-
-
- -
-
-
- Grid
-
-
-
- -
-
-
- Text
-
-
-
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
-
@@ -1458,8 +1351,8 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
90
@@ -1471,10 +1364,109 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
- Meter Scale
+ Spectrum Line
+
+
+
+ -
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+ Axis
+
+
+
+ -
+
+
+ Grid
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
@@ -1494,8 +1486,22 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
+
+ Meter Peak Level
+
+
+
+ -
+
+
+ Underlay Line
+
+
+
+ -
+
10
@@ -1504,72 +1510,24 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
-
- Waterfall Back
-
-
-
- -
-
-
- Axis
-
-
-
- -
-
-
+
-
+
+
- 90
- 16777215
+ 10
+ 0
-
- #AARRGGBB
-
- -
-
-
- Plot Background
-
-
-
- -
-
-
+
-
+
+
- 90
- 16777215
+ 10
+ 0
-
- #AARRGGBB
-
-
-
- -
-
-
- Spectrum Line
-
-
-
- -
-
-
- Spectrum Fill
-
-
-
- -
-
-
- Underlay Line
-
-
@@ -1585,8 +1543,18 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
90
@@ -1598,7 +1566,102 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
+
-
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ -
+
+
+ Text
+
+
+
+ -
+
+
+ Spectrum Fill Top
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
@@ -1611,8 +1674,8 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
10
@@ -1621,8 +1684,95 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
+
+ Plot Background
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
+
+ Spectrum Gradient
+
+
+
+ -
+
+
+ Underlay Fill
+
+
+
+ -
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
10
@@ -1641,8 +1791,8 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
10
@@ -1651,15 +1801,15 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
- Underlay Fill
+ Meter Average
- -
-
+
-
+
90
@@ -1671,8 +1821,15 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
+
+ Passband
+
+
+
+ -
+
10
@@ -1681,6 +1838,33 @@ ONLY use Manual CI-V when Transceive mode is not supported
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+ Waterfall Grid
+
+
+
+ -
+
+
+ Waterfall Back
+
+
+
-
@@ -1701,218 +1885,8 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
-
- Passband
-
-
-
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
-
- PBT Indicator
-
-
-
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
-
- Meter Level
-
-
-
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
-
- Meter Average
-
-
-
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
-
- Meter Peak Level
-
-
-
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
-
- Meter High Scale
-
-
-
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
- -
-
-
- Waterfall Grid
-
-
-
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
+
-
+
10
@@ -1928,29 +1902,6 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
-
-
- 90
- 16777215
-
-
-
- #AARRGGBB
-
-
-
- -
-
-
-
- 10
- 0
-
-
-
-
-
@@ -1958,8 +1909,8 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
90
@@ -1971,8 +1922,15 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
+
-
+
+
+ Meter Level
+
+
+
+ -
+
10
@@ -1981,14 +1939,109 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
+
-
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
+
+ Meter Text
+
+
+
+ -
+
+
+ Spectrum Fill Bot
+
+
+
+ -
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
+
+ Spectrum Fill
+
+
+
+ -
+
+
+
+ 10
+ 0
+
+
+
+
+ -
+
+
+ PBT Indicator
+
+
+
+ -
+
+
+ Meter Scale
+
+
+
+ -
+
+
+ Meter High Scale
+
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+
+ 10
+ 0
+
+
+
+
+ -
Cluster Spots
- -
+
-
@@ -2002,9 +2055,12 @@ ONLY use Manual CI-V when Transceive mode is not supported
16777215
+
+ #AARRGGBB
+
- -
+
-
@@ -2014,8 +2070,74 @@ ONLY use Manual CI-V when Transceive mode is not supported
+ -
+
+
+ Underlay Gradient
+
+
+
+ -
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+ Underlay Fill Top
+
+
+
+ -
+
+
+ -
+
+
+
+ 90
+ 16777215
+
+
+
+ #AARRGGBB
+
+
+
+ -
+
+
+ Underlay Fill Bot
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
@@ -2023,19 +2145,6 @@ ONLY use Manual CI-V when Transceive mode is not supported
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 20
-
-
-
-
diff --git a/spectrumscope.cpp b/spectrumscope.cpp
index f684bfd..0217df0 100644
--- a/spectrumscope.cpp
+++ b/spectrumscope.cpp
@@ -284,18 +284,18 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
configTheme->setAccessibleName("Waterfall display color theme");
configTheme->setAccessibleDescription("Selects the color theme for the waterfall display");
configTheme->setToolTip("Waterfall color theme");
- configTheme->addItem("Theme Jet", QCPColorGradient::gpJet);
- configTheme->addItem("Theme Cold", QCPColorGradient::gpCold);
- configTheme->addItem("Theme Hot", QCPColorGradient::gpHot);
- configTheme->addItem("Theme Therm", QCPColorGradient::gpThermal);
- configTheme->addItem("Theme Night", QCPColorGradient::gpNight);
- configTheme->addItem("Theme Ion", QCPColorGradient::gpIon);
- configTheme->addItem("Theme Gray", QCPColorGradient::gpGrayscale);
- configTheme->addItem("Theme Geo", QCPColorGradient::gpGeography);
- configTheme->addItem("Theme Hues", QCPColorGradient::gpHues);
- configTheme->addItem("Theme Polar", QCPColorGradient::gpPolar);
- configTheme->addItem("Theme Spect", QCPColorGradient::gpSpectrum);
- configTheme->addItem("Theme Candy", QCPColorGradient::gpCandy);
+ configTheme->addItem("Jet", QCPColorGradient::gpJet);
+ configTheme->addItem("Cold", QCPColorGradient::gpCold);
+ configTheme->addItem("Hot", QCPColorGradient::gpHot);
+ configTheme->addItem("Therm", QCPColorGradient::gpThermal);
+ configTheme->addItem("Night", QCPColorGradient::gpNight);
+ configTheme->addItem("Ion", QCPColorGradient::gpIon);
+ configTheme->addItem("Gray", QCPColorGradient::gpGrayscale);
+ configTheme->addItem("Geo", QCPColorGradient::gpGeography);
+ configTheme->addItem("Hues", QCPColorGradient::gpHues);
+ configTheme->addItem("Polar", QCPColorGradient::gpPolar);
+ configTheme->addItem("Spect", QCPColorGradient::gpSpectrum);
+ configTheme->addItem("Candy", QCPColorGradient::gpCandy);
configTheme->setSizeAdjustPolicy(QComboBox::AdjustToContents);
configLayout->addRow("Theme",configTheme);
@@ -313,7 +313,7 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
configFilterWidth = new QSlider(Qt::Orientation::Horizontal);
configFilterWidth->setRange(0,10000);
- configLayout->addRow("Fil Width",configFilterWidth);
+ configLayout->addRow("Fill Width",configFilterWidth);
connect(configLength, &QSlider::valueChanged, this, [=](const int &val) {
prepareWf(val);
@@ -518,10 +518,28 @@ void spectrumScope::colorPreset(colorPrefsType *cp)
pbtIndicator->setBrush(QBrush(cp->pbt));
spectrum->graph(0)->setPen(QPen(cp->spectrumLine));
- spectrum->graph(0)->setBrush(QBrush(cp->spectrumFill));
+ if(cp->useSpectrumFillGradient) {
+ spectrumGradient.setStart(QPointF(0,1));
+ spectrumGradient.setFinalStop(QPointF(0,0));
+ spectrumGradient.setCoordinateMode(QLinearGradient::ObjectMode);
+ spectrumGradient.setColorAt(0, cp->spectrumFillBot);
+ spectrumGradient.setColorAt(1, cp->spectrumFillTop);
+ spectrum->graph(0)->setBrush(QBrush(spectrumGradient));
+ } else {
+ spectrum->graph(0)->setBrush(QBrush(cp->spectrumFill));
+ }
spectrum->graph(1)->setPen(QPen(cp->underlayLine));
- spectrum->graph(1)->setBrush(QBrush(cp->underlayFill));
+ if(cp->useUnderlayFillGradient) {
+ underlayGradient.setStart(QPointF(0,1));
+ underlayGradient.setFinalStop(QPointF(0,0));
+ underlayGradient.setCoordinateMode(QLinearGradient::ObjectMode);
+ underlayGradient.setColorAt(0, cp->underlayFillBot);
+ underlayGradient.setColorAt(1, cp->underlayFillTop);
+ spectrum->graph(1)->setBrush(QBrush(underlayGradient));
+ } else {
+ spectrum->graph(1)->setBrush(QBrush(cp->underlayFill));
+ }
waterfall->yAxis->setBasePen(cp->wfAxis);
waterfall->yAxis->setTickPen(cp->wfAxis);
diff --git a/spectrumscope.h b/spectrumscope.h
index 9427902..d7f46bc 100644
--- a/spectrumscope.h
+++ b/spectrumscope.h
@@ -149,6 +149,8 @@ private:
QLabel* windowLabel = Q_NULLPTR;
QCustomPlot* spectrum = Q_NULLPTR;
QCustomPlot* waterfall = Q_NULLPTR;
+ QLinearGradient spectrumGradient;
+ QLinearGradient underlayGradient;
freqCtrl* freqDisplay[2];
QSpacerItem* displaySpacer;
QGroupBox* group;
diff --git a/wfmain.cpp b/wfmain.cpp
index 5623592..8c43e8b 100644
--- a/wfmain.cpp
+++ b/wfmain.cpp
@@ -1680,8 +1680,14 @@ void wfmain::loadSettings()
p->textColor.setNamedColor(settings->value("textColor", p->textColor.name(QColor::HexArgb)).toString());
p->spectrumLine.setNamedColor(settings->value("spectrumLine", p->spectrumLine.name(QColor::HexArgb)).toString());
p->spectrumFill.setNamedColor(settings->value("spectrumFill", p->spectrumFill.name(QColor::HexArgb)).toString());
+ p->useSpectrumFillGradient = settings->value("useSpectrumFillGradient", p->useSpectrumFillGradient).toBool();
+ p->spectrumFillTop.setNamedColor(settings->value("spectrumFillTop", p->spectrumFillTop.name(QColor::HexArgb)).toString());
+ p->spectrumFillBot.setNamedColor(settings->value("spectrumFillBot", p->spectrumFillBot.name(QColor::HexArgb)).toString());
p->underlayLine.setNamedColor(settings->value("underlayLine", p->underlayLine.name(QColor::HexArgb)).toString());
p->underlayFill.setNamedColor(settings->value("underlayFill", p->underlayFill.name(QColor::HexArgb)).toString());
+ p->useUnderlayFillGradient = settings->value("useUnderlayFillGradient", p->useUnderlayFillGradient).toBool();
+ p->underlayFillTop.setNamedColor(settings->value("underlayFillTop", p->underlayFillTop.name(QColor::HexArgb)).toString());
+ p->underlayFillBot.setNamedColor(settings->value("underlayFillBot", p->underlayFillBot.name(QColor::HexArgb)).toString());
p->plotBackground.setNamedColor(settings->value("plotBackground", p->plotBackground.name(QColor::HexArgb)).toString());
p->tuningLine.setNamedColor(settings->value("tuningLine", p->tuningLine.name(QColor::HexArgb)).toString());
p->passband.setNamedColor(settings->value("passband", p->passband.name(QColor::HexArgb)).toString());
@@ -2391,8 +2397,14 @@ void wfmain::extChangedColPref(prefColItem i)
case col_plotBackground:
case col_spectrumLine:
case col_spectrumFill:
+ case col_useSpectrumFillGradient:
+ case col_spectrumFillTop:
+ case col_spectrumFillBot:
case col_underlayLine:
case col_underlayFill:
+ case col_underlayFillTop:
+ case col_underlayFillBot:
+ case col_useUnderlayFillGradient:
case col_tuningLine:
case col_passband:
case col_pbtIndicator:
@@ -2898,8 +2910,14 @@ void wfmain::saveSettings()
settings->setValue("textColor", p->textColor.name(QColor::HexArgb));
settings->setValue("spectrumLine", p->spectrumLine.name(QColor::HexArgb));
settings->setValue("spectrumFill", p->spectrumFill.name(QColor::HexArgb));
+ settings->setValue("useSpectrumFillGradient", p->useSpectrumFillGradient);
+ settings->setValue("spectrumFillTop", p->spectrumFillTop.name(QColor::HexArgb));
+ settings->setValue("spectrumFillBot", p->spectrumFillBot.name(QColor::HexArgb));
settings->setValue("underlayLine", p->underlayLine.name(QColor::HexArgb));
settings->setValue("underlayFill", p->underlayFill.name(QColor::HexArgb));
+ settings->setValue("useUnderlayFillGradient", p->useUnderlayFillGradient);
+ settings->setValue("underlayFillTop", p->underlayFillTop.name(QColor::HexArgb));
+ settings->setValue("underlayFillBot", p->underlayFillBot.name(QColor::HexArgb));
settings->setValue("plotBackground", p->plotBackground.name(QColor::HexArgb));
settings->setValue("tuningLine", p->tuningLine.name(QColor::HexArgb));
settings->setValue("passband", p->passband.name(QColor::HexArgb));
@@ -4960,8 +4978,6 @@ void wfmain::setDefaultColorPresets()
}
}
-
-
void wfmain::on_showLogBtn_clicked()
{
if(logWindow->isMinimized())
@@ -5084,8 +5100,6 @@ void wfmain::receiveClusterOutput(QString text) {
setupui->insertClusterOutputText(text);
}
-
-
void wfmain::changePollTiming(int timing_ms, bool setUI)
{
queue->interval(timing_ms);