1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-10-01 09:16:39 -04:00

BFM demod: RDS GUI part #7: cosmetic corrections on group 8 display

This commit is contained in:
f4exb 2015-12-15 08:54:13 +01:00
parent bbf2469431
commit 4387136420
2 changed files with 74 additions and 25 deletions

View File

@ -501,24 +501,17 @@ void BFMDemodGUI::rdsUpdate(bool force)
if (m_rdsParser.m_g0_af_updated) if (m_rdsParser.m_g0_af_updated)
{ {
bool isFirst = true; ui->g00AltFrequenciesBox->clear();
std::ostringstream os;
os << std::fixed << std::showpoint << std::setprecision(2);
for (std::set<double>::iterator it = m_rdsParser.m_g0_alt_freq.begin(); it != m_rdsParser.m_g0_alt_freq.end(); ++it) for (std::set<double>::iterator it = m_rdsParser.m_g0_alt_freq.begin(); it != m_rdsParser.m_g0_alt_freq.end(); ++it)
{ {
if (*it > 76.0) if (*it > 76.0)
{ {
if (!isFirst) { std::ostringstream os;
os << ", "; os << std::fixed << std::showpoint << std::setprecision(2) << *it;
} ui->g00AltFrequenciesBox->addItem(QString(os.str().c_str()));
os << *it;
isFirst = false;
} }
} }
ui->g00AltFrequencies->setText(QString(os.str().c_str()));
} }
} }
else else
@ -608,7 +601,8 @@ void BFMDemodGUI::rdsUpdate(bool force)
ui->g08Extent->setText(QString(os.str().c_str())); ui->g08Extent->setText(QString(os.str().c_str()));
int event_line = RDSTMC::get_tmc_event_code_index(m_rdsParser.m_g8_event, 1); int event_line = RDSTMC::get_tmc_event_code_index(m_rdsParser.m_g8_event, 1);
ui->g08TMCEvent->setText(QString(RDSTMC::get_tmc_events(event_line, 1).c_str())); ui->g08TMCEvent->setText(QString(RDSTMC::get_tmc_events(event_line, 1).c_str()));
ui->g08Location->setNum((int) m_rdsParser.m_g8_location); QString pistring(str(boost::format("%04X") % m_rdsParser.m_g8_location).c_str());
ui->g08Location->setText(pistring);
if (m_rdsParser.m_g8_label_index >= 0) { if (m_rdsParser.m_g8_label_index >= 0) {
ui->g08Description->setText(QString(m_rdsParser.label_descriptions[m_rdsParser.m_g8_label_index].c_str())); ui->g08Description->setText(QString(m_rdsParser.label_descriptions[m_rdsParser.m_g8_label_index].c_str()));

View File

@ -1234,9 +1234,15 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="g00MusicSpeech"> <widget class="QLabel" name="g00MusicSpeech">
<property name="maximumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>50</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -1250,9 +1256,15 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="g00MonoStereo"> <widget class="QLabel" name="g00MonoStereo">
<property name="maximumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>50</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -1265,15 +1277,37 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="g00AltFrequencies"> <widget class="QComboBox" name="g00AltFrequenciesBox">
<property name="toolTip"> <property name="minimumSize">
<string>Alternate frequencies (MHz)</string> <size>
<width>80</width>
<height>0</height>
</size>
</property> </property>
<property name="text"> <property name="maximumSize">
<string>00.00</string> <size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Alternalte frequencies (MHz)</string>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item> <item>
@ -1385,6 +1419,22 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="g08Location">
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Location code</string>
</property>
<property name="text">
<string>0000</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QLabel" name="g08Extent"> <widget class="QLabel" name="g08Extent">
<property name="maximumSize"> <property name="maximumSize">
@ -1393,6 +1443,9 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="toolTip">
<string>Extent</string>
</property>
<property name="text"> <property name="text">
<string>+0</string> <string>+0</string>
</property> </property>
@ -1400,13 +1453,9 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="g08TMCEvent"> <widget class="QLabel" name="g08TMCEvent">
<property name="text"> <property name="toolTip">
<string>___</string> <string>TMC event</string>
</property> </property>
</widget>
</item>
<item>
<widget class="QLabel" name="g08Location">
<property name="text"> <property name="text">
<string>___</string> <string>___</string>
</property> </property>
@ -1414,6 +1463,9 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="g08Description"> <widget class="QLabel" name="g08Description">
<property name="toolTip">
<string>Description</string>
</property>
<property name="text"> <property name="text">
<string>___</string> <string>___</string>
</property> </property>
@ -1427,6 +1479,9 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="toolTip">
<string>Content</string>
</property>
<property name="text"> <property name="text">
<string>0</string> <string>0</string>
</property> </property>