Automatic wrapper for executables with Graphical User Interface¶
The DiscFromExe wrapper¶
This section describes how to use DiscFromExe
.
The input and output template files can be edited using the dedicated GUI, see next section.
- class gemseo.wrappers.disc_from_exe.DiscFromExe(input_template, output_template, output_folder_basepath, executable_command, input_filename, output_filename, folders_iter=FoldersIter.NUMBERED, name=None, parse_outfile_method=Parsers.TEMPLATE_PARSER, write_input_file_method=None, parse_out_separator='=', use_shell=True)[source]
Generic wrapper for executables.
The DiscFromExe is a generic wrapper for executables. It generates a MDODiscipline from an executable and in inputs/output files wrappers. The input and output files are described by templates. The templates can be generated by executing the module
template_grammar_editor
to open a GUI.It requires the creation of templates for input and output file, for instance, from the following input JSON file:
{ "a": 1.01515112125, "b": 2.00151511213, "c": 3.00151511213 }
A template that declares the inputs must be generated under this format, where “a” is the name of the input, and “1.0” is the default input. GEMSEO_INPUT declares an input, GEMSEO_OUTPUT declares an output, similarly.
{ "a": GEMSEO_INPUT{a::1.0}, "b": GEMSEO_INPUT{b::2.0}, "c": GEMSEO_INPUT{c::3.0} }
The current limitations are
Only one input and one output file, otherwise, inherit from this class and modify the parsers. Only limited input writing and output parser strategies are implemented. To change that, you can pass custom parsing and writing methods to the constructor.
The only limitation in the current file format is that it must be a plain text file and not a binary file. In this case, the way of interfacing it is to provide a specific parser to the DiscFromExe, with the write_input_file_method and parse_outfile_method arguments of the constructor.
- Parameters
input_template (str) – The path to the input file template. The input locations in the file are marked by GEMSEO_INPUT{input_name::1.0}, where “input_name” is the input name, and 1.0 is here the default input.
output_template (str) – The path to the output file template. The input locations in the file are marked by GEMSEO_OUTPUT{output_name::1.0}, where “output_name” is the input name.
output_folder_basepath (str) – The description is missing.
executable_command (str) – The command to run the executable. Will be called through a system call. Example: “python myscript.py -i input.txt -o output.txt
input_filename (str) – The name of the input file. This will determine the name of the input file generated in the output folder. Example “input.txt”.
output_filename (str) – The name of the output file. This will determine the name of the output file generated in the output folder. Example “output.txt”.
(Union[str (folders_iter) – The type of unique identifiers for the output folders. If NUMBERED the generated output folders will be “output_folder_basepath”+str(i+1), where i is the maximum value of the already existing “output_folder_basepath”+str(i) folders. Otherwise, a unique number based on the UUID function is generated. This last option shall be used if multiple MDO processes are run in the same work directory.
FoldersIter] – The type of unique identifiers for the output folders. If NUMBERED the generated output folders will be “output_folder_basepath”+str(i+1), where i is the maximum value of the already existing “output_folder_basepath”+str(i) folders. Otherwise, a unique number based on the UUID function is generated. This last option shall be used if multiple MDO processes are run in the same work directory.
name (str | None) –
the name of the discipline. If None, use the class name.
By default it is set to None.
parse_outfile_method (str | Parsers) –
The optional method that can be provided by the user to parse the output file. To see the signature of the method, see the parse_outfile method of this file. If the KEY_VALUE_PARSER is used as output parser, specify the separator key (default : “=”).
By default it is set to TEMPLATE_PARSER.
write_input_file_method (str | None) –
The method to write the input file. If None, use these modules’ write_input_file. To see the signature of the method, see the write_input_file method of this file.
By default it is set to None.
parse_out_separator (str) –
The separator used for the output parser.
By default it is set to =.
use_shell (bool) –
If True, run the command using the default shell. Otherwise, run directly the command.
By default it is set to True.
folders_iter (str | FoldersIter) –
By default it is set to NUMBERED.
- Raises
TypeError – If the provided write_input_file_method is not callable.
- Return type
None
- classmethod activate_time_stamps()
Activate the time stamps.
For storing start and end times of execution and linearizations.
- Return type
None
- add_differentiated_inputs(inputs=None)
Add inputs against which to differentiate the outputs.
This method updates
MDODiscipline._differentiated_inputs
withinputs
.- Parameters
inputs (Iterable[str] | None) –
The input variables against which to differentiate the outputs. If None, all the inputs of the discipline are used.
By default it is set to None.
- Raises
ValueError – When the inputs wrt which differentiate the discipline are not inputs of the latter.
- Return type
None
- add_differentiated_outputs(outputs=None)
Add outputs to be differentiated.
This method updates
MDODiscipline._differentiated_outputs
withoutputs
.- Parameters
outputs (Iterable[str] | None) –
The output variables to be differentiated. If None, all the outputs of the discipline are used.
By default it is set to None.
- Raises
ValueError – When the outputs to differentiate are not discipline outputs.
- Return type
None
- add_namespace_to_input(name, namespace)
Add a namespace prefix to an existing input grammar element.
The updated input grammar element name will be
namespace``+:data:`~gemseo.core.namespaces.namespace_separator`+``name
.
- add_namespace_to_output(name, namespace)
Add a namespace prefix to an existing output grammar element.
The updated output grammar element name will be
namespace``+:data:`~gemseo.core.namespaces.namespace_separator`+``name
.
- add_status_observer(obs)
Add an observer for the status.
Add an observer for the status to be notified when self changes of status.
- Parameters
obs (Any) – The observer to add.
- Return type
None
- auto_get_grammar_file(is_input=True, name=None, comp_dir=None)
Use a naming convention to associate a grammar file to the discipline.
Search in the directory
comp_dir
for either an input grammar file namedname + "_input.json"
or an output grammar file namedname + "_output.json"
.- Parameters
is_input (bool) –
Whether to search for an input or output grammar file.
By default it is set to True.
name (str | None) –
The name to be searched in the file names. If
None
, use the name of the discipline class.By default it is set to None.
comp_dir (str | Path | None) –
The directory in which to search the grammar file. If None, use the
GRAMMAR_DIRECTORY
if any, or the directory of the discipline class module.By default it is set to None.
- Returns
The grammar file path.
- Return type
- check_input_data(input_data, raise_exception=True)
Check the input data validity.
- check_jacobian(input_data=None, derr_approx='finite_differences', step=1e-07, threshold=1e-08, linearization_mode='auto', inputs=None, outputs=None, parallel=False, n_processes=2, use_threading=False, wait_time_between_fork=0, auto_set_step=False, plot_result=False, file_path='jacobian_errors.pdf', show=False, fig_size_x=10, fig_size_y=10, reference_jacobian_path=None, save_reference_jacobian=False, indices=None)
Check if the analytical Jacobian is correct with respect to a reference one.
If reference_jacobian_path is not None and save_reference_jacobian is True, compute the reference Jacobian with the approximation method and save it in reference_jacobian_path.
If reference_jacobian_path is not None and save_reference_jacobian is False, do not compute the reference Jacobian but read it from reference_jacobian_path.
If reference_jacobian_path is None, compute the reference Jacobian without saving it.
- Parameters
input_data (dict[str, ndarray] | None) –
The input data needed to execute the discipline according to the discipline input grammar. If None, use the
MDODiscipline.default_inputs
.By default it is set to None.
derr_approx (str) –
The approximation method, either “complex_step” or “finite_differences”.
By default it is set to finite_differences.
threshold (float) –
The acceptance threshold for the Jacobian error.
By default it is set to 1e-08.
linearization_mode (str) –
the mode of linearization: direct, adjoint or automated switch depending on dimensions of inputs and outputs (Default value = ‘auto’)
By default it is set to auto.
inputs (Iterable[str] | None) –
The names of the inputs wrt which to differentiate the outputs.
By default it is set to None.
outputs (Iterable[str] | None) –
The names of the outputs to be differentiated.
By default it is set to None.
step (float) –
The differentiation step.
By default it is set to 1e-07.
parallel (bool) –
Whether to differentiate the discipline in parallel.
By default it is set to False.
n_processes (int) –
The maximum simultaneous number of threads, if
use_threading
is True, or processes otherwise, used to parallelize the execution.By default it is set to 2.
use_threading (bool) –
Whether to use threads instead of processes to parallelize the execution; multiprocessing will copy (serialize) all the disciplines, while threading will share all the memory This is important to note if you want to execute the same discipline multiple times, you shall use multiprocessing.
By default it is set to False.
wait_time_between_fork (float) –
The time waited between two forks of the process / thread.
By default it is set to 0.
auto_set_step (bool) –
Whether to compute the optimal step for a forward first order finite differences gradient approximation.
By default it is set to False.
plot_result (bool) –
Whether to plot the result of the validation (computed vs approximated Jacobians).
By default it is set to False.
file_path (str | Path) –
The path to the output file if
plot_result
isTrue
.By default it is set to jacobian_errors.pdf.
show (bool) –
Whether to open the figure.
By default it is set to False.
fig_size_x (float) –
The x-size of the figure in inches.
By default it is set to 10.
fig_size_y (float) –
The y-size of the figure in inches.
By default it is set to 10.
reference_jacobian_path (str | Path | None) –
The path of the reference Jacobian file.
By default it is set to None.
save_reference_jacobian (bool) –
Whether to save the reference Jacobian.
By default it is set to False.
indices (Iterable[int] | None) –
The indices of the inputs and outputs for the different sub-Jacobian matrices, formatted as
{variable_name: variable_components}
wherevariable_components
can be either an integer, e.g. 2 a sequence of integers, e.g. [0, 3], a slice, e.g. slice(0,3), the ellipsis symbol (…) or None, which is the same as ellipsis. If a variable name is missing, consider all its components. If None, consider all the components of all theinputs
andoutputs
.By default it is set to None.
- Returns
Whether the analytical Jacobian is correct with respect to the reference one.
- check_output_data(raise_exception=True)
Check the output data validity.
- Parameters
raise_exception (bool) –
Whether to raise an exception when the data is invalid.
By default it is set to True.
- Return type
None
- classmethod deactivate_time_stamps()
Deactivate the time stamps.
For storing start and end times of execution and linearizations.
- Return type
None
- static deserialize(file_path)
Deserialize a discipline from a file.
- Parameters
file_path (str | Path) – The path to the file containing the discipline.
- Returns
The discipline instance.
- Return type
- execute(input_data=None)
Execute the discipline.
This method executes the discipline:
Adds the default inputs to the
input_data
if some inputs are not defined in input_data but exist inMDODiscipline.default_inputs
.Checks whether the last execution of the discipline was called with identical inputs, i.e. cached in
MDODiscipline.cache
; if so, directly returnsself.cache.get_output_cache(inputs)
.Caches the inputs.
Checks the input data against
MDODiscipline.input_grammar
.If
MDODiscipline.data_processor
is not None, runs the preprocessor.Updates the status to
MDODiscipline.STATUS_RUNNING
.Calls the
MDODiscipline._run()
method, that shall be defined.If
MDODiscipline.data_processor
is not None, runs the postprocessor.Checks the output data.
Caches the outputs.
Updates the status to
MDODiscipline.STATUS_DONE
orMDODiscipline.STATUS_FAILED
.Updates summed execution time.
- Parameters
input_data (Mapping[str, Any] | None) –
The input data needed to execute the discipline according to the discipline input grammar. If None, use the
MDODiscipline.default_inputs
.By default it is set to None.
- Returns
The discipline local data after execution.
- Raises
RuntimeError – When residual_variables are declared but self.run_solves_residuals is False. This is not suported yet.
- Return type
- generate_uid()[source]
Generate a unique identifier for the execution directory.
Generate a unique identifier for the current execution. If the folders_iter strategy is NUMBERED, the successive iterations are named by an integer 1, 2, 3 etc. This is multiprocess safe. Otherwise, a unique number based on the UUID function is generated. This last option shall be used if multiple MDO processes are runned in the same workdir.
- Returns
An unique string identifier (either a number or a UUID).
- Return type
- get_all_inputs()
Return the local input data as a list.
The order is given by
MDODiscipline.get_input_data_names()
.
- get_all_outputs()
Return the local output data as a list.
The order is given by
MDODiscipline.get_output_data_names()
.
- get_attributes_to_serialize()
Define the names of the attributes to be serialized.
Shall be overloaded by disciplines
- static get_data_list_from_dict(keys, data_dict)
Filter the dict from a list of keys or a single key.
If keys is a string, then the method return the value associated to the key. If keys is a list of strings, then the method returns a generator of value corresponding to the keys which can be iterated.
- get_disciplines_in_dataflow_chain()
Return the disciplines that must be shown as blocks within the XDSM representation of a chain.
By default, only the discipline itself is shown. This function can be differently implemented for any type of inherited discipline.
- Returns
The disciplines shown in the XDSM chain.
- Return type
- get_expected_dataflow()
Return the expected data exchange sequence.
This method is used for the XDSM representation.
The default expected data exchange sequence is an empty list.
See also
MDOFormulation.get_expected_dataflow
- Returns
The data exchange arcs.
- Return type
list[tuple[gemseo.core.discipline.MDODiscipline, gemseo.core.discipline.MDODiscipline, list[str]]]
- get_expected_workflow()
Return the expected execution sequence.
This method is used for the XDSM representation.
The default expected execution sequence is the execution of the discipline itself.
See also
MDOFormulation.get_expected_workflow
- Returns
The expected execution sequence.
- Return type
- get_input_data(with_namespaces=True)
Return the local input data as a dictionary.
- get_input_data_names(with_namespaces=True)
Return the names of the input variables.
- get_input_output_data_names(with_namespaces=True)
Return the names of the input and output variables.
- Args:
- with_namespaces: Whether to keep the namespace prefix of the
output names, if any.
- get_inputs_asarray()
Return the local output data as a large NumPy array.
The order is the one of
MDODiscipline.get_all_outputs()
.- Returns
The local output data.
- Return type
- get_inputs_by_name(data_names)
Return the local data associated with input variables.
- Parameters
data_names (Iterable[str]) – The names of the input variables.
- Returns
The local data for the given input variables.
- Raises
ValueError – When a variable is not an input of the discipline.
- Return type
- get_local_data_by_name(data_names)
Return the local data of the discipline associated with variables names.
- Parameters
data_names (Iterable[str]) – The names of the variables.
- Returns
The local data associated with the variables names.
- Raises
ValueError – When a name is not a discipline input name.
- Return type
Generator[Any]
- get_output_data(with_namespaces=True)
Return the local output data as a dictionary.
- get_output_data_names(with_namespaces=True)
Return the names of the output variables.
- get_outputs_asarray()
Return the local input data as a large NumPy array.
The order is the one of
MDODiscipline.get_all_inputs()
.- Returns
The local input data.
- Return type
- get_outputs_by_name(data_names)
Return the local data associated with output variables.
- Parameters
data_names (Iterable[str]) – The names of the output variables.
- Returns
The local data for the given output variables.
- Raises
ValueError – When a variable is not an output of the discipline.
- Return type
- get_sub_disciplines()
Return the sub-disciplines if any.
- Returns
The sub-disciplines.
- Return type
- is_all_inputs_existing(data_names)
Test if several variables are discipline inputs.
- is_all_outputs_existing(data_names)
Test if several variables are discipline outputs.
- is_input_existing(data_name)
Test if a variable is a discipline input.
- is_output_existing(data_name)
Test if a variable is a discipline output.
- static is_scenario()
Whether the discipline is a scenario.
- Return type
- linearize(input_data=None, force_all=False, force_no_exec=False)
Execute the linearized version of the code.
- Parameters
input_data (dict[str, Any] | None) –
The input data needed to linearize the discipline according to the discipline input grammar. If None, use the
MDODiscipline.default_inputs
.By default it is set to None.
force_all (bool) –
If False,
MDODiscipline._differentiated_inputs
andMDODiscipline._differentiated_outputs
are used to filter the differentiated variables. otherwise, all outputs are differentiated wrt all inputs.By default it is set to False.
force_no_exec (bool) –
If True, the discipline is not re-executed, cache is loaded anyway.
By default it is set to False.
- Returns
The Jacobian of the discipline.
- Return type
- notify_status_observers()
Notify all status observers that the status has changed.
- Return type
None
- remove_status_observer(obs)
Remove an observer for the status.
- Parameters
obs (Any) – The observer to remove.
- Return type
None
- reset_statuses_for_run()
Set all the statuses to
MDODiscipline.STATUS_PENDING
.- Raises
ValueError – When the discipline cannot be run because of its status.
- Return type
None
- serialize(file_path)
Serialize the discipline and store it in a file.
- Parameters
file_path (str | Path) – The path to the file to store the discipline.
- Return type
None
- set_cache_policy(cache_type='SimpleCache', cache_tolerance=0.0, cache_hdf_file=None, cache_hdf_node_name=None, is_memory_shared=True)
Set the type of cache to use and the tolerance level.
This method defines when the output data have to be cached according to the distance between the corresponding input data and the input data already cached for which output data are also cached.
The cache can be either a
SimpleCache
recording the last execution or a cache storing all executions, e.g.MemoryFullCache
andHDF5Cache
. Caching data can be either in-memory, e.g.SimpleCache
andMemoryFullCache
, or on the disk, e.g.HDF5Cache
.The attribute
CacheFactory.caches
provides the available caches types.- Parameters
cache_type (str) –
The type of cache.
By default it is set to SimpleCache.
cache_tolerance (float) –
The maximum relative norm of the difference between two input arrays to consider that two input arrays are equal.
By default it is set to 0.0.
cache_hdf_file (str | Path | None) –
The path to the HDF file to store the data; this argument is mandatory when the
MDODiscipline.HDF5_CACHE
policy is used.By default it is set to None.
cache_hdf_node_name (str | None) –
The name of the HDF file node to store the discipline data. If None,
MDODiscipline.name
is used.By default it is set to None.
is_memory_shared (bool) –
Whether to store the data with a shared memory dictionary, which makes the cache compatible with multiprocessing.
By default it is set to True.
- Return type
None
- set_disciplines_statuses(status)
Set the sub-disciplines statuses.
To be implemented in subclasses.
- Parameters
status (str) – The status.
- Return type
None
- set_jacobian_approximation(jac_approx_type='finite_differences', jax_approx_step=1e-07, jac_approx_n_processes=1, jac_approx_use_threading=False, jac_approx_wait_time=0)
Set the Jacobian approximation method.
Sets the linearization mode to approx_method, sets the parameters of the approximation for further use when calling
MDODiscipline.linearize()
.- Parameters
jac_approx_type (str) –
The approximation method, either “complex_step” or “finite_differences”.
By default it is set to finite_differences.
jax_approx_step (float) –
The differentiation step.
By default it is set to 1e-07.
jac_approx_n_processes (int) –
The maximum simultaneous number of threads, if
jac_approx_use_threading
is True, or processes otherwise, used to parallelize the execution.By default it is set to 1.
jac_approx_use_threading (bool) –
Whether to use threads instead of processes to parallelize the execution; multiprocessing will copy (serialize) all the disciplines, while threading will share all the memory This is important to note if you want to execute the same discipline multiple times, you shall use multiprocessing.
By default it is set to False.
jac_approx_wait_time (float) –
The time waited between two forks of the process / thread.
By default it is set to 0.
- Return type
None
- set_optimal_fd_step(outputs=None, inputs=None, force_all=False, print_errors=False, numerical_error=2.220446049250313e-16)
Compute the optimal finite-difference step.
Compute the optimal step for a forward first order finite differences gradient approximation. Requires a first evaluation of the perturbed functions values. The optimal step is reached when the truncation error (cut in the Taylor development), and the numerical cancellation errors (round-off when doing f(x+step)-f(x)) are approximately equal.
Warning
This calls the discipline execution twice per input variables.
See also
https://en.wikipedia.org/wiki/Numerical_differentiation and “Numerical Algorithms and Digital Representation”, Knut Morken , Chapter 11, “Numerical Differentiation”
- Parameters
inputs (Iterable[str] | None) –
The inputs wrt which the outputs are linearized. If None, use the
MDODiscipline._differentiated_inputs
.By default it is set to None.
outputs (Iterable[str] | None) –
The outputs to be linearized. If None, use the
MDODiscipline._differentiated_outputs
.By default it is set to None.
force_all (bool) –
Whether to consider all the inputs and outputs of the discipline;
By default it is set to False.
print_errors (bool) –
Whether to display the estimated errors.
By default it is set to False.
numerical_error (float) –
The numerical error associated to the calculation of f. By default, this is the machine epsilon (appx 1e-16), but can be higher when the calculation of f requires a numerical resolution.
By default it is set to 2.220446049250313e-16.
- Returns
The estimated errors of truncation and cancellation error.
- Raises
ValueError – When the Jacobian approximation method has not been set.
- store_local_data(**kwargs)
Store discipline data in local data.
- Parameters
**kwargs (Any) – The data to be stored in
MDODiscipline.local_data
.- Return type
None
- property cache_tol: float
The cache input tolerance.
This is the tolerance for equality of the inputs in the cache. If norm(stored_input_data-input_data) <= cache_tol * norm(stored_input_data), the cached data for
stored_input_data
is returned when callingself.execute(input_data)
.- Raises
ValueError – When the discipline does not have a cache.
- data_processor: DataProcessor
A data processor to be used before the execution of the discipline.
- property default_inputs: dict[str, Any]
The default inputs.
- Raises
TypeError – When the default inputs are not passed as a dictionary.
- property exec_time: float | None
The cumulated execution time of the discipline.
This property is multiprocessing safe.
- Raises
RuntimeError – When the discipline counters are disabled.
- executable_command: str
The executable command.
- property folders_iter: gemseo.wrappers.disc_from_exe.FoldersIter
The names of the new execution directories.
The setter will check that the value provided for folder_iter is valid. This check is done by checking its presence in FOLDERS_ITER.
- Raises
ValueError – If the value provided to the setter is not present in the accepted list of folders_iters list.
- property grammar_type: gemseo.core.grammars.base_grammar.BaseGrammar
The type of grammar to be used for inputs and outputs declaration.
- input_filename: str
The name of the input file.
- input_template: str
The path to the input template file.
- property linearization_mode: str
The linearization mode among
MDODiscipline.AVAILABLE_MODES
.- Raises
ValueError – When the linearization mode is unknown.
- property local_data: gemseo.core.discipline_data.DisciplineData
The current input and output data.
- property n_calls: int | None
The number of times the discipline was executed.
This property is multiprocessing safe.
- Raises
RuntimeError – When the discipline counters are disabled.
- property n_calls_linearize: int | None
The number of times the discipline was linearized.
This property is multiprocessing safe.
- Raises
RuntimeError – When the discipline counters are disabled.
- output_filename: str
The name of the output file.
- output_folder_basepath: str
The base path of the execution directories.
- output_template: str
The path to the output template file.
- parse_outfile: Callable[[Mapping[str, tuple[int]]], Sequence[str]]
The function used to parse the output file.
- property status: str
The status of the discipline.
Inputs and outputs files template edition GUI¶
- class gemseo.wrappers.template_grammar_editor.QtTemplateEditor(in_sep='GEMSEO_INPUT', out_sep='GEMSEO_OUTPUT')[source]
- Parameters
in_sep –
The separator name for the input tag.
By default it is set to GEMSEO_INPUT.
out_sep –
The separator name for the output tag.
By default it is set to GEMSEO_OUTPUT.
- actionEvent(self, event: PySide6.QtGui.QActionEvent) None
- Parameters
event (PySide6.QtGui.QActionEvent) –
- Return type
None
- actions(self) List[PySide6.QtGui.QAction]
- Return type
List[PySide6.QtGui.QAction]
- activateWindow(self) None
- Return type
None
- addAction(self, action: PySide6.QtGui.QAction) None
- addAction(self, icon: Union[PySide6.QtGui.QIcon, PySide6.QtGui.QPixmap], text: str) PySide6.QtGui.QAction
- addAction(self, icon: Union[PySide6.QtGui.QIcon, PySide6.QtGui.QPixmap], text: str, callable: object) PySide6.QtGui.QAction
- addAction(self, icon: Union[PySide6.QtGui.QIcon, PySide6.QtGui.QPixmap], text: str, receiver: PySide6.QtCore.QObject, member: bytes, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtGui.QAction
- addAction(self, icon: Union[PySide6.QtGui.QIcon, PySide6.QtGui.QPixmap], text: str, shortcut: Union[PySide6.QtGui.QKeySequence, PySide6.QtCore.QKeyCombination, PySide6.QtGui.QKeySequence.StandardKey, str, int]) PySide6.QtGui.QAction
- addAction(self, icon: Union[PySide6.QtGui.QIcon, PySide6.QtGui.QPixmap], text: str, shortcut: Union[PySide6.QtGui.QKeySequence, PySide6.QtCore.QKeyCombination, PySide6.QtGui.QKeySequence.StandardKey, str, int], callable: object) PySide6.QtGui.QAction
- addAction(self, icon: Union[PySide6.QtGui.QIcon, PySide6.QtGui.QPixmap], text: str, shortcut: Union[PySide6.QtGui.QKeySequence, PySide6.QtCore.QKeyCombination, PySide6.QtGui.QKeySequence.StandardKey, str, int], receiver: PySide6.QtCore.QObject, member: bytes, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtGui.QAction
- addAction(self, text: str) PySide6.QtGui.QAction
- addAction(self, text: str, callable: object) PySide6.QtGui.QAction
- addAction(self, text: str, receiver: PySide6.QtCore.QObject, member: bytes, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtGui.QAction
- addAction(self, text: str, shortcut: Union[PySide6.QtGui.QKeySequence, PySide6.QtCore.QKeyCombination, PySide6.QtGui.QKeySequence.StandardKey, str, int]) PySide6.QtGui.QAction
- addAction(self, text: str, shortcut: Union[PySide6.QtGui.QKeySequence, PySide6.QtCore.QKeyCombination, PySide6.QtGui.QKeySequence.StandardKey, str, int], callable: object) PySide6.QtGui.QAction
- addAction(self, text: str, shortcut: Union[PySide6.QtGui.QKeySequence, PySide6.QtCore.QKeyCombination, PySide6.QtGui.QKeySequence.StandardKey, str, int], receiver: PySide6.QtCore.QObject, member: bytes, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtGui.QAction
- addActions(self, actions: Sequence[PySide6.QtGui.QAction]) None
- Parameters
actions (Sequence[PySide6.QtGui.QAction]) –
- Return type
None
- addDockWidget(self, area: PySide6.QtCore.Qt.DockWidgetArea, dockwidget: PySide6.QtWidgets.QDockWidget) None
- addDockWidget(self, area: PySide6.QtCore.Qt.DockWidgetArea, dockwidget: PySide6.QtWidgets.QDockWidget, orientation: PySide6.QtCore.Qt.Orientation) None
- addToolBar(self, area: PySide6.QtCore.Qt.ToolBarArea, toolbar: PySide6.QtWidgets.QToolBar) None
- addToolBar(self, title: str) PySide6.QtWidgets.QToolBar
- addToolBar(self, toolbar: PySide6.QtWidgets.QToolBar) None
- addToolBarBreak(self, area: PySide6.QtCore.Qt.ToolBarArea = PySide6.QtCore.Qt.ToolBarArea.TopToolBarArea) None
- Parameters
area (PySide6.QtCore.Qt.ToolBarArea) –
By default it is set to PySide6.QtCore.Qt.ToolBarArea.TopToolBarArea.
- Return type
None
- add_action(name, status_tip, shortcut, connect)[source]
Add an action with a button and icon.
- Parameters
name – The name of the action.
status_tip – The tip for the user to browse with the mouse.
shortcut – The keyboard shortcut (Ctrl+S) for instance.
connect – The method to call at trigger.
- adjustSize(self) None
- Return type
None
- backgroundRole(self) PySide6.QtGui.QPalette.ColorRole
- Return type
PySide6.QtGui.QPalette.ColorRole
- backingStore(self) PySide6.QtGui.QBackingStore
- Return type
PySide6.QtGui.QBackingStore
- baseSize(self) PySide6.QtCore.QSize
- Return type
PySide6.QtCore.QSize
- centralWidget(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- changeEvent(self, event: PySide6.QtCore.QEvent) None
- Parameters
event (PySide6.QtCore.QEvent) –
- Return type
None
- childAt(self, p: PySide6.QtCore.QPoint) PySide6.QtWidgets.QWidget
- childAt(self, x: int, y: int) PySide6.QtWidgets.QWidget
- childEvent(self, event: PySide6.QtCore.QChildEvent) None
- Parameters
event (PySide6.QtCore.QChildEvent) –
- Return type
None
- children(self) List[PySide6.QtCore.QObject]
- Return type
List[PySide6.QtCore.QObject]
- childrenRect(self) PySide6.QtCore.QRect
- Return type
PySide6.QtCore.QRect
- childrenRegion(self) PySide6.QtGui.QRegion
- Return type
PySide6.QtGui.QRegion
- clearFocus(self) None
- Return type
None
- clearMask(self) None
- Return type
None
- closeEvent(self, event: PySide6.QtGui.QCloseEvent) None
- Parameters
event (PySide6.QtGui.QCloseEvent) –
- Return type
None
- static connect(arg__1: PySide6.QtCore.QObject, arg__2: bytes, arg__3: Callable, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtCore.QMetaObject.Connection
- static connect(self, arg__1: bytes, arg__2: Callable, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtCore.QMetaObject.Connection
- static connect(self, arg__1: bytes, arg__2: PySide6.QtCore.QObject, arg__3: bytes, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtCore.QMetaObject.Connection
- static connect(self, sender: PySide6.QtCore.QObject, signal: bytes, member: bytes, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtCore.QMetaObject.Connection
- static connect(sender: PySide6.QtCore.QObject, signal: PySide6.QtCore.QMetaMethod, receiver: PySide6.QtCore.QObject, method: PySide6.QtCore.QMetaMethod, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtCore.QMetaObject.Connection
- static connect(sender: PySide6.QtCore.QObject, signal: bytes, receiver: PySide6.QtCore.QObject, member: bytes, type: PySide6.QtCore.Qt.ConnectionType = PySide6.QtCore.Qt.ConnectionType.AutoConnection) PySide6.QtCore.QMetaObject.Connection
- connectNotify(self, signal: PySide6.QtCore.QMetaMethod) None
- Parameters
signal (PySide6.QtCore.QMetaMethod) –
- Return type
None
- contentsMargins(self) PySide6.QtCore.QMargins
- Return type
PySide6.QtCore.QMargins
- contentsRect(self) PySide6.QtCore.QRect
- Return type
PySide6.QtCore.QRect
- contextMenuEvent(self, event: PySide6.QtGui.QContextMenuEvent) None
- Parameters
event (PySide6.QtGui.QContextMenuEvent) –
- Return type
None
- contextMenuPolicy(self) PySide6.QtCore.Qt.ContextMenuPolicy
- Return type
PySide6.QtCore.Qt.ContextMenuPolicy
- corner(self, corner: PySide6.QtCore.Qt.Corner) PySide6.QtCore.Qt.DockWidgetArea
- Parameters
corner (PySide6.QtCore.Qt.Corner) –
- Return type
PySide6.QtCore.Qt.DockWidgetArea
- createPopupMenu(self) PySide6.QtWidgets.QMenu
- Return type
PySide6.QtWidgets.QMenu
- createWinId(self) None
- Return type
None
- static createWindowContainer(window: PySide6.QtGui.QWindow, parent: Optional[PySide6.QtWidgets.QWidget] = None, flags: PySide6.QtCore.Qt.WindowFlags = Default(Qt.WindowFlags)) PySide6.QtWidgets.QWidget
- Parameters
window (PySide6.QtGui.QWindow) –
parent (Optional[PySide6.QtWidgets.QWidget]) –
By default it is set to None.
flags (PySide6.QtCore.Qt.WindowFlags) –
By default it is set to Qt.WindowFlags.
- Return type
PySide6.QtWidgets.QWidget
- cursor(self) PySide6.QtGui.QCursor
- Return type
PySide6.QtGui.QCursor
- customEvent(self, event: PySide6.QtCore.QEvent) None
- Parameters
event (PySide6.QtCore.QEvent) –
- Return type
None
- deleteLater(self) None
- Return type
None
- static disconnect(arg__1: PySide6.QtCore.QMetaObject.Connection) bool
- static disconnect(arg__1: PySide6.QtCore.QObject, arg__2: bytes, arg__3: Callable) bool
- static disconnect(self, arg__1: bytes, arg__2: Callable) bool
- static disconnect(self, receiver: PySide6.QtCore.QObject, member: Optional[bytes] = None) bool
- static disconnect(self, signal: bytes, receiver: PySide6.QtCore.QObject, member: bytes) bool
- static disconnect(sender: PySide6.QtCore.QObject, signal: PySide6.QtCore.QMetaMethod, receiver: PySide6.QtCore.QObject, member: PySide6.QtCore.QMetaMethod) bool
- static disconnect(sender: PySide6.QtCore.QObject, signal: bytes, receiver: PySide6.QtCore.QObject, member: bytes) bool
- disconnectNotify(self, signal: PySide6.QtCore.QMetaMethod) None
- Parameters
signal (PySide6.QtCore.QMetaMethod) –
- Return type
None
- dockOptions(self) PySide6.QtWidgets.QMainWindow.DockOptions
- Return type
- dockWidgetArea(self, dockwidget: PySide6.QtWidgets.QDockWidget) PySide6.QtCore.Qt.DockWidgetArea
- Parameters
dockwidget (PySide6.QtWidgets.QDockWidget) –
- Return type
PySide6.QtCore.Qt.DockWidgetArea
- dragEnterEvent(self, event: PySide6.QtGui.QDragEnterEvent) None
- Parameters
event (PySide6.QtGui.QDragEnterEvent) –
- Return type
None
- dragLeaveEvent(self, event: PySide6.QtGui.QDragLeaveEvent) None
- Parameters
event (PySide6.QtGui.QDragLeaveEvent) –
- Return type
None
- dragMoveEvent(self, event: PySide6.QtGui.QDragMoveEvent) None
- Parameters
event (PySide6.QtGui.QDragMoveEvent) –
- Return type
None
- dropEvent(self, event: PySide6.QtGui.QDropEvent) None
- Parameters
event (PySide6.QtGui.QDropEvent) –
- Return type
None
- dumpObjectInfo(self) None
- Return type
None
- dumpObjectTree(self) None
- Return type
None
- dynamicPropertyNames(self) List[PySide6.QtCore.QByteArray]
- Return type
List[PySide6.QtCore.QByteArray]
- ensurePolished(self) None
- Return type
None
- enterEvent(self, event: PySide6.QtGui.QEnterEvent) None
- Parameters
event (PySide6.QtGui.QEnterEvent) –
- Return type
None
- event(self, event: PySide6.QtCore.QEvent) bool
- Parameters
event (PySide6.QtCore.QEvent) –
- Return type
- eventFilter(self, watched: PySide6.QtCore.QObject, event: PySide6.QtCore.QEvent) bool
- Parameters
watched (PySide6.QtCore.QObject) –
event (PySide6.QtCore.QEvent) –
- Return type
- static find(arg__1: int) PySide6.QtWidgets.QWidget
- Parameters
arg__1 (int) –
- Return type
PySide6.QtWidgets.QWidget
- findChild(self, type: type, name: str = {}, options: PySide6.QtCore.Qt.FindChildOptions = PySide6.QtCore.Qt.FindChildOption.FindChildrenRecursively) object
- findChildren(self, type: type, name: str = {}, options: PySide6.QtCore.Qt.FindChildOptions = PySide6.QtCore.Qt.FindChildOption.FindChildrenRecursively) Iterable
- findChildren(self, type: type, pattern: Union[PySide6.QtCore.QRegularExpression, str], options: PySide6.QtCore.Qt.FindChildOptions = PySide6.QtCore.Qt.FindChildOption.FindChildrenRecursively) Iterable
- focusInEvent(self, event: PySide6.QtGui.QFocusEvent) None
- Parameters
event (PySide6.QtGui.QFocusEvent) –
- Return type
None
- focusOutEvent(self, event: PySide6.QtGui.QFocusEvent) None
- Parameters
event (PySide6.QtGui.QFocusEvent) –
- Return type
None
- focusPolicy(self) PySide6.QtCore.Qt.FocusPolicy
- Return type
PySide6.QtCore.Qt.FocusPolicy
- focusProxy(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- focusWidget(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- font(self) PySide6.QtGui.QFont
- Return type
PySide6.QtGui.QFont
- fontInfo(self) PySide6.QtGui.QFontInfo
- Return type
PySide6.QtGui.QFontInfo
- fontMetrics(self) PySide6.QtGui.QFontMetrics
- Return type
PySide6.QtGui.QFontMetrics
- foregroundRole(self) PySide6.QtGui.QPalette.ColorRole
- Return type
PySide6.QtGui.QPalette.ColorRole
- frameGeometry(self) PySide6.QtCore.QRect
- Return type
PySide6.QtCore.QRect
- frameSize(self) PySide6.QtCore.QSize
- Return type
PySide6.QtCore.QSize
- geometry(self) PySide6.QtCore.QRect
- Return type
PySide6.QtCore.QRect
- grab(self, rectangle: PySide6.QtCore.QRect = PySide6.QtCore.QRect(0, 0, - 1, - 1)) PySide6.QtGui.QPixmap
- Parameters
rectangle (PySide6.QtCore.QRect) –
By default it is set to PySide6.QtCore.QRect(0, 0, -1, -1).
- Return type
PySide6.QtGui.QPixmap
- grabGesture(self, type: PySide6.QtCore.Qt.GestureType, flags: PySide6.QtCore.Qt.GestureFlags = Default(Qt.GestureFlags)) None
- Parameters
type (PySide6.QtCore.Qt.GestureType) –
flags (PySide6.QtCore.Qt.GestureFlags) –
By default it is set to Qt.GestureFlags.
- Return type
None
- grabKeyboard(self) None
- Return type
None
- grabMouse(self) None
- grabMouse(self, arg__1: Union[PySide6.QtGui.QCursor, PySide6.QtCore.Qt.CursorShape, PySide6.QtGui.QPixmap]) None
- grabShortcut(self, key: Union[PySide6.QtGui.QKeySequence, PySide6.QtCore.QKeyCombination, PySide6.QtGui.QKeySequence.StandardKey, str, int], context: PySide6.QtCore.Qt.ShortcutContext = PySide6.QtCore.Qt.ShortcutContext.WindowShortcut) int
- graphicsEffect(self) PySide6.QtWidgets.QGraphicsEffect
- Return type
PySide6.QtWidgets.QGraphicsEffect
- graphicsProxyWidget(self) PySide6.QtWidgets.QGraphicsProxyWidget
- Return type
PySide6.QtWidgets.QGraphicsProxyWidget
- hide(self) None
- Return type
None
- hideEvent(self, event: PySide6.QtGui.QHideEvent) None
- Parameters
event (PySide6.QtGui.QHideEvent) –
- Return type
None
- highlight(sep, color='red')[source]
Highlight some text.
- Parameters
sep – The regex that validates the text to highlight.
color –
The color to be used.
By default it is set to red.
- iconSize(self) PySide6.QtCore.QSize
- Return type
PySide6.QtCore.QSize
- initPainter(self, painter: PySide6.QtGui.QPainter) None
- Parameters
painter (PySide6.QtGui.QPainter) –
- Return type
None
- inputMethodEvent(self, event: PySide6.QtGui.QInputMethodEvent) None
- Parameters
event (PySide6.QtGui.QInputMethodEvent) –
- Return type
None
- inputMethodHints(self) PySide6.QtCore.Qt.InputMethodHints
- Return type
PySide6.QtCore.Qt.InputMethodHints
- inputMethodQuery(self, arg__1: PySide6.QtCore.Qt.InputMethodQuery) Any
- Parameters
arg__1 (PySide6.QtCore.Qt.InputMethodQuery) –
- Return type
Any
- insertAction(self, before: PySide6.QtGui.QAction, action: PySide6.QtGui.QAction) None
- Parameters
before (PySide6.QtGui.QAction) –
action (PySide6.QtGui.QAction) –
- Return type
None
- insertActions(self, before: PySide6.QtGui.QAction, actions: Sequence[PySide6.QtGui.QAction]) None
- Parameters
before (PySide6.QtGui.QAction) –
actions (Sequence[PySide6.QtGui.QAction]) –
- Return type
None
- insertToolBar(self, before: PySide6.QtWidgets.QToolBar, toolbar: PySide6.QtWidgets.QToolBar) None
- Parameters
before (PySide6.QtWidgets.QToolBar) –
toolbar (PySide6.QtWidgets.QToolBar) –
- Return type
None
- insertToolBarBreak(self, before: PySide6.QtWidgets.QToolBar) None
- Parameters
before (PySide6.QtWidgets.QToolBar) –
- Return type
None
- installEventFilter(self, filterObj: PySide6.QtCore.QObject) None
- Parameters
filterObj (PySide6.QtCore.QObject) –
- Return type
None
- isAncestorOf(self, child: PySide6.QtWidgets.QWidget) bool
- Parameters
child (PySide6.QtWidgets.QWidget) –
- Return type
- isEnabledTo(self, arg__1: PySide6.QtWidgets.QWidget) bool
- Parameters
arg__1 (PySide6.QtWidgets.QWidget) –
- Return type
- isSeparator(self, pos: PySide6.QtCore.QPoint) bool
- Parameters
pos (PySide6.QtCore.QPoint) –
- Return type
- isSignalConnected(self, signal: PySide6.QtCore.QMetaMethod) bool
- Parameters
signal (PySide6.QtCore.QMetaMethod) –
- Return type
- isVisibleTo(self, arg__1: PySide6.QtWidgets.QWidget) bool
- Parameters
arg__1 (PySide6.QtWidgets.QWidget) –
- Return type
- keyPressEvent(self, event: PySide6.QtGui.QKeyEvent) None
- Parameters
event (PySide6.QtGui.QKeyEvent) –
- Return type
None
- keyReleaseEvent(self, event: PySide6.QtGui.QKeyEvent) None
- Parameters
event (PySide6.QtGui.QKeyEvent) –
- Return type
None
- static keyboardGrabber() PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- layout(self) PySide6.QtWidgets.QLayout
- Return type
PySide6.QtWidgets.QLayout
- layoutDirection(self) PySide6.QtCore.Qt.LayoutDirection
- Return type
PySide6.QtCore.Qt.LayoutDirection
- leaveEvent(self, event: PySide6.QtCore.QEvent) None
- Parameters
event (PySide6.QtCore.QEvent) –
- Return type
None
- locale(self) PySide6.QtCore.QLocale
- Return type
PySide6.QtCore.QLocale
- lower(self) None
- Return type
None
- make_input()[source]
Make an input from the selected data.
- make_output()[source]
Make an output from the selected data.
- mapFrom(self, arg__1: PySide6.QtWidgets.QWidget, arg__2: PySide6.QtCore.QPoint) PySide6.QtCore.QPoint
- mapFrom(self, arg__1: PySide6.QtWidgets.QWidget, arg__2: Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]) PySide6.QtCore.QPointF
- mapFromGlobal(self, arg__1: PySide6.QtCore.QPoint) PySide6.QtCore.QPoint
- mapFromGlobal(self, arg__1: Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]) PySide6.QtCore.QPointF
- mapFromParent(self, arg__1: PySide6.QtCore.QPoint) PySide6.QtCore.QPoint
- mapFromParent(self, arg__1: Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]) PySide6.QtCore.QPointF
- mapTo(self, arg__1: PySide6.QtWidgets.QWidget, arg__2: PySide6.QtCore.QPoint) PySide6.QtCore.QPoint
- mapTo(self, arg__1: PySide6.QtWidgets.QWidget, arg__2: Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]) PySide6.QtCore.QPointF
- mapToGlobal(self, arg__1: PySide6.QtCore.QPoint) PySide6.QtCore.QPoint
- mapToGlobal(self, arg__1: Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]) PySide6.QtCore.QPointF
- mapToParent(self, arg__1: PySide6.QtCore.QPoint) PySide6.QtCore.QPoint
- mapToParent(self, arg__1: Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]) PySide6.QtCore.QPointF
- mask(self) PySide6.QtGui.QRegion
- Return type
PySide6.QtGui.QRegion
- maximumSize(self) PySide6.QtCore.QSize
- Return type
PySide6.QtCore.QSize
- menuBar(self) PySide6.QtWidgets.QMenuBar
- Return type
PySide6.QtWidgets.QMenuBar
- menuWidget(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- metaObject(self) PySide6.QtCore.QMetaObject
- Return type
PySide6.QtCore.QMetaObject
- metric(self, arg__1: PySide6.QtGui.QPaintDevice.PaintDeviceMetric) int
- Parameters
arg__1 (PySide6.QtGui.QPaintDevice.PaintDeviceMetric) –
- Return type
- minimumSize(self) PySide6.QtCore.QSize
- Return type
PySide6.QtCore.QSize
- minimumSizeHint(self) PySide6.QtCore.QSize
- Return type
PySide6.QtCore.QSize
- mouseDoubleClickEvent(self, event: PySide6.QtGui.QMouseEvent) None
- Parameters
event (PySide6.QtGui.QMouseEvent) –
- Return type
None
- static mouseGrabber() PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- mouseMoveEvent(self, event: PySide6.QtGui.QMouseEvent) None
- Parameters
event (PySide6.QtGui.QMouseEvent) –
- Return type
None
- mousePressEvent(self, event: PySide6.QtGui.QMouseEvent) None
- Parameters
event (PySide6.QtGui.QMouseEvent) –
- Return type
None
- mouseReleaseEvent(self, event: PySide6.QtGui.QMouseEvent) None
- Parameters
event (PySide6.QtGui.QMouseEvent) –
- Return type
None
- moveEvent(self, event: PySide6.QtGui.QMoveEvent) None
- Parameters
event (PySide6.QtGui.QMoveEvent) –
- Return type
None
- moveToThread(self, thread: PySide6.QtCore.QThread) None
- Parameters
thread (PySide6.QtCore.QThread) –
- Return type
None
- nativeEvent(self, eventType: Union[PySide6.QtCore.QByteArray, bytes], message: int) Tuple[object, int]
- nativeParentWidget(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- nextInFocusChain(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- normalGeometry(self) PySide6.QtCore.QRect
- Return type
PySide6.QtCore.QRect
- open_doc()[source]
Open the document for edition of the template.
- overrideWindowFlags(self, type: PySide6.QtCore.Qt.WindowFlags) None
- Parameters
type (PySide6.QtCore.Qt.WindowFlags) –
- Return type
None
- overrideWindowState(self, state: PySide6.QtCore.Qt.WindowStates) None
- Parameters
state (PySide6.QtCore.Qt.WindowStates) –
- Return type
None
- paintEngine(self) PySide6.QtGui.QPaintEngine
- Return type
PySide6.QtGui.QPaintEngine
- paintEvent(self, event: PySide6.QtGui.QPaintEvent) None
- Parameters
event (PySide6.QtGui.QPaintEvent) –
- Return type
None
- palette(self) PySide6.QtGui.QPalette
- Return type
PySide6.QtGui.QPalette
- parent(self) PySide6.QtCore.QObject
- Return type
PySide6.QtCore.QObject
- parentWidget(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- pos(self) PySide6.QtCore.QPoint
- Return type
PySide6.QtCore.QPoint
- previousInFocusChain(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- raise_(self) None
- Return type
None
- rect(self) PySide6.QtCore.QRect
- Return type
PySide6.QtCore.QRect
- redirected(self, offset: PySide6.QtCore.QPoint) PySide6.QtGui.QPaintDevice
- Parameters
offset (PySide6.QtCore.QPoint) –
- Return type
PySide6.QtGui.QPaintDevice
- releaseKeyboard(self) None
- Return type
None
- releaseMouse(self) None
- Return type
None
- removeAction(self, action: PySide6.QtGui.QAction) None
- Parameters
action (PySide6.QtGui.QAction) –
- Return type
None
- removeDockWidget(self, dockwidget: PySide6.QtWidgets.QDockWidget) None
- Parameters
dockwidget (PySide6.QtWidgets.QDockWidget) –
- Return type
None
- removeEventFilter(self, obj: PySide6.QtCore.QObject) None
- Parameters
obj (PySide6.QtCore.QObject) –
- Return type
None
- removeToolBar(self, toolbar: PySide6.QtWidgets.QToolBar) None
- Parameters
toolbar (PySide6.QtWidgets.QToolBar) –
- Return type
None
- removeToolBarBreak(self, before: PySide6.QtWidgets.QToolBar) None
- Parameters
before (PySide6.QtWidgets.QToolBar) –
- Return type
None
- render(self, painter: PySide6.QtGui.QPainter, targetOffset: PySide6.QtCore.QPoint, sourceRegion: Union[PySide6.QtGui.QRegion, PySide6.QtGui.QBitmap, PySide6.QtGui.QPolygon, PySide6.QtCore.QRect] = Default(QRegion), renderFlags: PySide6.QtWidgets.QWidget.RenderFlags = Instance(QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren))) None
- render(self, target: PySide6.QtGui.QPaintDevice, targetOffset: PySide6.QtCore.QPoint = Default(QPoint), sourceRegion: Union[PySide6.QtGui.QRegion, PySide6.QtGui.QBitmap, PySide6.QtGui.QPolygon, PySide6.QtCore.QRect] = Default(QRegion), renderFlags: PySide6.QtWidgets.QWidget.RenderFlags = Instance(QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren))) None
- repaint(self) None
- repaint(self, arg__1: PySide6.QtCore.QRect) None
- repaint(self, arg__1: Union[PySide6.QtGui.QRegion, PySide6.QtGui.QBitmap, PySide6.QtGui.QPolygon, PySide6.QtCore.QRect]) None
- repaint(self, x: int, y: int, w: int, h: int) None
- resizeDocks(self, docks: Sequence[PySide6.QtWidgets.QDockWidget], sizes: Sequence[int], orientation: PySide6.QtCore.Qt.Orientation) None
- Parameters
docks (Sequence[PySide6.QtWidgets.QDockWidget]) –
sizes (Sequence[int]) –
orientation (PySide6.QtCore.Qt.Orientation) –
- Return type
None
- resizeEvent(self, event: PySide6.QtGui.QResizeEvent) None
- Parameters
event (PySide6.QtGui.QResizeEvent) –
- Return type
None
- restoreDockWidget(self, dockwidget: PySide6.QtWidgets.QDockWidget) bool
- Parameters
dockwidget (PySide6.QtWidgets.QDockWidget) –
- Return type
- saveGeometry(self) PySide6.QtCore.QByteArray
- Return type
PySide6.QtCore.QByteArray
- saveState(self, version: int = 0) PySide6.QtCore.QByteArray
- Parameters
version (int) –
By default it is set to 0.
- Return type
PySide6.QtCore.QByteArray
- save_doc()[source]
Save the template to a file.
- screen(self) PySide6.QtGui.QScreen
- Return type
PySide6.QtGui.QScreen
- scroll(self, dx: int, dy: int) None
- scroll(self, dx: int, dy: int, arg__3: PySide6.QtCore.QRect) None
- sender(self) PySide6.QtCore.QObject
- Return type
PySide6.QtCore.QObject
- setAccessibleDescription(self, description: str) None
- Parameters
description (str) –
- Return type
None
- setAttribute(self, arg__1: PySide6.QtCore.Qt.WidgetAttribute, on: bool = True) None
- Parameters
arg__1 (PySide6.QtCore.Qt.WidgetAttribute) –
on (bool) –
By default it is set to True.
- Return type
None
- setBackgroundRole(self, arg__1: PySide6.QtGui.QPalette.ColorRole) None
- Parameters
arg__1 (PySide6.QtGui.QPalette.ColorRole) –
- Return type
None
- setCentralWidget(self, widget: PySide6.QtWidgets.QWidget) None
- Parameters
widget (PySide6.QtWidgets.QWidget) –
- Return type
None
- setContentsMargins(self, left: int, top: int, right: int, bottom: int) None
- setContentsMargins(self, margins: PySide6.QtCore.QMargins) None
- setContextMenuPolicy(self, policy: PySide6.QtCore.Qt.ContextMenuPolicy) None
- Parameters
policy (PySide6.QtCore.Qt.ContextMenuPolicy) –
- Return type
None
- setCorner(self, corner: PySide6.QtCore.Qt.Corner, area: PySide6.QtCore.Qt.DockWidgetArea) None
- Parameters
corner (PySide6.QtCore.Qt.Corner) –
area (PySide6.QtCore.Qt.DockWidgetArea) –
- Return type
None
- setCursor(self, arg__1: Union[PySide6.QtGui.QCursor, PySide6.QtCore.Qt.CursorShape, PySide6.QtGui.QPixmap]) None
- Parameters
arg__1 (Union[PySide6.QtGui.QCursor, PySide6.QtCore.Qt.CursorShape, PySide6.QtGui.QPixmap]) –
- Return type
None
- setDockOptions(self, options: PySide6.QtWidgets.QMainWindow.DockOptions) None
- Parameters
options (PySide6.QtWidgets.QMainWindow.DockOptions) –
- Return type
None
- setFocusPolicy(self, policy: PySide6.QtCore.Qt.FocusPolicy) None
- Parameters
policy (PySide6.QtCore.Qt.FocusPolicy) –
- Return type
None
- setFocusProxy(self, arg__1: PySide6.QtWidgets.QWidget) None
- Parameters
arg__1 (PySide6.QtWidgets.QWidget) –
- Return type
None
- setForegroundRole(self, arg__1: PySide6.QtGui.QPalette.ColorRole) None
- Parameters
arg__1 (PySide6.QtGui.QPalette.ColorRole) –
- Return type
None
- setGeometry(self, arg__1: PySide6.QtCore.QRect) None
- setGeometry(self, x: int, y: int, w: int, h: int) None
- setGraphicsEffect(self, effect: PySide6.QtWidgets.QGraphicsEffect) None
- Parameters
effect (PySide6.QtWidgets.QGraphicsEffect) –
- Return type
None
- setIconSize(self, iconSize: PySide6.QtCore.QSize) None
- Parameters
iconSize (PySide6.QtCore.QSize) –
- Return type
None
- setInputMethodHints(self, hints: PySide6.QtCore.Qt.InputMethodHints) None
- Parameters
hints (PySide6.QtCore.Qt.InputMethodHints) –
- Return type
None
- setLayout(self, arg__1: PySide6.QtWidgets.QLayout) None
- Parameters
arg__1 (PySide6.QtWidgets.QLayout) –
- Return type
None
- setLayoutDirection(self, direction: PySide6.QtCore.Qt.LayoutDirection) None
- Parameters
direction (PySide6.QtCore.Qt.LayoutDirection) –
- Return type
None
- setLocale(self, locale: Union[PySide6.QtCore.QLocale, PySide6.QtCore.QLocale.Language]) None
- Parameters
locale (Union[PySide6.QtCore.QLocale, PySide6.QtCore.QLocale.Language]) –
- Return type
None
- setMask(self, arg__1: Union[PySide6.QtGui.QBitmap, str]) None
- setMask(self, arg__1: Union[PySide6.QtGui.QRegion, PySide6.QtGui.QBitmap, PySide6.QtGui.QPolygon, PySide6.QtCore.QRect]) None
- setMaximumSize(self, arg__1: PySide6.QtCore.QSize) None
- setMaximumSize(self, maxw: int, maxh: int) None
- setMenuBar(self, menubar: PySide6.QtWidgets.QMenuBar) None
- Parameters
menubar (PySide6.QtWidgets.QMenuBar) –
- Return type
None
- setMenuWidget(self, menubar: PySide6.QtWidgets.QWidget) None
- Parameters
menubar (PySide6.QtWidgets.QWidget) –
- Return type
None
- setMinimumSize(self, arg__1: PySide6.QtCore.QSize) None
- setMinimumSize(self, minw: int, minh: int) None
- setPalette(self, arg__1: Union[PySide6.QtGui.QPalette, PySide6.QtCore.Qt.GlobalColor, PySide6.QtGui.QColor]) None
- Parameters
arg__1 (Union[PySide6.QtGui.QPalette, PySide6.QtCore.Qt.GlobalColor, PySide6.QtGui.QColor]) –
- Return type
None
- setParent(self, parent: PySide6.QtWidgets.QWidget) None
- setParent(self, parent: PySide6.QtWidgets.QWidget, f: PySide6.QtCore.Qt.WindowFlags) None
- setScreen(self, arg__1: PySide6.QtGui.QScreen) None
- Parameters
arg__1 (PySide6.QtGui.QScreen) –
- Return type
None
- setSizeIncrement(self, arg__1: PySide6.QtCore.QSize) None
- setSizeIncrement(self, w: int, h: int) None
- setSizePolicy(self, arg__1: PySide6.QtWidgets.QSizePolicy) None
- setSizePolicy(self, horizontal: PySide6.QtWidgets.QSizePolicy.Policy, vertical: PySide6.QtWidgets.QSizePolicy.Policy) None
- setStatusBar(self, statusbar: PySide6.QtWidgets.QStatusBar) None
- Parameters
statusbar (PySide6.QtWidgets.QStatusBar) –
- Return type
None
- setStyle(self, arg__1: PySide6.QtWidgets.QStyle) None
- Parameters
arg__1 (PySide6.QtWidgets.QStyle) –
- Return type
None
- static setTabOrder(arg__1: PySide6.QtWidgets.QWidget, arg__2: PySide6.QtWidgets.QWidget) None
- Parameters
arg__1 (PySide6.QtWidgets.QWidget) –
arg__2 (PySide6.QtWidgets.QWidget) –
- Return type
None
- setTabPosition(self, areas: PySide6.QtCore.Qt.DockWidgetAreas, tabPosition: PySide6.QtWidgets.QTabWidget.TabPosition) None
- Parameters
areas (PySide6.QtCore.Qt.DockWidgetAreas) –
tabPosition (PySide6.QtWidgets.QTabWidget.TabPosition) –
- Return type
None
- setTabShape(self, tabShape: PySide6.QtWidgets.QTabWidget.TabShape) None
- Parameters
tabShape (PySide6.QtWidgets.QTabWidget.TabShape) –
- Return type
None
- setToolButtonStyle(self, toolButtonStyle: PySide6.QtCore.Qt.ToolButtonStyle) None
- Parameters
toolButtonStyle (PySide6.QtCore.Qt.ToolButtonStyle) –
- Return type
None
- setWindowFlag(self, arg__1: PySide6.QtCore.Qt.WindowType, on: bool = True) None
- Parameters
arg__1 (PySide6.QtCore.Qt.WindowType) –
on (bool) –
By default it is set to True.
- Return type
None
- setWindowFlags(self, type: PySide6.QtCore.Qt.WindowFlags) None
- Parameters
type (PySide6.QtCore.Qt.WindowFlags) –
- Return type
None
- setWindowIcon(self, icon: Union[PySide6.QtGui.QIcon, PySide6.QtGui.QPixmap]) None
- Parameters
icon (Union[PySide6.QtGui.QIcon, PySide6.QtGui.QPixmap]) –
- Return type
None
- setWindowModality(self, windowModality: PySide6.QtCore.Qt.WindowModality) None
- Parameters
windowModality (PySide6.QtCore.Qt.WindowModality) –
- Return type
None
- setWindowState(self, state: PySide6.QtCore.Qt.WindowStates) None
- Parameters
state (PySide6.QtCore.Qt.WindowStates) –
- Return type
None
- sharedPainter(self) PySide6.QtGui.QPainter
- Return type
PySide6.QtGui.QPainter
- show(self) None
- Return type
None
- showEvent(self, event: PySide6.QtGui.QShowEvent) None
- Parameters
event (PySide6.QtGui.QShowEvent) –
- Return type
None
- showFullScreen(self) None
- Return type
None
- showMaximized(self) None
- Return type
None
- showMinimized(self) None
- Return type
None
- showNormal(self) None
- Return type
None
- size(self) PySide6.QtCore.QSize
- Return type
PySide6.QtCore.QSize
- sizeHint(self) PySide6.QtCore.QSize
- Return type
PySide6.QtCore.QSize
- sizeIncrement(self) PySide6.QtCore.QSize
- Return type
PySide6.QtCore.QSize
- sizePolicy(self) PySide6.QtWidgets.QSizePolicy
- Return type
PySide6.QtWidgets.QSizePolicy
- splitDockWidget(self, after: PySide6.QtWidgets.QDockWidget, dockwidget: PySide6.QtWidgets.QDockWidget, orientation: PySide6.QtCore.Qt.Orientation) None
- Parameters
after (PySide6.QtWidgets.QDockWidget) –
dockwidget (PySide6.QtWidgets.QDockWidget) –
orientation (PySide6.QtCore.Qt.Orientation) –
- Return type
None
- stackUnder(self, arg__1: PySide6.QtWidgets.QWidget) None
- Parameters
arg__1 (PySide6.QtWidgets.QWidget) –
- Return type
None
- startTimer(self, interval: int, timerType: PySide6.QtCore.Qt.TimerType = PySide6.QtCore.Qt.TimerType.CoarseTimer) int
- statusBar(self) PySide6.QtWidgets.QStatusBar
- Return type
PySide6.QtWidgets.QStatusBar
- style(self) PySide6.QtWidgets.QStyle
- Return type
PySide6.QtWidgets.QStyle
- tabPosition(self, area: PySide6.QtCore.Qt.DockWidgetArea) PySide6.QtWidgets.QTabWidget.TabPosition
- Parameters
area (PySide6.QtCore.Qt.DockWidgetArea) –
- Return type
PySide6.QtWidgets.QTabWidget.TabPosition
- tabShape(self) PySide6.QtWidgets.QTabWidget.TabShape
- Return type
PySide6.QtWidgets.QTabWidget.TabShape
- tabifiedDockWidgets(self, dockwidget: PySide6.QtWidgets.QDockWidget) List[PySide6.QtWidgets.QDockWidget]
- Parameters
dockwidget (PySide6.QtWidgets.QDockWidget) –
- Return type
List[PySide6.QtWidgets.QDockWidget]
- tabifyDockWidget(self, first: PySide6.QtWidgets.QDockWidget, second: PySide6.QtWidgets.QDockWidget) None
- Parameters
first (PySide6.QtWidgets.QDockWidget) –
second (PySide6.QtWidgets.QDockWidget) –
- Return type
None
- tabletEvent(self, event: PySide6.QtGui.QTabletEvent) None
- Parameters
event (PySide6.QtGui.QTabletEvent) –
- Return type
None
- takeCentralWidget(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- testAttribute(self, arg__1: PySide6.QtCore.Qt.WidgetAttribute) bool
- Parameters
arg__1 (PySide6.QtCore.Qt.WidgetAttribute) –
- Return type
- thread(self) PySide6.QtCore.QThread
- Return type
PySide6.QtCore.QThread
- timerEvent(self, event: PySide6.QtCore.QTimerEvent) None
- Parameters
event (PySide6.QtCore.QTimerEvent) –
- Return type
None
- toolBarArea(self, toolbar: PySide6.QtWidgets.QToolBar) PySide6.QtCore.Qt.ToolBarArea
- Parameters
toolbar (PySide6.QtWidgets.QToolBar) –
- Return type
PySide6.QtCore.Qt.ToolBarArea
- toolBarBreak(self, toolbar: PySide6.QtWidgets.QToolBar) bool
- Parameters
toolbar (PySide6.QtWidgets.QToolBar) –
- Return type
- toolButtonStyle(self) PySide6.QtCore.Qt.ToolButtonStyle
- Return type
PySide6.QtCore.Qt.ToolButtonStyle
- topLevelWidget(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- ungrabGesture(self, type: PySide6.QtCore.Qt.GestureType) None
- Parameters
type (PySide6.QtCore.Qt.GestureType) –
- Return type
None
- unsetCursor(self) None
- Return type
None
- unsetLayoutDirection(self) None
- Return type
None
- unsetLocale(self) None
- Return type
None
- update(self) None
- update(self, arg__1: PySide6.QtCore.QRect) None
- update(self, arg__1: Union[PySide6.QtGui.QRegion, PySide6.QtGui.QBitmap, PySide6.QtGui.QPolygon, PySide6.QtCore.QRect]) None
- update(self, x: int, y: int, w: int, h: int) None
- updateGeometry(self) None
- Return type
None
- updateMicroFocus(self, query: PySide6.QtCore.Qt.InputMethodQuery = PySide6.QtCore.Qt.InputMethodQuery.ImQueryAll) None
- Parameters
query (PySide6.QtCore.Qt.InputMethodQuery) –
By default it is set to PySide6.QtCore.Qt.InputMethodQuery.ImQueryAll.
- Return type
None
- visibleRegion(self) PySide6.QtGui.QRegion
- Return type
PySide6.QtGui.QRegion
- wheelEvent(self, event: PySide6.QtGui.QWheelEvent) None
- Parameters
event (PySide6.QtGui.QWheelEvent) –
- Return type
None
- window(self) PySide6.QtWidgets.QWidget
- Return type
PySide6.QtWidgets.QWidget
- windowFlags(self) PySide6.QtCore.Qt.WindowFlags
- Return type
PySide6.QtCore.Qt.WindowFlags
- windowHandle(self) PySide6.QtGui.QWindow
- Return type
PySide6.QtGui.QWindow
- windowIcon(self) PySide6.QtGui.QIcon
- Return type
PySide6.QtGui.QIcon
- windowModality(self) PySide6.QtCore.Qt.WindowModality
- Return type
PySide6.QtCore.Qt.WindowModality
- windowState(self) PySide6.QtCore.Qt.WindowStates
- Return type
PySide6.QtCore.Qt.WindowStates
- windowType(self) PySide6.QtCore.Qt.WindowType
- Return type
PySide6.QtCore.Qt.WindowType
The following screenshots detail the steps to create the templates from the reference input file.

Open a reference input file¶

Select the input and press the Input button (Ctrl+I) to generate the template tag¶

Enter the input name¶

The GUI highlights the inputs that ae tagged in the template¶

The user saves the input template (Ctrl+S)¶

Same for the outputs, shortcut (Ctrl+O)¶