417 @param treeWidget reference to the tree widget to be checked against |
417 @param treeWidget reference to the tree widget to be checked against |
418 @return flag indicating that the file name is present |
418 @return flag indicating that the file name is present |
419 @rtype bool |
419 @rtype bool |
420 """ |
420 """ |
421 itemCount = treeWidget.topLevelItemCount() |
421 itemCount = treeWidget.topLevelItemCount() |
422 if itemCount: |
422 return ( |
423 for row in range(itemCount): |
423 itemCount > 0 and |
424 if treeWidget.topLevelItem(row).text(0) == filename: |
424 any(treeWidget.topLevelItem(row).text(0) == filename |
425 return True |
425 for row in range(itemCount)) |
426 |
426 ) |
427 return False |
|
428 |
427 |
429 @pyqtSlot() |
428 @pyqtSlot() |
430 def on_putButton_clicked(self, putAs=False): |
429 def on_putButton_clicked(self, putAs=False): |
431 """ |
430 """ |
432 Private slot to copy the selected file to the connected device. |
431 Private slot to copy the selected file to the connected device. |