mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-04-01 20:55:33 -04:00
Frequency Scanner: added a button to force continue scanning
This commit is contained in:
parent
bb711fc965
commit
bc49e37f8b
@ -49,6 +49,7 @@ MESSAGE_CLASS_DEFINITION(FreqScanner::MsgReportChannels, Message)
|
||||
MESSAGE_CLASS_DEFINITION(FreqScanner::MsgStartScan, Message)
|
||||
MESSAGE_CLASS_DEFINITION(FreqScanner::MsgStopScan, Message)
|
||||
MESSAGE_CLASS_DEFINITION(FreqScanner::MsgScanComplete, Message)
|
||||
MESSAGE_CLASS_DEFINITION(FreqScanner::MsgContinueScan, Message)
|
||||
MESSAGE_CLASS_DEFINITION(FreqScanner::MsgScanResult, Message)
|
||||
MESSAGE_CLASS_DEFINITION(FreqScanner::MsgStatus, Message)
|
||||
MESSAGE_CLASS_DEFINITION(FreqScanner::MsgReportActiveFrequency, Message)
|
||||
@ -261,6 +262,12 @@ bool FreqScanner::handleMessage(const Message& cmd)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MsgContinueScan::match(cmd))
|
||||
{
|
||||
continueScan();
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
@ -320,6 +327,11 @@ void FreqScanner::initScan()
|
||||
m_state = SCAN_FOR_MAX_POWER;
|
||||
}
|
||||
|
||||
void FreqScanner::continueScan()
|
||||
{
|
||||
m_state = SCAN_FOR_MAX_POWER;
|
||||
}
|
||||
|
||||
void FreqScanner::processScanResults(const QDateTime& fftStartTime, const QList<MsgScanResult::ScanResult>& results)
|
||||
{
|
||||
switch (m_state)
|
||||
|
||||
@ -146,6 +146,23 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class MsgContinueScan : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
|
||||
static MsgContinueScan* create()
|
||||
{
|
||||
return new MsgContinueScan();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
MsgContinueScan() :
|
||||
Message()
|
||||
{
|
||||
}
|
||||
};
|
||||
class MsgScanResult : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
@ -422,6 +439,7 @@ private:
|
||||
void startScan();
|
||||
void stopScan();
|
||||
void initScan();
|
||||
void continueScan();
|
||||
void processScanResults(const QDateTime& fftStartTime, const QList<MsgScanResult::ScanResult>& results);
|
||||
void setDeviceCenterFrequency(qint64 frequency);
|
||||
void applyChannelSetting(const QString& channel);
|
||||
|
||||
@ -682,6 +682,12 @@ void FreqScannerGUI::on_startStop_toggled(bool checked)
|
||||
}
|
||||
}
|
||||
|
||||
void FreqScannerGUI::on_continueScan_clicked()
|
||||
{
|
||||
FreqScanner::MsgContinueScan* message = FreqScanner::MsgContinueScan::create();
|
||||
m_freqScanner->getInputMessageQueue()->push(message);
|
||||
}
|
||||
|
||||
void FreqScannerGUI::addRow(const FreqScannerSettings::FrequencySettings& frequencySettings)
|
||||
{
|
||||
int row = ui->table->rowCount();
|
||||
@ -1278,6 +1284,7 @@ void FreqScannerGUI::makeUIConnections()
|
||||
QObject::connect(ui->measurement, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FreqScannerGUI::on_measurement_currentIndexChanged);
|
||||
QObject::connect(ui->mode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FreqScannerGUI::on_mode_currentIndexChanged);
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &FreqScannerGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->continueScan, &QPushButton::clicked, this, &FreqScannerGUI::on_continueScan_clicked);
|
||||
QObject::connect(ui->table, &QTableWidget::cellChanged, this, &FreqScannerGUI::on_table_cellChanged);
|
||||
QObject::connect(ui->addSingle, &QToolButton::clicked, this, &FreqScannerGUI::on_addSingle_clicked);
|
||||
QObject::connect(ui->addRange, &QToolButton::clicked, this, &FreqScannerGUI::on_addRange_clicked);
|
||||
|
||||
@ -145,6 +145,7 @@ private slots:
|
||||
void columnSelectMenu(QPoint pos);
|
||||
void columnSelectMenuChecked(bool checked = false);
|
||||
void on_startStop_toggled(bool checked = false);
|
||||
void on_continueScan_clicked();
|
||||
void on_addSingle_clicked();
|
||||
void on_addRange_clicked();
|
||||
void on_remove_clicked();
|
||||
|
||||
@ -698,6 +698,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="continueScan">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Force scanner to continue on next frequency</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../sdrgui/resources/res.qrc">
|
||||
<normaloff>:/arrow_left.png</normaloff>:/arrow_left.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="status">
|
||||
<property name="sizePolicy">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user