diff --git a/cluster.cpp b/cluster.cpp index b3cc76f..ee17415 100644 --- a/cluster.cpp +++ b/cluster.cpp @@ -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")); + } + + } +} diff --git a/cluster.h b/cluster.h index ba357ae..9577a44 100644 --- a/cluster.h +++ b/cluster.h @@ -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 allSpots; + bool skimmerSpots = false; }; #endif diff --git a/wfmain.cpp b/wfmain.cpp index 30b7762..7b72dc2 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -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)), this, SLOT(receiveSpots(QList))); 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; diff --git a/wfmain.h b/wfmain.h index 30d1c77..0c37db8 100644 --- a/wfmain.h +++ b/wfmain.h @@ -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; diff --git a/wfmain.ui b/wfmain.ui index 811e504..08414bc 100644 --- a/wfmain.ui +++ b/wfmain.ui @@ -18,7 +18,7 @@ - 1 + 3 @@ -2223,7 +2223,7 @@ - 1 + 5 @@ -3350,8 +3350,8 @@ 0 0 - 799 - 269 + 801 + 311 @@ -5090,11 +5090,44 @@ Pop-Out + + + + 10 + 470 + 801 + 22 + + + + + + + Show Skimmer Spots + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + groupBox_9 horizontalLayoutWidget groupBox_10 clusterOutputTextEdit clusterPopOutBtn + horizontalLayoutWidget_2 @@ -5263,7 +5296,7 @@ 0 0 1023 - 23 + 21 @@ -5290,7 +5323,7 @@ - +