Skip to content

Commit d03964d

Browse files
committed
adding value_changed
1 parent c75f2a6 commit d03964d

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/pymodaq_plugins_template/app/custom_app_template.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,21 @@ def setup_menu(self):
7878
#todo create and populate menu using actions defined above in self.setup_actions
7979
pass
8080

81-
82-
81+
def value_changed(self, param):
82+
""" Actions to perform when one of the param's value in self.settings is changed from the
83+
user interface
84+
85+
For instance:
86+
if param.name() == 'do_something':
87+
if param.value():
88+
print('Do something')
89+
self.settings.child('main_settings', 'something_done').setValue(False)
90+
91+
Parameters
92+
----------
93+
param: (Parameter) the parameter whose value just changed
94+
"""
95+
pass
8396

8497

8598
def main():

0 commit comments

Comments
 (0)