Closed teddyrendahl closed 5 years ago
Merging #85 into master will increase coverage by
0.53%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #85 +/- ##
==========================================
+ Coverage 89.3% 89.84% +0.53%
==========================================
Files 7 7
Lines 505 512 +7
==========================================
+ Hits 451 460 +9
+ Misses 54 52 -2
Impacted Files | Coverage Δ | |
---|---|---|
lightpath/ui/widgets.py | 92.63% <100%> (+2.85%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update c8f173c...1b3b90d. Read the comment docs.
@ZLLentz I agree the extensibility of QtAwesome
or lack thereof maybe in an issue. I imagine we could make a standard wrapper function that looks for a special prefix and loads the QIcon
for PCDS specific stuff.
I would like a non-box for the reflaser. There is the "certificate" icon (sort of sun-like), the asterisk (it's vaguely close to a laser icon, except for the one long "leg" that the laser symbol has), an eye (as in: here you get beam you can actually look at).
Description
Having all the devices be represented as squares is not ideal. Operators want to quickly scan the beamline and having to read long aliases or PV prefixes is mentally exhausting. Due to issues with
PyDMDrawing
I've opted to use icons from theQFontAwesome
library. This package is available onconda-forge
, adds no additional dependencies to my developmentConda
environment and comes pre-packaged with the free versions of Elusive Icons and FontAwesome icon sets.The tricky part is actually mapping which devices we want to show up with which symbols. We can't do a direct class lookup because special subclasses and factories will be difficult (e.g I don't want to but every
Attenuator
class in the dictionary). Also, importing a ton of devices just to make a dictionary is not worth the maintenance cost. Instead, I would like to attach an_icon
class variable to all of ourpcdsdevices
classes. These will be just be strings that have the pattern"{source}.{icon_name}"
. This has the benefit of:Motivation and Context
Closes #77
How Has This Been Tested?
Added a test for grabbing icons. Demo version has all unique icons now as well.
Where Has This Been Documented
Docstrings for functions
Screenshots (if appropriate):