def addPhotoSeries(self, series): if self._preloadPixmap is None: self._preloadPixmap = ImageOperations.buildPreloadPixmap( Config.asQSize("allSeriesView", "pixmapSize", QSize(320, 240))) row = self.numberOfSeries() self.seriesUuidToRow[series.uuid] = row for col in range(len(series.photoItems)): try: photoItemWidget = PhotoItemWidget( series[col], preloadPixmap=self._preloadPixmap, addons=Config.get_or("allSeriesView", "enabledAddons", [])) except CannotReadImageException as e: print("TODO: cannot load image exception " + str(e)) else: photoItemWidget.openInSeries.connect(self.openInSeries) self._grid.addWidget(photoItemWidget, row, col) series[col].loadPhoto( Config.asQSize("allSeriesView", "pixmapSize", QSize(320, 240)), photoItemWidget.setImagePixmap)
def _getPreloadPixmap(self): if self._preloadPixmap is None: self._preloadPixmap = ImageOperations.buildPreloadPixmap( Config.asQSize('seriesView', 'maxPixmapSize', QSize(1920, 1080))) return self._preloadPixmap