pyqt_reactive.widgets.enhanced_path_widget
Enhanced Path Widget for PyQt6 GUI
Provides intelligent path selection with browse button functionality. Uses standard Qt dialogs for consistency with the rest of OpenHCS.
Classes
|
Enhanced path widget with browse button using standard Qt dialogs. |
|
Defines behavior for path widget based on parameter analysis. |
Detects appropriate path behavior from parameter names and docstring hints. |
|
|
Nominal path behavior roles inferred from parameter-name tokens. |
Classify parsed path-name tokens into a nominal behavior role. |
|
|
One authoritative row for parameter-name path behavior inference. |
|
Boundary parse of external parameter names into exact tokens. |
- class pyqt_reactive.widgets.enhanced_path_widget.PathBehavior(is_directory: bool = False, extensions: List[str] | None = None, cache_key: PathCacheKey = PathCacheKey.GENERAL, description: str = 'path')[source]
Defines behavior for path widget based on parameter analysis.
- cache_key: PathCacheKey = 'general'
- classmethod from_extensions(extensions: List[str]) PathBehavior[source]
- with_cache_key(cache_key: PathCacheKey) PathBehavior[source]
- class pyqt_reactive.widgets.enhanced_path_widget.PathBehaviorDetector[source]
Detects appropriate path behavior from parameter names and docstring hints.
- static detect_behavior(param_name: str, param_info: ParameterInfo | None = None) PathBehavior[source]
Detect path behavior from parameter name and optional parameter info.
- Parameters:
param_name – Parameter name to analyze
param_info – Optional parameter info with docstring description
- Returns:
PathBehavior with detected settings
- class pyqt_reactive.widgets.enhanced_path_widget.PathNameRole(*values)[source]
Nominal path behavior roles inferred from parameter-name tokens.
- DIRECTORY = 'directory'
- FILE = 'file'
- PIPELINE = 'pipeline'
- STEP = 'step'
- FUNCTION = 'function'
- class pyqt_reactive.widgets.enhanced_path_widget.PathNameRoleSpec(role: PathNameRole, tokens: frozenset[str], behavior: PathBehavior)[source]
One authoritative row for parameter-name path behavior inference.
- role: PathNameRole
- behavior: PathBehavior
- __init__(role: PathNameRole, tokens: frozenset[str], behavior: PathBehavior) None
- class pyqt_reactive.widgets.enhanced_path_widget.PathParameterNameTokens(values: frozenset[str])[source]
Boundary parse of external parameter names into exact tokens.
- classmethod parse(param_name: str) PathParameterNameTokens[source]
- class pyqt_reactive.widgets.enhanced_path_widget.PathNameRoleClassifier[source]
Classify parsed path-name tokens into a nominal behavior role.
- classify(tokens: PathParameterNameTokens) PathNameRoleSpec | None[source]
- class pyqt_reactive.widgets.enhanced_path_widget.EnhancedPathWidget(param_name: str, current_value: Path | str | None, param_info: ParameterInfo | None = None, color_scheme=None)[source]
Enhanced path widget with browse button using standard Qt dialogs.
- path_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
- __init__(param_name: str, current_value: Path | str | None, param_info: ParameterInfo | None = None, color_scheme=None)[source]
Initialize enhanced path widget.
- Parameters:
param_name – Parameter name for behavior detection
current_value – Current path value
param_info – Optional parameter info with docstring
color_scheme – Color scheme for styling
- set_value(value: Path | str | None) None[source]
Implement ValueSettable ABC - alias for set_path().