mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-03 02:26:45 -04:00
1. Added Tx Power to ADIF log information, with option to retain between QSOs.
2. Added option to retain between QSOs the Comments field for ADIF and wsjtx logs. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3343 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
593e05337d
commit
4fe7578f89
24
logqso.cpp
24
logqso.cpp
@ -23,6 +23,10 @@ void LogQSO::initLogQSO(QString hisCall, QString hisGrid, QString mode,
|
|||||||
{
|
{
|
||||||
ui->call->setText(hisCall);
|
ui->call->setText(hisCall);
|
||||||
ui->grid->setText(hisGrid);
|
ui->grid->setText(hisGrid);
|
||||||
|
ui->txPower->setText("");
|
||||||
|
ui->comments->setText("");
|
||||||
|
if(m_saveTxPower) ui->txPower->setText(m_txPower);
|
||||||
|
if(m_saveComments) ui->comments->setText(m_comments);
|
||||||
if(dBtoComments) {
|
if(dBtoComments) {
|
||||||
QString t=mode;
|
QString t=mode;
|
||||||
if(rptSent!="") t+=" Sent: " + rptSent;
|
if(rptSent!="") t+=" Sent: " + rptSent;
|
||||||
@ -70,6 +74,8 @@ void LogQSO::initLogQSO(QString hisCall, QString hisGrid, QString mode,
|
|||||||
if(dialFreq>47000.0 and dialFreq<47200.0) band="6mm";
|
if(dialFreq>47000.0 and dialFreq<47200.0) band="6mm";
|
||||||
if(dialFreq>75500.0 and dialFreq<81000.0) band="4mm";
|
if(dialFreq>75500.0 and dialFreq<81000.0) band="4mm";
|
||||||
ui->band->setText(band);
|
ui->band->setText(band);
|
||||||
|
ui->cbTxPower->setChecked(m_saveTxPower);
|
||||||
|
ui->cbComments->setChecked(m_saveComments);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogQSO::accept()
|
void LogQSO::accept()
|
||||||
@ -87,10 +93,12 @@ void LogQSO::accept()
|
|||||||
time=ui->time->text();
|
time=ui->time->text();
|
||||||
band=ui->band->text();
|
band=ui->band->text();
|
||||||
name=ui->name->text();
|
name=ui->name->text();
|
||||||
|
m_txPower=ui->txPower->text();
|
||||||
comments=ui->comments->text();
|
comments=ui->comments->text();
|
||||||
|
m_comments=comments;
|
||||||
QString strDialFreq(QString::number(m_dialFreq,'f',6));
|
QString strDialFreq(QString::number(m_dialFreq,'f',6));
|
||||||
|
|
||||||
//Log this QSO to file wsjtx_log.adi
|
//Log this QSO to file "wsjtx_log.adi"
|
||||||
QFile f2("wsjtx_log.adi");
|
QFile f2("wsjtx_log.adi");
|
||||||
if(!f2.open(QIODevice::Text | QIODevice::Append)) {
|
if(!f2.open(QIODevice::Text | QIODevice::Append)) {
|
||||||
QMessageBox m;
|
QMessageBox m;
|
||||||
@ -114,6 +122,8 @@ void LogQSO::accept()
|
|||||||
m_myCall;
|
m_myCall;
|
||||||
t+=" <my_gridsquare:" + QString::number(m_myGrid.length()) + ">" +
|
t+=" <my_gridsquare:" + QString::number(m_myGrid.length()) + ">" +
|
||||||
m_myGrid;
|
m_myGrid;
|
||||||
|
if(m_txPower!="") t+= " <tx_pwr:" + QString::number(m_txPower.length()) +
|
||||||
|
">" + m_txPower;
|
||||||
if(comments!="") t+=" <comment:" + QString::number(comments.length()) +
|
if(comments!="") t+=" <comment:" + QString::number(comments.length()) +
|
||||||
">" + comments;
|
">" + comments;
|
||||||
if(name!="") t+=" <name:" + QString::number(name.length()) +
|
if(name!="") t+=" <name:" + QString::number(name.length()) +
|
||||||
@ -123,7 +133,7 @@ void LogQSO::accept()
|
|||||||
f2.close();
|
f2.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Log this QSO to file wsjtx.log
|
//Log this QSO to file "wsjtx.log"
|
||||||
QFile f("wsjtx.log");
|
QFile f("wsjtx.log");
|
||||||
if(!f.open(QIODevice::Text | QIODevice::Append)) {
|
if(!f.open(QIODevice::Text | QIODevice::Append)) {
|
||||||
QMessageBox m;
|
QMessageBox m;
|
||||||
@ -149,3 +159,13 @@ void LogQSO::reject()
|
|||||||
emit(acceptQSO(false));
|
emit(acceptQSO(false));
|
||||||
QDialog::reject();
|
QDialog::reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LogQSO::on_cbTxPower_toggled(bool checked)
|
||||||
|
{
|
||||||
|
m_saveTxPower=checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LogQSO::on_cbComments_toggled(bool checked)
|
||||||
|
{
|
||||||
|
m_saveComments=checked;
|
||||||
|
}
|
||||||
|
9
logqso.h
9
logqso.h
@ -25,8 +25,13 @@ public:
|
|||||||
|
|
||||||
double m_dialFreq;
|
double m_dialFreq;
|
||||||
|
|
||||||
|
bool m_saveTxPower;
|
||||||
|
bool m_saveComments;
|
||||||
|
|
||||||
QString m_myCall;
|
QString m_myCall;
|
||||||
QString m_myGrid;
|
QString m_myGrid;
|
||||||
|
QString m_txPower;
|
||||||
|
QString m_comments;
|
||||||
|
|
||||||
QDateTime m_dateTime;
|
QDateTime m_dateTime;
|
||||||
|
|
||||||
@ -37,6 +42,10 @@ public slots:
|
|||||||
signals:
|
signals:
|
||||||
void acceptQSO(bool accepted);
|
void acceptQSO(bool accepted);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_cbTxPower_toggled(bool checked);
|
||||||
|
void on_cbComments_toggled(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::LogQSO *ui;
|
Ui::LogQSO *ui;
|
||||||
};
|
};
|
||||||
|
126
logqso.ui
126
logqso.ui
@ -6,48 +6,34 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>424</width>
|
<width>372</width>
|
||||||
<height>283</height>
|
<height>305</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Log QSO</string>
|
<string>Log QSO</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<property name="geometry">
|
<item row="0" column="0">
|
||||||
<rect>
|
|
||||||
<x>30</x>
|
|
||||||
<y>240</y>
|
|
||||||
<width>341</width>
|
|
||||||
<height>32</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="layoutWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>401</width>
|
|
||||||
<height>231</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>10</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
@ -69,10 +55,13 @@
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>20</height>
|
<height>10</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
@ -359,10 +348,13 @@
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>20</height>
|
<height>10</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
@ -606,10 +598,56 @@
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>20</height>
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>65</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Tx power</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="txPower"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cbTxPower">
|
||||||
|
<property name="text">
|
||||||
|
<string>Retain</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>10</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
@ -621,6 +659,12 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>65</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>10</pointsize>
|
<pointsize>10</pointsize>
|
||||||
@ -638,11 +682,29 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cbComments">
|
||||||
|
<property name="text">
|
||||||
|
<string>Retain</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//--------------------------------------------------------------- MainWindow
|
//-------------------------------------------------------------- MainWindow
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
#include "devsetup.h"
|
#include "devsetup.h"
|
||||||
@ -418,6 +418,10 @@ void MainWindow::writeSettings()
|
|||||||
settings.setValue("Polling",m_poll);
|
settings.setValue("Polling",m_poll);
|
||||||
settings.setValue("OutBufSize",outBufSize);
|
settings.setValue("OutBufSize",outBufSize);
|
||||||
settings.setValue("LockTxFreq",m_lockTxFreq);
|
settings.setValue("LockTxFreq",m_lockTxFreq);
|
||||||
|
settings.setValue("SaveTxPower",m_saveTxPower);
|
||||||
|
settings.setValue("SaveComments",m_saveComments);
|
||||||
|
settings.setValue("TxPower",m_txPower);
|
||||||
|
settings.value("LogComments",m_logComments);
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,6 +547,10 @@ void MainWindow::readSettings()
|
|||||||
outBufSize=settings.value("OutBufSize",4096).toInt();
|
outBufSize=settings.value("OutBufSize",4096).toInt();
|
||||||
m_lockTxFreq=settings.value("LockTxFreq",false).toBool();
|
m_lockTxFreq=settings.value("LockTxFreq",false).toBool();
|
||||||
ui->actionLockTxFreq->setChecked(m_lockTxFreq);
|
ui->actionLockTxFreq->setChecked(m_lockTxFreq);
|
||||||
|
m_saveTxPower=settings.value("SaveTxPower",false).toBool();
|
||||||
|
m_saveComments=settings.value("SaveComments",false).toBool();
|
||||||
|
m_txPower=settings.value("TxPower","").toString();
|
||||||
|
m_logComments=settings.value("LogComments","").toString();
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
|
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
|
||||||
@ -2342,6 +2350,10 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
|
|||||||
m_dateTimeQSO=QDateTime::currentDateTimeUtc();
|
m_dateTimeQSO=QDateTime::currentDateTimeUtc();
|
||||||
|
|
||||||
logDlg = new LogQSO(0);
|
logDlg = new LogQSO(0);
|
||||||
|
logDlg->m_saveTxPower=m_saveTxPower;
|
||||||
|
logDlg->m_saveComments=m_saveComments;
|
||||||
|
logDlg->m_txPower=m_txPower;
|
||||||
|
logDlg->m_comments=m_logComments;
|
||||||
logDlg->initLogQSO(m_hisCall,m_hisGrid,m_mode,m_rptSent,m_rptRcvd,
|
logDlg->initLogQSO(m_hisCall,m_hisGrid,m_mode,m_rptSent,m_rptRcvd,
|
||||||
m_dateTimeQSO,m_dialFreq,m_myCall,m_myGrid,
|
m_dateTimeQSO,m_dialFreq,m_myCall,m_myGrid,
|
||||||
m_noSuffix,m_toRTTY,m_dBtoComments);
|
m_noSuffix,m_toRTTY,m_dBtoComments);
|
||||||
@ -2354,6 +2366,10 @@ void MainWindow::acceptQSO2(bool accepted)
|
|||||||
{
|
{
|
||||||
if(accepted) {
|
if(accepted) {
|
||||||
m_logQSOgeom=logDlg->geometry();
|
m_logQSOgeom=logDlg->geometry();
|
||||||
|
m_saveTxPower=logDlg->m_saveTxPower;
|
||||||
|
m_saveComments=logDlg->m_saveComments;
|
||||||
|
m_txPower=logDlg->m_txPower;
|
||||||
|
m_logComments=logDlg->m_comments;
|
||||||
if(m_clearCallGrid) {
|
if(m_clearCallGrid) {
|
||||||
m_hisCall="";
|
m_hisCall="";
|
||||||
ui->dxCallEntry->setText("");
|
ui->dxCallEntry->setText("");
|
||||||
|
@ -258,6 +258,8 @@ private:
|
|||||||
bool m_pttData;
|
bool m_pttData;
|
||||||
bool m_dontReadFreq;
|
bool m_dontReadFreq;
|
||||||
bool m_lockTxFreq;
|
bool m_lockTxFreq;
|
||||||
|
bool m_saveTxPower;
|
||||||
|
bool m_saveComments;
|
||||||
|
|
||||||
char m_decoded[80];
|
char m_decoded[80];
|
||||||
|
|
||||||
@ -318,6 +320,8 @@ private:
|
|||||||
QString m_msgSent0;
|
QString m_msgSent0;
|
||||||
QString m_fileToSave;
|
QString m_fileToSave;
|
||||||
QString m_QSOmsg;
|
QString m_QSOmsg;
|
||||||
|
QString m_txPower;
|
||||||
|
QString m_logComments;
|
||||||
|
|
||||||
QStringList m_macro;
|
QStringList m_macro;
|
||||||
QStringList m_dFreq;
|
QStringList m_dFreq;
|
||||||
|
Loading…
Reference in New Issue
Block a user