MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_entry

Method set_entry

tools/triage_tests.py:158–176  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

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(

Callers 4

__init__Method · 0.95
accept_testMethod · 0.95
reject_testMethod · 0.95
keyPressEventMethod · 0.95

Calls 3

set_large_imageMethod · 0.95
sizeMethod · 0.80
scaledMethod · 0.45

Tested by

no test coverage detected