forked from bitcoinafterlife/bal-electrum-plugin
docs(qt.py): Add detailed interval documentation for HeirsLockTimeEdit class behavior
This commit is contained in:
23
qt.py
23
qt.py
@@ -1275,26 +1275,37 @@ class _LockTimeEditor:
|
|||||||
=======
|
=======
|
||||||
"""
|
"""
|
||||||
HeirsLockTimeEdit - A custom QWidget for editing locktime values in the context of heirs distribution.
|
HeirsLockTimeEdit - A custom QWidget for editing locktime values in the context of heirs distribution.
|
||||||
|
|
||||||
This widget combines raw locktime editing with date-based selection and provides
|
This widget combines raw locktime editing with date-based selection and provides
|
||||||
additional functionality for managing locktime values in a heir inheritance scenario.
|
additional functionality for managing locktime values in a heir inheritance scenario.
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
- Supports both raw locktime values and human-readable date formats
|
- Supports both raw locktime values and human-readable date formats
|
||||||
- Emits valueEdited signal when the locktime value changes
|
- Emits valueEdited signal when the locktime value is edited
|
||||||
- Provides threshold-based validation for locktime values
|
- Provides threshold-based validation for locktime values
|
||||||
- Integrates with heir distribution workflows
|
- Integrates with heir distribution workflows
|
||||||
|
|
||||||
|
Behavior:
|
||||||
|
The class handles three types of locktime values:
|
||||||
|
1. **Timestamps**: Raw integer values representing Unix timestamps
|
||||||
|
2. **Day intervals**: Values ending with 'd' (e.g., '3d' = 3 days from now)
|
||||||
|
3. **Year intervals**: Values ending with 'y' (e.g., '2y' = 2 years from now)
|
||||||
|
|
||||||
|
Only these formats are valid:
|
||||||
|
- Examples: '1609459200', '3d', '2y'
|
||||||
|
- Invalid: 'invalid', '5m', '10x'
|
||||||
|
|
||||||
|
The widget automatically converts day/year intervals to appropriate timestamps.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
valueEdited (pyqtSignal): Signal emitted when the locktime value is edited
|
valueEdited (pyqtSignal): Signal emitted when the locktime value is edited
|
||||||
locktime_threshold (int): Minimum threshold value for locktime (default: 50000000)
|
locktime_threshold (int): Minimum threshold value for locktime (default: 50000000)
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
parent: Optional parent QWidget
|
parent: Optional parent QWidget
|
||||||
default_index (int): Default index for the combo box (default: 1)
|
default_index (int): Default index for the combo box (default: 1)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
>>>>>>> origin/doc
|
|
||||||
class HeirsLockTimeEdit(QWidget, _LockTimeEditor):
|
class HeirsLockTimeEdit(QWidget, _LockTimeEditor):
|
||||||
valueEdited = pyqtSignal()
|
valueEdited = pyqtSignal()
|
||||||
locktime_threshold = 50000000
|
locktime_threshold = 50000000
|
||||||
|
|||||||
Reference in New Issue
Block a user