From f45e949e620ea6e54f7573885fae4652c433bbb5 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 28 Dec 2022 20:33:28 +0100 Subject: [PATCH] Fixed passing QPoint reference from right click enabler to connected method. Fixes #1549 --- plugins/channelrx/demodadsb/adsbdemodgui.cpp | 6 +++-- plugins/channelrx/demodadsb/adsbdemodgui.h | 2 +- plugins/channelrx/demodam/amdemodgui.cpp | 10 +++++--- plugins/channelrx/demodam/amdemodgui.h | 4 +-- plugins/channelrx/demodbfm/bfmdemodgui.cpp | 5 ++-- plugins/channelrx/demodbfm/bfmdemodgui.h | 2 +- plugins/channelrx/demoddab/dabdemodgui.cpp | 5 ++-- plugins/channelrx/demoddab/dabdemodgui.h | 2 +- plugins/channelrx/demoddatv/datvdemodgui.cpp | 10 +++++--- plugins/channelrx/demoddatv/datvdemodgui.h | 4 +-- plugins/channelrx/demoddsd/dsddemodgui.cpp | 5 ++-- plugins/channelrx/demoddsd/dsddemodgui.h | 2 +- .../channelrx/demodfreedv/freedvdemodgui.cpp | 5 ++-- .../channelrx/demodfreedv/freedvdemodgui.h | 2 +- plugins/channelrx/demodm17/m17demodgui.cpp | 5 ++-- plugins/channelrx/demodm17/m17demodgui.h | 2 +- plugins/channelrx/demodnfm/nfmdemodgui.cpp | 5 ++-- plugins/channelrx/demodnfm/nfmdemodgui.h | 2 +- plugins/channelrx/demodssb/ssbdemodgui.cpp | 5 ++-- plugins/channelrx/demodssb/ssbdemodgui.h | 2 +- plugins/channelrx/demodvor/vordemodgui.cpp | 5 ++-- plugins/channelrx/demodvor/vordemodgui.h | 2 +- .../channelrx/demodvormc/vordemodmcgui.cpp | 5 ++-- plugins/channelrx/demodvormc/vordemodmcgui.h | 2 +- plugins/channelrx/demodwfm/wfmdemodgui.cpp | 5 ++-- plugins/channelrx/demodwfm/wfmdemodgui.h | 2 +- .../mod802.15.4/ieee_802_15_4_modgui.cpp | 13 +++++++--- .../mod802.15.4/ieee_802_15_4_modgui.h | 4 +-- plugins/channeltx/modais/aismodgui.cpp | 13 +++++++--- plugins/channeltx/modais/aismodgui.h | 4 +-- plugins/channeltx/modam/ammodgui.cpp | 12 ++++++--- plugins/channeltx/modam/ammodgui.h | 4 +-- plugins/channeltx/modfreedv/freedvmodgui.cpp | 5 ++-- plugins/channeltx/modfreedv/freedvmodgui.h | 2 +- plugins/channeltx/modm17/m17modgui.cpp | 10 +++++--- plugins/channeltx/modm17/m17modgui.h | 4 +-- plugins/channeltx/modnfm/nfmmodgui.cpp | 10 +++++--- plugins/channeltx/modnfm/nfmmodgui.h | 4 +-- plugins/channeltx/modpacket/packetmodgui.cpp | 25 +++++++++++++------ plugins/channeltx/modpacket/packetmodgui.h | 8 +++--- plugins/channeltx/modssb/ssbmodgui.cpp | 10 +++++--- plugins/channeltx/modssb/ssbmodgui.h | 4 +-- plugins/channeltx/modwfm/wfmmodgui.cpp | 10 +++++--- plugins/channeltx/modwfm/wfmmodgui.h | 4 +-- plugins/feature/simpleptt/simplepttgui.cpp | 5 ++-- plugins/feature/simpleptt/simplepttgui.h | 2 +- sdrgui/gui/workspace.cpp | 4 +-- sdrgui/gui/workspace.h | 4 +-- sdrgui/mainwindow.cpp | 3 ++- 49 files changed, 160 insertions(+), 110 deletions(-) diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.cpp b/plugins/channelrx/demodadsb/adsbdemodgui.cpp index 0ac33c607..3b404e035 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.cpp +++ b/plugins/channelrx/demodadsb/adsbdemodgui.cpp @@ -4570,9 +4570,11 @@ void ADSBDemodGUI::highlightAircraft(Aircraft *aircraft) } // Show feed dialog -void ADSBDemodGUI::feedSelect() +void ADSBDemodGUI::feedSelect(const QPoint& p) { ADSBDemodFeedDialog dialog(&m_settings); + dialog.move(p); + if (dialog.exec() == QDialog::Accepted) { applySettings(); @@ -4773,7 +4775,7 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *feedRightClickEnabler = new CRightClickEnabler(ui->feed); - connect(feedRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(feedSelect())); + connect(feedRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(feedSelect(const QPoint &))); ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue); diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.h b/plugins/channelrx/demodadsb/adsbdemodgui.h index 4822bc052..2d0d414a1 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.h +++ b/plugins/channelrx/demodadsb/adsbdemodgui.h @@ -1050,7 +1050,7 @@ private slots: void updateDownloadProgress(qint64 bytesRead, qint64 totalBytes); void downloadFinished(const QString& filename, bool success); void on_device_currentIndexChanged(int index); - void feedSelect(); + void feedSelect(const QPoint& p); void on_displaySettings_clicked(); void on_logEnable_clicked(bool checked=false); void on_logFilename_clicked(); diff --git a/plugins/channelrx/demodam/amdemodgui.cpp b/plugins/channelrx/demodam/amdemodgui.cpp index 0033062a0..2f1230aaf 100644 --- a/plugins/channelrx/demodam/amdemodgui.cpp +++ b/plugins/channelrx/demodam/amdemodgui.cpp @@ -276,10 +276,10 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); CRightClickEnabler *samSidebandRightClickEnabler = new CRightClickEnabler(ui->ssb); - connect(samSidebandRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(samSSBSelect())); + connect(samSidebandRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(samSSBSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -412,10 +412,11 @@ void AMDemodGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void AMDemodGUI::audioSelect() +void AMDemodGUI::audioSelect(const QPoint& p) { qDebug("AMDemodGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) @@ -425,9 +426,10 @@ void AMDemodGUI::audioSelect() } } -void AMDemodGUI::samSSBSelect() +void AMDemodGUI::samSSBSelect(const QPoint& p) { AMDemodSSBDialog ssbSelect(m_samUSB); + ssbSelect.move(p); ssbSelect.exec(); ui->ssb->setIcon(ssbSelect.isUsb() ? m_iconDSBUSB : m_iconDSBLSB); diff --git a/plugins/channelrx/demodam/amdemodgui.h b/plugins/channelrx/demodam/amdemodgui.h index 5f442266d..50726e3bf 100644 --- a/plugins/channelrx/demodam/amdemodgui.h +++ b/plugins/channelrx/demodam/amdemodgui.h @@ -93,8 +93,8 @@ private slots: void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void handleInputMessages(); - void audioSelect(); - void samSSBSelect(); + void audioSelect(const QPoint& p); + void samSSBSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channelrx/demodbfm/bfmdemodgui.cpp b/plugins/channelrx/demodbfm/bfmdemodgui.cpp index 8bf302c8e..09adfd1ee 100644 --- a/plugins/channelrx/demodbfm/bfmdemodgui.cpp +++ b/plugins/channelrx/demodbfm/bfmdemodgui.cpp @@ -395,7 +395,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioStereo); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); @@ -522,10 +522,11 @@ void BFMDemodGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void BFMDemodGUI::audioSelect() +void BFMDemodGUI::audioSelect(const QPoint& p) { qDebug("BFMDemodGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demodbfm/bfmdemodgui.h b/plugins/channelrx/demodbfm/bfmdemodgui.h index ed4a5b42e..8e806ee6f 100644 --- a/plugins/channelrx/demodbfm/bfmdemodgui.h +++ b/plugins/channelrx/demodbfm/bfmdemodgui.h @@ -120,7 +120,7 @@ private slots: void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void handleInputMessages(); - void audioSelect(); + void audioSelect(const QPoint &); void tick(); }; diff --git a/plugins/channelrx/demoddab/dabdemodgui.cpp b/plugins/channelrx/demoddab/dabdemodgui.cpp index f3b39b312..f7e9bbbc4 100644 --- a/plugins/channelrx/demoddab/dabdemodgui.cpp +++ b/plugins/channelrx/demoddab/dabdemodgui.cpp @@ -469,7 +469,7 @@ DABDemodGUI::DABDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban m_dabDemod->setMessageQueueToGUI(getInputMessageQueue()); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms @@ -642,9 +642,10 @@ void DABDemodGUI::on_channel_currentIndexChanged(int index) } } -void DABDemodGUI::audioSelect() +void DABDemodGUI::audioSelect(const QPoint& p) { AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demoddab/dabdemodgui.h b/plugins/channelrx/demoddab/dabdemodgui.h index 246e760d8..cad4f4be3 100644 --- a/plugins/channelrx/demoddab/dabdemodgui.h +++ b/plugins/channelrx/demoddab/dabdemodgui.h @@ -106,7 +106,7 @@ private: QAction *createCheckableItem(QString& text, int idx, bool checked); private slots: - void audioSelect(); + void audioSelect(const QPoint& p); void on_deltaFrequency_changed(qint64 value); void on_audioMute_toggled(bool checked); void on_volume_valueChanged(int value); diff --git a/plugins/channelrx/demoddatv/datvdemodgui.cpp b/plugins/channelrx/demoddatv/datvdemodgui.cpp index 5dc5e23de..b241f0209 100644 --- a/plugins/channelrx/demoddatv/datvdemodgui.cpp +++ b/plugins/channelrx/demoddatv/datvdemodgui.cpp @@ -304,10 +304,10 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba // ui->videoPlay->setPixmap(pixmapTarget); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); CRightClickEnabler *ldpcToolRightClickEnabler = new CRightClickEnabler(ui->softLDPC); - connect(ldpcToolRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(ldpcToolSelect())); + connect(ldpcToolRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(ldpcToolSelect(const QPoint &))); ui->playerIndicator->setStyleSheet("QLabel { background-color: gray; border-radius: 8px; }"); ui->udpIndicator->setStyleSheet("QLabel { background-color: gray; border-radius: 8px; }"); @@ -510,10 +510,11 @@ void DATVDemodGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void DATVDemodGUI::audioSelect() +void DATVDemodGUI::audioSelect(const QPoint& p) { qDebug("DATVDemodGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) @@ -523,12 +524,13 @@ void DATVDemodGUI::audioSelect() } } -void DATVDemodGUI::ldpcToolSelect() +void DATVDemodGUI::ldpcToolSelect(const QPoint& p) { qDebug("DATVDemodGUI::ldpcToolSelect"); DatvDvbS2LdpcDialog ldpcDialog; ldpcDialog.setFileName(m_settings.m_softLDPCToolPath); ldpcDialog.setMaxTrials(m_settings.m_softLDPCMaxTrials); + ldpcDialog.move(p); if (ldpcDialog.exec() == QDialog::Accepted) { diff --git a/plugins/channelrx/demoddatv/datvdemodgui.h b/plugins/channelrx/demoddatv/datvdemodgui.h index c5c6a89c5..2cdeffa80 100644 --- a/plugins/channelrx/demoddatv/datvdemodgui.h +++ b/plugins/channelrx/demoddatv/datvdemodgui.h @@ -72,8 +72,8 @@ private slots: void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void handleInputMessages(); - void audioSelect(); - void ldpcToolSelect(); + void audioSelect(const QPoint& p); + void ldpcToolSelect(const QPoint& p); void tick(); void tickMeter(); diff --git a/plugins/channelrx/demoddsd/dsddemodgui.cpp b/plugins/channelrx/demoddsd/dsddemodgui.cpp index e82c22aeb..6b9e23c68 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.cpp +++ b/plugins/channelrx/demoddsd/dsddemodgui.cpp @@ -377,7 +377,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); m_scopeVisXY = new ScopeVisXY(ui->screenTV); m_scopeVisXY->setScale(2.0); @@ -596,10 +596,11 @@ void DSDDemodGUI::channelMarkerHighlightedByCursor() setHighlighted(m_channelMarker.getHighlighted()); } -void DSDDemodGUI::audioSelect() +void DSDDemodGUI::audioSelect(const QPoint& p) { qDebug("DSDDemodGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demoddsd/dsddemodgui.h b/plugins/channelrx/demoddsd/dsddemodgui.h index 614381d1c..ed011605b 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.h +++ b/plugins/channelrx/demoddsd/dsddemodgui.h @@ -150,7 +150,7 @@ private slots: void onMenuDialogCalled(const QPoint& p); void on_viewStatusLog_clicked(); void handleInputMessages(); - void audioSelect(); + void audioSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channelrx/demodfreedv/freedvdemodgui.cpp b/plugins/channelrx/demodfreedv/freedvdemodgui.cpp index 55b272f6a..c181a12ec 100644 --- a/plugins/channelrx/demodfreedv/freedvdemodgui.cpp +++ b/plugins/channelrx/demodfreedv/freedvdemodgui.cpp @@ -296,7 +296,7 @@ FreeDVDemodGUI::FreeDVDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -432,10 +432,11 @@ void FreeDVDemodGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void FreeDVDemodGUI::audioSelect() +void FreeDVDemodGUI::audioSelect(const QPoint& p) { qDebug("FreeDVDemodGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demodfreedv/freedvdemodgui.h b/plugins/channelrx/demodfreedv/freedvdemodgui.h index 5088194bd..0f6fce47c 100644 --- a/plugins/channelrx/demodfreedv/freedvdemodgui.h +++ b/plugins/channelrx/demodfreedv/freedvdemodgui.h @@ -118,7 +118,7 @@ private slots: void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void handleInputMessages(); - void audioSelect(); + void audioSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channelrx/demodm17/m17demodgui.cpp b/plugins/channelrx/demodm17/m17demodgui.cpp index 4dbe74726..8c4776cd8 100644 --- a/plugins/channelrx/demodm17/m17demodgui.cpp +++ b/plugins/channelrx/demodm17/m17demodgui.cpp @@ -447,7 +447,7 @@ M17DemodGUI::M17DemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); m_scopeVisXY = new ScopeVisXY(ui->screenTV); m_scopeVisXY->setScale(2.0); @@ -639,9 +639,10 @@ void M17DemodGUI::channelMarkerHighlightedByCursor() setHighlighted(m_channelMarker.getHighlighted()); } -void M17DemodGUI::audioSelect() +void M17DemodGUI::audioSelect(const QPoint& p) { AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demodm17/m17demodgui.h b/plugins/channelrx/demodm17/m17demodgui.h index 35b3b7975..f56083986 100644 --- a/plugins/channelrx/demodm17/m17demodgui.h +++ b/plugins/channelrx/demodm17/m17demodgui.h @@ -163,7 +163,7 @@ private slots: void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void handleInputMessages(); - void audioSelect(); + void audioSelect(const QPoint &); void tick(); }; diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.cpp b/plugins/channelrx/demodnfm/nfmdemodgui.cpp index c1bd35749..f380de811 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.cpp +++ b/plugins/channelrx/demodnfm/nfmdemodgui.cpp @@ -377,7 +377,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); blockApplySettings(true); @@ -579,10 +579,11 @@ void NFMDemodGUI::blockApplySettings(bool block) m_doApplySettings = !block; } -void NFMDemodGUI::audioSelect() +void NFMDemodGUI::audioSelect(const QPoint& p) { qDebug("NFMDemodGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.h b/plugins/channelrx/demodnfm/nfmdemodgui.h index 68dc7be73..c008beaf2 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.h +++ b/plugins/channelrx/demodnfm/nfmdemodgui.h @@ -100,7 +100,7 @@ private slots: void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void handleInputMessages(); - void audioSelect(); + void audioSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channelrx/demodssb/ssbdemodgui.cpp b/plugins/channelrx/demodssb/ssbdemodgui.cpp index ebb01253e..75684080d 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.cpp +++ b/plugins/channelrx/demodssb/ssbdemodgui.cpp @@ -352,7 +352,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban m_ssbDemod->setMessageQueueToGUI(getInputMessageQueue()); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -677,10 +677,11 @@ void SSBDemodGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void SSBDemodGUI::audioSelect() +void SSBDemodGUI::audioSelect(const QPoint& p) { qDebug("SSBDemodGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demodssb/ssbdemodgui.h b/plugins/channelrx/demodssb/ssbdemodgui.h index 623b49805..38415ee36 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.h +++ b/plugins/channelrx/demodssb/ssbdemodgui.h @@ -112,7 +112,7 @@ private slots: void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void handleInputMessages(); - void audioSelect(); + void audioSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channelrx/demodvor/vordemodgui.cpp b/plugins/channelrx/demodvor/vordemodgui.cpp index cdbfa25e0..3faca157c 100644 --- a/plugins/channelrx/demodvor/vordemodgui.cpp +++ b/plugins/channelrx/demodvor/vordemodgui.cpp @@ -308,7 +308,7 @@ VORDemodGUI::VORDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -405,10 +405,11 @@ void VORDemodGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void VORDemodGUI::audioSelect() +void VORDemodGUI::audioSelect(const QPoint& p) { qDebug("VORDemodGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demodvor/vordemodgui.h b/plugins/channelrx/demodvor/vordemodgui.h index cc0bba9b8..cb0b7c5ed 100644 --- a/plugins/channelrx/demodvor/vordemodgui.h +++ b/plugins/channelrx/demodvor/vordemodgui.h @@ -102,7 +102,7 @@ private slots: void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void handleInputMessages(); - void audioSelect(); + void audioSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channelrx/demodvormc/vordemodmcgui.cpp b/plugins/channelrx/demodvormc/vordemodmcgui.cpp index 05827e2a1..905c9f0aa 100644 --- a/plugins/channelrx/demodvormc/vordemodmcgui.cpp +++ b/plugins/channelrx/demodvormc/vordemodmcgui.cpp @@ -1198,7 +1198,7 @@ VORDemodMCGUI::VORDemodMCGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue); @@ -1363,10 +1363,11 @@ void VORDemodMCGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void VORDemodMCGUI::audioSelect() +void VORDemodMCGUI::audioSelect(const QPoint& p) { qDebug("VORDemodMCGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demodvormc/vordemodmcgui.h b/plugins/channelrx/demodvormc/vordemodmcgui.h index 419ad4546..cd8f3e0ce 100644 --- a/plugins/channelrx/demodvormc/vordemodmcgui.h +++ b/plugins/channelrx/demodvormc/vordemodmcgui.h @@ -303,7 +303,7 @@ private slots: void updateDownloadProgress(qint64 bytesRead, qint64 totalBytes); void downloadFinished(const QString& filename, bool success); void handleInputMessages(); - void audioSelect(); + void audioSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channelrx/demodwfm/wfmdemodgui.cpp b/plugins/channelrx/demodwfm/wfmdemodgui.cpp index 65bcd2059..1cf14ef45 100644 --- a/plugins/channelrx/demodwfm/wfmdemodgui.cpp +++ b/plugins/channelrx/demodwfm/wfmdemodgui.cpp @@ -236,7 +236,7 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -331,10 +331,11 @@ void WFMDemodGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void WFMDemodGUI::audioSelect() +void WFMDemodGUI::audioSelect(const QPoint& p) { qDebug("WFMDemodGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channelrx/demodwfm/wfmdemodgui.h b/plugins/channelrx/demodwfm/wfmdemodgui.h index 8fa18e55c..eef5696b7 100644 --- a/plugins/channelrx/demodwfm/wfmdemodgui.h +++ b/plugins/channelrx/demodwfm/wfmdemodgui.h @@ -85,7 +85,7 @@ private slots: void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void handleInputMessages(); - void audioSelect(); + void audioSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp index 821c72d5b..2cb737b4b 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp @@ -249,9 +249,11 @@ void IEEE_802_15_4_ModGUI::on_repeat_toggled(bool checked) applySettings(); } -void IEEE_802_15_4_ModGUI::repeatSelect() +void IEEE_802_15_4_ModGUI::repeatSelect(const QPoint& p) { IEEE_802_15_4_ModRepeatDialog dialog(m_settings.m_repeatDelay, m_settings.m_repeatCount); + dialog.move(p); + if (dialog.exec() == QDialog::Accepted) { m_settings.m_repeatDelay = dialog.m_repeatDelay; @@ -260,7 +262,7 @@ void IEEE_802_15_4_ModGUI::repeatSelect() } } -void IEEE_802_15_4_ModGUI::txSettingsSelect() +void IEEE_802_15_4_ModGUI::txSettingsSelect(const QPoint& p) { IEEE_802_15_4_ModTXSettingsDialog dialog( m_settings.m_rampUpBits, @@ -278,6 +280,9 @@ void IEEE_802_15_4_ModGUI::txSettingsSelect() m_settings.m_bbNoise, m_settings.m_writeToFile ); + + dialog.move(p); + if (dialog.exec() == QDialog::Accepted) { m_settings.m_rampUpBits = dialog.m_rampUpBits; @@ -441,10 +446,10 @@ IEEE_802_15_4_ModGUI::IEEE_802_15_4_ModGUI(PluginAPI* pluginAPI, DeviceUISet *de ui->glSpectrum->setDisplayHistogram(false); CRightClickEnabler *repeatRightClickEnabler = new CRightClickEnabler(ui->repeat); - connect(repeatRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(repeatSelect())); + connect(repeatRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(repeatSelect(const QPoint &))); CRightClickEnabler *txRightClickEnabler = new CRightClickEnabler(ui->txButton); - connect(txRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(txSettingsSelect())); + connect(txRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(txSettingsSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h index e18876165..8579cab04 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h @@ -117,8 +117,8 @@ private slots: void on_frame_editingFinished(); void on_frame_returnPressed(); void on_repeat_toggled(bool checked); - void repeatSelect(); - void txSettingsSelect(); + void repeatSelect(const QPoint& p); + void txSettingsSelect(const QPoint& p); void on_udpEnabled_clicked(bool checked); void on_udpAddress_editingFinished(); void on_udpPort_editingFinished(); diff --git a/plugins/channeltx/modais/aismodgui.cpp b/plugins/channeltx/modais/aismodgui.cpp index acc78af59..30ceb9f31 100644 --- a/plugins/channeltx/modais/aismodgui.cpp +++ b/plugins/channeltx/modais/aismodgui.cpp @@ -289,9 +289,11 @@ void AISModGUI::on_repeat_toggled(bool checked) applySettings(); } -void AISModGUI::repeatSelect() +void AISModGUI::repeatSelect(const QPoint& p) { AISModRepeatDialog dialog(m_settings.m_repeatDelay, m_settings.m_repeatCount); + dialog.move(p); + if (dialog.exec() == QDialog::Accepted) { m_settings.m_repeatDelay = dialog.m_repeatDelay; @@ -300,7 +302,7 @@ void AISModGUI::repeatSelect() } } -void AISModGUI::txSettingsSelect() +void AISModGUI::txSettingsSelect(const QPoint& p) { AISModTXSettingsDialog dialog(m_settings.m_rampUpBits, m_settings.m_rampDownBits, m_settings.m_rampRange, @@ -308,6 +310,9 @@ void AISModGUI::txSettingsSelect() m_settings.m_symbolSpan, m_settings.m_rfNoise, m_settings.m_writeToFile); + + dialog.move(p); + if (dialog.exec() == QDialog::Accepted) { m_settings.m_rampUpBits = dialog.m_rampUpBits; @@ -464,10 +469,10 @@ AISModGUI::AISModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam ui->glSpectrum->setDisplayHistogram(false); CRightClickEnabler *repeatRightClickEnabler = new CRightClickEnabler(ui->repeat); - connect(repeatRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(repeatSelect())); + connect(repeatRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(repeatSelect(const QPoint &))); CRightClickEnabler *txRightClickEnabler = new CRightClickEnabler(ui->txButton); - connect(txRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(txSettingsSelect())); + connect(txRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(txSettingsSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); diff --git a/plugins/channeltx/modais/aismodgui.h b/plugins/channeltx/modais/aismodgui.h index fd5d68307..155d7537f 100644 --- a/plugins/channeltx/modais/aismodgui.h +++ b/plugins/channeltx/modais/aismodgui.h @@ -120,8 +120,8 @@ private slots: void on_message_editingFinished(); void on_message_returnPressed(); void on_repeat_toggled(bool checked); - void repeatSelect(); - void txSettingsSelect(); + void repeatSelect(const QPoint &); + void txSettingsSelect(const QPoint &); void on_udpEnabled_clicked(bool checked); void on_udpAddress_editingFinished(); void on_udpPort_editingFinished(); diff --git a/plugins/channeltx/modam/ammodgui.cpp b/plugins/channeltx/modam/ammodgui.cpp index 8fbe760fb..6bfcf5bfb 100644 --- a/plugins/channeltx/modam/ammodgui.cpp +++ b/plugins/channeltx/modam/ammodgui.cpp @@ -369,10 +369,10 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampl connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable); - connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect())); + connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -498,10 +498,12 @@ void AMModGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void AMModGUI::audioSelect() +void AMModGUI::audioSelect(const QPoint& p) { qDebug("AMModGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, true); // true for input + audioSelect.move(p); + audioSelect.exec(); if (audioSelect.m_selected) @@ -511,10 +513,12 @@ void AMModGUI::audioSelect() } } -void AMModGUI::audioFeedbackSelect() +void AMModGUI::audioFeedbackSelect(const QPoint& p) { qDebug("AMModGUI::audioFeedbackSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output + audioSelect.move(p); + audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channeltx/modam/ammodgui.h b/plugins/channeltx/modam/ammodgui.h index f30e74167..3bb9a4600 100644 --- a/plugins/channeltx/modam/ammodgui.h +++ b/plugins/channeltx/modam/ammodgui.h @@ -127,8 +127,8 @@ private slots: void onMenuDialogCalled(const QPoint& p); void configureFileName(); - void audioSelect(); - void audioFeedbackSelect(); + void audioSelect(const QPoint& p); + void audioFeedbackSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channeltx/modfreedv/freedvmodgui.cpp b/plugins/channeltx/modfreedv/freedvmodgui.cpp index c28a17d4f..c30bfb0ed 100644 --- a/plugins/channeltx/modfreedv/freedvmodgui.cpp +++ b/plugins/channeltx/modfreedv/freedvmodgui.cpp @@ -391,7 +391,7 @@ FreeDVModGUI::FreeDVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -540,10 +540,11 @@ void FreeDVModGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void FreeDVModGUI::audioSelect() +void FreeDVModGUI::audioSelect(const QPoint& p) { qDebug("FreeDVModGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, true); // true for input + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channeltx/modfreedv/freedvmodgui.h b/plugins/channeltx/modfreedv/freedvmodgui.h index a439968bd..7faf2584d 100644 --- a/plugins/channeltx/modfreedv/freedvmodgui.h +++ b/plugins/channeltx/modfreedv/freedvmodgui.h @@ -129,7 +129,7 @@ private slots: void onMenuDialogCalled(const QPoint& p); void configureFileName(); - void audioSelect(); + void audioSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channeltx/modm17/m17modgui.cpp b/plugins/channeltx/modm17/m17modgui.cpp index 2724eaca7..3adbcc461 100644 --- a/plugins/channeltx/modm17/m17modgui.cpp +++ b/plugins/channeltx/modm17/m17modgui.cpp @@ -491,10 +491,10 @@ M17ModGUI::M17ModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable); - connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect())); + connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -712,10 +712,11 @@ void M17ModGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void M17ModGUI::audioSelect() +void M17ModGUI::audioSelect(const QPoint& p) { qDebug("M17ModGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, true); // true for input + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) @@ -725,10 +726,11 @@ void M17ModGUI::audioSelect() } } -void M17ModGUI::audioFeedbackSelect() +void M17ModGUI::audioFeedbackSelect(const QPoint& p) { qDebug("M17ModGUI::audioFeedbackSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channeltx/modm17/m17modgui.h b/plugins/channeltx/modm17/m17modgui.h index 4ed4b277a..5ee33aa96 100644 --- a/plugins/channeltx/modm17/m17modgui.h +++ b/plugins/channeltx/modm17/m17modgui.h @@ -152,8 +152,8 @@ private slots: void onMenuDialogCalled(const QPoint& p); void configureFileName(); - void audioSelect(); - void audioFeedbackSelect(); + void audioSelect(const QPoint& p); + void audioFeedbackSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channeltx/modnfm/nfmmodgui.cpp b/plugins/channeltx/modnfm/nfmmodgui.cpp index 87d6017f9..ff9e444df 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.cpp +++ b/plugins/channeltx/modnfm/nfmmodgui.cpp @@ -471,10 +471,10 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable); - connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect())); + connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -618,10 +618,11 @@ void NFMModGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void NFMModGUI::audioSelect() +void NFMModGUI::audioSelect(const QPoint& p) { qDebug("NFMModGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, true); // true for input + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) @@ -631,10 +632,11 @@ void NFMModGUI::audioSelect() } } -void NFMModGUI::audioFeedbackSelect() +void NFMModGUI::audioFeedbackSelect(const QPoint& p) { qDebug("NFMModGUI::audioFeedbackSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channeltx/modnfm/nfmmodgui.h b/plugins/channeltx/modnfm/nfmmodgui.h index 29a9771b8..418ac476e 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.h +++ b/plugins/channeltx/modnfm/nfmmodgui.h @@ -140,8 +140,8 @@ private slots: void onMenuDialogCalled(const QPoint& p); void configureFileName(); - void audioSelect(); - void audioFeedbackSelect(); + void audioSelect(const QPoint& p); + void audioFeedbackSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channeltx/modpacket/packetmodgui.cpp b/plugins/channeltx/modpacket/packetmodgui.cpp index 34ccd8d93..5518c4806 100644 --- a/plugins/channeltx/modpacket/packetmodgui.cpp +++ b/plugins/channeltx/modpacket/packetmodgui.cpp @@ -284,9 +284,11 @@ void PacketModGUI::on_bpf_toggled(bool checked) applySettings(); } -void PacketModGUI::preEmphasisSelect() +void PacketModGUI::preEmphasisSelect(const QPoint& p) { FMPreemphasisDialog dialog(m_settings.m_preEmphasisTau, m_settings.m_preEmphasisHighFreq); + dialog.move(p); + if (dialog.exec() == QDialog::Accepted) { m_settings.m_preEmphasisTau = dialog.m_tau; @@ -295,9 +297,11 @@ void PacketModGUI::preEmphasisSelect() } } -void PacketModGUI::bpfSelect() +void PacketModGUI::bpfSelect(const QPoint& p) { PacketModBPFDialog dialog(m_settings.m_bpfLowCutoff, m_settings.m_bpfHighCutoff, m_settings.m_bpfTaps); + dialog.move(p); + if (dialog.exec() == QDialog::Accepted) { m_settings.m_bpfLowCutoff = dialog.m_lowFreq; @@ -307,9 +311,11 @@ void PacketModGUI::bpfSelect() } } -void PacketModGUI::repeatSelect() +void PacketModGUI::repeatSelect(const QPoint& p) { PacketModRepeatDialog dialog(m_settings.m_repeatDelay, m_settings.m_repeatCount); + dialog.move(p); + if (dialog.exec() == QDialog::Accepted) { m_settings.m_repeatDelay = dialog.m_repeatDelay; @@ -318,7 +324,7 @@ void PacketModGUI::repeatSelect() } } -void PacketModGUI::txSettingsSelect() +void PacketModGUI::txSettingsSelect(const QPoint& p) { PacketModTXSettingsDialog dialog(m_settings.m_rampUpBits, m_settings.m_rampDownBits, m_settings.m_rampRange, m_settings.m_modulateWhileRamping, @@ -331,6 +337,9 @@ void PacketModGUI::txSettingsSelect() m_settings.m_lpfTaps, m_settings.m_bbNoise, m_settings.m_rfNoise, m_settings.m_writeToFile); + + dialog.move(p); + if (dialog.exec() == QDialog::Accepted) { m_settings.m_rampUpBits = dialog.m_rampUpBits; @@ -472,16 +481,16 @@ PacketModGUI::PacketModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb ui->glSpectrum->setDisplayHistogram(false); CRightClickEnabler *repeatRightClickEnabler = new CRightClickEnabler(ui->repeat); - connect(repeatRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(repeatSelect())); + connect(repeatRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(repeatSelect(const QPoint &))); CRightClickEnabler *txRightClickEnabler = new CRightClickEnabler(ui->txButton); - connect(txRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(txSettingsSelect())); + connect(txRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(txSettingsSelect(const QPoint &))); CRightClickEnabler *preempRightClickEnabler = new CRightClickEnabler(ui->preEmphasis); - connect(preempRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(preEmphasisSelect())); + connect(preempRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(preEmphasisSelect(const QPoint &))); CRightClickEnabler *bpfRightClickEnabler = new CRightClickEnabler(ui->bpf); - connect(bpfRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(bpfSelect())); + connect(bpfRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(bpfSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); diff --git a/plugins/channeltx/modpacket/packetmodgui.h b/plugins/channeltx/modpacket/packetmodgui.h index 060a14135..d3eb37454 100644 --- a/plugins/channeltx/modpacket/packetmodgui.h +++ b/plugins/channeltx/modpacket/packetmodgui.h @@ -113,10 +113,10 @@ private slots: void on_repeat_toggled(bool checked); void on_preEmphasis_toggled(bool checked); void on_bpf_toggled(bool checked); - void preEmphasisSelect(); - void bpfSelect(); - void repeatSelect(); - void txSettingsSelect(); + void preEmphasisSelect(const QPoint& p); + void bpfSelect(const QPoint& p); + void repeatSelect(const QPoint& p); + void txSettingsSelect(const QPoint& p); void on_udpEnabled_clicked(bool checked); void on_udpAddress_editingFinished(); void on_udpPort_editingFinished(); diff --git a/plugins/channeltx/modssb/ssbmodgui.cpp b/plugins/channeltx/modssb/ssbmodgui.cpp index f1db7b1c3..738fcc1dc 100644 --- a/plugins/channeltx/modssb/ssbmodgui.cpp +++ b/plugins/channeltx/modssb/ssbmodgui.cpp @@ -456,10 +456,10 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable); - connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect())); + connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -754,10 +754,11 @@ void SSBModGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void SSBModGUI::audioSelect() +void SSBModGUI::audioSelect(const QPoint& p) { qDebug("SSBModGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, true); // true for input + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) @@ -767,10 +768,11 @@ void SSBModGUI::audioSelect() } } -void SSBModGUI::audioFeedbackSelect() +void SSBModGUI::audioFeedbackSelect(const QPoint& p) { qDebug("SSBModGUI::audioFeedbackSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channeltx/modssb/ssbmodgui.h b/plugins/channeltx/modssb/ssbmodgui.h index cde19b90b..b83563286 100644 --- a/plugins/channeltx/modssb/ssbmodgui.h +++ b/plugins/channeltx/modssb/ssbmodgui.h @@ -142,8 +142,8 @@ private slots: void onMenuDialogCalled(const QPoint& p); void configureFileName(); - void audioSelect(); - void audioFeedbackSelect(); + void audioSelect(const QPoint& p); + void audioFeedbackSelect(const QPoint& p); void tick(); }; diff --git a/plugins/channeltx/modwfm/wfmmodgui.cpp b/plugins/channeltx/modwfm/wfmmodgui.cpp index 2541f8c22..5c3b9951d 100644 --- a/plugins/channeltx/modwfm/wfmmodgui.cpp +++ b/plugins/channeltx/modwfm/wfmmodgui.cpp @@ -386,10 +386,10 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic); - connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable); - connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect())); + connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect(const QPoint &))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); @@ -513,10 +513,11 @@ void WFMModGUI::enterEvent(EnterEventType* event) ChannelGUI::enterEvent(event); } -void WFMModGUI::audioSelect() +void WFMModGUI::audioSelect(const QPoint& p) { qDebug("WFMModGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, true); // true for input + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) @@ -526,10 +527,11 @@ void WFMModGUI::audioSelect() } } -void WFMModGUI::audioFeedbackSelect() +void WFMModGUI::audioFeedbackSelect(const QPoint& p) { qDebug("WFMModGUI::audioFeedbackSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/channeltx/modwfm/wfmmodgui.h b/plugins/channeltx/modwfm/wfmmodgui.h index f6cd5b507..1e5fbbb19 100644 --- a/plugins/channeltx/modwfm/wfmmodgui.h +++ b/plugins/channeltx/modwfm/wfmmodgui.h @@ -135,8 +135,8 @@ private slots: void onMenuDialogCalled(const QPoint& p); void configureFileName(); - void audioSelect(); - void audioFeedbackSelect(); + void audioSelect(const QPoint& p); + void audioFeedbackSelect(const QPoint& p); void tick(); }; diff --git a/plugins/feature/simpleptt/simplepttgui.cpp b/plugins/feature/simpleptt/simplepttgui.cpp index 725e7764e..8694cec0e 100644 --- a/plugins/feature/simpleptt/simplepttgui.cpp +++ b/plugins/feature/simpleptt/simplepttgui.cpp @@ -175,7 +175,7 @@ SimplePTTGUI::SimplePTTGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Fea connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); CRightClickEnabler *voxRightClickEnabler = new CRightClickEnabler(ui->vox); - connect(voxRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); + connect(voxRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect(const QPoint &))); connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(500); @@ -500,10 +500,11 @@ void SimplePTTGUI::applyPTT(bool tx) } } -void SimplePTTGUI::audioSelect() +void SimplePTTGUI::audioSelect(const QPoint& p) { qDebug("SimplePTTGUI::audioSelect"); AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, true); + audioSelect.move(p); audioSelect.exec(); if (audioSelect.m_selected) diff --git a/plugins/feature/simpleptt/simplepttgui.h b/plugins/feature/simpleptt/simplepttgui.h index a2b6eaeef..c59b99892 100644 --- a/plugins/feature/simpleptt/simplepttgui.h +++ b/plugins/feature/simpleptt/simplepttgui.h @@ -92,7 +92,7 @@ private slots: void on_voxLevel_valueChanged(int value); void on_voxHold_valueChanged(int value); void updateStatus(); - void audioSelect(); + void audioSelect(const QPoint& p); }; diff --git a/sdrgui/gui/workspace.cpp b/sdrgui/gui/workspace.cpp index 12045191e..656617189 100644 --- a/sdrgui/gui/workspace.cpp +++ b/sdrgui/gui/workspace.cpp @@ -851,7 +851,7 @@ void Workspace::stackSubWindows() m_stacking = false; } -void Workspace::autoStackSubWindows() +void Workspace::autoStackSubWindows(const QPoint&) { setAutoStackOption(!m_autoStack); } @@ -934,7 +934,7 @@ void Workspace::updateStartStopButton(bool checked) } } -void Workspace::deviceStateChanged(int index, DeviceAPI *deviceAPI) +void Workspace::deviceStateChanged(int, DeviceAPI *deviceAPI) { if (deviceAPI->getWorkspaceIndex() == m_index) { diff --git a/sdrgui/gui/workspace.h b/sdrgui/gui/workspace.h index 282102f48..1d3baadee 100644 --- a/sdrgui/gui/workspace.h +++ b/sdrgui/gui/workspace.h @@ -113,13 +113,13 @@ private slots: void tileSubWindows(); void stackVerticalSubWindows(); void stackSubWindows(); - void autoStackSubWindows(); + void autoStackSubWindows(const QPoint&); void tabSubWindows(); void layoutSubWindows(); void startStopClicked(bool checked = false); void addFeatureEmitted(int featureIndex); void toggleFloating(); - void deviceStateChanged(int index, DeviceAPI *deviceAPI); + void deviceStateChanged(int, DeviceAPI *deviceAPI); void subWindowActivated(QMdiSubWindow *window); signals: diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index 8ec583f9b..b53ed076f 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -3078,6 +3078,7 @@ void MainWindow::orientationChanged(Qt::ScreenOrientation orientation) setTabPosition(Qt::LeftDockWidgetArea, QTabWidget::West); } else { setTabPosition(Qt::LeftDockWidgetArea, QTabWidget::South); - } +#else + (void) orientation; #endif }