Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b9c9b4ceb | |||
| 1febb18495 | |||
| 43401c3c26 | |||
| 55928be661 | |||
| a5f8593b3d | |||
| 07f1594d0a | |||
| b6dd6aadc8 | |||
| b9b334c6cf | |||
| fec45aa0ad | |||
| 2ef4e90710 | |||
| a0dc7bc013 | |||
| 84a3ef6046 | |||
| 5565a7731e | |||
| 1c1c5bf50a | |||
| b34c0fd2e4 | |||
| fddb618fa2 | |||
| 7101aec331 | |||
| 7b3bc259c6 | |||
| f7ebd8d783 | |||
| 8b3b34d876 | |||
| 538c70d158 | |||
| 35be0fcc29 | |||
| ee339431c7 | |||
| 8186348abe | |||
| f0ceb0f7f4 | |||
| bb4b79d797 | |||
| f1ed44f9e9 | |||
| 0b9f75a9c8 | |||
| c011b80a5a | |||
| 5446c979e9 | |||
| eca6813d8f | |||
| ea718b0fc1 | |||
| 4f243b1e1a | |||
| ee350524fa | |||
| c4656fcada | |||
| ce66e86b48 | |||
| 0664704eaf | |||
| a95bc26e3e | |||
| 8da2f9f8d7 | |||
| dd78a9fe70 | |||
| 81af627836 | |||
| 35cfbbc2e5 | |||
| bb348763fb | |||
| 4e666fed67 |
+29
-17
@@ -455,7 +455,7 @@ private:
|
||||
Q_SLOT void on_delete_macro_push_button_clicked (bool = false);
|
||||
Q_SLOT void on_PTT_method_button_group_buttonClicked (int);
|
||||
Q_SLOT void on_groups_line_edit_textChanged(QString const&);
|
||||
Q_SLOT void on_qth_message_line_edit_textChanged(QString const&);
|
||||
Q_SLOT void on_info_message_line_edit_textChanged(QString const&);
|
||||
Q_SLOT void on_cq_message_line_edit_textChanged(QString const&);
|
||||
Q_SLOT void on_reply_message_line_edit_textChanged(QString const&);
|
||||
Q_SLOT void on_add_macro_line_edit_editingFinished ();
|
||||
@@ -582,7 +582,7 @@ private:
|
||||
bool frequency_calibration_disabled_; // not persistent
|
||||
unsigned transceiver_command_number_;
|
||||
QString dynamic_grid_;
|
||||
QString dynamic_qth_;
|
||||
QString dynamic_info_;
|
||||
|
||||
// configuration fields that we publish
|
||||
bool auto_switch_bands_;
|
||||
@@ -591,7 +591,7 @@ private:
|
||||
QStringList my_groups_;
|
||||
QStringList auto_whitelist_;
|
||||
QStringList auto_blacklist_;
|
||||
QString my_qth_;
|
||||
QString my_info_;
|
||||
QString cq_;
|
||||
QString reply_;
|
||||
int callsign_aging_;
|
||||
@@ -634,6 +634,7 @@ private:
|
||||
bool transmit_directed_;
|
||||
bool autoreply_off_at_startup_;
|
||||
bool heartbeat_anywhere_;
|
||||
bool heartbeat_qso_pause_;
|
||||
bool relay_disabled_;
|
||||
bool monitor_off_at_startup_;
|
||||
bool monitor_last_used_;
|
||||
@@ -767,6 +768,7 @@ void Configuration::set_spot_to_reporting_networks (bool spot)
|
||||
bool Configuration::transmit_directed() const { return m_->transmit_directed_; }
|
||||
bool Configuration::autoreply_off_at_startup () const {return m_->autoreply_off_at_startup_;}
|
||||
bool Configuration::heartbeat_anywhere() const { return m_->heartbeat_anywhere_;}
|
||||
bool Configuration::heartbeat_qso_pause() const { return m_->heartbeat_qso_pause_;}
|
||||
bool Configuration::relay_off() const { return m_->relay_disabled_; }
|
||||
bool Configuration::monitor_off_at_startup () const {return m_->monitor_off_at_startup_;}
|
||||
bool Configuration::monitor_last_used () const {return m_->rig_is_dummy_ || m_->monitor_last_used_;}
|
||||
@@ -779,6 +781,12 @@ bool Configuration::ppfx() const {return m_->ppfx_;}
|
||||
bool Configuration::clear_callsign () const {return m_->clear_callsign_;}
|
||||
bool Configuration::miles () const {return m_->miles_;}
|
||||
bool Configuration::avoid_allcall () const {return m_->avoid_allcall_;}
|
||||
bool Configuration::set_avoid_allcall(bool avoid) {
|
||||
if(m_->avoid_allcall_ != avoid){
|
||||
m_->avoid_allcall_ = avoid;
|
||||
m_->write_settings();
|
||||
}
|
||||
}
|
||||
bool Configuration::spellcheck () const {return m_->spellcheck_;}
|
||||
bool Configuration::quick_call () const {return m_->quick_call_;}
|
||||
bool Configuration::disable_TX_on_73 () const {return m_->disable_TX_on_73_;}
|
||||
@@ -976,14 +984,14 @@ QSet<QString> Configuration::auto_blacklist() const {
|
||||
return QSet<QString>::fromList(m_->auto_blacklist_);
|
||||
}
|
||||
|
||||
QString Configuration::my_qth() const
|
||||
QString Configuration::my_info() const
|
||||
{
|
||||
auto qth = m_->my_qth_;
|
||||
if(m_->use_dynamic_info_ && !m_->dynamic_qth_.isEmpty()){
|
||||
qth = m_->dynamic_qth_;
|
||||
auto info = m_->my_info_;
|
||||
if(m_->use_dynamic_info_ && !m_->dynamic_info_.isEmpty()){
|
||||
info = m_->dynamic_info_;
|
||||
}
|
||||
|
||||
return qth.trimmed();
|
||||
return info.trimmed();
|
||||
}
|
||||
|
||||
QString Configuration::cq_message() const
|
||||
@@ -1011,9 +1019,9 @@ void Configuration::set_dynamic_location (QString const& grid_descriptor)
|
||||
m_->dynamic_grid_ = grid_descriptor.trimmed ();
|
||||
}
|
||||
|
||||
void Configuration::set_dynamic_station_qth(QString const& qth)
|
||||
void Configuration::set_dynamic_station_info(QString const& info)
|
||||
{
|
||||
m_->dynamic_qth_ = qth.trimmed ();
|
||||
m_->dynamic_info_ = info.trimmed ();
|
||||
}
|
||||
|
||||
namespace
|
||||
@@ -1161,7 +1169,7 @@ Configuration::impl::impl (Configuration * self, QDir const& temp_directory,
|
||||
ui_->callsign_line_edit->setValidator (new CallsignValidator {this});
|
||||
ui_->grid_line_edit->setValidator (new MaidenheadLocatorValidator {this, MaidenheadLocatorValidator::Length::doubleextended});
|
||||
ui_->add_macro_line_edit->setValidator (new QRegExpValidator {message_alphabet, this});
|
||||
ui_->qth_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this});
|
||||
ui_->info_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this});
|
||||
ui_->reply_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this});
|
||||
ui_->cq_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this});
|
||||
ui_->groups_line_edit->setValidator (new QRegExpValidator {message_alphabet, this});
|
||||
@@ -1169,7 +1177,7 @@ Configuration::impl::impl (Configuration * self, QDir const& temp_directory,
|
||||
setUppercase(ui_->callsign_line_edit);
|
||||
setUppercase(ui_->grid_line_edit);
|
||||
setUppercase(ui_->add_macro_line_edit);
|
||||
setUppercase(ui_->qth_message_line_edit);
|
||||
setUppercase(ui_->info_message_line_edit);
|
||||
setUppercase(ui_->reply_message_line_edit);
|
||||
setUppercase(ui_->cq_message_line_edit);
|
||||
setUppercase(ui_->groups_line_edit);
|
||||
@@ -1365,7 +1373,7 @@ void Configuration::impl::initialize_models ()
|
||||
ui_->groups_line_edit->setText(my_groups_.join(", "));
|
||||
ui_->auto_whitelist_line_edit->setText(auto_whitelist_.join(", "));
|
||||
ui_->auto_blacklist_line_edit->setText(auto_blacklist_.join(", "));
|
||||
ui_->qth_message_line_edit->setText (my_qth_.toUpper());
|
||||
ui_->info_message_line_edit->setText (my_info_.toUpper());
|
||||
ui_->cq_message_line_edit->setText(cq_.toUpper());
|
||||
ui_->reply_message_line_edit->setText (reply_.toUpper());
|
||||
ui_->use_dynamic_grid->setChecked(use_dynamic_info_);
|
||||
@@ -1398,6 +1406,7 @@ void Configuration::impl::initialize_models ()
|
||||
ui_->transmit_directed_check_box->setChecked(transmit_directed_);
|
||||
ui_->autoreply_off_check_box->setChecked (autoreply_off_at_startup_);
|
||||
ui_->heartbeat_anywhere_check_box->setChecked(heartbeat_anywhere_);
|
||||
ui_->heartbeat_qso_pause_check_box->setChecked(heartbeat_qso_pause_);
|
||||
ui_->relay_disabled_check_box->setChecked(relay_disabled_);
|
||||
ui_->monitor_off_check_box->setChecked (monitor_off_at_startup_);
|
||||
ui_->monitor_last_used_check_box->setChecked (monitor_last_used_);
|
||||
@@ -1512,7 +1521,7 @@ void Configuration::impl::read_settings ()
|
||||
auto_blacklist_ = settings_->value("AutoBlacklist", QStringList{}).toStringList();
|
||||
callsign_aging_ = settings_->value ("CallsignAging", 0).toInt ();
|
||||
activity_aging_ = settings_->value ("ActivityAging", 2).toInt ();
|
||||
my_qth_ = settings_->value("MyQTH", QString {}).toString();
|
||||
my_info_ = settings_->value("MyInfo", QString {}).toString();
|
||||
cq_ = settings_->value("CQMessage", QString {"CQCQCQ <MYGRID4>"}).toString();
|
||||
reply_ = settings_->value("Reply", QString {"HW CPY?"}).toString();
|
||||
next_color_cq_ = color_cq_ = settings_->value("colorCQ","#66ff66").toString();
|
||||
@@ -1663,6 +1672,7 @@ void Configuration::impl::read_settings ()
|
||||
transmit_directed_ = settings_->value ("TransmitDirected", true).toBool();
|
||||
autoreply_off_at_startup_ = settings_->value ("AutoreplyOFF", false).toBool ();
|
||||
heartbeat_anywhere_ = settings_->value("BeaconAnywhere", false).toBool();
|
||||
heartbeat_qso_pause_ = settings_->value("HeartbeatQSOPause", true).toBool();
|
||||
relay_disabled_ = settings_->value ("RelayOFF", false).toBool ();
|
||||
monitor_off_at_startup_ = settings_->value ("MonitorOFF", false).toBool ();
|
||||
monitor_last_used_ = settings_->value ("MonitorLastUsed", false).toBool ();
|
||||
@@ -1771,7 +1781,7 @@ void Configuration::impl::write_settings ()
|
||||
settings_->setValue ("MyGroups", my_groups_);
|
||||
settings_->setValue ("AutoWhitelist", auto_whitelist_);
|
||||
settings_->setValue ("AutoBlacklist", auto_blacklist_);
|
||||
settings_->setValue ("MyQTH", my_qth_);
|
||||
settings_->setValue ("MyInfo", my_info_);
|
||||
settings_->setValue ("CQMessage", cq_);
|
||||
settings_->setValue ("Reply", reply_);
|
||||
settings_->setValue ("CallsignAging", callsign_aging_);
|
||||
@@ -1834,6 +1844,7 @@ void Configuration::impl::write_settings ()
|
||||
settings_->setValue ("TransmitDirected", transmit_directed_);
|
||||
settings_->setValue ("AutoreplyOFF", autoreply_off_at_startup_);
|
||||
settings_->setValue ("BeaconAnywhere", heartbeat_anywhere_);
|
||||
settings_->setValue ("HeartbeatQSOPause", heartbeat_qso_pause_);
|
||||
settings_->setValue ("RelayOFF", relay_disabled_);
|
||||
settings_->setValue ("MonitorOFF", monitor_off_at_startup_);
|
||||
settings_->setValue ("MonitorLastUsed", monitor_last_used_);
|
||||
@@ -2360,7 +2371,7 @@ void Configuration::impl::accept ()
|
||||
auto_blacklist_ = splitCalls(ui_->auto_blacklist_line_edit->text().toUpper().trimmed());
|
||||
cq_ = ui_->cq_message_line_edit->text().toUpper();
|
||||
reply_ = ui_->reply_message_line_edit->text().toUpper();
|
||||
my_qth_ = ui_->qth_message_line_edit->text().toUpper();
|
||||
my_info_ = ui_->info_message_line_edit->text().toUpper();
|
||||
callsign_aging_ = ui_->callsign_aging_spin_box->value();
|
||||
activity_aging_ = ui_->activity_aging_spin_box->value();
|
||||
spot_to_reporting_networks_ = ui_->psk_reporter_check_box->isChecked ();
|
||||
@@ -2375,6 +2386,7 @@ void Configuration::impl::accept ()
|
||||
transmit_directed_ = ui_->transmit_directed_check_box->isChecked();
|
||||
autoreply_off_at_startup_ = ui_->autoreply_off_check_box->isChecked ();
|
||||
heartbeat_anywhere_ = ui_->heartbeat_anywhere_check_box->isChecked();
|
||||
heartbeat_qso_pause_ = ui_->heartbeat_qso_pause_check_box->isChecked();
|
||||
relay_disabled_ = ui_->relay_disabled_check_box->isChecked();
|
||||
monitor_off_at_startup_ = ui_->monitor_off_check_box->isChecked ();
|
||||
monitor_last_used_ = ui_->monitor_last_used_check_box->isChecked ();
|
||||
@@ -2787,7 +2799,7 @@ void Configuration::impl::on_groups_line_edit_textChanged(QString const &text)
|
||||
{
|
||||
}
|
||||
|
||||
void Configuration::impl::on_qth_message_line_edit_textChanged(QString const &text)
|
||||
void Configuration::impl::on_info_message_line_edit_textChanged(QString const &text)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -104,7 +104,7 @@ public:
|
||||
QSet<QString> auto_blacklist() const;
|
||||
int activity_aging() const;
|
||||
int callsign_aging() const;
|
||||
QString my_qth () const;
|
||||
QString my_info () const;
|
||||
QString cq_message () const;
|
||||
QString reply_message () const;
|
||||
QFont table_font() const;
|
||||
@@ -125,6 +125,7 @@ public:
|
||||
bool transmit_directed() const;
|
||||
bool autoreply_off_at_startup () const;
|
||||
bool heartbeat_anywhere() const;
|
||||
bool heartbeat_qso_pause() const;
|
||||
bool relay_off() const;
|
||||
bool monitor_off_at_startup () const;
|
||||
bool monitor_last_used () const;
|
||||
@@ -137,6 +138,7 @@ public:
|
||||
bool clear_callsign () const;
|
||||
bool miles () const;
|
||||
bool avoid_allcall () const;
|
||||
bool set_avoid_allcall (bool avoid);
|
||||
bool spellcheck() const;
|
||||
bool quick_call () const;
|
||||
bool disable_TX_on_73 () const;
|
||||
@@ -234,7 +236,7 @@ public:
|
||||
void set_dynamic_location (QString const&);
|
||||
|
||||
// Set the dynamic station qth message which is only used if configuration setting is enabled.
|
||||
void set_dynamic_station_qth(QString const& qth);
|
||||
void set_dynamic_station_info(QString const& info);
|
||||
|
||||
|
||||
// This method queries if a CAT and PTT connection is operational.
|
||||
|
||||
+15
-8
@@ -36,7 +36,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget_2">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="stationTab">
|
||||
<attribute name="title">
|
||||
@@ -216,7 +216,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="qth_message_line_edit">
|
||||
<widget class="QLineEdit" name="info_message_line_edit">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Station location message that is transmitted in response to &quot;@&quot; directed queries.</p></body></html></string>
|
||||
</property>
|
||||
@@ -228,7 +228,7 @@
|
||||
<string><html><head/><body><p>Station location message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Station Message (QTH & Equipment):</string>
|
||||
<string>Station Info (Rig, Antenna, Location, etc):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -279,7 +279,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>724</width>
|
||||
<height>617</height>
|
||||
<height>646</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_26">
|
||||
@@ -369,7 +369,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="transmit_directed_check_box">
|
||||
<property name="text">
|
||||
<string>Immediately transmit CQ, Reply, QTH, Saved, and Directed messages from the menu</string>
|
||||
<string>Immediately transmit CQ, Reply, Info, Saved, and Directed messages from the menu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -380,6 +380,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="heartbeat_qso_pause_check_box">
|
||||
<property name="text">
|
||||
<string>Pause heartbeat transmissions while in a QSO (i.e., callsign is selected)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="spellcheck_check_box">
|
||||
<property name="text">
|
||||
@@ -4111,11 +4118,11 @@ soundcard changes</string>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="CAT_handshake_button_group"/>
|
||||
<buttongroup name="TX_mode_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||
<buttongroup name="CAT_handshake_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
# Version number components
|
||||
set (WSJTX_VERSION_MAJOR 0)
|
||||
set (WSJTX_VERSION_MINOR 14)
|
||||
set (WSJTX_VERSION_PATCH 1)
|
||||
set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions
|
||||
set (WSJTX_VERSION_MAJOR 1)
|
||||
set (WSJTX_VERSION_MINOR 0)
|
||||
set (WSJTX_VERSION_PATCH 0)
|
||||
set (WSJTX_RC 2) # release candidate number, comment out or zero for development versions
|
||||
set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build
|
||||
|
||||
+16
-10
@@ -101,14 +101,17 @@ void ADIF::load()
|
||||
, extractField (record, "BAND")
|
||||
, extractField (record, "MODE")
|
||||
, extractField (record, "SUBMODE")
|
||||
, extractField (record, "QSO_DATE"));
|
||||
, extractField (record, "QSO_DATE")
|
||||
, extractField (record, "NAME")
|
||||
, extractField (record, "COMMENT")
|
||||
);
|
||||
}
|
||||
inputFile.close ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ADIF::add(QString const& call, QString const& band, QString const& mode, QString const& submode, QString const& date)
|
||||
void ADIF::add(QString const& call, QString const& band, QString const& mode, QString const& submode, QString const& date, QString const& name, QString const& comment)
|
||||
{
|
||||
QSO q;
|
||||
q.call = call;
|
||||
@@ -116,6 +119,9 @@ void ADIF::add(QString const& call, QString const& band, QString const& mode, QS
|
||||
q.mode = mode;
|
||||
q.submode = submode;
|
||||
q.date = date;
|
||||
q.name = name;
|
||||
q.comment = comment;
|
||||
|
||||
if (q.call.size ())
|
||||
{
|
||||
_data.insert(q.call,q);
|
||||
@@ -135,13 +141,18 @@ bool ADIF::match(QString const& call, QString const& band) const
|
||||
if ( (band.compare(q.band,Qt::CaseInsensitive) == 0)
|
||||
|| (band=="")
|
||||
|| (q.band==""))
|
||||
{
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
QList<ADIF::QSO> ADIF::find(QString const& call) const
|
||||
{
|
||||
return _data.values(call);
|
||||
}
|
||||
|
||||
QList<QString> ADIF::getCallList() const
|
||||
{
|
||||
@@ -154,8 +165,6 @@ QList<QString> ADIF::getCallList() const
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int ADIF::getCount() const
|
||||
{
|
||||
@@ -166,7 +175,7 @@ QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QStri
|
||||
, QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn
|
||||
, QDateTime const& dateTimeOff, QString const& band, QString const& comments
|
||||
, QString const& name, QString const& strDialFreq, QString const& m_myCall
|
||||
, QString const& m_myGrid, QString const& m_txPower, QString const& operator_call)
|
||||
, QString const& m_myGrid, QString const& operator_call)
|
||||
{
|
||||
QString t;
|
||||
t = "<call:" + QString::number(hisCall.length()) + ">" + hisCall;
|
||||
@@ -187,9 +196,6 @@ QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QStri
|
||||
m_myCall;
|
||||
t += " <my_gridsquare:" + QString::number(m_myGrid.length()) + ">" +
|
||||
m_myGrid;
|
||||
if (m_txPower != "")
|
||||
t += " <tx_pwr:" + QString::number(m_txPower.length()) +
|
||||
">" + m_txPower;
|
||||
if (comments != "")
|
||||
t += " <comment:" + QString::number(comments.length()) +
|
||||
">" + comments;
|
||||
|
||||
+12
-7
@@ -21,10 +21,14 @@ class QDateTime;
|
||||
class ADIF
|
||||
{
|
||||
public:
|
||||
|
||||
struct QSO;
|
||||
|
||||
void init(QString const& filename);
|
||||
void load();
|
||||
void add(QString const& call, QString const& band, QString const& mode, const QString &submode, QString const& date);
|
||||
void add(QString const& call, QString const& band, QString const& mode, const QString &submode, QString const& date, const QString &name, const QString &comment);
|
||||
bool match(QString const& call, QString const& band) const;
|
||||
QList<ADIF::QSO> find(QString const& call) const;
|
||||
QList<QString> getCallList() const;
|
||||
int getCount() const;
|
||||
|
||||
@@ -32,18 +36,19 @@ class ADIF
|
||||
bool addQSOToFile(QByteArray const& ADIF_record);
|
||||
|
||||
QByteArray QSOToADIF(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& submode, QString const& rptSent
|
||||
, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff
|
||||
, QString const& band, QString const& comments, QString const& name
|
||||
, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid
|
||||
, QString const& m_txPower, QString const& operator_call);
|
||||
, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff
|
||||
, QString const& band, QString const& comments, QString const& name
|
||||
, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid
|
||||
, QString const& operator_call);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
struct QSO
|
||||
{
|
||||
QString call,band,mode,submode,date;
|
||||
QString call,band,mode,submode,date,name,comment;
|
||||
};
|
||||
|
||||
private:
|
||||
QMultiHash<QString, QSO> _data;
|
||||
QString _filename;
|
||||
|
||||
|
||||
+41
-13
@@ -59,25 +59,53 @@ void LogBook::match(/*in*/const QString call,
|
||||
bool &callWorkedBefore,
|
||||
bool &countryWorkedBefore) const
|
||||
{
|
||||
if (call.length() > 0)
|
||||
{
|
||||
QString currentBand = ""; // match any band
|
||||
callWorkedBefore = _log.match(call,currentBand);
|
||||
countryName = _countries.find(call);
|
||||
if(call.isEmpty()){
|
||||
return;
|
||||
}
|
||||
|
||||
if (countryName.length() > 0) // country was found
|
||||
QString currentBand = ""; // match any band
|
||||
callWorkedBefore = _log.match(call, currentBand);
|
||||
countryName = _countries.find(call);
|
||||
|
||||
if (countryName.length() > 0){ // country was found
|
||||
countryWorkedBefore = _worked.getHasWorked(countryName);
|
||||
else
|
||||
{
|
||||
countryName = "where?"; //error: prefix not found
|
||||
countryWorkedBefore = false;
|
||||
}
|
||||
} else {
|
||||
countryName = "where?"; //error: prefix not found
|
||||
countryWorkedBefore = false;
|
||||
}
|
||||
}
|
||||
|
||||
void LogBook::addAsWorked(const QString call, const QString band, const QString mode, const QString submode, const QString date)
|
||||
bool LogBook::findCallDetails(
|
||||
/*in*/
|
||||
const QString call,
|
||||
/*out*/
|
||||
QString &date,
|
||||
QString &name,
|
||||
QString &comment) const
|
||||
{
|
||||
_log.add(call,band,mode,submode,date);
|
||||
qDebug() << "looking for call" << call;
|
||||
if(call.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
|
||||
auto qsos = _log.find(call);
|
||||
qDebug() << "found" << qsos.length() << "qsos for call" << call;
|
||||
if(qsos.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach(auto qso, qsos){
|
||||
if(date.isEmpty() && !qso.date.isEmpty()) date = qso.date;
|
||||
if(name.isEmpty() && !qso.name.isEmpty()) name = qso.name;
|
||||
if(comment.isEmpty() && !qso.comment.isEmpty()) comment = qso.comment;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LogBook::addAsWorked(const QString call, const QString band, const QString mode, const QString submode, const QString date, const QString name, const QString comment)
|
||||
{
|
||||
_log.add(call,band,mode,submode,date,name,comment);
|
||||
QString countryName = _countries.find(call);
|
||||
if (countryName.length() > 0)
|
||||
_worked.setAsWorked(countryName);
|
||||
|
||||
+8
-1
@@ -25,7 +25,14 @@ public:
|
||||
/*out*/ QString &countryName,
|
||||
bool &callWorkedBefore,
|
||||
bool &countryWorkedBefore) const;
|
||||
void addAsWorked(const QString call, const QString band, const QString mode, const QString submode, const QString date);
|
||||
bool findCallDetails(
|
||||
/*in*/
|
||||
const QString call,
|
||||
/*out*/
|
||||
QString &date,
|
||||
QString &name,
|
||||
QString &comment) const;
|
||||
void addAsWorked(const QString call, const QString band, const QString mode, const QString submode, const QString date, const QString name, const QString comment);
|
||||
|
||||
private:
|
||||
CountryDat _countries;
|
||||
|
||||
+5
-12
@@ -37,9 +37,7 @@ void LogQSO::loadSettings ()
|
||||
{
|
||||
m_settings->beginGroup ("LogQSO");
|
||||
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
|
||||
ui->cbTxPower->setChecked (m_settings->value ("SaveTxPower", false).toBool ());
|
||||
ui->cbComments->setChecked (m_settings->value ("SaveComments", false).toBool ());
|
||||
m_txPower = m_settings->value ("TxPower", "").toString ();
|
||||
m_comments = m_settings->value ("LogComments", "").toString();
|
||||
m_settings->endGroup ();
|
||||
}
|
||||
@@ -48,9 +46,7 @@ void LogQSO::storeSettings () const
|
||||
{
|
||||
m_settings->beginGroup ("LogQSO");
|
||||
m_settings->setValue ("geometry", saveGeometry ());
|
||||
m_settings->setValue ("SaveTxPower", ui->cbTxPower->isChecked ());
|
||||
m_settings->setValue ("SaveComments", ui->cbComments->isChecked ());
|
||||
m_settings->setValue ("TxPower", m_txPower);
|
||||
m_settings->setValue ("LogComments", m_comments);
|
||||
m_settings->endGroup ();
|
||||
}
|
||||
@@ -59,15 +55,13 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString
|
||||
QString const& rptSent, QString const& rptRcvd,
|
||||
QDateTime const& dateTimeOn, QDateTime const& dateTimeOff,
|
||||
Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid,
|
||||
bool toRTTY, bool dBtoComments, bool bFox, QString const& opCall)
|
||||
bool toDATA, bool dBtoComments, bool bFox, QString const& opCall)
|
||||
{
|
||||
if(!isHidden()) return;
|
||||
ui->call->setText(hisCall);
|
||||
ui->grid->setText(hisGrid);
|
||||
ui->name->setText("");
|
||||
ui->txPower->setText("");
|
||||
ui->comments->setText("");
|
||||
if (ui->cbTxPower->isChecked ()) ui->txPower->setText(m_txPower);
|
||||
if (ui->cbComments->isChecked ()) ui->comments->setText(m_comments);
|
||||
if(dBtoComments) {
|
||||
QString t=mode;
|
||||
@@ -75,7 +69,7 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString
|
||||
if(rptRcvd!="") t+=" Rcvd: " + rptRcvd;
|
||||
ui->comments->setText(t);
|
||||
}
|
||||
if(toRTTY) mode="DATA";
|
||||
if(toDATA) mode="DATA";
|
||||
ui->mode->setText(mode);
|
||||
ui->sent->setText(rptSent);
|
||||
ui->rcvd->setText(rptRcvd);
|
||||
@@ -111,7 +105,6 @@ void LogQSO::accept()
|
||||
m_dateTimeOff = ui->end_date_time->dateTime ();
|
||||
band=ui->band->text();
|
||||
name=ui->name->text();
|
||||
m_txPower=ui->txPower->text();
|
||||
comments=ui->comments->text();
|
||||
m_comments=comments;
|
||||
QString strDialFreq(QString::number(m_dialFreq / 1.e6,'f',6));
|
||||
@@ -123,7 +116,7 @@ void LogQSO::accept()
|
||||
adifile.init(adifilePath);
|
||||
|
||||
QByteArray ADIF {adifile.QSOToADIF (hisCall, hisGrid, mode, submode, rptSent, rptRcvd, m_dateTimeOn, m_dateTimeOff, band
|
||||
, comments, name, strDialFreq, m_myCall, m_myGrid, m_txPower, operator_call)};
|
||||
, comments, name, strDialFreq, m_myCall, m_myGrid, operator_call)};
|
||||
if (!adifile.addQSOToFile (ADIF))
|
||||
{
|
||||
MessageBox::warning_message (this, tr ("Log file error"),
|
||||
@@ -153,7 +146,7 @@ void LogQSO::accept()
|
||||
m_dateTimeOff.date().toString("yyyy-MM-dd,") +
|
||||
m_dateTimeOff.time().toString("hh:mm:ss,") + hisCall + "," +
|
||||
hisGrid + "," + strDialFreq + "," + (mode == "MFSK" ? "JS8" : mode) +
|
||||
"," + rptSent + "," + rptRcvd + "," + m_txPower +
|
||||
"," + rptSent + "," + rptRcvd +
|
||||
"," + comments + "," + name;
|
||||
QTextStream out(&f);
|
||||
out << logEntry << endl;
|
||||
@@ -161,7 +154,7 @@ void LogQSO::accept()
|
||||
}
|
||||
|
||||
//Clean up and finish logging
|
||||
Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, submode, rptSent, rptRcvd, m_txPower, comments, name,m_dateTimeOn, operator_call, m_myCall, m_myGrid, ADIF);
|
||||
Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, submode, rptSent, rptRcvd, comments, name,m_dateTimeOn, operator_call, m_myCall, m_myGrid, ADIF);
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn,
|
||||
QDateTime const& dateTimeOff,
|
||||
Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid,
|
||||
bool toRTTY, bool dBtoComments, bool bFox, QString const& opCall);
|
||||
bool toDATA, bool dBtoComments, bool bFox, QString const& opCall);
|
||||
|
||||
public slots:
|
||||
void accept();
|
||||
@@ -42,7 +42,7 @@ signals:
|
||||
void acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
|
||||
, Radio::Frequency dial_freq, QString const& mode, QString const& submode
|
||||
, QString const& rpt_sent, QString const& rpt_received
|
||||
, QString const& tx_power, QString const& comments
|
||||
, QString const& comments
|
||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||
, QString const& my_call, QString const& my_grid, QByteArray const& ADIF);
|
||||
|
||||
@@ -56,7 +56,6 @@ private:
|
||||
QScopedPointer<Ui::LogQSO> ui;
|
||||
QSettings * m_settings;
|
||||
Configuration const * m_config;
|
||||
QString m_txPower;
|
||||
QString m_comments;
|
||||
Radio::Frequency m_dialFreq;
|
||||
QString m_myCall;
|
||||
|
||||
@@ -125,6 +125,19 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
@@ -307,25 +320,17 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<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>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
@@ -434,8 +439,6 @@
|
||||
<tabstop>rcvd</tabstop>
|
||||
<tabstop>grid</tabstop>
|
||||
<tabstop>name</tabstop>
|
||||
<tabstop>txPower</tabstop>
|
||||
<tabstop>cbTxPower</tabstop>
|
||||
<tabstop>comments</tabstop>
|
||||
<tabstop>cbComments</tabstop>
|
||||
</tabstops>
|
||||
|
||||
+426
-158
File diff suppressed because it is too large
Load Diff
+6
-3
@@ -292,7 +292,7 @@ private slots:
|
||||
void on_cqMacroButton_clicked();
|
||||
void on_replyMacroButton_clicked();
|
||||
void on_snrMacroButton_clicked();
|
||||
void on_qthMacroButton_clicked();
|
||||
void on_infoMacroButton_clicked();
|
||||
void setShowColumn(QString tableKey, QString columnKey, bool value);
|
||||
bool showColumn(QString tableKey, QString columnKey, bool default_=true);
|
||||
void buildShowColumnsMenu(QMenu *menu, QString tableKey);
|
||||
@@ -343,7 +343,7 @@ private slots:
|
||||
void acceptQSO (QDateTime const&, QString const& call, QString const& grid
|
||||
, Frequency dial_freq, QString const& mode, QString const& submode
|
||||
, QString const& rpt_sent, QString const& rpt_received
|
||||
, QString const& tx_power, QString const& comments
|
||||
, QString const& comments
|
||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||
, QString const& my_call, QString const& my_grid, QByteArray const& ADIF);
|
||||
void on_bandComboBox_currentIndexChanged (int index);
|
||||
@@ -383,6 +383,7 @@ private slots:
|
||||
void on_cbFirst_toggled(bool b);
|
||||
void on_cbAutoSeq_toggled(bool b);
|
||||
void emitPTT(bool on);
|
||||
void emitTones();
|
||||
void networkMessage(Message const &message);
|
||||
void sendNetworkMessage(QString const &type, QString const &message);
|
||||
void sendNetworkMessage(QString const &type, QString const &message, const QMap<QString, QVariant> ¶ms);
|
||||
@@ -859,6 +860,8 @@ private:
|
||||
bool m_hbHidden;
|
||||
int m_hbInterval;
|
||||
int m_cqInterval;
|
||||
bool m_hbPaused;
|
||||
bool m_cqPaused;
|
||||
QDateTime m_nextHeartbeat;
|
||||
QDateTime m_nextCQ;
|
||||
QDateTime m_dateTimeQSOOn;
|
||||
@@ -954,7 +957,7 @@ private:
|
||||
void refreshInboxCounts();
|
||||
bool hasMessageHistory(QString call);
|
||||
int addCommandToMyInbox(CommandDetail d);
|
||||
int addCommandToInboxStorage(QString type, CommandDetail d);
|
||||
int addCommandToStorage(QString type, CommandDetail d);
|
||||
int getNextMessageIdForCallsign(QString callsign);
|
||||
QStringList parseRelayPathCallsigns(QString from, QString text);
|
||||
void processAlertReplyForCommand(CommandDetail d, QString from, QString cmd);
|
||||
|
||||
+175
-142
@@ -1242,14 +1242,6 @@ QTextEdit[transmitting="true"] {
|
||||
<string>Callsigns</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>✓</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Age</string>
|
||||
@@ -1280,6 +1272,24 @@ QTextEdit[transmitting="true"] {
|
||||
<string>Distance</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>✓</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Worked Before</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Comment</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
@@ -1315,71 +1325,7 @@ QTextEdit[transmitting="true"] {
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="14">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QPushButton" name="macrosMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send a saved message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Saved</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="replyMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Reply to a CQ</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reply</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QPushButton" name="snrMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send an SNR message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SNR</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="16">
|
||||
<item row="1" column="17">
|
||||
<widget class="QPushButton" name="stopTxButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -1395,8 +1341,8 @@ QTextEdit[transmitting="true"] {
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QPushButton" name="qthMacroButton">
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="cqMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@@ -1404,23 +1350,7 @@ QTextEdit[transmitting="true"] {
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send your station location message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QTH</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="hbMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p align="justify">Send a Heartbeat message</p></body></html></string>
|
||||
<string><html><head/><body><p>Send a CQ message</p></body></html></string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
@@ -1432,14 +1362,33 @@ QTextEdit[transmitting="true"] {
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>HB</string>
|
||||
<string>CQ</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="15">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="16">
|
||||
<widget class="QPushButton" name="startTxButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@@ -1475,6 +1424,130 @@ color:#222;
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="12">
|
||||
<widget class="QPushButton" name="queryButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send a directed message to another station</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Directed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QPushButton" name="infoMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send your station information</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>INFO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<widget class="QPushButton" name="macrosMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send a saved message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Saved</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="replyMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Reply to a CQ</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>REPLY</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="hbMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p align="justify">Send a Heartbeat message</p></body></html></string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton:checked {
|
||||
font-weight:bold;
|
||||
color:black;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>HB</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="8">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QPushButton" name="snrMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send an signal report</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SNR</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="13">
|
||||
<widget class="QPushButton" name="deselectButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
@@ -1496,24 +1569,8 @@ color:#222;
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="11">
|
||||
<widget class="QPushButton" name="queryButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send a directed message to another station</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Directed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<item row="1" column="6">
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -1528,37 +1585,6 @@ color:#222;
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="cqMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send a CQ message</p></body></html></string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton:checked {
|
||||
font-weight:bold;
|
||||
color:black;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CQ</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_5">
|
||||
@@ -4723,6 +4749,8 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<addaction name="actionShow_Statusbar"/>
|
||||
<addaction name="actionShow_Tooltips"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionShow_Message_Inbox"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionReset_Window_Sizes"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_Log">
|
||||
@@ -5638,6 +5666,11 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<string>Set Offset...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShow_Message_Inbox">
|
||||
<property name="text">
|
||||
<string>Show Message Inbox...</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
||||
+33
-1
@@ -3,6 +3,7 @@
|
||||
#include "moc_messagewindow.cpp"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QMenu>
|
||||
|
||||
#include "Radio.hpp"
|
||||
#include "keyeater.h"
|
||||
@@ -41,6 +42,30 @@ MessageWindow::MessageWindow(QWidget *parent) :
|
||||
|
||||
ui->messageTableWidget->horizontalHeader()->setVisible(true);
|
||||
ui->messageTableWidget->resizeColumnsToContents();
|
||||
|
||||
ui->messageTableWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
auto deleteAction = new QAction("Delete", ui->messageTableWidget);
|
||||
connect(deleteAction, &QAction::triggered, this, [this](){
|
||||
auto items = ui->messageTableWidget->selectedItems();
|
||||
if(items.isEmpty()){
|
||||
return;
|
||||
}
|
||||
auto item = items.first();
|
||||
auto col = ui->messageTableWidget->item(item->row(), 1);
|
||||
if(!col){
|
||||
return;
|
||||
}
|
||||
bool ok = false;
|
||||
auto mid = col->data(Qt::UserRole).toInt(&ok);
|
||||
if(!ok){
|
||||
return;
|
||||
}
|
||||
|
||||
ui->messageTableWidget->removeRow(item->row());
|
||||
|
||||
emit this->deleteMessage(mid);
|
||||
});
|
||||
ui->messageTableWidget->addAction(deleteAction);
|
||||
}
|
||||
|
||||
MessageWindow::~MessageWindow()
|
||||
@@ -49,7 +74,7 @@ MessageWindow::~MessageWindow()
|
||||
}
|
||||
|
||||
void MessageWindow::setCall(const QString &call){
|
||||
setWindowTitle(QString("Message History: %1").arg(call));
|
||||
setWindowTitle(QString("Messages: %1").arg(call == "%" ? "All" : call));
|
||||
}
|
||||
|
||||
void MessageWindow::populateMessages(QList<QPair<int, Message> > msgs){
|
||||
@@ -99,6 +124,12 @@ void MessageWindow::populateMessages(QList<QPair<int, Message> > msgs){
|
||||
fromItem->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
|
||||
ui->messageTableWidget->setItem(row, col++, fromItem);
|
||||
|
||||
auto to = params.value("TO").toString();
|
||||
auto toItem = new QTableWidgetItem(to);
|
||||
toItem->setData(Qt::UserRole, to);
|
||||
toItem->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
|
||||
ui->messageTableWidget->setItem(row, col++, toItem);
|
||||
|
||||
auto text = params.value("TEXT").toString();
|
||||
auto textItem = new QTableWidgetItem(text);
|
||||
textItem->setData(Qt::UserRole, text);
|
||||
@@ -111,6 +142,7 @@ void MessageWindow::populateMessages(QList<QPair<int, Message> > msgs){
|
||||
ui->messageTableWidget->resizeColumnToContents(2);
|
||||
ui->messageTableWidget->resizeColumnToContents(3);
|
||||
ui->messageTableWidget->resizeColumnToContents(4);
|
||||
ui->messageTableWidget->resizeColumnToContents(5);
|
||||
}
|
||||
ui->messageTableWidget->setUpdatesEnabled(true);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
~MessageWindow();
|
||||
|
||||
signals:
|
||||
void deleteMessage(int id);
|
||||
void replyMessage(const QString &call);
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -137,6 +137,11 @@
|
||||
<string>From</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>To</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Message</string>
|
||||
|
||||
+78
-24
@@ -36,7 +36,7 @@ QString alphabet = {"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ+-./?"}; // alphabet to
|
||||
QString alphabet72 = {"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-+/?."};
|
||||
QString grid_pattern = {R"((?<grid>[A-X]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*)+)"};
|
||||
QString orig_compound_callsign_pattern = {R"((?<callsign>(\d|[A-Z])+\/?((\d|[A-Z]){2,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?))"};
|
||||
QString base_callsign_pattern = {R"((?<callsign>\b(?<base>([0-9A-Z])?([0-9A-Z])([0-9])([A-Z])?([A-Z])?([A-Z])?)\b))"};
|
||||
QString base_callsign_pattern = {R"((?<callsign>\b(?<base>([0-9A-Z])?([0-9A-Z])([0-9])([A-Z])?([A-Z])?([A-Z])?)(?<portable>[/][P])?\b))"};
|
||||
//QString compound_callsign_pattern = {R"((?<callsign>\b(?<prefix>[A-Z0-9]{1,4}\/)?(?<base>([0-9A-Z])?([0-9A-Z])([0-9])([A-Z])?([A-Z])?([A-Z])?)(?<suffix>\/[A-Z0-9]{1,4})?)\b)"};
|
||||
QString compound_callsign_pattern = {R"((?<callsign>(?:[@]?|\b)(?<extended>[A-Z0-9\/@][A-Z0-9\/]{0,2}[\/]?[A-Z0-9\/]{0,3}[\/]?[A-Z0-9\/]{0,3})\b))"};
|
||||
QString pack_callsign_pattern = {R"(([0-9A-Z ])([0-9A-Z])([0-9])([A-Z ])([A-Z ])([A-Z ]))"};
|
||||
@@ -50,8 +50,9 @@ QMap<QString, int> directed_cmds = {
|
||||
{" SNR?", 0 }, // query snr
|
||||
{"?", 0 }, // compat
|
||||
|
||||
//{" ", 1 }, // unused
|
||||
//{" ", 2 }, // unused
|
||||
{" DIT DIT", 1 }, // unused
|
||||
|
||||
{" NACK", 2 }, // negative acknowledge
|
||||
|
||||
{" HEARING?", 3 }, // query station calls heard
|
||||
|
||||
@@ -72,6 +73,7 @@ QMap<QString, int> directed_cmds = {
|
||||
{" QUERY", 11 }, // generic query
|
||||
|
||||
{" QUERY MSGS", 12 }, // do you have any stored messages?
|
||||
{" QUERY MSGS?", 12 }, // do you have any stored messages?
|
||||
|
||||
{" QUERY CALL", 13 }, // can you transmit a ping to callsign?
|
||||
|
||||
@@ -79,8 +81,8 @@ QMap<QString, int> directed_cmds = {
|
||||
|
||||
{" GRID", 15 }, // this is my current grid locator
|
||||
|
||||
{" QTH?", 16 }, // what is your qth message?
|
||||
{" QTH", 17 }, // this is my qth message
|
||||
{" INFO?", 16 }, // what is your info message?
|
||||
{" INFO", 17 }, // this is my info message
|
||||
|
||||
{" FB", 18 }, // fine business
|
||||
{" HW CPY?", 19 }, // how do you copy?
|
||||
@@ -103,7 +105,7 @@ QMap<QString, int> directed_cmds = {
|
||||
};
|
||||
|
||||
// commands allowed to be processed
|
||||
QSet<int> allowed_cmds = {-1, 0, /*1,*/ /*2,*/ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
|
||||
QSet<int> allowed_cmds = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
|
||||
|
||||
// commands that result in an autoreply (which can be relayed)
|
||||
QSet<int> autoreply_cmds = {0, 3, 4, 6, 9, 10, 11, 12, 13, 16, 30};
|
||||
@@ -128,10 +130,10 @@ QMap<int, int> checksum_cmds = {
|
||||
};
|
||||
|
||||
QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)");
|
||||
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|MSG TO[:]|SNR[?]|QTH[?]|GRID[?]|STATUS[?]|HEARING[?]|(?:(?:STATUS|HEARING|QUERY CALL|QUERY MSGS|QUERY|CMD|MSG|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|GRID)(?=[ ]|$))|[?> ]))?");
|
||||
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|MSG TO[:]|SNR[?]|INFO[?]|GRID[?]|STATUS[?]|QUERY MSGS[?]|HEARING[?]|(?:(?:STATUS|HEARING|QUERY CALL|QUERY MSGS|QUERY|CMD|MSG|NACK|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|INFO|GRID|DIT DIT)(?=[ ]|$))|[?> ]))?");
|
||||
QString optional_grid_pattern = QString("(?<grid>\\s?[A-R]{2}[0-9]{2})?");
|
||||
QString optional_extended_grid_pattern = QString("^(?<grid>\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?");
|
||||
QString optional_num_pattern = QString("(?<num>(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
||||
QString optional_num_pattern = QString("(?<num>(?<=SNR|\\bACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
||||
|
||||
QRegularExpression directed_re("^" +
|
||||
callsign_pattern +
|
||||
@@ -205,9 +207,41 @@ quint16 nusergrid = nbasegrid + 10;
|
||||
quint16 nmaxgrid = (1<<15)-1;
|
||||
|
||||
QMap<QString, quint32> basecalls = {
|
||||
{ "<....>", nbasecall + 1 }, // incomplete callsign
|
||||
{ "@ALLCALL", nbasecall + 2 }, // ALLCALL group
|
||||
{ "@JS8NET", nbasecall + 3 }, // JS8NET group
|
||||
{ "<....>", nbasecall + 1 }, // incomplete callsign
|
||||
{ "@ALLCALL", nbasecall + 2 }, // ALLCALL group
|
||||
{ "@JS8NET", nbasecall + 3 }, // JS8NET group
|
||||
|
||||
// continental dx
|
||||
{ "@DX/NA", nbasecall + 4 }, // North America DX group
|
||||
{ "@DX/SA", nbasecall + 5 }, // South America DX group
|
||||
{ "@DX/EU", nbasecall + 6 }, // Europe DX group
|
||||
{ "@DX/AS", nbasecall + 7 }, // Asia DX group
|
||||
{ "@DX/AF", nbasecall + 8 }, // Africa DX group
|
||||
{ "@DX/OC", nbasecall + 9 }, // Oceania DX group
|
||||
{ "@DX/AN", nbasecall + 10 }, // Antarctica DX group
|
||||
|
||||
// itu regions
|
||||
{ "@REGION/1", nbasecall + 11 }, // ITU Region 1
|
||||
{ "@REGION/2", nbasecall + 12 }, // ITU Region 2
|
||||
{ "@REGION/3", nbasecall + 13 }, // ITU Region 3
|
||||
|
||||
// generic
|
||||
{ "@GROUP/0", nbasecall + 14 }, // Generic group
|
||||
{ "@GROUP/1", nbasecall + 15 }, // Generic group
|
||||
{ "@GROUP/2", nbasecall + 16 }, // Generic group
|
||||
{ "@GROUP/3", nbasecall + 17 }, // Generic group
|
||||
{ "@GROUP/4", nbasecall + 18 }, // Generic group
|
||||
{ "@GROUP/5", nbasecall + 19 }, // Generic group
|
||||
{ "@GROUP/6", nbasecall + 20 }, // Generic group
|
||||
{ "@GROUP/7", nbasecall + 21 }, // Generic group
|
||||
{ "@GROUP/8", nbasecall + 22 }, // Generic group
|
||||
{ "@GROUP/9", nbasecall + 23 }, // Generic group
|
||||
|
||||
// ops
|
||||
{ "@COMMAND", nbasecall + 24 }, // Command group
|
||||
{ "@CONTROL", nbasecall + 25 }, // Control group
|
||||
{ "@NET", nbasecall + 26 }, // Net group
|
||||
{ "@NTS", nbasecall + 27 }, // NTS group
|
||||
};
|
||||
|
||||
QMap<quint32, QString> cqs = {
|
||||
@@ -816,8 +850,8 @@ QString Varicode::unpackAlphaNumeric50(quint64 packed){
|
||||
return value.replace(" ", "");
|
||||
}
|
||||
|
||||
// pack a callsign into a 28-bit value
|
||||
quint32 Varicode::packCallsign(QString const& value){
|
||||
// pack a callsign into a 28-bit value and a boolean portable flag
|
||||
quint32 Varicode::packCallsign(QString const& value, bool *pPortable){
|
||||
quint32 packed = 0;
|
||||
|
||||
QString callsign = value.toUpper().trimmed();
|
||||
@@ -826,6 +860,13 @@ quint32 Varicode::packCallsign(QString const& value){
|
||||
return basecalls[callsign];
|
||||
}
|
||||
|
||||
// strip /P
|
||||
if(callsign.endsWith("/P")){
|
||||
callsign = callsign.left(callsign.length()-2);
|
||||
|
||||
if(pPortable) *pPortable = true;
|
||||
}
|
||||
|
||||
// workaround for swaziland
|
||||
if(callsign.startsWith("3DA0")){
|
||||
callsign = "3D0" + callsign.mid(4);
|
||||
@@ -887,7 +928,7 @@ quint32 Varicode::packCallsign(QString const& value){
|
||||
return packed;
|
||||
}
|
||||
|
||||
QString Varicode::unpackCallsign(quint32 value){
|
||||
QString Varicode::unpackCallsign(quint32 value, bool portable){
|
||||
foreach(auto key, basecalls.keys()){
|
||||
if(basecalls[key] == value){
|
||||
return key;
|
||||
@@ -927,7 +968,11 @@ QString Varicode::unpackCallsign(quint32 value){
|
||||
callsign = "3X" + callsign.mid(1);
|
||||
}
|
||||
|
||||
return callsign;
|
||||
if(portable){
|
||||
callsign = callsign.trimmed() + "/P";
|
||||
}
|
||||
|
||||
return callsign.trimmed();
|
||||
}
|
||||
|
||||
QString Varicode::deg2grid(float dlong, float dlat){
|
||||
@@ -1133,8 +1178,6 @@ bool Varicode::isValidCallsign(const QString &callsign, bool *pIsCompound){
|
||||
if(match.hasMatch() && (match.capturedLength() == callsign.length())){
|
||||
bool isValid = isValidCompoundCallsign(match.capturedRef(0));
|
||||
|
||||
qDebug() << "is valid compound??" << match.capturedRef(0) << isValid;
|
||||
|
||||
if(pIsCompound) *pIsCompound = isValid;
|
||||
return isValid;
|
||||
}
|
||||
@@ -1144,7 +1187,7 @@ bool Varicode::isValidCallsign(const QString &callsign, bool *pIsCompound){
|
||||
}
|
||||
|
||||
bool Varicode::isCompoundCallsign(const QString &callsign){
|
||||
if(basecalls.contains(callsign)){
|
||||
if(basecalls.contains(callsign) && !callsign.startsWith("@")){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1442,8 +1485,11 @@ QString Varicode::packDirectedMessage(const QString &text, const QString &mycall
|
||||
if(pNum) *pNum = num;
|
||||
}
|
||||
|
||||
quint32 packed_from = Varicode::packCallsign(from);
|
||||
quint32 packed_to = Varicode::packCallsign(to);
|
||||
bool portable_from = false;
|
||||
quint32 packed_from = Varicode::packCallsign(from, &portable_from);
|
||||
|
||||
bool portable_to = false;
|
||||
quint32 packed_to = Varicode::packCallsign(to, &portable_to);
|
||||
|
||||
if(packed_from == 0 || packed_to == 0){
|
||||
if(n) *n = 0;
|
||||
@@ -1461,7 +1507,11 @@ QString Varicode::packDirectedMessage(const QString &text, const QString &mycall
|
||||
packed_cmd = directed_cmds[cmdOut];
|
||||
}
|
||||
quint8 packed_flag = Varicode::FrameDirected;
|
||||
quint8 packed_extra = inum;
|
||||
quint8 packed_extra = (
|
||||
(((int)portable_from) << 7) +
|
||||
(((int)portable_to) << 6) +
|
||||
inum
|
||||
);
|
||||
|
||||
// [3][28][28][5],[2][6] = 72
|
||||
auto bits = (
|
||||
@@ -1473,7 +1523,7 @@ QString Varicode::packDirectedMessage(const QString &text, const QString &mycall
|
||||
|
||||
if(pCmd) *pCmd = cmdOut;
|
||||
if(n) *n = match.captured(0).length();
|
||||
return Varicode::pack72bits(Varicode::bitsToInt(bits), packed_extra % 64);
|
||||
return Varicode::pack72bits(Varicode::bitsToInt(bits), packed_extra);
|
||||
}
|
||||
|
||||
QStringList Varicode::unpackDirectedMessage(const QString &text, quint8 *pType){
|
||||
@@ -1496,8 +1546,12 @@ QStringList Varicode::unpackDirectedMessage(const QString &text, quint8 *pType){
|
||||
quint32 packed_to = Varicode::bitsToInt(bits.mid(31, 28));
|
||||
quint8 packed_cmd = Varicode::bitsToInt(bits.mid(59, 5));
|
||||
|
||||
QString from = Varicode::unpackCallsign(packed_from).trimmed();
|
||||
QString to = Varicode::unpackCallsign(packed_to).trimmed();
|
||||
bool portable_from = ((extra >> 7) & 1) == 1;
|
||||
bool portable_to = ((extra >> 6) & 1) == 1;
|
||||
extra = extra % 64;
|
||||
|
||||
QString from = Varicode::unpackCallsign(packed_from, portable_from);
|
||||
QString to = Varicode::unpackCallsign(packed_to, portable_to);
|
||||
QString cmd = directed_cmds.key(packed_cmd % 32);
|
||||
|
||||
unpacked.append(from);
|
||||
|
||||
+2
-2
@@ -120,8 +120,8 @@ public:
|
||||
static quint64 packAlphaNumeric50(QString const& value);
|
||||
static QString unpackAlphaNumeric50(quint64 packed);
|
||||
|
||||
static quint32 packCallsign(QString const& value);
|
||||
static QString unpackCallsign(quint32 value);
|
||||
static quint32 packCallsign(QString const& value, bool *pPortable);
|
||||
static QString unpackCallsign(quint32 value, bool portable);
|
||||
|
||||
static QString deg2grid(float dlong, float dlat);
|
||||
static QPair<float, float> grid2deg(QString const &grid);
|
||||
|
||||
Reference in New Issue
Block a user