30 #include "ui_mainwindow.h" 32 #include <boost/format.hpp> 42 connect(
ui->bandSel_cb, SIGNAL(currentTextChanged(
const QString &)),
45 connect(
ui->BCOK_btn, SIGNAL(clicked(
bool)),
47 connect(
ui->BCCancel_btn, &QPushButton::clicked,
48 [=](
bool v){ fillBandMapEntry(ui->BCBandSel_cb->currentText()); });
49 connect(
ui->BCBandSel_cb, SIGNAL(currentTextChanged(
const QString &)),
53 ui->BCMinFreq_le->setValidator(
new QDoubleValidator(
this));
54 ui->BCMaxFreq_le->setValidator(
new QDoubleValidator(
this));
55 ui->BCLOFreq_le->setValidator(
new QDoubleValidator(
this));
58 [
this](
const QString & v){
59 ui->BCRXAnt_cb->addItem(v); });
61 [
this](
const QString & v){
62 ui->BCTXAnt_cb->addItem(v); });
64 connect(
listener, SIGNAL(addModulation(QString,
int)),
65 ui->BCDefMode_cb, SLOT(addValue(QString,
int)));
73 double rxfreq =
ui->RXFreq_lab->getFreq() * 1.0e-6;
74 double txfreq =
ui->TXFreq_lab->getFreq() * 1.0e-6;
76 if((rxfreq >= bp->
minFreq()) && (rxfreq <= bp->maxFreq())) {
79 if((txfreq >= bp->
minFreq()) && (txfreq <= bp->maxFreq())) {
96 ui->BCBandSel_cb->clear();
97 ui->bandSel_cb->clear();
98 while(bmi.hasNext()) {
100 ui->BCBandSel_cb->addItem(bmi.key());
101 ui->bandSel_cb->addItem(bmi.key());
104 ui->BCBandSel_cb->addItem(
"Create Band");
112 ui->BCStatus_lbl->setText(
"");
115 ui->BCBandName_le->setText(
"");
117 ui->BCBandSel_cb->setCurrentText(band);
119 ui->BCIndex_sb->setValue(b.
index());;
123 ui->BCMinFreq_le->setText(QString(
"%1").arg(b.
minFreq(), 14,
'f', 6));
124 ui->BCMaxFreq_le->setText(QString(
"%1").arg(b.
maxFreq(), 14,
'f', 6));
126 ui->BCDefMode_cb->setCurrentText(b.
defMode());
128 ui->BCLOFreq_le->setText(QString(
"%1").arg(b.
tvLOFreq(), 14,
'f', 6));
129 ui->BCLOMult_sb->setValue((
int) b.
tvLOMult());
131 ui->BCEnableTX_cb->setChecked(b.
txEna());
143 ui->BCStatus_lbl->setText(
"");
144 QString bname =
ui->BCBandName_le->text();
146 bname =
ui->BCBandSel_cb->currentText();
149 if(bname ==
"Create Band") {
152 ui->BCStatus_lbl->setText(
"<font color='red'>Please supply a band name to create a new band.</font>");
164 double min_freq =
ui->BCMinFreq_le->text().toDouble();
165 double max_freq =
ui->BCMaxFreq_le->text().toDouble();
181 if(
ui->BCBandSel_cb->findText(bname) < 0) {
182 ui->BCBandSel_cb->addItem(bname);
184 if(
ui->bandSel_cb->findText(bname) < 0) {
185 ui->bandSel_cb->addItem(bname);
202 ui->Mode_cb->setValue(
band_map[band].defMode());
204 double rx_freq =
band_map[band].lastRXFreq() * 1e6;
213 ui->RXAnt_sel->setCurrentText(
band_map[band].defRXAnt());
214 ui->TXAnt_sel->setCurrentText(
band_map[band].defTXAnt());
void setLastTXFreq(double v)
GUISoDa::Listener * listener
void changeBand(const QString &band)
const QString & defTXAnt() const
void restoreBands(QSettings *set_p)
void saveBands(QSettings *set_p)
void addTXAntName(const QString &ant_name)
void setTvLOFreq(double v)
QString auto_bandswitch_target
void setName(const QString &v)
void setTvLOMult(double v)
const QString & defMode() const
void fillBandMapEntry(const QString &band)
QMapIterator< QString, Band > BandMapIterator
void setDefMode(const QString &v)
void setSpectrumCenter(double freq)
void setLastRXFreq(double v)
void writeBandMapEntry(bool)
void setDefRXAnt(const QString &v)
void setTverterLowInjection(bool v)
void setTverterEna(bool v)
void setDefTXAnt(const QString &v)
void setMinFreq(double v)
GUISoDa::BandMap band_map
void bandMapSaveRestore(GUISoDa::BandMap &bmap, bool save)
bool tverterLowInjection() const
void addRXAntName(const QString &ant_name)
void setTXFreq(double freq)
set the TX frequency label to freq, and send the requested frequency to the SDR radio server...
void setMaxFreq(double v)
const QString & defRXAnt() const
QString current_band_selector
void setRXFreq(double freq)
set the RX frequency label to freq, and send the requested frequency to the SDR radio server...