mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-10 17:59:04 -04:00
Add version and revision information to UDP heartbeat messages
Updated UDP examples to show the version and revision information received from clients. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7358 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
@@ -94,9 +94,27 @@ void ClientWidget::IdFilterModel::rx_df (int df)
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
QString make_title (QString const& id, QString const& version, QString const& revision)
|
||||
{
|
||||
QString title {id};
|
||||
if (version.size ())
|
||||
{
|
||||
title += QString {" v%1"}.arg (version);
|
||||
}
|
||||
if (revision.size ())
|
||||
{
|
||||
title += QString {" (%1)"}.arg (revision);
|
||||
}
|
||||
return title;
|
||||
}
|
||||
}
|
||||
|
||||
ClientWidget::ClientWidget (QAbstractItemModel * decodes_model, QAbstractItemModel * beacons_model
|
||||
, QString const& id, QWidget * parent)
|
||||
: QDockWidget {id, parent}
|
||||
, QString const& id, QString const& version, QString const& revision
|
||||
, QWidget * parent)
|
||||
: QDockWidget {make_title (id, version, revision), parent}
|
||||
, id_ {id}
|
||||
, decodes_proxy_model_ {id_}
|
||||
, decodes_table_view_ {new QTableView}
|
||||
|
||||
Reference in New Issue
Block a user