gemseo_template_editor_gui

GUI for edition of templates for inputs and outputs files.

To be used by :class: .DiscFromExe Run this file with no argument to open the GUI

class gemseo_template_editor_gui.QtTemplateEditor(*args, **kwargs)[source]

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.

Parameters:
  • in_sep (str) –

    The separator name for the input tag.

    By default it is set to “GEMSEO_INPUT”.

  • out_sep (str) –

    The separator name for the output tag.

    By default it is set to “GEMSEO_OUTPUT”.

add_action(name, status_tip, shortcut, connect)[source]

Add an action with a button and icon.

Parameters:
  • name (str) – The name of the action.

  • status_tip (Any) – The tip for the user to browse with the mouse.

  • shortcut (Any) – The keyboard shortcut (Ctrl+S) for instance.

  • connect (Any) – The method to call at trigger.

Return type:

PySide6.QtGui.QAction

highlight(sep, color='red')[source]

Highlight some text.

Parameters:
  • sep (str) – The regex that validates the text to highlight.

  • color (QColor | str) –

    The color to be used.

    By default it is set to “red”.

Return type:

None

make_input()[source]

Make an input from the selected data.

Return type:

None

make_output()[source]

Make an output from the selected data.

Return type:

None

open_doc()[source]

Open the document for edition of the template.

Return type:

None

save_doc()[source]

Save the template to a file.

Return type:

None

gemseo_template_editor_gui.main()[source]

Entry point.

Return type:

None