Add optional antenna description for PSK Reporter. (Presently implemented

only for Windows.)


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3344 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-06-06 17:40:09 +00:00
parent 39854e0b36
commit 0fe2869799
5 changed files with 79 additions and 51 deletions

View File

@ -127,6 +127,7 @@ void DevSetup::initDlg()
ui.myGridEntry->setPalette(pal);
ui.myCallEntry->setText(m_myCall);
ui.myGridEntry->setText(m_myGrid);
ui.pskReporterAntenna->setText(m_pskAntenna);
ui.idIntSpinBox->setValue(m_idInt);
ui.pttMethodComboBox->setCurrentIndex(m_pttMethodIndex);
@ -237,6 +238,7 @@ void DevSetup::accept()
m_myCall=ui.myCallEntry->text();
m_myGrid=ui.myGridEntry->text();
m_pskAntenna=ui.pskReporterAntenna->text();
m_idInt=ui.idIntSpinBox->value();
m_pttMethodIndex=ui.pttMethodComboBox->currentIndex();
m_pttPort=ui.pttComboBox->currentIndex();
@ -342,6 +344,8 @@ void DevSetup::on_myGridEntry_editingFinished()
void DevSetup::on_cbPSKReporter_clicked(bool b)
{
m_pskReporter=b;
ui.label_8->setEnabled(m_pskReporter);
ui.pskReporterAntenna->setEnabled(m_pskReporter);
}
void DevSetup::on_pttMethodComboBox_activated(int index)
@ -509,6 +513,9 @@ void DevSetup::on_pttMethodComboBox_currentIndexChanged(int index)
void DevSetup::enableWidgets()
{
ui.label_8->setEnabled(m_pskReporter);
ui.pskReporterAntenna->setEnabled(m_pskReporter);
ui.cbEnableCAT->setChecked(m_catEnabled);
ui.cbDTRoff->setChecked(m_bDTRoff);
ui.rigComboBox->setEnabled(m_catEnabled);

View File

@ -57,6 +57,7 @@ public:
QString m_azelDir;
QString m_catPort;
QString m_handshake;
QString m_pskAntenna;
QStringList m_macro;
QStringList m_dFreq;

View File

@ -7,13 +7,13 @@
<x>0</x>
<y>0</y>
<width>548</width>
<height>521</height>
<height>493</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>548</width>
<height>521</height>
<width>569</width>
<height>493</height>
</size>
</property>
<property name="windowTitle">
@ -316,37 +316,30 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_3">
<widget class="QCheckBox" name="cbPSKReporter">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
<width>146</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>ID Interval (min):</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="idIntSpinBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<width>146</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Select CW ID interval (0 for none)</string>
<string>Send spots to PSK Reporter web site</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>10</number>
<property name="text">
<string>Enable PSK Reporter</string>
</property>
</widget>
</item>
@ -387,35 +380,56 @@
</spacer>
</item>
<item>
<widget class="QCheckBox" name="cbPSKReporter">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>146</width>
<height>0</height>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>ID Interval (min):</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="idIntSpinBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximumSize">
<size>
<width>146</width>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Send spots to PSK Reporter web site</string>
<string>Select CW ID interval (0 for none)</string>
</property>
<property name="text">
<string>Enable PSK Reporter</string>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>10</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>Antenna for PSK Reporter:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="pskReporterAntenna"/>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
@ -2435,8 +2449,6 @@
<tabstop>pttMethodComboBox</tabstop>
<tabstop>pttComboBox</tabstop>
<tabstop>idIntSpinBox</tabstop>
<tabstop>cbID73</tabstop>
<tabstop>cbPSKReporter</tabstop>
<tabstop>cbEnableCAT</tabstop>
<tabstop>rigComboBox</tabstop>
<tabstop>catPortComboBox</tabstop>

View File

@ -421,7 +421,8 @@ void MainWindow::writeSettings()
settings.setValue("SaveTxPower",m_saveTxPower);
settings.setValue("SaveComments",m_saveComments);
settings.setValue("TxPower",m_txPower);
settings.value("LogComments",m_logComments);
settings.setValue("LogComments",m_logComments);
settings.setValue("PSKantenna",m_pskAntenna);
settings.endGroup();
}
@ -551,6 +552,7 @@ void MainWindow::readSettings()
m_saveComments=settings.value("SaveComments",false).toBool();
m_txPower=settings.value("TxPower","").toString();
m_logComments=settings.value("LogComments","").toString();
m_pskAntenna=settings.value("PSKantenna","").toString();
settings.endGroup();
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
@ -630,6 +632,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
DevSetup dlg(this);
dlg.m_myCall=m_myCall;
dlg.m_myGrid=m_myGrid;
dlg.m_pskAntenna=m_pskAntenna;
dlg.m_idInt=m_idInt;
dlg.m_pttMethodIndex=m_pttMethodIndex;
dlg.m_pttPort=m_pttPort;
@ -670,6 +673,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
if(dlg.exec() == QDialog::Accepted) {
m_myCall=dlg.m_myCall;
m_myGrid=dlg.m_myGrid;
m_pskAntenna=dlg.m_pskAntenna;
m_idInt=dlg.m_idInt;
m_pttMethodIndex=dlg.m_pttMethodIndex;
m_pttPort=dlg.m_pttPort;
@ -1441,8 +1445,9 @@ void MainWindow::readFromStdout() //readFromStdout
remote.toWCharArray(tremote);
QString local="station_callsign," + m_myCall + "," +
"my_gridsquare," + m_myGrid + "," +
"programid,WSJT-X,programversion," + rev.mid(6,4) + ",,";
"my_gridsquare," + m_myGrid + ",";
if(m_pskAntenna!="") local += "my_antenna," + m_pskAntenna + ",";
local += "programid,WSJT-X,programversion," + rev.mid(6,4) + ",,";
wchar_t tlocal[256];
local.toWCharArray(tlocal);
@ -1461,16 +1466,18 @@ void MainWindow::readFromStdout() //readFromStdout
}
#else
if(b and !m_diskData and okToPost) {
int i1=msg.indexOf(" ");
QString c2=msg.mid(i1+1);
int i2=c2.indexOf(" ");
QString g2=c2.mid(i2+1,4);
c2=c2.mid(0,i2);
int nHz=t.mid(22,4).toInt();
QString freq = QString::number((int)(1000000.0*m_dialFreq + nHz + 0.5));
QString snr= QString::number(t.mid(10,3).toInt());
if(gridOK(g2))
psk_Reporter->addRemoteStation(c2,g2,freq,"JT9",snr,QString::number(QDateTime::currentDateTime().toTime_t()));
int i1=msg.indexOf(" ");
QString c2=msg.mid(i1+1);
int i2=c2.indexOf(" ");
QString g2=c2.mid(i2+1,4);
c2=c2.mid(0,i2);
int nHz=t.mid(22,4).toInt();
QString freq = QString::number((int)(1000000.0*m_dialFreq +
nHz + 0.5));
QString snr= QString::number(t.mid(10,3).toInt());
if(gridOK(g2))
psk_Reporter->addRemoteStation(c2,g2,freq,"JT9",snr,
QString::number(QDateTime::currentDateTime().toTime_t()));
}
#endif
}

View File

@ -322,6 +322,7 @@ private:
QString m_QSOmsg;
QString m_txPower;
QString m_logComments;
QString m_pskAntenna;
QStringList m_macro;
QStringList m_dFreq;