seantronsen / pvt

GNU General Public License v3.0
0 stars 0 forks source link

Optional Data Arg for Data Display Panes #17

Closed seantrons closed 6 months ago

seantrons commented 6 months ago

A nice improvement would be allowing the users to just pass the callback function to the data display panes instead of solely an image or both an image and a callback.

Such would reduce a bit of redundant typing when the user specifies a function call to the callback to generate the first image anyways.

Example:

def callback(*args, **kwargs):
        return some_image

ip = ImagePane(callback(), callback)

=>

ip = ImagePane(callback)
seantronsen commented 6 months ago

Implemented in commit: https://github.com/seantronsen/qtviewer/commit/0656fa531f0f57946a15061fa4b221f47200b9a7

seantronsen commented 6 months ago

Closing.