Extend UDP Reply message with keyboard modifiers

This allows UDP servers to  emulate keyboard modified double-clicks on
decoded messages,  E.g. ALT+double-click for  replying to a CQ  or QRZ
call without changing ones Tx frequency offset.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8103 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2017-09-22 15:36:24 +00:00
parent e1da6f6e16
commit 567af321c0
11 changed files with 43 additions and 21 deletions
+1 -1
View File
@@ -208,7 +208,7 @@ ClientWidget::ClientWidget (QAbstractItemModel * decodes_model, QAbstractItemMod
// connect up table view signals
connect (decodes_table_view_, &QTableView::doubleClicked, this, [this] (QModelIndex const& index) {
Q_EMIT do_reply (decodes_proxy_model_.mapToSource (index));
Q_EMIT do_reply (decodes_proxy_model_.mapToSource (index), QApplication::keyboardModifiers () >> 24);
});
}
+1 -1
View File
@@ -39,7 +39,7 @@ public:
, QString const& callsign, QString const& grid, qint32 power
, bool off_air);
Q_SIGNAL void do_reply (QModelIndex const&);
Q_SIGNAL void do_reply (QModelIndex const&, quint8 modifier);
Q_SIGNAL void do_halt_tx (QString const& id, bool auto_only);
Q_SIGNAL void do_free_text (QString const& id, QString const& text, bool);
+3 -2
View File
@@ -136,7 +136,7 @@ void DecodesModel::clear_decodes (QString const& client_id)
}
}
void DecodesModel::do_reply (QModelIndex const& source)
void DecodesModel::do_reply (QModelIndex const& source, quint8 modifiers)
{
auto row = source.row ();
Q_EMIT reply (data (index (row, 0)).toString ()
@@ -146,7 +146,8 @@ void DecodesModel::do_reply (QModelIndex const& source)
, item (row, 4)->data ().toInt ()
, data (index (row, 5)).toString ()
, data (index (row, 6)).toString ()
, confidence_string (true) == data (index (row, 7)).toString ());
, confidence_string (true) == data (index (row, 7)).toString ()
, modifiers);
}
#include "moc_DecodesModel.cpp"
+2 -2
View File
@@ -35,10 +35,10 @@ public:
, quint32 delta_frequency, QString const& mode, QString const& message
, bool low_confidence, bool off_air, bool is_fast);
Q_SLOT void clear_decodes (QString const& client_id);
Q_SLOT void do_reply (QModelIndex const& source);
Q_SLOT void do_reply (QModelIndex const& source, quint8 modifiers);
Q_SIGNAL void reply (QString const& id, QTime time, qint32 snr, float delta_time, quint32 delta_frequency
, QString const& mode, QString const& message, bool low_confidence);
, QString const& mode, QString const& message, bool low_confidence, quint8 modifiers);
};
#endif