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 |