270 @type bool |
270 @type bool |
271 @return icon for the board (iconFormat == True) or |
271 @return icon for the board (iconFormat == True) or |
272 a pixmap (iconFormat == False) |
272 a pixmap (iconFormat == False) |
273 @rtype QIcon or QPixmap |
273 @rtype QIcon or QPixmap |
274 """ |
274 """ |
275 if boardName in SupportedBoards: |
275 iconName = ( |
276 iconName = SupportedBoards[boardName]["icon"] |
276 SupportedBoards[boardName]["icon"] |
277 else: |
277 if boardName in SupportedBoards else |
278 # return a generic MicroPython icon |
278 # return a generic MicroPython icon |
279 iconName = "micropython48" |
279 "micropython48" |
|
280 ) |
280 |
281 |
281 if iconFormat: |
282 if iconFormat: |
282 return UI.PixmapCache.getIcon(iconName) |
283 return UI.PixmapCache.getIcon(iconName) |
283 else: |
284 else: |
284 return UI.PixmapCache.getPixmap(iconName) |
285 return UI.PixmapCache.getPixmap(iconName) |