Open windwhim opened 4 months ago
Wonderful idea! But you don't need to add an extra self.filenames to record the inde of the file you can just use the pyqt api. Like:
def setClean(self):
self.dirty = False
self.actions.save.setEnabled(False)
self.actions.createMode.setEnabled(True)
self.actions.createRectangleMode.setEnabled(True)
self.actions.createCircleMode.setEnabled(True)
self.actions.createLineMode.setEnabled(True)
self.actions.createPointMode.setEnabled(True)
self.actions.createLineStripMode.setEnabled(True)
self.actions.createAiPolygonMode.setEnabled(True)
self.actions.createAiMaskMode.setEnabled(True)
title = __appname__
if self.filename is not None:
# extra 添加文件进度
file_index = self.fileListWidget.currentRow()
title = f"{title} - {self.filename} ({file_index + 1}/{self.fileListWidget.count()})"
# extra end
self.setWindowTitle(title)
if self.hasLabelFile():
self.actions.deleteFile.setEnabled(True)
else:
self.actions.deleteFile.setEnabled(False)
这样代码更加优雅了
Added instructions on current progress and total number of items.