def create_form(self, tiseanCommandConfig, controller): #Input and Output Widgets if (tiseanCommandConfig.has_input()): inputWidget = TiseanFileWidget('', 'Input Filename') inputWidget.set_required() outputWidget = TiseanFileWidget('-o', 'Output Filename') parameters = tiseanCommandConfig.get_parameters() parameterWidgets = [] if (tiseanCommandConfig.has_input()): parameterWidgets.append(inputWidget) parameterWidgets.append(outputWidget) for key in parameters: #we get every parameter configuration parameterConfig = parameters[key] widget = self.create_parameter_widget(parameterConfig) parameterWidgets.append(widget) form = TiseanCommandForm(tiseanCommandConfig.get_name(), parameterWidgets, controller) return form
def build_widget(self, parameterConfig): widget = TiseanFileWidget(parameterConfig.get_value(), parameterConfig.get_name()) if (parameterConfig.is_required()): widget.set_required() return widget
def create_form(self,tiseanCommandConfig,controller): #Input and Output Widgets if (tiseanCommandConfig.has_input()): inputWidget = TiseanFileWidget('','Input Filename') inputWidget.set_required() outputWidget = TiseanFileWidget('-o','Output Filename') parameters = tiseanCommandConfig.get_parameters() parameterWidgets = [] if (tiseanCommandConfig.has_input()): parameterWidgets.append(inputWidget) parameterWidgets.append(outputWidget) for key in parameters: #we get every parameter configuration parameterConfig = parameters[key] widget = self.create_parameter_widget(parameterConfig) parameterWidgets.append(widget) form = TiseanCommandForm(tiseanCommandConfig.get_name(),parameterWidgets,controller) return form
def build_widget(self,parameterConfig): widget = TiseanFileWidget(parameterConfig.get_value(),parameterConfig.get_name()) if (parameterConfig.is_required()): widget.set_required() return widget