mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-22 03:19:25 -04:00
ATV Demod: GUI refactoring: fixed segfault at initialization
This commit is contained in:
parent
78b3e8d69a
commit
c7c2aa1fa7
plugins/channelrx/demodatv
@ -73,8 +73,6 @@ void ATVDemodGUI::resetToDefaults()
|
||||
{
|
||||
blockApplySettings(true);
|
||||
|
||||
//********** RF Default values **********
|
||||
ui->deltaFrequency->setValue(0);
|
||||
//********** ATV Default values **********
|
||||
ui->synchLevel->setValue(100);
|
||||
ui->blackLevel->setValue(310);
|
||||
@ -203,41 +201,40 @@ void ATVDemodGUI::onMenuDoubleClicked()
|
||||
|
||||
ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI,
|
||||
QWidget* objParent) :
|
||||
RollupWidget(objParent), ui(new Ui::ATVDemodGUI), m_objPluginAPI(
|
||||
objPluginAPI), m_objDeviceAPI(objDeviceAPI), m_objChannelMarker(
|
||||
this), m_blnBasicSettingsShown(false), m_blnDoApplySettings(
|
||||
true)
|
||||
RollupWidget(objParent),
|
||||
ui(new Ui::ATVDemodGUI),
|
||||
m_objPluginAPI(objPluginAPI),
|
||||
m_objDeviceAPI(objDeviceAPI),
|
||||
m_objChannelMarker(this),
|
||||
m_blnBasicSettingsShown(false),
|
||||
m_blnDoApplySettings(true)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this,
|
||||
SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this,
|
||||
SLOT(onMenuDoubleClicked()));
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||
|
||||
m_objATVDemod = new ATVDemod();
|
||||
m_objATVDemod->SetATVScreen(ui->screenTV);
|
||||
|
||||
m_objChannelizer = new DownChannelizer(m_objATVDemod);
|
||||
m_objThreadedChannelizer = new ThreadedBasebandSampleSink(m_objChannelizer,
|
||||
this);
|
||||
m_objThreadedChannelizer = new ThreadedBasebandSampleSink(m_objChannelizer, this);
|
||||
m_objDeviceAPI->addThreadedSink(m_objThreadedChannelizer);
|
||||
|
||||
//connect(&m_objPluginAPI->getMainWindow()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms
|
||||
|
||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||
ui->deltaFrequency->setValueRange(7, 0U, 9999999U);
|
||||
|
||||
connect(m_objChannelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged()));
|
||||
|
||||
//m_objPluginAPI->addThreadedSink(m_objThreadedChannelizer);
|
||||
//connect(&m_objPluginAPI->getMainWindow()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms
|
||||
|
||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||
ui->deltaFrequency->setValueRange(7, 0U, 9999999U);
|
||||
|
||||
m_objChannelMarker.setColor(Qt::white);
|
||||
m_objChannelMarker.setBandwidth(6000000);
|
||||
|
||||
m_objChannelMarker.setCenterFrequency(0);
|
||||
m_objChannelMarker.setVisible(true);
|
||||
|
||||
connect(&m_objChannelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||
//connect(&m_objChannelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
|
||||
|
||||
m_objDeviceAPI->registerChannelInstance(m_strChannelID, this);
|
||||
m_objDeviceAPI->addChannelMarker(&m_objChannelMarker);
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>480</width>
|
||||
<width>520</width>
|
||||
<height>480</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -18,7 +18,7 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>480</width>
|
||||
<width>520</width>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -39,8 +39,8 @@
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>461</width>
|
||||
<height>26</height>
|
||||
<width>501</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -76,6 +76,12 @@
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Monospace</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -123,6 +129,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="rfBWText">
|
||||
<property name="text">
|
||||
<string>10.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
@ -139,7 +152,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="channelSampleRateText">
|
||||
<property name="text">
|
||||
<string>00000 kS/s</string>
|
||||
<string>00000k</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -150,7 +163,7 @@
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<width>462</width>
|
||||
<width>501</width>
|
||||
<height>347</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -193,7 +206,7 @@
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>390</y>
|
||||
<width>461</width>
|
||||
<width>501</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -26,7 +26,7 @@
|
||||
const PluginDescriptor ATVDemodPlugin::m_ptrPluginDescriptor =
|
||||
{
|
||||
QString("ATV Demodulator"),
|
||||
QString("3.3.0"),
|
||||
QString("3.3.1"),
|
||||
QString("(c) F4HKW for F4EXB / SDRAngel"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
Loading…
Reference in New Issue
Block a user