pyguiadapter.adapter.uprogress
模块级方法
show_progressbar(min_value: int = 0, max_value: int = 100, inverted_appearance: bool = False, *, message_visible: bool = False, message_format: str = '%p%', message_centered: str = True, info_visible: bool = True, info_centered: bool = True, info_text_format: Literal['richtext', 'markdown', 'plaintext', 'autotext'] = 'autotext', initial_info: str = '') -> None
显示进度条。默认情况下,进度条处于隐藏状态,开发者必须手动调用此函数来显示进度条,此函数除了用于显示进度条,还可以对进度条进行配置。
Parameters:
Name | Type | Description | Default |
---|---|---|---|
min_value |
int
|
最小进度值,默认为 |
0
|
max_value |
int
|
最大进度值,默认为 |
100
|
inverted_appearance |
bool
|
是否改变进度条的显示方式,使其以反方向显示进度 |
False
|
message_visible |
bool
|
是否显示message信息 |
False
|
message_format |
str
|
message信息的格式,支持: |
'%p%'
|
message_centered |
str
|
message信息是否居中显示 |
True
|
info_visible |
bool
|
是否显示info区域 |
True
|
info_centered |
bool
|
info信息是否居中显示 |
True
|
info_text_format |
Literal['richtext', 'markdown', 'plaintext', 'autotext']
|
info信息的文本格式,支持 |
'autotext'
|
initial_info |
str
|
info信息的初始值 |
''
|
Returns:
Type | Description |
---|---|
None
|
无返回值 |
hide_progressbar() -> None
隐藏进度条
Returns:
Type | Description |
---|---|
None
|
无返回值 |
update_progress(value: int, info: Optional[str] = None) -> None
更新进度信息
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
int
|
当前进度值 |
required |
info |
Optional[str]
|
当前info文本 |
None
|
Returns:
Type | Description |
---|---|
None
|
无返回值 |
show_progress_dialog(min_value: int = 0, max_value: int = 100, inverted_appearance: bool = False, *, message_visible: bool = False, message_format: str = '%p%', message_centered: str = True, info_visible: bool = True, info_centered: bool = True, info_text_format: Literal['richtext', 'markdown', 'plaintext', 'autotext'] = 'autotext', initial_info: str = '', title: str = 'Progress', size: tuple = (400, 150), modal: bool = True) -> None
显示进度对话框。开发者必须手动调用此函数来显示进度对话框,此函数除了用于显示进度对话框, 还用于对进度对话框进行配置。
Parameters:
Name | Type | Description | Default |
---|---|---|---|
min_value |
int
|
最小进度值,默认为 |
0
|
max_value |
int
|
最大进度值,默认为 |
100
|
inverted_appearance |
bool
|
是否改变进度条的显示方式,使其以反方向显示进度 |
False
|
message_visible |
bool
|
是否显示message信息 |
False
|
message_format |
str
|
message信息的格式,支持: |
'%p%'
|
message_centered |
str
|
message信息是否居中显示 |
True
|
info_visible |
bool
|
是否显示info信息 |
True
|
info_centered |
bool
|
info信息是否居中显示 |
True
|
info_text_format |
Literal['richtext', 'markdown', 'plaintext', 'autotext']
|
info信息的文本格式,支持 |
'autotext'
|
initial_info |
str
|
info信息的初始值 |
''
|
title |
str
|
对话框标题 |
'Progress'
|
size |
tuple
|
对话框大小 |
(400, 150)
|
modal |
bool
|
是否为模态对话框 |
True
|
Returns: 无返回值
dismiss_progress_dialog() -> None
关闭进度对话框
Returns:
Type | Description |
---|---|
None
|
无返回值 |
update_progress_dialog(value: int, info: Optional[str] = None) -> None
更新进度对话框
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
int
|
当前进度值 |
required |
info |
Optional[str]
|
当前info文本 |
None
|
Returns: 无返回值