From e492253bc8b5317380e21d7adbf02642f23bb4b2 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 12 Nov 2017 10:36:08 +0100 Subject: [PATCH] Removed obsolete basic channel settings widget --- .../channelrx/chanalyzer/chanalyzergui.cpp | 1 - .../chanalyzerng/chanalyzernggui.cpp | 1 - plugins/channelrx/demodatv/atvdemodgui.cpp | 1 - plugins/channelrx/demodlora/lorademodgui.cpp | 1 - plugins/channelrx/demodssb/ssbdemodgui.cpp | 1 - plugins/channelrx/demodwfm/wfmdemodgui.cpp | 1 - plugins/channelrx/tcpsrc/tcpsrcgui.cpp | 1 - plugins/channeltx/modam/ammodgui.cpp | 1 - plugins/channeltx/modatv/atvmodgui.cpp | 1 - plugins/channeltx/modnfm/nfmmodgui.cpp | 1 - plugins/channeltx/modssb/ssbmodgui.cpp | 1 - plugins/channeltx/modwfm/wfmmodgui.cpp | 1 - sdrgui/CMakeLists.txt | 3 - sdrgui/gui/basicchannelsettingswidget.cpp | 84 ---------- sdrgui/gui/basicchannelsettingswidget.h | 36 ----- sdrgui/gui/basicchannelsettingswidget.ui | 152 ------------------ 16 files changed, 287 deletions(-) delete mode 100644 sdrgui/gui/basicchannelsettingswidget.cpp delete mode 100644 sdrgui/gui/basicchannelsettingswidget.h delete mode 100644 sdrgui/gui/basicchannelsettingswidget.ui diff --git a/plugins/channelrx/chanalyzer/chanalyzergui.cpp b/plugins/channelrx/chanalyzer/chanalyzergui.cpp index 69619cdf0..5b190a1fd 100644 --- a/plugins/channelrx/chanalyzer/chanalyzergui.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzergui.cpp @@ -32,7 +32,6 @@ #include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "mainwindow.h" diff --git a/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp b/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp index 0d82491ae..6c334d272 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp +++ b/plugins/channelrx/chanalyzerng/chanalyzernggui.cpp @@ -32,7 +32,6 @@ #include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "mainwindow.h" diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index 644d16eb5..d08c5b7b3 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -30,7 +30,6 @@ #include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "mainwindow.h" diff --git a/plugins/channelrx/demodlora/lorademodgui.cpp b/plugins/channelrx/demodlora/lorademodgui.cpp index 6eaa67fb1..01744e9d9 100644 --- a/plugins/channelrx/demodlora/lorademodgui.cpp +++ b/plugins/channelrx/demodlora/lorademodgui.cpp @@ -10,7 +10,6 @@ #include "gui/glspectrum.h" #include "plugin/pluginapi.h" #include "util/simpleserializer.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "lorademod.h" diff --git a/plugins/channelrx/demodssb/ssbdemodgui.cpp b/plugins/channelrx/demodssb/ssbdemodgui.cpp index f3fd207bd..3083e2d6f 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.cpp +++ b/plugins/channelrx/demodssb/ssbdemodgui.cpp @@ -12,7 +12,6 @@ #include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "mainwindow.h" #include "ssbdemod.h" diff --git a/plugins/channelrx/demodwfm/wfmdemodgui.cpp b/plugins/channelrx/demodwfm/wfmdemodgui.cpp index 2075a8232..0e73a4567 100644 --- a/plugins/channelrx/demodwfm/wfmdemodgui.cpp +++ b/plugins/channelrx/demodwfm/wfmdemodgui.cpp @@ -12,7 +12,6 @@ #include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "gui/basicchannelsettingsdialog.h" #include "mainwindow.h" diff --git a/plugins/channelrx/tcpsrc/tcpsrcgui.cpp b/plugins/channelrx/tcpsrc/tcpsrcgui.cpp index c9bf5bbd5..eca5daef8 100644 --- a/plugins/channelrx/tcpsrc/tcpsrcgui.cpp +++ b/plugins/channelrx/tcpsrc/tcpsrcgui.cpp @@ -7,7 +7,6 @@ #include "dsp/dspengine.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "ui_tcpsrcgui.h" #include "mainwindow.h" #include "tcpsrc.h" diff --git a/plugins/channeltx/modam/ammodgui.cpp b/plugins/channeltx/modam/ammodgui.cpp index 99127461f..afb7b05b0 100644 --- a/plugins/channeltx/modam/ammodgui.cpp +++ b/plugins/channeltx/modam/ammodgui.cpp @@ -30,7 +30,6 @@ #include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "mainwindow.h" diff --git a/plugins/channeltx/modatv/atvmodgui.cpp b/plugins/channeltx/modatv/atvmodgui.cpp index c98b91b5c..bec4efbd7 100644 --- a/plugins/channeltx/modatv/atvmodgui.cpp +++ b/plugins/channeltx/modatv/atvmodgui.cpp @@ -27,7 +27,6 @@ #include "device/deviceuiset.h" #include "plugin/pluginapi.h" #include "util/simpleserializer.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "util/db.h" #include "mainwindow.h" diff --git a/plugins/channeltx/modnfm/nfmmodgui.cpp b/plugins/channeltx/modnfm/nfmmodgui.cpp index ffb9fe945..812f0915d 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.cpp +++ b/plugins/channeltx/modnfm/nfmmodgui.cpp @@ -25,7 +25,6 @@ #include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "mainwindow.h" diff --git a/plugins/channeltx/modssb/ssbmodgui.cpp b/plugins/channeltx/modssb/ssbmodgui.cpp index 6182aad34..708838db2 100644 --- a/plugins/channeltx/modssb/ssbmodgui.cpp +++ b/plugins/channeltx/modssb/ssbmodgui.cpp @@ -29,7 +29,6 @@ #include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "mainwindow.h" diff --git a/plugins/channeltx/modwfm/wfmmodgui.cpp b/plugins/channeltx/modwfm/wfmmodgui.cpp index b44a92ae3..e58950e42 100644 --- a/plugins/channeltx/modwfm/wfmmodgui.cpp +++ b/plugins/channeltx/modwfm/wfmmodgui.cpp @@ -27,7 +27,6 @@ #include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "util/db.h" -#include "gui/basicchannelsettingswidget.h" #include "dsp/dspengine.h" #include "mainwindow.h" diff --git a/sdrgui/CMakeLists.txt b/sdrgui/CMakeLists.txt index 38ee8b080..8ce8cba0e 100644 --- a/sdrgui/CMakeLists.txt +++ b/sdrgui/CMakeLists.txt @@ -4,7 +4,6 @@ set(sdrgui_SOURCES mainwindow.cpp gui/aboutdialog.cpp gui/addpresetdialog.cpp - gui/basicchannelsettingswidget.cpp gui/basicchannelsettingsdialog.cpp gui/buttonswitch.cpp gui/channelwindow.cpp @@ -54,7 +53,6 @@ set(sdrgui_HEADERS mainwindow.h gui/aboutdialog.h gui/addpresetdialog.h - gui/basicchannelsettingswidget.h gui/basicchannelsettingsdialog.h gui/buttonswitch.h gui/channelwindow.h @@ -109,7 +107,6 @@ set(sdrgui_FORMS mainwindow.ui gui/aboutdialog.ui gui/addpresetdialog.ui - gui/basicchannelsettingswidget.ui gui/basicchannelsettingsdialog.ui gui/cwkeyergui.ui gui/externalclockdialog.ui diff --git a/sdrgui/gui/basicchannelsettingswidget.cpp b/sdrgui/gui/basicchannelsettingswidget.cpp deleted file mode 100644 index 63e3254fe..000000000 --- a/sdrgui/gui/basicchannelsettingswidget.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include -#include -#include "gui/basicchannelsettingswidget.h" -#include "dsp/channelmarker.h" -#include "ui_basicchannelsettingswidget.h" - -BasicChannelSettingsWidget::BasicChannelSettingsWidget(ChannelMarker* marker, QWidget* parent) : - QWidget(parent), - ui(new Ui::BasicChannelSettingsWidget), - m_channelMarker(marker), - m_hasChanged(false) -{ - ui->setupUi(this); - ui->title->setText(m_channelMarker->getTitle()); - ui->address->setText(m_channelMarker->getUDPAddress()); - ui->port->setText(QString("%1").arg(m_channelMarker->getUDPReceivePort())); - paintColor(); -} - -BasicChannelSettingsWidget::~BasicChannelSettingsWidget() -{ - delete ui; -} - -void BasicChannelSettingsWidget::on_title_textChanged(const QString& text) -{ - m_channelMarker->setTitle(text); - m_hasChanged = true; -} - -void BasicChannelSettingsWidget::on_colorBtn_clicked() -{ - QColor c = m_channelMarker->getColor(); - c = QColorDialog::getColor(c, this, tr("Select Color for Channel")); - if(c.isValid()) { - m_channelMarker->setColor(c); - paintColor(); - m_hasChanged = true; - } -} - -void BasicChannelSettingsWidget::on_address_textEdited(const QString& arg1) -{ - m_channelMarker->setUDPAddress(arg1); - m_hasChanged = true; -} - -void BasicChannelSettingsWidget::on_port_textEdited(const QString& arg1) -{ - bool ok; - int udpPort = arg1.toInt(&ok); - - if((!ok) || (udpPort < 1024) || (udpPort > 65535)) - { - udpPort = 9999; - } - - m_channelMarker->setUDPReceivePort(udpPort); - m_hasChanged = true; -} - -void BasicChannelSettingsWidget::paintColor() -{ - QColor c(m_channelMarker->getColor()); - QPixmap pm(24, 24); - pm.fill(c); - ui->colorBtn->setIcon(pm); - ui->colorText->setText(tr("#%1%2%3") - .arg(c.red(), 2, 16, QChar('0')) - .arg(c.green(), 2, 16, QChar('0')) - .arg(c.blue(), 2, 16, QChar('0'))); -} - -void BasicChannelSettingsWidget::setUDPDialogVisible(bool visible) -{ - if (visible) - { - ui->udpWidget->show(); - } - else - { - ui->udpWidget->hide(); - } -} diff --git a/sdrgui/gui/basicchannelsettingswidget.h b/sdrgui/gui/basicchannelsettingswidget.h deleted file mode 100644 index 12c10f621..000000000 --- a/sdrgui/gui/basicchannelsettingswidget.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef INCLUDE_BASICCHANNELSETTINGSWIDGET_H -#define INCLUDE_BASICCHANNELSETTINGSWIDGET_H - -#include -#include "util/export.h" - -namespace Ui { - class BasicChannelSettingsWidget; -} - -class ChannelMarker; - -class SDRANGEL_API BasicChannelSettingsWidget : public QWidget { - Q_OBJECT - -public: - explicit BasicChannelSettingsWidget(ChannelMarker* marker, QWidget* parent = NULL); - ~BasicChannelSettingsWidget(); - void setUDPDialogVisible(bool visible); - bool getHasChanged() const { return m_hasChanged; } - -private slots: - void on_title_textChanged(const QString& text); - void on_colorBtn_clicked(); - void on_address_textEdited(const QString& arg1); - void on_port_textEdited(const QString& arg1); - -private: - Ui::BasicChannelSettingsWidget* ui; - ChannelMarker* m_channelMarker; - bool m_hasChanged; - - void paintColor(); -}; - -#endif // INCLUDE_BASICCHANNELSETTINGSWIDGET_H diff --git a/sdrgui/gui/basicchannelsettingswidget.ui b/sdrgui/gui/basicchannelsettingswidget.ui deleted file mode 100644 index 7cb233a03..000000000 --- a/sdrgui/gui/basicchannelsettingswidget.ui +++ /dev/null @@ -1,152 +0,0 @@ - - - BasicChannelSettingsWidget - - - - 0 - 0 - 363 - 83 - - - - - Sans Serif - 9 - - - - Channel basics - - - - 3 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - - - - 0 - 0 - - - - Title - - - - - - - Channel marker title - - - - - - - - - - - - 0 - 0 - - - - Color - - - - - - - Channel marker color - - - - - - - - - - #ff0000 - - - - - - - - - - - - Addr - - - - - - - UDP address - - - 000.000.000.000 - - - 127.0.0.1 - - - - - - - Port - - - - - - - - 60 - 16777215 - - - - UDP port - - - 00000 - - - 9999 - - - - - - - - - - -