diff options
author | Volker Schroer <3470424+dl1ksv@users.noreply.github.com> | 2023-10-15 12:19:29 +0200 |
---|---|---|
committer | Jeff Long <willcode4@gmail.com> | 2023-12-10 09:15:31 -0500 |
commit | 9288d06fe3e946e193399fb958d85c8eb0d4a35c (patch) | |
tree | 88d129544bbac944b157d233c624e6d21bea9a61 | |
parent | Use pointers to pass s32fc arguments to VOLK (diff) | |
download | gnuradio-9288d06fe3e946e193399fb958d85c8eb0d4a35c.tar.xz gnuradio-9288d06fe3e946e193399fb958d85c8eb0d4a35c.zip |
gr-qtgui: QT GUI Msg Push Button add callback for Message Value
Add a callback for Message callback
Fixes #6869
Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
(cherry picked from commit d362942a2eb025c0fbcee506bfcd782be87fc779)
Signed-off-by: Jeff Long <willcode4@gmail.com>
-rw-r--r-- | gr-qtgui/grc/qtgui_msgpushbutton.block.yml | 2 | ||||
-rw-r--r-- | gr-qtgui/python/qtgui/msgpushbutton.py | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gr-qtgui/grc/qtgui_msgpushbutton.block.yml b/gr-qtgui/grc/qtgui_msgpushbutton.block.yml index 8fe29918a..3688d37f4 100644 --- a/gr-qtgui/grc/qtgui_msgpushbutton.block.yml +++ b/gr-qtgui/grc/qtgui_msgpushbutton.block.yml @@ -60,6 +60,8 @@ templates: ${gui_hint() % win} + callbacks: + - set_new_msg(${value}) documentation: |- This block creates a variable push button that creates a message when clicked. Leave the label blank to use the variable id as the label. diff --git a/gr-qtgui/python/qtgui/msgpushbutton.py b/gr-qtgui/python/qtgui/msgpushbutton.py index 4865cc1eb..358bfc428 100644 --- a/gr-qtgui/python/qtgui/msgpushbutton.py +++ b/gr-qtgui/python/qtgui/msgpushbutton.py @@ -57,3 +57,6 @@ class MsgPushButton(gr.sync_block, Qt.QPushButton): elif type(self.msgValue) == bool: self.message_port_pub(pmt.intern("pressed"), pmt.cons(pmt.intern(self.msgName), pmt.from_bool(self.msgValue))) + + def set_new_msg(self, msg): + self.msgValue = msg |