Exemplo n.º 1
0
    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
Exemplo n.º 2
0
    def build_widget(self, parameterConfig):

        widget = TiseanFileWidget(parameterConfig.get_value(),
                                  parameterConfig.get_name())
        if (parameterConfig.is_required()):
            widget.set_required()
        return widget
Exemplo n.º 3
0
	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
Exemplo n.º 4
0
	def build_widget(self,parameterConfig):
		
		widget = TiseanFileWidget(parameterConfig.get_value(),parameterConfig.get_name())
		if (parameterConfig.is_required()):
			widget.set_required()
		return widget