src/eric7/EricWidgets/EricIconBar.py

branch
eric7
changeset 10500
40fc136e7002
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10499:71208bcc7d99 10500:40fc136e7002
340 elif index < self.__currentIndex: 340 elif index < self.__currentIndex:
341 self.setCurrentIndex(self.__currentIndex - 1) 341 self.setCurrentIndex(self.__currentIndex - 1)
342 342
343 self.__adjustIconLabels() 343 self.__adjustIconLabels()
344 344
345 def setIcon(self, index, icon):
346 """
347 Public method to set the icon at the given index.
348
349 @param index icon index
350 @type int
351 @param icon reference to the icon
352 @type QIcon
353 """
354 labelItem = self.__layout.itemAt(index)
355 if labelItem:
356 labelItem.widget().setPixmap(icon.pixmap(self.__barSize, self.__barSize))
357
345 @pyqtSlot() 358 @pyqtSlot()
346 def __iconClicked(self, label): 359 def __iconClicked(self, label):
347 """ 360 """
348 Private slot to handle an icon been clicked. 361 Private slot to handle an icon been clicked.
349 362

eric ide

mercurial