(self, index)
| 156 | self.set_entry(0) |
| 157 | |
| 158 | def set_entry(self, index): |
| 159 | if self.current_entry == index: |
| 160 | return |
| 161 | |
| 162 | self.current_entry = index |
| 163 | entry = self.entries[index] |
| 164 | |
| 165 | self.pixmaps = [] |
| 166 | for fname, thumbnail in zip(entry.thumbnails, self.thumbnails): |
| 167 | pixmap = QtGui.QPixmap(os.fspath(fname)) |
| 168 | scaled_pixmap = pixmap.scaled( |
| 169 | thumbnail.size(), |
| 170 | QtCore.Qt.AspectRatioMode.KeepAspectRatio, |
| 171 | QtCore.Qt.TransformationMode.SmoothTransformation) |
| 172 | thumbnail.image.setPixmap(scaled_pixmap) |
| 173 | self.pixmaps.append(scaled_pixmap) |
| 174 | |
| 175 | self.set_large_image(0) |
| 176 | self.filelist.setCurrentRow(self.current_entry) |
| 177 | |
| 178 | def set_large_image(self, index): |
| 179 | self.thumbnails[self.current_thumbnail].setFrameShape( |
no test coverage detected