Skip to content

Application Layer

The following module-level constants define the application's menu structure. These are built at import time from YAML configuration files and registered shortcut wrappers.

Icon Setter

REvoDesign.application.icon.IconSetter

Cluster Tab Controller

REvoDesign.application.cluster_tab.ClusterTabController

Configure runtime behavior of the clustering tab after setupUi().

install()

Install tooltips, method-specific panel switching, and safe defaults.

sync_from_state()

Apply current configuration-backed widget state to the cluster tab.

confirm_cluster_run()

Require explicit confirmation for the deprecated legacy workflow.

Internationalization

REvoDesign.application.i18n.language_settings.LanguageSwitch

Bases: QWidget

Language switching component, manages the language settings and switching for the application.

Attributes:

Name Type Description
bus ConfigBus

Configuration bus for communication with other components.

window

Main window of the application.

language_settings list[LanguageNameRegistry]

Dictionary containing language related settings.

restore_from_config()

Restores the language setting from the configuration.

get_language_items()

Returns a tuple of all language items.

Returns:

Type Description
tuple[LanguageItem, ...]

Tuple of all language items.

add_lan_to_menu(lan_regsitry)

Adds the language item to the language menu.

register_language()

Registers all languages.

switch_language(language)

Switches to the specified language.

Parameters:

Name Type Description Default
language LanguageItem

Language item to switch to.

required

REvoDesign.application.i18n.language_settings.LanguageItem dataclass

A frozen data class representing a language item.

Attributes:

Name Type Description
name str

The name of the language.

id str

The unique identifier for the language.

action Any

An action associated with the language item.

language_file property

Returns the absolute path to the language file.

This property constructs and returns the absolute path to the language file based on the language ID and a predefined directory.

Returns:

Name Type Description
str

The absolute path to the language file.

REvoDesign.application.i18n.language_settings.LanguageNameRegistry

Bases: TypedDict

A dictionary representing a language name registry from a JSON file.

Attributes: - code: The language code. - name: The name of the language. - action: The action associated with the language.