def disableNextButton(self): if((CameraService.existPiCamera() or CameraService.existCameras()) and self.hasPageTitlePicturePictures() and self.hasPageCapturePhotoLastPicture() and self.hasPageCapturePhotoLoadungGifs()): self.nextButton.setDisabled(False) else: self.nextButton.setDisabled(True)
def setHints(self): self.textArea.clear() self.textArea.append(textValue[TextKey.PAGE_HINTS_ESCAPE_HINT]) self.textArea.append("") self.textArea.append(textValue[TextKey.PAGE_HINTS_RECONFIG_HINT]) self.textArea.append("") if not CameraService.existCameras() and not CameraService.existPiCamera(): self.textArea.append(textValue[TextKey.PAGE_HINTS_NO_CAMERA_WARN]) self.textArea.append("") elif not CameraService.existSelectedCamera() and not CameraService.existPiCamera(): self.textArea.append(textValue[TextKey.PAGE_HINTS_NO_SELECTED_CAMERA_WARN]) self.textArea.append("") #Erfolgsfaelle########################################################################### elif CameraService.existPiCamera(): cameraInfoText = textValue[TextKey.PAGE_HINTS_SELECTED_PICAMERA_HINT] self.textArea.append(cameraInfoText) self.textArea.append("") else: cameraInfoText = textValue[TextKey.PAGE_HINTS_SELECTED_CAMERA_HINT] % (str(CameraService.getCameraIndex()),CameraService.getCameraName(), CameraService.getCameraDescription()) self.textArea.append(cameraInfoText) self.textArea.append("") if not FileFolderService.hasFolderContent(CfgService.get(CfgKey.PAGE_TITLEPICTURE_BUTTON_IMAGE_FOLDER)): warn = textValue[TextKey.PAGE_HINTS_NO_PICTURES_FOUND_WARN] % (CfgService.get(CfgKey.PAGE_TITLEPICTURE_BUTTON_IMAGE_FOLDER)) self.textArea.append(warn) self.textArea.append("") if not FileFolderService.hasFolderContent(CfgService.get(CfgKey.PAGE_CAPTUREPHOTO_LAST_IMAGE_FOLDER)): warn = textValue[TextKey.PAGE_HINTS_NO_PICTURES_FOUND_WARN] % (CfgService.get(CfgKey.PAGE_CAPTUREPHOTO_LAST_IMAGE_FOLDER)) self.textArea.append(warn) self.textArea.append("") if not FileFolderService.hasFolderContent(CfgService.get(CfgKey.PAGE_CAPTUREPHOTO_LOADING_GIF_FOLDER)): warn = textValue[TextKey.PAGE_HINTS_NO_PICTURES_FOUND_WARN] % (CfgService.get(CfgKey.PAGE_CAPTUREPHOTO_LOADING_GIF_FOLDER)) self.textArea.append(warn) self.textArea.append("") #Printer hint self.textArea.append(textValue[TextKey.PAGE_HINTS_PRINTER_STATUS_LABEL]+self.printerService.getPrinterStatus())