From 133e072b19821b66542d216a303112f514bef30f Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 7 Jul 2015 02:50:26 +0200 Subject: [PATCH] Use font from UI definition in GLScope and GLSpectrum. Use smaller font (8pt). Time offset in cents instead of mills --- plugins/channel/chanalyzer/chanalyzergui.ui | 16 ++++++++-------- plugins/channel/ssb/ssbdemodgui.ui | 6 ++++++ sdrbase/gui/glscope.cpp | 2 ++ sdrbase/gui/glscopegui.cpp | 4 ++-- sdrbase/gui/glscopegui.ui | 10 +++++----- sdrbase/gui/glspectrum.cpp | 2 ++ sdrbase/mainwindow.ui | 16 +++++++++++----- 7 files changed, 36 insertions(+), 20 deletions(-) diff --git a/plugins/channel/chanalyzer/chanalyzergui.ui b/plugins/channel/chanalyzer/chanalyzergui.ui index ca1bbc7f9..c6bf26f9a 100644 --- a/plugins/channel/chanalyzer/chanalyzergui.ui +++ b/plugins/channel/chanalyzer/chanalyzergui.ui @@ -373,7 +373,7 @@ - Courier + Monospace 8 @@ -422,7 +422,7 @@ - Courier + Monospace 8 @@ -435,6 +435,12 @@ + + GLScope + QWidget +
gui/glscope.h
+ 1 +
GLSpectrum QWidget @@ -459,12 +465,6 @@
gui/valuedial.h
1
- - GLScope - QWidget -
gui/glscope.h
- 1 -
GLScopeGUI QWidget diff --git a/plugins/channel/ssb/ssbdemodgui.ui b/plugins/channel/ssb/ssbdemodgui.ui index e3c832ccd..d58ca69c5 100644 --- a/plugins/channel/ssb/ssbdemodgui.ui +++ b/plugins/channel/ssb/ssbdemodgui.ui @@ -298,6 +298,12 @@ 250 + + + Monospace + 8 + + diff --git a/sdrbase/gui/glscope.cpp b/sdrbase/gui/glscope.cpp index a1dacca67..d31bdf1e0 100644 --- a/sdrbase/gui/glscope.cpp +++ b/sdrbase/gui/glscope.cpp @@ -538,6 +538,7 @@ void GLScope::applyConfig() m_left1ScalePixmap.fill(Qt::black); QPainter painter(&m_left1ScalePixmap); painter.setPen(QColor(0xf0, 0xf0, 0xff)); + painter.setFont(font()); const ScaleEngine::TickList* tickList; const ScaleEngine::Tick* tick; tickList = &m_powerScale.getTickList(); @@ -604,6 +605,7 @@ void GLScope::applyConfig() m_left1ScalePixmap.fill(Qt::black); QPainter painter(&m_left1ScalePixmap); painter.setPen(QColor(0xf0, 0xf0, 0xff)); + painter.setFont(font()); const ScaleEngine::TickList* tickList; const ScaleEngine::Tick* tick; tickList = &m_powerScale.getTickList(); diff --git a/sdrbase/gui/glscopegui.cpp b/sdrbase/gui/glscopegui.cpp index 188522c64..a3616012b 100644 --- a/sdrbase/gui/glscopegui.cpp +++ b/sdrbase/gui/glscopegui.cpp @@ -173,8 +173,8 @@ void GLScopeGUI::on_time_valueChanged(int value) void GLScopeGUI::on_timeOfs_valueChanged(int value) { m_timeOffset = value; - ui->timeOfsText->setText(tr("%1").arg(value/1000.0, 0, 'f', 3)); - m_glScope->setTimeOfsProMill(value); + ui->timeOfsText->setText(tr("%1").arg(value/100.0, 0, 'f', 2)); + m_glScope->setTimeOfsProMill(value*10); } void GLScopeGUI::on_dataMode_currentIndexChanged(int index) diff --git a/sdrbase/gui/glscopegui.ui b/sdrbase/gui/glscopegui.ui index 6bf0454a3..212c36d2a 100644 --- a/sdrbase/gui/glscopegui.ui +++ b/sdrbase/gui/glscopegui.ui @@ -201,7 +201,7 @@ 100 - 5 + 1 Qt::Horizontal @@ -251,10 +251,10 @@ 0 - 1000 + 100 - 10 + 1 Qt::Horizontal @@ -369,10 +369,10 @@ Qt::Horizontal - QSlider::TicksBelow + QSlider::NoTicks - 1 + 10 diff --git a/sdrbase/gui/glspectrum.cpp b/sdrbase/gui/glspectrum.cpp index 8b5d6a1c9..21730e7b0 100644 --- a/sdrbase/gui/glspectrum.cpp +++ b/sdrbase/gui/glspectrum.cpp @@ -1156,6 +1156,7 @@ void GLSpectrum::applyChanges() { QPainter painter(&m_leftMarginPixmap); painter.setPen(QColor(0xf0, 0xf0, 0xff)); + painter.setFont(font()); const ScaleEngine::TickList* tickList; const ScaleEngine::Tick* tick; if(m_displayWaterfall) { @@ -1199,6 +1200,7 @@ void GLSpectrum::applyChanges() painter.setBrush(Qt::transparent); painter.drawRect(leftMargin, 0, width() - leftMargin, frequencyScaleHeight); painter.setPen(QColor(0xf0, 0xf0, 0xff)); + painter.setFont(font()); const ScaleEngine::TickList* tickList = &m_frequencyScale.getTickList(); const ScaleEngine::Tick* tick; for(int i = 0; i < tickList->count(); i++) { diff --git a/sdrbase/mainwindow.ui b/sdrbase/mainwindow.ui index 19e31e7bf..af8a782b5 100644 --- a/sdrbase/mainwindow.ui +++ b/sdrbase/mainwindow.ui @@ -42,6 +42,12 @@ 0 + + + Monospace + 8 + + @@ -477,11 +483,6 @@ - - ButtonSwitch - QToolButton -
gui/buttonswitch.h
-
GLSpectrum QWidget @@ -494,6 +495,11 @@
gui/glspectrumgui.h
1
+ + ButtonSwitch + QToolButton +
gui/buttonswitch.h
+
ChannelWindow QWidget