1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-16 12:49:15 -04:00

Use font from UI definition in GLScope and GLSpectrum. Use smaller font (8pt). Time offset in cents instead of mills

This commit is contained in:
f4exb
2015-07-07 02:50:26 +02:00
parent 8924be1a31
commit 133e072b19
7 changed files with 36 additions and 20 deletions
+8 -8
View File
@@ -373,7 +373,7 @@
</property>
<property name="font">
<font>
<family>Courier</family>
<family>Monospace</family>
<pointsize>8</pointsize>
</font>
</property>
@@ -422,7 +422,7 @@
</property>
<property name="font">
<font>
<family>Courier</family>
<family>Monospace</family>
<pointsize>8</pointsize>
</font>
</property>
@@ -435,6 +435,12 @@
</widget>
</widget>
<customwidgets>
<customwidget>
<class>GLScope</class>
<extends>QWidget</extends>
<header>gui/glscope.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GLSpectrum</class>
<extends>QWidget</extends>
@@ -459,12 +465,6 @@
<header>gui/valuedial.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GLScope</class>
<extends>QWidget</extends>
<header>gui/glscope.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GLScopeGUI</class>
<extends>QWidget</extends>
+6
View File
@@ -298,6 +298,12 @@
<height>250</height>
</size>
</property>
<property name="font">
<font>
<family>Monospace</family>
<pointsize>8</pointsize>
</font>
</property>
</widget>
</item>
<item>
+2
View File
@@ -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();
+2 -2
View File
@@ -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)
+5 -5
View File
@@ -201,7 +201,7 @@
<number>100</number>
</property>
<property name="pageStep">
<number>5</number>
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -251,10 +251,10 @@
<number>0</number>
</property>
<property name="maximum">
<number>1000</number>
<number>100</number>
</property>
<property name="pageStep">
<number>10</number>
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -369,10 +369,10 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
<enum>QSlider::NoTicks</enum>
</property>
<property name="tickInterval">
<number>1</number>
<number>10</number>
</property>
</widget>
</item>
+2
View File
@@ -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++) {
+11 -5
View File
@@ -42,6 +42,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Monospace</family>
<pointsize>8</pointsize>
</font>
</property>
</widget>
</item>
</layout>
@@ -477,11 +483,6 @@
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>GLSpectrum</class>
<extends>QWidget</extends>
@@ -494,6 +495,11 @@
<header>gui/glspectrumgui.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ChannelWindow</class>
<extends>QWidget</extends>