eric6/MicroPython/MicroPythonDevices.py

changeset 8259
2bbec88047dd
parent 8222
5994b80b8760
child 8461
d9fb4a0f2460
equal deleted inserted replaced
8258:82b608e352ec 8259:2bbec88047dd
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)

eric ide

mercurial