pic_scanner.gui.models.element_bases.element_key
Submodules
Attributes
Classes
A class to represent the key for a GUI element. |
Package Contents
- pic_scanner.gui.models.element_bases.element_key.PARENT_LOGGER
- pic_scanner.gui.models.element_bases.element_key.MOD_LOGGER
- class pic_scanner.gui.models.element_bases.element_key.GUIElementKey(key: str, enable_prefix: bool = False, enable_suffix: bool = False, prefix: str = None, suffix: str = None, replace_spaces: bool = False, replacement_char: str = '_', part_delimiter: str = '_', all_upper: bool = True, *args, **kwargs)
Bases:
str,pic_scanner.log_engine.LoggableA class to represent the key for a GUI element.
The class is a subclass of the `str
- Properties:
- prefix_enabled (bool):
Whether the prefix is enabled.
- prefix (str):
The prefix for the key.
- suffix_enabled (bool):
Whether the suffix is enabled.
- suffix (str):
The suffix for the key.
- pre_formatted (str):
The pre-formatted key.
- replacement_char (str):
The character to replace spaces with.
- replace_spaces (bool):
Whether to replace spaces in the key.
- formatted_key (str):
The formatted key.
This property is read-only and consists of the prefix, key, and suffix.
- part_delimiter (str):
The delimiter for the key parts.
- Parameters:
key (str)
enable_prefix (bool)
enable_suffix (bool)
prefix (str)
suffix (str)
replace_spaces (bool)
replacement_char (str)
part_delimiter (str)
all_upper (bool)
- property all_upper
- Whether the key should be all upper case.
- Returns:
True if the key should be all upper case, False otherwise.
- Return type:
bool
- property part_delimiter_1
- The first part delimiter for the key.
- Returns:
The first part delimiter for the key.
- Return type:
str
- property part_delimiter_2
- The second part delimiter for the key.
- Returns:
The second part delimiter for the key.
- Return type:
str
- property prefix_enabled: bool
Whether the prefix is enabled.
- Returns:
True if the prefix is enabled, False otherwise.
- Return type:
bool
- property prefix: str
The prefix for the key.
- Returns:
The prefix for the key.
- Return type:
str
- property suffix_enabled: bool
Whether the suffix is enabled.
- Returns:
True if the suffix is enabled, False otherwise.
- Return type:
bool
- property suffix: str
The suffix for the key.
- Returns:
The suffix for the key.
- Return type:
str
- property pre_formatted: str
The pre-formatted key.
- Returns:
The pre-formatted key.
- Return type:
str
- property replacement_char: str
The character to replace spaces with.
- Returns:
The character to replace spaces with.
- Return type:
str
- property replace_spaces: bool
Whether to replace spaces in the key.
- Returns:
True if spaces should be replaced, False otherwise.
- Return type:
bool
- property formatted_key: str
The formatted key.
- Returns:
The formatted key.
- Return type:
str
- property formatted
- The formatted key with the prefix and suffix.
- Returns:
The formatted key.
- Return type:
str