diff --git a/doc/img/BeamsteeringCWMod_plugin.png b/doc/img/BeamsteeringCWMod_plugin.png index 0a0dead8c..56c30be23 100644 Binary files a/doc/img/BeamsteeringCWMod_plugin.png and b/doc/img/BeamsteeringCWMod_plugin.png differ diff --git a/doc/img/BeamsteeringCWMod_plugin.xcf b/doc/img/BeamsteeringCWMod_plugin.xcf index beb80beb8..dbe0728d3 100644 Binary files a/doc/img/BeamsteeringCWMod_plugin.xcf and b/doc/img/BeamsteeringCWMod_plugin.xcf differ diff --git a/doc/img/DeviceWindow.png b/doc/img/DeviceWindow.png new file mode 100644 index 000000000..b5b625a3c Binary files /dev/null and b/doc/img/DeviceWindow.png differ diff --git a/doc/img/DeviceWindow.xcf b/doc/img/DeviceWindow.xcf new file mode 100644 index 000000000..fa1ca2efb Binary files /dev/null and b/doc/img/DeviceWindow.xcf differ diff --git a/doc/img/DeviceWindow_bottom.png b/doc/img/DeviceWindow_bottom.png new file mode 100644 index 000000000..eb436eabc Binary files /dev/null and b/doc/img/DeviceWindow_bottom.png differ diff --git a/doc/img/DeviceWindow_bottom.xcf b/doc/img/DeviceWindow_bottom.xcf new file mode 100644 index 000000000..dc4a86e70 Binary files /dev/null and b/doc/img/DeviceWindow_bottom.xcf differ diff --git a/doc/img/DeviceWindow_top.png b/doc/img/DeviceWindow_top.png new file mode 100644 index 000000000..5cae79348 Binary files /dev/null and b/doc/img/DeviceWindow_top.png differ diff --git a/doc/img/DeviceWindow_top.xcf b/doc/img/DeviceWindow_top.xcf new file mode 100644 index 000000000..89aec7d38 Binary files /dev/null and b/doc/img/DeviceWindow_top.xcf differ diff --git a/doc/img/MainWindow_presets.png b/doc/img/MainWindow_presets.png index 31791a730..f6e1b7096 100644 Binary files a/doc/img/MainWindow_presets.png and b/doc/img/MainWindow_presets.png differ diff --git a/doc/img/MainWindow_presets.xcf b/doc/img/MainWindow_presets.xcf index ace00b859..51008e7cc 100644 Binary files a/doc/img/MainWindow_presets.xcf and b/doc/img/MainWindow_presets.xcf differ diff --git a/doc/img/MainWindow_presets_view.png b/doc/img/MainWindow_presets_view.png index ee48e7bb8..6fece5e25 100644 Binary files a/doc/img/MainWindow_presets_view.png and b/doc/img/MainWindow_presets_view.png differ diff --git a/doc/img/MainWindow_presets_view.xcf b/doc/img/MainWindow_presets_view.xcf index 11ba24eba..802ba0869 100644 Binary files a/doc/img/MainWindow_presets_view.xcf and b/doc/img/MainWindow_presets_view.xcf differ diff --git a/plugins/channelrx/demodadsb/readme.md b/plugins/channelrx/demodadsb/readme.md index 48cc25afb..8237c0d2f 100644 --- a/plugins/channelrx/demodadsb/readme.md +++ b/plugins/channelrx/demodadsb/readme.md @@ -2,6 +2,8 @@

Introduction

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + The ADS-B demodulator plugin can be used to receive and display ADS-B aircraft information. This is information about an aircraft, such as position, altitude, heading and speed, broadcast by aircraft on 1090MHz, in the 1090ES (Extended Squitter) format. 1090ES frames have a chip rate of 2Mchip/s, so the baseband sample rate should be set to be greater than 2MSa/s. As well as displaying information received via ADS-B, the plugin can also combine information from a number of databases to display more information about the aircraft and flight. diff --git a/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.cpp b/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.cpp index 6639a8b06..6621d25ac 100644 --- a/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.cpp +++ b/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.cpp @@ -29,7 +29,6 @@ #include "device/deviceuiset.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspdevicemimoengine.h" @@ -100,8 +99,7 @@ BladeRF2MIMOGui::BladeRF2MIMOGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_sampleMIMO->setMessageQueueToGUI(&m_inputMessageQueue); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStopRx); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); sendSettings(); makeUIConnections(); @@ -794,21 +792,26 @@ void BladeRF2MIMOGui::updateStatus() void BladeRF2MIMOGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } float BladeRF2MIMOGui::getGainDB(int gainValue, int gainMin, int gainMax, int gainStep, float gainScale) diff --git a/plugins/samplemimo/bladerf2mimo/readme.md b/plugins/samplemimo/bladerf2mimo/readme.md index 5425a54bb..f8dc2c303 100644 --- a/plugins/samplemimo/bladerf2mimo/readme.md +++ b/plugins/samplemimo/bladerf2mimo/readme.md @@ -19,6 +19,8 @@ The BladeRF Host library is also provided by many Linux distributions (check its

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![BladeRF2 MIMO plugin GUI](../../../doc/img/BladeRF2MIMO_plugin.png)

1. Rx/Tx settings selection

diff --git a/plugins/samplemimo/limesdrmimo/limesdrmimogui.cpp b/plugins/samplemimo/limesdrmimo/limesdrmimogui.cpp index ceeb25951..0e94a7ec5 100644 --- a/plugins/samplemimo/limesdrmimo/limesdrmimogui.cpp +++ b/plugins/samplemimo/limesdrmimo/limesdrmimogui.cpp @@ -28,7 +28,6 @@ #include "device/deviceuiset.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspdevicemimoengine.h" @@ -100,8 +99,7 @@ LimeSDRMIMOGUI::LimeSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_limeSDRMIMO->setMessageQueueToGUI(&m_inputMessageQueue); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStopRx); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); sendSettings(); makeUIConnections(); @@ -1126,21 +1124,26 @@ void LimeSDRMIMOGUI::on_antenna_currentIndexChanged(int index) void LimeSDRMIMOGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void LimeSDRMIMOGUI::makeUIConnections() diff --git a/plugins/samplemimo/limesdrmimo/readme.md b/plugins/samplemimo/limesdrmimo/readme.md index dee0039c4..6e70b2046 100644 --- a/plugins/samplemimo/limesdrmimo/readme.md +++ b/plugins/samplemimo/limesdrmimo/readme.md @@ -10,6 +10,8 @@ This MIMO plugin sends and receives its samples to/from a [LimeSDR device](https

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![LimeSDR MIMO plugin GUI](../../../doc/img/LimeSDRMIMO_plugin.png)

1. Rx/Tx settings selection

diff --git a/plugins/samplemimo/metismiso/metismisogui.cpp b/plugins/samplemimo/metismiso/metismisogui.cpp index 47b6b5b60..b7d5ce714 100644 --- a/plugins/samplemimo/metismiso/metismisogui.cpp +++ b/plugins/samplemimo/metismiso/metismisogui.cpp @@ -28,7 +28,6 @@ #include "device/deviceuiset.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspdevicemimoengine.h" @@ -73,8 +72,7 @@ MetisMISOGui::MetisMISOGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_sampleMIMO->setMessageQueueToGUI(&m_inputMessageQueue); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); makeUIConnections(); } @@ -564,21 +562,26 @@ void MetisMISOGui::updateSubsamplingIndex() void MetisMISOGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void MetisMISOGui::makeUIConnections() diff --git a/plugins/samplemimo/metismiso/readme.md b/plugins/samplemimo/metismiso/readme.md index 02dced384..c8ca6f173 100644 --- a/plugins/samplemimo/metismiso/readme.md +++ b/plugins/samplemimo/metismiso/readme.md @@ -17,6 +17,8 @@ The plugin is present in the core of the software and thus is always present in

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![Metis MISO plugin GUI](../../../doc/img/MetisMISO_plugin.png)

1: Active stream selection

diff --git a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp index 412b34629..497e18a6e 100644 --- a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp +++ b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp @@ -27,7 +27,6 @@ #include "device/deviceuiset.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspdevicemimoengine.h" @@ -93,8 +92,7 @@ PlutoSDRMIMOGUI::PlutoSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) : ui->swDecimLabel->setText(QString::fromUtf8("S\u2193")); ui->lpFIRDecimationLabel->setText(QString::fromUtf8("\u2193")); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStopRx); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); blockApplySettings(true); displaySettings(); @@ -881,21 +879,26 @@ void PlutoSDRMIMOGUI::on_sampleRateMode_toggled(bool checked) void PlutoSDRMIMOGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void PlutoSDRMIMOGUI::makeUIConnections() diff --git a/plugins/samplemimo/plutosdrmimo/readme.md b/plugins/samplemimo/plutosdrmimo/readme.md index e571f1151..e30bfd53d 100644 --- a/plugins/samplemimo/plutosdrmimo/readme.md +++ b/plugins/samplemimo/plutosdrmimo/readme.md @@ -36,6 +36,8 @@ Then add the following defines on `cmake` command line when compiling SDRangel:

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![PlutoSDR MIMO plugin GUI](../../../doc/img/PlutoSDRMIMO_plugin.png)

1. Rx/Tx settings selection

diff --git a/plugins/samplemimo/testmi/readme.md b/plugins/samplemimo/testmi/readme.md index 1f66d548e..639506a4a 100644 --- a/plugins/samplemimo/testmi/readme.md +++ b/plugins/samplemimo/testmi/readme.md @@ -10,6 +10,8 @@ The plugin is present in the core of the software and thus is always present in

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![Test source input plugin GUI](../../../doc/img/TestSourceInput_plugin.png)

1: Common stream parameters

diff --git a/plugins/samplemimo/testmi/testmigui.cpp b/plugins/samplemimo/testmi/testmigui.cpp index 173e71eb5..061305401 100644 --- a/plugins/samplemimo/testmi/testmigui.cpp +++ b/plugins/samplemimo/testmi/testmigui.cpp @@ -28,7 +28,6 @@ #include "device/deviceuiset.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspdevicemimoengine.h" @@ -85,8 +84,7 @@ TestMIGui::TestMIGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_sampleMIMO->setMessageQueueToGUI(&m_inputMessageQueue); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); makeUIConnections(); } @@ -551,21 +549,26 @@ void TestMIGui::updateSampleRateAndFrequency() void TestMIGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void TestMIGui::makeUIConnections() diff --git a/plugins/samplemimo/testmi/testmisettings.h b/plugins/samplemimo/testmi/testmisettings.h index 95898b1ac..063b9ba19 100644 --- a/plugins/samplemimo/testmi/testmisettings.h +++ b/plugins/samplemimo/testmi/testmisettings.h @@ -65,7 +65,8 @@ struct TestMIStreamSettings { void resetToDefaults(); }; -struct TestMISettings { +struct TestMISettings +{ bool m_useReverseAPI; QString m_reverseAPIAddress; uint16_t m_reverseAPIPort; diff --git a/plugins/samplemimo/testmosync/readme.md b/plugins/samplemimo/testmosync/readme.md index 8c053be4d..e805cc17b 100644 --- a/plugins/samplemimo/testmosync/readme.md +++ b/plugins/samplemimo/testmosync/readme.md @@ -10,6 +10,8 @@ The plugin is always built.

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![Test MO sync plugin GUI](../../../doc/img/TestMOSync_plugin.png)

1: Start/Stop

diff --git a/plugins/samplemimo/testmosync/testmosyncgui.cpp b/plugins/samplemimo/testmosync/testmosyncgui.cpp index 845844ac8..c4e3f45aa 100644 --- a/plugins/samplemimo/testmosync/testmosyncgui.cpp +++ b/plugins/samplemimo/testmosync/testmosyncgui.cpp @@ -24,6 +24,7 @@ #include "plugin/pluginapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" +#include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" #include "dsp/spectrumvis.h" @@ -83,6 +84,7 @@ TestMOSyncGui::TestMOSyncGui(DeviceUISet *deviceUISet, QWidget* parent) : m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(false, 0); m_deviceUISet->setSpectrumScalingFactor(SDR_TX_SCALEF); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); } TestMOSyncGui::~TestMOSyncGui() @@ -289,6 +291,30 @@ void TestMOSyncGui::tick() { } +void TestMOSyncGui::openDeviceSettingsDialog(const QPoint& p) +{ + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + + dialog.move(p); + dialog.exec(); + + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + + sendSettings(); + } + + resetContextMenuType(); +} + void TestMOSyncGui::makeUIConnections() { QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &TestMOSyncGui::on_centerFrequency_changed); diff --git a/plugins/samplemimo/testmosync/testmosyncgui.h b/plugins/samplemimo/testmosync/testmosyncgui.h index 13a509d67..be24d06e1 100644 --- a/plugins/samplemimo/testmosync/testmosyncgui.h +++ b/plugins/samplemimo/testmosync/testmosyncgui.h @@ -85,6 +85,7 @@ private slots: void on_startStop_toggled(bool checked); void on_interp_currentIndexChanged(int index); void on_spectrumIndex_currentIndexChanged(int index); + void openDeviceSettingsDialog(const QPoint& p); void updateHardware(); void updateStatus(); void tick(); diff --git a/plugins/samplemimo/testmosync/testmosyncsettings.cpp b/plugins/samplemimo/testmosync/testmosyncsettings.cpp index ca026deec..5b53cdcf7 100644 --- a/plugins/samplemimo/testmosync/testmosyncsettings.cpp +++ b/plugins/samplemimo/testmosync/testmosyncsettings.cpp @@ -32,6 +32,10 @@ void TestMOSyncSettings::resetToDefaults() m_log2Interp = 0; m_fcPosTx = FC_POS_CENTER; m_workspaceIndex = 0; + m_useReverseAPI = false; + m_reverseAPIAddress = "127.0.0.1"; + m_reverseAPIPort = 8888; + m_reverseAPIDeviceIndex = 0; } QByteArray TestMOSyncSettings::serialize() const @@ -43,6 +47,10 @@ QByteArray TestMOSyncSettings::serialize() const s.writeS32(3, (int) m_fcPosTx); s.writeS32(4, m_workspaceIndex); s.writeBlob(5, m_geometryBytes); + s.writeBool(6, m_useReverseAPI); + s.writeString(7, m_reverseAPIAddress); + s.writeU32(8, m_reverseAPIPort); + s.writeU32(9, m_reverseAPIDeviceIndex); return s.final(); } @@ -60,6 +68,7 @@ bool TestMOSyncSettings::deserialize(const QByteArray& data) if (d.getVersion() == 1) { int intval; + uint32_t utmp; d.readU64(1, &m_sampleRate, 48000); d.readU32(2, &m_log2Interp, 0); @@ -67,6 +76,18 @@ bool TestMOSyncSettings::deserialize(const QByteArray& data) m_fcPosTx = (fcPos_t) intval; d.readS32(4, &m_workspaceIndex, 0); d.readBlob(5, &m_geometryBytes); + d.readBool(1, &m_useReverseAPI, false); + d.readString(2, &m_reverseAPIAddress, "127.0.0.1"); + d.readU32(3, &utmp, 0); + + if ((utmp > 1023) && (utmp < 65535)) { + m_reverseAPIPort = utmp; + } else { + m_reverseAPIPort = 8888; + } + + d.readU32(4, &utmp, 0); + m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp; return true; } diff --git a/plugins/samplemimo/testmosync/testmosyncsettings.h b/plugins/samplemimo/testmosync/testmosyncsettings.h index 23976fb85..8743979a7 100644 --- a/plugins/samplemimo/testmosync/testmosyncsettings.h +++ b/plugins/samplemimo/testmosync/testmosyncsettings.h @@ -31,6 +31,10 @@ struct TestMOSyncSettings { quint64 m_sampleRate; quint32 m_log2Interp; fcPos_t m_fcPosTx; + bool m_useReverseAPI; + QString m_reverseAPIAddress; + uint16_t m_reverseAPIPort; + uint16_t m_reverseAPIDeviceIndex; int m_workspaceIndex; QByteArray m_geometryBytes; diff --git a/plugins/samplemimo/xtrxmimo/readme.md b/plugins/samplemimo/xtrxmimo/readme.md index 9041318c8..9037dac77 100644 --- a/plugins/samplemimo/xtrxmimo/readme.md +++ b/plugins/samplemimo/xtrxmimo/readme.md @@ -40,6 +40,8 @@ For a group the syntax is the same but the group name is prefixed with `@` like:

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![XTRX MIMO plugin GUI](../../../doc/img/XTRXMIMO_plugin.png)

1. Rx/Tx settings selection

diff --git a/plugins/samplemimo/xtrxmimo/xtrxmimogui.cpp b/plugins/samplemimo/xtrxmimo/xtrxmimogui.cpp index b054ff5df..dea49ea2d 100644 --- a/plugins/samplemimo/xtrxmimo/xtrxmimogui.cpp +++ b/plugins/samplemimo/xtrxmimo/xtrxmimogui.cpp @@ -26,7 +26,6 @@ #include "device/deviceuiset.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspdevicemimoengine.h" @@ -97,8 +96,7 @@ XTRXMIMOGUI::XTRXMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_xtrxMIMO->setMessageQueueToGUI(&m_inputMessageQueue); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStopRx); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); sendSettings(); makeUIConnections(); @@ -1002,21 +1000,26 @@ void XTRXMIMOGUI::on_antenna_currentIndexChanged(int index) void XTRXMIMOGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void XTRXMIMOGUI::makeUIConnections() diff --git a/plugins/samplesink/audiooutput/audiooutputgui.cpp b/plugins/samplesink/audiooutput/audiooutputgui.cpp index d298dfe39..a9664a96b 100644 --- a/plugins/samplesink/audiooutput/audiooutputgui.cpp +++ b/plugins/samplesink/audiooutput/audiooutputgui.cpp @@ -21,7 +21,6 @@ #include "ui_audiooutputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "gui/audioselectdialog.h" #include "dsp/dspengine.h" @@ -49,9 +48,7 @@ AudioOutputGui::AudioOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_helpURL = "plugins/samplesink/audiooutput/readme.md"; connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware())); - - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); m_sampleRate = m_audioOutput->getSampleRate(); m_centerFrequency = m_audioOutput->getCenterFrequency(); @@ -227,21 +224,26 @@ void AudioOutputGui::updateHardware() void AudioOutputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void AudioOutputGui::makeUIConnections() diff --git a/plugins/samplesink/audiooutput/readme.md b/plugins/samplesink/audiooutput/readme.md index 7275c48a9..dacf5d877 100644 --- a/plugins/samplesink/audiooutput/readme.md +++ b/plugins/samplesink/audiooutput/readme.md @@ -6,6 +6,8 @@ This output plugin sends its samples to an audio device.

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![Audio output plugin GUI](../../../doc/img/AudioOutput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesink/bladerf1output/bladerf1outputgui.cpp b/plugins/samplesink/bladerf1output/bladerf1outputgui.cpp index b8766bb00..fa5a967e0 100644 --- a/plugins/samplesink/bladerf1output/bladerf1outputgui.cpp +++ b/plugins/samplesink/bladerf1output/bladerf1outputgui.cpp @@ -23,7 +23,6 @@ #include "ui_bladerf1outputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -66,8 +65,7 @@ Bladerf1OutputGui::Bladerf1OutputGui(DeviceUISet *deviceUISet, QWidget* parent) connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); makeUIConnections(); @@ -448,21 +446,26 @@ unsigned int Bladerf1OutputGui::getXb200Index(bool xb_200, bladerf_xb200_path xb void Bladerf1OutputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void Bladerf1OutputGui::makeUIConnections() diff --git a/plugins/samplesink/bladerf1output/readme.md b/plugins/samplesink/bladerf1output/readme.md index 9617d8ca5..8de72b15f 100644 --- a/plugins/samplesink/bladerf1output/readme.md +++ b/plugins/samplesink/bladerf1output/readme.md @@ -37,6 +37,8 @@ The BladeRF Host library is also provided by many Linux distributions (check its

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![BladeRF1 output plugin GUI](../../../doc/img/BladeRF1Output_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp b/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp index fd40138d2..7e82197d2 100644 --- a/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp +++ b/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp @@ -23,7 +23,6 @@ #include "ui_bladerf2outputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -80,8 +79,7 @@ BladeRF2OutputGui::BladeRF2OutputGui(DeviceUISet *deviceUISet, QWidget* parent) connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); makeUIConnections(); @@ -426,21 +424,26 @@ void BladeRF2OutputGui::updateStatus() void BladeRF2OutputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } float BladeRF2OutputGui::getGainDB(int gainValue) diff --git a/plugins/samplesink/bladerf2output/readme.md b/plugins/samplesink/bladerf2output/readme.md index 661dfa507..5288003dd 100644 --- a/plugins/samplesink/bladerf2output/readme.md +++ b/plugins/samplesink/bladerf2output/readme.md @@ -14,6 +14,8 @@ The BladeRF Host library is also provided by many Linux distributions (check its

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![BladeRF2 output plugin GUI](../../../doc/img/BladeRF2Output_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesink/fileoutput/fileoutputgui.cpp b/plugins/samplesink/fileoutput/fileoutputgui.cpp index 918944a15..dfdef4781 100644 --- a/plugins/samplesink/fileoutput/fileoutputgui.cpp +++ b/plugins/samplesink/fileoutput/fileoutputgui.cpp @@ -27,6 +27,7 @@ #include "plugin/pluginapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" +#include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -76,6 +77,7 @@ FileOutputGui::FileOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_deviceSampleSink = (FileOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); } FileOutputGui::~FileOutputGui() @@ -323,6 +325,30 @@ void FileOutputGui::tick() } } +void FileOutputGui::openDeviceSettingsDialog(const QPoint& p) +{ + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + + dialog.move(p); + dialog.exec(); + + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + + sendSettings(); + } + + resetContextMenuType(); +} + void FileOutputGui::makeUIConnections() { QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &FileOutputGui::on_centerFrequency_changed); diff --git a/plugins/samplesink/fileoutput/fileoutputgui.h b/plugins/samplesink/fileoutput/fileoutputgui.h index ef3445595..a95c25b92 100644 --- a/plugins/samplesink/fileoutput/fileoutputgui.h +++ b/plugins/samplesink/fileoutput/fileoutputgui.h @@ -89,6 +89,7 @@ private slots: void on_startStop_toggled(bool checked); void on_showFileDialog_clicked(bool checked); void on_interp_currentIndexChanged(int index); + void openDeviceSettingsDialog(const QPoint& p); void updateHardware(); void updateStatus(); void tick(); diff --git a/plugins/samplesink/fileoutput/readme.md b/plugins/samplesink/fileoutput/readme.md index a54dcdf63..6ba050a36 100644 --- a/plugins/samplesink/fileoutput/readme.md +++ b/plugins/samplesink/fileoutput/readme.md @@ -18,6 +18,8 @@ The plugin is always built.

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![File output plugin GUI](../../../doc/img/FileOutput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesink/hackrfoutput/hackrfoutputgui.cpp b/plugins/samplesink/hackrfoutput/hackrfoutputgui.cpp index 03e613cd3..e48eba340 100644 --- a/plugins/samplesink/hackrfoutput/hackrfoutputgui.cpp +++ b/plugins/samplesink/hackrfoutput/hackrfoutputgui.cpp @@ -22,7 +22,6 @@ #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -62,8 +61,7 @@ HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); displayBandwidths(); @@ -443,21 +441,26 @@ void HackRFOutputGui::updateStatus() void HackRFOutputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void HackRFOutputGui::makeUIConnections() diff --git a/plugins/samplesink/hackrfoutput/readme.md b/plugins/samplesink/hackrfoutput/readme.md index 512e18488..898e7b3e0 100644 --- a/plugins/samplesink/hackrfoutput/readme.md +++ b/plugins/samplesink/hackrfoutput/readme.md @@ -6,6 +6,8 @@ This output sample sink plugin sends its samples to a [HackRF device](https://gr

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![HackRF output plugin GUI](../../../doc/img/HackRFOutput_plugin.png)

1: Start/Stop

@@ -111,4 +113,4 @@ When a device set for the same physical device is present the device center freq When the center frequency position Fc (control 9) is set to center (Cen) in both Tx and Rx the actual frequency of reception and transmission are the same. -In other cases for both frequencies to match you have to set the same sample rate and Fc position (either Inf or Sup) in the Tx and Rx. \ No newline at end of file +In other cases for both frequencies to match you have to set the same sample rate and Fc position (either Inf or Sup) in the Tx and Rx. diff --git a/plugins/samplesink/limesdroutput/limesdroutputgui.cpp b/plugins/samplesink/limesdroutput/limesdroutputgui.cpp index c8e9f9777..158da7f39 100644 --- a/plugins/samplesink/limesdroutput/limesdroutputgui.cpp +++ b/plugins/samplesink/limesdroutput/limesdroutputgui.cpp @@ -21,7 +21,6 @@ #include "ui_limesdroutputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -93,9 +92,7 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceUISet->m_deviceAPI->getDeviceUID()); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); - - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); sendSettings(); makeUIConnections(); @@ -619,21 +616,26 @@ void LimeSDROutputGUI::on_sampleRateMode_toggled(bool checked) void LimeSDROutputGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void LimeSDROutputGUI::makeUIConnections() diff --git a/plugins/samplesink/limesdroutput/readme.md b/plugins/samplesink/limesdroutput/readme.md index eecccd764..71dbc87e7 100644 --- a/plugins/samplesink/limesdroutput/readme.md +++ b/plugins/samplesink/limesdroutput/readme.md @@ -32,6 +32,8 @@ Then add the following defines on `cmake` command line:

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![LimeSDR output plugin GUI](../../../doc/img/LimeSDROutput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesink/localoutput/localoutputgui.cpp b/plugins/samplesink/localoutput/localoutputgui.cpp index c85432967..22a1da49f 100644 --- a/plugins/samplesink/localoutput/localoutputgui.cpp +++ b/plugins/samplesink/localoutput/localoutputgui.cpp @@ -32,7 +32,6 @@ #include "ui_localoutputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -67,8 +66,7 @@ LocalOutputGui::LocalOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : .arg(palette().highlight().color().darker(115).name()))); m_helpURL = "plugins/samplesink/localoutput/readme.md"; - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); @@ -282,21 +280,26 @@ void LocalOutputGui::updateStatus() void LocalOutputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void LocalOutputGui::makeUIConnections() diff --git a/plugins/samplesink/localoutput/readme.md b/plugins/samplesink/localoutput/readme.md index fedd3fcfd..796ec7f2a 100644 --- a/plugins/samplesink/localoutput/readme.md +++ b/plugins/samplesink/localoutput/readme.md @@ -6,6 +6,8 @@ This output sample sink plugin sends its samples to a Local Source channel in an

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![SDR Local output plugin GUI](../../../doc/img/LocalOutput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesink/plutosdroutput/plutosdroutputgui.cpp b/plugins/samplesink/plutosdroutput/plutosdroutputgui.cpp index a0aaf5368..edb24a8d7 100644 --- a/plugins/samplesink/plutosdroutput/plutosdroutputgui.cpp +++ b/plugins/samplesink/plutosdroutput/plutosdroutputgui.cpp @@ -22,7 +22,6 @@ #include "dsp/dspengine.h" #include "dsp/dspcommands.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "device/deviceapi.h" #include "device/deviceuiset.h" @@ -70,8 +69,7 @@ PlutoSDROutputGUI::PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) ui->swInterpLabel->setText(QString::fromUtf8("S\u2191")); ui->lpFIRInterpolationLabel->setText(QString::fromUtf8("\u2191")); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); blockApplySettings(true); displaySettings(); @@ -482,21 +480,26 @@ void PlutoSDROutputGUI::updateSampleRateAndFrequency() void PlutoSDROutputGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void PlutoSDROutputGUI::makeUIConnections() diff --git a/plugins/samplesink/plutosdroutput/readme.md b/plugins/samplesink/plutosdroutput/readme.md index fd2a6c223..6907cb500 100644 --- a/plugins/samplesink/plutosdroutput/readme.md +++ b/plugins/samplesink/plutosdroutput/readme.md @@ -27,6 +27,8 @@ Then add the following defines on `cmake` command line when compiling SDRangel:

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![PlutoSDR output plugin GUI](../../../doc/img/PlutoSDROutput_plugin.png)

1: Common stream parameters

diff --git a/plugins/samplesink/remoteoutput/readme.md b/plugins/samplesink/remoteoutput/readme.md index 6f2d154c0..046b61d07 100644 --- a/plugins/samplesink/remoteoutput/readme.md +++ b/plugins/samplesink/remoteoutput/readme.md @@ -16,6 +16,8 @@ The plugin will be built only if the [CM256cc library](https://github.com/f4exb/

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![SDR Remote output plugin GUI](../../../doc/img/RemoteOutput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesink/remoteoutput/remoteoutputgui.cpp b/plugins/samplesink/remoteoutput/remoteoutputgui.cpp index 65343e43f..6a384c80c 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputgui.cpp +++ b/plugins/samplesink/remoteoutput/remoteoutputgui.cpp @@ -28,7 +28,6 @@ #include "plugin/pluginapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -87,8 +86,7 @@ RemoteOutputSinkGui::RemoteOutputSinkGui(DeviceUISet *deviceUISet, QWidget* pare displayEventCounts(); displayEventTimer(); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); sendSettings(); @@ -529,21 +527,26 @@ void RemoteOutputSinkGui::displayRemoteFixedData(const RemoteOutput::MsgReportRe void RemoteOutputSinkGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void RemoteOutputSinkGui::makeUIConnections() diff --git a/plugins/samplesink/soapysdroutput/readme.md b/plugins/samplesink/soapysdroutput/readme.md index 1956a740a..69e49d74a 100644 --- a/plugins/samplesink/soapysdroutput/readme.md +++ b/plugins/samplesink/soapysdroutput/readme.md @@ -65,6 +65,8 @@ When installed the Red Pitaya SoapySDR plugin lists a Red Pitaya device even if

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![SoapySDR input plugin GUI](../../../doc/img/SoapySDROutput_plugin1.png) The top part described by number tags is common for all devices. The bottom part under the "A" tag depends on the SoapySDR device implementation. The corresponding widgets are stacked vertically inside a scrollable area as there may be many controls depending on how the device interface is implemented in SoapySDR. Move the slider on the right to see all parameters available. diff --git a/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp b/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp index fe7f7c800..d6525a0d6 100644 --- a/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp +++ b/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp @@ -25,7 +25,6 @@ #include "util/simpleserializer.h" #include "ui_soapysdroutputgui.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "soapygui/discreterangegui.h" #include "soapygui/intervalrangegui.h" @@ -94,8 +93,7 @@ SoapySDROutputGui::SoapySDROutputGui(DeviceUISet *deviceUISet, QWidget* parent) connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); @@ -872,21 +870,26 @@ void SoapySDROutputGui::updateStatus() void SoapySDROutputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void SoapySDROutputGui::makeUIConnections() diff --git a/plugins/samplesink/testsink/readme.md b/plugins/samplesink/testsink/readme.md index cf3ceff0b..919202ace 100644 --- a/plugins/samplesink/testsink/readme.md +++ b/plugins/samplesink/testsink/readme.md @@ -10,6 +10,8 @@ The plugin is always built.

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![Test sink plugin GUI](../../../doc/img/TestSink.png)

1: Start/Stop

@@ -40,4 +42,4 @@ Use the wheels to adjust the sample rate. Left click on a digit sets the cursor

6: Spectrum display

-This is the final output stream spectrum display after interpolation (4). This would be sent to the hardware device. Controls on the bottom of the panel are identical to the ones of the main spectrum display. \ No newline at end of file +This is the final output stream spectrum display after interpolation (4). This would be sent to the hardware device. Controls on the bottom of the panel are identical to the ones of the main spectrum display. diff --git a/plugins/samplesink/testsink/testsinkgui.cpp b/plugins/samplesink/testsink/testsinkgui.cpp index e63ba074c..08b6bcb59 100644 --- a/plugins/samplesink/testsink/testsinkgui.cpp +++ b/plugins/samplesink/testsink/testsinkgui.cpp @@ -25,6 +25,7 @@ #include "plugin/pluginapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" +#include "gui/basicdevicesettingsdialog.h" #include "dsp/spectrumvis.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -76,6 +77,7 @@ TestSinkGui::TestSinkGui(DeviceUISet *deviceUISet, QWidget* parent) : makeUIConnections(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); } TestSinkGui::~TestSinkGui() @@ -263,6 +265,30 @@ void TestSinkGui::tick() { } +void TestSinkGui::openDeviceSettingsDialog(const QPoint& p) +{ + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + + dialog.move(p); + dialog.exec(); + + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + + sendSettings(); + } + + resetContextMenuType(); +} + void TestSinkGui::makeUIConnections() { QObject::connect(ui->centerFrequency, &ValueDial::changed, this, &TestSinkGui::on_centerFrequency_changed); diff --git a/plugins/samplesink/testsink/testsinkgui.h b/plugins/samplesink/testsink/testsinkgui.h index 255d7b1de..dc7566492 100644 --- a/plugins/samplesink/testsink/testsinkgui.h +++ b/plugins/samplesink/testsink/testsinkgui.h @@ -85,6 +85,7 @@ private slots: void on_sampleRate_changed(quint64 value); void on_startStop_toggled(bool checked); void on_interp_currentIndexChanged(int index); + void openDeviceSettingsDialog(const QPoint& p); void updateHardware(); void updateStatus(); void tick(); diff --git a/plugins/samplesink/testsink/testsinksettings.cpp b/plugins/samplesink/testsink/testsinksettings.cpp index ea14da772..ec32a5dbf 100644 --- a/plugins/samplesink/testsink/testsinksettings.cpp +++ b/plugins/samplesink/testsink/testsinksettings.cpp @@ -31,6 +31,10 @@ void TestSinkSettings::resetToDefaults() m_log2Interp = 0; m_spectrumGUI = nullptr; m_workspaceIndex = 0; + m_useReverseAPI = false; + m_reverseAPIAddress = "127.0.0.1"; + m_reverseAPIPort = 8888; + m_reverseAPIDeviceIndex = 0; } QByteArray TestSinkSettings::serialize() const @@ -47,7 +51,10 @@ QByteArray TestSinkSettings::serialize() const s.writeS32(5, m_workspaceIndex); s.writeBlob(6, m_geometryBytes); - + s.writeBool(7, m_useReverseAPI); + s.writeString(8, m_reverseAPIAddress); + s.writeU32(9, m_reverseAPIPort); + s.writeU32(10, m_reverseAPIDeviceIndex); return s.final(); } @@ -64,6 +71,7 @@ bool TestSinkSettings::deserialize(const QByteArray& data) if (d.getVersion() == 1) { QByteArray bytetmp; + uint32_t uintval; d.readU64(1, &m_sampleRate, 435000*1000); d.readU64(2, &m_sampleRate, 48000); @@ -77,6 +85,18 @@ bool TestSinkSettings::deserialize(const QByteArray& data) d.readS32(5, &m_workspaceIndex, 0); d.readBlob(6, &m_geometryBytes); + d.readBool(7, &m_useReverseAPI, false); + d.readString(8, &m_reverseAPIAddress, "127.0.0.1"); + d.readU32(9, &uintval, 0); + + if ((uintval > 1023) && (uintval < 65535)) { + m_reverseAPIPort = uintval; + } else { + m_reverseAPIPort = 8888; + } + + d.readU32(10, &uintval, 0); + m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval; return true; } diff --git a/plugins/samplesink/testsink/testsinksettings.h b/plugins/samplesink/testsink/testsinksettings.h index 79e082488..6f6377ae6 100644 --- a/plugins/samplesink/testsink/testsinksettings.h +++ b/plugins/samplesink/testsink/testsinksettings.h @@ -29,6 +29,10 @@ struct TestSinkSettings { Serializable *m_spectrumGUI; int m_workspaceIndex; QByteArray m_geometryBytes; + bool m_useReverseAPI; + QString m_reverseAPIAddress; + uint16_t m_reverseAPIPort; + uint16_t m_reverseAPIDeviceIndex; TestSinkSettings(); void resetToDefaults(); diff --git a/plugins/samplesink/usrpoutput/readme.md b/plugins/samplesink/usrpoutput/readme.md index 3500ad751..130aec688 100644 --- a/plugins/samplesink/usrpoutput/readme.md +++ b/plugins/samplesink/usrpoutput/readme.md @@ -6,6 +6,8 @@ This output sample sink plugin sends its samples to a [USRP device](https://www.

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![USRP output plugin GUI](../../../doc/img/USRPOutput_plugin.png)

1: Start/Stop

@@ -18,7 +20,7 @@ Device start / stop button.

2A: Sample rate

-This is the sample rate at which IQ samples are transfered from SDRangel to the device, in kS/s (k) or MS/s (M). +This is the sample rate at which IQ samples are transfered from SDRangel to the device, in kS/s (k) or MS/s (M).

2B: Stream sample rate

diff --git a/plugins/samplesink/usrpoutput/usrpoutputgui.cpp b/plugins/samplesink/usrpoutput/usrpoutputgui.cpp index 4271c44de..3b8ac6f6b 100644 --- a/plugins/samplesink/usrpoutput/usrpoutputgui.cpp +++ b/plugins/samplesink/usrpoutput/usrpoutputgui.cpp @@ -22,7 +22,6 @@ #include "ui_usrpoutputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -86,9 +85,7 @@ USRPOutputGUI::USRPOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceUISet->m_deviceAPI->getDeviceUID()); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); - - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); sendSettings(); makeUIConnections(); @@ -563,21 +560,26 @@ void USRPOutputGUI::on_sampleRateMode_toggled(bool checked) void USRPOutputGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void USRPOutputGUI::makeUIConnections() diff --git a/plugins/samplesink/xtrxoutput/readme.md b/plugins/samplesink/xtrxoutput/readme.md index c641f7d4a..5676003f5 100644 --- a/plugins/samplesink/xtrxoutput/readme.md +++ b/plugins/samplesink/xtrxoutput/readme.md @@ -40,9 +40,12 @@ For a group the syntax is the same but the group name is prefixed with `@` like: ``` @realtime - rtprio 99 @realtime - memlock unlimited +```

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![XTRX output plugin GUI](../../../doc/img/XTRXOutput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesink/xtrxoutput/xtrxoutputgui.cpp b/plugins/samplesink/xtrxoutput/xtrxoutputgui.cpp index c20372447..b2bccc8a8 100644 --- a/plugins/samplesink/xtrxoutput/xtrxoutputgui.cpp +++ b/plugins/samplesink/xtrxoutput/xtrxoutputgui.cpp @@ -23,7 +23,6 @@ #include "ui_xtrxoutputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -74,8 +73,7 @@ XTRXOutputGUI::XTRXOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); makeUIConnections(); @@ -554,21 +552,26 @@ void XTRXOutputGUI::on_sampleRateMode_toggled(bool checked) void XTRXOutputGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void XTRXOutputGUI::makeUIConnections() diff --git a/plugins/samplesource/airspy/airspygui.cpp b/plugins/samplesource/airspy/airspygui.cpp index b0d8de826..951b14c0d 100644 --- a/plugins/samplesource/airspy/airspygui.cpp +++ b/plugins/samplesource/airspy/airspygui.cpp @@ -29,7 +29,6 @@ #include "ui_airspygui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -57,8 +56,7 @@ AirspyGui::AirspyGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); @@ -435,21 +433,26 @@ int AirspyGui::getDevSampleRateIndex(uint32_t sampeRate) void AirspyGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void AirspyGui::makeUIConnections() diff --git a/plugins/samplesource/airspyhf/airspyhfgui.cpp b/plugins/samplesource/airspyhf/airspyhfgui.cpp index 3dcb22d42..c8831abaa 100644 --- a/plugins/samplesource/airspyhf/airspyhfgui.cpp +++ b/plugins/samplesource/airspyhf/airspyhfgui.cpp @@ -27,7 +27,6 @@ #include "ui_airspyhfgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -57,8 +56,7 @@ AirspyHFGui::AirspyHFGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); @@ -455,21 +453,26 @@ int AirspyHFGui::getDevSampleRateIndex(uint32_t sampeRate) void AirspyHFGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void AirspyHFGui::makeUIConnections() diff --git a/plugins/samplesource/airspyhf/readme.md b/plugins/samplesource/airspyhf/readme.md index b4df31de0..05e1992a6 100644 --- a/plugins/samplesource/airspyhf/readme.md +++ b/plugins/samplesource/airspyhf/readme.md @@ -14,6 +14,8 @@ Note: if you use binary distributions this is included in the bundle.

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + For controls 10 to 13 to be effective you will need a recent version (up to date in January 2019) of both libairspy and the firmware. ![AirspyHF input plugin GUI](../../../doc/img/AirspyHFInput_plugin.png) diff --git a/plugins/samplesource/audioinput/audioinputgui.cpp b/plugins/samplesource/audioinput/audioinputgui.cpp index c6497aa6f..5d186ed09 100644 --- a/plugins/samplesource/audioinput/audioinputgui.cpp +++ b/plugins/samplesource/audioinput/audioinputgui.cpp @@ -22,7 +22,6 @@ #include "ui_audioinputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -49,9 +48,7 @@ AudioInputGui::AudioInputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_helpURL = "plugins/samplesource/audioinput/readme.md"; connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware())); - - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); makeUIConnections(); @@ -295,21 +292,26 @@ void AudioInputGui::updateHardware() void AudioInputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void AudioInputGui::makeUIConnections() diff --git a/plugins/samplesource/audioinput/readme.md b/plugins/samplesource/audioinput/readme.md index 9767705b4..08e70b8c9 100644 --- a/plugins/samplesource/audioinput/readme.md +++ b/plugins/samplesource/audioinput/readme.md @@ -6,6 +6,8 @@ This input sample source plugin gets its samples from an audio device.

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![Audio input plugin GUI](../../../doc/img/AudioInput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesource/bladerf1input/bladerf1inputgui.cpp b/plugins/samplesource/bladerf1input/bladerf1inputgui.cpp index 11ac97b8d..5c378ef94 100644 --- a/plugins/samplesource/bladerf1input/bladerf1inputgui.cpp +++ b/plugins/samplesource/bladerf1input/bladerf1inputgui.cpp @@ -24,7 +24,6 @@ #include "ui_bladerf1inputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -69,8 +68,7 @@ Bladerf1InputGui::Bladerf1InputGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); @@ -514,21 +512,26 @@ unsigned int Bladerf1InputGui::getXb200Index(bool xb_200, bladerf_xb200_path xb2 void Bladerf1InputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void Bladerf1InputGui::makeUIConnections() diff --git a/plugins/samplesource/bladerf1input/readme.md b/plugins/samplesource/bladerf1input/readme.md index 1e3157fa0..adc814a03 100644 --- a/plugins/samplesource/bladerf1input/readme.md +++ b/plugins/samplesource/bladerf1input/readme.md @@ -19,6 +19,8 @@ The BladeRF Host library is also provided by many Linux distributions (check its

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![BladeRF1 input plugin GUI](../../../doc/img/BladeRF1Input_plugin.png)

1: Common stream parameters

diff --git a/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp b/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp index e05c5c149..f1a2a3637 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp +++ b/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp @@ -24,7 +24,6 @@ #include "ui_bladerf2inputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -91,8 +90,7 @@ BladeRF2InputGui::BladeRF2InputGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); @@ -515,21 +513,26 @@ void BladeRF2InputGui::updateStatus() void BladeRF2InputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } float BladeRF2InputGui::getGainDB(int gainValue) diff --git a/plugins/samplesource/bladerf2input/readme.md b/plugins/samplesource/bladerf2input/readme.md index 99b66e1a1..30cf214ba 100644 --- a/plugins/samplesource/bladerf2input/readme.md +++ b/plugins/samplesource/bladerf2input/readme.md @@ -14,6 +14,8 @@ The BladeRF Host library is also provided by many Linux distributions (check its

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![BladeRF2 input plugin GUI](../../../doc/img/BladeRF2Input_plugin.png)

1: Common stream parameters

diff --git a/plugins/samplesource/fcdpro/fcdprogui.cpp b/plugins/samplesource/fcdpro/fcdprogui.cpp index 33840a7da..ee7a60bd0 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.cpp +++ b/plugins/samplesource/fcdpro/fcdprogui.cpp @@ -21,7 +21,6 @@ #include "ui_fcdprogui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -151,8 +150,7 @@ FCDProGui::FCDProGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); makeUIConnections(); @@ -539,21 +537,26 @@ void FCDProGui::updateHardware() void FCDProGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void FCDProGui::makeUIConnections() diff --git a/plugins/samplesource/fcdpro/readme.md b/plugins/samplesource/fcdpro/readme.md index 8d1f12e92..5a117c858 100644 --- a/plugins/samplesource/fcdpro/readme.md +++ b/plugins/samplesource/fcdpro/readme.md @@ -6,6 +6,8 @@ This input sample source plugin gets its samples from a [FunCube Dongle (FCD) Pr

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![FCD Pro input plugin GUI](../../../doc/img/FCDPro_plugin.png)

1: Common stream parameters

diff --git a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp index 3fa840b25..33503edfd 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp @@ -22,7 +22,6 @@ #include "ui_fcdproplusgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -69,8 +68,7 @@ FCDProPlusGui::FCDProPlusGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); makeUIConnections(); @@ -361,21 +359,26 @@ void FCDProPlusGui::on_transverter_clicked() void FCDProPlusGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void FCDProPlusGui::makeUIConnections() diff --git a/plugins/samplesource/fcdproplus/readme.md b/plugins/samplesource/fcdproplus/readme.md index 3a775ada1..8c75e2783 100644 --- a/plugins/samplesource/fcdproplus/readme.md +++ b/plugins/samplesource/fcdproplus/readme.md @@ -6,6 +6,8 @@ This input sample source plugin gets its samples from a [FunCube Dongle (FCD) Pr

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![FCD Pro+ input plugin GUI](../../../doc/img/FCDProPlus_plugin.png)

1: Common stream parameters

@@ -80,4 +82,4 @@ This controls the tuner filter (band) used:

11: IF filter

-Selects the IF filter bandwidth \ No newline at end of file +Selects the IF filter bandwidth diff --git a/plugins/samplesource/fileinput/fileinputgui.cpp b/plugins/samplesource/fileinput/fileinputgui.cpp index 3a3d26dc3..39bc4004b 100644 --- a/plugins/samplesource/fileinput/fileinputgui.cpp +++ b/plugins/samplesource/fileinput/fileinputgui.cpp @@ -27,7 +27,6 @@ #include "plugin/pluginapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -66,8 +65,7 @@ FileInputGUI::FileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); setAccelerationCombo(); displaySettings(); @@ -436,21 +434,26 @@ void FileInputGUI::setNumberStr(int n, QString& s) void FileInputGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void FileInputGUI::makeUIConnections() diff --git a/plugins/samplesource/fileinput/readme.md b/plugins/samplesource/fileinput/readme.md index 447d7de8e..f0dad6dd3 100644 --- a/plugins/samplesource/fileinput/readme.md +++ b/plugins/samplesource/fileinput/readme.md @@ -48,6 +48,8 @@ The header takes an integer number of 16 (4 bytes) or 24 (8 bytes) bits samples.

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![File input plugin GUI](../../../doc/img/FileInput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesource/hackrfinput/hackrfinputgui.cpp b/plugins/samplesource/hackrfinput/hackrfinputgui.cpp index 7f2c2a8d1..2c1658f28 100644 --- a/plugins/samplesource/hackrfinput/hackrfinputgui.cpp +++ b/plugins/samplesource/hackrfinput/hackrfinputgui.cpp @@ -25,7 +25,6 @@ #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -63,8 +62,7 @@ HackRFInputGui::HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); displayBandwidths(); @@ -497,21 +495,26 @@ void HackRFInputGui::updateStatus() void HackRFInputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void HackRFInputGui::makeUIConnections() diff --git a/plugins/samplesource/hackrfinput/readme.md b/plugins/samplesource/hackrfinput/readme.md index f256e06e9..c45712d0c 100644 --- a/plugins/samplesource/hackrfinput/readme.md +++ b/plugins/samplesource/hackrfinput/readme.md @@ -6,6 +6,8 @@ This input sample source plugin gets its samples from a [HackRF device](https://

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![HackRF input plugin GUI](../../../doc/img/HackRFInput_plugin.png)

1: Common stream parameters

@@ -113,4 +115,4 @@ When a device set for the same physical device is present the device center freq When the center frequency position Fc (control 8) is set to center (Cen) in both Rx and Tx the actual frequency of reception and transmission are the same. -In other cases for both frequencies to match you have to set the same sample rate and Fc position (either Inf or Sup) in the Rx and Tx. \ No newline at end of file +In other cases for both frequencies to match you have to set the same sample rate and Fc position (either Inf or Sup) in the Rx and Tx. diff --git a/plugins/samplesource/kiwisdr/kiwisdrgui.cpp b/plugins/samplesource/kiwisdr/kiwisdrgui.cpp index 1b1799b0f..2676ceea1 100644 --- a/plugins/samplesource/kiwisdr/kiwisdrgui.cpp +++ b/plugins/samplesource/kiwisdr/kiwisdrgui.cpp @@ -28,7 +28,6 @@ #include "plugin/pluginapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -84,8 +83,7 @@ KiwiSDRGui::KiwiSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); } KiwiSDRGui::~KiwiSDRGui() @@ -302,21 +300,26 @@ void KiwiSDRGui::updateSampleRateAndFrequency() void KiwiSDRGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void KiwiSDRGui::makeUIConnections() diff --git a/plugins/samplesource/kiwisdr/readme.md b/plugins/samplesource/kiwisdr/readme.md index f9896ea3d..fb0ce4998 100644 --- a/plugins/samplesource/kiwisdr/readme.md +++ b/plugins/samplesource/kiwisdr/readme.md @@ -6,6 +6,8 @@ This plugin is designed to enable connection to publicly available [KiwiSDR](htt

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![KiwiSDR input plugin GUI](../../../doc/img/KiwiSDRInput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesource/limesdrinput/limesdrinputgui.cpp b/plugins/samplesource/limesdrinput/limesdrinputgui.cpp index 43937ca8c..20e374c75 100644 --- a/plugins/samplesource/limesdrinput/limesdrinputgui.cpp +++ b/plugins/samplesource/limesdrinput/limesdrinputgui.cpp @@ -26,7 +26,6 @@ #include "ui_limesdrinputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -102,8 +101,7 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_limeSDRInput->setMessageQueueToGUI(&m_inputMessageQueue); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); } LimeSDRInputGUI::~LimeSDRInputGUI() @@ -707,21 +705,26 @@ void LimeSDRInputGUI::on_sampleRateMode_toggled(bool checked) void LimeSDRInputGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void LimeSDRInputGUI::makeUIConnections() diff --git a/plugins/samplesource/limesdrinput/readme.md b/plugins/samplesource/limesdrinput/readme.md index 0b5464233..9c86f4687 100644 --- a/plugins/samplesource/limesdrinput/readme.md +++ b/plugins/samplesource/limesdrinput/readme.md @@ -12,6 +12,8 @@ LimeSDR is a 2x2 MIMO device so it has two receiving channels that can run concu

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![LimeSDR input plugin GUI](../../../doc/img/LimeSDRInput_plugin.png)

1: Common stream parameters

@@ -204,4 +206,4 @@ This is the board temperature in degrees Celsius updated every ~5s. Before the f

15: GPIO pins status

-This is the hexadecimal representation of the 8 available GPIO pins of the on board LimeSDR GPIO header. \ No newline at end of file +This is the hexadecimal representation of the 8 available GPIO pins of the on board LimeSDR GPIO header. diff --git a/plugins/samplesource/localinput/localinputgui.cpp b/plugins/samplesource/localinput/localinputgui.cpp index 81edc2066..d5a657dfa 100644 --- a/plugins/samplesource/localinput/localinputgui.cpp +++ b/plugins/samplesource/localinput/localinputgui.cpp @@ -33,7 +33,6 @@ #include "ui_localinputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -80,8 +79,7 @@ LocalInputGui::LocalInputGui(DeviceUISet *deviceUISet, QWidget* parent) : .arg(palette().highlight().color().darker(115).name()))); m_helpURL = "plugins/samplesource/localinput/readme.md"; - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); makeUIConnections(); @@ -310,21 +308,26 @@ void LocalInputGui::updateStatus() void LocalInputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void LocalInputGui::makeUIConnections() diff --git a/plugins/samplesource/localinput/readme.md b/plugins/samplesource/localinput/readme.md index 119d5abb7..bc58afcba 100644 --- a/plugins/samplesource/localinput/readme.md +++ b/plugins/samplesource/localinput/readme.md @@ -6,6 +6,8 @@ This input sample source plugin gets its samples from a Local Sink channel in an

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![SDR Local input plugin GUI](../../../doc/img/LocalInput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesource/perseus/perseusgui.cpp b/plugins/samplesource/perseus/perseusgui.cpp index a25a47957..0b4a8c049 100644 --- a/plugins/samplesource/perseus/perseusgui.cpp +++ b/plugins/samplesource/perseus/perseusgui.cpp @@ -25,7 +25,6 @@ #include "ui_perseusgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -55,8 +54,7 @@ PerseusGui::PerseusGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); @@ -379,21 +377,26 @@ int PerseusGui::getDevSampleRateIndex(uint32_t sampeRate) void PerseusGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void PerseusGui::makeUIConnections() diff --git a/plugins/samplesource/perseus/readme.md b/plugins/samplesource/perseus/readme.md index dcc224458..787a6d8ad 100644 --- a/plugins/samplesource/perseus/readme.md +++ b/plugins/samplesource/perseus/readme.md @@ -17,6 +17,8 @@ If you build it from source and install it in a custom location say: `/opt/insta

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + It has a limited number of controls compared to other source interfaces. This is because a lot of things are handled automatically within the Perseus: - gains diff --git a/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp b/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp index 7b9a71a29..5ce1de780 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp +++ b/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp @@ -23,7 +23,6 @@ #include "dsp/dspengine.h" #include "dsp/dspcommands.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "device/deviceapi.h" #include "device/deviceuiset.h" @@ -71,8 +70,7 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) : ui->swDecimLabel->setText(QString::fromUtf8("S\u2193")); ui->lpFIRDecimationLabel->setText(QString::fromUtf8("\u2193")); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); blockApplySettings(true); displaySettings(); @@ -554,21 +552,26 @@ void PlutoSDRInputGui::updateSampleRateAndFrequency() void PlutoSDRInputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void PlutoSDRInputGui::makeUIConnections() diff --git a/plugins/samplesource/plutosdrinput/readme.md b/plugins/samplesource/plutosdrinput/readme.md index b0cf00bef..33226490c 100644 --- a/plugins/samplesource/plutosdrinput/readme.md +++ b/plugins/samplesource/plutosdrinput/readme.md @@ -27,6 +27,8 @@ Then add the following defines on `cmake` command line when compiling SDRangel:

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![PlutoSDR input plugin GUI](../../../doc/img/PlutoSDRInput_plugin.png)

1: Common stream parameters

diff --git a/plugins/samplesource/remoteinput/readme.md b/plugins/samplesource/remoteinput/readme.md index 142f2db1d..0f614bd9f 100644 --- a/plugins/samplesource/remoteinput/readme.md +++ b/plugins/samplesource/remoteinput/readme.md @@ -18,6 +18,8 @@ The plugin will be built only if the [CM256cc library](https://github.com/f4exb/

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![SDR Remote input plugin GUI](../../../doc/img/RemoteInput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesource/remoteinput/remoteinputgui.cpp b/plugins/samplesource/remoteinput/remoteinputgui.cpp index d4e821181..aa8187ece 100644 --- a/plugins/samplesource/remoteinput/remoteinputgui.cpp +++ b/plugins/samplesource/remoteinput/remoteinputgui.cpp @@ -29,7 +29,6 @@ #include "ui_remoteinputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -80,8 +79,7 @@ RemoteInputGui::RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent) : ui->remoteDeviceFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->remoteDeviceFrequency->setValueRange(8, 0, 99999999); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); @@ -673,21 +671,26 @@ void RemoteInputGui::updateStatus() void RemoteInputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void RemoteInputGui::makeUIConnections() diff --git a/plugins/samplesource/rtlsdr/readme.md b/plugins/samplesource/rtlsdr/readme.md index 6d8b1eee7..3d5920854 100644 --- a/plugins/samplesource/rtlsdr/readme.md +++ b/plugins/samplesource/rtlsdr/readme.md @@ -12,6 +12,8 @@ If you want to benefit from the direct sampling you will have to compile and ins

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![RTLSDR input plugin GUI](../../../doc/img/RTLSDR_plugin.png)

1: Common stream parameters

diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index 9d10e9b83..35e9fc142 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -27,7 +27,6 @@ #include "ui_rtlsdrgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -59,6 +58,7 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : ui->rfBW->setColorMapper(ColorMapper(ColorMapper::GrayYellow)); ui->rfBW->setValueRange(4, 0, 10000); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware())); connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); @@ -71,9 +71,6 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); - - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); } RTLSDRGui::~RTLSDRGui() @@ -525,21 +522,26 @@ void RTLSDRGui::on_lowSampleRate_toggled(bool checked) void RTLSDRGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void RTLSDRGui::makeUIConnections() diff --git a/plugins/samplesource/sdrplay/readme.md b/plugins/samplesource/sdrplay/readme.md index 629ea597b..16838f31f 100644 --- a/plugins/samplesource/sdrplay/readme.md +++ b/plugins/samplesource/sdrplay/readme.md @@ -4,7 +4,7 @@ This plugin supports input from SDRplay RSP1 devices. SDRplay is based on the MSi001 and MSi2500 chips from Mirics. The standard API provided by Mirics is closed source moreover it could not be implemented successfully in SDRangel. An open source API libmirisdr-2 has been written by Miroslav Slugen and later amended by Leif Asbrink SM5BSZ. This API uses a new flavour called [libmirisdr-4](https://github.com/f4exb/libmirisdr-4) in this very same Github space. It contains enhancements and bug fixes. -No Windows support +No Windows support Driver is too unstable in Windows randomly stopping the application and causing BSOD. @@ -14,6 +14,8 @@ As mentioned already the plugin depends on libmirisdr-4. You will have to compil

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![SDRplay plugin GUI](../../../doc/img/SDRPlay_plugin.png)

1. Common controls

@@ -40,7 +42,7 @@ This selects a frequency range corresponding to the hardware path in the SDRplay - 250 MHz to 380 MHz - 380 MHz to 1 GHz - 1 GHz to 2 GHz - +

5. IF bandwidth

This selects the IF filter. Following bandwidths are available according to MSi001 specs: @@ -61,8 +63,8 @@ This selects the IF frequency between these values: - 0 for zero IF - 450 kHz: you have to set sample rate to 1792 kHz (7) and use decimation (8) with an infradyne position (9) - 1620 kHz: you have to set sample rate to 6400 kHz (7) and use decimation (8) with an infradyne position (9) - - 2048 kHz: you have to set sample rate to 8192 kHz (7) and use decimation (8) with an infradyne position (9) - + - 2048 kHz: you have to set sample rate to 8192 kHz (7) and use decimation (8) with an infradyne position (9) +

7. Sample rate

You have the choice between various sample rates from 1536 to 8192 kHz. Some values have a special destination: @@ -70,7 +72,7 @@ You have the choice between various sample rates from 1536 to 8192 kHz. Some val - 1792 kHz: for use with an IF of 450 kHz. - 6400 kHz: for use with an IF of 1620 kHz. - 8192 kHz: for use with an IF of 2048 kHz. - +

8. Decimation

Decimation in powers of two from 1 (no decimation) to 64. @@ -78,24 +80,24 @@ Decimation in powers of two from 1 (no decimation) to 64.

9: Decimated bandpass center frequency position relative the SDRplay center frequency

- **Cen**: the decimation operation takes place around the SDRplay center frequency Fs - - **Inf**: the decimation operation takes place around Fs - Fc. + - **Inf**: the decimation operation takes place around Fs - Fc. - **Sup**: the decimation operation takes place around Fs + Fc. - -With SR as the sample rate before decimation Fc is calculated as: + +With SR as the sample rate before decimation Fc is calculated as: - if decimation n is 4 or lower: Fc = SR/2^(log2(n)-1). The device center frequency is on the side of the baseband. You need a RF filter bandwidth at least twice the baseband. - if decimation n is 8 or higher: Fc = SR/n. The device center frequency is half the baseband away from the side of the baseband. You need a RF filter bandwidth at least 3 times the baseband. - +

10. Tuner gain mode

-Use this radiobutton to select a mode where the gain of the LNA (or mixer buffer below 50 MHz), mixer and baseband amplifiers are automatically selected depending on the tuner gain index (11). This index is the gain value in dB at the nominal gain of all amplifiers. This is not the exact gain at all frequencies because the LNA gain decreases significantly at higher frequencies. +Use this radiobutton to select a mode where the gain of the LNA (or mixer buffer below 50 MHz), mixer and baseband amplifiers are automatically selected depending on the tuner gain index (11). This index is the gain value in dB at the nominal gain of all amplifiers. This is not the exact gain at all frequencies because the LNA gain decreases significantly at higher frequencies.

11. Tuner gain setting

The tuner gain index can be set between 0 and 102 points (corresponds to dB in the nominal case).

12. Manual gain mode

- + Use this radiobutton to select a mode where the gain of all amplifiers can be set independently

13. LNA toggle

diff --git a/plugins/samplesource/sdrplay/sdrplaygui.cpp b/plugins/samplesource/sdrplay/sdrplaygui.cpp index ddeddb627..0ab1d750e 100644 --- a/plugins/samplesource/sdrplay/sdrplaygui.cpp +++ b/plugins/samplesource/sdrplay/sdrplaygui.cpp @@ -27,7 +27,6 @@ #include "ui_sdrplaygui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -78,8 +77,7 @@ SDRPlayGui::SDRPlayGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); makeUIConnections(); @@ -445,21 +443,26 @@ void SDRPlayGui::on_startStop_toggled(bool checked) void SDRPlayGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void SDRPlayGui::makeUIConnections() diff --git a/plugins/samplesource/sdrplayv3/readme.md b/plugins/samplesource/sdrplayv3/readme.md index a24083e4c..903336b8b 100644 --- a/plugins/samplesource/sdrplayv3/readme.md +++ b/plugins/samplesource/sdrplayv3/readme.md @@ -10,6 +10,8 @@ This plugin requires the SDRplay API V3.07 to have been installed and for the se

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![SDRplay v3 plugin GUI](../../../doc/img/SDRPlayV3_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp b/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp index 73be322df..53fd850da 100644 --- a/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp +++ b/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp @@ -28,7 +28,6 @@ #include "ui_sdrplayv3gui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -69,8 +68,7 @@ SDRPlayV3Gui::SDRPlayV3Gui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); ui->tuner->blockSignals(true); ui->antenna->blockSignals(true); @@ -509,21 +507,26 @@ void SDRPlayV3Gui::on_transverter_clicked() void SDRPlayV3Gui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void SDRPlayV3Gui::makeUIConnections() diff --git a/plugins/samplesource/sigmffileinput/readme.md b/plugins/samplesource/sigmffileinput/readme.md index 996eb0383..62dab8880 100644 --- a/plugins/samplesource/sigmffileinput/readme.md +++ b/plugins/samplesource/sigmffileinput/readme.md @@ -12,6 +12,8 @@ Note: this plugin is officially supported since version 6.

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![SigMF File input plugin GUI](../../../doc/img/SigMFFileInput_plugin.png)

1: Start/Stop

diff --git a/plugins/samplesource/sigmffileinput/sigmffileinputgui.cpp b/plugins/samplesource/sigmffileinput/sigmffileinputgui.cpp index 41bcd1979..d2f88919a 100644 --- a/plugins/samplesource/sigmffileinput/sigmffileinputgui.cpp +++ b/plugins/samplesource/sigmffileinput/sigmffileinputgui.cpp @@ -27,7 +27,6 @@ #include "plugin/pluginapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -75,8 +74,7 @@ SigMFFileInputGUI::SigMFFileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); setAccelerationCombo(); displaySettings(); @@ -668,21 +666,26 @@ void SigMFFileInputGUI::setNumberStr(int n, QString& s) void SigMFFileInputGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void SigMFFileInputGUI::makeUIConnections() diff --git a/plugins/samplesource/soapysdrinput/readme.md b/plugins/samplesource/soapysdrinput/readme.md index 05b8b6fab..31b116333 100644 --- a/plugins/samplesource/soapysdrinput/readme.md +++ b/plugins/samplesource/soapysdrinput/readme.md @@ -73,6 +73,8 @@ When installed the Red Pitaya SoapySDR plugin lists a Red Pitaya device even if

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![SoapySDR input plugin GUI](../../../doc/img/SoapySDRInput_plugin1.png) The top part described by number tags is common for all devices. The bottom part under the "A" tag depends on the SoapySDR device implementation. The corresponding widgets are stacked vertically inside a scrollable area as there may be many controls depending on how the device interface is implemented in SoapySDR. Move the slider on the right to see all parameters available. diff --git a/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp b/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp index 500b3cedc..fa97d6638 100644 --- a/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp +++ b/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp @@ -25,7 +25,6 @@ #include "device/deviceuiset.h" #include "util/simpleserializer.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "soapygui/discreterangegui.h" #include "soapygui/intervalrangegui.h" @@ -96,8 +95,7 @@ SoapySDRInputGui::SoapySDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); @@ -913,21 +911,26 @@ void SoapySDRInputGui::updateStatus() void SoapySDRInputGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void SoapySDRInputGui::makeUIConnections() diff --git a/plugins/samplesource/testsource/testsourcegui.cpp b/plugins/samplesource/testsource/testsourcegui.cpp index 27a859af3..e6236daf8 100644 --- a/plugins/samplesource/testsource/testsourcegui.cpp +++ b/plugins/samplesource/testsource/testsourcegui.cpp @@ -27,7 +27,6 @@ #include "plugin/pluginapi.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -76,8 +75,7 @@ TestSourceGui::TestSourceGui(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); } TestSourceGui::~TestSourceGui() @@ -492,21 +490,26 @@ void TestSourceGui::updateSampleRateAndFrequency() void TestSourceGui::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void TestSourceGui::makeUIConnections() diff --git a/plugins/samplesource/usrpinput/readme.md b/plugins/samplesource/usrpinput/readme.md index be639aa92..3d57a4803 100644 --- a/plugins/samplesource/usrpinput/readme.md +++ b/plugins/samplesource/usrpinput/readme.md @@ -6,8 +6,9 @@ This input sample source plugin gets its samples from a [USRP device](https://ww

Interface

-![USRP input plugin GUI](../../../doc/img/USRPInput_plugin.png) +The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) +![USRP input plugin GUI](../../../doc/img/USRPInput_plugin.png)

1: Start/Stop

@@ -19,7 +20,7 @@ Device start / stop button.

2A: Sample rate

-This is the sample rate at which IQ samples are transfered the device to SDRangel, in kS/s (k) or MS/s (M). +This is the sample rate at which IQ samples are transfered the device to SDRangel, in kS/s (k) or MS/s (M).

2B: Stream sample rate

@@ -130,7 +131,7 @@ This label turns green when data is being received from the device. - **O**: turns red if stream experiences overruns - **T**: turns red if stream experiences timeouts - + The stream warning indicators are reset when the acqusition is started.

Dependendices

diff --git a/plugins/samplesource/usrpinput/usrpinputgui.cpp b/plugins/samplesource/usrpinput/usrpinputgui.cpp index bdc8459d4..d2edc86bd 100644 --- a/plugins/samplesource/usrpinput/usrpinputgui.cpp +++ b/plugins/samplesource/usrpinput/usrpinputgui.cpp @@ -27,7 +27,6 @@ #include "ui_usrpinputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -90,8 +89,7 @@ USRPInputGUI::USRPInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); m_usrpInput->setMessageQueueToGUI(&m_inputMessageQueue); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); } USRPInputGUI::~USRPInputGUI() @@ -609,21 +607,26 @@ void USRPInputGUI::on_sampleRateMode_toggled(bool checked) void USRPInputGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void USRPInputGUI::makeUIConnections() diff --git a/plugins/samplesource/xtrxinput/readme.md b/plugins/samplesource/xtrxinput/readme.md index 57c63f134..b82329800 100644 --- a/plugins/samplesource/xtrxinput/readme.md +++ b/plugins/samplesource/xtrxinput/readme.md @@ -44,6 +44,8 @@ For a group the syntax is the same but the group name is prefixed with `@` like:

Interface

+The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md) + ![LimeSDR input plugin GUI](../../../doc/img/XTRXInput_plugin.png)

1: Common stream parameters

diff --git a/plugins/samplesource/xtrxinput/xtrxinputgui.cpp b/plugins/samplesource/xtrxinput/xtrxinputgui.cpp index 4f46ed0da..92409fad1 100644 --- a/plugins/samplesource/xtrxinput/xtrxinputgui.cpp +++ b/plugins/samplesource/xtrxinput/xtrxinputgui.cpp @@ -27,7 +27,6 @@ #include "ui_xtrxinputgui.h" #include "gui/colormapper.h" #include "gui/glspectrum.h" -#include "gui/crightclickenabler.h" #include "gui/basicdevicesettingsdialog.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -77,8 +76,7 @@ XTRXInputGUI::XTRXInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); - CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); - connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); displaySettings(); makeUIConnections(); @@ -636,21 +634,26 @@ void XTRXInputGUI::on_sampleRateMode_toggled(bool checked) void XTRXInputGUI::openDeviceSettingsDialog(const QPoint& p) { - BasicDeviceSettingsDialog dialog(this); - dialog.setUseReverseAPI(m_settings.m_useReverseAPI); - dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); - dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); - dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); + if (m_contextMenuType == ContextMenuDeviceSettings) + { + BasicDeviceSettingsDialog dialog(this); + dialog.setUseReverseAPI(m_settings.m_useReverseAPI); + dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); + dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); + dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex); - dialog.move(p); - dialog.exec(); + dialog.move(p); + dialog.exec(); - m_settings.m_useReverseAPI = dialog.useReverseAPI(); - m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); - m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); - m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); + m_settings.m_useReverseAPI = dialog.useReverseAPI(); + m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); + m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); + m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex(); - sendSettings(); + sendSettings(); + } + + resetContextMenuType(); } void XTRXInputGUI::makeUIConnections() diff --git a/sdrgui/channel/channelgui.cpp b/sdrgui/channel/channelgui.cpp index 1ad76e619..7b274bf85 100644 --- a/sdrgui/channel/channelgui.cpp +++ b/sdrgui/channel/channelgui.cpp @@ -240,7 +240,7 @@ void ChannelGUI::setStreamIndicator(const QString& indicator) void ChannelGUI::activateSettingsDialog() { - QPoint p = mapFromGlobal(QCursor::pos()); + QPoint p = QCursor::pos(); m_contextMenuType = ContextMenuChannelSettings; emit customContextMenuRequested(p); } diff --git a/sdrgui/device/devicegui.cpp b/sdrgui/device/devicegui.cpp index 34eba9840..231ee3a4f 100644 --- a/sdrgui/device/devicegui.cpp +++ b/sdrgui/device/devicegui.cpp @@ -48,6 +48,11 @@ DeviceGUI::DeviceGUI(QWidget *parent) : m_indexLabel->setText(tr("X:%1").arg(m_deviceSetIndex)); m_indexLabel->setToolTip("Device type and set index"); + m_settingsButton = new QPushButton(); + QIcon settingsIcon(":/gear.png"); + m_settingsButton->setIcon(settingsIcon); + m_settingsButton->setToolTip("Common settings"); + m_changeDeviceButton = new QPushButton(); m_changeDeviceButton->setFixedSize(20, 20); QIcon changeDeviceIcon(":/swap.png"); @@ -129,6 +134,7 @@ DeviceGUI::DeviceGUI(QWidget *parent) : m_topLayout = new QHBoxLayout(); m_topLayout->setContentsMargins(0, 0, 0, 0); m_topLayout->addWidget(m_indexLabel); + m_topLayout->addWidget(m_settingsButton); m_topLayout->addWidget(m_changeDeviceButton); m_topLayout->addWidget(m_reloadDeviceButton); m_topLayout->addWidget(m_addChannelsButton); @@ -166,6 +172,7 @@ DeviceGUI::DeviceGUI(QWidget *parent) : QObjectCleanupHandler().add(layout()); setLayout(m_layouts); + connect(m_settingsButton, SIGNAL(clicked()), this, SLOT(activateSettingsDialog())); connect(m_changeDeviceButton, SIGNAL(clicked()), this, SLOT(openChangeDeviceDialog())); connect(m_reloadDeviceButton, SIGNAL(clicked()), this, SLOT(deviceReload())); connect(m_addChannelsButton, SIGNAL(clicked()), this, SLOT(openAddChannelsDialog())); @@ -207,6 +214,7 @@ DeviceGUI::~DeviceGUI() delete m_addChannelsButton; delete m_reloadDeviceButton; delete m_changeDeviceButton; + delete m_settingsButton; delete m_indexLabel; qDebug("DeviceGUI::~DeviceGUI: end"); } @@ -255,6 +263,13 @@ void DeviceGUI::deviceReload() } } +void DeviceGUI::activateSettingsDialog() +{ + QPoint p = QCursor::pos(); + m_contextMenuType = ContextMenuDeviceSettings; + emit customContextMenuRequested(p); +} + void DeviceGUI::showHelp() { if (m_helpURL.isEmpty()) { diff --git a/sdrgui/device/devicegui.h b/sdrgui/device/devicegui.h index aee35e306..13fd111da 100644 --- a/sdrgui/device/devicegui.h +++ b/sdrgui/device/devicegui.h @@ -49,8 +49,7 @@ public: enum ContextMenuType { ContextMenuNone, - ContextMenuChannelSettings, - ContextMenuStreamSettings + ContextMenuDeviceSettings }; DeviceGUI(QWidget *parent = nullptr); @@ -100,6 +99,7 @@ private: QString getDeviceTypeTag(); QLabel *m_indexLabel; + QPushButton *m_settingsButton; QPushButton *m_changeDeviceButton; QPushButton *m_reloadDeviceButton; QPushButton *m_addChannelsButton; @@ -124,6 +124,7 @@ private: ChannelAddDialog m_channelAddDialog; private slots: + void activateSettingsDialog(); void openChangeDeviceDialog(); void openAddChannelsDialog(); void deviceReload(); diff --git a/sdrgui/device/readme.md b/sdrgui/device/readme.md new file mode 100644 index 000000000..d07c77aef --- /dev/null +++ b/sdrgui/device/readme.md @@ -0,0 +1,225 @@ +

Device common controls

+ +The device windows have common top and bottom bars + + +![Device window](../../doc/img/DeviceWindow.png) + +

A: Top bar

+ +![Device window top bar](../../doc/img/DeviceWindow_top.png) + +

A.1 Devcice type and index

+ +The format is: + - Device type: + - R: receiver + - T: transmitter + - M: MIMO + - Semicolon separator + - Device set index. A "device set" is the set of a device and its corresponding channels + +THe tooltip shows the device type, sequence number and serial number of the device if it exists. + +You may click on this area and drag the window with the mouse. + +

A.2: Device common settings

+ +All device types have common settings. Clicking on the button opens a dialog to update them + +![Basic device settings dialog](../../doc/img/BasicDeviceSettings.png) + +

A.2.1: Toggle reverse API feature

+ +Use this checkbox to toggle on/off the reverse API feature. With reverse API engaged the changes in the device settings are forwarded to an API endpoint given by address (2.1.2.2), port (2.1.2.3) and device index (2.1.2.4) in the same format as the SDRangel REST API device settings endpoint. With the values of the screenshot the API URL is: `http://127.0.0.1:8888/sdrangel/deviceset/0/device/settings` The JSON payload follows the same format as the SDRangel REST API device settings. For example with HachRF Rx this would be something like: + +``` +{ + "deviceHwType": "HackRF", + "hackRFInputSettings": { + "LOppmTenths": 0, + "bandwidth": 1750000, + "biasT": 0, + "centerFrequency": 435000000, + "dcBlock": 0, + "devSampleRate": 2400000, + "fcPos": 2, + "iqCorrection": 0, + "linkTxFrequency": 0, + "lnaExt": 0, + "lnaGain": 16, + "log2Decim": 0, + "vgaGain": 16 + }, + "tx": 0 +} +``` +Note that the PATCH method is used. The full set of parameters is sent only when the reverse API is toggled on or a full settings update is done. + +The start and stop actions are also forwarded with the `/sdrangel/deviceset/{deviceSetIndex}/device/run` API endpoint using POST (start) or DELETE (stop) methods. + +More details on this feature can be found on the corresponding Wiki page. + +

A.2.2: API address

+ +This is the IP address of the API endpoint + +

A.2.3: API port

+ +This is the IP port of the API endpoint + +

A.2.4: Device index

+ +This is the targeted device index + +

A.2.5: Cancel changes and exit dialog

+ +Do not make any changes and exit dialog + +

A.2.6: Validate and exit dialog

+ +Validates the data (saves it in the channel marker object) and exits the dialog + + +

A.3: Change device

+ +Opens a dialog that lets you choose a different devuce + +![Main Window sampling devices dialog](../../doc/img/MainWindow_SDDialog.png) + +

A.3.1: Device selection combo

+ +Use this combo box to select the device. Only available devices will appear in the list. For devices having more than one channel (ex: LimeSDR) the channel number will appear next to the device sequence number inside the brackets. Ex: `LimeSDR[0:1] 0009060B00473419` designates the second Rx (Rx #1) of the first encountered LimeSDR which serial number is 0009060B00473419. + +

A.3.2: Device selection confirmation

+ +Use the `OK` button to confirm your choice and exit the dialog + +

A.3.3: Device selection cancellation

+ +Use the `Cancel` button to exit the dialog without any change + +

A.4: Reload device

+ +This button activates a close/open sequence to recycle the device. It may be useful when the device is not streaming anymore or in an attempt to clear possible errors. Make sure the streaming is stopped first. + +

A.5: Add channels

+ +Opens a dialog to add one or more channels connected to the device. + +![Add channels dialog](../../doc/img/AddChannels_dialog.png) + +

A.5.1: Channel selection

+ +Use this combo to select which channel type to add + +

A.5.2: Close dialog

+ +Use this button to dismiss the dialog + +

A.5.3: Add channel

+ +Add a new channel by clicking on the `Apply` button. You may click it several times to add more channels. The dialog can be dismissed with the `Close` button or the closing window icon `X` on the top bar. + +

A.6: Device set presets

+ +Opens a dialog to manage device set presets. Device set presets store configurations related to a single device set + +![Presets dialog](../../doc/img/MainWindow_presets_view.png) + +

A.6.1: Preset selection

+You select a preset or a preset group by clicking on its line in the tree view. All actions (6) will be done relative to this preset or preset group. + +

A.6.2: Group

+You can organize your presets into groups. Groups can be collapsed or expanded by using the caret icon on the left. + +

A.6.3: Center frequency

+The center frequency used in this preset is displayed here. + +

A.6.4: Rx/Tx indicator

+"R" is displayed for a Rx device set and "T" for a Tx device set + +

A.6.5: Preset name

+You can give a name to your preset. Names need not to be unique. + +

A.6.6: Preset control or actions

+ +![Presets controls](../../doc/img/MainWindow_presets.png) + +
A.6.6.1: New preset
+Click on this icon to create a new preset with the current values in the selected sample device tab (Main window: 2). + +
A.6.6.2: Update preset
+Click on this icon to create a update the selected preset with the current values in the selected sample device tab (Main window: 2). Please note that this does not save the preset immediately on disk to save presets immediately you need to use the save button (4). + +
A.6.6.3: Edit preset
+Opens a new window where you can change the group name and description. + + - for group items you can rename the group or merge all group presets into an existing group by selecting this existing group + + - for preset items you can: + - move the preset to another existing group by selecting this existing group + - assign this preset to a new group by typing in this new group + - change the description + +
A.6.6.4: Export preset
+Using the previous icon presets are saved globally in a system dependent place. Using this icon you can export a specific preset in a single file that can be imported on another machine possibly with a different O/S. The preset binary data (BLOB) is saved in Base-64 format. + +
A.6.6.5: Import preset
+This is the opposite of the previous operation. This will create a new preset in the selected group or the same group as the preset being selected. + +
A.6.6.6: Delete preset
+on a preset item: deletes the selected preset. +on a preset group: deletes the group and all its presets. + +
A.6.6.7: Load preset
+Applies the selected preset to the current device set (source and channel plugins). + +

A.7: Title

+ +The window title shows the device type and a sequence number. + +You may click on this area and drag the window with the mouse. + +

A.8: Help

+ +Clicking on this button opens the documentation about the device controls in github in the browser. + +

A.9: Move to a workspace

+ +Opens a dialog to choose a destination workspace to move the device window to. Nothing happens if the same workspace is selected. + +

A.10: Shrink window

+ +Click this button to reduce the window to its minimum size + +

A.11: Close window

+ +Click this button to close the window and removes the channel from the device set. + +

A.12: Top size grip

+ +You can drag this gray square to resize the window + +

B: Botom bar

+ +![Device window bottom bar](../../doc/img/DeviceWindow_bottom.png) + +

B.1: Show spectrum

+ +When the main spectrum window of this device is hidden this will show it. It has no effect if the main spectrum window is displayed. + +

B.2: Show all channels

+ +This will show all hidden channel windows if any. It has no effects on channel windows already displayed. + +

B.3: Status text

+ +The status messages appear here if any. + +You may click on this area and drag the window with the mouse. + +

A.4: Bottom size grip

+ +You can drag this gray square to resize the window +