From fd86efa4b90123882d45a2d86474f69784d35dcc Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sun, 5 Feb 2023 13:21:12 +0000 Subject: [PATCH] Add color picker for PBT --- wfmain.cpp | 16 ++ wfmain.h | 4 + wfmain.ui | 730 +++++++++++++++++++++++++++-------------------------- 3 files changed, 399 insertions(+), 351 deletions(-) diff --git a/wfmain.cpp b/wfmain.cpp index ef8f8c8..e898a14 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -8196,6 +8196,7 @@ void wfmain::loadColorPresetToUIandPlots(int presetNumber) 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); setEditAndLedFromColor(p.meterLevel, ui->colorEditMeterLevel, ui->colorSwatchMeterLevel); setEditAndLedFromColor(p.meterAverage, ui->colorEditMeterAvg, ui->colorSwatchMeterAverage); @@ -8449,6 +8450,7 @@ void wfmain::on_colorSetBtnPassband_clicked() QColor* c = &(colorPreset[pos].passband); setColorButtonOperations(c, ui->colorEditPassband, ui->colorSwatchPassband); } + void wfmain::on_colorEditPassband_editingFinished() { int pos = ui->colorPresetCombo->currentIndex(); @@ -8456,6 +8458,20 @@ void wfmain::on_colorEditPassband_editingFinished() setColorLineEditOperations(c, ui->colorEditPassband, ui->colorSwatchPassband); } +void wfmain::on_colorSetBtnPBT_clicked() +{ + int pos = ui->colorPresetCombo->currentIndex(); + QColor* c = &(colorPreset[pos].pbt); + setColorButtonOperations(c, ui->colorEditPBT, ui->colorSwatchPBT); +} + +void wfmain::on_colorEditPBT_editingFinished() +{ + int pos = ui->colorPresetCombo->currentIndex(); + QColor* c = &(colorPreset[pos].pbt); + setColorLineEditOperations(c, ui->colorEditPBT, ui->colorSwatchPBT); +} + // Meter Level: void wfmain::on_colorSetBtnMeterLevel_clicked() { diff --git a/wfmain.h b/wfmain.h index 300a7ab..fa790a3 100644 --- a/wfmain.h +++ b/wfmain.h @@ -686,6 +686,10 @@ private slots: void on_colorEditPassband_editingFinished(); + void on_colorSetBtnPBT_clicked(); + + void on_colorEditPBT_editingFinished(); + void on_colorSetBtnMeterLevel_clicked(); void on_colorEditMeterLevel_editingFinished(); diff --git a/wfmain.ui b/wfmain.ui index 8ebb962..78f9851 100644 --- a/wfmain.ui +++ b/wfmain.ui @@ -18,7 +18,7 @@ - 0 + 3 @@ -1821,7 +1821,6 @@ DejaVu Sans Mono 14 - 75 true @@ -2246,7 +2245,7 @@ - 4 + 1 @@ -3444,8 +3443,8 @@ 0 0 - 570 - 224 + 820 + 302 @@ -3470,8 +3469,8 @@ 6 - - + + 10 @@ -3480,10 +3479,46 @@ - - + + + + + 10 + 0 + + + + + + + + + 90 + 16777215 + + - Text + #AARRGGBB + + + + + + + + 90 + 16777215 + + + + #AARRGGBB + + + + + + + Meter Text @@ -3494,20 +3529,59 @@ - - + + - Waterfall Axis + Text - - + + + + + 90 + 16777215 + + - Axis + #AARRGGBB + + + + + 10 + 0 + + + + + + + + + 10 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -3518,6 +3592,19 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -3531,6 +3618,133 @@ + + + + Meter Scale + + + + + + + + 90 + 16777215 + + + + Color text format is #AARRGGBB, where AA is the "alpha" channel, and value "00" is totally transparent, and "ff" is totally opaque. + + + #AARRGGBB + + + + + + + + 10 + 0 + + + + + + + + Waterfall Back + + + + + + + Axis + + + + + + + + 90 + 16777215 + + + + #AARRGGBB + + + + + + + Plot Background + + + + + + + + 90 + 16777215 + + + + #AARRGGBB + + + + + + + Spectrum Line + + + + + + + Spectrum Fill + + + + + + + Underlay Line + + + + + + + + 90 + 16777215 + + + + #AARRGGBB + + + + + + + + 90 + 16777215 + + + + #AARRGGBB + + + @@ -3544,10 +3758,13 @@ - - - - Plot Background + + + + + 10 + 0 + @@ -3561,69 +3778,6 @@ - - - - - 90 - 16777215 - - - - #AARRGGBB - - - - - - - Spectrum Line - - - - - - - - 10 - 0 - - - - - - - - - 90 - 16777215 - - - - #AARRGGBB - - - - - - - Waterfall Back - - - - - - - - 90 - 16777215 - - - - #AARRGGBB - - - @@ -3634,125 +3788,6 @@ - - - - - 90 - 16777215 - - - - #AARRGGBB - - - - - - - - 90 - 16777215 - - - - #AARRGGBB - - - - - - - - 90 - 16777215 - - - - #AARRGGBB - - - - - - - Spectrum Fill - - - - - - - Waterfall Grid - - - - - - - - 90 - 16777215 - - - - #AARRGGBB - - - - - - - - 90 - 16777215 - - - - #AARRGGBB - - - - - - - Underlay Line - - - - - - - - 10 - 0 - - - - - - - - Waterfall Text - - - - - - - - 90 - 16777215 - - - - Color text format is #AARRGGBB, where AA is the "alpha" channel, and value "00" is totally transparent, and "ff" is totally opaque. - - - #AARRGGBB - - - @@ -3763,64 +3798,15 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 10 - 0 - + + + + Underlay Fill - - - - - 10 - 0 - - - - - - - - - 10 - 0 - - - - - - + + 90 @@ -3832,15 +3818,8 @@ - - - - Meter Text - - - - - + + 10 @@ -3849,8 +3828,15 @@ - - + + + + Tuning Line + + + + + 90 @@ -3862,15 +3848,8 @@ - - - - Meter Scale - - - - - + + 10 @@ -3879,8 +3858,15 @@ - - + + + + Passband + + + + + 90 @@ -3892,22 +3878,25 @@ - - - - Meter High Scale + + + + + 10 + 0 + - - + + - Meter Peak Level + PBT Indicator - - + + 90 @@ -3919,8 +3908,8 @@ - - + + 10 @@ -3929,36 +3918,6 @@ - - - - - 10 - 0 - - - - - - - - - 90 - 16777215 - - - - #AARRGGBB - - - - - - - Meter Average - - - @@ -3989,15 +3948,15 @@ - - + + - Passband + Meter Average - - + + 90 @@ -4009,8 +3968,8 @@ - - + + 10 @@ -4019,15 +3978,15 @@ - - + + - Tuning Line + Meter Peak Level - - + + 90 @@ -4039,8 +3998,8 @@ - - + + 10 @@ -4049,18 +4008,15 @@ - - - - - 10 - 0 - + + + + Meter High Scale - - + + 90 @@ -4072,10 +4028,63 @@ - - + + + + + 10 + 0 + + + + + + - Underlay Fill + Waterfall Grid + + + + + + + + 90 + 16777215 + + + + #AARRGGBB + + + + + + + + 10 + 0 + + + + + + + + Waterfall Axis + + + + + + + + 90 + 16777215 + + + + #AARRGGBB @@ -4089,8 +4098,28 @@ - - + + + + Waterfall Text + + + + + + + + 90 + 16777215 + + + + #AARRGGBB + + + + + 10 @@ -5455,7 +5484,6 @@ - 50 false @@ -5475,7 +5503,7 @@ 0 0 1042 - 21 + 22 @@ -5502,8 +5530,8 @@ + -