Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common API: Events / callbacks #8

Open
campagnola opened this issue Jan 27, 2020 · 3 comments
Open

Common API: Events / callbacks #8

campagnola opened this issue Jan 27, 2020 · 3 comments

Comments

@campagnola
Copy link
Contributor

How should we handle event-driven behaviors in the common API? In acq4, I used Qt's signal/slots for this, but I don't think that would be a good choice for this project. In vispy, we created a simple event/callback system (https://github.com/vispy/vispy/blob/master/vispy/util/event.py). There are also other (more common) event frameworks that we could draw from.

@nvladimus
Copy link
Contributor

Why is signal/slot not a good choice?

@campagnola
Copy link
Contributor Author

Embedded in an application that already uses Qt, signal/slot is a great choice. But if we're going for a library that can be shared by many different projects, then we should probably not have Qt as a low-level dependency. My current feeling is that basic callbacks should be sufficient at the level of the individual device classes, and that we could also have an add-on event driven layer that makes use of Qt or similar.

@nvladimus
Copy link
Contributor

OK, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants