-
Notifications
You must be signed in to change notification settings - Fork 77
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
Basic version of multi-state LED indicator widget #1044
Basic version of multi-state LED indicator widget #1044
Conversation
I think since this is a new widget, it will be need to be included in the documentation |
|
||
# color state setters/getters | ||
@Property(QColor) | ||
def state0Color(self) -> QColor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A random thought, for your consideration...
Seeing this sort of stuff makes me wonder if having a channelValue
Qt property that mirrors the current value of the channel might be something to explore.
I mention that because you can use Qt stylesheets / qss to have property selectors and change any bit of styling as you please, rather than just being limited to color (even if that is technically sufficient for what's being asked here).
So you could imagine:
PyDMMultiStateIndicator[currentValue="1"] #something {
qproperty-penColor: black;
qproperty-setsomething: foobar;
}
We use this method in our vacuum screen widgets, by the way (ref)
…t value of widget's connected channel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, works as expected, controllable via designer, code, and stylesheet
Add basic version of widget.
could expand out later with:
-submenu for easier selection of state colors
-options for rendering different shapes/visual
-accepting >1 PVs
-allow configurable # states besides just 16