Add tooltips in parameter tree

This commit is contained in:
atse 2024-06-20 16:13:27 +08:00
parent 1340057449
commit b6692b55a4
2 changed files with 12 additions and 0 deletions

View File

@ -42,6 +42,13 @@ class MutexParameter(pTypes.ListParameter):
registerParameterType("mutex", MutexParameter)
def set_tree_label_tips(tree):
for item in tree.listAllItems():
p = item.param
if "tip" in p.opts:
item.setToolTip(0, p.opts["tip"])
class ctrl_panel(QObject):
set_zero_limits_warning_sig = pyqtSignal(list)
@ -79,6 +86,8 @@ class ctrl_panel(QObject):
self.params[i].setValue = self._setValue
self.params[i].sigTreeStateChanged.connect(sigTreeStateChanged_handle)
set_tree_label_tips(tree)
for handle in sigActivated_handles[i]:
self.params[i].child(*handle[0]).sigActivated.connect(handle[1])

View File

@ -139,6 +139,7 @@
"name":"Thermistor Config",
"expanded":true,
"type":"group",
"tip": "Configuration of the connected Thermistor",
"children":[
{
"name":"T₀",
@ -155,6 +156,7 @@
"ch",
"t0"
],
"tip": "The origin temperature for the B-Parameter Formula",
"lock":false
},
{
@ -169,6 +171,7 @@
"ch",
"r0"
],
"tip": "The origin resistance for the B-Parameter Formula",
"lock":false
},
{