docs(qt.py): Add comprehensive documentation for BalWizardDialog class
This commit is contained in:
32
qt.py
32
qt.py
@@ -1592,6 +1592,38 @@ class BalDialog(WindowModalDialog):
|
|||||||
self.setWindowIcon(read_QIcon_from_bytes(bal_plugin.read_file(icon)))
|
self.setWindowIcon(read_QIcon_from_bytes(bal_plugin.read_file(icon)))
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
BalWizardDialog - A custom QDialog that implements a multi-step wizard interface.
|
||||||
|
|
||||||
|
This dialog provides a structured, step-by-step workflow for complex operations
|
||||||
|
in the Bal Electrum plugin, guiding users through a sequence of pages with
|
||||||
|
forward/backward navigation and validation.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
- Multi-page navigation with Previous/Next buttons
|
||||||
|
- Automatic validation before proceeding to next page
|
||||||
|
- Progress tracking with visual indicators
|
||||||
|
- Customizable page flow and validation rules
|
||||||
|
- Integration with BalDialog base class for consistent styling
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
The wizard follows a standard pattern:
|
||||||
|
1. Initialize with a list of page constructors
|
||||||
|
2. Each page is responsible for its own setup and validation
|
||||||
|
3. The dialog manages navigation and state between pages
|
||||||
|
4. Finalize action is triggered when all pages are completed
|
||||||
|
|
||||||
|
Attributes:
|
||||||
|
pages (list): List of page constructors for the wizard
|
||||||
|
current_page (int): Index of the currently displayed page
|
||||||
|
page_widgets (list): List of instantiated page widgets
|
||||||
|
|
||||||
|
Args:
|
||||||
|
parent: Optional parent QWidget
|
||||||
|
title (str): Title to display in the dialog header
|
||||||
|
pages (list): List of page constructors (callables) for each step
|
||||||
|
"""
|
||||||
|
|
||||||
class BalWizardDialog(BalDialog):
|
class BalWizardDialog(BalDialog):
|
||||||
def __init__(self, bal_window: "BalWindow"):
|
def __init__(self, bal_window: "BalWindow"):
|
||||||
assert bal_window
|
assert bal_window
|
||||||
|
|||||||
Reference in New Issue
Block a user