> I thought that I saw an example of conditional image rendering somewhere in the codebase but it eludes me at the moment. Know of any?
Probably this: https://github.com/mixxxdj/mixxx/blob/0d89ecbdaaa1a785665fe5791222fa3ef8dd4467/src/widget/wpixmapstore.cpp
----
> I'm wondering if getIcon() should be abstracted a level up ...
Yes, good idea. But the Icon name should be still set inside the specific feature (child class)
What about a LibraryFeature::getIcon()
And a virtual RecordingFeature::getIconName()
Pseudo code: LibraryFeature::getIcon() { Name = getIconName() icon = Look up in skin if nothing found { icon = Lookup from resources }
> I thought that I saw an example of conditional image rendering somewhere in the codebase but it eludes me at the moment. Know of any?
Probably this: /github. com/mixxxdj/ mixxx/blob/ 0d89ecbdaaa1a78 5665fe5791222fa 3ef8dd4467/ src/widget/ wpixmapstore. cpp
https:/
----
> I'm wondering if getIcon() should be abstracted a level up ...
Yes, good idea. But the Icon name should be still set inside the specific feature (child class)
What about a :getIcon( )
LibraryFeature:
And a virtual RecordingFeatur e::getIconName( )
Pseudo code: :getIcon( ) {
LibraryFeature:
Name = getIconName()
icon = Look up in skin
if nothing found {
icon = Lookup from resources
}