kopia lustrzana https://gitlab.com/eliggett/wfview
Move spots to new widget and add back into scope
rodzic
62171b227a
commit
52ac74c499
|
@ -78,7 +78,7 @@ void cachingQueue::run()
|
|||
emit haveCommand(item.command,item.param,item.sub);
|
||||
if (item.recurring) {
|
||||
queue.insert(queue.cend(),prio,item);
|
||||
updateCache(false,item.command);
|
||||
updateCache(false,item.command,item.param,item.sub);
|
||||
}
|
||||
it=queue.erase(it);
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ void cachingQueue::add(queuePriority prio ,queueItem item)
|
|||
}
|
||||
queue.insert(queue.cend(),prio, item);
|
||||
// Update cache with sent data (will be replaced if found to be invalid.)
|
||||
updateCache(false,item.command,item.param);
|
||||
updateCache(false,item.command,item.param,item.sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ void cachingQueue::addUnique(queuePriority prio ,queueItem item)
|
|||
qInfo() << "adding unique" << funcString[item.command] << "recurring" << item.recurring << "priority" << prio << "sub" << item.sub;
|
||||
}
|
||||
queue.insert(queue.cend(),prio, item);
|
||||
updateCache(false,item.command,item.param);
|
||||
updateCache(false,item.command,item.param,item.sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
66
cluster.cpp
66
cluster.cpp
|
@ -64,6 +64,7 @@ void dxClusterClient::enableTcp(bool enable)
|
|||
tcpSocket = new QTcpSocket(this);
|
||||
tcpSocket->connectToHost(tcpServerName, tcpPort);
|
||||
qInfo(logCluster()) << "Starting tcpSocket() on:" << tcpPort;
|
||||
emit sendOutput(QString("\nConnecting to %0 %1\n\n").arg(tcpServerName).arg(tcpPort));
|
||||
|
||||
connect(tcpSocket, SIGNAL(readyRead()), this, SLOT(tcpDataReceived()), Qt::QueuedConnection);
|
||||
connect(tcpSocket, SIGNAL(disconnected()), this, SLOT(tcpDisconnected()));
|
||||
|
@ -80,6 +81,7 @@ void dxClusterClient::enableTcp(bool enable)
|
|||
{
|
||||
sendTcpData(QString("bye\n"));
|
||||
qInfo(logCluster()) << "Disconnecting tcpSocket() on:" << tcpPort;
|
||||
emit sendOutput(QString("\nDisconnecting from %0 %1\n").arg(tcpServerName).arg(tcpPort));
|
||||
if (tcpCleanupTimer != Q_NULLPTR)
|
||||
{
|
||||
tcpCleanupTimer->stop();
|
||||
|
@ -256,14 +258,20 @@ void dxClusterClient::tcpCleanup()
|
|||
|
||||
void dxClusterClient::tcpDisconnected() {
|
||||
qWarning(logCluster()) << "TCP Cluster server disconnected...";
|
||||
emit sendOutput(QString("\nDisconnected from %0 %1\n").arg(tcpServerName).arg(tcpPort));
|
||||
|
||||
// Need to start a timer and attempt reconnect.
|
||||
}
|
||||
|
||||
void dxClusterClient::freqRange(double low, double high)
|
||||
void dxClusterClient::freqRange(bool sub, double low, double high)
|
||||
{
|
||||
lowFreq = low;
|
||||
highFreq = high;
|
||||
//qInfo(logCluster) << "New range" << low << "-" << high;
|
||||
if (sub) {
|
||||
lowSubFreq = low;
|
||||
highSubFreq = high;
|
||||
} else {
|
||||
lowMainFreq = low;
|
||||
highMainFreq = high;
|
||||
}
|
||||
updateSpots();
|
||||
}
|
||||
|
||||
|
@ -285,17 +293,47 @@ void dxClusterClient::updateSpots()
|
|||
spots.append(s);
|
||||
}
|
||||
#else
|
||||
QMap<QString, spotData*>::iterator spot = allSpots.begin();;
|
||||
while (spot != allSpots.end()) {
|
||||
if (spot.value()->frequency > lowFreq && spot.value()->frequency < highFreq)
|
||||
QMap<QString, spotData*>::iterator mainSpot = allSpots.begin();;
|
||||
while (mainSpot != allSpots.end()) {
|
||||
if (mainSpot.value()->frequency > lowMainFreq && mainSpot.value()->frequency < highMainFreq)
|
||||
{
|
||||
spots.append(**spot);
|
||||
spots.append(**mainSpot);
|
||||
}
|
||||
++spot;
|
||||
++mainSpot;
|
||||
}
|
||||
|
||||
#endif
|
||||
emit sendSpots(spots);
|
||||
if (!spots.empty())
|
||||
emit sendMainSpots(spots);
|
||||
|
||||
spots.clear();
|
||||
#ifdef USESQL
|
||||
// Set the required frequency range.
|
||||
QString queryText = QString("SELECT * FROM spots WHERE frequency > %1 AND frequency < %2").arg(lowFreq).arg(highFreq);
|
||||
//QString queryText = QString("SELECT * FROM spots");
|
||||
database db;
|
||||
auto query = db.query(queryText);
|
||||
|
||||
while (query.next()) {
|
||||
// Step through all current spots within range
|
||||
spotData s = spotData();
|
||||
s.dxcall = query.value(query.record().indexOf("dxcall")).toString();
|
||||
s.frequency = query.value(query.record().indexOf("frequency")).toDouble();
|
||||
spots.append(s);
|
||||
}
|
||||
#else
|
||||
QMap<QString, spotData*>::iterator subSpot = allSpots.begin();;
|
||||
while (subSpot != allSpots.end()) {
|
||||
if (subSpot.value()->frequency > lowSubFreq && subSpot.value()->frequency < highSubFreq)
|
||||
{
|
||||
spots.append(**subSpot);
|
||||
}
|
||||
++subSpot;
|
||||
}
|
||||
|
||||
#endif
|
||||
if (!spots.empty())
|
||||
emit sendSubSpots(spots);
|
||||
}
|
||||
|
||||
void dxClusterClient::enableSkimmerSpots(bool enable)
|
||||
|
@ -303,11 +341,13 @@ void dxClusterClient::enableSkimmerSpots(bool enable)
|
|||
skimmerSpots = enable;
|
||||
if (authenticated) {
|
||||
if (skimmerSpots) {
|
||||
sendTcpData(QString("Set Dx Filter Skimmer\n"));
|
||||
sendTcpData(QString("set/skimmer\n"));
|
||||
sendTcpData(QString("set Dx Filter Skimmer\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
sendTcpData(QString("Set Dx Filter Not Skimmer\n"));
|
||||
{
|
||||
sendTcpData(QString("unset/skimmer\n"));
|
||||
//sendTcpData(QString("set Dx Filter Not Skimmer\n"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
11
cluster.h
11
cluster.h
|
@ -56,7 +56,8 @@ signals:
|
|||
void deleteSpot(QString dxcall);
|
||||
void deleteOldSpots(int minutes);
|
||||
void sendOutput(QString text);
|
||||
void sendSpots(QList<spotData> spots);
|
||||
void sendMainSpots(QList<spotData> spots);
|
||||
void sendSubSpots(QList<spotData> spots);
|
||||
|
||||
public slots:
|
||||
void udpDataReceived();
|
||||
|
@ -71,7 +72,7 @@ public slots:
|
|||
void setTcpPassword(QString s) { tcpPassword = s; }
|
||||
void setTcpTimeout(int p) { tcpTimeout = p; }
|
||||
void tcpCleanup();
|
||||
void freqRange(double low, double high);
|
||||
void freqRange(bool sub, double low, double high);
|
||||
void enableSkimmerSpots(bool enable);
|
||||
|
||||
private:
|
||||
|
@ -97,8 +98,10 @@ private:
|
|||
#ifdef USESQL
|
||||
QSqlDatabase db;
|
||||
#endif
|
||||
double lowFreq;
|
||||
double highFreq;
|
||||
double lowMainFreq;
|
||||
double highMainFreq;
|
||||
double lowSubFreq;
|
||||
double highSubFreq;
|
||||
QMap<QString,spotData*> allSpots;
|
||||
bool skimmerSpots = false;
|
||||
};
|
||||
|
|
7
prefs.h
7
prefs.h
|
@ -5,6 +5,7 @@
|
|||
#include <QColor>
|
||||
#include <QMap>
|
||||
#include "audioconverter.h"
|
||||
#include "cluster.h"
|
||||
#include "rigidentities.h"
|
||||
#include "wfviewtypes.h"
|
||||
|
||||
|
@ -116,7 +117,9 @@ enum prefClusterItem {
|
|||
cl_clusterTcpPort = 1 << 6,
|
||||
cl_clusterTimeout = 1 << 7,
|
||||
cl_clusterSkimmerSpotsEnable = 1 << 8,
|
||||
cl_all = 1 << 9
|
||||
cl_clusterTcpConnect = 1 << 9,
|
||||
cl_clusterTcpDisconnect = 1 << 10,
|
||||
cl_all = 1 << 11
|
||||
};
|
||||
|
||||
enum prefUDPItem {
|
||||
|
@ -196,6 +199,7 @@ struct preferences {
|
|||
quint8 waterfallFormat;
|
||||
|
||||
// Cluster:
|
||||
QList<clusterSettings> clusters;
|
||||
bool clusterUdpEnable;
|
||||
bool clusterTcpEnable;
|
||||
int clusterUdpPort;
|
||||
|
@ -215,6 +219,7 @@ struct preferences {
|
|||
|
||||
audioSetup rxSetup;
|
||||
audioSetup txSetup;
|
||||
|
||||
};
|
||||
|
||||
#endif // PREFS_H
|
||||
|
|
|
@ -2296,8 +2296,7 @@ void rigCommander::parseCommand()
|
|||
break;
|
||||
case funcScopeSubHold:
|
||||
case funcScopeMainHold:
|
||||
// Hold status (only 9700?)
|
||||
value.setValue(static_cast<bool>(payloadIn[2]));
|
||||
value.setValue(static_cast<bool>(payloadIn[3]));
|
||||
break;
|
||||
case funcScopeSubRef:
|
||||
case funcScopeMainRef:
|
||||
|
@ -2319,6 +2318,7 @@ void rigCommander::parseCommand()
|
|||
}
|
||||
case funcScopeSubSpeed:
|
||||
case funcScopeMainSpeed:
|
||||
value.setValue(static_cast<uchar>(payloadIn[3]));
|
||||
break;
|
||||
case funcScopeSubVBW:
|
||||
case funcScopeMainVBW:
|
||||
|
|
|
@ -162,13 +162,6 @@ void settingswidget::acceptColorPresetPtr(colorPrefsType *cp)
|
|||
}
|
||||
}
|
||||
|
||||
void settingswidget::copyClusterList(QList<clusterSettings> c)
|
||||
{
|
||||
this->clusters = c;
|
||||
haveClusterList = true;
|
||||
qDebug(logGui()) << "Updated settings widget clusters. Size of this->clusters: " << clusters.size();
|
||||
setUItoClustersList();
|
||||
}
|
||||
|
||||
void settingswidget::insertClusterOutputText(QString text)
|
||||
{
|
||||
|
@ -179,46 +172,35 @@ void settingswidget::insertClusterOutputText(QString text)
|
|||
|
||||
void settingswidget::setUItoClustersList()
|
||||
{
|
||||
if(haveClusterList)
|
||||
int defaultCluster = 0;
|
||||
int numClusters = prefs->clusters.size();
|
||||
if(numClusters > 0)
|
||||
{
|
||||
int defaultCluster = 0;
|
||||
int numClusters = clusters.size();
|
||||
if(numClusters > 0)
|
||||
ui->clusterServerNameCombo->blockSignals(true);
|
||||
for (int f = 0; f < prefs->clusters.size(); f++)
|
||||
{
|
||||
ui->clusterServerNameCombo->blockSignals(true);
|
||||
for (int f = 0; f < clusters.size(); f++)
|
||||
{
|
||||
ui->clusterServerNameCombo->addItem(clusters[f].server);
|
||||
if (clusters[f].isdefault) {
|
||||
defaultCluster = f;
|
||||
}
|
||||
ui->clusterServerNameCombo->addItem(prefs->clusters[f].server);
|
||||
if (prefs->clusters[f].isdefault) {
|
||||
defaultCluster = f;
|
||||
}
|
||||
ui->clusterServerNameCombo->blockSignals(false);
|
||||
if (clusters.size() > defaultCluster)
|
||||
{
|
||||
ui->clusterServerNameCombo->setCurrentIndex(defaultCluster);
|
||||
ui->clusterTcpPortLineEdit->blockSignals(true);
|
||||
ui->clusterUsernameLineEdit->blockSignals(true);
|
||||
ui->clusterPasswordLineEdit->blockSignals(true);
|
||||
ui->clusterTimeoutLineEdit->blockSignals(true);
|
||||
ui->clusterTcpPortLineEdit->setText(QString::number(clusters[defaultCluster].port));
|
||||
ui->clusterUsernameLineEdit->setText(clusters[defaultCluster].userName);
|
||||
ui->clusterPasswordLineEdit->setText(clusters[defaultCluster].password);
|
||||
ui->clusterTimeoutLineEdit->setText(QString::number(clusters[defaultCluster].timeout));
|
||||
ui->clusterTcpPortLineEdit->blockSignals(false);
|
||||
ui->clusterUsernameLineEdit->blockSignals(false);
|
||||
ui->clusterPasswordLineEdit->blockSignals(false);
|
||||
ui->clusterTimeoutLineEdit->blockSignals(false);
|
||||
}
|
||||
} else {
|
||||
// No clusters in the list
|
||||
ui->clusterTcpPortLineEdit->setEnabled(false);
|
||||
ui->clusterUsernameLineEdit->setEnabled(false);
|
||||
ui->clusterPasswordLineEdit->setEnabled(false);
|
||||
ui->clusterTimeoutLineEdit->setEnabled(false);
|
||||
}
|
||||
} else {
|
||||
qCritical(logGui()) << "Called to update UI of cluster info without cluister list.";
|
||||
ui->clusterServerNameCombo->blockSignals(false);
|
||||
if (prefs->clusters.size() > defaultCluster)
|
||||
{
|
||||
ui->clusterServerNameCombo->setCurrentIndex(defaultCluster);
|
||||
ui->clusterTcpPortLineEdit->blockSignals(true);
|
||||
ui->clusterUsernameLineEdit->blockSignals(true);
|
||||
ui->clusterPasswordLineEdit->blockSignals(true);
|
||||
ui->clusterTimeoutLineEdit->blockSignals(true);
|
||||
ui->clusterTcpPortLineEdit->setText(QString::number(prefs->clusters[defaultCluster].port));
|
||||
ui->clusterUsernameLineEdit->setText(prefs->clusters[defaultCluster].userName);
|
||||
ui->clusterPasswordLineEdit->setText(prefs->clusters[defaultCluster].password);
|
||||
ui->clusterTimeoutLineEdit->setText(QString::number(prefs->clusters[defaultCluster].timeout));
|
||||
ui->clusterTcpPortLineEdit->blockSignals(false);
|
||||
ui->clusterUsernameLineEdit->blockSignals(false);
|
||||
ui->clusterPasswordLineEdit->blockSignals(false);
|
||||
ui->clusterTimeoutLineEdit->blockSignals(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -355,6 +337,12 @@ void settingswidget::updateClusterPrefs(quint64 items)
|
|||
if(items & (int)cl_all)
|
||||
{
|
||||
items = 0xffffffff;
|
||||
// Initial setup, populate combobox
|
||||
ui->clusterServerNameCombo->clear();
|
||||
foreach (auto c, prefs->clusters)
|
||||
{
|
||||
ui->clusterServerNameCombo->addItem(c.server);
|
||||
}
|
||||
}
|
||||
for(int i=1; i < (int)cl_all; i = i << 1)
|
||||
{
|
||||
|
@ -802,9 +790,7 @@ void settingswidget::updateLanPref(prefLanItem plan)
|
|||
ui->tcpServerPortTxt->setText(QString::number(prefs->tcpPort));
|
||||
break;
|
||||
case l_waterfallFormat:
|
||||
ui->waterfallFormatCombo->blockSignals(true);
|
||||
ui->waterfallFormatCombo->setCurrentIndex(prefs->waterfallFormat);
|
||||
ui->waterfallFormatCombo->blockSignals(false);
|
||||
// Not used here
|
||||
break;
|
||||
default:
|
||||
qWarning(logGui()) << "Did not find matching preference for LAN ui update:" << (int)plan;
|
||||
|
@ -815,16 +801,16 @@ void settingswidget::updateLanPref(prefLanItem plan)
|
|||
void settingswidget::updateClusterPref(prefClusterItem pcl)
|
||||
{
|
||||
if(prefs==NULL)
|
||||
return;
|
||||
return;
|
||||
|
||||
updatingUIFromPrefs = true;
|
||||
switch(pcl)
|
||||
{
|
||||
case cl_clusterUdpEnable:
|
||||
quietlyUpdateCheckbox(ui->clusterUdpEnable, prefs->clusterUdpEnable);
|
||||
quietlyUpdateCheckbox(ui->clusterUdpGroup, prefs->clusterUdpEnable);
|
||||
break;
|
||||
case cl_clusterTcpEnable:
|
||||
quietlyUpdateCheckbox(ui->clusterTcpEnable, prefs->clusterTcpEnable);
|
||||
quietlyUpdateCheckbox(ui->clusterTcpGroup, prefs->clusterTcpEnable);
|
||||
break;
|
||||
case cl_clusterUdpPort:
|
||||
ui->clusterUdpPortLineEdit->blockSignals(true);
|
||||
|
@ -832,7 +818,6 @@ void settingswidget::updateClusterPref(prefClusterItem pcl)
|
|||
ui->clusterUdpPortLineEdit->blockSignals(false);
|
||||
break;
|
||||
case cl_clusterTcpServerName:
|
||||
ui->clusterTcpAddBtn->setEnabled(false);
|
||||
// Take this from the clusters list
|
||||
break;
|
||||
case cl_clusterTcpUserName:
|
||||
|
@ -847,7 +832,10 @@ void settingswidget::updateClusterPref(prefClusterItem pcl)
|
|||
// Take this from the clusters list
|
||||
break;
|
||||
case cl_clusterSkimmerSpotsEnable:
|
||||
quietlyUpdateCheckbox(ui->clusterSkimmerSpotsEnable, prefs->clusterSkimmerSpotsEnable);
|
||||
quietlyUpdateCheckbox(ui->clusterSkimmerSpotsEnable, prefs->clusterSkimmerSpotsEnable);
|
||||
break;
|
||||
case cl_clusterTcpConnect:
|
||||
case cl_clusterTcpDisconnect:
|
||||
break;
|
||||
default:
|
||||
qWarning(logGui()) << "Did not find matching UI element for cluster preference " << (int)pcl;
|
||||
|
@ -1248,6 +1236,14 @@ void settingswidget::quietlyUpdateCheckbox(QCheckBox *cb, bool isChecked)
|
|||
cb->blockSignals(false);
|
||||
}
|
||||
|
||||
void settingswidget::quietlyUpdateCheckbox(QGroupBox *gb, bool isChecked)
|
||||
{
|
||||
gb->blockSignals(true);
|
||||
gb->setChecked(isChecked);
|
||||
gb->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
void settingswidget::quietlyUpdateRadiobutton(QRadioButton *rb, bool isChecked)
|
||||
{
|
||||
rb->blockSignals(true);
|
||||
|
@ -1583,42 +1579,59 @@ void settingswidget::on_tcpServerPortTxt_editingFinished()
|
|||
}
|
||||
|
||||
/* Beginning of cluster settings */
|
||||
void settingswidget::on_clusterServerNameCombo_currentIndexChanged(int index)
|
||||
|
||||
|
||||
void settingswidget::on_clusterTcpAddBtn_clicked()
|
||||
{
|
||||
if (index < 0)
|
||||
return;
|
||||
QString text = ui->clusterServerNameCombo->lineEdit()->displayText();
|
||||
int id = ui->clusterServerNameCombo->findText(text);
|
||||
|
||||
if(!haveClusterList)
|
||||
qWarning(logGui()) << "Do not have cluster list yet. Editing may not work.";
|
||||
|
||||
QString text = ui->clusterServerNameCombo->currentText();
|
||||
|
||||
if (clusters.size() <= index)
|
||||
if (id == -1)
|
||||
{
|
||||
qInfo(logGui) << "Adding Cluster server" << text;
|
||||
ui->clusterServerNameCombo->addItem(text);
|
||||
clusterSettings c;
|
||||
c.server = text;
|
||||
clusters.append(c);
|
||||
ui->clusterTcpPortLineEdit->setEnabled(true);
|
||||
ui->clusterUsernameLineEdit->setEnabled(true);
|
||||
ui->clusterPasswordLineEdit->setEnabled(true);
|
||||
ui->clusterTimeoutLineEdit->setEnabled(true);
|
||||
|
||||
c.userName = prefs->clusterTcpUserName;
|
||||
c.password = prefs->clusterTcpPassword;
|
||||
c.port = prefs->clusterTcpPort;
|
||||
c.timeout = prefs->clusterTimeout;
|
||||
c.isdefault = true;
|
||||
prefs->clusters.append(c);
|
||||
} else {
|
||||
prefs->clusters[id].userName = prefs->clusterTcpUserName;
|
||||
prefs->clusters[id].password = prefs->clusterTcpPassword;
|
||||
prefs->clusters[id].port = prefs->clusterTcpPort;
|
||||
prefs->clusters[id].timeout = prefs->clusterTimeout;
|
||||
}
|
||||
else {
|
||||
qInfo(logGui) << "Editing Cluster server" << text;
|
||||
clusters[index].server = text;
|
||||
}
|
||||
quietlyUpdateLineEdit(ui->clusterTcpPortLineEdit,QString::number(clusters[index].port));
|
||||
quietlyUpdateLineEdit(ui->clusterUsernameLineEdit,clusters[index].userName);
|
||||
quietlyUpdateLineEdit(ui->clusterPasswordLineEdit,clusters[index].password);
|
||||
quietlyUpdateLineEdit(ui->clusterTimeoutLineEdit,QString::number(clusters[index].timeout));
|
||||
}
|
||||
|
||||
for (int i = 0; i < clusters.size(); i++) {
|
||||
void settingswidget::on_clusterTcpDelBtn_clicked()
|
||||
{
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
if (index < 0)
|
||||
return;
|
||||
QString text = ui->clusterServerNameCombo->currentText();
|
||||
qInfo(logGui) << "Deleting Cluster server" << text;
|
||||
prefs->clusters.removeAt(index);
|
||||
ui->clusterServerNameCombo->removeItem(index);
|
||||
ui->clusterServerNameCombo->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterServerNameCombo_currentIndexChanged(int index)
|
||||
{
|
||||
if (index < 0 || index >= prefs->clusters.size())
|
||||
return;
|
||||
|
||||
quietlyUpdateLineEdit(ui->clusterTcpPortLineEdit,QString::number(prefs->clusters[index].port));
|
||||
quietlyUpdateLineEdit(ui->clusterUsernameLineEdit,prefs->clusters[index].userName);
|
||||
quietlyUpdateLineEdit(ui->clusterPasswordLineEdit,prefs->clusters[index].password);
|
||||
quietlyUpdateLineEdit(ui->clusterTimeoutLineEdit,QString::number(prefs->clusters[index].timeout));
|
||||
|
||||
for (int i = 0; i < prefs->clusters.size(); i++) {
|
||||
if (i == index)
|
||||
clusters[i].isdefault = true;
|
||||
prefs->clusters[i].isdefault = true;
|
||||
else
|
||||
clusters[i].isdefault = false;
|
||||
prefs->clusters[i].isdefault = false;
|
||||
}
|
||||
|
||||
// For reference, here is what the code on the other side is basically doing:
|
||||
|
@ -1630,104 +1643,54 @@ void settingswidget::on_clusterServerNameCombo_currentIndexChanged(int index)
|
|||
|
||||
// We are using the not-arrayed data in preferences
|
||||
// to communicate the current cluster information:
|
||||
prefs->clusterTcpServerName = clusters[index].server;
|
||||
prefs->clusterTcpPort = clusters[index].port;
|
||||
prefs->clusterTcpUserName = clusters[index].userName;
|
||||
prefs->clusterTcpPassword = clusters[index].password;
|
||||
prefs->clusterTimeout = clusters[index].timeout;
|
||||
prefs->clusterTcpEnable = ui->clusterTcpEnable->isChecked();
|
||||
prefs->clusterTcpServerName = prefs->clusters[index].server;
|
||||
prefs->clusterTcpPort = prefs->clusters[index].port;
|
||||
prefs->clusterTcpUserName = prefs->clusters[index].userName;
|
||||
prefs->clusterTcpPassword = prefs->clusters[index].password;
|
||||
prefs->clusterTimeout = prefs->clusters[index].timeout;
|
||||
|
||||
emit changedClusterPrefs(cl_clusterTcpServerName |
|
||||
/*emit changedClusterPrefs(cl_clusterTcpServerName |
|
||||
cl_clusterTcpPort |
|
||||
cl_clusterTcpUserName |
|
||||
cl_clusterTcpPassword |
|
||||
cl_clusterTimeout |
|
||||
cl_clusterTcpEnable);
|
||||
cl_clusterTcpEnable); */
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterUdpEnable_clicked(bool checked)
|
||||
void settingswidget::on_clusterUdpGroup_clicked(bool checked)
|
||||
{
|
||||
prefs->clusterUdpEnable = checked;
|
||||
emit changedClusterPref(cl_clusterUdpEnable);
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterTcpEnable_clicked(bool checked)
|
||||
void settingswidget::on_clusterTcpGroup_clicked(bool checked)
|
||||
{
|
||||
prefs->clusterTcpEnable = checked;
|
||||
emit changedClusterPref(cl_clusterTcpEnable);
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterTcpAddBtn_clicked()
|
||||
{
|
||||
// Maybe this will be easier than "hit enter" ?
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
on_clusterServerNameCombo_currentIndexChanged(index);
|
||||
ui->clusterTcpAddBtn->setEnabled(false);
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterServerNameCombo_currentTextChanged(const QString &text)
|
||||
{
|
||||
if (text.isEmpty()) {
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
ui->clusterServerNameCombo->removeItem(index);
|
||||
clusters.removeAt(index);
|
||||
if (clusters.size() == 0)
|
||||
{
|
||||
ui->clusterTcpPortLineEdit->setEnabled(false);
|
||||
ui->clusterUsernameLineEdit->setEnabled(false);
|
||||
ui->clusterPasswordLineEdit->setEnabled(false);
|
||||
ui->clusterTimeoutLineEdit->setEnabled(false);
|
||||
}
|
||||
}
|
||||
ui->clusterTcpAddBtn->setEnabled(true);
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterTcpPortLineEdit_editingFinished()
|
||||
{
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
if (index < clusters.size())
|
||||
{
|
||||
clusters[index].port = ui->clusterTcpPortLineEdit->displayText().toInt();
|
||||
//emit setClusterTcpPort(clusters[index].port);
|
||||
prefs->clusterTcpPort = clusters[index].port;
|
||||
emit changedClusterPref(cl_clusterTcpPort);
|
||||
}
|
||||
prefs->clusterTcpPort = ui->clusterTcpPortLineEdit->displayText().toInt();
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterUsernameLineEdit_editingFinished()
|
||||
{
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
if (index < clusters.size())
|
||||
{
|
||||
clusters[index].userName = ui->clusterUsernameLineEdit->text();
|
||||
//emit setClusterUserName(clusters[index].userName);
|
||||
prefs->clusterTcpUserName = clusters[index].userName;
|
||||
emit changedClusterPref(cl_clusterTcpUserName);
|
||||
}
|
||||
prefs->clusterTcpUserName = ui->clusterUsernameLineEdit->text();
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterPasswordLineEdit_editingFinished()
|
||||
{
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
if (index < clusters.size())
|
||||
{
|
||||
clusters[index].password = ui->clusterPasswordLineEdit->text();
|
||||
//emit setClusterPassword(clusters[index].password);
|
||||
prefs->clusterTcpPassword = clusters[index].password;
|
||||
emit changedClusterPref(cl_clusterTcpPassword);
|
||||
}
|
||||
prefs->clusterTcpPassword = ui->clusterPasswordLineEdit->text();
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterTimeoutLineEdit_editingFinished()
|
||||
{
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
if (index < clusters.size())
|
||||
{
|
||||
clusters[index].timeout = ui->clusterTimeoutLineEdit->displayText().toInt();
|
||||
//emit setClusterTimeout(clusters[index].timeout);
|
||||
prefs->clusterTimeout = clusters[index].timeout;
|
||||
emit changedClusterPref(cl_clusterTimeout);
|
||||
}
|
||||
prefs->clusterTimeout = ui->clusterTimeoutLineEdit->displayText().toInt();
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterUdpPortLineEdit_editingFinished()
|
||||
|
@ -1747,6 +1710,17 @@ void settingswidget::on_clusterSkimmerSpotsEnable_clicked(bool checked)
|
|||
emit changedClusterPref(cl_clusterSkimmerSpotsEnable);
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterTcpConnectBtn_clicked()
|
||||
{
|
||||
emit changedClusterPref(cl_clusterTcpConnect);
|
||||
}
|
||||
|
||||
void settingswidget::on_clusterTcpDisconnectBtn_clicked()
|
||||
{
|
||||
emit changedClusterPref(cl_clusterTcpDisconnect);
|
||||
}
|
||||
|
||||
|
||||
/* End of cluster settings */
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ public slots:
|
|||
void acceptServerConfig(SERVERCONFIG *serverConfig);
|
||||
void acceptColorPresetPtr(colorPrefsType *cp);
|
||||
|
||||
void copyClusterList(QList<clusterSettings> c);
|
||||
void insertClusterOutputText(QString text);
|
||||
|
||||
void updateIfPrefs(quint64 items);
|
||||
|
@ -135,9 +134,10 @@ private slots:
|
|||
void on_rigctldPortTxt_editingFinished();
|
||||
void on_tcpServerPortTxt_editingFinished();
|
||||
void on_clusterServerNameCombo_currentIndexChanged(int index);
|
||||
void on_clusterUdpEnable_clicked(bool checked);
|
||||
void on_clusterTcpEnable_clicked(bool checked);
|
||||
void on_clusterTcpAddBtn_clicked();
|
||||
void on_clusterTcpDelBtn_clicked();
|
||||
void on_clusterUdpGroup_clicked(bool checked);
|
||||
void on_clusterTcpGroup_clicked(bool checked);
|
||||
void on_clusterServerNameCombo_currentTextChanged(const QString &arg1);
|
||||
void on_clusterTcpPortLineEdit_editingFinished();
|
||||
void on_clusterUsernameLineEdit_editingFinished();
|
||||
|
@ -145,6 +145,9 @@ private slots:
|
|||
void on_clusterTimeoutLineEdit_editingFinished();
|
||||
void on_clusterUdpPortLineEdit_editingFinished();
|
||||
void on_clusterSkimmerSpotsEnable_clicked(bool checked);
|
||||
void on_clusterTcpConnectBtn_clicked();
|
||||
void on_clusterTcpDisconnectBtn_clicked();
|
||||
|
||||
void on_debugBtn_clicked();
|
||||
void on_ipAddressTxt_textChanged(const QString &arg1);
|
||||
void on_usernameTxt_textChanged(const QString &arg1);
|
||||
|
@ -244,6 +247,7 @@ private:
|
|||
void quietlyUpdateCombobox(QComboBox *cb, QString val);
|
||||
void quietlyUpdateSpinbox(QSpinBox *sb, int val);
|
||||
void quietlyUpdateCheckbox(QCheckBox *cb, bool isChecked);
|
||||
void quietlyUpdateCheckbox(QGroupBox *gb, bool isChecked);
|
||||
void quietlyUpdateRadiobutton(QRadioButton *rb, bool isChecked);
|
||||
void quietlyUpdateLineEdit(QLineEdit *le, const QString text);
|
||||
|
||||
|
@ -279,8 +283,6 @@ private:
|
|||
bool haveClusterList = false;
|
||||
bool updatingUIFromPrefs = false;
|
||||
|
||||
QList<clusterSettings> clusters;
|
||||
|
||||
audioDevices* audioDev = Q_NULLPTR;
|
||||
|
||||
};
|
||||
|
|
|
@ -2871,245 +2871,235 @@ ONLY use Manual CI-V when Transceive mode is not supported</string>
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>10</y>
|
||||
<width>831</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_33">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>This page contains configuration for DX Cluster, either UDP style broadcast (from N1MM+/DXlog) or TCP connection to your favourite cluster</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<width>221</width>
|
||||
<height>241</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>UDP Broadcast Connection</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>40</y>
|
||||
<width>181</width>
|
||||
<height>171</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_35">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_33">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>UDP Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="clusterUdpPortLineEdit">
|
||||
<property name="inputMask">
|
||||
<string>00000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="clusterUdpEnable">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
<string>This page contains configuration for DX Cluster, either UDP style broadcast (from N1MM+/DXlog) or TCP connection to your favourite cluster</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>50</y>
|
||||
<width>391</width>
|
||||
<height>241</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>TCP Cluster Connection</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>351</width>
|
||||
<height>192</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="clusterTcpEnable">
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="clusterTcpGroup">
|
||||
<property name="title">
|
||||
<string>TCP Cluster Connection</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_45">
|
||||
<property name="text">
|
||||
<string>Server Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QComboBox" name="clusterServerNameCombo">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clusterTcpAddBtn">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add/Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clusterTcpDelBtn">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Del</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_49">
|
||||
<property name="text">
|
||||
<string>Server Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="clusterTcpPortLineEdit">
|
||||
<property name="inputMask">
|
||||
<string>00000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_46">
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="clusterUsernameLineEdit"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_47">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="clusterPasswordLineEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::PasswordEchoOnEdit</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_48">
|
||||
<property name="text">
|
||||
<string>Spot Timeout (minutes)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="clusterTimeoutLineEdit">
|
||||
<property name="inputMask">
|
||||
<string>0000</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="QPushButton" name="clusterTcpConnectBtn">
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clusterTcpDisconnectBtn">
|
||||
<property name="text">
|
||||
<string>Disconnect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<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>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="clusterUdpGroup">
|
||||
<property name="title">
|
||||
<string>UDP Broadcast Connection</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_35">
|
||||
<property name="text">
|
||||
<string>UDP Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="clusterUdpPortLineEdit">
|
||||
<property name="inputMask">
|
||||
<string>00000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="clusterOutputTextEdit">
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_451">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="clusterSkimmerSpotsEnable">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
<string>Show Skimmer Spots</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_49">
|
||||
<property name="text">
|
||||
<string>Server Port</string>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_36">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="clusterTcpPortLineEdit">
|
||||
<property name="inputMask">
|
||||
<string>00000</string>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_46">
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="clusterUsernameLineEdit"/>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_47">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="clusterPasswordLineEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::PasswordEchoOnEdit</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_48">
|
||||
<property name="text">
|
||||
<string>Spot Timeout (minutes)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="clusterTimeoutLineEdit">
|
||||
<property name="inputMask">
|
||||
<string>0000</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QComboBox" name="clusterServerNameCombo">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clusterTcpAddBtn">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_45">
|
||||
<property name="text">
|
||||
<string>Server Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPlainTextEdit" name="clusterOutputTextEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>320</y>
|
||||
<width>811</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>470</y>
|
||||
<width>801</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_451">
|
||||
<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>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>clusterUdpGroup</zorder>
|
||||
<zorder>clusterTcpGroup</zorder>
|
||||
<zorder>clusterOutputTextEdit</zorder>
|
||||
<zorder>horizontalLayoutWidget_2</zorder>
|
||||
</widget>
|
||||
<widget class="QWidget" name="experimental">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_28">
|
||||
|
|
|
@ -211,7 +211,11 @@ spectrumScope::spectrumScope(QWidget *parent)
|
|||
showHideControls(spectrumMode_t::spectModeCenter);
|
||||
}
|
||||
|
||||
|
||||
void spectrumScope::prepareScope(uint maxAmp, uint spectWidth)
|
||||
{
|
||||
this->spectWidth = spectWidth;
|
||||
this->maxAmp = maxAmp;
|
||||
}
|
||||
|
||||
bool spectrumScope::prepareWf(uint wf)
|
||||
{
|
||||
|
@ -346,7 +350,7 @@ bool spectrumScope::update(scopeData data)
|
|||
preparePlasma();
|
||||
}
|
||||
// Inform other threads (cluster) that the frequency range has changed.
|
||||
//emit frequencyRange(data.startFreq, data.endFreq);
|
||||
emit frequencyRange(sub, data.startFreq, data.endFreq);
|
||||
}
|
||||
|
||||
lowerFreq = data.startFreq;
|
||||
|
@ -882,8 +886,6 @@ void spectrumScope::scopeClick(QMouseEvent* me)
|
|||
}
|
||||
else if (me->button() == Qt::RightButton)
|
||||
{
|
||||
// TODO spots!
|
||||
/*
|
||||
if (textItem != nullptr) {
|
||||
QMap<QString, spotData*>::iterator spot = clusterSpots.find(textItem->text());
|
||||
if (spot != clusterSpots.end() && spot.key() == textItem->text()) {
|
||||
|
@ -908,10 +910,7 @@ void spectrumScope::scopeClick(QMouseEvent* me)
|
|||
spotDialog->connect(bExit, SIGNAL(clicked()), spotDialog, SLOT(close()));
|
||||
}
|
||||
}
|
||||
else
|
||||
*/
|
||||
|
||||
if (passbandAction == passbandStatic && rectItem != nullptr)
|
||||
else if (passbandAction == passbandStatic && rectItem != nullptr)
|
||||
{
|
||||
if (cursor <= pbtLeftPix && cursor > pbtLeftPix - 10)
|
||||
{
|
||||
|
@ -1277,3 +1276,107 @@ void spectrumScope::holdPressed(bool en)
|
|||
{
|
||||
queue->add(priorityImmediate,queueItem(sub?funcScopeSubHold:funcScopeMainHold,QVariant::fromValue(en),false,sub));
|
||||
}
|
||||
|
||||
void spectrumScope::setHold(bool h)
|
||||
{
|
||||
this->holdButton->blockSignals(true);
|
||||
this->holdButton->setChecked(h);
|
||||
this->holdButton->blockSignals(false);
|
||||
}
|
||||
|
||||
void spectrumScope::setSpeed(uchar s)
|
||||
{
|
||||
this->speedCombo->blockSignals(true);
|
||||
this->speedCombo->setCurrentIndex(this->speedCombo->findData(s));
|
||||
this->speedCombo->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
void spectrumScope::receiveSpots(QList<spotData> spots)
|
||||
{
|
||||
//QElapsedTimer timer;
|
||||
//timer.start();
|
||||
bool current = false;
|
||||
|
||||
if (clusterSpots.size() > 0) {
|
||||
current=clusterSpots.begin().value()->current;
|
||||
}
|
||||
|
||||
foreach(spotData s, spots)
|
||||
{
|
||||
bool found = false;
|
||||
QMap<QString, spotData*>::iterator spot = clusterSpots.find(s.dxcall);
|
||||
|
||||
while (spot != clusterSpots.end() && spot.key() == s.dxcall && spot.value()->frequency == s.frequency) {
|
||||
spot.value()->current = !current;
|
||||
found = true;
|
||||
++spot;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
|
||||
QCPRange xrange=spectrum->xAxis->range();
|
||||
QCPRange yrange=spectrum->yAxis->range();
|
||||
double left = s.frequency;
|
||||
double top = yrange.upper-10.0;
|
||||
|
||||
bool conflict = true;
|
||||
while (conflict) {
|
||||
#if QCUSTOMPLOT_VERSION < 0x020000
|
||||
QCPItemText* item = spectrum->itemAt<QCPItemText>(QPointF(spectrum->xAxis->coordToPixel(left),spectrum->yAxis->coordToPixel(top)), true);
|
||||
#else
|
||||
QCPItemText* item = spectrum->itemAt<QCPItemText>(QPointF(spectrum->xAxis->coordToPixel(left),spectrum->yAxis->coordToPixel(top)), true);
|
||||
#endif
|
||||
if (item != nullptr) {
|
||||
top = top - 10.0;
|
||||
if (top < 10.0)
|
||||
{
|
||||
top = yrange.upper-10.0;
|
||||
left = left + (xrange.size()/20);
|
||||
}
|
||||
}
|
||||
else {
|
||||
conflict = false;
|
||||
}
|
||||
}
|
||||
spotData* sp = new spotData(s);
|
||||
|
||||
//qDebug(logCluster()) << "ADD:" << sp->dxcall;
|
||||
sp->current = !current;
|
||||
sp->text = new QCPItemText(spectrum);
|
||||
sp->text->setAntialiased(true);
|
||||
sp->text->setColor(colors.clusterSpots);
|
||||
sp->text->setText(sp->dxcall);
|
||||
sp->text->setFont(QFont(font().family(), 10));
|
||||
sp->text->setPositionAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
|
||||
sp->text->position->setType(QCPItemPosition::ptPlotCoords);
|
||||
sp->text->setSelectable(true);
|
||||
QMargins margin;
|
||||
int width = (sp->text->right - sp->text->left) / 2;
|
||||
margin.setLeft(width);
|
||||
margin.setRight(width);
|
||||
sp->text->setPadding(margin);
|
||||
sp->text->position->setCoords(left, top);
|
||||
sp->text->setVisible(true);
|
||||
clusterSpots.insert(sp->dxcall, sp);
|
||||
}
|
||||
}
|
||||
|
||||
QMap<QString, spotData*>::iterator spot2 = clusterSpots.begin();
|
||||
while (spot2 != clusterSpots.end()) {
|
||||
if (spot2.value()->current == current) {
|
||||
spectrum->removeItem(spot2.value()->text);
|
||||
//qDebug(logCluster()) << "REMOVE:" << spot2.value()->dxcall;
|
||||
delete spot2.value(); // Stop memory leak?
|
||||
spot2 = clusterSpots.erase(spot2);
|
||||
}
|
||||
else {
|
||||
++spot2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//qDebug(logCluster()) << "Processing took" << timer.nsecsElapsed() / 1000 << "us";
|
||||
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ public:
|
|||
explicit spectrumScope(QWidget *parent = nullptr);
|
||||
|
||||
bool prepareWf(uint wfLength);
|
||||
void prepareScope(uint ampMap, uint spectWidth);
|
||||
bool update(scopeData spectrum);
|
||||
void preparePlasma();
|
||||
void setRange(int floor, int ceiling);
|
||||
|
@ -82,13 +83,16 @@ public:
|
|||
void addFilter(QString text, QVariant data) {filterCombo->blockSignals(true); filterCombo->addItem(text,data); filterCombo->blockSignals(false);}
|
||||
|
||||
void selected(bool);
|
||||
void setHold(bool h);
|
||||
void setSpeed(uchar s);
|
||||
|
||||
public slots: // Can be called directly or updated via signal/slot
|
||||
void selectScopeMode(spectrumMode_t m);
|
||||
void selectSpan(centerSpanData s);
|
||||
void receiveSpots(QList<spotData> spots);
|
||||
|
||||
signals:
|
||||
void frequencyRange(double start, double end);
|
||||
void frequencyRange(bool sub, double start, double end);
|
||||
void updateScopeMode(spectrumMode_t index);
|
||||
void updateSpan(centerSpanData s);
|
||||
void showStatusBarText(QString text);
|
||||
|
|
508
wfmain.cpp
508
wfmain.cpp
|
@ -210,10 +210,12 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
|
|||
connect(this, SIGNAL(setClusterUserName(QString)), cluster, SLOT(setTcpUserName(QString)));
|
||||
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(ui->mainScope, SIGNAL(frequencyRange(bool, double, double)), cluster, SLOT(freqRange(bool, double, double)));
|
||||
connect(ui->subScope, SIGNAL(frequencyRange(bool, double, double)), cluster, SLOT(freqRange(bool, double, double)));
|
||||
connect(cluster, SIGNAL(sendMainSpots(QList<spotData>)), ui->mainScope, SLOT(receiveSpots(QList<spotData>)));
|
||||
connect(cluster, SIGNAL(sendSubSpots(QList<spotData>)), ui->subScope, SLOT(receiveSpots(QList<spotData>)));
|
||||
connect(cluster, SIGNAL(sendOutput(QString)), this, SLOT(receiveClusterOutput(QString)));
|
||||
|
||||
connect(clusterThread, SIGNAL(finished()), cluster, SLOT(deleteLater()));
|
||||
|
@ -223,15 +225,16 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
|
|||
emit setClusterUdpPort(prefs.clusterUdpPort);
|
||||
emit setClusterEnableUdp(prefs.clusterUdpEnable);
|
||||
|
||||
for (int f = 0; f < clusters.size(); f++)
|
||||
for (int f = 0; f < prefs.clusters.size(); f++)
|
||||
{
|
||||
if (clusters[f].isdefault)
|
||||
if (prefs.clusters[f].isdefault)
|
||||
{
|
||||
emit setClusterServerName(clusters[f].server);
|
||||
emit setClusterTcpPort(clusters[f].port);
|
||||
emit setClusterUserName(clusters[f].userName);
|
||||
emit setClusterPassword(clusters[f].password);
|
||||
emit setClusterTimeout(clusters[f].timeout);
|
||||
emit setClusterServerName(prefs.clusters[f].server);
|
||||
emit setClusterTcpPort(prefs.clusters[f].port);
|
||||
emit setClusterUserName(prefs.clusters[f].userName);
|
||||
emit setClusterPassword(prefs.clusters[f].password);
|
||||
emit setClusterTimeout(prefs.clusters[f].timeout);
|
||||
emit setClusterSkimmerSpots(prefs.clusterSkimmerSpotsEnable);
|
||||
}
|
||||
}
|
||||
emit setClusterEnableTcp(prefs.clusterTcpEnable);
|
||||
|
@ -1174,8 +1177,6 @@ void wfmain::connectSettingsWidget()
|
|||
connect(setupui, SIGNAL(changedServerPref(prefServerItem)), this, SLOT(extChangedServerPref(prefServerItem)));
|
||||
connect(setupui, SIGNAL(changedServerPrefs(quint64)), this, SLOT(extChangedServerPrefs(quint64)));
|
||||
|
||||
connect(this, SIGNAL(haveClusterList(QList<clusterSettings>)), setupui, SLOT(copyClusterList(QList<clusterSettings>)));
|
||||
|
||||
connect(setupui, SIGNAL(changedAudioInputCombo(int)), this, SLOT(changedAudioInput(int)));
|
||||
connect(setupui, SIGNAL(changedAudioOutputCombo(int)), this, SLOT(changedAudioOutput(int)));
|
||||
connect(setupui, SIGNAL(changedServerRXAudioInputCombo(int)), this, SLOT(changedServerRXAudioInput(int)));
|
||||
|
@ -2088,12 +2089,8 @@ void wfmain::loadSettings()
|
|||
enableRigCtl(prefs.enableRigCtlD);
|
||||
|
||||
prefs.tcpPort = settings->value("TcpServerPort", defPrefs.tcpPort).toInt();
|
||||
ui->tcpServerPortTxt->setText(QString("%1").arg(prefs.tcpPort));
|
||||
|
||||
prefs.waterfallFormat = settings->value("WaterfallFormat", defPrefs.waterfallFormat).toInt();
|
||||
ui->waterfallFormatCombo->blockSignals(true);
|
||||
ui->waterfallFormatCombo->setCurrentIndex(prefs.waterfallFormat);
|
||||
ui->waterfallFormatCombo->blockSignals(false);
|
||||
|
||||
udpPrefs.ipAddress = settings->value("IPAddress", udpDefPrefs.ipAddress).toString();
|
||||
udpPrefs.controlLANPort = settings->value("ControlLANPort", udpDefPrefs.controlLANPort).toInt();
|
||||
|
@ -2276,12 +2273,9 @@ void wfmain::loadSettings()
|
|||
prefs.clusterUdpEnable = settings->value("UdpEnabled", false).toBool();
|
||||
prefs.clusterTcpEnable = settings->value("TcpEnabled", false).toBool();
|
||||
prefs.clusterUdpPort = settings->value("UdpPort", 12060).toInt();
|
||||
ui->clusterUdpPortLineEdit->setText(QString::number(prefs.clusterUdpPort));
|
||||
ui->clusterUdpEnable->setChecked(prefs.clusterUdpEnable);
|
||||
ui->clusterTcpEnable->setChecked(prefs.clusterTcpEnable);
|
||||
|
||||
int numClusters = settings->beginReadArray("Servers");
|
||||
clusters.clear();
|
||||
prefs.clusters.clear();
|
||||
if (numClusters > 0) {
|
||||
{
|
||||
for (int f = 0; f < numClusters; f++)
|
||||
|
@ -2295,47 +2289,13 @@ void wfmain::loadSettings()
|
|||
c.timeout = settings->value("Timeout", 0).toInt();
|
||||
c.isdefault = settings->value("Default", false).toBool();
|
||||
if (!c.server.isEmpty()) {
|
||||
clusters.append(c);
|
||||
prefs.clusters.append(c);
|
||||
}
|
||||
}
|
||||
int defaultCluster = 0;
|
||||
ui->clusterServerNameCombo->blockSignals(true);
|
||||
for (int f = 0; f < clusters.size(); f++)
|
||||
{
|
||||
ui->clusterServerNameCombo->addItem(clusters[f].server);
|
||||
if (clusters[f].isdefault) {
|
||||
defaultCluster = f;
|
||||
}
|
||||
}
|
||||
ui->clusterServerNameCombo->blockSignals(false);
|
||||
|
||||
if (clusters.size() > defaultCluster)
|
||||
{
|
||||
ui->clusterServerNameCombo->setCurrentIndex(defaultCluster);
|
||||
ui->clusterTcpPortLineEdit->blockSignals(true);
|
||||
ui->clusterUsernameLineEdit->blockSignals(true);
|
||||
ui->clusterPasswordLineEdit->blockSignals(true);
|
||||
ui->clusterTimeoutLineEdit->blockSignals(true);
|
||||
ui->clusterTcpPortLineEdit->setText(QString::number(clusters[defaultCluster].port));
|
||||
ui->clusterUsernameLineEdit->setText(clusters[defaultCluster].userName);
|
||||
ui->clusterPasswordLineEdit->setText(clusters[defaultCluster].password);
|
||||
ui->clusterTimeoutLineEdit->setText(QString::number(clusters[defaultCluster].timeout));
|
||||
ui->clusterTcpPortLineEdit->blockSignals(false);
|
||||
ui->clusterUsernameLineEdit->blockSignals(false);
|
||||
ui->clusterPasswordLineEdit->blockSignals(false);
|
||||
ui->clusterTimeoutLineEdit->blockSignals(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
ui->clusterTcpPortLineEdit->setEnabled(false);
|
||||
ui->clusterUsernameLineEdit->setEnabled(false);
|
||||
ui->clusterPasswordLineEdit->setEnabled(false);
|
||||
ui->clusterTimeoutLineEdit->setEnabled(false);
|
||||
}
|
||||
settings->endArray();
|
||||
settings->endGroup();
|
||||
//emit haveClusterList(clusters);
|
||||
|
||||
// CW Memory Load:
|
||||
settings->beginGroup("Keyer");
|
||||
|
@ -3002,9 +2962,21 @@ void wfmain::extChangedClusterPref(prefClusterItem i)
|
|||
emit setClusterTimeout(prefs.clusterTimeout);
|
||||
break;
|
||||
case cl_clusterSkimmerSpotsEnable:
|
||||
// Used?
|
||||
emit setClusterSkimmerSpots(prefs.clusterSkimmerSpotsEnable);
|
||||
break;
|
||||
case cl_clusterTcpConnect:
|
||||
emit setClusterEnableTcp(false);
|
||||
emit setClusterServerName(prefs.clusterTcpServerName);
|
||||
emit setClusterUserName(prefs.clusterTcpUserName);
|
||||
emit setClusterPassword(prefs.clusterTcpPassword);
|
||||
emit setClusterTcpPort(prefs.clusterTcpPort);
|
||||
emit setClusterTimeout(prefs.clusterTimeout);
|
||||
emit setClusterSkimmerSpots(prefs.clusterSkimmerSpotsEnable);
|
||||
emit setClusterEnableTcp(true);
|
||||
break;
|
||||
case cl_clusterTcpDisconnect:
|
||||
emit setClusterEnableTcp(false);
|
||||
break;
|
||||
default:
|
||||
qWarning(logSystem()) << "Did not find matching preference element in wfmain for cluster preference " << (int)i;
|
||||
break;
|
||||
|
@ -3439,15 +3411,22 @@ void wfmain::saveSettings()
|
|||
|
||||
settings->beginWriteArray("Servers");
|
||||
|
||||
for (int f = 0; f < clusters.count(); f++)
|
||||
for (int f = 0; f < prefs.clusters.count(); f++)
|
||||
{
|
||||
settings->setArrayIndex(f);
|
||||
settings->setValue("ServerName", clusters[f].server);
|
||||
settings->setValue("UserName", clusters[f].userName);
|
||||
settings->setValue("Port", clusters[f].port);
|
||||
settings->setValue("Password", clusters[f].password);
|
||||
settings->setValue("Timeout", clusters[f].timeout);
|
||||
settings->setValue("Default", clusters[f].isdefault);
|
||||
settings->setValue("ServerName", prefs.clusters[f].server);
|
||||
settings->setValue("UserName", prefs.clusters[f].userName);
|
||||
settings->setValue("Port", prefs.clusters[f].port);
|
||||
settings->setValue("Password", prefs.clusters[f].password);
|
||||
settings->setValue("Timeout", prefs.clusters[f].timeout);
|
||||
settings->setValue("Default", prefs.clusters[f].isdefault);
|
||||
if (prefs.clusters[f].isdefault == true) {
|
||||
prefs.clusterTcpServerName = prefs.clusters[f].server;
|
||||
prefs.clusterTcpUserName = prefs.clusters[f].userName;
|
||||
prefs.clusterTcpPassword = prefs.clusters[f].password;
|
||||
prefs.clusterTcpPort = prefs.clusters[f].port;
|
||||
prefs.clusterTimeout = prefs.clusters[f].timeout;
|
||||
}
|
||||
}
|
||||
|
||||
settings->endArray();
|
||||
|
@ -4301,11 +4280,11 @@ void wfmain::receiveRigID(rigCapabilities rigCaps)
|
|||
serverConfig.rigs.first()->baudRate = rigCaps.baudRate;
|
||||
}
|
||||
setWindowTitle(rigCaps.modelName);
|
||||
this->spectWidth = rigCaps.spectLenMax; // used once haveRigCaps is true.
|
||||
//wfCeiling = rigCaps.spectAmpMax;
|
||||
//plotCeiling = rigCaps.spectAmpMax;
|
||||
|
||||
if(rigCaps.hasSpectrum)
|
||||
{
|
||||
ui->mainScope->prepareScope(rigCaps.spectAmpMax, rigCaps.spectLenMax);
|
||||
ui->subScope->prepareScope(rigCaps.spectAmpMax, rigCaps.spectLenMax);
|
||||
ui->topLevelSlider->setVisible(true);
|
||||
ui->labelTop->setVisible(true);
|
||||
ui->botLevelSlider->setVisible(true);
|
||||
|
@ -4329,6 +4308,7 @@ void wfmain::receiveRigID(rigCapabilities rigCaps)
|
|||
}
|
||||
haveRigCaps = true;
|
||||
|
||||
|
||||
if (rigCaps.bands.size() > 0) {
|
||||
lastRequestedBand = rigCaps.bands[0].band;
|
||||
}
|
||||
|
@ -4512,6 +4492,8 @@ void wfmain::initPeriodicCommands()
|
|||
// This function places periodic polling commands into the queue.
|
||||
// Can be run multiple times as it will remove all existing entries.
|
||||
|
||||
qInfo(logSystem()) << "Start periodic commands (and delete unsupported)";
|
||||
|
||||
queue->clear();
|
||||
|
||||
queue->add(priorityMedium,funcSelectedFreq,true,false);
|
||||
|
@ -4524,11 +4506,15 @@ void wfmain::initPeriodicCommands()
|
|||
{
|
||||
queue->add(priorityHigh,funcOverflowStatus,true,false);
|
||||
queue->add(priorityMediumHigh,funcScopeMainMode,true,false);
|
||||
queue->add(priorityMediumHigh,funcScopeSubMode,true,false);
|
||||
queue->add(priorityMediumHigh,funcScopeSubMode,true,true);
|
||||
queue->add(priorityMediumHigh,funcScopeMainSpan,true,false);
|
||||
queue->add(priorityMediumHigh,funcScopeSubSpan,true,false);
|
||||
queue->add(priorityMediumHigh,queueItem(funcScopeSingleDual,true,false));
|
||||
queue->add(priorityMediumHigh,queueItem(funcScopeMainSub,true,false));
|
||||
queue->add(priorityMediumHigh,funcScopeSubSpan,true,true);
|
||||
queue->add(priorityMediumHigh,funcScopeSingleDual,true,false);
|
||||
queue->add(priorityMediumHigh,funcScopeMainSub,true,false);
|
||||
queue->add(priorityMedium,funcScopeMainSpeed,true,false);
|
||||
queue->add(priorityMedium,funcScopeSubSpeed,true,true);
|
||||
queue->add(priorityMedium,funcScopeMainHold,true,false);
|
||||
queue->add(priorityMedium,funcScopeSubHold,true,true);
|
||||
}
|
||||
|
||||
if(rigCaps.hasTransmit) {
|
||||
|
@ -6484,327 +6470,10 @@ void wfmain::messageHandler(QtMsgType type, const QMessageLogContext& context, c
|
|||
}
|
||||
|
||||
void wfmain::receiveClusterOutput(QString text) {
|
||||
ui->clusterOutputTextEdit->moveCursor(QTextCursor::End);
|
||||
ui->clusterOutputTextEdit->insertPlainText(text);
|
||||
ui->clusterOutputTextEdit->moveCursor(QTextCursor::End);
|
||||
setupui->insertClusterOutputText(text);
|
||||
}
|
||||
|
||||
void wfmain::on_clusterUdpEnable_clicked(bool enable)
|
||||
{
|
||||
prefs.clusterUdpEnable = enable;
|
||||
emit setClusterEnableUdp(enable);
|
||||
}
|
||||
|
||||
void wfmain::on_clusterTcpEnable_clicked(bool enable)
|
||||
{
|
||||
prefs.clusterTcpEnable = enable;
|
||||
emit setClusterEnableTcp(enable);
|
||||
}
|
||||
|
||||
void wfmain::on_clusterUdpPortLineEdit_editingFinished()
|
||||
{
|
||||
prefs.clusterUdpPort = ui->clusterUdpPortLineEdit->text().toInt();
|
||||
emit setClusterUdpPort(prefs.clusterUdpPort);
|
||||
}
|
||||
|
||||
void wfmain::on_clusterServerNameCombo_currentIndexChanged(int index)
|
||||
{
|
||||
if (index < 0)
|
||||
return;
|
||||
|
||||
QString text = ui->clusterServerNameCombo->currentText();
|
||||
|
||||
if (clusters.size() <= index)
|
||||
{
|
||||
qInfo(logGui) << "Adding Cluster server" << text;
|
||||
clusterSettings c;
|
||||
c.server = text;
|
||||
clusters.append(c);
|
||||
ui->clusterTcpPortLineEdit->setEnabled(true);
|
||||
ui->clusterUsernameLineEdit->setEnabled(true);
|
||||
ui->clusterPasswordLineEdit->setEnabled(true);
|
||||
ui->clusterTimeoutLineEdit->setEnabled(true);
|
||||
|
||||
}
|
||||
else {
|
||||
qInfo(logGui) << "Editing Cluster server" << text;
|
||||
clusters[index].server = text;
|
||||
}
|
||||
ui->clusterUsernameLineEdit->blockSignals(true);
|
||||
ui->clusterPasswordLineEdit->blockSignals(true);
|
||||
ui->clusterTimeoutLineEdit->blockSignals(true);
|
||||
ui->clusterTcpPortLineEdit->setText(QString::number(clusters[index].port));
|
||||
ui->clusterUsernameLineEdit->setText(clusters[index].userName);
|
||||
ui->clusterPasswordLineEdit->setText(clusters[index].password);
|
||||
ui->clusterTimeoutLineEdit->setText(QString::number(clusters[index].timeout));
|
||||
ui->clusterUsernameLineEdit->blockSignals(false);
|
||||
ui->clusterPasswordLineEdit->blockSignals(false);
|
||||
ui->clusterTimeoutLineEdit->blockSignals(false);
|
||||
|
||||
|
||||
for (int i = 0; i < clusters.size(); i++) {
|
||||
if (i == index)
|
||||
clusters[i].isdefault = true;
|
||||
else
|
||||
clusters[i].isdefault = false;
|
||||
}
|
||||
|
||||
emit setClusterServerName(clusters[index].server);
|
||||
emit setClusterTcpPort(clusters[index].port);
|
||||
emit setClusterUserName(clusters[index].userName);
|
||||
emit setClusterPassword(clusters[index].password);
|
||||
emit setClusterTimeout(clusters[index].timeout);
|
||||
|
||||
}
|
||||
|
||||
void wfmain::on_clusterServerNameCombo_currentTextChanged(QString text)
|
||||
{
|
||||
if (text.isEmpty()) {
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
ui->clusterServerNameCombo->removeItem(index);
|
||||
clusters.removeAt(index);
|
||||
if (clusters.size() == 0)
|
||||
{
|
||||
ui->clusterTcpPortLineEdit->setEnabled(false);
|
||||
ui->clusterUsernameLineEdit->setEnabled(false);
|
||||
ui->clusterPasswordLineEdit->setEnabled(false);
|
||||
ui->clusterTimeoutLineEdit->setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::on_clusterTcpPortLineEdit_editingFinished()
|
||||
{
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
if (index < clusters.size())
|
||||
{
|
||||
clusters[index].port = ui->clusterTcpPortLineEdit->displayText().toInt();
|
||||
emit setClusterTcpPort(clusters[index].port);
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::on_clusterUsernameLineEdit_editingFinished()
|
||||
{
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
if (index < clusters.size())
|
||||
{
|
||||
clusters[index].userName = ui->clusterUsernameLineEdit->text();
|
||||
emit setClusterUserName(clusters[index].userName);
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::on_clusterPasswordLineEdit_editingFinished()
|
||||
{
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
if (index < clusters.size())
|
||||
{
|
||||
clusters[index].password = ui->clusterPasswordLineEdit->text();
|
||||
emit setClusterPassword(clusters[index].password);
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::on_clusterTimeoutLineEdit_editingFinished()
|
||||
{
|
||||
int index = ui->clusterServerNameCombo->currentIndex();
|
||||
if (index < clusters.size())
|
||||
{
|
||||
clusters[index].timeout = ui->clusterTimeoutLineEdit->displayText().toInt();
|
||||
emit setClusterTimeout(clusters[index].timeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wfmain::receiveSpots(QList<spotData> spots)
|
||||
{
|
||||
//QElapsedTimer timer;
|
||||
//timer.start();
|
||||
/*
|
||||
bool current = false;
|
||||
|
||||
if (clusterSpots.size() > 0) {
|
||||
current=clusterSpots.begin().value()->current;
|
||||
}
|
||||
|
||||
foreach(spotData s, spots)
|
||||
{
|
||||
bool found = false;
|
||||
QMap<QString, spotData*>::iterator spot = clusterSpots.find(s.dxcall);
|
||||
|
||||
while (spot != clusterSpots.end() && spot.key() == s.dxcall && spot.value()->frequency == s.frequency) {
|
||||
spot.value()->current = !current;
|
||||
found = true;
|
||||
++spot;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
|
||||
spotData* sp = new spotData(s);
|
||||
|
||||
//qDebug(logCluster()) << "ADD:" << sp->dxcall;
|
||||
sp->current = !current;
|
||||
bool conflict = true;
|
||||
double left = sp->frequency;
|
||||
QCPRange range=plot->yAxis->range();
|
||||
double top = range.upper-15.0;
|
||||
sp->text = new QCPItemText(plot);
|
||||
sp->text->setAntialiased(true);
|
||||
sp->text->setColor(clusterColor);
|
||||
sp->text->setText(sp->dxcall);
|
||||
sp->text->setFont(QFont(font().family(), 10));
|
||||
sp->text->setPositionAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
|
||||
sp->text->position->setType(QCPItemPosition::ptPlotCoords);
|
||||
sp->text->setSelectable(true);
|
||||
QMargins margin;
|
||||
int width = (sp->text->right - sp->text->left) / 2;
|
||||
margin.setLeft(width);
|
||||
margin.setRight(width);
|
||||
sp->text->setPadding(margin);
|
||||
sp->text->position->setCoords(left, top);
|
||||
sp->text->setVisible(false);
|
||||
while (conflict) {
|
||||
#if QCUSTOMPLOT_VERSION < 0x020000
|
||||
QCPAbstractItem* item = plot->itemAt(sp->text->position->pixelPoint(), true);
|
||||
#else
|
||||
QCPAbstractItem* item = plot->itemAt(sp->text->position->pixelPosition(), true);
|
||||
#endif
|
||||
|
||||
QCPItemText* textItem = dynamic_cast<QCPItemText*> (item);
|
||||
if (textItem != nullptr && sp->text != textItem) {
|
||||
top = top - 5.0;
|
||||
}
|
||||
else {
|
||||
conflict = false;
|
||||
}
|
||||
sp->text->position->setCoords(left, top);
|
||||
}
|
||||
|
||||
sp->text->setVisible(true);
|
||||
clusterSpots.insert(sp->dxcall, sp);
|
||||
}
|
||||
}
|
||||
|
||||
QMap<QString, spotData*>::iterator spot2 = clusterSpots.begin();
|
||||
while (spot2 != clusterSpots.end()) {
|
||||
if (spot2.value()->current == current) {
|
||||
plot->removeItem(spot2.value()->text);
|
||||
//qDebug(logCluster()) << "REMOVE:" << spot2.value()->dxcall;
|
||||
delete spot2.value(); // Stop memory leak?
|
||||
spot2 = clusterSpots.erase(spot2);
|
||||
}
|
||||
else {
|
||||
++spot2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//qDebug(logCluster()) << "Processing took" << timer.nsecsElapsed() / 1000 << "us";
|
||||
*/
|
||||
}
|
||||
|
||||
void wfmain::on_clusterPopOutBtn_clicked()
|
||||
{
|
||||
// can be removed now
|
||||
if (settingsTabisAttached)
|
||||
{
|
||||
settingsTab = ui->tabWidget->currentWidget();
|
||||
ui->tabWidget->removeTab(ui->tabWidget->indexOf(settingsTab));
|
||||
settingsWidgetTab->addTab(settingsTab, "Settings");
|
||||
settingsWidgetWindow->show();
|
||||
|
||||
ui->tabWidget->setCurrentIndex(0);
|
||||
settingsTabisAttached = false;
|
||||
}
|
||||
else {
|
||||
settingsTab = settingsWidgetTab->currentWidget();
|
||||
|
||||
settingsWidgetTab->removeTab(settingsWidgetTab->indexOf(settingsTab));
|
||||
ui->tabWidget->addTab(settingsTab, "Settings");
|
||||
settingsWidgetWindow->close();
|
||||
|
||||
ui->tabWidget->setCurrentIndex(3);
|
||||
settingsTabisAttached = true;
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::on_clusterSkimmerSpotsEnable_clicked(bool enable)
|
||||
{
|
||||
// migrated
|
||||
prefs.clusterSkimmerSpotsEnable = enable;
|
||||
emit setClusterSkimmerSpots(enable);
|
||||
}
|
||||
|
||||
void wfmain::enableUsbControllers(bool checked)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void wfmain::on_usbControllerBtn_clicked()
|
||||
{
|
||||
if (usbWindow != Q_NULLPTR) {
|
||||
if (usbWindow->isVisible()) {
|
||||
usbWindow->hide();
|
||||
}
|
||||
else {
|
||||
qInfo(logUsbControl()) << "Showing USB Controller window";
|
||||
usbWindow->show();
|
||||
usbWindow->raise();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wfmain::on_usbControllersResetBtn_clicked()
|
||||
{
|
||||
// TODO
|
||||
int ret = QMessageBox::warning(this, tr("wfview"),
|
||||
tr("Are you sure you wish to reset the USB controllers?"),
|
||||
QMessageBox::Ok | QMessageBox::Cancel,
|
||||
QMessageBox::Cancel);
|
||||
if (ret == QMessageBox::Ok) {
|
||||
qInfo(logUsbControl()) << "Resetting USB controllers to default values";
|
||||
//bool enabled = ui->enableUsbChk->isChecked();
|
||||
//if (enabled) on_enableUsbChk_clicked(false); // Force disconnect of USB controllers
|
||||
|
||||
usbButtons.clear();
|
||||
usbKnobs.clear();
|
||||
usbDevices.clear();
|
||||
|
||||
//if (enabled) on_enableUsbChk_clicked(true); // Force connect of USB controllers
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void wfmain::on_autoPollBtn_clicked(bool checked)
|
||||
{
|
||||
ui->pollTimeMsSpin->setEnabled(!checked);
|
||||
if(checked)
|
||||
{
|
||||
prefs.polling_ms = 0;
|
||||
qInfo(logSystem()) << "User set radio polling interval to automatic.";
|
||||
calculateTimingParameters();
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::on_manualPollBtn_clicked(bool checked)
|
||||
{
|
||||
ui->pollTimeMsSpin->setEnabled(checked);
|
||||
if(checked)
|
||||
{
|
||||
prefs.polling_ms = ui->pollTimeMsSpin->value();
|
||||
changePollTiming(prefs.polling_ms);
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::on_pollTimeMsSpin_valueChanged(int timing_ms)
|
||||
{
|
||||
if(ui->manualPollBtn->isChecked())
|
||||
{
|
||||
changePollTiming(timing_ms);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void wfmain::changePollTiming(int timing_ms, bool setUI)
|
||||
{
|
||||
|
@ -6888,31 +6557,31 @@ void wfmain::on_memoriesBtn_clicked()
|
|||
|
||||
this->memWindow->connect(this->memWindow, &memories::memoryMode, rig, [=]() {
|
||||
queue->add(priorityImmediate,funcMemoryMode);
|
||||
queue->del((rigCaps.commands.contains(funcSelectedFreq)?funcSelectedFreq:funcFreqGet),false);
|
||||
queue->del((rigCaps.commands.contains(funcSelectedMode)?funcSelectedMode:funcModeGet),false);
|
||||
queue->del((rigCaps.commands.contains(funcUnselectedFreq)?funcUnselectedFreq:funcNone),true);
|
||||
queue->del((rigCaps.commands.contains(funcUnselectedMode)?funcUnselectedMode:funcNone),true);
|
||||
queue->del(funcSelectedFreq,false);
|
||||
queue->del(funcSelectedMode,false);
|
||||
queue->del(funcUnselectedFreq,true);
|
||||
queue->del(funcUnselectedMode,true);
|
||||
});
|
||||
|
||||
this->memWindow->connect(this->memWindow, &memories::vfoMode, rig, [this]() {
|
||||
queue->addUnique(priorityMedium,(rigCaps.commands.contains(funcSelectedFreq)?funcSelectedFreq:funcFreqGet),true,false);
|
||||
queue->addUnique(priorityMedium,(rigCaps.commands.contains(funcSelectedMode)?funcSelectedMode:funcModeGet),true,false);
|
||||
queue->addUnique(priorityMedium,(rigCaps.commands.contains(funcUnselectedFreq)?funcUnselectedFreq:funcNone),true,true);
|
||||
queue->addUnique(priorityMedium,(rigCaps.commands.contains(funcUnselectedMode)?funcUnselectedMode:funcNone),true,true);
|
||||
queue->addUnique(priorityMedium,funcSelectedFreq,true,false);
|
||||
queue->addUnique(priorityMedium,funcSelectedMode,true,false);
|
||||
queue->addUnique(priorityMedium,funcUnselectedFreq,true,true);
|
||||
queue->addUnique(priorityMedium,funcUnselectedMode,true,true);
|
||||
});
|
||||
|
||||
this->memWindow->connect(this->memWindow, &memories::setSatelliteMode, rig, [this](const bool &en) {
|
||||
queue->add(priorityImmediate,queueItem(funcSatelliteMode,QVariant::fromValue<bool>(en)));
|
||||
if (en) {
|
||||
queue->del((rigCaps.commands.contains(funcSelectedFreq)?funcSelectedFreq:funcFreqGet),false);
|
||||
queue->del((rigCaps.commands.contains(funcSelectedMode)?funcSelectedMode:funcModeGet),false);
|
||||
queue->del((rigCaps.commands.contains(funcUnselectedFreq)?funcUnselectedFreq:funcNone),true);
|
||||
queue->del((rigCaps.commands.contains(funcUnselectedMode)?funcUnselectedMode:funcNone),true);
|
||||
queue->del(funcSelectedFreq,false);
|
||||
queue->del(funcSelectedMode,false);
|
||||
queue->del(funcUnselectedFreq,true);
|
||||
queue->del(funcUnselectedMode,true);
|
||||
} else {
|
||||
queue->addUnique(priorityMedium,(rigCaps.commands.contains(funcSelectedFreq)?funcSelectedFreq:funcFreqGet),true,false);
|
||||
queue->addUnique(priorityMedium,(rigCaps.commands.contains(funcSelectedMode)?funcSelectedMode:funcModeGet),true,false);
|
||||
queue->addUnique(priorityMedium,(rigCaps.commands.contains(funcUnselectedFreq)?funcUnselectedFreq:funcNone),true,true);
|
||||
queue->addUnique(priorityMedium,(rigCaps.commands.contains(funcUnselectedMode)?funcUnselectedMode:funcNone),true,true);
|
||||
queue->addUnique(priorityMedium,funcSelectedFreq,true,false);
|
||||
queue->addUnique(priorityMedium,funcSelectedMode,true,false);
|
||||
queue->addUnique(priorityMedium,funcUnselectedFreq,true,true);
|
||||
queue->addUnique(priorityMedium,funcUnselectedMode,true,true);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -6941,10 +6610,11 @@ void wfmain::receiveValue(cacheItem val){
|
|||
|
||||
switch (val.command)
|
||||
{
|
||||
case funcUnselectedFreq:
|
||||
val.sub=true;
|
||||
case funcFreqGet:
|
||||
case funcFreqTR:
|
||||
case funcSelectedFreq:
|
||||
case funcUnselectedFreq:
|
||||
{
|
||||
freqt f = val.value.value<freqt>();
|
||||
|
||||
|
@ -6960,7 +6630,7 @@ void wfmain::receiveValue(cacheItem val){
|
|||
case funcReadTXFreq:
|
||||
break;
|
||||
case funcVFODualWatch:
|
||||
// Not currently used, but will report the current dual-watch status
|
||||
ui->dualWatchBtn->setChecked(val.value.value<bool>());
|
||||
break;
|
||||
case funcModeGet:
|
||||
case funcModeTR:
|
||||
|
@ -6968,6 +6638,7 @@ void wfmain::receiveValue(cacheItem val){
|
|||
ui->mainScope->receiveMode(val.value.value<modeInfo>());
|
||||
break;
|
||||
case funcUnselectedMode:
|
||||
val.sub=true;
|
||||
ui->subScope->receiveMode(val.value.value<modeInfo>());
|
||||
break;
|
||||
case funcSatelliteMemory:
|
||||
|
@ -7308,7 +6979,7 @@ void wfmain::receiveValue(cacheItem val){
|
|||
ui->subScope->setVisible(true);
|
||||
}
|
||||
|
||||
if (dualScope) {
|
||||
if (ui->scopeDualBtn->isChecked()) {
|
||||
ui->mainScope->selected(!subScope);
|
||||
ui->subScope->selected(subScope);
|
||||
} else {
|
||||
|
@ -7321,8 +6992,8 @@ void wfmain::receiveValue(cacheItem val){
|
|||
case funcScopeSingleDual:
|
||||
{
|
||||
// This tells us whether we are receiving single or dual scopes
|
||||
dualScope = val.value.value<bool>();
|
||||
if (dualScope) {
|
||||
ui->scopeDualBtn->setChecked(val.value.value<bool>());
|
||||
if (val.value.value<bool>()) {
|
||||
if (!ui->subScope->isVisible())
|
||||
{
|
||||
ui->subScope->setVisible(true);
|
||||
|
@ -7361,7 +7032,10 @@ void wfmain::receiveValue(cacheItem val){
|
|||
// [2] 0x01, 0x02, 0x03: Edge 1,2,3
|
||||
break;
|
||||
case funcScopeMainHold:
|
||||
// Hold status (only 9700?)
|
||||
ui->mainScope->setHold(val.value.value<bool>());
|
||||
break;
|
||||
case funcScopeSubHold:
|
||||
ui->subScope->setHold(val.value.value<bool>());
|
||||
break;
|
||||
case funcScopeMainRef:
|
||||
{
|
||||
|
@ -7374,6 +7048,11 @@ void wfmain::receiveValue(cacheItem val){
|
|||
break;
|
||||
}
|
||||
case funcScopeMainSpeed:
|
||||
ui->mainScope->setSpeed(val.value.value<uchar>());
|
||||
break;
|
||||
case funcScopeSubSpeed:
|
||||
ui->subScope->setSpeed(val.value.value<uchar>());
|
||||
break;
|
||||
case funcScopeDuringTX:
|
||||
case funcScopeCenterType:
|
||||
case funcScopeMainVBW:
|
||||
|
@ -7415,11 +7094,16 @@ void wfmain::on_scopeMainSubBtn_clicked()
|
|||
queue->add(priorityImmediate,queueItem(funcScopeMainSub,QVariant::fromValue(subScope),false,false));
|
||||
}
|
||||
|
||||
void wfmain::on_scopeDualBtn_clicked()
|
||||
void wfmain::on_scopeDualBtn_toggled(bool en)
|
||||
{
|
||||
dualScope = !dualScope;
|
||||
queue->add(priorityImmediate,queueItem(funcScopeSingleDual,QVariant::fromValue(dualScope),false,false));
|
||||
queue->add(priorityImmediate,funcScopeMainSub,false,false);
|
||||
queue->add(priorityImmediate,queueItem(funcScopeSingleDual,QVariant::fromValue(en),false,false));
|
||||
if (en)
|
||||
queue->add(priorityImmediate,queueItem(funcScopeMainSub,QVariant::fromValue(false),false,false)); // Set main scope
|
||||
}
|
||||
|
||||
void wfmain::on_dualWatchBtn_toggled(bool en)
|
||||
{
|
||||
queue->add(priorityImmediate,queueItem(funcVFODualWatch,QVariant::fromValue(en),false,false));
|
||||
}
|
||||
|
||||
|
||||
|
|
28
wfmain.h
28
wfmain.h
|
@ -325,8 +325,6 @@ private slots:
|
|||
void extChangedUdpPref(prefUDPItem i);
|
||||
void extChangedServerPref(prefServerItem i);
|
||||
|
||||
void enableUsbControllers(bool enabled);
|
||||
|
||||
void receiveValue(cacheItem val);
|
||||
void setAudioDevicesUI();
|
||||
void updateSizes(int tabIndex);
|
||||
|
@ -456,10 +454,6 @@ private slots:
|
|||
|
||||
void changeFullScreenMode(bool checked);
|
||||
|
||||
void on_usbControllerBtn_clicked();
|
||||
|
||||
void on_usbControllersResetBtn_clicked();
|
||||
|
||||
void on_modeSelectCombo_activated(int index);
|
||||
void on_freqDial_valueChanged(int value);
|
||||
void on_aboutBtn_clicked();
|
||||
|
@ -526,20 +520,7 @@ private slots:
|
|||
|
||||
void on_showLogBtn_clicked();
|
||||
|
||||
void on_clusterUdpEnable_clicked(bool enable);
|
||||
void on_clusterTcpEnable_clicked(bool enable);
|
||||
void on_clusterUdpPortLineEdit_editingFinished();
|
||||
void on_clusterServerNameCombo_currentTextChanged(QString text);
|
||||
void on_clusterServerNameCombo_currentIndexChanged(int index);
|
||||
void on_clusterTcpPortLineEdit_editingFinished();
|
||||
void on_clusterUsernameLineEdit_editingFinished();
|
||||
void on_clusterPasswordLineEdit_editingFinished();
|
||||
void on_clusterTimeoutLineEdit_editingFinished();
|
||||
void on_clusterPopOutBtn_clicked();
|
||||
void on_clusterSkimmerSpotsEnable_clicked(bool enable);
|
||||
|
||||
void receiveClusterOutput(QString text);
|
||||
void receiveSpots(QList<spotData> spots);
|
||||
|
||||
void on_cwButton_clicked();
|
||||
|
||||
|
@ -552,7 +533,8 @@ private slots:
|
|||
void on_rigCreatorBtn_clicked();
|
||||
|
||||
void on_scopeMainSubBtn_clicked();
|
||||
void on_scopeDualBtn_clicked();
|
||||
void on_scopeDualBtn_toggled(bool en);
|
||||
void on_dualWatchBtn_toggled(bool en);
|
||||
|
||||
private:
|
||||
Ui::wfmain *ui;
|
||||
|
@ -677,10 +659,6 @@ private:
|
|||
QLedLabel* pttLed;
|
||||
QLedLabel* connectedLed;
|
||||
|
||||
quint16 spectWidth;
|
||||
quint16 wfLength;
|
||||
bool spectrumDrawLock;
|
||||
|
||||
double plotFloor = 0;
|
||||
double plotCeiling = 160;
|
||||
double wfFloor = 0;
|
||||
|
@ -856,7 +834,6 @@ private:
|
|||
quint16 cwPitch = 600;
|
||||
|
||||
bool subScope = false;
|
||||
bool dualScope = false;
|
||||
|
||||
availableBands lastRequestedBand=bandGen;
|
||||
|
||||
|
@ -887,7 +864,6 @@ private:
|
|||
QMap<QString, spotData*> clusterSpots;
|
||||
QTimer clusterTimer;
|
||||
QCPItemText* text=Q_NULLPTR;
|
||||
QList<clusterSettings> clusters;
|
||||
QMutex clusterMutex;
|
||||
QColor clusterColor;
|
||||
audioDevices* audioDev = Q_NULLPTR;
|
||||
|
|
465
wfmain.ui
465
wfmain.ui
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1063</width>
|
||||
<width>1086</width>
|
||||
<height>569</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="mainTab">
|
||||
<attribute name="title">
|
||||
|
@ -1402,23 +1402,29 @@
|
|||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Main/Sub</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<widget class="QPushButton" name="dualWatchBtn">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
<property name="text">
|
||||
<string>Dual Watch</string>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="scopeDualBtn">
|
||||
|
@ -1434,8 +1440,14 @@
|
|||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dual</string>
|
||||
<string>Dual Scope</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1620,7 +1632,7 @@
|
|||
<item>
|
||||
<widget class="QStackedWidget" name="settingsStack">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="radioAccess">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_21">
|
||||
|
@ -2075,224 +2087,6 @@
|
|||
</widget>
|
||||
<widget class="QWidget" name="externalControl">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_26">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_34">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_18">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_28">
|
||||
<property name="text">
|
||||
<string>Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_20">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>422</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_36">
|
||||
<item>
|
||||
<widget class="QLabel" name="vspLabel">
|
||||
<property name="text">
|
||||
<string>Virtual Serial Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_19">
|
||||
<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>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_42">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>TCP Server Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="tcpServerPortTxt">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_39">
|
||||
<property name="text">
|
||||
<string>Enter port for TCP server, 0 = disabled (restart required if changed)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_26">
|
||||
<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>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_44">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_41">
|
||||
<property name="text">
|
||||
<string>Waterfall Format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="waterfallFormatCombo">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Default</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Single (network)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Multi (serial)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_52">
|
||||
<property name="text">
|
||||
<string>Only change this if you are absolutely sure you need it (connecting to N1MM+ or similar)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_28">
|
||||
<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>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_46">
|
||||
<item>
|
||||
<widget class="QPushButton" name="usbControllerBtn">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Setup USB Controllers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="usbControllersResetBtn">
|
||||
<property name="text">
|
||||
<string>Reset Controllers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="usbResetLbl">
|
||||
<property name="text">
|
||||
<string>Reset all USB controllers to defaults (delete all knobs/buttons)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_38">
|
||||
<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>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
|
@ -2312,207 +2106,6 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>10</y>
|
||||
<width>831</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_33">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>This page contains configuration for DX Cluster, either UDP style broadcast (from N1MM+/DXlog) or TCP connection to your favourite cluster</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<width>201</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>UDP Broadcast Connection</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>40</y>
|
||||
<width>161</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_35">
|
||||
<property name="text">
|
||||
<string>UDP Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="clusterUdpPortLineEdit">
|
||||
<property name="inputMask">
|
||||
<string>00000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="clusterUdpEnable">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>330</x>
|
||||
<y>50</y>
|
||||
<width>311</width>
|
||||
<height>241</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>TCP Cluster Connection</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>40</y>
|
||||
<width>271</width>
|
||||
<height>186</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_45">
|
||||
<property name="text">
|
||||
<string>Server Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_46">
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="clusterUsernameLineEdit"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_47">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="clusterPasswordLineEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::PasswordEchoOnEdit</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="clusterTcpEnable">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="clusterServerNameCombo">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_48">
|
||||
<property name="text">
|
||||
<string>Spot Timeout (minutes)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="clusterTimeoutLineEdit">
|
||||
<property name="inputMask">
|
||||
<string>0000</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_49">
|
||||
<property name="text">
|
||||
<string>Server Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="clusterTcpPortLineEdit">
|
||||
<property name="inputMask">
|
||||
<string>00000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPlainTextEdit" name="clusterOutputTextEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>320</y>
|
||||
<width>811</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="clusterPopOutBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>280</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Pop out (or pop back in) the entire Settings tab. </p><p>NOTE: Press this button again to re-insert the tab when finished. </p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pop-Out</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
@ -2545,12 +2138,6 @@
|
|||
</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">
|
||||
|
@ -2762,7 +2349,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1063</width>
|
||||
<width>1086</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
Ładowanie…
Reference in New Issue