GRASS Programmer's Manual
6.4.2(2012)
|
This class holds the structures needed for filling by the parser. More...
Public Member Functions | |
def | __init__ |
def | define_first |
Define first parameter. | |
def | get_error_msg |
Get error message ('' for no error) | |
def | get_name |
Get task name. | |
def | get_description |
Get module's description. | |
def | get_keywords |
Get module's keywords. | |
def | get_list_params |
Get list of parameters. | |
def | get_list_flags |
Get list of flags. | |
def | get_param |
Find and return a param by name. | |
def | get_flag |
Find and return a flag by name. | |
def | getCmdError |
Get error string produced by getCmd(ignoreErrors = False) | |
def | getCmd |
Produce an array of command name and arguments for feeding into some execve-like command processor. | |
def | get_options |
Get options. | |
def | has_required |
Check if command has at least one required paramater. | |
def | set_param |
Set param value/values. | |
def | set_flag |
Enable / disable flag. | |
def | set_options |
Set flags and parameters. | |
Data Fields | |
path | |
name | |
params | |
description | |
label | |
flags | |
keywords | |
errorMsg | |
firstParam | |
blackList |
This class holds the structures needed for filling by the parser.
Parameter blackList is a dictionary with fixed structure, eg.
blackList = {'items' : {'d.legend' : { 'flags' : ['m'], 'params' : [] }}, 'enabled': True}
path | full path |
blackList | hide some options in the GUI (dictionary) |
def python.task.grassTask.__init__ | ( | self, | |
path = None , |
|||
blackList = None |
|||
) |
def python.task.grassTask.define_first | ( | self | ) |
Define first parameter.
Definition at line 74 of file task.py.
References python.task.grassTask.firstParam, python.task.grassTask.params, gui_modules.histogram.HistFrame.params, and gui_modules.gmodeler.ModelParamDialog.params.
def python.task.grassTask.get_description | ( | self, | |
full = True |
|||
) |
Get module's description.
full | True for label + desc |
Definition at line 90 of file task.py.
References python.task.grassTask.description, icons.icon.MetaIcon.description, gui_modules.menuform.mainFrame.description, python.task.grassTask.label, gui_modules.gdialogs.ElementDialog.label, and icons.icon.MetaIcon.label.
def python.task.grassTask.get_error_msg | ( | self | ) |
Get error message ('' for no error)
Definition at line 80 of file task.py.
References python.task.grassTask.errorMsg.
def python.task.grassTask.get_flag | ( | self, | |
aFlag | |||
) |
Find and return a flag by name.
Raises ValueError when the flag is not found.
aFlag | name of the flag |
Definition at line 160 of file task.py.
References python.task.grassTask.flags.
Referenced by python.task.grassTask.set_flag().
def python.task.grassTask.get_keywords | ( | self | ) |
Get module's keywords.
Definition at line 103 of file task.py.
References python.task.grassTask.keywords.
def python.task.grassTask.get_list_flags | ( | self, | |
element = 'name' |
|||
) |
Get list of flags.
element | element name |
Definition at line 119 of file task.py.
References python.task.grassTask.flags.
def python.task.grassTask.get_list_params | ( | self, | |
element = 'name' |
|||
) |
Get list of parameters.
element | element name |
Definition at line 108 of file task.py.
References python.task.grassTask.params, gui_modules.histogram.HistFrame.params, and gui_modules.gmodeler.ModelParamDialog.params.
def python.task.grassTask.get_name | ( | self | ) |
Get task name.
Definition at line 85 of file task.py.
References @1.name, locale.name, _item_.name, ellps_list.name, _pad_.name, COLUMN.name, datum_list.name, table.name, paper.name, python.task.grassTask.name, fileinfo.name, gui_modules.render.Layer.name, gui_modules.gdialogs.DecorationDialog.name, gui_modules.gmodeler.PropertiesDialog.name, and gui_modules.gmodeler.VariablePanel.name.
def python.task.grassTask.get_options | ( | self | ) |
Get options.
Definition at line 230 of file task.py.
References python.task.grassTask.flags, python.task.grassTask.params, gui_modules.histogram.HistFrame.params, and gui_modules.gmodeler.ModelParamDialog.params.
def python.task.grassTask.get_param | ( | self, | |
value, | |||
element = 'name' , |
|||
raiseError = True |
|||
) |
Find and return a param by name.
value | param's value |
element | element name |
raiseError | True for raise on error |
Definition at line 130 of file task.py.
References python.task.grassTask.params, gui_modules.histogram.HistFrame.params, gui_modules.gmodeler.ModelParamDialog.params, and gui_modules::psmap_dialogs.type.
Referenced by python.task.grassTask.set_param().
def python.task.grassTask.getCmd | ( | self, | |
ignoreErrors = False , |
|||
ignoreRequired = False |
|||
) |
Produce an array of command name and arguments for feeding into some execve-like command processor.
ignoreErrors | True to return whatever has been built so far, even though it would not be a correct command for GRASS |
ignoreRequired | True to ignore required flags, otherwise '<required>' is shown |
Definition at line 194 of file task.py.
References python.task.grassTask.flags, python.task.grassTask.getCmdError(), @1.name, locale.name, _item_.name, ellps_list.name, _pad_.name, COLUMN.name, datum_list.name, table.name, paper.name, python.task.grassTask.name, fileinfo.name, gui_modules.render.Layer.name, gui_modules.gdialogs.DecorationDialog.name, gui_modules.gmodeler.PropertiesDialog.name, gui_modules.gmodeler.VariablePanel.name, python.task.grassTask.params, gui_modules.histogram.HistFrame.params, and gui_modules.gmodeler.ModelParamDialog.params.
def python.task.grassTask.getCmdError | ( | self | ) |
Get error string produced by getCmd(ignoreErrors = False)
Definition at line 172 of file task.py.
References python.task.grassTask.flags, python.task.grassTask.params, gui_modules.histogram.HistFrame.params, and gui_modules.gmodeler.ModelParamDialog.params.
Referenced by python.task.grassTask.getCmd().
def python.task.grassTask.has_required | ( | self | ) |
Check if command has at least one required paramater.
Definition at line 236 of file task.py.
References python.task.grassTask.params, gui_modules.histogram.HistFrame.params, and gui_modules.gmodeler.ModelParamDialog.params.
def python.task.grassTask.set_flag | ( | self, | |
aFlag, | |||
aValue, | |||
element = 'value' |
|||
) |
Enable / disable flag.
Definition at line 255 of file task.py.
References python.task.grassTask.get_flag().
Referenced by python.task.grassTask.set_options().
def python.task.grassTask.set_options | ( | self, | |
opts | |||
) |
Set flags and parameters.
opts | list of flags and parameters |
Definition at line 265 of file task.py.
References python.task.grassTask.set_flag(), and python.task.grassTask.set_param().
def python.task.grassTask.set_param | ( | self, | |
aParam, | |||
aValue, | |||
element = 'value' |
|||
) |
Set param value/values.
Definition at line 245 of file task.py.
References python.task.grassTask.get_param().
Referenced by python.task.grassTask.set_options().
Definition at line 50 of file task.py.
Referenced by python.task.grassTask.get_description().
Definition at line 50 of file task.py.
Referenced by python.task.grassTask.get_error_msg().
Definition at line 50 of file task.py.
Referenced by python.task.grassTask.define_first().
Definition at line 50 of file task.py.
Referenced by python.task.grassTask.get_flag(), python.task.grassTask.get_list_flags(), python.task.grassTask.get_options(), python.task.grassTask.getCmd(), and python.task.grassTask.getCmdError().
Definition at line 50 of file task.py.
Referenced by python.task.grassTask.get_keywords().
Definition at line 50 of file task.py.
Referenced by python.task.grassTask.get_description().
Definition at line 50 of file task.py.
Referenced by python.task.grassTask.get_name(), python.task.grassTask.getCmd(), and gui_modules.render.MapLayer.GetMapset().
Definition at line 50 of file task.py.
Referenced by python.task.grassTask.define_first(), python.task.grassTask.get_list_params(), python.task.grassTask.get_options(), python.task.grassTask.get_param(), python.task.grassTask.getCmd(), python.task.grassTask.getCmdError(), gui_modules.mapdisp.MapFrame.GetOptData(), and python.task.grassTask.has_required().