Add skimmer support (setting not saved)

merge-requests/14/head
Phil Taylor 2022-10-31 12:39:27 +00:00
rodzic 209c5a9b0b
commit 29060eb43e
5 zmienionych plików z 68 dodań i 7 usunięć

Wyświetl plik

@ -57,7 +57,7 @@ void dxClusterClient::enableTcp(bool enable)
tcpEnable = enable;
if (enable)
{
tcpRegex = QRegularExpression("^DX de ([a-z|A-Z|0-9|/]+):\\s+([0-9|.]+)\\s+([a-z|A-Z|0-9|/]+)+\\s+(.*)\\s+(\\d{4}Z)");
tcpRegex = QRegularExpression("^DX de ([a-z-|A-Z|0-9|#|/]+):\\s+([0-9|.]+)\\s+([a-z|A-Z|0-9|/]+)+\\s+(.*)\\s+(\\d{4}Z)");
if (tcpSocket == Q_NULLPTR)
{
@ -181,6 +181,7 @@ void dxClusterClient::tcpDataReceived()
}
if (data.contains("Hello")) {
authenticated = true;
enableSkimmerSpots(skimmerSpots);
}
}
else {
@ -296,3 +297,18 @@ void dxClusterClient::updateSpots()
#endif
emit sendSpots(spots);
}
void dxClusterClient::enableSkimmerSpots(bool enable)
{
skimmerSpots = enable;
if (authenticated) {
if (skimmerSpots) {
sendTcpData(QString("Set Dx Filter Skimmer\n"));
}
else
{
sendTcpData(QString("Set Dx Filter Not Skimmer\n"));
}
}
}

Wyświetl plik

@ -72,6 +72,7 @@ public slots:
void setTcpTimeout(int p) { tcpTimeout = p; }
void tcpCleanup();
void freqRange(double low, double high);
void enableSkimmerSpots(bool enable);
private:
void sendTcpData(QString data);
@ -99,6 +100,7 @@ private:
double lowFreq;
double highFreq;
QMap<QString,spotData*> allSpots;
bool skimmerSpots = false;
};
#endif

Wyświetl plik

@ -127,6 +127,7 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
connect(this, SIGNAL(setClusterPassword(QString)), cluster, SLOT(setTcpPassword(QString)));
connect(this, SIGNAL(setClusterTimeout(int)), cluster, SLOT(setTcpTimeout(int)));
connect(this, SIGNAL(setFrequencyRange(double, double)), cluster, SLOT(freqRange(double, double)));
connect(this, SIGNAL(setClusterSkimmerSpots(bool)), cluster, SLOT(enableSkimmerSpots(bool)));
connect(cluster, SIGNAL(sendSpots(QList<spotData>)), this, SLOT(receiveSpots(QList<spotData>)));
connect(cluster, SIGNAL(sendOutput(QString)), this, SLOT(receiveClusterOutput(QString)));
@ -7843,6 +7844,12 @@ void wfmain::on_clusterPopOutBtn_clicked()
}
}
void wfmain::on_clusterSkimmerSpotsEnable_clicked(bool enable)
{
prefs.clusterSkimmerSpotsEnable = enable;
emit setClusterSkimmerSpots(enable);
}
void wfmain::on_clickDragTuningEnableChk_clicked(bool checked)
{
prefs.clickDragTuningEnable = checked;

Wyświetl plik

@ -197,6 +197,7 @@ signals:
void setClusterUserName(QString name);
void setClusterPassword(QString pass);
void setClusterTimeout(int timeout);
void setClusterSkimmerSpots(bool enable);
void setFrequencyRange(double low, double high);
private slots:
@ -676,6 +677,7 @@ private slots:
void on_clusterPasswordLineEdit_editingFinished();
void on_clusterTimeoutLineEdit_editingFinished();
void on_clusterPopOutBtn_clicked();
void on_clusterSkimmerSpotsEnable_clicked(bool enable);
void on_clickDragTuningEnableChk_clicked(bool checked);
@ -941,6 +943,7 @@ private:
QString clusterTcpUserName;
QString clusterTcpPassword;
int clusterTimeout;
bool clusterSkimmerSpotsEnable;
bool clickDragTuningEnable;
} prefs;

Wyświetl plik

@ -18,7 +18,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
<number>3</number>
</property>
<widget class="QWidget" name="mainTab">
<attribute name="title">
@ -2223,7 +2223,7 @@
<item>
<widget class="QStackedWidget" name="settingsStack">
<property name="currentIndex">
<number>1</number>
<number>5</number>
</property>
<widget class="QWidget" name="radioAccess">
<layout class="QVBoxLayout" name="verticalLayout_21">
@ -3350,8 +3350,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>799</width>
<height>269</height>
<width>801</width>
<height>311</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
@ -5090,11 +5090,44 @@
<string>Pop-Out</string>
</property>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>470</y>
<width>801</width>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_45">
<item>
<widget class="QCheckBox" name="clusterSkimmerSpotsEnable">
<property name="text">
<string>Show Skimmer Spots</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_36">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<zorder>groupBox_9</zorder>
<zorder>horizontalLayoutWidget</zorder>
<zorder>groupBox_10</zorder>
<zorder>clusterOutputTextEdit</zorder>
<zorder>clusterPopOutBtn</zorder>
<zorder>horizontalLayoutWidget_2</zorder>
</widget>
<widget class="QWidget" name="experimental">
<layout class="QVBoxLayout" name="verticalLayout_28">
@ -5263,7 +5296,7 @@
<x>0</x>
<y>0</y>
<width>1023</width>
<height>23</height>
<height>21</height>
</rect>
</property>
</widget>
@ -5290,7 +5323,7 @@
<resources/>
<connections/>
<buttongroups>
<buttongroup name="underlayButtonGroup"/>
<buttongroup name="buttonGroup"/>
<buttongroup name="underlayButtonGroup"/>
</buttongroups>
</ui>