1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-09 01:56:05 -05:00
sdrangel/plugins/channeltx/modpacket/packetmodtxsettingsdialog.cpp

71 lines
3.2 KiB
C++

///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2020 Jon Beniston, M7RCE //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "packetmodtxsettingsdialog.h"
PacketModTXSettingsDialog::PacketModTXSettingsDialog(int rampUpBits, int rampDownBits,
int rampRange, bool modulateWhileRamping,
int markFrequency, int spaceFrequency,
int ax25PreFlags, int ax25PostFlags,
int ax25Control, int ax25PID,
int lpfTaps, bool bbNoise, bool rfNoise, bool writeToFile,
QWidget* parent) :
QDialog(parent),
ui(new Ui::PacketModTXSettingsDialog)
{
ui->setupUi(this);
ui->rampUp->setValue(rampUpBits);
ui->rampDown->setValue(rampDownBits);
ui->rampRange->setValue(rampRange);
ui->modulateWhileRamping->setChecked(modulateWhileRamping);
ui->markFrequency->setValue(markFrequency);
ui->spaceFrequency->setValue(spaceFrequency);
ui->ax25PreFlags->setValue(ax25PreFlags);
ui->ax25PostFlags->setValue(ax25PostFlags);
ui->ax25Control->setValue(ax25Control);
ui->ax25PID->setValue(ax25PID);
ui->lpfTaps->setValue(lpfTaps);
ui->bbNoise->setChecked(bbNoise);
ui->rfNoise->setChecked(rfNoise);
ui->writeToFile->setChecked(writeToFile);
}
PacketModTXSettingsDialog::~PacketModTXSettingsDialog()
{
delete ui;
}
void PacketModTXSettingsDialog::accept()
{
m_rampUpBits = ui->rampUp->value();
m_rampDownBits = ui->rampDown->value();
m_rampRange = ui->rampRange->value();
m_modulateWhileRamping = ui->modulateWhileRamping->isChecked();
m_markFrequency = ui->markFrequency->value();
m_spaceFrequency = ui->spaceFrequency->value();
m_ax25PreFlags = ui->ax25PreFlags->value();
m_ax25PostFlags = ui->ax25PostFlags->value();
m_ax25Control = ui->ax25Control->value();
m_ax25PID = ui->ax25PID->value();
m_lpfTaps = ui->lpfTaps->value();
m_bbNoise = ui->bbNoise->isChecked();
m_rfNoise = ui->rfNoise->isChecked();
m_writeToFile = ui->writeToFile->isChecked();
QDialog::accept();
}