def loadDefaultBackgrounds(self): # Bilder aus Ordner laden folderPath = self._getBackgroundPathCreateFolderIfNotExtist() picturePaths = FileFolderService.getFolderContentPictures(folderPath) FileFolderService.removeIfExist(self._getTempPath()) FileFolderService.createFolderIfNotExist(self._getTempPath()) backgrounds = [] for picturePath in picturePaths: backgrounds.append(self._loadBackgroundImages(picturePath,False)) self.globalVariable.setDefaultBackground(backgrounds)
def _getPicturesByPath(self, picturesPath: str, pictureConfig: PicturesConfig, framePath: str): pictures = [] for picturePath in FileFolderService.getFolderContentPictures( picturesPath): picture = Picture(picturePath, pictureConfig) if framePath != None: picture.setFramePath(framePath) pictures.append(picture) return pictures