30 #include "ui_mainwindow.h" 34 #include <boost/format.hpp> 41 connect(
ui->waterfall_plt,SIGNAL(xClick(
double)),
this, SLOT(
setRXFreq(
double)));
43 connect(
ui->wf_moveRight_btn, SIGNAL(clicked(
bool)),
44 ui->waterfall_plt, SLOT(scrollRight(
bool)));
45 connect(
ui->wf_moveLeft_btn, SIGNAL(clicked(
bool)),
46 ui->waterfall_plt, SLOT(scrollLeft(
bool)));
47 connect(
ui->wf_dynRange_cb, SIGNAL(valueChanged(
double)),
48 ui->waterfall_plt, SLOT(setDynamicRange(
double)));
49 connect(
ui->wf_floorLevel_spb, SIGNAL(valueChanged(
int)),
50 ui->waterfall_plt, SLOT(setRefLevel(
int)));
51 connect(
ui->wf_freqSpan_cb, SIGNAL(valueChanged(
double)),
52 ui->waterfall_plt, SLOT(setFreqSpanKHz(
double)));
54 ui->waterfall_plt->setMarkerOffset(-100, 1e3);
56 ui->wf_dynRange_cb->setCurrentIndex(0);
57 ui->wf_freqSpan_cb->setCurrentIndex(0);
59 connect(
listener, SIGNAL(configureSpectrum(
double,
double,
long)),
60 ui->waterfall_plt, SLOT(configureSpectrum(
double,
double,
long)));
61 connect(
listener, SIGNAL(updateData(
double,
float*)),
62 ui->waterfall_plt, SLOT(updateData(
double,
float*)));
64 connect(
ui->wf_RX2Center_btn, &QPushButton::clicked,
65 [
this](
bool v) { listener->setSpectrumCenter(listener->getRXFreq()); });
67 connect(
ui->wf_updateRate_sl, SIGNAL(valueChanged(
int)),
68 listener, SLOT(setSpectrumUpdateRate(
int)));
69 connect(
ui->wf_avgWindow_sl, SIGNAL(valueChanged(
int)),
70 listener, SLOT(setSpectrumAvgWindow(
int)));
72 connect(
listener, SIGNAL(repMarkerOffset(
double,
double)),
73 ui->waterfall_plt, SLOT(setMarkerOffset(
double,
double)));
78 ui->spectrum_plt->setRefLevel(10);
79 ui->spectrum_plt->setDynamicRange(100.0);
80 ui->spectrum_plt->setFreqCenter(144.2e6);
81 connect(
ui->spectrum_plt, SIGNAL(xClick(
double)),
this, SLOT(
setRXFreq(
double)));
82 connect(
ui->sp_moveRight_btn, SIGNAL(clicked(
bool)),
83 ui->spectrum_plt, SLOT(scrollRight(
bool)));
84 connect(
ui->sp_moveLeft_btn, SIGNAL(clicked(
bool)),
85 ui->spectrum_plt, SLOT(scrollLeft(
bool)));
86 connect(
ui->sp_dynRange_cb, SIGNAL(valueChanged(
double)),
87 ui->spectrum_plt, SLOT(setDynamicRange(
double)));
88 connect(
ui->sp_freqSpan_cb, SIGNAL(valueChanged(
double)),
89 ui->spectrum_plt, SLOT(setFreqSpanKHz(
double)));
90 connect(
ui->sp_ceilLevel_spb, SIGNAL(valueChanged(
int)),
91 ui->spectrum_plt, SLOT(setRefLevel(
int)));
93 ui->spectrum_plt->setMarkerOffset(0,1e3);
96 connect(
listener, SIGNAL(configureSpectrum(
double,
double,
long)),
97 ui->spectrum_plt, SLOT(configureSpectrum(
double,
double,
long)));
98 connect(
listener, SIGNAL(updateData(
double,
float*)),
99 ui->spectrum_plt, SLOT(updateData(
double,
float*)));
101 connect(
ui->sp_RX2Center_btn, &QPushButton::clicked,
102 [
this](
bool v) { listener->setSpectrumCenter(listener->getRXFreq()); });
103 connect(
ui->sp_avgWindow_sl, SIGNAL(valueChanged(
int)),
104 listener, SLOT(setSpectrumAvgWindow(
int)));
106 connect(
listener, SIGNAL(repMarkerOffset(
double,
double)),
107 ui->spectrum_plt, SLOT(setMarkerOffset(
double,
double)));
GUISoDa::Listener * listener
void setRXFreq(double freq)
void setRXFreq(double freq)
set the RX frequency label to freq, and send the requested frequency to the SDR radio server...