mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 08:31:57 -05:00
Merge branch 'hotfix-2.0.0-rc4' of bitbucket.org:k1jt/wsjtx into hotfix-2.0.0-rc4
This commit is contained in:
commit
f850b09315
@ -77,7 +77,22 @@ QByteArray LogBook::QSOToADIF (QString const& hisCall, QString const& hisGrid, Q
|
|||||||
if(comments!="") t += " <comment:" + QString::number(comments.length()) + ">" + comments;
|
if(comments!="") t += " <comment:" + QString::number(comments.length()) + ">" + comments;
|
||||||
if(name!="") t += " <name:" + QString::number(name.length()) + ">" + name;
|
if(name!="") t += " <name:" + QString::number(name.length()) + ">" + name;
|
||||||
if(operator_call!="") t+=" <operator:" + QString::number(operator_call.length()) + ">" + operator_call;
|
if(operator_call!="") t+=" <operator:" + QString::number(operator_call.length()) + ">" + operator_call;
|
||||||
if(xRcvd!="") {
|
if (xSent.size ())
|
||||||
|
{
|
||||||
|
auto words = xSent.split (' ', QString::SkipEmptyParts);
|
||||||
|
if (words.size () > 1)
|
||||||
|
{
|
||||||
|
bool ok;
|
||||||
|
auto sn = words.back ().toUInt (&ok);
|
||||||
|
if (ok && sn)
|
||||||
|
{
|
||||||
|
// assume last word is a serial if there are at least
|
||||||
|
// two words and if it is positive numeric
|
||||||
|
t += " <STX:" + QString::number (words.back ().size ()) + '>' + words.back ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (xRcvd.size ()) {
|
||||||
QString t1="";
|
QString t1="";
|
||||||
if(xRcvd.split(" ").size()==2) t1=xRcvd.split(" ").at(1);
|
if(xRcvd.split(" ").size()==2) t1=xRcvd.split(" ").at(1);
|
||||||
if(t1.toInt()>0) {
|
if(t1.toInt()>0) {
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
#include <QDebug>
|
|
||||||
#include "ExchangeValidator.hpp"
|
|
||||||
|
|
||||||
ExchangeValidator::ExchangeValidator (QObject * parent)
|
|
||||||
: QValidator {parent}
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
auto ExchangeValidator::validate (QString& input, int& length) const -> State
|
|
||||||
{
|
|
||||||
bool ok=false;
|
|
||||||
QStringList w=input.split(" ");
|
|
||||||
int nwords=w.size();
|
|
||||||
length=input.size();
|
|
||||||
input = input.toUpper ();
|
|
||||||
|
|
||||||
if(nwords==1 and length<=3) {
|
|
||||||
//ARRL RTTY Roundup
|
|
||||||
// ntype=4;
|
|
||||||
// ok=exch_valid_(&ntype, const_cast<char *>(input.toLatin1().constData()),length);
|
|
||||||
QStringList states;
|
|
||||||
states << "AL" << "AK" << "AZ" << "AR" << "CA" << "CO"
|
|
||||||
<< "CT" << "DE" << "FL" << "GA" << "HI" << "ID"
|
|
||||||
<< "IL" << "IN" << "IA" << "KS" << "KY" << "LA"
|
|
||||||
<< "ME" << "MD" << "MA" << "MI" << "MN" << "MS"
|
|
||||||
<< "MO" << "MT" << "NE" << "NV" << "NH" << "NJ"
|
|
||||||
<< "NM" << "NY" << "NC" << "ND" << "OH" << "OK"
|
|
||||||
<< "OR" << "PA" << "RI" << "SC" << "SD" << "TN"
|
|
||||||
<< "TX" << "UT" << "VT" << "VA" << "WA" << "WV"
|
|
||||||
<< "WI" << "WY" << "NB" << "NS" << "QC" << "ON"
|
|
||||||
<< "MB" << "SK" << "AB" << "BC" << "NWT" << "NF"
|
|
||||||
<< "LB" << "NU" << "YT" << "PEI" << "DC" << "DX";
|
|
||||||
if(states.contains(input)) ok=true;
|
|
||||||
|
|
||||||
}
|
|
||||||
if(nwords==2 and w.at(1).size()<=3) {
|
|
||||||
//ARRL Field Day
|
|
||||||
int n=w.at(0).size();
|
|
||||||
if(n>3) goto done;
|
|
||||||
int ntx=w.at(0).left(n-1).toInt();
|
|
||||||
if(ntx<1 or ntx>32) goto done;
|
|
||||||
QString c1=w.at(0).right(1);
|
|
||||||
if(c1<"A" or c1>"F") goto done;
|
|
||||||
QStringList sections;
|
|
||||||
sections << "AB" << "AK" << "AL" << "AR" << "AZ" << "BC"
|
|
||||||
<< "CO" << "CT" << "DE" << "EB" << "EMA" << "ENY"
|
|
||||||
<< "EPA" << "EWA" << "GA" << "GTA" << "IA" << "ID"
|
|
||||||
<< "IL" << "IN" << "KS" << "KY" << "LA" << "LAX"
|
|
||||||
<< "MAR" << "MB" << "MDC" << "ME" << "MI" << "MN"
|
|
||||||
<< "MO" << "MS" << "MT" << "NC" << "ND" << "NE"
|
|
||||||
<< "NFL" << "NH" << "NL" << "NLI" << "NM" << "NNJ"
|
|
||||||
<< "NNY" << "NT" << "NTX" << "NV" << "OH" << "OK"
|
|
||||||
<< "ONE" << "ONN" << "ONS" << "OR" << "ORG" << "PAC"
|
|
||||||
<< "PR" << "QC" << "RI" << "SB" << "SC" << "SCV"
|
|
||||||
<< "SD" << "SDG" << "SF" << "SFL" << "SJV" << "SK"
|
|
||||||
<< "SNJ" << "STX" << "SV" << "TN" << "UT" << "VA"
|
|
||||||
<< "VI" << "VT" << "WCF" << "WI" << "WMA" << "WNY"
|
|
||||||
<< "WPA" << "WTX" << "WV" << "WWA" << "WY" << "DX";
|
|
||||||
if(sections.contains(w.at(1))) ok=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
if(ok) return Acceptable;
|
|
||||||
return Intermediate;
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
#ifndef EXCHANGE_VALIDATOR_HPP__
|
|
||||||
#define EXCHANGE_VALIDATOR_HPP__
|
|
||||||
|
|
||||||
#include <QValidator>
|
|
||||||
|
|
||||||
// ExchangeValidator - QValidator for Field Day and RTTY Roundup exchanges
|
|
||||||
|
|
||||||
class ExchangeValidator final
|
|
||||||
: public QValidator
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ExchangeValidator (QObject * parent = nullptr);
|
|
||||||
|
|
||||||
// QValidator implementation
|
|
||||||
State validate (QString& input, int& length) const override;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -59,7 +59,6 @@
|
|||||||
#include "MultiSettings.hpp"
|
#include "MultiSettings.hpp"
|
||||||
#include "validators/MaidenheadLocatorValidator.hpp"
|
#include "validators/MaidenheadLocatorValidator.hpp"
|
||||||
#include "validators/CallsignValidator.hpp"
|
#include "validators/CallsignValidator.hpp"
|
||||||
#include "validators/ExchangeValidator.hpp"
|
|
||||||
#include "EqualizationToolsDialog.hpp"
|
#include "EqualizationToolsDialog.hpp"
|
||||||
#include "LotWUsers.hpp"
|
#include "LotWUsers.hpp"
|
||||||
#include "logbook/AD1CCty.hpp"
|
#include "logbook/AD1CCty.hpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user