def __init__(self): super(BatchProcessing_GUI, self).__init__() self.mask_files_dir = '' self.results_dir = '' self.videos_dir = '' self.tmp_dir_root = '' self.analysis_checkpoints = [] self.ui = Ui_BatchProcessing() self.ui.setupUi(self) # for the moment this option is more confusing that helpful so we hide it self.ui.p_unmet_requirements.hide() valid_options = dict(json_file=[''] + DFLT_PARAMS_FILES) self.mapper = ParamWidgetMapper( self.ui, #do not want to pass this values by reference default_param=proccess_args_dflt_r.copy(), info_param=proccess_args_info.copy(), valid_options=valid_options) self.ui.p_json_file.currentIndexChanged.connect( self.updateCheckpointsChange) self.ui.p_force_start_point.currentIndexChanged.connect( self.updateStartPointChange) self.updateCheckpointsChange() self.ui.checkBox_txtFileList.stateChanged.connect( self.enableTxtFileListButton) self.ui.checkBox_tmpDir.stateChanged.connect(self.enableTmpDirButton) self.ui.pushButton_txtFileList.clicked.connect(self.getTxtFileList) self.ui.pushButton_paramFile.clicked.connect(self.getParamFile) self.ui.pushButton_videosDir.clicked.connect(self.getVideosDir) self.ui.pushButton_masksDir.clicked.connect(self.getMasksDir) self.ui.pushButton_resultsDir.clicked.connect(self.getResultsDir) self.ui.pushButton_tmpDir.clicked.connect(self.getTmpDir) self.ui.pushButton_start.clicked.connect(self.startAnalysis) self.ui.checkBox_tmpDir.setChecked(False) self.enableTxtFileListButton() self.ui.checkBox_tmpDir.setChecked(True) self.enableTmpDirButton() LineEditDragDrop(self.ui.p_videos_list, self.updateTxtFileList, os.path.isfile) LineEditDragDrop(self.ui.p_video_dir_root, self.updateVideosDir, os.path.isdir) LineEditDragDrop(self.ui.p_mask_dir_root, self.updateMasksDir, os.path.isdir) LineEditDragDrop(self.ui.p_results_dir_root, self.updateResultsDir, os.path.isdir) LineEditDragDrop(self.ui.p_tmp_dir_root, self.updateTmpDir, os.path.isdir) LineEditDragDrop(self.ui.p_json_file, self.updateParamFile, os.path.isfile)
def __init__(self): super().__init__() self.ui = Ui_Summarizer() self.ui.setupUi(self) self.mapper = ParamWidgetMapper(self.ui, default_param=summarizer_args_dflt, info_param=summarizer_args_info, valid_options=summarizer_valid_options) self.ui.pushButton_start.clicked.connect(self.startAnalysis) self.ui.pushButton_rootdir.clicked.connect(self.getRootDir) self.ui.p_summary_type.currentIndexChanged.connect(self.viewFoldArgs) LineEditDragDrop(self.ui.p_root_dir, self.updateRootDir, os.path.isdir) self.viewFoldArgs()
def __init__(self, default_videos_dir='', scripts_dir=''): self.json_file = '' self.json_param = default_param.copy() super().__init__() # Set up the user interface from Designer. self.ui = Ui_GetMaskParams() self.ui.setupUi(self) self._link_slider_spinbox() self.mapper = ParamWidgetMapper(self.ui) self.ui.pushButton_saveParam.clicked.connect(self.saveParamFile) self.ui.pushButton_paramFile.clicked.connect(self.getParamFile) LineEditDragDrop(self.ui.lineEdit_paramFile, self.updateParamFile, os.path.isfile) self.ui.pushButton_moreParams.clicked.connect(self.getMoreParams)