template_grammar_editor module¶
GUI for edition of templates for inputs and outputs files
To be used by DiscFromExe
Run this file with no argument to open the GUI
-
class
gemseo.wrappers.template_grammar_editor.
QtTemplateEditor
(in_sep='GEMSEO_INPUT', out_sep='GEMSEO_OUTPUT')[source]¶ Bases:
PySide2.QtWidgets.QMainWindow
GUI template generator.
GUI to generate templates for input and output files edition Input text file data is replaced by a mark that specifies where to read the data. idem for outputs. Works with any text file format.
To open the GUI, run this python file
Example, for an input json file : { “a”: 1.01515112125, “b”: 2.00151511213, “c”: 3.00151511213 }
Generates a template : { “a”: GEMSEO_INPUT{a::1.0}, “b”: GEMSEO_INPUT{b::2.0}, “c”: GEMSEO_INPUT{c::3.0} }
Same for outputs.
Constructor :
- Parameters
in_sep – separator name for the input tag, default GEMSEO_INPUT
out_sep – separator name for the output tag, default GEMSEO_OUTPUT
-
add_action
(name, status_tip, shortcut, connect)[source]¶ Add an action with a button and icon.
- Parameters
name – name of the action
status_tip – tip for the user to browse with the mouse
shortcut – keyboard shortcut (Ctrl+S) for instance
connect – method to call at trigger
-
hightlight
(sep, color='red')[source]¶ Highight some text.
- Parameters
sep – the regex that validates the text to highlight
color – the color to be used
-
staticMetaObject
= <PySide2.QtCore.QMetaObject object>¶