populse_mia.utils.utils¶
Module that contains multiple functions used across Mia.
- Contains:
- Classes:
PackagesInstall
- Functions:
_is_valid_date(date_str, date_format)
check_python_version
check_value_type
dict4runtime_update
get_db_field_value
get_document_names
get_field_names
get_shown_tags
get_value
launch_mia
message_already_exists
remove_document
safe_connect
safe_disconnect
set_db_field_value
set_filters_directory_as_default
set_item_data
set_projects_directory_as_default
table_to_database
type_name
update_auto_inheritance
verCmp
verify_processes
verify_setup
Functions
Checks if the Python version is at least 3.10. |
|
|
Checks the type of new value in a table cell (QTableWidget). |
|
Update a dictionary with tag values from the project's current collection. |
|
Retrieve the value of a specific field for a document from the project's database. |
|
Retrieves the names of all documents in the specified collection from the project's database. |
|
Retrieves the list of field names (i.e., column names) for documents in the specified collection of the project's database. |
|
Retrieves the list of tags that are marked as 'shown' in the project's database. |
|
Retrieves the value of a specific field from a document in the given collection. |
|
Launch and run the Mia software application. |
Displays a message box to tell that a project name already exists. |
|
|
Removes one or multiple documents from the specified collection in the given project's database. |
|
Connect a Qt signal to a slot, ensuring a single connection. |
|
Disconnect a Qt signal from a slot if connected. |
|
Create or update a field and its value for a document in the project's database. |
|
Sets the filters directory as default (Json files) |
|
Sets the data for a given item in the data browser based on the expected type. |
|
Sets the projects directory as default. |
|
Prepares the value to the database based on its type. |
|
Returns the name of a type or a string representation for generic aliases. |
|
Automatically infer database tags for output parameters from input parameters. |
|
Version comparator. |
|
Install or update to the last version available on the station, for nipype, capsul and mia_processes processes libraries. |
|
Check and try to correct the configuration if necessary. |
Classes
Helps make a pipeline package available in the Mia pipeline library recursively. |
- class populse_mia.utils.utils.partial[source]¶
Bases:
objectpartial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.
- args¶
tuple of arguments to future partial calls
- func¶
function object to use in future partial calls
- keywords¶
dictionary of keyword arguments to future partial calls
- class populse_mia.utils.utils.Path(*args, **kwargs)[source]¶
Bases:
PurePathPurePath subclass that can make system calls.
Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa.
- stat(*, follow_symlinks=True)[source]¶
Return the result of the stat() system call on this path, like os.stat() does.
- lstat()[source]¶
Like stat(), except if the path points to a symlink, the symlink’s status information is returned, rather than its target’s.
- exists(*, follow_symlinks=True)[source]¶
Whether this path exists.
This method normally follows symlinks; to check whether a symlink exists, add the argument follow_symlinks=False.
- is_file()[source]¶
Whether this path is a regular file (also True for symlinks pointing to regular files).
- samefile(other_path)[source]¶
Return whether other_path is the same or not as this file (as returned by os.path.samefile()).
- open(mode='r', buffering=-1, encoding=None, errors=None, newline=None)[source]¶
Open the file pointed to by this path and return a file object, as the built-in open() function does.
- read_text(encoding=None, errors=None)[source]¶
Open the file in text mode, read it, and close the file.
- write_text(data, encoding=None, errors=None, newline=None)[source]¶
Open the file in text mode, write to it, and close the file.
- iterdir()[source]¶
Yield path objects of the directory contents.
The children are yielded in arbitrary order, and the special entries ‘.’ and ‘..’ are not included.
- glob(pattern, *, case_sensitive=None)[source]¶
Iterate over this subtree and yield all existing files (of any kind, including directories) matching the given relative pattern.
- rglob(pattern, *, case_sensitive=None)[source]¶
Recursively yield all existing files (of any kind, including directories) matching the given relative pattern, anywhere in this subtree.
- walk(top_down=True, on_error=None, follow_symlinks=False)[source]¶
Walk the directory tree from this directory, similar to os.walk().
- classmethod home()[source]¶
Return a new path pointing to the user’s home directory (as returned by os.path.expanduser(‘~’)).
- absolute()[source]¶
Return an absolute version of this path by prepending the current working directory. No normalization or symlink resolution is performed.
Use resolve() to get the canonical path to a file.
- resolve(strict=False)[source]¶
Make the path absolute, resolving all symlinks on the way and also normalizing it.
- touch(mode=438, exist_ok=True)[source]¶
Create this file with the given access mode, if it doesn’t exist.
- lchmod(mode)[source]¶
Like chmod(), except if the path points to a symlink, the symlink’s permissions are changed, rather than its target’s.
- unlink(missing_ok=False)[source]¶
Remove this file or link. If the path is a directory, use rmdir() instead.
- rename(target)[source]¶
Rename this path to the target path.
The target path may be absolute or relative. Relative paths are interpreted relative to the current working directory, not the directory of the Path object.
Returns the new Path instance pointing to the target path.
- replace(target)[source]¶
Rename this path to the target path, overwriting if that path exists.
The target path may be absolute or relative. Relative paths are interpreted relative to the current working directory, not the directory of the Path object.
Returns the new Path instance pointing to the target path.
- symlink_to(target, target_is_directory=False)[source]¶
Make this path a symlink pointing to the target path. Note the order of arguments (link, target) is the reverse of os.symlink.
- populse_mia.utils.utils.get_args(tp)[source]¶
Get type arguments with all substitutions performed.
For unions, basic simplifications used by Union constructor are performed.
Examples:
>>> T = TypeVar('T') >>> assert get_args(Dict[str, int]) == (str, int) >>> assert get_args(int) == () >>> assert get_args(Union[int, Union[T, int], str][int]) == (int, str) >>> assert get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int]) >>> assert get_args(Callable[[], T][int]) == ([], int)
- populse_mia.utils.utils.get_origin(tp)[source]¶
Get the unsubscripted version of a type.
This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar, Annotated, and others. Return None for unsupported types.
Examples:
>>> P = ParamSpec('P') >>> assert get_origin(Literal[42]) is Literal >>> assert get_origin(int) is None >>> assert get_origin(ClassVar[int]) is ClassVar >>> assert get_origin(Generic) is Generic >>> assert get_origin(Generic[T]) is Generic >>> assert get_origin(Union[T, int]) is Union >>> assert get_origin(List[Tuple[T, T]][int]) is list >>> assert get_origin(P.args) is P
- class populse_mia.utils.utils.Node(pipeline, name, inputs, outputs)[source]¶
Bases:
ControllerBasic Node structure of the pipeline that need to be tuned.
It is possible to define custom nodes inheriting Node. To be usable in all contexts (GUI construction, pipeline save / reload), custom nodes should define a few additional instance and class methods which will allow automatic systems (such as
get_node_instance()) to reinstantiate and save them:- configure_controller(cls): classmethod
return a Controller instance which specifies parameters needed to build the node instance. Typically it may contain a parameters (plugs) list and other specifications.
- configured_controller(self): instance method:
on an instance, returns a Controller instance in the same shape as configure_controller above, but with values filled from the instance. This controller will allow saving parameters needed to instantiate again the node with the same state.
- build_node(cls, pipeline, name, conf_controller): class method
returns an instance of the node class, built using appropriate parameters (using configure_controller() or configured_controller() from another instance)
- __init__(pipeline, name, inputs, outputs)[source]¶
Generate a Node
- Parameters:
pipeline (Pipeline (mandatory)) – the pipeline object where the node is added
name (str (mandatory)) – the node name
inputs (list of dict (mandatory)) – a list of input parameters containing a dictionary with default values (mandatory key: name)
outputs (dict (mandatory)) – a list of output parameters containing a dictionary with default values (mandatory key: name)
- property process¶
- property full_name¶
- static _value_callback(self, source_plug_name, dest_node, dest_plug_name, value)[source]¶
Spread the source plug value to the destination plug.
- _value_callback_with_logging(log_stream, prefix, source_plug_name, dest_node, dest_plug_name, value)[source]¶
Spread the source plug value to the destination plug, and log it in a stream for debugging.
- disconnect(source_plug_name, dest_node, dest_plug_name, silent=False)[source]¶
disconnect linked plugs of two nodes
- cleanup()[source]¶
cleanup before deletion
disconnects all plugs, remove internal and cyclic references
- set_callback_on_plug(plug_name, callback)[source]¶
Add an event when a plug change
- Parameters:
plug_name (str (mandatory)) – a plug name
callback (@f (mandatory)) – a callback function
- remove_callback_from_plug(plug_name, callback)[source]¶
Remove an event when a plug change
- Parameters:
plug_name (str (mandatory)) – a plug name
callback (@f (mandatory)) – a callback function
- get_trait(trait_name)[source]¶
Return the desired trait
- Parameters:
trait_name (str (mandatory)) – a trait name
- Returns:
output – the trait named trait_name
- Return type:
trait
- get_connections_through(plug_name, single=False)[source]¶
If the node has internal links (inside a pipeline, or in a switch or other custom connection node), return the “other side” of the internal connection to the selected plug. The returned plug may be in an internal node (in a pipeline), or in an external node connected to the node. When the node is “opaque” (no internal connections), it returns the input plug. When the node is inactive / disabled, it returns [].
- Parameters:
- Returns:
[(node, plug_name, plug), …] Returns [(self, plug_name, plug)] when the plug has no internal connection.
- Return type:
connected_plug; list of tuples
- is_job()[source]¶
if True, the node will be represented as a Job in Soma-Workflow. Otherwise the node is static and does not run.
- requirements()[source]¶
Requirements needed to run the node. It is a dictionary which keys are config/settings modules and values are requests for them.
The default implementation returns an empty dict (no requirements), and should be overloaded by processes which actually have requirements.
Ex:
{'spm': 'version >= "12" and standalone == "True"')
- check_requirements(environment='global', message_list=None)[source]¶
Checks the process requirements against configuration settings values in the attached CapsulEngine. This makes use of the
requirements()method and checks that there is one matching config value for each required module.- Parameters:
- Returns:
config – if None is returned, requirements are not met: the process cannot run. If a dict is returned, it corresponds to the matching config values. When no requirements are needed, an empty dict is returned. A pipeline, if its requirements are met will return a list of configuration values, because different nodes may require different config values.
- Return type:
- get_missing_mandatory_parameters(exclude_links=False)[source]¶
Returns a list of parameters which are not optional, and which value is Undefined or None, or an empty string for a File or Directory parameter.
- Parameters:
exclude_links (bool) – if True, an empty parameter which has a link to another node will not be reported missing, since the execution will assign it a temporary value which will not prevent the pipeline from running.
- class populse_mia.utils.utils.Pipeline(autoexport_nodes_parameters=None, **kwargs)[source]¶
Bases:
ProcessPipeline containing Process nodes, and links between node parameters.
A Pipeline is normally subclassed, and its
pipeline_definition()method is overloaded to define its nodes and links.pipeline_definition()will be called by the pipeline constructor.from capsul.pipeline import Pipeline class MyPipeline(Pipeline): def pipeline_definition(self): self.add_process('proc1', 'my_toolbox.my_process1') self.add_process('proc2', 'my_toolbox.my_process2') self.add_switch('main_switch', ['in1', 'in2'], ['out1', 'out2']) self.add_link('proc1.out1->main_switch.in1_switch_out1') self.add_link('proc1.out2->main_switch.in1_switch_out2') self.add_link('proc2.out1->main_switch.in2_switch_out1') self.add_link('proc2.out1->main_switch.in2_switch_out2')
After execution of
pipeline_definition(), the inner nodes parameters which are not connected will be automatically exported to the parent pipeline, with names prefixed with their process name, unless they are listed in a special “do_not_export” list (passed toadd_process()or stored in the pipeline instance).>>> pipeline = MyPipeline() >>> print(pipeline.proc1_input) <undefined>
Nodes
A pipeline is made of nodes, and links between their parameters. Several types of nodes may be part of a pipeline:
process nodes (
pipeline_nodes.ProcessNode) are the leaf nodes which represent actual processing bricks.pipeline nodes (
pipeline_nodes.PipelineNode) are sub-pipelines which allow to reuse an existing pipeline within another oneswitch nodes (
pipeline_nodes.Switch) allows to select values between several possible inputs. The switch mechanism also allows to select between several alternative processes or processing branches.iterative process (:py:class:process_iteration.ProcessIteration`) represent parallel processing of the same pipeline on a set of parameters.
Note that you normally do not instantiate these nodes explicitly when building a pipeline. Rather programmers may call the
add_process(),add_switch(),add_iterative_process()methods.Nodes activation
Pipeline nodes may be enabled or disabled. Disabling a node will trigger a global pipeline nodes activation step, where all nodes which do not form a complete chain will be inactive. This way a branch may be disabled by disabling one of its nodes. This process is used by the switch system, which allows to select one processing branch between several, and disables the unselected ones.
Pipeline steps
Pipelines may define execution steps: they are user-oriented groups of nodes that are to be run together, or disabled together for runtime execution. They are intended to allow partial, or step-by-step execution. They do not work like the nodes enabling mechanism described above.
Steps may be defined within the
pipeline_definition()method. Seeadd_pipeline_step().Note also that pipeline steps only act at the highest level: if a sub-pipeline has disabled steps, they will not be taken into account in the higher level pipeline execution, because executing by steps a part of a sub-pipeline within the context of a higher one does generally not make sense.
Main methods
pipeline_definition()add_process()add_switch()add_custom_node()add_iterative_process()add_optional_output_switch()add_processes_selection()add_link()remove_link()export_parameter()autoexport_nodes_parameters()add_pipeline_step()define_pipeline_steps()define_groups_as_steps()remove_pipeline_step()enable_all_pipeline_steps()disabled_pipeline_steps_nodes()get_pipeline_step_nodes()find_empty_parameters()count_items()
- nodes¶
a dictionary containing the pipeline nodes and where the pipeline node name is ‘’
- Type:
dict {node_name: node}
Note
Type ‘Pipeline.help()’ for a full description of this process parameters.
Type ‘<Pipeline>.get_input_spec()’ for a full description of this process input trait types.
Type ‘<Pipeline>.get_output_spec()’ for a full description of this process output trait types.
- _doc_path = 'api/pipeline.html#pipeline'¶
- do_autoexport_nodes_parameters = True¶
- hide_nodes_activation = True¶
- __init__(autoexport_nodes_parameters=None, **kwargs)[source]¶
Initialize the Pipeline class
- Parameters:
autoexport_nodes_parameters (bool) – if True (default) nodes containing pipeline plugs are automatically exported.
- pipeline_definition()[source]¶
Define pipeline structure, nodes, sub-pipelines, switches, and links.
This method should be overloaded in subclasses, it does nothing in the base Pipeline class.
- autoexport_nodes_parameters(include_optional=False)[source]¶
Automatically export nodes plugs to the pipeline.
Some parameters can be explicitly preserved from exportation if they are listed in the pipeline “do_not_export” variable (list or set).
- Parameters:
include_optional (bool (optional)) – If True (the default), optional plugs are not exported Exception: optional output plugs of switches are exported (otherwise they are useless). It should probably be any single output plug of a node.
- add_trait(name, trait)[source]¶
Add a trait to the pipeline
- Parameters:
name (str (mandatory)) – the trait name
trait (trait instance (mandatory)) – the trait we want to add
- remove_trait(name)[source]¶
Remove a trait to the pipeline
- Parameters:
name (str (mandatory)) – the trait name
- reorder_traits(names)[source]¶
Reimplementation of
Controllermethodreorder_traits()so that we also reorder the pipeline node plugs.
- add_process(name, process, do_not_export=None, make_optional=None, inputs_to_copy=None, inputs_to_clean=None, skip_invalid=False, **kwargs)[source]¶
Add a new node in the pipeline
Note about invalid nodes:
A pipeline can typically offer alternatives (through a switch) to different algorithmic nodes, which may have different dependencies, or may be provided through external modules, thus can be missing. To handle this, Capsul can be telled that a process node can be invalid (or missing) without otherwise interfering the rest of the pipeline. This is done using the “skip_invalid” option. When used, the process to be added is tested, and if its instantiation fails, it will not be added in the pipeline, but will not trigger an error. Instead the missing node will be marked as “allowed invalid”, and links and exports built using this node will silently do nothing. thus the pipeline will work normally, without the invalid node.
Such nodes are generally gathered through a switch mechanism. However the switch inputs should be restricted to actually available nodes. The recommended method is to check that nodes have actually been added in the pipeline. Then links can be made normally as if the nodes were all present:
self.add_process('method1', 'module1.Module1', skip_invalid=True) self.add_process('method2', 'module2.Module2', skip_invalid=True) self.add_process('method3', 'module3.Module3', skip_invalid=True) input_params = [n for n in ['method1', 'method2', 'method3'] if n in self.nodes] self.add_switch('select_method', input_params, 'output') self.add_link('method1.input->select_method.method1_switch_output') self.add_link('method2.input->select_method.method2_switch_output') self.add_link('method3.input->select_method.method3_switch_output')
A last note about invalid nodes:
When saving a pipeline (through the
graphical editortypically), missing nodes will not be saved because they are not actually in the pipeline. So be careful to save only pipelines with full features.- Parameters:
name (str (mandatory)) – the node name (has to be unique).
process (Process (mandatory)) – the process we want to add. May be a string (‘module.process’), a process instance or a class.
do_not_export (list of str (optional)) – a list of plug names that we do not want to export.
make_optional (list of str (optional)) – a list of plug names that we do not want to export.
inputs_to_copy (list of str (optional)) – a list of item to copy.
inputs_to_clean (list of str (optional)) – a list of temporary items.
skip_invalid (bool) – if True, if the process is failing (cannot be instantiated), don’t throw an exception but instead don’t insert the node, and mark it as such in order to make add_link() to also silently do nothing. This option is useful for optional process nodes which may or may not be available depending on their dependencies, typically in a switch offering several alternative methods.
- add_iterative_process(name, process, iterative_plugs=None, do_not_export=None, make_optional=None, inputs_to_copy=None, inputs_to_clean=None, **kwargs)[source]¶
Add a new iterative node in the pipeline.
- Parameters:
name (str (mandatory)) – the node name (has to be unique).
process (Process or str (mandatory)) – the process we want to add.
iterative_plugs (list of str (optional)) – a list of plug names on which we want to iterate. If None, all plugs of the process will be iterated.
do_not_export (list of str (optional)) – a list of plug names that we do not want to export.
make_optional (list of str (optional)) – a list of plug names that we do not want to export.
inputs_to_copy (list of str (optional)) – a list of item to copy.
inputs_to_clean (list of str (optional)) – a list of temporary items.
- call_process_method(process_name, method, *args, **kwargs)[source]¶
Call a method of a process previously added with add_process or add_iterative_process.
- add_switch(name, inputs, outputs, export_switch=True, make_optional=(), output_types=None, switch_value=None, opt_nodes=None)[source]¶
Add a switch node in the pipeline
- Parameters:
name (str (mandatory)) – name for the switch node (has to be unique)
inputs (list of str (mandatory)) – names for switch inputs. Switch activation will select amongst them. Inputs names will actually be a combination of input and output, in the shape “input_switch_output”. This behaviour is needed when there are several outputs, and thus several input groups.
export_switch (bool (optional)) – if True, export the switch trigger to the parent pipeline with
nameas parameter namemake_optional (sequence (optional)) – list of optional outputs. These outputs will be made optional in the switch output. By default they are mandatory.
output_types (sequence of traits (optional)) – If given, this sequence should have the same size as outputs. It will specify each switch output parameter type (as a standard trait). Input parameters for each input block will also have this type.
switch_value (str (optional)) – Initial value of the switch parameter (one of the inputs names). Defaults to 1st input.
opt_nodes (bool or list) – tells that switch values are node names, and some of them may be optional and missing. In such a case, missing nodes are not added as inputs. If a list is passed, then it is a list of node names which length should match the number of inputs, and which order tells nodes related to inputs (in case inputs names are not directly node names).
Examples
>>> pipeline.add_switch('group_switch', ['in1', 'in2'], ['out1', 'out2'])
will create a switch with 4 inputs and 2 outputs: inputs: “in1_switch_out1”, “in2_switch_out1”, “in1_switch_out2”, “in2_switch_out2” outputs: “out1”, “out2”
- add_optional_output_switch(name, input, output=None)[source]¶
Add an optional output switch node in the pipeline
An optional switch activates or disables its input/output link according to the output value. If the output value is not None or Undefined, the link is active, otherwise it is inactive.
This kind of switch is meant to make a pipeline output optional, but still available for temporary files values inside the pipeline.
Ex:
A.output -> B.input
B.input is mandatory, but we want to make A.output available and optional in the pipeline outputs. If we directlty export A.output, then if the pipeline does not set a value, B.input will be empty and the pipeline run will fail.
Instead we can add an OptionalOutputSwitch between A.output and pipeline.output. If pipeline.output is set a valid value, then A.output and B.input will have the same valid value. If pipeline.output is left Undefined, then A.output and B.input will get a temporary value during the run.
Add an optional output switch node in the pipeline
- Parameters:
name (str (mandatory)) – name for the switch node (has to be unique)
input (str (mandatory)) – name for switch input. Switch activation will select between it and a hidden input, “_none”. Inputs names will actually be a combination of input and output, in the shape “input_switch_output”.
output (str (optional)) – name for output. Default is the switch name
Examples
>>> pipeline.add_optional_output_switch('out1', 'in1') >>> pipeline.add_link('node1.output->out1.in1_switch_out1')
See also
capsul.pipeline.pipeline_nodes.OptionalOutputSwitch
- add_custom_node(name, node_type, parameters=None, make_optional=(), do_not_export=None, **kwargs)[source]¶
Inserts a custom node (Node subclass instance which is not a Process) in the pipeline.
- Parameters:
node_type (str or Node subclass or Node instance) – node type to be built. Either a class (Node subclass) or a Node instance (the node will be re-instantiated), or a string describing a module and class.
parameters (dict or Controller or None) – configuration dict or Controller defining parameters needed to build the node. The controller should be obtained using the node class’s configure_node() static method, then filled with the desired values. If not given the node is supposed to be built with no parameters, which will not work for every node type.
make_optional (list or tuple) – parameters names to be made optional
do_not_export (list of str (optional)) – a list of plug names that we do not want to export.
kwargs (default values of node parameters)
- parse_link(link, check=True)[source]¶
Parse a link coming from export_parameter method.
- Parameters:
- Returns:
output – tuple containing the link description and instances
- Return type:
Examples
>>> Pipeline.parse_link("node1.plug1->node2.plug2") "node1", "plug1", <instance node1>, <instance plug1>, "node2", "plug2", <instance node2>, <instance plug2>
For a pipeline node:
>>> Pipeline.parse_link("plug1->node2.plug2") "", "plug1", <instance pipeline>, <instance plug1>, "node2", "plug2", <instance node2>, <instance plug2>
- add_link(link, weak_link=False, allow_export=False, value=None)[source]¶
Add a link between pipeline nodes.
If the destination node is a switch, force the source plug to be not optional.
- Parameters:
link (str or list/tuple) – link description. Its shape should be: “node.output->other_node.input”. If no node is specified, the pipeline itself is assumed. Alternatively the link can be (source_node, source_plug_name, dest_node, dest_plug_name)
weak_link (bool) – this property is used when nodes are optional, the plug information may not be generated.
allow_export (bool) – if True, if the link links from/to the pipeline node with a plug name which doesn’t exist, the plug will be created, and the function will act exactly like export_parameter. This may be a more convenient way of exporting/connecting pipeline plugs to several nodes without having to export the first one, then link the others.
value (any) – if given, set this value instead of the source plug value
- remove_link(link)[source]¶
Remove a link between pipeline nodes
- Parameters:
link (str or list/tuple) – link description. Its shape should be: “node.output->other_node.input”. If no node is specified, the pipeline itself is assumed. Alternatively the link can be (source_node, source_plug_name, dest_node, dest_plug_name)
- export_parameter(node_name, plug_name, pipeline_parameter=None, weak_link=False, is_enabled=None, is_optional=None, allow_existing_plug=None)[source]¶
Export a node plug at the pipeline level.
- Parameters:
node_name (str (mandatory)) – the name of node containing the plug we want to export
plug_name (str (mandatory)) – the node plug name we want to export
pipeline_parameter (str (optional)) – the name to access this parameter at the pipeline level. Default None, the plug name is used
weak_link (bool (optional)) – this property is used when nodes are weak, FIXME: what does it exactly mean ? the plug information may not be generated.
is_enabled (bool (optional)) – a property to specify that it is not a user-parameter automatic generation)
is_optional (bool (optional)) – sets the exported parameter to be optional
allow_existing_plug (bool (optional)) – the same pipeline plug may be connected to several process plugs
- propagate_metadata(node, param, metadata)[source]¶
Set metadata on a node parameter, and propagate these values to the connected plugs.
Typically needed to propagate the “forbid_completion” metadata to avoid manuyally set values to be overridden by completion.
node may be a Node instance or a node name
- all_nodes()[source]¶
Iterate over all pipeline nodes including sub-pipeline nodes.
- Returns:
nodes – Iterates over all nodes
- Return type:
Generator of Node
- _check_local_node_activation(node)[source]¶
Try to activate a node and its plugs according to its state and the state of its direct neighbouring nodes.
- _check_local_node_deactivation(node)[source]¶
Check plugs that have to be deactivated according to node activation state and to the state of its direct neighbouring nodes.
- update_nodes_and_plugs_activation()[source]¶
Reset all nodes and plugs activations according to the current state of the pipeline (i.e. switch selection, nodes disabled, etc.). Activations are set according to the following rules.
- workflow_graph(remove_disabled_steps=True, remove_disabled_nodes=True)[source]¶
Generate a workflow graph
- Returns:
graph (topological_sort.Graph) – graph representation of the workflow from the current state of the pipeline
remove_disabled_steps (bool (optional)) – When set, disabled steps (and their children) will not be included in the workflow graph. Default: True
remove_disabled_nodes (bool (optional)) – When set, disabled nodes will not be included in the workflow graph. Default: True
- workflow_ordered_nodes(remove_disabled_steps=True)[source]¶
Generate a workflow: list of process node to execute
- Returns:
workflow_list (list of Process) – an ordered list of Processes to execute
remove_disabled_steps (bool (optional)) – When set, disabled steps (and their children) will not be included in the workflow graph. Default: True
- _check_temporary_files_for_node(node, temp_files)[source]¶
Check temporary outputs and allocate files for them.
Temporary files or directories will be appended to the temp_files list, and the node parameters will be set to temp file names.
This internal function is called by the sequential execution, _run_process() (also used through __call__()). The pipeline state will be restored at the end of execution using _free_temporary_files().
- _free_temporary_files(temp_files)[source]¶
Delete and reset temp files after the pipeline execution.
This internal function is called at the end of _run_process() (sequential execution)
- _run_process()[source]¶
Pipeline execution is managed by StudyConfig class. This method must not be called.
- find_empty_parameters()[source]¶
Find internal File/Directory parameters not exported to the main input/output parameters of the pipeline with empty values. This is meant to track parameters which should be associated with temporary files internally.
- Returns:
Each element is a list with 3 values: node, parameter_name, optional
- Return type:
- count_items()[source]¶
Count pipeline items to get its size.
- Returns:
items – (nodes_count, processes_count, plugs_count, params_count, links_count, enabled_nodes_count, enabled_procs_count, enabled_links_count)
- Return type:
- pipeline_state()[source]¶
Return an object composed of basic Python objects that contains the whole structure and state of the pipeline. This object can be given to compare_to_state method in order to get the differences with a previously stored state. This is typically used in tests scripts.
- Returns:
pipeline_state – todo
- Return type:
dictionary
- compare_to_state(pipeline_state)[source]¶
Returns the differences between this pipeline and a previously recorded state.
- Returns:
differences – each element is a human readable string explaining one difference (e.g. ‘node “my_process” is missing’)
- Return type:
- install_links_debug_handler(log_file=None, handler=None, prefix='')[source]¶
Set callbacks when traits value change, and follow plugs links to debug links propagation and problems in it.
- Parameters:
log_file (str (optional)) – file-like object to write links propagation in. If none is specified, a temporary file will be created for it.
handler (function (optional)) – Callback to be processed for debugging. If none is specified, the default pipeline debugging function will be used. This default handler prints traits changes and links to be processed in the log_file. The handler function will receive a prefix string, a node, and traits parameters, namely the object (process) owning the changed value, the trait name and value in this object.
prefix (str (optional)) – prefix to be prepended to traits names, typically the parent pipeline full name
- Returns:
log_file
- Return type:
the file object where events will be written in
- uninstall_links_debug_handler()[source]¶
Remove links debugging callbacks set by install_links_debug_handler
- define_pipeline_steps(steps)[source]¶
Define steps in the pipeline. Steps are pipeline portions that form groups, and which can be enabled or disabled on a runtime basis (when building workflows).
Once steps are defined, their activation may be accessed through the “step” trait, which has one boolean property for each step:
Ex:
steps = OrderedDict() steps['preprocessings'] = [ 'normalization', 'bias_correction', 'histo_analysis'] steps['brain_extraction'] = [ 'brain_segmentation', 'hemispheres_split'] pipeline.define_pipeline_steps(steps)
>>> print(pipeline.pipeline_steps.preprocessings) True
>>> pipeline.pipeline_steps.brain_extraction = False
See also add_pipeline_step()
- Parameters:
steps (dict or preferably OrderedDict or SortedDictionary (mandatory)) – The steps dict keys are steps names, the values are lists of nodes names forming the step.
- add_pipeline_step(step_name, nodes, enabled=True)[source]¶
Add a step definition to the pipeline (see also define_steps).
Steps are groups of pipeline nodes, which may be disabled at runtime. They are normally defined in a logical order regarding the workflow streams. They are different from pipelines in that steps are purely virtual groups, they do not have parameters.
Disabling a step acts differently as the pipeline node activation: other nodes are not inactivated according to their dependencies. Instead, those steps are not run.
- disabled_pipeline_steps_nodes()[source]¶
List nodes disabled for runtime execution
- Returns:
disabled_nodes – list of pipeline nodes (Node instances) which will not run in a workflow created from this pipeline state.
- Return type:
- enable_all_pipeline_steps()[source]¶
Set all defined steps (using add_step() or define_steps()) to be enabled. Useful to reset the pipeline state after it has been changed.
- add_processes_selection(selection_parameter, selection_groups, value=None)[source]¶
Add a processes selection switch definition to the pipeline.
Selectors are a “different” kind of switch: one pipeline node set in a group is enabled, the others are disabled.
The selector has 2 levels:
selection_parameter selects a group.
A group contains a set of nodes which will be activated together. Groups are mutually exclusive.
- Parameters:
selection_parameter (string (mandatory)) – name of the selector parameter: the parameter is added in the pipeline, and its value is the name of the selected group.
selection_groups (dict or OrderedDict) – nodes groups contained in the selector : {group_name: [Node names]}
value (str (optional)) – initial state of the selector (default: 1st group)
- get_processes_selections()[source]¶
Get process_selection groups names (corresponding to selection parameters on the pipeline)
- get_processes_selection_groups(selection_parameter)[source]¶
Get groups names involved in a processes selection switch
- get_processes_selection_nodes(selection_parameter, group)[source]¶
Get nodes names involved in a processes selection switch with value group
- set_study_config(study_config)[source]¶
Set a StudyConfig for the process. Note that it can only be done once: once a non-null StudyConfig has been assigned to the process, it should not change.
- define_groups_as_steps(exclusive=True)[source]¶
Define parameters groups according to which steps they are connected to.
- Parameters:
exclusive (bool (optional)) – if True, a parameter is assigned to a single group, the first step it is connected to. If False, a parameter is assigned all steps groups it is connected to.
- check_requirements(environment='global', message_list=None)[source]¶
Reimplementation for pipelines of
capsul.process.process.Process.check_requirementsA pipeline will return a list of unique configuration values.
- class populse_mia.utils.utils.Process(**kwargs)[source]¶
Bases:
ControllerA process is an atomic component that contains a processing.
A process is typically an object with typed parameters, and an execution function. Parameters are described using Enthought traits through Soma-Base Controller base class.
In addition to describing its parameters, a Process must implement its execution function, either through a python method, by overloading
_run_process(), or through a commandline execution, by overloadingget_commandline(). The second way allows to run on a remote processing machine which has not necessary capsul, nor python, installed.Parameters are declared or queried using the traits API, and their values are in the process instance variables:
from __future__ import print_function from capsul.api import Process import traits.api as traits class MyProcess(Process): # a class trait param1 = traits.Str('def_param1') def __init__(self): super(MyProcess, self).__init__() # declare an input param self.add_trait('param2', traits.Int()) # declare an output param self.add_trait('out_param', traits.File(output=True)) def _run_process(self): with open(self.out_param, 'w') as f: print('param1:', self.param1, file=f) print('param2:', self.param2, file=f) # run it with parameters MyProcess()(param2=12, out_param='/tmp/log.txt')
Note about the File and Directory traits
The
Filetrait type represents a file parameter. A file is actually two things: a filename (string), and the file itself (on the filesystem). For an input it is OK not to distinguish them, but for an output, there are two different cases:the file (on the filesystem) is an output, but the filename (string) is given as an input: this is the classical “commandline” behavior, when we tell the program where it should write its output file.
the file is an output, and the filename is also an output: this is rather a “function return value” behavior: the process determines internally where it should write the file, and tells as an output where it did.
To distinguish these two cases, in Capsul we normally add in the
FileorDirectorytrait a propertyinput_filenamewhich is True when the filename is an input, and False when the filename is an output:self.add_trait('out_file', traits.File(output=True, input_filename=False))
However, as most of our processes are based on the “commandline behavior” (the filename is an input) and we often forget to specify the
input_filenameparameter, the default is the “filename is an input” behavior, when not specified.Attributes
- log_file¶
if None, the log will be generated in the current directory otherwise it will be written in log_file path.
- Type:
str (default None)
Note
Type ‘Process.help()’ for a full description of this process parameters.
Type ‘<Process>.get_input_spec()’ for a full description of this process input trait types.
Type ‘<Process>.get_output_spec()’ for a full description of this process output trait types.
- add_trait(name, trait)[source]¶
Ensure that trait.output and trait.optional are set to a boolean value before calling parent class add_trait.
- _run_process()[source]¶
Runs the processings when the instance is called.
Either this _run_process() or
get_commandline()must be defined in derived classes.Note that _run_process() is called as a python function, on a Process instance. When using remote processing (cluster for instance), this means that the commandline which will run needs to be able to re- instantiate the same process: the process thus has to be stored in a file or python module which can be accessed from the remote machine, and python / capsul correctly installed and available on it.
get_commandline()at the contrary, can implement commandlines which are completely independent from Capsul, and from python.Note
If both methods are not defined in the derived class a NotImplementedError error is raised.
On the other side, if both methods are overloaded, the process behavior in local sequential computing mode and in Soma-Workflow modes may be different.
- _before_run_process()[source]¶
This method is called by StudyConfig.run() before calling _run_process(). By default, it does nothing but can be overridden in derived classes.
- _after_run_process(run_process_result)[source]¶
This method is called by StudyConfig.run() after calling _run_process(). It is expected to return the final result of the process. By default, it does nothing but can be overridden in derived classes.
- _get_log(exec_info)[source]¶
Method that generate the logging structure from the execution information and class attributes.
- save_log(returncode)[source]¶
Method to save process execution information in json format.
If the class attribute log_file is not set, a log.json output file is generated in the process call current working directory.
- Parameters:
returncode (ProcessResult) – the process result return code.
- classmethod help(returnhelp=False)[source]¶
Method to print the full help.
- Parameters:
cls (process class (mandatory)) – a process class
returnhelp (bool (optional, default False)) – if True return the help string message, otherwise display it on the console.
- get_commandline()[source]¶
Method to generate a commandline representation of the process.
If not implemented, it will generate a commandline running python, instantiating the current process, and calling its
_run_process()method.- Returns:
commandline – Arguments are in separate elements of the list.
- Return type:
list of strings
- params_to_command()[source]¶
Generates a commandline representation of the process.
If not implemented, it will generate a commandline running python, instantiating the current process, and calling its
_run_process()method.This method is new in Capsul v3 and is a replacement for
get_commandline().It can be overwritten by custom Process subclasses. Actually each process should overwrite either
params_to_command()or_run_process().The returned commandline is a list, which first element is a “method”, and others are the actual commandline with arguments. There are several methods, the process is free to use either of the supported ones, depending on how the execution is implemented.
Methods:
- capsul_job: Capsul process run in python
The command will run the
_run_process()execution method of the process, after loading input parameters from a JSON dictionary file. The only second element in the commandline list is the process identifier (module/class as inget_process_instance()). The location of the JSON file will be passed to the job execution through an environment variable SOMAWF_INPUT_PARAMS:return ['capsul_job', 'morphologist.capsul.morphologist']
- format_string: free commandline with replacements for parameters
Command arguments can be, or contain, format strings in the shape ‘%(param)s’, where param is a parameter of the process. This way we can map values correctly, and call a foreign command:
return ['format_string', 'ls', '%(input_dir)s']
- json_job: free commandline with JSON file for input parameters
A bit like capsul_job but without the automatic wrapper:
return ['json_job', 'python', '-m', 'my_module']
- Returns:
commandline – Arguments are in separate elements of the list.
- Return type:
list of strings
- make_commandline_argument(*args)[source]¶
This helper function may be used to build non-trivial commandline arguments in get_commandline implementations. Basically it concatenates arguments, but it also takes care of keeping track of temporary file objects (if any), and converts non-string arguments to strings (using repr()).
Ex:
>>> process.make_commandline_argument('param=', self.param)
will return the same as:
>>> 'param=' + self.param
if self.param is a string (file name) or a temporary path.
- static run_from_commandline(process_definition)[source]¶
Run a process from a commandline call. The process name (with module) are given in argument, input parameters should be passed through a JSON file which location is in the
SOMAWF_INPUT_PARAMSenvironment variable.If the process has outputs, the
SOMAWF_OUTUT_PARAMSenvironment variable should contain the location of an output file which will be written with a dict containing output parameters values.
- get_input_spec()[source]¶
Method to access the process input specifications.
- Returns:
outputs – a string representation of all the input trait specifications.
- Return type:
- get_output_spec()[source]¶
Method to access the process output specifications.
- Returns:
outputs – a string representation of all the output trait specifications.
- Return type:
- get_inputs()[source]¶
Method to access the process inputs.
- Returns:
outputs – a dictionary with all the input trait names and values.
- Return type:
- get_outputs()[source]¶
Method to access the process outputs.
- Returns:
outputs – a dictionary with all the output trait names and values.
- Return type:
- set_parameter(name, value, protected=None)[source]¶
Method to set a process instance trait value.
For File and Directory traits the None value is replaced by the special Undefined trait value.
- set_study_config(study_config)[source]¶
Set a StudyConfig for the process. Note that it can only be done once: once a non-null StudyConfig has been assigned to the process, it should not change.
- get_missing_mandatory_parameters()[source]¶
Returns a list of parameters which are not optional, and which value is Undefined or None, or an empty string for a File or Directory parameter.
- requirements()[source]¶
Requirements needed to run the process. It is a dictionary which keys are config/settings modules and values are requests for them.
The default implementation returns an empty dict (no requirements), and should be overloaded by processes which actually have requirements.
Ex:
{'spm': 'version >= "12" and standalone == "True"')
- check_requirements(environment='global', message_list=None)[source]¶
Checks the process requirements against configuration settings values in the attached CapsulEngine. This makes use of the
requirements()method and checks that there is one matching config value for each required module.- Parameters:
- Returns:
config – if None is returned, requirements are not met: the process cannot run. If a dict is returned, it corresponds to the matching config values. When no requirements are needed, an empty dict is returned. A pipeline, if its requirements are met will return a list of configuration values, because different nodes may require different config values.
- Return type:
- class populse_mia.utils.utils.ProcessNode(pipeline, name, process, **kwargs)[source]¶
Bases:
NodeProcess node.
- process¶
the process instance stored in the pipeline node
- Type:
process instance
- set_callback_on_plug(plug_name, callback)[source]¶
Add an event when a plug change
- Parameters:
plug_name (str (mandatory)) – a plug name
callback (@f (mandatory)) – a callback function
- remove_callback_from_plug(plug_name, callback)[source]¶
Remove an event when a plug change
- Parameters:
plug_name (str (mandatory)) – a plug name
callback (@f (mandatory)) – a callback function
- protect_parameter(plug_name, state=True)[source]¶
Protect the named parameter.
Protecting is not a real lock, it just marks the parameter a list of “protected” parameters. This is typically used to mark values that have been set manually by the user (using the ControllerWidget for instance) and that should not be later modified by automatic parameters tweaking (such as completion systems).
Protected parameters are listed in an additional trait, “protected_parameters”.
If the “state” parameter is False, then we will unprotect it (calling unprotect_parameter())
- get_trait(trait_name)[source]¶
Return the desired trait
- Parameters:
trait_name (str (mandatory)) – a trait name
- Returns:
output – the trait named trait_name
- Return type:
trait
- is_job()[source]¶
if True, the node will be represented as a Job in Soma-Workflow. Otherwise the node is static and does not run.
- requirements()[source]¶
Requirements reimplementation for a process node. This node delegates to its underlying process. see
capsul.process.process.requirements()
- check_requirements(environment='global', message_list=None)[source]¶
Reimplementation of
capsul.pipeline.pipeline_nodes.Node.requirements()for a ProcessNode. This one delegates to its underlying process (or pipeline).
- property study_config¶
- property completion_engine¶
- populse_mia.utils.utils.get_process_instance(process_or_id, study_config=None, **kwargs)[source]¶
Return a Process instance given an identifier.
Note that it is convenient to create a process from a StudyConfig instance: StudyConfig.get_process_instance()
The identifier is either:
a derived Process class.
a derived Process class instance.
a Nipype Interface instance.
a Nipype Interface class.
a string description of the class <module>.<class>.
a string description of a function to warp <module>.<function>.
a string description of a module containing a single process <module>
a string description of a pipeline <module>.<fname>.xml.
an XML filename for a pipeline.
a JSON filename for a pipeline.
a Python (.py) filename with process name in it: /path/process_source.py#ProcessName.
a Python (.py) filename for a file containing a single process.
Default values of the process instance are passed as additional parameters.
- Parameters:
process_or_id (instance or class description (mandatory)) – a process/nipype interface instance/class or a string description.
study_config (StudyConfig instance (optional)) – A Process instance belongs to a StudyConfig framework. If not specified the study_config can be set afterwards.
kwargs – default values of the process instance parameters.
- Returns:
result – an initialized process instance.
- Return type:
- class populse_mia.utils.utils.QDate¶
- class populse_mia.utils.utils.QDate(y: int, m: int, d: int)
- class populse_mia.utils.utils.QDate(y: int, m: int, d: int, cal: QCalendar)
- class populse_mia.utils.utils.QDate(a0: QDate)
Bases:
simplewrapper- DateFormat = 0¶
- StandaloneFormat = 1¶
- daysTo(self, a0: QDate | datetime.date) int¶
- endOfDay(self, spec: Qt.TimeSpec = Qt.LocalTime, offsetSeconds: int = 0) QDateTime¶
- endOfDay(self, zone: QTimeZone) QDateTime
- fromString(string: str | None, format: Qt.DateFormat = Qt.TextDate) QDate¶
- fromString(s: str | None, format: str | None) QDate
- fromString(s: str | None, format: str | None, cal: QCalendar) QDate
- getDate(self)¶
- longDayName(weekday: int, type: QDate.MonthNameType = QDate.DateFormat) str¶
- longMonthName(month: int, type: QDate.MonthNameType = QDate.DateFormat) str¶
- setDate(self, year: int, month: int, date: int) bool¶
- setDate(self, year: int, month: int, day: int, cal: QCalendar) bool
- shortDayName(weekday: int, type: QDate.MonthNameType = QDate.DateFormat) str¶
- shortMonthName(month: int, type: QDate.MonthNameType = QDate.DateFormat) str¶
- startOfDay(self, spec: Qt.TimeSpec = Qt.LocalTime, offsetSeconds: int = 0) QDateTime¶
- startOfDay(self, zone: QTimeZone) QDateTime
- toPyDate(self) datetime.date¶
- toPython(*args, **kwargs)¶
- toString(self, format: Qt.DateFormat = Qt.TextDate) str¶
- toString(self, f: Qt.DateFormat, cal: QCalendar) str
- toString(self, format: str | None) str
- toString(self, format: str | None, cal: QCalendar) str
- weekNumber(self)¶
- class populse_mia.utils.utils.QDateTime¶
- class populse_mia.utils.utils.QDateTime(other: QDateTime | datetime.datetime)
- class populse_mia.utils.utils.QDateTime(a0: QDate | datetime.date)
- class populse_mia.utils.utils.QDateTime(date: QDate | datetime.date, time: QTime | datetime.time, timeSpec: Qt.TimeSpec = Qt.LocalTime)
- class populse_mia.utils.utils.QDateTime(year: int, month: int, day: int, hour: int, minute: int, second: int = 0, msec: int = 0, timeSpec: int = 0)
- class populse_mia.utils.utils.QDateTime(date: QDate | datetime.date, time: QTime | datetime.time, spec: Qt.TimeSpec, offsetSeconds: int)
- class populse_mia.utils.utils.QDateTime(date: QDate | datetime.date, time: QTime | datetime.time, timeZone: QTimeZone)
Bases:
simplewrapper- First = -292275056¶
- Last = 292278994¶
- class YearRange(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
IntEnum- First = -292275056¶
- Last = 292278994¶
- daysTo(self, a0: QDateTime | datetime.datetime) int¶
- fromMSecsSinceEpoch(msecs: int) QDateTime¶
- fromMSecsSinceEpoch(msecs: int, spec: Qt.TimeSpec, offsetSeconds: int = 0) QDateTime
- fromMSecsSinceEpoch(msecs: int, timeZone: QTimeZone) QDateTime
- fromSecsSinceEpoch(secs: int, spec: Qt.TimeSpec = Qt.LocalTime, offsetSeconds: int = 0) QDateTime¶
- fromSecsSinceEpoch(secs: int, timeZone: QTimeZone) QDateTime
- fromString(string: str | None, format: Qt.DateFormat = Qt.TextDate) QDateTime¶
- fromString(s: str | None, format: str | None) QDateTime
- fromString(s: str | None, format: str | None, cal: QCalendar) QDateTime
- fromTime_t(secsSince1Jan1970UTC: int) QDateTime¶
- fromTime_t(secsSince1Jan1970UTC: int, spec: Qt.TimeSpec, offsetSeconds: int = 0) QDateTime
- fromTime_t(secsSince1Jan1970UTC: int, timeZone: QTimeZone) QDateTime
- msecsTo(self, a0: QDateTime | datetime.datetime) int¶
- secsTo(self, a0: QDateTime | datetime.datetime) int¶
- setDate(self, date: QDate | datetime.date)¶
- setTime(self, time: QTime | datetime.time)¶
- setTimeSpec(self, spec: Qt.TimeSpec)¶
- setTimeZone(self, toZone: QTimeZone)¶
- timeSpec(self) Qt.TimeSpec¶
- timeZone(self) QTimeZone¶
- toPyDateTime(self) datetime.datetime¶
- toPython(*args, **kwargs)¶
- toString(self, format: Qt.DateFormat = Qt.TextDate) str¶
- toString(self, format: str | None) str
- toString(self, format: str | None, cal: QCalendar) str
- toTimeSpec(self, spec: Qt.TimeSpec) QDateTime¶
- class populse_mia.utils.utils.QDir(a0: QDir)¶
- class populse_mia.utils.utils.QDir(path: str | None = '')
- class populse_mia.utils.utils.QDir(path: str | None, nameFilter: str | None, sort: QDir.SortFlags = QDir.Name | QDir.IgnoreCase, filters: QDir.Filters = QDir.AllEntries)
Bases:
simplewrapper- AccessMask = 1008¶
- AllDirs = 1024¶
- AllEntries = 7¶
- CaseSensitive = 2048¶
- Dirs = 1¶
- DirsFirst = 4¶
- DirsLast = 32¶
- Drives = 4¶
- Executable = 64¶
- Files = 2¶
- class Filters¶
- class Filters(f: QDir.Filters | QDir.Filter)
- class Filters(a0: QDir.Filters)
Bases:
simplewrapper
- Hidden = 256¶
- IgnoreCase = 16¶
- LocaleAware = 64¶
- Modified = 128¶
- Name = 0¶
- NoDot = 8192¶
- NoDotAndDotDot = 24576¶
- NoDotDot = 16384¶
- NoFilter = -1¶
- NoSort = -1¶
- NoSymLinks = 8¶
- PermissionMask = 112¶
- Readable = 16¶
- Reversed = 8¶
- Size = 2¶
- SortByMask = 3¶
- class SortFlags¶
- class SortFlags(f: QDir.SortFlags | QDir.SortFlag)
- class SortFlags(a0: QDir.SortFlags)
Bases:
simplewrapper
- System = 512¶
- Time = 1¶
- Type = 128¶
- TypeMask = 15¶
- Unsorted = 3¶
- Writable = 32¶
- entryInfoList(self, filters: QDir.Filters | QDir.Filter = QDir.NoFilter, sort: QDir.SortFlags | QDir.SortFlag = QDir.SortFlag.NoSort) List[QFileInfo]¶
- entryInfoList(self, nameFilters: Iterable[str | None], filters: QDir.Filters | QDir.Filter = QDir.NoFilter, sort: QDir.SortFlags | QDir.SortFlag = QDir.SortFlag.NoSort) List[QFileInfo]
- entryList(self, filters: QDir.Filters | QDir.Filter = QDir.NoFilter, sort: QDir.SortFlags | QDir.SortFlag = QDir.SortFlag.NoSort) List[str]¶
- entryList(self, nameFilters: Iterable[str | None], filters: QDir.Filters | QDir.Filter = QDir.NoFilter, sort: QDir.SortFlags | QDir.SortFlag = QDir.SortFlag.NoSort) List[str]
- filter(self) QDir.Filters¶
- isEmpty(self, filters: QDir.Filters | QDir.Filter = QDir.AllEntries | QDir.NoDotAndDotDot) bool¶
- match(filters: Iterable[str | None], fileName: str | None) bool¶
- match(filter: str | None, fileName: str | None) bool
- refresh(self)¶
- setFilter(self, filter: QDir.Filters | QDir.Filter)¶
- setSorting(self, sort: QDir.SortFlags | QDir.SortFlag)¶
- sorting(self) QDir.SortFlags¶
- class populse_mia.utils.utils.QLockFile(fileName: str | None)¶
Bases:
simplewrapper- LockFailedError = 1¶
- NoError = 0¶
- PermissionError = 2¶
- UnknownError = 3¶
- error(self) QLockFile.LockError¶
- getLockInfo(self)¶
- unlock(self)¶
- class populse_mia.utils.utils.Qt¶
Bases:
simplewrapper- AA_CompressHighFrequencyEvents = 25¶
- AA_CompressTabletEvents = 29¶
- AA_DisableHighDpiScaling = 21¶
- AA_DisableNativeVirtualKeyboard = 9¶
- AA_DisableSessionManager = 31¶
- AA_DisableShaderDiskCache = 27¶
- AA_DisableWindowContextHelpButton = 30¶
- AA_DontCheckOpenGLContextThreadAffinity = 26¶
- AA_DontCreateNativeWidgetSiblings = 4¶
- AA_DontShowIconsInMenus = 2¶
- AA_DontShowShortcutsInContextMenus = 28¶
- AA_DontUseNativeDialogs = 23¶
- AA_DontUseNativeMenuBar = 6¶
- AA_EnableHighDpiScaling = 20¶
- AA_ForceRasterWidgets = 14¶
- AA_ImmediateWidgetCreation = 0¶
- AA_MSWindowsUseDirect3DByDefault = 1¶
- AA_MacDontSwapCtrlAndMeta = 7¶
- AA_MacPluginApplication = 5¶
- AA_NativeWindows = 3¶
- AA_PluginApplication = 5¶
- AA_SetPalette = 19¶
- AA_SynthesizeMouseForUnhandledTabletEvents = 24¶
- AA_SynthesizeMouseForUnhandledTouchEvents = 12¶
- AA_SynthesizeTouchForUnhandledMouseEvents = 11¶
- AA_Use96Dpi = 8¶
- AA_UseDesktopOpenGL = 15¶
- AA_UseHighDpiPixmaps = 13¶
- AA_UseOpenGLES = 16¶
- AA_UseSoftwareOpenGL = 17¶
- AA_UseStyleSheetPropagationInWidgetStyles = 22¶
- AA_X11InitThreads = 10¶
- ALT = 134217728¶
- AbsoluteSize = 0¶
- AccessibleDescriptionRole = 12¶
- AccessibleTextRole = 11¶
- ActionMask = 255¶
- ActionsContextMenu = 2¶
- ActiveWindowFocusReason = 3¶
- AddToSelection = 1¶
- AlignAbsolute = 16¶
- AlignBaseline = 256¶
- AlignBottom = 64¶
- AlignCenter = 132¶
- AlignHCenter = 4¶
- AlignHorizontal_Mask = 31¶
- AlignJustify = 8¶
- AlignLeading = 1¶
- AlignLeft = 1¶
- AlignRight = 2¶
- AlignTop = 32¶
- AlignTrailing = 2¶
- AlignVCenter = 128¶
- AlignVertical_Mask = 480¶
- class Alignment¶
- class Alignment(f: Qt.Alignment | Qt.AlignmentFlag)
- class Alignment(a0: Qt.Alignment)
Bases:
simplewrapper
- AllButtons = 134217727¶
- AllDockWidgetAreas = 15¶
- AllToolBarAreas = 15¶
- AltModifier = 134217728¶
- AnchorBottom = 5¶
- AnchorHorizontalCenter = 1¶
- AnchorLeft = 0¶
- AnchorRight = 2¶
- AnchorTop = 3¶
- AnchorVerticalCenter = 4¶
- ApplicationActive = 4¶
- ApplicationHidden = 1¶
- ApplicationInactive = 2¶
- ApplicationModal = 2¶
- ApplicationShortcut = 2¶
- class ApplicationStates¶
- class ApplicationStates(f: Qt.ApplicationStates | Qt.ApplicationState)
- class ApplicationStates(a0: Qt.ApplicationStates)
Bases:
simplewrapper
- ApplicationSuspended = 0¶
- ArrowCursor = 0¶
- AscendingOrder = 0¶
- AutoColor = 0¶
- AutoConnection = 0¶
- AutoDither = 0¶
- AutoText = 2¶
- AvoidDither = 128¶
- BDiagPattern = 12¶
- BackButton = 8¶
- BackgroundColorRole = 8¶
- BackgroundRole = 8¶
- BacktabFocusReason = 2¶
- BeginNativeGesture = 0¶
- BevelJoin = 64¶
- BitmapCursor = 24¶
- BlankCursor = 10¶
- BlockingQueuedConnection = 3¶
- BottomDockWidgetArea = 8¶
- BottomEdge = 8¶
- BottomLeftCorner = 2¶
- BottomLeftSection = 8¶
- BottomRightCorner = 3¶
- BottomRightSection = 6¶
- BottomSection = 7¶
- BottomToolBarArea = 8¶
- BusyCursor = 16¶
- BypassGraphicsProxyWidget = 536870912¶
- BypassWindowManagerHint = 1024¶
- CTRL = 67108864¶
- CaseInsensitive = 0¶
- CaseSensitive = 1¶
- Ceil = 2¶
- CheckStateRole = 10¶
- Checked = 2¶
- ChecksumIso3309 = 0¶
- ChecksumItuV41 = 1¶
- ClickFocus = 2¶
- ClosedHandCursor = 18¶
- CoarseTimer = 1¶
- ColorOnly = 3¶
- ConicalGradientPattern = 17¶
- ContainsItemBoundingRect = 2¶
- ContainsItemShape = 0¶
- ControlModifier = 67108864¶
- CopyAction = 1¶
- CoverWindow = 65¶
- CrossCursor = 2¶
- CrossPattern = 11¶
- CustomContextMenu = 3¶
- CustomCursor = 25¶
- CustomDashLine = 6¶
- CustomGesture = 256¶
- CustomizeWindowHint = 33554432¶
- DashDotDotLine = 5¶
- DashDotLine = 4¶
- DashLine = 2¶
- DecorationRole = 1¶
- DefaultContextMenu = 1¶
- DefaultLocaleLongDate = 7¶
- DefaultLocaleShortDate = 6¶
- Dense1Pattern = 2¶
- Dense2Pattern = 3¶
- Dense3Pattern = 4¶
- Dense4Pattern = 5¶
- Dense5Pattern = 6¶
- Dense6Pattern = 7¶
- Dense7Pattern = 8¶
- DescendingOrder = 1¶
- Desktop = 17¶
- DeviceCoordinates = 0¶
- DiagCrossPattern = 14¶
- Dialog = 3¶
- DiffuseAlphaDither = 8¶
- DiffuseDither = 0¶
- DirectConnection = 1¶
- DisplayRole = 0¶
- DockWidgetArea_Mask = 15¶
- class DockWidgetAreas¶
- class DockWidgetAreas(f: Qt.DockWidgetAreas | Qt.DockWidgetArea)
- class DockWidgetAreas(a0: Qt.DockWidgetAreas)
Bases:
simplewrapper
- DontStartGestureOnChildren = 1¶
- DotLine = 3¶
- DownArrow = 2¶
- DragCopyCursor = 19¶
- DragLinkCursor = 21¶
- DragMoveCursor = 20¶
- Drawer = 7¶
- class DropActions¶
- class DropActions(f: Qt.DropActions | Qt.DropAction)
- class DropActions(a0: Qt.DropActions)
Bases:
simplewrapper
- EditRole = 2¶
- ElideLeft = 0¶
- ElideMiddle = 2¶
- ElideNone = 3¶
- ElideRight = 1¶
- EndNativeGesture = 1¶
- EnterKeyDefault = 0¶
- EnterKeyDone = 2¶
- EnterKeyGo = 3¶
- EnterKeyNext = 6¶
- EnterKeyPrevious = 7¶
- EnterKeyReturn = 1¶
- EnterKeySearch = 5¶
- EnterKeySend = 4¶
- ExactHit = 0¶
- ExtraButton1 = 8¶
- ExtraButton10 = 4096¶
- ExtraButton11 = 8192¶
- ExtraButton12 = 16384¶
- ExtraButton13 = 32768¶
- ExtraButton14 = 65536¶
- ExtraButton15 = 131072¶
- ExtraButton16 = 262144¶
- ExtraButton17 = 524288¶
- ExtraButton18 = 1048576¶
- ExtraButton19 = 2097152¶
- ExtraButton2 = 16¶
- ExtraButton20 = 4194304¶
- ExtraButton21 = 8388608¶
- ExtraButton22 = 16777216¶
- ExtraButton23 = 33554432¶
- ExtraButton24 = 67108864¶
- ExtraButton3 = 32¶
- ExtraButton4 = 64¶
- ExtraButton5 = 128¶
- ExtraButton6 = 256¶
- ExtraButton7 = 512¶
- ExtraButton8 = 1024¶
- ExtraButton9 = 2048¶
- FDiagPattern = 13¶
- FastTransformation = 0¶
- class FindChildOptions¶
- class FindChildOptions(f: Qt.FindChildOptions | Qt.FindChildOption)
- class FindChildOptions(a0: Qt.FindChildOptions)
Bases:
simplewrapper
- FindChildrenRecursively = 1¶
- FindDirectChildrenOnly = 0¶
- FlatCap = 0¶
- Floor = 3¶
- FontRole = 6¶
- ForbiddenCursor = 14¶
- ForegroundRole = 9¶
- ForeignWindow = 33¶
- ForwardButton = 16¶
- FramelessWindowHint = 2048¶
- Friday = 5¶
- FuzzyHit = 1¶
- GestureCanceled = 4¶
- GestureFinished = 3¶
- class GestureFlags¶
- class GestureFlags(f: Qt.GestureFlags | Qt.GestureFlag)
- class GestureFlags(a0: Qt.GestureFlags)
Bases:
simplewrapper
- GestureStarted = 1¶
- GestureUpdated = 2¶
- GroupSwitchModifier = 1073741824¶
- class HighDpiScaleFactorRoundingPolicy(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
IntEnum- Ceil = 2¶
- Floor = 3¶
- PassThrough = 5¶
- Round = 1¶
- RoundPreferFloor = 4¶
- HighDpiScaleFactorRoundingPolicys¶
alias of
HighDpiScaleFactorRoundingPolicy
- HighEventPriority = 1¶
- HorPattern = 9¶
- Horizontal = 1¶
- IBeamCursor = 4¶
- ISODate = 1¶
- ISODateWithMs = 9¶
- IgnoreAction = 0¶
- IgnoreAspectRatio = 0¶
- IgnoredGesturesPropagateToParent = 4¶
- ImAbsolutePosition = 1024¶
- ImAnchorPosition = 128¶
- ImAnchorRectangle = 16384¶
- ImCurrentSelection = 32¶
- ImCursorPosition = 8¶
- ImCursorRectangle = 2¶
- ImEnabled = 1¶
- ImEnterKeyType = 8192¶
- ImFont = 4¶
- ImHints = 256¶
- ImInputItemClipRectangle = 32768¶
- ImMaximumTextLength = 64¶
- ImMicroFocus = 2¶
- ImPlatformData = -2147483648¶
- ImPreferredLanguage = 512¶
- ImQueryAll = -1¶
- ImQueryInput = 16570¶
- ImSurroundingText = 16¶
- ImTextAfterCursor = 4096¶
- ImTextBeforeCursor = 2048¶
- class ImageConversionFlags¶
- class ImageConversionFlags(f: Qt.ImageConversionFlags | Qt.ImageConversionFlag)
- class ImageConversionFlags(a0: Qt.ImageConversionFlags)
Bases:
simplewrapper
- ImhDate = 128¶
- ImhDialableCharactersOnly = 1048576¶
- ImhDigitsOnly = 65536¶
- ImhEmailCharactersOnly = 2097152¶
- ImhExclusiveInputMask = -65536¶
- ImhFormattedNumbersOnly = 131072¶
- ImhHiddenText = 1¶
- ImhLatinOnly = 8388608¶
- ImhLowercaseOnly = 524288¶
- ImhMultiLine = 1024¶
- ImhNoAutoUppercase = 4¶
- ImhNoEditMenu = 2048¶
- ImhNoPredictiveText = 64¶
- ImhNoTextHandles = 4096¶
- ImhNone = 0¶
- ImhPreferLatin = 512¶
- ImhPreferLowercase = 32¶
- ImhPreferNumbers = 8¶
- ImhPreferUppercase = 16¶
- ImhSensitiveData = 2¶
- ImhTime = 256¶
- ImhUppercaseOnly = 262144¶
- ImhUrlCharactersOnly = 4194304¶
- InitialSortOrderRole = 14¶
- class InputMethodHints¶
- class InputMethodHints(f: Qt.InputMethodHints | Qt.InputMethodHint)
- class InputMethodHints(a0: Qt.InputMethodHints)
Bases:
simplewrapper
- class InputMethodQueries¶
- class InputMethodQueries(f: Qt.InputMethodQueries | Qt.InputMethodQuery)
- class InputMethodQueries(a0: Qt.InputMethodQueries)
Bases:
simplewrapper
- IntersectClip = 2¶
- IntersectsItemBoundingRect = 3¶
- IntersectsItemShape = 1¶
- InvertedLandscapeOrientation = 8¶
- InvertedPortraitOrientation = 4¶
- class ItemFlags¶
- class ItemFlags(f: Qt.ItemFlags | Qt.ItemFlag)
- class ItemFlags(a0: Qt.ItemFlags)
Bases:
simplewrapper
- ItemIsAutoTristate = 64¶
- ItemIsDragEnabled = 4¶
- ItemIsDropEnabled = 8¶
- ItemIsEditable = 2¶
- ItemIsEnabled = 32¶
- ItemIsSelectable = 1¶
- ItemIsTristate = 64¶
- ItemIsUserCheckable = 16¶
- ItemIsUserTristate = 256¶
- ItemNeverHasChildren = 128¶
- KeepAspectRatio = 1¶
- KeepAspectRatioByExpanding = 2¶
- Key_0 = 48¶
- Key_1 = 49¶
- Key_2 = 50¶
- Key_3 = 51¶
- Key_4 = 52¶
- Key_5 = 53¶
- Key_6 = 54¶
- Key_7 = 55¶
- Key_8 = 56¶
- Key_9 = 57¶
- Key_A = 65¶
- Key_AE = 198¶
- Key_Aacute = 193¶
- Key_Acircumflex = 194¶
- Key_AddFavorite = 16777408¶
- Key_Adiaeresis = 196¶
- Key_Agrave = 192¶
- Key_Alt = 16777251¶
- Key_AltGr = 16781571¶
- Key_Ampersand = 38¶
- Key_Any = 32¶
- Key_Apostrophe = 39¶
- Key_ApplicationLeft = 16777415¶
- Key_ApplicationRight = 16777416¶
- Key_Aring = 197¶
- Key_AsciiCircum = 94¶
- Key_AsciiTilde = 126¶
- Key_Asterisk = 42¶
- Key_At = 64¶
- Key_Atilde = 195¶
- Key_AudioCycleTrack = 16777478¶
- Key_AudioForward = 16777474¶
- Key_AudioRandomPlay = 16777476¶
- Key_AudioRepeat = 16777475¶
- Key_AudioRewind = 16777413¶
- Key_Away = 16777464¶
- Key_B = 66¶
- Key_Back = 16777313¶
- Key_BackForward = 16777414¶
- Key_Backslash = 92¶
- Key_Backspace = 16777219¶
- Key_Backtab = 16777218¶
- Key_Bar = 124¶
- Key_BassBoost = 16777331¶
- Key_BassDown = 16777333¶
- Key_BassUp = 16777332¶
- Key_Battery = 16777470¶
- Key_Blue = 16777495¶
- Key_Bluetooth = 16777471¶
- Key_Book = 16777417¶
- Key_BraceLeft = 123¶
- Key_BraceRight = 125¶
- Key_BracketLeft = 91¶
- Key_BracketRight = 93¶
- Key_BrightnessAdjust = 16777410¶
- Key_C = 67¶
- Key_CD = 16777418¶
- Key_Calculator = 16777419¶
- Key_Calendar = 16777444¶
- Key_Call = 17825796¶
- Key_Camera = 17825824¶
- Key_CameraFocus = 17825825¶
- Key_Cancel = 16908289¶
- Key_CapsLock = 16777252¶
- Key_Ccedilla = 199¶
- Key_ChannelDown = 16777497¶
- Key_ChannelUp = 16777496¶
- Key_Clear = 16777227¶
- Key_ClearGrab = 16777421¶
- Key_Close = 16777422¶
- Key_Codeinput = 16781623¶
- Key_Colon = 58¶
- Key_Comma = 44¶
- Key_Community = 16777412¶
- Key_Context1 = 17825792¶
- Key_Context2 = 17825793¶
- Key_Context3 = 17825794¶
- Key_Context4 = 17825795¶
- Key_ContrastAdjust = 16777485¶
- Key_Control = 16777249¶
- Key_Copy = 16777423¶
- Key_Cut = 16777424¶
- Key_D = 68¶
- Key_DOS = 16777426¶
- Key_Dead_A = 16781953¶
- Key_Dead_Abovecomma = 16781924¶
- Key_Dead_Abovedot = 16781910¶
- Key_Dead_Abovereversedcomma = 16781925¶
- Key_Dead_Abovering = 16781912¶
- Key_Dead_Aboveverticalline = 16781969¶
- Key_Dead_Acute = 16781905¶
- Key_Dead_Belowbreve = 16781931¶
- Key_Dead_Belowcircumflex = 16781929¶
- Key_Dead_Belowcomma = 16781934¶
- Key_Dead_Belowdiaeresis = 16781932¶
- Key_Dead_Belowdot = 16781920¶
- Key_Dead_Belowmacron = 16781928¶
- Key_Dead_Belowring = 16781927¶
- Key_Dead_Belowtilde = 16781930¶
- Key_Dead_Belowverticalline = 16781970¶
- Key_Dead_Breve = 16781909¶
- Key_Dead_Capital_Schwa = 16781963¶
- Key_Dead_Caron = 16781914¶
- Key_Dead_Cedilla = 16781915¶
- Key_Dead_Circumflex = 16781906¶
- Key_Dead_Currency = 16781935¶
- Key_Dead_Diaeresis = 16781911¶
- Key_Dead_Doubleacute = 16781913¶
- Key_Dead_Doublegrave = 16781926¶
- Key_Dead_E = 16781955¶
- Key_Dead_Grave = 16781904¶
- Key_Dead_Greek = 16781964¶
- Key_Dead_Hook = 16781921¶
- Key_Dead_Horn = 16781922¶
- Key_Dead_I = 16781957¶
- Key_Dead_Invertedbreve = 16781933¶
- Key_Dead_Iota = 16781917¶
- Key_Dead_Longsolidusoverlay = 16781971¶
- Key_Dead_Lowline = 16781968¶
- Key_Dead_Macron = 16781908¶
- Key_Dead_O = 16781959¶
- Key_Dead_Ogonek = 16781916¶
- Key_Dead_Semivoiced_Sound = 16781919¶
- Key_Dead_Small_Schwa = 16781962¶
- Key_Dead_Stroke = 16781923¶
- Key_Dead_Tilde = 16781907¶
- Key_Dead_U = 16781961¶
- Key_Dead_Voiced_Sound = 16781918¶
- Key_Dead_a = 16781952¶
- Key_Dead_e = 16781954¶
- Key_Dead_i = 16781956¶
- Key_Dead_o = 16781958¶
- Key_Dead_u = 16781960¶
- Key_Delete = 16777223¶
- Key_Direction_L = 16777305¶
- Key_Direction_R = 16777312¶
- Key_Display = 16777425¶
- Key_Documents = 16777427¶
- Key_Dollar = 36¶
- Key_Down = 16777237¶
- Key_E = 69¶
- Key_ETH = 208¶
- Key_Eacute = 201¶
- Key_Ecircumflex = 202¶
- Key_Ediaeresis = 203¶
- Key_Egrave = 200¶
- Key_Eisu_Shift = 16781615¶
- Key_Eisu_toggle = 16781616¶
- Key_Eject = 16777401¶
- Key_End = 16777233¶
- Key_Enter = 16777221¶
- Key_Equal = 61¶
- Key_Escape = 16777216¶
- Key_Excel = 16777428¶
- Key_Exclam = 33¶
- Key_Execute = 16908291¶
- Key_Exit = 16908298¶
- Key_Explorer = 16777429¶
- Key_F = 70¶
- Key_F1 = 16777264¶
- Key_F10 = 16777273¶
- Key_F11 = 16777274¶
- Key_F12 = 16777275¶
- Key_F13 = 16777276¶
- Key_F14 = 16777277¶
- Key_F15 = 16777278¶
- Key_F16 = 16777279¶
- Key_F17 = 16777280¶
- Key_F18 = 16777281¶
- Key_F19 = 16777282¶
- Key_F2 = 16777265¶
- Key_F20 = 16777283¶
- Key_F21 = 16777284¶
- Key_F22 = 16777285¶
- Key_F23 = 16777286¶
- Key_F24 = 16777287¶
- Key_F25 = 16777288¶
- Key_F26 = 16777289¶
- Key_F27 = 16777290¶
- Key_F28 = 16777291¶
- Key_F29 = 16777292¶
- Key_F3 = 16777266¶
- Key_F30 = 16777293¶
- Key_F31 = 16777294¶
- Key_F32 = 16777295¶
- Key_F33 = 16777296¶
- Key_F34 = 16777297¶
- Key_F35 = 16777298¶
- Key_F4 = 16777267¶
- Key_F5 = 16777268¶
- Key_F6 = 16777269¶
- Key_F7 = 16777270¶
- Key_F8 = 16777271¶
- Key_F9 = 16777272¶
- Key_Favorites = 16777361¶
- Key_Finance = 16777411¶
- Key_Find = 16777506¶
- Key_Flip = 17825798¶
- Key_Forward = 16777314¶
- Key_G = 71¶
- Key_Game = 16777430¶
- Key_Go = 16777431¶
- Key_Greater = 62¶
- Key_Green = 16777493¶
- Key_Guide = 16777498¶
- Key_H = 72¶
- Key_Hangul = 16781617¶
- Key_Hangul_Banja = 16781625¶
- Key_Hangul_End = 16781619¶
- Key_Hangul_Hanja = 16781620¶
- Key_Hangul_Jamo = 16781621¶
- Key_Hangul_Jeonja = 16781624¶
- Key_Hangul_PostHanja = 16781627¶
- Key_Hangul_PreHanja = 16781626¶
- Key_Hangul_Romaja = 16781622¶
- Key_Hangul_Special = 16781631¶
- Key_Hangul_Start = 16781618¶
- Key_Hangup = 17825797¶
- Key_Hankaku = 16781609¶
- Key_Help = 16777304¶
- Key_Henkan = 16781603¶
- Key_Hibernate = 16777480¶
- Key_Hiragana = 16781605¶
- Key_Hiragana_Katakana = 16781607¶
- Key_History = 16777407¶
- Key_Home = 16777232¶
- Key_HomePage = 16777360¶
- Key_HotLinks = 16777409¶
- Key_Hyper_L = 16777302¶
- Key_Hyper_R = 16777303¶
- Key_I = 73¶
- Key_Iacute = 205¶
- Key_Icircumflex = 206¶
- Key_Idiaeresis = 207¶
- Key_Igrave = 204¶
- Key_Info = 16777499¶
- Key_Insert = 16777222¶
- Key_J = 74¶
- Key_K = 75¶
- Key_Kana_Lock = 16781613¶
- Key_Kana_Shift = 16781614¶
- Key_Kanji = 16781601¶
- Key_Katakana = 16781606¶
- Key_KeyboardBrightnessDown = 16777398¶
- Key_KeyboardBrightnessUp = 16777397¶
- Key_KeyboardLightOnOff = 16777396¶
- Key_L = 76¶
- Key_LastNumberRedial = 17825801¶
- Key_Launch0 = 16777378¶
- Key_Launch1 = 16777379¶
- Key_Launch2 = 16777380¶
- Key_Launch3 = 16777381¶
- Key_Launch4 = 16777382¶
- Key_Launch5 = 16777383¶
- Key_Launch6 = 16777384¶
- Key_Launch7 = 16777385¶
- Key_Launch8 = 16777386¶
- Key_Launch9 = 16777387¶
- Key_LaunchA = 16777388¶
- Key_LaunchB = 16777389¶
- Key_LaunchC = 16777390¶
- Key_LaunchD = 16777391¶
- Key_LaunchE = 16777392¶
- Key_LaunchF = 16777393¶
- Key_LaunchG = 16777486¶
- Key_LaunchH = 16777487¶
- Key_LaunchMail = 16777376¶
- Key_LaunchMedia = 16777377¶
- Key_Left = 16777234¶
- Key_Less = 60¶
- Key_LightBulb = 16777405¶
- Key_LogOff = 16777433¶
- Key_M = 77¶
- Key_MailForward = 16777467¶
- Key_Market = 16777434¶
- Key_Massyo = 16781612¶
- Key_MediaLast = 16842751¶
- Key_MediaNext = 16777347¶
- Key_MediaPause = 16777349¶
- Key_MediaPlay = 16777344¶
- Key_MediaPrevious = 16777346¶
- Key_MediaRecord = 16777348¶
- Key_MediaStop = 16777345¶
- Key_MediaTogglePlayPause = 16777350¶
- Key_Meeting = 16777435¶
- Key_Memo = 16777404¶
- Key_Menu = 16777301¶
- Key_MenuKB = 16777436¶
- Key_MenuPB = 16777437¶
- Key_Messenger = 16777465¶
- Key_Meta = 16777250¶
- Key_MicMute = 16777491¶
- Key_MicVolumeDown = 16777502¶
- Key_MicVolumeUp = 16777501¶
- Key_Minus = 45¶
- Key_Mode_switch = 16781694¶
- Key_MonBrightnessDown = 16777395¶
- Key_MonBrightnessUp = 16777394¶
- Key_Muhenkan = 16781602¶
- Key_Multi_key = 16781600¶
- Key_MultipleCandidate = 16781629¶
- Key_Music = 16777469¶
- Key_MySites = 16777438¶
- Key_N = 78¶
- Key_New = 16777504¶
- Key_News = 16777439¶
- Key_No = 16842754¶
- Key_Ntilde = 209¶
- Key_NumLock = 16777253¶
- Key_NumberSign = 35¶
- Key_O = 79¶
- Key_Oacute = 211¶
- Key_Ocircumflex = 212¶
- Key_Odiaeresis = 214¶
- Key_OfficeHome = 16777440¶
- Key_Ograve = 210¶
- Key_Ooblique = 216¶
- Key_Open = 16777505¶
- Key_OpenUrl = 16777364¶
- Key_Option = 16777441¶
- Key_Otilde = 213¶
- Key_P = 80¶
- Key_PageDown = 16777239¶
- Key_PageUp = 16777238¶
- Key_ParenLeft = 40¶
- Key_ParenRight = 41¶
- Key_Paste = 16777442¶
- Key_Pause = 16777224¶
- Key_Percent = 37¶
- Key_Period = 46¶
- Key_Phone = 16777443¶
- Key_Pictures = 16777468¶
- Key_Play = 16908293¶
- Key_Plus = 43¶
- Key_PowerDown = 16777483¶
- Key_PowerOff = 16777399¶
- Key_PreviousCandidate = 16781630¶
- Key_Print = 16777225¶
- Key_Printer = 16908290¶
- Key_Q = 81¶
- Key_Question = 63¶
- Key_QuoteDbl = 34¶
- Key_QuoteLeft = 96¶
- Key_R = 82¶
- Key_Red = 16777492¶
- Key_Redo = 16777508¶
- Key_Refresh = 16777316¶
- Key_Reload = 16777446¶
- Key_Reply = 16777445¶
- Key_Return = 16777220¶
- Key_Right = 16777236¶
- Key_Romaji = 16781604¶
- Key_RotateWindows = 16777447¶
- Key_RotationKB = 16777449¶
- Key_RotationPB = 16777448¶
- Key_S = 83¶
- Key_Save = 16777450¶
- Key_ScreenSaver = 16777402¶
- Key_ScrollLock = 16777254¶
- Key_Search = 16777362¶
- Key_Select = 16842752¶
- Key_Semicolon = 59¶
- Key_Send = 16777451¶
- Key_Settings = 16777500¶
- Key_Shift = 16777248¶
- Key_Shop = 16777406¶
- Key_SingleCandidate = 16781628¶
- Key_Slash = 47¶
- Key_Sleep = 16908292¶
- Key_Space = 32¶
- Key_Spell = 16777452¶
- Key_SplitScreen = 16777453¶
- Key_Standby = 16777363¶
- Key_Stop = 16777315¶
- Key_Subtitle = 16777477¶
- Key_Super_L = 16777299¶
- Key_Super_R = 16777300¶
- Key_Support = 16777454¶
- Key_Suspend = 16777484¶
- Key_SysReq = 16777226¶
- Key_T = 84¶
- Key_THORN = 222¶
- Key_Tab = 16777217¶
- Key_TaskPane = 16777455¶
- Key_Terminal = 16777456¶
- Key_Time = 16777479¶
- Key_ToDoList = 16777420¶
- Key_ToggleCallHangup = 17825799¶
- Key_Tools = 16777457¶
- Key_TopMenu = 16777482¶
- Key_TouchpadOff = 16777490¶
- Key_TouchpadOn = 16777489¶
- Key_TouchpadToggle = 16777488¶
- Key_Touroku = 16781611¶
- Key_Travel = 16777458¶
- Key_TrebleDown = 16777335¶
- Key_TrebleUp = 16777334¶
- Key_U = 85¶
- Key_UWB = 16777473¶
- Key_Uacute = 218¶
- Key_Ucircumflex = 219¶
- Key_Udiaeresis = 220¶
- Key_Ugrave = 217¶
- Key_Underscore = 95¶
- Key_Undo = 16777507¶
- Key_Up = 16777235¶
- Key_V = 86¶
- Key_Video = 16777459¶
- Key_View = 16777481¶
- Key_VoiceDial = 17825800¶
- Key_VolumeDown = 16777328¶
- Key_VolumeMute = 16777329¶
- Key_VolumeUp = 16777330¶
- Key_W = 87¶
- Key_WLAN = 16777472¶
- Key_WWW = 16777403¶
- Key_WakeUp = 16777400¶
- Key_WebCam = 16777466¶
- Key_Word = 16777460¶
- Key_X = 88¶
- Key_Xfer = 16777461¶
- Key_Y = 89¶
- Key_Yacute = 221¶
- Key_Yellow = 16777494¶
- Key_Yes = 16842753¶
- Key_Z = 90¶
- Key_Zenkaku = 16781608¶
- Key_Zenkaku_Hankaku = 16781610¶
- Key_Zoom = 16908294¶
- Key_ZoomIn = 16777462¶
- Key_ZoomOut = 16777463¶
- Key_acute = 180¶
- Key_brokenbar = 166¶
- Key_cedilla = 184¶
- Key_cent = 162¶
- Key_copyright = 169¶
- Key_currency = 164¶
- Key_degree = 176¶
- Key_diaeresis = 168¶
- Key_division = 247¶
- Key_exclamdown = 161¶
- Key_guillemotleft = 171¶
- Key_guillemotright = 187¶
- Key_hyphen = 173¶
- Key_iTouch = 16777432¶
- Key_macron = 175¶
- Key_masculine = 186¶
- Key_mu = 181¶
- Key_multiply = 215¶
- Key_nobreakspace = 160¶
- Key_notsign = 172¶
- Key_onehalf = 189¶
- Key_onequarter = 188¶
- Key_onesuperior = 185¶
- Key_ordfeminine = 170¶
- Key_paragraph = 182¶
- Key_periodcentered = 183¶
- Key_plusminus = 177¶
- Key_questiondown = 191¶
- Key_registered = 174¶
- Key_section = 167¶
- Key_ssharp = 223¶
- Key_sterling = 163¶
- Key_threequarters = 190¶
- Key_threesuperior = 179¶
- Key_twosuperior = 178¶
- Key_unknown = 33554431¶
- Key_ydiaeresis = 255¶
- Key_yen = 165¶
- KeyboardModifierMask = -33554432¶
- class KeyboardModifiers¶
- class KeyboardModifiers(f: Qt.KeyboardModifiers | Qt.KeyboardModifier)
- class KeyboardModifiers(a0: Qt.KeyboardModifiers)
Bases:
simplewrapper
- KeypadModifier = 536870912¶
- LandscapeOrientation = 2¶
- LastCursor = 21¶
- LayoutDirectionAuto = 2¶
- LeftArrow = 3¶
- LeftButton = 1¶
- LeftDockWidgetArea = 1¶
- LeftEdge = 2¶
- LeftSection = 1¶
- LeftToRight = 0¶
- LeftToolBarArea = 1¶
- LinearGradientPattern = 15¶
- LinkAction = 4¶
- LinksAccessibleByKeyboard = 8¶
- LinksAccessibleByMouse = 4¶
- LocalDate = 2¶
- LocalTime = 0¶
- LocaleDate = 3¶
- LogicalCoordinates = 1¶
- LogicalMoveStyle = 0¶
- LowEventPriority = -1¶
- META = 268435456¶
- MODIFIER_MASK = -33554432¶
- MPenCapStyle = 48¶
- MPenJoinStyle = 448¶
- MPenStyle = 15¶
- MSWindowsFixedSizeDialogHint = 256¶
- MSWindowsOwnDC = 512¶
- MacWindowToolBarButtonHint = 268435456¶
- MarkdownText = 3¶
- MaskInColor = 0¶
- MaskOutColor = 1¶
- MatchCaseSensitive = 16¶
- MatchContains = 1¶
- MatchEndsWith = 3¶
- MatchExactly = 0¶
- MatchFixedString = 8¶
- class MatchFlags¶
- class MatchFlags(f: Qt.MatchFlags | Qt.MatchFlag)
- class MatchFlags(a0: Qt.MatchFlags)
Bases:
simplewrapper
- MatchRecursive = 64¶
- MatchRegExp = 4¶
- MatchRegularExpression = 9¶
- MatchStartsWith = 2¶
- MatchWildcard = 5¶
- MatchWrap = 32¶
- MaximizeUsingFullscreenGeometryHint = 4194304¶
- MaximumSize = 2¶
- MenuBarFocusReason = 6¶
- MetaModifier = 268435456¶
- MidButton = 4¶
- MiddleButton = 4¶
- MinimumDescent = 3¶
- MinimumSize = 0¶
- MiterJoin = 0¶
- Monday = 1¶
- MonoOnly = 2¶
- class MouseButtons¶
- class MouseButtons(f: Qt.MouseButtons | Qt.MouseButton)
- class MouseButtons(a0: Qt.MouseButtons)
Bases:
simplewrapper
- MouseEventCreatedDoubleClick = 1¶
- class MouseEventFlags¶
- class MouseEventFlags(f: Qt.MouseEventFlags | Qt.MouseEventFlag)
- class MouseEventFlags(a0: Qt.MouseEventFlags)
Bases:
simplewrapper
- MouseEventNotSynthesized = 0¶
- MouseEventSynthesizedByApplication = 3¶
- MouseEventSynthesizedByQt = 2¶
- MouseEventSynthesizedBySystem = 1¶
- MouseFocusReason = 0¶
- MoveAction = 2¶
Bases:
int
- NoArrow = 0¶
- NoBrush = 0¶
- NoButton = 0¶
- NoClip = 0¶
- NoContextMenu = 0¶
- NoDockWidgetArea = 0¶
- NoDropShadowWindowHint = 1073741824¶
- NoFocus = 0¶
- NoFocusReason = 8¶
- NoFormatConversion = 512¶
- NoItemFlags = 0¶
- NoModifier = 0¶
- NoOpaqueDetection = 256¶
- NoPen = 0¶
- NoScrollPhase = 0¶
- NoSection = 0¶
- NoTabFocus = 0¶
- NoTextInteraction = 0¶
- NoToolBarArea = 0¶
- NonModal = 0¶
- NormalEventPriority = 0¶
- OddEvenFill = 0¶
- OffsetFromUTC = 2¶
- OpaqueMode = 1¶
- OpenHandCursor = 17¶
- OrderedAlphaDither = 4¶
- OrderedDither = 16¶
- class Orientations¶
- class Orientations(f: Qt.Orientations | Qt.Orientation)
- class Orientations(a0: Qt.Orientations)
Bases:
simplewrapper
- OtherFocusReason = 7¶
- PanGesture = 3¶
- PanNativeGesture = 2¶
- PartiallyChecked = 1¶
- PassThrough = 5¶
- PinchGesture = 4¶
- PlainText = 0¶
- PointingHandCursor = 13¶
- Popup = 9¶
- PopupFocusReason = 4¶
- PortraitOrientation = 1¶
- PreciseTimer = 0¶
- PreferDither = 64¶
- PreferredSize = 1¶
- PreventContextMenu = 4¶
- PrimaryOrientation = 0¶
- QueuedConnection = 2¶
- RFC2822Date = 8¶
- RadialGradientPattern = 16¶
- ReceivePartialGestures = 2¶
- RelativeSize = 1¶
- RepeatTile = 1¶
- ReplaceClip = 1¶
- ReplaceSelection = 0¶
- RichText = 1¶
- RightArrow = 4¶
- RightButton = 2¶
- RightDockWidgetArea = 2¶
- RightEdge = 4¶
- RightSection = 5¶
- RightToLeft = 1¶
- RightToolBarArea = 2¶
- RotateNativeGesture = 5¶
- Round = 1¶
- RoundCap = 32¶
- RoundJoin = 128¶
- RoundPreferFloor = 4¶
- RoundTile = 2¶
- SHIFT = 33554432¶
- Saturday = 6¶
- class ScreenOrientations¶
- class ScreenOrientations(f: Qt.ScreenOrientations | Qt.ScreenOrientation)
- class ScreenOrientations(a0: Qt.ScreenOrientations)
Bases:
simplewrapper
- ScrollBarAlwaysOff = 1¶
- ScrollBarAlwaysOn = 2¶
- ScrollBarAsNeeded = 0¶
- ScrollBegin = 1¶
- ScrollEnd = 3¶
- ScrollMomentum = 4¶
- ScrollUpdate = 2¶
- Sheet = 5¶
- ShiftModifier = 33554432¶
- ShortcutFocusReason = 5¶
- SizeAllCursor = 9¶
- SizeBDiagCursor = 7¶
- SizeFDiagCursor = 8¶
- SizeHintRole = 13¶
- SizeHorCursor = 6¶
- SizeVerCursor = 5¶
- SmartZoomNativeGesture = 4¶
- SmoothTransformation = 1¶
- SolidLine = 1¶
- SolidPattern = 1¶
- SplashScreen = 15¶
- SplitHCursor = 12¶
- SplitVCursor = 11¶
- SquareCap = 16¶
- StatusTipRole = 4¶
- StretchTile = 0¶
- StrongFocus = 11¶
- SubWindow = 18¶
- Sunday = 7¶
- SvgMiterJoin = 256¶
- SwipeGesture = 5¶
- SwipeNativeGesture = 6¶
- SystemLocaleDate = 2¶
- SystemLocaleLongDate = 5¶
- SystemLocaleShortDate = 4¶
- TabFocus = 1¶
- TabFocusAllControls = 255¶
- TabFocusListControls = 2¶
- TabFocusReason = 1¶
- TabFocusTextControls = 1¶
- TapAndHoldGesture = 2¶
- TapGesture = 1¶
- TargetMoveAction = 32770¶
- TaskButton = 32¶
- TextAlignmentRole = 7¶
- TextBrowserInteraction = 13¶
- TextColorRole = 9¶
- TextDate = 0¶
- TextDontClip = 512¶
- TextDontPrint = 16384¶
- TextEditable = 16¶
- TextEditorInteraction = 19¶
- TextExpandTabs = 1024¶
- TextHideMnemonic = 32768¶
- TextIncludeTrailingSpaces = 134217728¶
- class TextInteractionFlags¶
- class TextInteractionFlags(f: Qt.TextInteractionFlags | Qt.TextInteractionFlag)
- class TextInteractionFlags(a0: Qt.TextInteractionFlags)
Bases:
simplewrapper
- TextJustificationForced = 65536¶
- TextSelectableByKeyboard = 2¶
- TextSelectableByMouse = 1¶
- TextShowMnemonic = 2048¶
- TextSingleLine = 256¶
- TextWordWrap = 4096¶
- TextWrapAnywhere = 8192¶
- TexturePattern = 24¶
- ThresholdAlphaDither = 0¶
- ThresholdDither = 32¶
- Thursday = 4¶
- TimeZone = 3¶
- TitleBarArea = 9¶
- Tool = 11¶
- ToolBarArea_Mask = 15¶
- class ToolBarAreas¶
- class ToolBarAreas(f: Qt.ToolBarAreas | Qt.ToolBarArea)
- class ToolBarAreas(a0: Qt.ToolBarAreas)
Bases:
simplewrapper
- ToolButtonFollowStyle = 4¶
- ToolButtonIconOnly = 0¶
- ToolButtonTextBesideIcon = 2¶
- ToolButtonTextOnly = 1¶
- ToolButtonTextUnderIcon = 3¶
- ToolTip = 13¶
- ToolTipRole = 3¶
- TopDockWidgetArea = 4¶
- TopEdge = 1¶
- TopLeftCorner = 0¶
- TopLeftSection = 2¶
- TopRightCorner = 1¶
- TopRightSection = 4¶
- TopSection = 3¶
- TopToolBarArea = 4¶
- TouchPointMoved = 2¶
- TouchPointPressed = 1¶
- TouchPointReleased = 8¶
- class TouchPointStates¶
- class TouchPointStates(f: Qt.TouchPointStates | Qt.TouchPointState)
- class TouchPointStates(a0: Qt.TouchPointStates)
Bases:
simplewrapper
- TouchPointStationary = 4¶
- TransparentMode = 0¶
- Tuesday = 2¶
- UI_AnimateCombo = 3¶
- UI_AnimateMenu = 1¶
- UI_AnimateToolBox = 6¶
- UI_AnimateTooltip = 4¶
- UI_FadeMenu = 2¶
- UI_FadeTooltip = 5¶
- UI_General = 0¶
- UNICODE_ACCEL = 0¶
- UTC = 1¶
- Unchecked = 0¶
- UniqueConnection = 128¶
- UpArrow = 1¶
- UpArrowCursor = 1¶
- UserRole = 256¶
- VerPattern = 10¶
- Vertical = 2¶
- VeryCoarseTimer = 2¶
- VisualMoveStyle = 1¶
- WA_AcceptDrops = 78¶
- WA_AcceptTouchEvents = 121¶
- WA_AlwaysShowToolTips = 84¶
- WA_AlwaysStackOnTop = 128¶
- WA_AttributeCount = 132¶
- WA_ContentsMarginsRespectsSafeArea = 130¶
- WA_CustomWhatsThis = 47¶
- WA_DeleteOnClose = 55¶
- WA_Disabled = 0¶
- WA_DontCreateNativeAncestors = 101¶
- WA_DontShowOnScreen = 103¶
- WA_ForceDisabled = 32¶
- WA_ForceUpdatesDisabled = 59¶
- WA_GrabbedShortcut = 50¶
- WA_GroupLeader = 72¶
- WA_Hover = 74¶
- WA_InputMethodEnabled = 14¶
- WA_InputMethodTransparent = 75¶
- WA_InvalidSize = 45¶
- WA_KeyCompression = 33¶
- WA_KeyboardFocusChange = 77¶
- WA_LaidOut = 7¶
- WA_LayoutOnEntireRect = 48¶
- WA_LayoutUsesWidgetRect = 92¶
- WA_MSWindowsUseDirect3D = 94¶
- WA_MacAlwaysShowToolWindow = 96¶
- WA_MacBrushedMetal = 46¶
- WA_MacFrameworkScaled = 117¶
- WA_MacMetalStyle = 46¶
- WA_MacMiniSize = 91¶
- WA_MacNoClickThrough = 12¶
- WA_MacNoShadow = 127¶
- WA_MacNormalSize = 89¶
- WA_MacOpaqueSizeGrip = 85¶
- WA_MacShowFocusRect = 88¶
- WA_MacSmallSize = 90¶
- WA_MacVariableSize = 102¶
- WA_Mapped = 11¶
- WA_MouseNoMask = 71¶
- WA_MouseTracking = 2¶
- WA_Moved = 43¶
- WA_NativeWindow = 100¶
- WA_NoChildEventsForParent = 58¶
- WA_NoChildEventsFromChildren = 39¶
- WA_NoMousePropagation = 73¶
- WA_NoMouseReplay = 54¶
- WA_NoSystemBackground = 9¶
- WA_NoX11EventCompression = 81¶
- WA_OpaquePaintEvent = 4¶
- WA_OutsideWSRange = 49¶
- WA_PaintOnScreen = 8¶
- WA_PaintUnclipped = 52¶
- WA_PendingMoveEvent = 34¶
- WA_PendingResizeEvent = 35¶
- WA_PendingUpdate = 44¶
- WA_QuitOnClose = 76¶
- WA_Resized = 42¶
- WA_RightToLeft = 56¶
- WA_SetCursor = 38¶
- WA_SetFont = 37¶
- WA_SetLayoutDirection = 57¶
- WA_SetLocale = 87¶
- WA_SetPalette = 36¶
- WA_SetStyle = 86¶
- WA_SetWindowIcon = 53¶
- WA_ShowWithoutActivating = 98¶
- WA_StaticContents = 5¶
- WA_StyleSheet = 97¶
- WA_StyleSheetTarget = 131¶
- WA_StyledBackground = 93¶
- WA_TabletTracking = 129¶
- WA_TintedBackground = 82¶
- WA_TouchPadAcceptSingleTouchEvents = 123¶
- WA_TranslucentBackground = 120¶
- WA_TransparentForMouseEvents = 51¶
- WA_UnderMouse = 1¶
- WA_UpdatesDisabled = 10¶
- WA_WState_CompressKeys = 61¶
- WA_WState_ConfigPending = 64¶
- WA_WState_Created = 60¶
- WA_WState_ExplicitShowHide = 69¶
- WA_WState_Hidden = 16¶
- WA_WState_InPaintEvent = 62¶
- WA_WState_OwnSizePolicy = 68¶
- WA_WState_Polished = 66¶
- WA_WState_Reparented = 63¶
- WA_WState_Visible = 15¶
- WA_WindowModified = 41¶
- WA_WindowPropagation = 80¶
- WA_X11DoNotAcceptFocus = 126¶
- WA_X11NetWmWindowTypeCombo = 115¶
- WA_X11NetWmWindowTypeDND = 116¶
- WA_X11NetWmWindowTypeDesktop = 104¶
- WA_X11NetWmWindowTypeDialog = 110¶
- WA_X11NetWmWindowTypeDock = 105¶
- WA_X11NetWmWindowTypeDropDownMenu = 111¶
- WA_X11NetWmWindowTypeMenu = 107¶
- WA_X11NetWmWindowTypeNotification = 114¶
- WA_X11NetWmWindowTypePopupMenu = 112¶
- WA_X11NetWmWindowTypeSplash = 109¶
- WA_X11NetWmWindowTypeToolBar = 106¶
- WA_X11NetWmWindowTypeToolTip = 113¶
- WA_X11NetWmWindowTypeUtility = 108¶
- WA_X11OpenGLOverlay = 83¶
- WaitCursor = 3¶
- Wednesday = 3¶
- WhatsThisCursor = 15¶
- WhatsThisRole = 5¶
- WheelFocus = 15¶
- WhiteSpaceModeUndefined = -1¶
- WhiteSpaceNoWrap = 2¶
- WhiteSpaceNormal = 0¶
- WhiteSpacePre = 1¶
- Widget = 0¶
- WidgetShortcut = 0¶
- WidgetWithChildrenShortcut = 3¶
- WindingFill = 1¶
- Window = 1¶
- WindowActive = 8¶
- WindowCloseButtonHint = 134217728¶
- WindowContextHelpButtonHint = 65536¶
- WindowDoesNotAcceptFocus = 2097152¶
- class WindowFlags¶
- class WindowFlags(f: Qt.WindowFlags | Qt.WindowType)
- class WindowFlags(a0: Qt.WindowFlags)
Bases:
simplewrapper
- WindowFullScreen = 4¶
- WindowFullscreenButtonHint = -2147483648¶
- WindowMaximizeButtonHint = 32768¶
- WindowMaximized = 2¶
- WindowMinMaxButtonsHint = 49152¶
- WindowMinimizeButtonHint = 16384¶
- WindowMinimized = 1¶
- WindowModal = 1¶
- WindowNoState = 0¶
- WindowOverridesSystemGestures = 1048576¶
- WindowShadeButtonHint = 131072¶
- WindowShortcut = 1¶
- class WindowStates¶
- class WindowStates(f: Qt.WindowStates | Qt.WindowState)
- class WindowStates(a0: Qt.WindowStates)
Bases:
simplewrapper
- WindowStaysOnBottomHint = 67108864¶
- WindowStaysOnTopHint = 262144¶
- WindowSystemMenuHint = 8192¶
- WindowTitleHint = 4096¶
- WindowTransparentForInput = 524288¶
- WindowType_Mask = 255¶
- X11BypassWindowManagerHint = 1024¶
- XAxis = 0¶
- XButton1 = 8¶
- XButton2 = 16¶
- YAxis = 1¶
- ZAxis = 2¶
- ZoomNativeGesture = 3¶
- black = 2¶
- blue = 9¶
- color0 = 0¶
- color1 = 1¶
- convertFromPlainText(plain: str | None, mode: Qt.WhiteSpaceMode = Qt.WhiteSpacePre) str¶
- cyan = 10¶
- darkBlue = 15¶
- darkCyan = 16¶
- darkGray = 4¶
- darkGreen = 14¶
- darkMagenta = 17¶
- darkRed = 13¶
- darkYellow = 18¶
- gray = 5¶
- green = 8¶
- lightGray = 6¶
- magenta = 11¶
- red = 7¶
- transparent = 19¶
- white = 3¶
- yellow = 12¶
- class populse_mia.utils.utils.QTime¶
- class populse_mia.utils.utils.QTime(h: int, m: int, second: int = 0, msec: int = 0)
- class populse_mia.utils.utils.QTime(a0: QTime)
Bases:
simplewrapper- fromString(string: str | None, format: Qt.DateFormat = Qt.TextDate) QTime¶
- fromString(s: str | None, format: str | None) QTime
- msecsTo(self, a0: QTime | datetime.time) int¶
- secsTo(self, a0: QTime | datetime.time) int¶
- start(self)¶
- toPyTime(self) datetime.time¶
- toPython(*args, **kwargs)¶
- class populse_mia.utils.utils.QVariant¶
- class populse_mia.utils.utils.QVariant(type: QVariant.Type)
- class populse_mia.utils.utils.QVariant(obj: Any)
- class populse_mia.utils.utils.QVariant(a0: QVariant | None)
Bases:
simplewrapper- BitArray = 13¶
- Bitmap = 73¶
- Bool = 1¶
- Brush = 66¶
- ByteArray = 12¶
- Char = 7¶
- Color = 67¶
- Cursor = 74¶
- Date = 14¶
- DateTime = 16¶
- Double = 6¶
- EasingCurve = 29¶
- Font = 64¶
- Hash = 28¶
- Icon = 69¶
- Image = 70¶
- Int = 2¶
- Invalid = 0¶
- KeySequence = 75¶
- Line = 23¶
- LineF = 24¶
- List = 9¶
- Locale = 18¶
- LongLong = 4¶
- Map = 8¶
- Matrix = 79¶
- Matrix4x4 = 81¶
- ModelIndex = 42¶
- Palette = 68¶
- Pen = 76¶
- PersistentModelIndex = 50¶
- Pixmap = 65¶
- Point = 25¶
- PointF = 26¶
- Polygon = 71¶
- PolygonF = 86¶
- Quaternion = 85¶
- Rect = 19¶
- RectF = 20¶
- RegExp = 27¶
- Region = 72¶
- RegularExpression = 44¶
- Size = 21¶
- SizeF = 22¶
- SizePolicy = 121¶
- String = 10¶
- StringList = 11¶
- TextFormat = 78¶
- TextLength = 77¶
- Time = 15¶
- Transform = 80¶
- UInt = 3¶
- ULongLong = 5¶
- Url = 17¶
- UserType = 1024¶
- Uuid = 30¶
- Vector2D = 82¶
- Vector3D = 83¶
- Vector4D = 84¶
- clear(self)¶
- load(self, ds: QDataStream)¶
- nameToType(name: str | None) QVariant.Type¶
- save(self, ds: QDataStream)¶
- type(self) QVariant.Type¶
- class populse_mia.utils.utils.QAction(parent: QObject | None = None)¶
- class populse_mia.utils.utils.QAction(text: str | None, parent: QObject | None = None)
- class populse_mia.utils.utils.QAction(icon: QIcon, text: str | None, parent: QObject | None = None)
Bases:
QObject- AboutQtRole = 3¶
- AboutRole = 4¶
- ApplicationSpecificRole = 2¶
- HighPriority = 256¶
- Hover = 1¶
- LowPriority = 0¶
- NoRole = 0¶
- NormalPriority = 128¶
- PreferencesRole = 5¶
- QuitRole = 6¶
- TextHeuristicRole = 1¶
- Trigger = 0¶
- activate(self, event: QAction.ActionEvent)¶
- changed¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- hover(self)¶
- hovered¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- priority(self) QAction.Priority¶
- setMenuRole(self, menuRole: QAction.MenuRole)¶
- setPriority(self, priority: QAction.Priority)¶
- setShortcutContext(self, context: Qt.ShortcutContext)¶
- setShortcuts(self, shortcuts: Iterable[QKeySequence | QKeySequence.StandardKey | str | None | int])¶
- setShortcuts(self, a0: QKeySequence.StandardKey) None
- shortcut(self) QKeySequence¶
- shortcutContext(self) Qt.ShortcutContext¶
- toggle(self)¶
- toggled¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- trigger(self)¶
- triggered¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- class populse_mia.utils.utils.QApplication(argv: List[str])¶
Bases:
QGuiApplication- CustomColor = 1¶
- ManyColor = 2¶
- NormalColor = 0¶
- aboutQt()¶
- beep()¶
- closeAllWindows()¶
- focusChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- fontMetrics() QFontMetrics¶
- globalStrut() QSize¶
- isEffectEnabled(a0: Qt.UIEffect) bool¶
- setEffectEnabled(a0: Qt.UIEffect, enabled: bool = True)¶
- setGlobalStrut(a0: QSize)¶
- class populse_mia.utils.utils.QDialog(parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags())¶
Bases:
QWidget- Accepted = 1¶
- Rejected = 0¶
- accept(self)¶
- accepted¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- finished¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- minimumSizeHint(self) QSize¶
- open(self)¶
- reject(self)¶
- rejected¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- sizeHint(self) QSize¶
- class populse_mia.utils.utils.QFileDialog(parent: QWidget | None, f: Qt.WindowFlags | Qt.WindowType)¶
- class populse_mia.utils.utils.QFileDialog(parent: QWidget | None = None, caption: str | None = '', directory: str | None = '', filter: str | None = '')
Bases:
QDialog- Accept = 3¶
- AcceptOpen = 0¶
- AcceptSave = 1¶
- AnyFile = 0¶
- Detail = 0¶
- Directory = 2¶
- DirectoryOnly = 4¶
- DontConfirmOverwrite = 4¶
- DontResolveSymlinks = 2¶
- DontUseCustomDirectoryIcons = 128¶
- DontUseNativeDialog = 16¶
- DontUseSheet = 8¶
- ExistingFile = 1¶
- ExistingFiles = 3¶
- FileName = 1¶
- FileType = 2¶
- HideNameFilterDetails = 64¶
- List = 1¶
- LookIn = 0¶
- class Options¶
- class Options(f: QFileDialog.Options | QFileDialog.Option)
- class Options(a0: QFileDialog.Options)
Bases:
simplewrapper
- ReadOnly = 32¶
- Reject = 4¶
- ShowDirsOnly = 1¶
- accept(self)¶
- acceptMode(self) QFileDialog.AcceptMode¶
- currentChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- currentUrlChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- directoryEntered¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- directoryUrl(self) QUrl¶
- directoryUrlEntered¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- fileMode(self) QFileDialog.FileMode¶
- fileSelected¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- filesSelected¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- filter(self) QDir.Filters¶
- filterSelected¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- static getExistingDirectory(parent: QWidget | None = None, caption: str | None = '', directory: str | None = '', options: QFileDialog.Options | QFileDialog.Option = QFileDialog.ShowDirsOnly) str¶
- getExistingDirectoryUrl(parent: QWidget | None = None, caption: str | None = '', directory: QUrl = QUrl(), options: QFileDialog.Options | QFileDialog.Option = QFileDialog.ShowDirsOnly, supportedSchemes: Iterable[str | None] = []) QUrl¶
- static getOpenFileName(parent: QWidget | None = None, caption: str | None = '', directory: str | None = '', filter: str | None = '', initialFilter: str | None = '', options: QFileDialog.Options | QFileDialog.Option = 0) Tuple[str, str]¶
- static getOpenFileNames(parent: QWidget | None = None, caption: str | None = '', directory: str | None = '', filter: str | None = '', initialFilter: str | None = '', options: QFileDialog.Options | QFileDialog.Option = 0) Tuple[List[str], str]¶
- getOpenFileUrl(parent: QWidget | None = None, caption: str | None = '', directory: QUrl = QUrl(), filter: str | None = '', initialFilter: str | None = '', options: QFileDialog.Options | QFileDialog.Option = 0, supportedSchemes: Iterable[str | None] = []) Tuple[QUrl, str]¶
- getOpenFileUrls(parent: QWidget | None = None, caption: str | None = '', directory: QUrl = QUrl(), filter: str | None = '', initialFilter: str | None = '', options: QFileDialog.Options | QFileDialog.Option = 0, supportedSchemes: Iterable[str | None] = []) Tuple[List[QUrl], str]¶
- static getSaveFileName(parent: QWidget | None = None, caption: str | None = '', directory: str | None = '', filter: str | None = '', initialFilter: str | None = '', options: QFileDialog.Options | QFileDialog.Option = 0) Tuple[str, str]¶
- getSaveFileUrl(parent: QWidget | None = None, caption: str | None = '', directory: QUrl = QUrl(), filter: str | None = '', initialFilter: str | None = '', options: QFileDialog.Options | QFileDialog.Option = 0, supportedSchemes: Iterable[str | None] = []) Tuple[QUrl, str]¶
- labelText(self, label: QFileDialog.DialogLabel) str¶
- options(self) QFileDialog.Options¶
- restoreState(self, state: QByteArray | bytes | bytearray) bool¶
- saveState(self) QByteArray¶
- selectUrl(self, url: QUrl)¶
- setAcceptMode(self, mode: QFileDialog.AcceptMode)¶
- setDirectoryUrl(self, directory: QUrl)¶
- setFileMode(self, mode: QFileDialog.FileMode)¶
- setFilter(self, filters: QDir.Filters | QDir.Filter)¶
- setLabelText(self, label: QFileDialog.DialogLabel, text: str | None)¶
- setOption(self, option: QFileDialog.Option, on: bool = True)¶
- setOptions(self, options: QFileDialog.Options | QFileDialog.Option)¶
- setSidebarUrls(self, urls: Iterable[QUrl])¶
- setViewMode(self, mode: QFileDialog.ViewMode)¶
- testOption(self, option: QFileDialog.Option) bool¶
- urlSelected¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- urlsSelected¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- viewMode(self) QFileDialog.ViewMode¶
- class populse_mia.utils.utils.QHBoxLayout¶
- class populse_mia.utils.utils.QHBoxLayout(parent: QWidget | None)
Bases:
QBoxLayout
- class populse_mia.utils.utils.QLabel(parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags())¶
- class populse_mia.utils.utils.QLabel(text: str | None, parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags())
Bases:
QFrame- alignment(self) Qt.Alignment¶
- clear(self)¶
- linkActivated¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- linkHovered¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- minimumSizeHint(self) QSize¶
- setAlignment(self, a0: Qt.Alignment | Qt.AlignmentFlag)¶
- setPicture(self, a0: QPicture)¶
- setTextFormat(self, a0: Qt.TextFormat)¶
- setTextInteractionFlags(self, flags: Qt.TextInteractionFlags | Qt.TextInteractionFlag)¶
- sizeHint(self) QSize¶
- textFormat(self) Qt.TextFormat¶
- textInteractionFlags(self) Qt.TextInteractionFlags¶
- class populse_mia.utils.utils.QLineEdit(parent: QWidget | None = None)¶
- class populse_mia.utils.utils.QLineEdit(contents: str | None, parent: QWidget | None = None)
Bases:
QWidget- LeadingPosition = 0¶
- NoEcho = 1¶
- Normal = 0¶
- Password = 2¶
- PasswordEchoOnEdit = 3¶
- TrailingPosition = 1¶
- addAction(self, action: QAction | None)¶
- addAction(self, action: QAction | None, position: QLineEdit.ActionPosition) None
- addAction(self, icon: QIcon, position: QLineEdit.ActionPosition) QAction | None
- alignment(self) Qt.Alignment¶
- backspace(self)¶
- clear(self)¶
- copy(self)¶
- cursorMoveStyle(self) Qt.CursorMoveStyle¶
- cursorPositionChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- cursorRect(self) QRect¶
- cut(self)¶
- del_(self)¶
- deselect(self)¶
- echoMode(self) QLineEdit.EchoMode¶
- editingFinished¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- getTextMargins(self)¶
- inputMethodQuery(self, a0: Qt.InputMethodQuery) Any¶
- inputMethodQuery(self, property: Qt.InputMethodQuery, argument: Any) Any
- inputRejected¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- minimumSizeHint(self) QSize¶
- paste(self)¶
- redo(self)¶
- returnPressed¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- selectAll(self)¶
- selectionChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- setAlignment(self, flag: Qt.Alignment | Qt.AlignmentFlag)¶
- setCursorMoveStyle(self, style: Qt.CursorMoveStyle)¶
- setEchoMode(self, a0: QLineEdit.EchoMode)¶
- setTextMargins(self, left: int, top: int, right: int, bottom: int)¶
- setTextMargins(self, margins: QMargins) None
- sizeHint(self) QSize¶
- textChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- textEdited¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- textMargins(self) QMargins¶
- undo(self)¶
- class populse_mia.utils.utils.QMessageBox(parent: QWidget | None = None)¶
- class populse_mia.utils.utils.QMessageBox(icon: QMessageBox.Icon, title: str | None, text: str | None, buttons: QMessageBox.StandardButtons | QMessageBox.StandardButton = QMessageBox.NoButton, parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = Qt.Dialog | Qt.MSWindowsFixedSizeDialogHint)
Bases:
QDialog- Abort = 262144¶
- AcceptRole = 0¶
- ActionRole = 3¶
- Apply = 33554432¶
- ApplyRole = 8¶
- ButtonMask = -769¶
- Cancel = 4194304¶
- Close = 2097152¶
- Critical = 3¶
- Default = 256¶
- DestructiveRole = 2¶
- Discard = 8388608¶
- Escape = 512¶
- FirstButton = 1024¶
- FlagMask = 768¶
- Help = 16777216¶
- HelpRole = 4¶
- Ignore = 1048576¶
- Information = 1¶
- InvalidRole = -1¶
- LastButton = 134217728¶
- No = 65536¶
- NoAll = 131072¶
- NoButton = 0¶
- NoIcon = 0¶
- NoRole = 6¶
- NoToAll = 131072¶
- Ok = 1024¶
- Open = 8192¶
- Question = 4¶
- RejectRole = 1¶
- Reset = 67108864¶
- ResetRole = 7¶
- RestoreDefaults = 134217728¶
- Retry = 524288¶
- Save = 2048¶
- SaveAll = 4096¶
- class StandardButtons¶
- class StandardButtons(f: QMessageBox.StandardButtons | QMessageBox.StandardButton)
- class StandardButtons(a0: QMessageBox.StandardButtons)
Bases:
simplewrapper
- Warning = 2¶
- Yes = 16384¶
- YesAll = 32768¶
- YesRole = 5¶
- YesToAll = 32768¶
- addButton(self, button: QAbstractButton | None, role: QMessageBox.ButtonRole)¶
- addButton(self, text: str | None, role: QMessageBox.ButtonRole) QPushButton | None
- addButton(self, button: QMessageBox.StandardButton) QPushButton | None
- button(self, which: QMessageBox.StandardButton) QAbstractButton | None¶
- buttonClicked¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- buttonRole(self, button: QAbstractButton | None) QMessageBox.ButtonRole¶
- critical(parent: QWidget | None, title: str | None, text: str | None, buttons: QMessageBox.StandardButtons | QMessageBox.StandardButton = QMessageBox.Ok, defaultButton: QMessageBox.StandardButton = QMessageBox.NoButton) QMessageBox.StandardButton¶
- defaultButton(self) QPushButton | None¶
- icon(self) QMessageBox.Icon¶
- information(parent: QWidget | None, title: str | None, text: str | None, buttons: QMessageBox.StandardButtons | QMessageBox.StandardButton = QMessageBox.Ok, defaultButton: QMessageBox.StandardButton = QMessageBox.NoButton) QMessageBox.StandardButton¶
- question(parent: QWidget | None, title: str | None, text: str | None, buttons: QMessageBox.StandardButtons | QMessageBox.StandardButton = QMessageBox.StandardButtons(QMessageBox.Yes | QMessageBox.No), defaultButton: QMessageBox.StandardButton = QMessageBox.NoButton) QMessageBox.StandardButton¶
- setDefaultButton(self, button: QPushButton | None)¶
- setDefaultButton(self, button: QMessageBox.StandardButton) None
- setEscapeButton(self, button: QAbstractButton | None)¶
- setEscapeButton(self, button: QMessageBox.StandardButton) None
- setIcon(self, a0: QMessageBox.Icon)¶
- setStandardButtons(self, buttons: QMessageBox.StandardButtons | QMessageBox.StandardButton)¶
- setTextFormat(self, a0: Qt.TextFormat)¶
- setTextInteractionFlags(self, flags: Qt.TextInteractionFlags | Qt.TextInteractionFlag)¶
- setWindowModality(self, windowModality: Qt.WindowModality)¶
- standardButton(self, button: QAbstractButton | None) QMessageBox.StandardButton¶
- standardButtons(self) QMessageBox.StandardButtons¶
- standardIcon(icon: QMessageBox.Icon) QPixmap¶
- textFormat(self) Qt.TextFormat¶
- textInteractionFlags(self) Qt.TextInteractionFlags¶
- warning(parent: QWidget | None, title: str | None, text: str | None, buttons: QMessageBox.StandardButtons | QMessageBox.StandardButton = QMessageBox.Ok, defaultButton: QMessageBox.StandardButton = QMessageBox.NoButton) QMessageBox.StandardButton¶
- class populse_mia.utils.utils.QPushButton(parent: QWidget | None = None)¶
- class populse_mia.utils.utils.QPushButton(text: str | None, parent: QWidget | None = None)
- class populse_mia.utils.utils.QPushButton(icon: QIcon, text: str | None, parent: QWidget | None = None)
Bases:
QAbstractButton- minimumSizeHint(self) QSize¶
- showMenu(self)¶
- sizeHint(self) QSize¶
- class populse_mia.utils.utils.QScrollArea(parent: QWidget | None = None)¶
Bases:
QAbstractScrollArea- alignment(self) Qt.Alignment¶
- setAlignment(self, a0: Qt.Alignment | Qt.AlignmentFlag)¶
- sizeHint(self) QSize¶
- viewportSizeHint(self) QSize¶
- class populse_mia.utils.utils.QVBoxLayout¶
- class populse_mia.utils.utils.QVBoxLayout(parent: QWidget | None)
Bases:
QBoxLayout
- class populse_mia.utils.utils.QWidget(parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags())¶
Bases:
QObject,QPaintDevice- DrawChildren = 2¶
- DrawWindowBackground = 1¶
- IgnoreMask = 4¶
- class RenderFlags¶
- class RenderFlags(f: QWidget.RenderFlags | QWidget.RenderFlag)
- class RenderFlags(a0: QWidget.RenderFlags)
Bases:
simplewrapper
- activateWindow(self)¶
- adjustSize(self)¶
- backgroundRole(self) QPalette.ColorRole¶
- baseSize(self) QSize¶
- childrenRect(self) QRect¶
- childrenRegion(self) QRegion¶
- clearFocus(self)¶
- clearMask(self)¶
- contentsMargins(self) QMargins¶
- contentsRect(self) QRect¶
- contextMenuPolicy(self) Qt.ContextMenuPolicy¶
- create(self, window: PyQt5.sip.voidptr = None, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- createWindowContainer(window: QWindow | None, parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = 0) QWidget¶
- customContextMenuRequested¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- effectiveWinId(self) PyQt5.sip.voidptr¶
- ensurePolished(self)¶
- focusPolicy(self) Qt.FocusPolicy¶
- fontInfo(self) QFontInfo¶
- fontMetrics(self) QFontMetrics¶
- foregroundRole(self) QPalette.ColorRole¶
- frameGeometry(self) QRect¶
- frameSize(self) QSize¶
- geometry(self) QRect¶
- getContentsMargins(self)¶
- grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlags | Qt.GestureFlag = Qt.GestureFlags())¶
- grabKeyboard(self)¶
- grabMouse(self)¶
- grabMouse(self, a0: QCursor | Qt.CursorShape) None
- grabShortcut(self, key: QKeySequence | QKeySequence.StandardKey | str | None | int, context: Qt.ShortcutContext = Qt.WindowShortcut) int¶
- hide(self)¶
- inputMethodHints(self) Qt.InputMethodHints¶
- inputMethodQuery(self, a0: Qt.InputMethodQuery) Any¶
- layoutDirection(self) Qt.LayoutDirection¶
- locale(self) QLocale¶
- lower(self)¶
- mask(self) QRegion¶
- maximumSize(self) QSize¶
- minimumSize(self) QSize¶
- minimumSizeHint(self) QSize¶
- nativeEvent(self, eventType: QByteArray | bytes | bytearray, message: PyQt5.sip.voidptr | None)¶
- normalGeometry(self) QRect¶
- overrideWindowFlags(self, type: Qt.WindowFlags | Qt.WindowType)¶
- overrideWindowState(self, state: Qt.WindowStates | Qt.WindowState)¶
- palette(self) QPalette¶
- raise_(self)¶
- rect(self) QRect¶
- releaseKeyboard(self)¶
- releaseMouse(self)¶
- render(self, target: QPaintDevice | None, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlags | QWidget.RenderFlag = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren))¶
- render(self, painter: QPainter | None, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlags | QWidget.RenderFlag = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)) None
- repaint(self)¶
- repaint(self, x: int, y: int, w: int, h: int) None
- repaint(self, a0: QRect) None
- repaint(self, a0: QRegion) None
- restoreGeometry(self, geometry: QByteArray | bytes | bytearray) bool¶
- saveGeometry(self) QByteArray¶
- setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)¶
- setBackgroundRole(self, a0: QPalette.ColorRole)¶
- setContentsMargins(self, left: int, top: int, right: int, bottom: int)¶
- setContentsMargins(self, margins: QMargins) None
- setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)¶
- setCursor(self, a0: QCursor | Qt.CursorShape)¶
- setFocus(self)¶
- setFocus(self, reason: Qt.FocusReason) None
- setFocusPolicy(self, policy: Qt.FocusPolicy)¶
- setForegroundRole(self, a0: QPalette.ColorRole)¶
- setInputMethodHints(self, hints: Qt.InputMethodHints | Qt.InputMethodHint)¶
- setLayoutDirection(self, direction: Qt.LayoutDirection)¶
- setLocale(self, locale: QLocale)¶
- setPalette(self, a0: QPalette)¶
- setParent(self, parent: QWidget | None)¶
- setParent(self, parent: QWidget | None, f: Qt.WindowFlags | Qt.WindowType) None
- setSizePolicy(self, a0: QSizePolicy)¶
- setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
- setWindowFlag(self, a0: Qt.WindowType, on: bool = True)¶
- setWindowFlags(self, type: Qt.WindowFlags | Qt.WindowType)¶
- setWindowModality(self, windowModality: Qt.WindowModality)¶
- setWindowState(self, state: Qt.WindowStates | Qt.WindowState)¶
- show(self)¶
- showFullScreen(self)¶
- showMaximized(self)¶
- showMinimized(self)¶
- showNormal(self)¶
- size(self) QSize¶
- sizeHint(self) QSize¶
- sizeIncrement(self) QSize¶
- sizePolicy(self) QSizePolicy¶
- testAttribute(self, attribute: Qt.WidgetAttribute) bool¶
- ungrabGesture(self, type: Qt.GestureType)¶
- unsetCursor(self)¶
- unsetLayoutDirection(self)¶
- unsetLocale(self)¶
- update(self)¶
- update(self, a0: QRect) None
- update(self, a0: QRegion) None
- update(self, ax: int, ay: int, aw: int, ah: int) None
- updateGeometry(self)¶
- updateMicroFocus(self)¶
- visibleRegion(self) QRegion¶
- winId(self) PyQt5.sip.voidptr¶
- windowFlags(self) Qt.WindowFlags¶
- windowIconChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- windowIconTextChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- windowModality(self) Qt.WindowModality¶
- windowState(self) Qt.WindowStates¶
- windowTitleChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- windowType(self) Qt.WindowType¶
- populse_mia.utils.utils.is_file_trait(trait, allow_dir=False, only_dirs=False)[source]¶
Tells if the given trait is a File (and/or dict) or may be a file (for a compound trait)
- class populse_mia.utils.utils.PackagesInstall[source]¶
Bases:
objectHelps make a pipeline package available in the Mia pipeline library recursively.
- Contains:
- Method:
__init__: constructor
add_package: provide recursive representation of a package
- _already_loaded = {'capsul.pipeline.pipeline_nodes.Node', 'capsul.pipeline.pipeline_nodes.PipelineNode', 'capsul.pipeline.pipeline_nodes.ProcessNode', 'capsul.process.process.FileCopyProcess', 'capsul.process.process.NipypeProcess', 'capsul.process.process.Process', 'populse_mia.user_interface.pipeline_manager.process_mia.ProcessMIA'}¶
- add_package(module_name, class_name=None)[source]¶
Recursively adds a package and its subpackages/modules to the Mia pipeline library.
- Parameters:
(str) (class_name) – Name of the module to add to the pipeline library.
(str) – Specific class to add (optional). Only this pipeline will be added to the pipeline library.
- Returns:
dictionary of dictionaries containing package/subpackages/pipelines status. ex: {package: {subpackage: {pipeline: ‘process_enabled’}}}
- populse_mia.utils.utils._is_valid_date(date_str, date_format)[source]¶
Checks if a string matches the given date format.
- Parameters:
(str) (date_format) – The date string to validate.
(str) – The expected date format.
- Return (bool):
True if the string matches the format, False otherwise.
- populse_mia.utils.utils.check_python_version()[source]¶
Checks if the Python version is at least 3.10.
- Raises:
RuntimeError – If the Python version is lower than 3.10.
- populse_mia.utils.utils.check_value_type(value, value_type, is_subvalue=False)[source]¶
Checks the type of new value in a table cell (QTableWidget).
- Parameters:
(str) (value) – Value of the cell (always a str, can be a string representation of a list)
(type) (value_type) – Expected type (can be list[str], list[int], etc.)
(bool) (is_subvalue) – Whether the value is a subvalue of a list.
- Returns:
True if the value is valid to replace the old one, False otherwise
- populse_mia.utils.utils.dict4runtime_update(runtime_dict, project, db_filename, *tags)[source]¶
Update a dictionary with tag values from the project’s current collection.
This function populates the runtime_dict with values associated with the specified tags from the COLLECTION_CURRENT database collection. If a tag is not present or its value is None, it is assigned the string “Undefined”. Date values are converted to ISO-formatted strings.
- Parameters:
(dict) (runtime_dict) – Dictionary used to transfer data from list_outputs to run_process_mia.
project – The project instance containing the database.
(str) (db_filename) – The name of the database file to query.
tags – Variable number of tag names to retrieve from the database.
- populse_mia.utils.utils.get_db_field_value(project, document, field)[source]¶
Retrieve the value of a specific field for a document from the project’s database.
- Parameters:
(Project) (project) – The current project instance containing the database.
(str) (field) – The absolute path to the document.
(str) – The name of the field whose value should be retrieved.
- Returns:
The value of the specified field for the document in the current collection.
- populse_mia.utils.utils.get_document_names(project, collection)[source]¶
Retrieves the names of all documents in the specified collection from the project’s database.
- Parameters:
project – The project instance containing the database.
(str) (collection) – The name of the collection to query.
- Returns (list[str]):
A list of document names in the collection.
- populse_mia.utils.utils.get_field_names(project, collection)[source]¶
Retrieves the list of field names (i.e., column names) for documents in the specified collection of the project’s database.
- Parameters:
project – The project instance containing the database.
(str) (collection) – The name of the collection to inspect.
- Returns (list[str]):
A list of field names in the collection.
- populse_mia.utils.utils.get_shown_tags(project)[source]¶
Retrieves the list of tags that are marked as ‘shown’ in the project’s database.
- Parameters:
project – The project instance containing the database.
- Returns (list[str]):
A list of tag names marked as shown.
- populse_mia.utils.utils.get_value(project, collection, file_name, field)[source]¶
Retrieves the value of a specific field from a document in the given collection.
- Parameters:
project – The project instance containing the database.
(str) (field) – The name of the collection containing the document.
(str) – The name of the document (typically the file name).
(str) – The name of the field whose value is to be retrieved.
- Returns:
The value of the specified field, or None if not found.
- populse_mia.utils.utils.launch_mia(MainWindow, Project, SavedProjects, Config, args)[source]¶
Launch and run the Mia software application.
- This function is the main entry point. It:
Installs a custom sys.excepthook to handle uncaught exceptions.
Prevents multiple instances unless explicitly allowed.
Verifies saved projects consistency.
Performs project cleanup safely before destruction.
Creates and displays the main Qt window.
Ensures idempotent cleanup on exit or crash.
All state is local and shared via closures.
- Parameters:
(class) (Config) – The main window class to be instantiated.
(class) – The project class to be instantiated.
(class) – The class that manages all projects saved in Mia.
(class) – The class that manages Mia’s configuration and properties.
(argparse.Namespace) (args) – Parsed command-line arguments.
- populse_mia.utils.utils.message_already_exists()[source]¶
Displays a message box to tell that a project name already exists.
- populse_mia.utils.utils.remove_document(project, collection, documents)[source]¶
Removes one or multiple documents from the specified collection in the given project’s database.
- Parameters:
project – The project instance containing the database.
(str) (collection) – The name of the collection from which documents will be removed.
list[str]) (documents (str or) – A single document name or a list of document names to remove.
- populse_mia.utils.utils.safe_connect(signal, slot)[source]¶
Connect a Qt signal to a slot, ensuring a single connection.
First disconnects
signalfromslot(if connected) to avoid duplicate connections, then connects them. This guarantees that the slot is connected exactly once.- Parameters:
signal – The Qt signal to (re)connect.
slot – The slot (callable) to connect to the signal.
- populse_mia.utils.utils.safe_disconnect(signal, slot)[source]¶
Disconnect a Qt signal from a slot if connected.
Attempts to disconnect
signalfromslotand silently ignores the error raised when the connection does not exist. This makes the operation idempotent and safe to call multiple times.- Parameters:
signal – The Qt signal to disconnect from.
slot – The slot (callable) previously connected to the signal.
- populse_mia.utils.utils.set_db_field_value(project, document, tag_to_add)[source]¶
Create or update a field and its value for a document in the project’s database.
If the specified field does not exist in the current and initial collections, it is added to both. The field is then assigned a value for the given document.
- Parameters:
(Project) (project) – The project instance containing the database and schema.
(str) (document) – The absolute path of the document.
(dict) (tag_to_add) – A dictionary describing the field with keys: ‘name’, ‘value’, ‘default_value’, ‘description’, ‘field_type’, ‘origin’, ‘unit’, and ‘visibility’.
- populse_mia.utils.utils.set_filters_directory_as_default(dialog)[source]¶
Sets the filters directory as default (Json files)
- Parameters:
(QFileDialog) (dialog) – current file dialog
- populse_mia.utils.utils.set_item_data(item, value, value_type)[source]¶
Sets the data for a given item in the data browser based on the expected type.
This function prepares the input value according to the specified value_type, converting it into a format suitable for PyQt’s QVariant. It supports both primitive types (e.g., int, str, float) and more complex types like datetime, date, time, and lists of these types.
- Parameters:
(QStandardItem) (item) – The item to update (expected to support setData method).
(Any) (value) – The new value to set for the item.
(Type) (value_type) – The expected type of the value, which can be a standard Python type (e.g., str, int, float, bool) or a typing-based list type (e.g., list[int], list[datetime]).
- populse_mia.utils.utils.set_projects_directory_as_default(dialog, Config)[source]¶
Sets the projects directory as default.
- Parameters:
(QFileDialog) (dialog) – current file dialog.
Config – The class that manages Mia’s configuration and properties.
- populse_mia.utils.utils.table_to_database(value, value_type)[source]¶
Prepares the value to the database based on its type.
- Parameters:
(Any) (value) – Value to convert.
(Type) (value_type) – Value type.
- Return (Any):
The value converted for the database.
- populse_mia.utils.utils.type_name(t)[source]¶
Returns the name of a type or a string representation for generic aliases.
- Parameters:
(Any) (t) – The type to get the name or representation for. This can be a regular type (e.g., str, list) or a generic alias (e.g., list[str]).
- Returns:
The name of the type (e.g., ‘str’) or the string representation of the generic alias (e.g., ‘list[str]’).
- populse_mia.utils.utils.update_auto_inheritance(node, job=None)[source]¶
Automatically infer database tags for output parameters from input parameters.
- Single input case: When only one input parameter has a database
value, all outputs inherit from this input.
- Multiple inputs with same value: When multiple inputs exist but
have identical database values, fallback to single input behavior.
- Ambiguous case: When multiple inputs have different database
values, track all possible inheritance sources for user resolution.
The process attribute auto_inheritance_dict is filled with these values. It’s a dict with the shape:
{output_filename: <input_spec>}
output_filename is the relative filename in the database
<input_spec> can be:
a string: filename
a dict:
{input_param: input_filename}
auto_inheritance_dict is built automatically, and is used as a fallback to
ProcessMIAinheritance_dict, built “manually” (specialized for each process) in theProcessMIA.list_outputs()when the latter does not exist, or does not specify what an output inherits from.If ambiguities still subsist, the Mia infrastructure will ask the user how to solve them, which is not very convenient, and error-prone, thus should be avoided.
- Parameters:
node – The node (typically a process or process node) whose inputs and outputs are analyzed for tag inheritance.
job – An optional job object containing parameter values to override or populate the node’s inputs and outputs. Defaults to None.
- Return (dict or None):
Auto-inheritance mapping if successful and no job provided, None if no inheritance can be determined or job is provided (in which case the job object is updated in-place).
- populse_mia.utils.utils.verCmp(first_ver, sec_ver, comp)[source]¶
Version comparator.
- Compares two versions according to the specified comparator:
‘eq’: Returns True if the first version is equal to the second.
- ‘sup’: Returns True if the first version is greater than or equal
to the second.
- ‘inf’: Returns True if the first version is less than or equal to
the second.
- Parameters:
(str) (comp) – The first version to compare (e.g., ‘0.13.0’).
(str) – The second version to compare (e.g., ‘0.13.0’).
(str) – The comparator to use (‘sup’, ‘inf’, ‘eq’).
- Returns:
True if the comparison condition is satisfied, False otherwise.
- Contains:
- Private function:
normalise: transform a version of a package to a corresponding list of integer
- populse_mia.utils.utils.verify_processes(nipypeVer, miaProcVer, capsulVer, Config)[source]¶
Install or update to the last version available on the station, for nipype, capsul and mia_processes processes libraries.
- Parameters:
nipypeVer – nipype version currently installed (str).
miaProcVer – mia_processes version currently installed (str).
capsulVer – capsul version currently installed (str).
Config – The class that manages Mia’s configuration and properties.
By default, Mia provides three process libraries in the pipeline library (available in Pipeline Manager tab). The nipype, given as it is because it is developed by another team (https://github.com/nipy/nipype), and mia_processes, capsul which are developed under the umbrella of populse (https://github.com/populse/mia_processes). When installing Mia in user mode, these three libraries are automatically installed on the station. The idea is to use the versioning available with pypi (https://pypi.org/). Thus, it is sufficient for the user to change the version of the library installed on the station (pip install…) to also change the version available in Mia. Indeed, when starting Mia, the verify_processes function will update the nipype, capsul and mia_processes libraries in the pipeline library accordingly. Currently, it is mandatory to have nipype, capsul and mia_processes installed in the station. All this information, as well as the installed versions and package paths are saved in the properties_path/properties/process_config.yml file. When an upgrade or downgrade is performed for a package, the last configuration used by the user is kept (if a pipeline was visible, it remains so and vice versa). However, if a new pipeline is available in the new version it is automatically marked as visible in the library.
- Contains:
- Private function:
_deepCompDic: keep the previous config existing before packages update
- populse_mia.utils.utils.verify_setup(Config, dev_mode, pypath=None, dot_mia_config='/home/econdami/.populse_mia/configuration_path.yml')[source]¶
Check and try to correct the configuration if necessary.
- Parameters:
Config – The class that manages Mia’s configuration and properties.
(bool) (dev_mode) – the current developer mode. (True: dev, False: user)
(list) (pypath) – List of paths for the capsul config.
(str) (dot_mia_config) – Path to the configuration_path.yml file.
- Contains:
- Private function:
- _browse_properties_path: the user define the properties_path
parameter
_cancel_clicked: exit form Mia
_make_default_config: make default configuration
_save_yml_file: save data in a YAML file
_verify_miaConfig: check the config and try to fix if necessary