mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Removed obsolete basic channel settings widget
This commit is contained in:
parent
9cca7100ac
commit
e492253bc8
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,84 +0,0 @@
|
||||
#include <QPainter>
|
||||
#include <QColorDialog>
|
||||
#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();
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#ifndef INCLUDE_BASICCHANNELSETTINGSWIDGET_H
|
||||
#define INCLUDE_BASICCHANNELSETTINGSWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#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
|
@ -1,152 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BasicChannelSettingsWidget</class>
|
||||
<widget class="QWidget" name="BasicChannelSettingsWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>363</width>
|
||||
<height>83</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Sans Serif</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Channel basics</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="titleLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="title">
|
||||
<property name="toolTip">
|
||||
<string>Channel marker title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="colorLayoyt">
|
||||
<item>
|
||||
<widget class="QLabel" name="colorLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="colorBtn">
|
||||
<property name="toolTip">
|
||||
<string>Channel marker color</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="colorText">
|
||||
<property name="text">
|
||||
<string>#ff0000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="udpWidget" native="true">
|
||||
<layout class="QHBoxLayout" name="udpLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="addrLabel">
|
||||
<property name="text">
|
||||
<string>Addr</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="address">
|
||||
<property name="toolTip">
|
||||
<string>UDP address</string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>000.000.000.000</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>127.0.0.1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="portLabel">
|
||||
<property name="text">
|
||||
<string>Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="port">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>UDP port</string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>00000</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>9999</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue
Block a user