mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-24 18:32:27 -04:00
Add helpful tool tips to serial port drop down list items
This commit is contained in:
parent
4f57cc7fdb
commit
09ee9d3dc0
@ -1073,6 +1073,7 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network
|
|||||||
//
|
//
|
||||||
fill_port_combo_box (ui_->PTT_port_combo_box);
|
fill_port_combo_box (ui_->PTT_port_combo_box);
|
||||||
ui_->PTT_port_combo_box->addItem ("CAT");
|
ui_->PTT_port_combo_box->addItem ("CAT");
|
||||||
|
ui_->PTT_port_combo_box->setItemData (ui_->PTT_port_combo_box->count () - 1, "Delegate to proxy CAT service", Qt::ToolTipRole);
|
||||||
|
|
||||||
//
|
//
|
||||||
// setup hooks to keep audio channels aligned with devices
|
// setup hooks to keep audio channels aligned with devices
|
||||||
@ -2922,9 +2923,15 @@ void Configuration::impl::fill_port_combo_box (QComboBox * cb)
|
|||||||
// remove possibly confusing Windows device path (OK because
|
// remove possibly confusing Windows device path (OK because
|
||||||
// it gets added back by Hamlib)
|
// it gets added back by Hamlib)
|
||||||
cb->addItem (p.systemLocation ().remove (QRegularExpression {R"(^\\\\\.\\)"}));
|
cb->addItem (p.systemLocation ().remove (QRegularExpression {R"(^\\\\\.\\)"}));
|
||||||
|
auto tip = QString {"%1 %2 %3"}.arg (p.manufacturer ()).arg (p.serialNumber ()).arg (p.description ()).trimmed ();
|
||||||
|
if (tip.size ())
|
||||||
|
{
|
||||||
|
cb->setItemData (cb->count () - 1, tip, Qt::ToolTipRole);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cb->addItem("USB");
|
}
|
||||||
|
cb->addItem ("USB");
|
||||||
|
cb->setItemData (cb->count () - 1, "Custom USB device", Qt::ToolTipRole);
|
||||||
cb->setEditText (current_text);
|
cb->setEditText (current_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user