mirror of https://github.com/saitohirga/WSJT-X.git
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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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