1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-11-17 13:43:17 -05:00

SigMF file sink: GUI changes

This commit is contained in:
f4exb 2020-07-08 20:05:23 +02:00
parent 2cb96ed187
commit 80ea534840
4 changed files with 304 additions and 263 deletions

View File

@ -200,7 +200,7 @@ DeviceSampleSource *SigMFFileSink::getLocalDevice(uint32_t index)
} }
else else
{ {
qDebug("SigMFFileSink::getLocalDevice: source device at index %u is not a Local Input source", index); qDebug("SigMFFileSink::getLocalDevice: source device at index %u is not a SigMF File sink", index);
} }
} }
else else

View File

@ -6,14 +6,14 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>340</width> <width>494</width>
<height>112</height> <height>102</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>340</width> <width>494</width>
<height>100</height> <height>102</height>
</size> </size>
</property> </property>
<property name="font"> <property name="font">
@ -33,14 +33,20 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>341</width> <width>492</width>
<height>101</height> <height>100</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>492</width>
<height>100</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Settings</string> <string>Settings</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0"> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0">
<property name="leftMargin"> <property name="leftMargin">
<number>2</number> <number>2</number>
</property> </property>
@ -54,273 +60,308 @@
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
<layout class="QVBoxLayout" name="decimationLayer"> <layout class="QHBoxLayout" name="deltaFrequencyLayout">
<property name="spacing"> <property name="rightMargin">
<number>3</number> <number>2</number>
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="deltaFrequencyLayer"> <widget class="QLabel" name="deltaFrequencyLabel">
<property name="rightMargin"> <property name="minimumSize">
<number>2</number> <size>
<width>16</width>
<height>0</height>
</size>
</property> </property>
<item> <property name="text">
<widget class="QLabel" name="deltaFrequencyLabel"> <string>Df</string>
<property name="minimumSize"> </property>
<size> </widget>
<width>16</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Df</string>
</property>
</widget>
</item>
<item>
<widget class="ValueDialZ" name="deltaFrequency" native="true">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>32</width>
<height>16</height>
</size>
</property>
<property name="font">
<font>
<family>Liberation Mono</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Demod shift frequency from center in Hz</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="deltaUnits">
<property name="text">
<string>Hz </string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="nco">
<property name="text">
<string>NCO</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="decimationLabel">
<property name="text">
<string>Dec</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="decimationFactor">
<property name="maximumSize">
<size>
<width>55</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Decimation factor</string>
</property>
<item>
<property name="text">
<string>1</string>
</property>
</item>
<item>
<property name="text">
<string>2</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>8</string>
</property>
</item>
<item>
<property name="text">
<string>16</string>
</property>
</item>
<item>
<property name="text">
<string>32</string>
</property>
</item>
<item>
<property name="text">
<string>64</string>
</property>
</item>
</widget>
</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>
<item>
<widget class="QLabel" name="channelRateText">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Effective channel rate (kS/s)</string>
</property>
<property name="text">
<string>0000k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="decimationShiftLayer"> <widget class="ValueDialZ" name="deltaFrequency" native="true">
<property name="rightMargin"> <property name="enabled">
<number>10</number> <bool>false</bool>
</property> </property>
<item> <property name="sizePolicy">
<widget class="QLabel" name="positionLabel"> <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<property name="text"> <horstretch>0</horstretch>
<string>Pos</string> <verstretch>0</verstretch>
</property> </sizepolicy>
</widget> </property>
</item> <property name="minimumSize">
<item> <size>
<widget class="QSlider" name="position"> <width>32</width>
<property name="toolTip"> <height>16</height>
<string>Center frequency position</string> </size>
</property> </property>
<property name="maximum"> <property name="font">
<number>2</number> <font>
</property> <family>Liberation Mono</family>
<property name="pageStep"> <pointsize>12</pointsize>
<number>1</number> </font>
</property> </property>
<property name="orientation"> <property name="cursor">
<enum>Qt::Horizontal</enum> <cursorShape>PointingHandCursor</cursorShape>
</property> </property>
</widget> <property name="focusPolicy">
</item> <enum>Qt::StrongFocus</enum>
<item> </property>
<widget class="QLabel" name="filterChainIndex"> <property name="toolTip">
<property name="minimumSize"> <string>Demod shift frequency from center in Hz</string>
<size> </property>
<width>24</width> </widget>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Filter chain hash code</string>
</property>
<property name="text">
<string>000</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="filterChainText">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Filter chain stages left to right (L: low, C: center, H: high) </string>
</property>
<property name="text">
<string>LLLLLL</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <widget class="QLabel" name="deltaUnits">
<property name="text">
<string>Hz </string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="nco">
<property name="text">
<string>NCO</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="decimationLabel">
<property name="text">
<string>Dec</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="decimationFactor">
<property name="maximumSize">
<size>
<width>55</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Decimation factor</string>
</property>
<item> <item>
<widget class="ButtonSwitch" name="record"> <property name="text">
<property name="maximumSize"> <string>1</string>
<size> </property>
<width>24</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrgui/resources/res.qrc">
<normaloff>:/record_off.png</normaloff>:/record_off.png</iconset>
</property>
</widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <property name="text">
<property name="orientation"> <string>2</string>
<enum>Qt::Horizontal</enum> </property>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
</layout> <item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>8</string>
</property>
</item>
<item>
<property name="text">
<string>16</string>
</property>
</item>
<item>
<property name="text">
<string>32</string>
</property>
</item>
<item>
<property name="text">
<string>64</string>
</property>
</item>
</widget>
</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>
<item>
<widget class="QLabel" name="channelRateText">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Effective channel rate (kS/s)</string>
</property>
<property name="text">
<string>0000k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="decimationShiftLayout">
<property name="rightMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="positionLabel">
<property name="text">
<string>Pos</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="position">
<property name="toolTip">
<string>Center frequency position</string>
</property>
<property name="maximum">
<number>2</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="filterChainIndex">
<property name="minimumSize">
<size>
<width>24</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Filter chain hash code</string>
</property>
<property name="text">
<string>000</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="filterChainText">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Filter chain stages left to right (L: low, C: center, H: high) </string>
</property>
<property name="text">
<string>LLLLLL</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="fileNameLayout">
<item>
<widget class="ButtonSwitch" name="record">
<property name="maximumSize">
<size>
<width>24</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrgui/resources/res.qrc">
<normaloff>:/record_off.png</normaloff>:/record_off.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="showFileDialog">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Open file</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrgui/resources/res.qrc">
<normaloff>:/preset-load.png</normaloff>:/preset-load.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="fileNameText">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>File currently opened</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB // // Copyright (C) 2020 Edouard Griffiths, F4EXB //
// // // //
// This program is free software; you can redistribute it and/or modify // // This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by // // it under the terms of the GNU General Public License as published by //

View File

@ -33,7 +33,7 @@ void SigMFFileSinkSettings::resetToDefaults()
m_inputFrequencyOffset = 0; m_inputFrequencyOffset = 0;
m_fileRecordName = ""; m_fileRecordName = "";
m_rgbColor = QColor(140, 4, 4).rgb(); m_rgbColor = QColor(140, 4, 4).rgb();
m_title = "Local sink"; m_title = "SigMF File Sink";
m_log2Decim = 0; m_log2Decim = 0;
m_filterChainHash = 0; m_filterChainHash = 0;
m_channelMarker = nullptr; m_channelMarker = nullptr;
@ -85,7 +85,7 @@ bool SigMFFileSinkSettings::deserialize(const QByteArray& data)
d.readString(3, &m_fileRecordName, ""); d.readString(3, &m_fileRecordName, "");
d.readS32(4, &m_streamIndex, 0); d.readS32(4, &m_streamIndex, 0);
d.readU32(5, &m_rgbColor, QColor(0, 255, 255).rgb()); d.readU32(5, &m_rgbColor, QColor(0, 255, 255).rgb());
d.readString(6, &m_title, "Local sink"); d.readString(6, &m_title, "SigMF File Sink");
d.readBool(7, &m_useReverseAPI, false); d.readBool(7, &m_useReverseAPI, false);
d.readString(8, &m_reverseAPIAddress, "127.0.0.1"); d.readString(8, &m_reverseAPIAddress, "127.0.0.1");
d.readU32(9, &tmp, 0); d.readU32(9, &tmp, 0);