Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
k54kdk
PyQt Fluent Widgets
提交
5f11da4a
P
PyQt Fluent Widgets
项目概览
k54kdk
/
PyQt Fluent Widgets
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PyQt Fluent Widgets
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
5f11da4a
编写于
4月 01, 2023
作者:
之一Yo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加 `SpinBox`
上级
95e1a604
变更
32
展开全部
隐藏空白更改
内联
并排
Showing
32 changed file
with
25869 addition
and
24991 deletion
+25869
-24991
examples/gallery/app/common/icon.py
examples/gallery/app/common/icon.py
+1
-0
examples/gallery/app/common/translator.py
examples/gallery/app/common/translator.py
+2
-1
examples/gallery/app/components/sample_card.py
examples/gallery/app/components/sample_card.py
+1
-1
examples/gallery/app/resource/audio/ZhiYinJi.wav
examples/gallery/app/resource/audio/ZhiYinJi.wav
+0
-0
examples/gallery/app/resource/i18n/gallery_hk.ts
examples/gallery/app/resource/i18n/gallery_hk.ts
+145
-57
examples/gallery/app/resource/i18n/gallery_zh.qm
examples/gallery/app/resource/i18n/gallery_zh.qm
+0
-0
examples/gallery/app/resource/i18n/gallery_zh.ts
examples/gallery/app/resource/i18n/gallery_zh.ts
+145
-57
examples/gallery/app/resource/images/icons/Text_black.svg
examples/gallery/app/resource/images/icons/Text_black.svg
+1
-0
examples/gallery/app/resource/images/icons/Text_white.svg
examples/gallery/app/resource/images/icons/Text_white.svg
+1
-0
examples/gallery/app/view/basic_input_interface.py
examples/gallery/app/view/basic_input_interface.py
+1
-3
examples/gallery/app/view/home_interface.py
examples/gallery/app/view/home_interface.py
+17
-0
examples/gallery/app/view/main_window.py
examples/gallery/app/view/main_window.py
+11
-0
examples/gallery/app/view/status_info_interface.py
examples/gallery/app/view/status_info_interface.py
+41
-13
examples/gallery/app/view/text_interface.py
examples/gallery/app/view/text_interface.py
+64
-0
examples/gallery/gallery.pro
examples/gallery/gallery.pro
+1
-0
examples/spin_box/demo.py
examples/spin_box/demo.py
+42
-0
qfluentwidgets/__init__.py
qfluentwidgets/__init__.py
+1
-1
qfluentwidgets/_rc/images/spin_box/Down_black.svg
qfluentwidgets/_rc/images/spin_box/Down_black.svg
+4
-0
qfluentwidgets/_rc/images/spin_box/Down_white.svg
qfluentwidgets/_rc/images/spin_box/Down_white.svg
+1
-0
qfluentwidgets/_rc/images/spin_box/Up_black.svg
qfluentwidgets/_rc/images/spin_box/Up_black.svg
+4
-0
qfluentwidgets/_rc/images/spin_box/Up_white.svg
qfluentwidgets/_rc/images/spin_box/Up_white.svg
+1
-0
qfluentwidgets/_rc/qss/dark/line_edit.qss
qfluentwidgets/_rc/qss/dark/line_edit.qss
+1
-1
qfluentwidgets/_rc/qss/dark/spin_box.qss
qfluentwidgets/_rc/qss/dark/spin_box.qss
+65
-0
qfluentwidgets/_rc/qss/light/line_edit.qss
qfluentwidgets/_rc/qss/light/line_edit.qss
+2
-2
qfluentwidgets/_rc/qss/light/spin_box.qss
qfluentwidgets/_rc/qss/light/spin_box.qss
+62
-0
qfluentwidgets/_rc/resource.py
qfluentwidgets/_rc/resource.py
+25113
-24843
qfluentwidgets/_rc/resource.qrc
qfluentwidgets/_rc/resource.qrc
+6
-0
qfluentwidgets/components/dialog_box/dialog.py
qfluentwidgets/components/dialog_box/dialog.py
+1
-1
qfluentwidgets/components/widgets/__init__.py
qfluentwidgets/components/widgets/__init__.py
+10
-9
qfluentwidgets/components/widgets/line_edit.py
qfluentwidgets/components/widgets/line_edit.py
+6
-1
qfluentwidgets/components/widgets/spin_box.py
qfluentwidgets/components/widgets/spin_box.py
+118
-0
setup.py
setup.py
+1
-1
未找到文件。
examples/gallery/app/common/icon.py
浏览文件 @
5f11da4a
...
...
@@ -10,6 +10,7 @@ class Icon(FluentIconBase, Enum):
CHAT
=
"Chat"
CODE
=
"Code"
MENU
=
"Menu"
TEXT
=
"Text"
ALBUM
=
"Album"
SCROLL
=
"Scroll"
LAYOUT
=
"Layout"
...
...
examples/gallery/app/common/translator.py
浏览文件 @
5f11da4a
...
...
@@ -12,4 +12,5 @@ class Translator(QObject):
self
.
material
=
self
.
tr
(
'Material'
)
self
.
statusInfo
=
self
.
tr
(
'Status & info'
)
self
.
scroll
=
self
.
tr
(
'Scrolling'
)
self
.
layout
=
self
.
tr
(
'Layout'
)
\ No newline at end of file
self
.
layout
=
self
.
tr
(
'Layout'
)
self
.
text
=
self
.
tr
(
'Text'
)
\ No newline at end of file
examples/gallery/app/components/sample_card.py
浏览文件 @
5f11da4a
...
...
@@ -18,7 +18,7 @@ class SampleCard(QFrame):
self
.
iconWidget
=
IconWidget
(
icon
,
self
)
self
.
titleLabel
=
QLabel
(
title
,
self
)
self
.
contentLabel
=
QLabel
(
TextWrap
.
wrap
(
content
,
4
6
,
False
)[
0
],
self
)
self
.
contentLabel
=
QLabel
(
TextWrap
.
wrap
(
content
,
4
5
,
False
)[
0
],
self
)
self
.
hBoxLayout
=
QHBoxLayout
(
self
)
self
.
vBoxLayout
=
QVBoxLayout
()
...
...
examples/gallery/app/resource/audio/ZhiYinJi.wav
已删除
100644 → 0
浏览文件 @
95e1a604
文件已删除
examples/gallery/app/resource/i18n/gallery_hk.ts
浏览文件 @
5f11da4a
...
...
@@ -4,102 +4,102 @@
<
context
>
<
name
>
BasicInputInterface
<
/name
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
2
4
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
2
3
"
/>
<
source
>
A
simple
button
with
text
content
<
/source
>
<
translation
>
帶有文本的簡單按鈕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
3
5
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
3
3
"
/>
<
source
>
A
button
with
graphical
content
<
/source
>
<
translation
>
帶有圖標的按鈕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
2
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
0
"
/>
<
source
>
Accent
style
applied
to
button
<
/source
>
<
translation
>
使用主題色的按鈕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
9
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
7
"
/>
<
source
>
A
hyperlink
button
that
navigates
to
a
URI
<
/source
>
<
translation
>
導航到一個超鏈接的按鈕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
5
6
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
5
4
"
/>
<
source
>
A
2
-
state
CheckBox
<
/source
>
<
translation
>
雙態複選框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
6
5
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
6
3
"
/>
<
source
>
A
3
-
state
CheckBox
<
/source
>
<
translation
>
三態複選框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
7
6
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
7
4
"
/>
<
source
>
A
ComboBox
with
items
<
/source
>
<
translation
>
下拉框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
9
8
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
9
6
"
/>
<
source
>
A
group
of
RadioButton
controls
in
a
button
group
<
/source
>
<
translation
>
單選按鈕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
10
9
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
10
7
"
/>
<
source
>
A
simple
horizontal
slider
<
/source
>
<
translation
>
水平滑動條
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
11
8
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
11
6
"
/>
<
source
>
A
simple
switch
button
<
/source
>
<
translation
>
開關按鈕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
12
8
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
12
6
"
/>
<
source
>
Off
<
/source
>
<
translation
>
關
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
12
6
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
12
4
"
/>
<
source
>
On
<
/source
>
<
translation
>
開
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
2
4
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
2
3
"
/>
<
source
>
Standard
push
button
<
/source
>
<
translation
>
標準按鈕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
2
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
0
"
/>
<
source
>
Accent
style
button
<
/source
>
<
translation
>
主題色按鈕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
5
6
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
5
4
"
/>
<
source
>
Two
-
state
CheckBox
<
/source
>
<
translation
>
雙態複選框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
6
3
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
6
1
"
/>
<
source
>
Three
-
state
CheckBox
<
/source
>
<
translation
>
三態複選框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
9
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
7
"
/>
<
source
>
GitHub
home
page
<
/source
>
<
translation
>
GItHub
主頁
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
7
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
5
"
/>
<
source
>
Star
Platinum
<
/source
>
<
translation
>
白金之星
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
8
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
6
"
/>
<
source
>
Crazy
Diamond
<
/source
>
<
translation
>
瘋狂鑽石
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
9
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
7
"
/>
<
source
>
Soft
and
Wet
<
/source
>
<
translation
>
軟又溼
<
/translation
>
<
/message
>
...
...
@@ -221,55 +221,60 @@
<
context
>
<
name
>
MainWindow
<
/name
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
28
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
32
"
/>
<
source
>
Home
<
/source
>
<
translation
>
主頁
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
36
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
40
"
/>
<
source
>
Basic
input
<
/source
>
<
translation
>
基本輸入
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
14
3
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
14
7
"
/>
<
source
>
Dialogs
<
/source
>
<
translation
>
對話框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
15
0
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
15
4
"
/>
<
source
>
Layout
<
/source
>
<
translation
>
佈局
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
16
4
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
16
8
"
/>
<
source
>
Menus
<
/source
>
<
translation
>
菜單
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
57
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
61
"
/>
<
source
>
Material
<
/source
>
<
translation
>
材料
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
17
1
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
17
5
"
/>
<
source
>
Scrolling
<
/source
>
<
translation
>
滾動
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
78
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
82
"
/>
<
source
>
Status
&
amp
;
info
<
/source
>
<
translation
>
狀態和信息
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
2
39
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
2
50
"
/>
<
source
>
This
is
a
help
message
<
/source
>
<
translation
>
一條友善的提示
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
2
39
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
2
50
"
/>
<
source
>
You
clicked
a
customized
navigation
widget
.
You
can
add
more
custom
widgets
by
calling
`NavigationInterface.addWidget()`
😉
<
/source
>
<
translation
>
你點擊了一個自定義的導航項
。
你可以通過
`NavigationInterface.addWidget()`
添加更多的自定義導航項
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
189
"
/>
<
source
>
Text
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
MaterialInterface
<
/name
>
...
...
@@ -378,7 +383,7 @@
<
translation
>
本地音樂庫
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
20
6
"
/>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
20
7
"
/>
<
source
>
Choose
folder
<
/source
>
<
translation
>
選擇文件夾
<
/translation
>
<
/message
>
...
...
@@ -551,7 +556,7 @@
<
translation
>
帶有工具提示的標籤
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
39
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
45
"
/>
<
source
>
Show
StateToolTip
<
/source
>
<
translation
>
顯示進度提示條
<
/translation
>
<
/message
>
...
...
@@ -566,27 +571,27 @@
<
translation
>
簡單工具提示
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
37
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
43
"
/>
<
source
>
The
model
training
is
complete
!<
/source
>
<
translation
>
模型訓練完成啦
!
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
14
3
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
14
9
"
/>
<
source
>
Training
model
<
/source
>
<
translation
>
正在訓練模型
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
14
3
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
14
9
"
/>
<
source
>
Please
wait
patiently
<
/source
>
<
translation
>
心急吃不了熱荳腐
,
請耐心等待哦
~<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
45
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
51
"
/>
<
source
>
Hide
StateToolTip
<
/source
>
<
translation
>
隱藏進度提示條
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
114
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
57
"
/>
<
source
>
Success
<
/source
>
<
translation
>
成功
<
/translation
>
<
/message
>
...
...
@@ -596,7 +601,7 @@
<
translation
>
可關閉的消息條
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
11
5
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
7
5
"
/>
<
source
>
Warning
<
/source
>
<
translation
>
警告
<
/translation
>
<
/message
>
...
...
@@ -621,32 +626,22 @@
<
translation
>
自定義圖標
、
背景和小部件的消息條
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
113
"
/>
<
source
>
Information
<
/source
>
<
translation
>
信息
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
116
"
/>
<
source
>
Error
<
/source
>
<
translation
>
錯誤
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
129
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
135
"
/>
<
source
>
InfoBar
with
different
pop
-
up
locations
<
/source
>
<
translation
>
不同彈出位置的消息條
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
84
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
90
"
/>
<
source
>
No
Internet
<
/source
>
<
translation
>
無網絡連接
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
16
2
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
16
8
"
/>
<
source
>
Lesson
4
<
/source
>
<
translation
>
Lesson
4
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
17
3
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
17
9
"
/>
<
source
>
Lesson
5
<
/source
>
<
translation
>
Lesson
5
<
/translation
>
<
/message
>
...
...
@@ -656,27 +651,27 @@
<
translation
>
我的名字叫吉良吉影
,
33
歲
。
住在杜王町東北部的別墅區一帶
,
未婚
。
我在龜友連鎖店服務
。
每天都要加班到晚上8點才能回家
。
我不抽菸
,
酒僅止於淺嚐
。
晚上11點睡
,
每天要睡足8個小時
。
睡前
,
我一定喝一盃溫牛奶
,
然後做20分鐘的柔軟操
,
上了床
,
馬上熟睡
。
一覺到天亮
,
決不把疲勞和壓力留到第二天
。
醫生都説我很正常
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
15
0
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
15
6
"
/>
<
source
>
Lesson
3
<
/source
>
<
translation
>
Lesson
3
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
15
0
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
15
6
"
/>
<
source
>
Believe
in
the
spin
,
just
keep
believing
!<
/source
>
<
translation
>
相信回旋吧
,
隻管相信就是了
!
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
16
2
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
16
8
"
/>
<
source
>
With
respect
,
let
&
apos
;
s
advance
towards
a
new
stage
of
the
spin
.
<
/source
>
<
translation
>
表達敬意吧
,
表達出敬意
,
然後邁向回旋的另一個全新階段
!
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
17
3
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
17
9
"
/>
<
source
>
迂回路を行けば最短ルート
。
<
/source
>
<
translation
>
最短的捷徑就是繞遠路
,
繞遠路才是我的最短捷徑
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
84
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
90
"
/>
<
source
>
An
error
message
which
won
&
apos
;
t
disappear
automatically
.
<
/source
>
<
translation
>
一條不會自動消失的消息
。
<
/translation
>
<
/message
>
...
...
@@ -690,6 +685,94 @@
<
source
>
Action
<
/source
>
<
translation
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
113
"
/>
<
source
>
Top
right
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
114
"
/>
<
source
>
Top
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
115
"
/>
<
source
>
Top
left
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
116
"
/>
<
source
>
Bottom
right
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
117
"
/>
<
source
>
Bottom
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
118
"
/>
<
source
>
Bottom
left
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
201
"
/>
<
source
>
Lesson
1
<
/source
>
<
translation
type
=
"
unfinished
"
>
Lesson
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
201
"
/>
<
source
>
Don
&
apos
;
t
have
any
strange
expectations
of
me
.
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
212
"
/>
<
source
>
Lesson
2
<
/source
>
<
translation
type
=
"
unfinished
"
>
Lesson
2
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
212
"
/>
<
source
>
Don
&
apos
;
t
let
your
muscles
notice
.
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
TextInterface
<
/name
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
23
"
/>
<
source
>
ko
no
dio
da
!
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
25
"
/>
<
source
>
A
LineEdit
with
a
clear
button
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
39
"
/>
<
source
>
A
DoubleSpinBox
with
a
spin
button
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
46
"
/>
<
source
>
A
DateEdit
with
a
spin
button
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
53
"
/>
<
source
>
A
TimeEdit
with
a
spin
button
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
60
"
/>
<
source
>
A
DateTimeEdit
with
a
spin
button
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
32
"
/>
<
source
>
A
SpinBox
with
a
spin
button
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ToolBar
<
/name
>
...
...
@@ -751,5 +834,10 @@
<
source
>
Layout
<
/source
>
<
translation
>
佈局
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../common/translator.py
"
line
=
"
16
"
/>
<
source
>
Text
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
/TS
>
examples/gallery/app/resource/i18n/gallery_zh.qm
浏览文件 @
5f11da4a
无法预览此类型文件
examples/gallery/app/resource/i18n/gallery_zh.ts
浏览文件 @
5f11da4a
...
...
@@ -4,102 +4,102 @@
<
context
>
<
name
>
BasicInputInterface
<
/name
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
2
4
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
2
3
"
/>
<
source
>
A
simple
button
with
text
content
<
/source
>
<
translation
>
带有文本的简单按钮
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
3
5
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
3
3
"
/>
<
source
>
A
button
with
graphical
content
<
/source
>
<
translation
>
带有图标的按钮
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
2
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
0
"
/>
<
source
>
Accent
style
applied
to
button
<
/source
>
<
translation
>
使用主题色的按钮
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
9
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
7
"
/>
<
source
>
A
hyperlink
button
that
navigates
to
a
URI
<
/source
>
<
translation
>
导航到一个超链接的按钮
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
5
6
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
5
4
"
/>
<
source
>
A
2
-
state
CheckBox
<
/source
>
<
translation
>
双态复选框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
6
5
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
6
3
"
/>
<
source
>
A
3
-
state
CheckBox
<
/source
>
<
translation
>
三态复选框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
7
6
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
7
4
"
/>
<
source
>
A
ComboBox
with
items
<
/source
>
<
translation
>
下拉框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
9
8
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
9
6
"
/>
<
source
>
A
group
of
RadioButton
controls
in
a
button
group
<
/source
>
<
translation
>
单选按钮
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
10
9
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
10
7
"
/>
<
source
>
A
simple
horizontal
slider
<
/source
>
<
translation
>
水平滑动条
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
11
8
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
11
6
"
/>
<
source
>
A
simple
switch
button
<
/source
>
<
translation
>
开关按钮
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
12
8
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
12
6
"
/>
<
source
>
Off
<
/source
>
<
translation
>
关
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
12
6
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
12
4
"
/>
<
source
>
On
<
/source
>
<
translation
>
开
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
2
4
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
2
3
"
/>
<
source
>
Standard
push
button
<
/source
>
<
translation
>
标准按钮
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
2
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
0
"
/>
<
source
>
Accent
style
button
<
/source
>
<
translation
>
主题色按钮
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
5
6
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
5
4
"
/>
<
source
>
Two
-
state
CheckBox
<
/source
>
<
translation
>
双态复选框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
6
3
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
6
1
"
/>
<
source
>
Three
-
state
CheckBox
<
/source
>
<
translation
>
三态复选框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
9
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
4
7
"
/>
<
source
>
GitHub
home
page
<
/source
>
<
translation
>
GItHub
主页
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
7
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
5
"
/>
<
source
>
Star
Platinum
<
/source
>
<
translation
>
白金之星
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
8
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
6
"
/>
<
source
>
Crazy
Diamond
<
/source
>
<
translation
>
疯狂钻石
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
9
"
/>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
8
7
"
/>
<
source
>
Soft
and
Wet
<
/source
>
<
translation
>
软又湿
<
/translation
>
<
/message
>
...
...
@@ -221,55 +221,60 @@
<
context
>
<
name
>
MainWindow
<
/name
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
28
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
32
"
/>
<
source
>
Home
<
/source
>
<
translation
>
主页
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
36
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
40
"
/>
<
source
>
Basic
input
<
/source
>
<
translation
>
基本输入
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
14
3
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
14
7
"
/>
<
source
>
Dialogs
<
/source
>
<
translation
>
对话框
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
15
0
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
15
4
"
/>
<
source
>
Layout
<
/source
>
<
translation
>
布局
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
16
4
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
16
8
"
/>
<
source
>
Menus
<
/source
>
<
translation
>
菜单
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
57
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
61
"
/>
<
source
>
Material
<
/source
>
<
translation
>
材料
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
17
1
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
17
5
"
/>
<
source
>
Scrolling
<
/source
>
<
translation
>
滚动
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
78
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
1
82
"
/>
<
source
>
Status
&
amp
;
info
<
/source
>
<
translation
>
状态和信息
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
2
39
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
2
50
"
/>
<
source
>
This
is
a
help
message
<
/source
>
<
translation
>
一条友善的提示
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
2
39
"
/>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
2
50
"
/>
<
source
>
You
clicked
a
customized
navigation
widget
.
You
can
add
more
custom
widgets
by
calling
`NavigationInterface.addWidget()`
😉
<
/source
>
<
translation
>
你点击了一个自定义的导航项
。
你可以通过
`NavigationInterface.addWidget()`
添加更多的自定义导航项
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/main_window.py
"
line
=
"
189
"
/>
<
source
>
Text
<
/source
>
<
translation
>
文本
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
MaterialInterface
<
/name
>
...
...
@@ -378,7 +383,7 @@
<
translation
>
本地音乐库
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
20
6
"
/>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
20
7
"
/>
<
source
>
Choose
folder
<
/source
>
<
translation
>
选择文件夹
<
/translation
>
<
/message
>
...
...
@@ -551,7 +556,7 @@
<
translation
>
带有工具提示的标签
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
39
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
45
"
/>
<
source
>
Show
StateToolTip
<
/source
>
<
translation
>
显示进度提示条
<
/translation
>
<
/message
>
...
...
@@ -566,27 +571,27 @@
<
translation
>
简单工具提示
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
37
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
43
"
/>
<
source
>
The
model
training
is
complete
!<
/source
>
<
translation
>
模型训练完成啦
!
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
14
3
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
14
9
"
/>
<
source
>
Training
model
<
/source
>
<
translation
>
正在训练模型
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
14
3
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
14
9
"
/>
<
source
>
Please
wait
patiently
<
/source
>
<
translation
>
心急吃不了热豆腐
,
请耐心等待哦
~<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
45
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
51
"
/>
<
source
>
Hide
StateToolTip
<
/source
>
<
translation
>
隐藏进度提示条
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
114
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
57
"
/>
<
source
>
Success
<
/source
>
<
translation
>
成功
<
/translation
>
<
/message
>
...
...
@@ -596,7 +601,7 @@
<
translation
>
可关闭的消息条
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
11
5
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
7
5
"
/>
<
source
>
Warning
<
/source
>
<
translation
>
警告
<
/translation
>
<
/message
>
...
...
@@ -621,32 +626,22 @@
<
translation
>
自定义图标
、
背景和小部件的消息条
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
113
"
/>
<
source
>
Information
<
/source
>
<
translation
>
信息
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
116
"
/>
<
source
>
Error
<
/source
>
<
translation
>
错误
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
129
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
135
"
/>
<
source
>
InfoBar
with
different
pop
-
up
locations
<
/source
>
<
translation
>
不同弹出位置的消息条
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
84
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
90
"
/>
<
source
>
No
Internet
<
/source
>
<
translation
>
无网络连接
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
16
2
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
16
8
"
/>
<
source
>
Lesson
4
<
/source
>
<
translation
>
Lesson
4
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
17
3
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
17
9
"
/>
<
source
>
Lesson
5
<
/source
>
<
translation
>
Lesson
5
<
/translation
>
<
/message
>
...
...
@@ -656,27 +651,27 @@
<
translation
>
我的名字叫吉良吉影
,
33
岁
。
住在杜王町东北部的别墅区一带
,
未婚
。
我在龟友连锁店服务
。
每天都要加班到晚上8点才能回家
。
我不抽烟
,
酒仅止于浅尝
。
晚上11点睡
,
每天要睡足8个小时
。
睡前
,
我一定喝一杯温牛奶
,
然后做20分钟的柔软操
,
上了床
,
马上熟睡
。
一觉到天亮
,
决不把疲劳和压力留到第二天
。
医生都说我很正常
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
15
0
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
15
6
"
/>
<
source
>
Lesson
3
<
/source
>
<
translation
>
Lesson
3
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
15
0
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
15
6
"
/>
<
source
>
Believe
in
the
spin
,
just
keep
believing
!<
/source
>
<
translation
>
相信回旋吧
,
只管相信就是了
!
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
16
2
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
16
8
"
/>
<
source
>
With
respect
,
let
&
apos
;
s
advance
towards
a
new
stage
of
the
spin
.
<
/source
>
<
translation
>
表达敬意吧
,
表达出敬意
,
然后迈向回旋的另一个全新阶段
!
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
17
3
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
17
9
"
/>
<
source
>
迂回路を行けば最短ルート
。
<
/source
>
<
translation
>
最短的捷径就是绕远路
,
绕远路才是我的最短捷径
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
84
"
/>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
1
90
"
/>
<
source
>
An
error
message
which
won
&
apos
;
t
disappear
automatically
.
<
/source
>
<
translation
>
一条不会自动消失的消息
。
<
/translation
>
<
/message
>
...
...
@@ -690,6 +685,94 @@
<
source
>
Action
<
/source
>
<
translation
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
113
"
/>
<
source
>
Top
right
<
/source
>
<
translation
>
右上角
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
114
"
/>
<
source
>
Top
<
/source
>
<
translation
>
顶部居中
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
115
"
/>
<
source
>
Top
left
<
/source
>
<
translation
>
左上角
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
116
"
/>
<
source
>
Bottom
right
<
/source
>
<
translation
>
右下角
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
117
"
/>
<
source
>
Bottom
<
/source
>
<
translation
>
底部居中
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
118
"
/>
<
source
>
Bottom
left
<
/source
>
<
translation
>
左下角
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
201
"
/>
<
source
>
Lesson
1
<
/source
>
<
translation
>
Lesson
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
201
"
/>
<
source
>
Don
&
apos
;
t
have
any
strange
expectations
of
me
.
<
/source
>
<
translation
>
别对我抱有什么奇怪的期待
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
212
"
/>
<
source
>
Lesson
2
<
/source
>
<
translation
>
Lesson
2
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
212
"
/>
<
source
>
Don
&
apos
;
t
let
your
muscles
notice
.
<
/source
>
<
translation
>
不要让肌肉察觉
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
TextInterface
<
/name
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
23
"
/>
<
source
>
ko
no
dio
da
!
<
/source
>
<
translation
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
25
"
/>
<
source
>
A
LineEdit
with
a
clear
button
<
/source
>
<
translation
>
带清空按钮的
LineEdit
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
39
"
/>
<
source
>
A
DoubleSpinBox
with
a
spin
button
<
/source
>
<
translation
>
带调节按钮的
DoubleSpinBox
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
46
"
/>
<
source
>
A
DateEdit
with
a
spin
button
<
/source
>
<
translation
>
带调节按钮的
DateEdit
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
53
"
/>
<
source
>
A
TimeEdit
with
a
spin
button
<
/source
>
<
translation
>
带调节按钮的
TimeEdit
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
60
"
/>
<
source
>
A
DateTimeEdit
with
a
spin
button
<
/source
>
<
translation
>
带调节按钮的
DateTimeEdit
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/text_interface.py
"
line
=
"
32
"
/>
<
source
>
A
SpinBox
with
a
spin
button
<
/source
>
<
translation
>
带调节按钮的
SpinBox
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ToolBar
<
/name
>
...
...
@@ -751,5 +834,10 @@
<
source
>
Layout
<
/source
>
<
translation
>
布局
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../common/translator.py
"
line
=
"
16
"
/>
<
source
>
Text
<
/source
>
<
translation
>
文本
<
/translation
>
<
/message
>
<
/context
>
<
/TS
>
examples/gallery/app/resource/images/icons/Text_black.svg
0 → 100644
浏览文件 @
5f11da4a
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
id=
""
width=
"16"
height=
"16"
style=
"width:16px;height:16px;"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 2048 2048"
enable-background=
"new 0 0 2048 2048"
xml:space=
"preserve"
><path
fill=
"#000000"
d=
"M0 1215 q0 -8 9 -35 q9 -27 22.5 -64 q13.5 -37 30.5 -79.5 q17 -42.5 32.5 -81 q15.5 -38.5 28.5 -69.5 q13 -31 18 -45 l311 -800 q8 -19 24 -30 q16 -11 36 -11 q22 0 36.5 11 q14.5 11 23.5 30 q9 20 16.5 41.5 q7.5 21.5 15.5 41.5 l75 194 q57 146 113.5 291 q56.5 145 113.5 291 l-68 179 l-58 -150 l-536 0 l-120 310 q-8 19 -24.5 30 q-16.5 11 -36.5 11 q-27 0 -45 -19.5 q-18 -19.5 -18 -45.5 ZM512 241 l-218 560 l436 0 l-218 -560 ZM576 2048 q-26 0 -45 -19 q-19 -19 -19 -45 q0 -21 8.5 -34 q8.5 -13 22.5 -20 q14 -7 31 -9 q17 -2 35 -2 q14 0 27 0.5 q13 0.5 24 0.5 l560 -1494 q7 -19 23.5 -30.5 q16.5 -11.5 36.5 -11.5 q20 0 36.5 11 q16.5 11 23.5 30 l572 1495 q11 0 21.5 -0.5 q10.5 -0.5 21.5 -0.5 q17 0 34 2 q17 2 30 9 q13 7 21 20 q8 13 8 34 q0 26 -19 45 q-19 19 -45 19 l-256 0 q-26 0 -45 -19 q-19 -19 -19 -45 q0 -23 9.5 -36 q9.5 -13 24 -19 q14.5 -6 32.5 -7.5 q18 -1.5 36 -1.5 l9 0 l-147 -384 l-688 0 l-144 384 q18 0 35.5 1.5 q17.5 1.5 32 7.5 q14.5 6 23.5 19 q9 13 9 36 q0 26 -19 45 q-19 19 -45 19 l-256 0 ZM1281 629 l-293 779 l591 0 l-298 -779 Z"
/></svg>
\ No newline at end of file
examples/gallery/app/resource/images/icons/Text_white.svg
0 → 100644
浏览文件 @
5f11da4a
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
id=
""
width=
"16"
height=
"16"
style=
"width:16px;height:16px;"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 2048 2048"
enable-background=
"new 0 0 2048 2048"
xml:space=
"preserve"
><path
fill=
"#FFFFFF"
d=
"M0 1215 q0 -8 9 -35 q9 -27 22.5 -64 q13.5 -37 30.5 -79.5 q17 -42.5 32.5 -81 q15.5 -38.5 28.5 -69.5 q13 -31 18 -45 l311 -800 q8 -19 24 -30 q16 -11 36 -11 q22 0 36.5 11 q14.5 11 23.5 30 q9 20 16.5 41.5 q7.5 21.5 15.5 41.5 l75 194 q57 146 113.5 291 q56.5 145 113.5 291 l-68 179 l-58 -150 l-536 0 l-120 310 q-8 19 -24.5 30 q-16.5 11 -36.5 11 q-27 0 -45 -19.5 q-18 -19.5 -18 -45.5 ZM512 241 l-218 560 l436 0 l-218 -560 ZM576 2048 q-26 0 -45 -19 q-19 -19 -19 -45 q0 -21 8.5 -34 q8.5 -13 22.5 -20 q14 -7 31 -9 q17 -2 35 -2 q14 0 27 0.5 q13 0.5 24 0.5 l560 -1494 q7 -19 23.5 -30.5 q16.5 -11.5 36.5 -11.5 q20 0 36.5 11 q16.5 11 23.5 30 l572 1495 q11 0 21.5 -0.5 q10.5 -0.5 21.5 -0.5 q17 0 34 2 q17 2 30 9 q13 7 21 20 q8 13 8 34 q0 26 -19 45 q-19 19 -45 19 l-256 0 q-26 0 -45 -19 q-19 -19 -19 -45 q0 -23 9.5 -36 q9.5 -13 24 -19 q14.5 -6 32.5 -7.5 q18 -1.5 36 -1.5 l9 0 l-147 -384 l-688 0 l-144 384 q18 0 35.5 1.5 q17.5 1.5 32 7.5 q14.5 6 23.5 19 q9 13 9 36 q0 26 -19 45 q-19 19 -45 19 l-256 0 ZM1281 629 l-293 779 l591 0 l-298 -779 Z"
/></svg>
\ No newline at end of file
examples/gallery/app/view/basic_input_interface.py
浏览文件 @
5f11da4a
# coding:utf-8
from
PyQt5.QtCore
import
Qt
,
QSize
from
PyQt5.QtWidgets
import
QWidget
,
QVBoxLayout
,
QButtonGroup
from
PyQt5.QtMultimedia
import
QSound
from
qfluentwidgets
import
(
PushButton
,
ToolButton
,
PrimaryPushButton
,
HyperlinkButton
,
ComboBox
,
RadioButton
,
CheckBox
,
Slider
,
SwitchButton
,
IndicatorPosition
)
ComboBox
,
RadioButton
,
CheckBox
,
Slider
,
SwitchButton
)
from
.gallery_interface
import
GalleryInterface
from
..common.translator
import
Translator
...
...
@@ -30,7 +29,6 @@ class BasicInputInterface(GalleryInterface):
# tool button
button
=
ToolButton
(
'app/resource/images/kunkun.png'
)
button
.
setIconSize
(
QSize
(
40
,
40
))
# button.clicked.connect(lambda: QSound.play('app/resource/audio/ZhiYinJi.wav'))
button
.
resize
(
70
,
70
)
self
.
addExampleCard
(
self
.
tr
(
'A button with graphical content'
),
...
...
examples/gallery/app/view/home_interface.py
浏览文件 @
5f11da4a
...
...
@@ -267,3 +267,20 @@ class HomeInterface(ScrollArea):
)
self
.
vBoxLayout
.
addWidget
(
stateInfoView
)
textView
=
SampleCardView
(
self
.
tr
(
'Text samples'
),
self
.
view
)
textView
.
addSampleCard
(
icon
=
"app/resource/images/controls/TextBox.png"
,
title
=
"LineEdit"
,
content
=
self
.
tr
(
"A single-line plain text field."
),
routeKey
=
"textInterface"
,
index
=
0
)
textView
.
addSampleCard
(
icon
=
"app/resource/images/controls/NumberBox.png"
,
title
=
"NumberBox"
,
content
=
self
.
tr
(
"A text control used for numeric input and evaluation of algebraic equations."
),
routeKey
=
"textInterface"
,
index
=
1
)
self
.
vBoxLayout
.
addWidget
(
textView
)
examples/gallery/app/view/main_window.py
浏览文件 @
5f11da4a
...
...
@@ -20,6 +20,7 @@ from .menu_interface import MenuInterface
from
.scroll_interface
import
ScrollInterface
from
.status_info_interface
import
StatusInfoInterface
from
.setting_interface
import
SettingInterface
,
cfg
from
.text_interface
import
TextInterface
from
..components.avatar_widget
import
AvatarWidget
from
..common.icon
import
Icon
from
..common.signal_bus
import
signalBus
...
...
@@ -78,6 +79,7 @@ class MainWindow(FramelessWindow):
self
.
scrollInterface
=
ScrollInterface
(
self
)
self
.
statusInfoInterface
=
StatusInfoInterface
(
self
)
self
.
settingInterface
=
SettingInterface
(
self
)
self
.
textInterface
=
TextInterface
(
self
)
self
.
stackWidget
.
addWidget
(
self
.
homeInterface
)
self
.
stackWidget
.
addWidget
(
self
.
basicInputInterface
)
...
...
@@ -88,6 +90,7 @@ class MainWindow(FramelessWindow):
self
.
stackWidget
.
addWidget
(
self
.
scrollInterface
)
self
.
stackWidget
.
addWidget
(
self
.
statusInfoInterface
)
self
.
stackWidget
.
addWidget
(
self
.
settingInterface
)
self
.
stackWidget
.
addWidget
(
self
.
textInterface
)
# initialize layout
self
.
initLayout
()
...
...
@@ -123,6 +126,7 @@ class MainWindow(FramelessWindow):
self
.
statusInfoInterface
.
setObjectName
(
'statusInfoInterface'
)
self
.
scrollInterface
.
setObjectName
(
'scrollInterface'
)
self
.
settingInterface
.
setObjectName
(
'settingsInterface'
)
self
.
textInterface
.
setObjectName
(
'textInterface'
)
# add navigation items
self
.
navigationInterface
.
addItem
(
...
...
@@ -182,6 +186,13 @@ class MainWindow(FramelessWindow):
onClick
=
lambda
t
:
self
.
switchTo
(
self
.
statusInfoInterface
,
t
),
position
=
NavigationItemPostion
.
SCROLL
)
self
.
navigationInterface
.
addItem
(
routeKey
=
self
.
textInterface
.
objectName
(),
icon
=
Icon
.
TEXT
,
text
=
self
.
tr
(
'Text'
),
onClick
=
lambda
t
:
self
.
switchTo
(
self
.
textInterface
,
t
),
position
=
NavigationItemPostion
.
SCROLL
)
# add custom widget to bottom
self
.
navigationInterface
.
addWidget
(
...
...
examples/gallery/app/view/status_info_interface.py
浏览文件 @
5f11da4a
...
...
@@ -110,20 +110,26 @@ class StatusInfoInterface(GalleryInterface):
# different type info bar
w
=
QWidget
(
self
)
hBoxLayout
=
QHBoxLayout
(
w
)
button1
=
PushButton
(
self
.
tr
(
'Information'
),
w
)
button2
=
PushButton
(
self
.
tr
(
'Success'
),
w
)
button3
=
PushButton
(
self
.
tr
(
'Warning'
),
w
)
button4
=
PushButton
(
self
.
tr
(
'Error'
),
w
)
button1
.
clicked
.
connect
(
self
.
createInfoInfoBar
)
button2
.
clicked
.
connect
(
self
.
createSuccessInfoBar
)
button3
.
clicked
.
connect
(
self
.
createWarningInfoBar
)
button4
.
clicked
.
connect
(
self
.
createErrorInfoBar
)
button1
=
PushButton
(
self
.
tr
(
'Top right'
),
w
)
button2
=
PushButton
(
self
.
tr
(
'Top'
),
w
)
button3
=
PushButton
(
self
.
tr
(
'Top left'
),
w
)
button4
=
PushButton
(
self
.
tr
(
'Bottom right'
),
w
)
button5
=
PushButton
(
self
.
tr
(
'Bottom'
),
w
)
button6
=
PushButton
(
self
.
tr
(
'Bottom left'
),
w
)
button1
.
clicked
.
connect
(
self
.
createTopRightInfoBar
)
button2
.
clicked
.
connect
(
self
.
createTopInfoBar
)
button3
.
clicked
.
connect
(
self
.
createTopLeftInfoBar
)
button4
.
clicked
.
connect
(
self
.
createBottomRightInfoBar
)
button5
.
clicked
.
connect
(
self
.
createBottomInfoBar
)
button6
.
clicked
.
connect
(
self
.
createBottomLeftInfoBar
)
hBoxLayout
.
addWidget
(
button1
)
hBoxLayout
.
addWidget
(
button2
)
hBoxLayout
.
addWidget
(
button3
)
hBoxLayout
.
addWidget
(
button4
)
hBoxLayout
.
addWidget
(
button5
)
hBoxLayout
.
addWidget
(
button6
)
hBoxLayout
.
setContentsMargins
(
0
,
0
,
0
,
0
)
hBoxLayout
.
setSpacing
(
15
)
self
.
addExampleCard
(
...
...
@@ -146,7 +152,7 @@ class StatusInfoInterface(GalleryInterface):
self
.
stateTooltip
.
move
(
self
.
stateTooltip
.
getSuitablePos
())
self
.
stateTooltip
.
show
()
def
create
Info
InfoBar
(
self
):
def
create
TopRight
InfoBar
(
self
):
InfoBar
.
info
(
title
=
self
.
tr
(
'Lesson 3'
),
content
=
self
.
tr
(
"Believe in the spin, just keep believing!"
),
...
...
@@ -157,7 +163,7 @@ class StatusInfoInterface(GalleryInterface):
parent
=
self
)
def
create
Success
InfoBar
(
self
):
def
create
Top
InfoBar
(
self
):
# convenient static mothod
InfoBar
.
success
(
title
=
self
.
tr
(
'Lesson 4'
),
...
...
@@ -169,7 +175,7 @@ class StatusInfoInterface(GalleryInterface):
parent
=
self
)
def
create
Warning
InfoBar
(
self
):
def
create
TopLeft
InfoBar
(
self
):
InfoBar
.
warning
(
title
=
self
.
tr
(
'Lesson 5'
),
content
=
self
.
tr
(
"迂回路を行けば最短ルート。"
),
...
...
@@ -180,7 +186,7 @@ class StatusInfoInterface(GalleryInterface):
parent
=
self
)
def
create
Error
InfoBar
(
self
):
def
create
BottomRight
InfoBar
(
self
):
InfoBar
.
error
(
title
=
self
.
tr
(
'No Internet'
),
content
=
self
.
tr
(
"An error message which won't disappear automatically."
),
...
...
@@ -190,3 +196,25 @@ class StatusInfoInterface(GalleryInterface):
duration
=-
1
,
# won't disappear automatically
parent
=
self
)
def
createBottomInfoBar
(
self
):
InfoBar
.
success
(
title
=
self
.
tr
(
'Lesson 1'
),
content
=
self
.
tr
(
"Don't have any strange expectations of me."
),
orient
=
Qt
.
Horizontal
,
isClosable
=
True
,
position
=
InfoBarPosition
.
BOTTOM
,
duration
=
2000
,
# won't disappear automatically
parent
=
self
)
def
createBottomLeftInfoBar
(
self
):
InfoBar
.
warning
(
title
=
self
.
tr
(
'Lesson 2'
),
content
=
self
.
tr
(
"Don't let your muscles notice."
),
orient
=
Qt
.
Horizontal
,
isClosable
=
True
,
position
=
InfoBarPosition
.
BOTTOM_LEFT
,
duration
=
1500
,
# won't disappear automatically
parent
=
self
)
examples/gallery/app/view/text_interface.py
0 → 100644
浏览文件 @
5f11da4a
# coding:utf-8
from
PyQt5.QtCore
import
Qt
from
PyQt5.QtGui
import
QPixmap
,
QColor
from
PyQt5.QtWidgets
import
QWidget
,
QHBoxLayout
from
qfluentwidgets
import
LineEdit
,
SpinBox
,
DoubleSpinBox
,
TimeEdit
,
DateTimeEdit
,
DateEdit
from
.gallery_interface
import
GalleryInterface
from
..common.translator
import
Translator
class
TextInterface
(
GalleryInterface
):
""" Text interface """
def
__init__
(
self
,
parent
=
None
):
t
=
Translator
()
super
().
__init__
(
title
=
t
.
text
,
subtitle
=
"qfluentwidgets.components.widgets"
,
parent
=
parent
)
# spin box
lineEdit
=
LineEdit
(
self
.
tr
(
'ko no dio da!'
),
self
)
lineEdit
.
setClearButtonEnabled
(
True
)
self
.
addExampleCard
(
title
=
self
.
tr
(
"A LineEdit with a clear button"
),
widget
=
lineEdit
,
sourcePath
=
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/line_edit/demo.py'
)
# spin box
self
.
addExampleCard
(
title
=
self
.
tr
(
"A SpinBox with a spin button"
),
widget
=
SpinBox
(
self
),
sourcePath
=
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/spin_box/demo.py'
)
# double spin box
self
.
addExampleCard
(
title
=
self
.
tr
(
"A DoubleSpinBox with a spin button"
),
widget
=
DoubleSpinBox
(
self
),
sourcePath
=
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/spin_box/demo.py'
)
# date edit
self
.
addExampleCard
(
title
=
self
.
tr
(
"A DateEdit with a spin button"
),
widget
=
DateEdit
(
self
),
sourcePath
=
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/spin_box/demo.py'
)
# time edit
self
.
addExampleCard
(
title
=
self
.
tr
(
"A TimeEdit with a spin button"
),
widget
=
TimeEdit
(
self
),
sourcePath
=
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/spin_box/demo.py'
)
# date time edit
self
.
addExampleCard
(
title
=
self
.
tr
(
"A DateTimeEdit with a spin button"
),
widget
=
DateTimeEdit
(
self
),
sourcePath
=
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/spin_box/demo.py'
)
examples/gallery/gallery.pro
浏览文件 @
5f11da4a
...
...
@@ -9,6 +9,7 @@ SOURCES += app/view/main_window.py \
app
/
common
/
translator
.
py
\
app
/
view
/
material_interface
.
py
\
app
/
view
/
layout_interface
.
py
\
app
/
view
/
text_interface
.
py
\
TRANSLATIONS
+=
app
/
resource
/
i18n
/
gallery_zh
.
ts
\
app
/
resource
/
i18n
/
gallery_hk
.
ts
examples/spin_box/demo.py
0 → 100644
浏览文件 @
5f11da4a
# coding:utf-8
import
sys
from
PyQt5.QtCore
import
Qt
from
PyQt5.QtWidgets
import
QApplication
,
QWidget
,
QVBoxLayout
from
qfluentwidgets
import
SpinBox
,
DoubleSpinBox
,
DateTimeEdit
,
DateEdit
,
TimeEdit
class
Demo
(
QWidget
):
def
__init__
(
self
):
super
().
__init__
()
self
.
vBoxLayout
=
QVBoxLayout
(
self
)
self
.
spinBox
=
SpinBox
(
self
)
self
.
timeEdit
=
TimeEdit
(
self
)
self
.
dateEdit
=
DateEdit
(
self
)
self
.
dateTimeEdit
=
DateTimeEdit
(
self
)
self
.
doubleSpinBox
=
DoubleSpinBox
(
self
)
self
.
resize
(
500
,
500
)
self
.
setStyleSheet
(
'Demo{background: white}'
)
self
.
vBoxLayout
.
setContentsMargins
(
100
,
50
,
100
,
50
)
self
.
vBoxLayout
.
addWidget
(
self
.
spinBox
)
self
.
vBoxLayout
.
addWidget
(
self
.
doubleSpinBox
)
self
.
vBoxLayout
.
addWidget
(
self
.
timeEdit
)
self
.
vBoxLayout
.
addWidget
(
self
.
dateEdit
)
self
.
vBoxLayout
.
addWidget
(
self
.
dateTimeEdit
)
if
__name__
==
'__main__'
:
# enable dpi scale
QApplication
.
setHighDpiScaleFactorRoundingPolicy
(
Qt
.
HighDpiScaleFactorRoundingPolicy
.
PassThrough
)
QApplication
.
setAttribute
(
Qt
.
AA_EnableHighDpiScaling
)
QApplication
.
setAttribute
(
Qt
.
AA_UseHighDpiPixmaps
)
app
=
QApplication
(
sys
.
argv
)
w
=
Demo
()
w
.
show
()
app
.
exec_
()
qfluentwidgets/__init__.py
浏览文件 @
5f11da4a
...
...
@@ -12,7 +12,7 @@ Examples are available at https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/ma
:license: GPLv3, see LICENSE for more details.
"""
__version__
=
"0.5.
0
"
__version__
=
"0.5.
1
"
from
.components
import
*
from
.common
import
*
...
...
qfluentwidgets/_rc/images/spin_box/Down_black.svg
0 → 100644
浏览文件 @
5f11da4a
<?xml version="1.0" encoding="utf-8"?>
<svg
id=
""
width=
"16"
height=
"16"
style=
"width:16px;height:16px;"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 2048 2048"
enable-background=
"new 0 0 2048 2048"
xml:space=
"preserve"
><path
fill=
"#797979"
d=
"M0 85.33 q0 -34.66 25.34 -59.99 q25.34 -25.34 59.99 -25.34 q34.67 0 60 25.33 l878.67 877.34 l878.67 -877.34 q25.33 -25.33 60 -25.33 q34.66 0 59.99 25.34 q25.34 25.34 25.34 59.99 q0 34.67 -25.33 60 l-938.67 938.67 q-25.33 25.33 -60 25.33 q-34.67 0 -60 -25.33 l-938.67 -938.67 q-25.33 -25.33 -25.33 -60 Z"
/></svg>
\ No newline at end of file
qfluentwidgets/_rc/images/spin_box/Down_white.svg
0 → 100644
浏览文件 @
5f11da4a
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
id=
""
width=
"16"
height=
"16"
style=
"width:16px;height:16px;"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 2048 2048"
enable-background=
"new 0 0 2048 2048"
xml:space=
"preserve"
><path
fill=
"#FFFFFF"
d=
"M0 85.33 q0 -34.66 25.34 -59.99 q25.34 -25.34 59.99 -25.34 q34.67 0 60 25.33 l878.67 877.34 l878.67 -877.34 q25.33 -25.33 60 -25.33 q34.66 0 59.99 25.34 q25.34 25.34 25.34 59.99 q0 34.67 -25.33 60 l-938.67 938.67 q-25.33 25.33 -60 25.33 q-34.67 0 -60 -25.33 l-938.67 -938.67 q-25.33 -25.33 -25.33 -60 Z"
/></svg>
\ No newline at end of file
qfluentwidgets/_rc/images/spin_box/Up_black.svg
0 → 100644
浏览文件 @
5f11da4a
<?xml version="1.0" encoding="utf-8"?>
<svg
id=
""
width=
"16"
height=
"16"
style=
"width:16px;height:16px;"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 2048 2048"
enable-background=
"new 0 0 2048 2048"
xml:space=
"preserve"
><path
fill=
"#797979"
d=
"M0 1024 q0 -34.67 25.33 -60 l938.67 -938.67 q25.33 -25.33 60 -25.33 q34.67 0 60 25.33 l938.67 938.67 q25.33 25.33 25.33 60 q0 34.67 -25.34 60 q-25.34 25.33 -59.99 25.33 q-34.67 0 -60 -25.33 l-878.67 -877.33 l-878.67 877.33 q-25.33 25.33 -60 25.33 q-34.66 0 -59.99 -25.33 q-25.34 -25.33 -25.34 -60 Z"
/></svg>
\ No newline at end of file
qfluentwidgets/_rc/images/spin_box/Up_white.svg
0 → 100644
浏览文件 @
5f11da4a
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
id=
""
width=
"16"
height=
"16"
style=
"width:16px;height:16px;"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 2048 2048"
enable-background=
"new 0 0 2048 2048"
xml:space=
"preserve"
><path
fill=
"#FFFFFF"
d=
"M0 1024 q0 -34.67 25.33 -60 l938.67 -938.67 q25.33 -25.33 60 -25.33 q34.67 0 60 25.33 l938.67 938.67 q25.33 25.33 25.33 60 q0 34.67 -25.34 60 q-25.34 25.33 -59.99 25.33 q-34.67 0 -60 -25.33 l-878.67 -877.33 l-878.67 877.33 q-25.33 25.33 -60 25.33 q-34.66 0 -59.99 -25.33 q-25.34 -25.33 -25.34 -60 Z"
/></svg>
\ No newline at end of file
qfluentwidgets/_rc/qss/dark/line_edit.qss
浏览文件 @
5f11da4a
...
...
@@ -3,7 +3,7 @@ QLineEdit {
border: 1px solid rgb(58, 58, 58);
border-bottom: 1px solid rgb(159, 159, 159);
border-radius: 6px;
font: 14px "Segoe UI";
font: 14px "Segoe UI"
, "Microsoft YaHei"
;
padding: 0px 10px;
color: white;
selection-background-color: --ThemeColorPrimary;
...
...
qfluentwidgets/_rc/qss/dark/spin_box.qss
0 → 100644
浏览文件 @
5f11da4a
SpinBox,
DoubleSpinBox,
DateEdit,
DateTimeEdit,
TimeEdit {
background-color: rgb(55, 55, 55);
border: 1px solid rgb(58, 58, 58);
border-bottom: 1px solid rgb(159, 159, 159);
border-radius: 6px;
font: 14px "Segoe UI", "Microsoft YaHei";
padding: 0px 80px 0 10px;
color: white;
selection-background-color: --ThemeColorPrimary;
selection-color: black;
}
SpinBox:hover,
DoubleSpinBox:hover,
DateEdit:hover,
DateTimeEdit:hover,
TimeEdit:hover {
background-color: rgb(60, 60, 60);
}
SpinBox:!focus,
DoubleSpinBox:!focus,
DateEdit:!focus,
DateTimeEdit:!focus,
TimeEdit:!focus {
background-color: rgb(55, 55, 55);
border-bottom: 1px solid rgb(159, 159, 159);
}
SpinBox:focus,
DoubleSpinBox:focus,
DateEdit:focus,
DateTimeEdit:focus,
TimeEdit:focus{
border-bottom: 1px solid --ThemeColorPrimary;
background-color: rgb(34, 34, 34);
}
SpinBox:disabled,
DoubleSpinBox:disabled,
DateEdit:disabled,
DateTimeEdit:disabled,
TimeEdit:disabled{
color: rgba(255, 255, 255, 150);
background-color: rgb(59, 59, 59);
border: 1px solid rgb(73, 73, 73);
}
SpinButton {
background-color: transparent;
border-radius: 4px;
margin: 0;
}
SpinButton:hover {
background-color: rgba(255, 255, 255, 9);
}
SpinButton:pressed {
background-color: rgba(255, 255, 255, 6);
}
\ No newline at end of file
qfluentwidgets/_rc/qss/light/line_edit.qss
浏览文件 @
5f11da4a
...
...
@@ -4,7 +4,7 @@ QLineEdit {
border: 1px solid rgba(0, 0, 0, 13);
border-bottom: 1px solid rgba(0, 0, 0, 100);
border-radius: 6px;
font: 14px "Segoe UI";
font: 14px "Segoe UI"
, "Microsoft YaHei"
;
padding: 0px 10px;
selection-background-color: --ThemeColorLight1;
}
...
...
@@ -15,7 +15,7 @@ QLineEdit:hover {
border-bottom: 1px solid rgba(0, 0, 0, 100);
}
QLineEdit:focus {
QLineEdit:
!
focus {
background-color: white;
border-bottom: 1px solid rgba(0, 0, 0, 100);
}
...
...
qfluentwidgets/_rc/qss/light/spin_box.qss
0 → 100644
浏览文件 @
5f11da4a
SpinBox, DoubleSpinBox, DateEdit, DateTimeEdit, TimeEdit {
color: black;
background-color: white;
border: 1px solid rgba(0, 0, 0, 13);
border-bottom: 1px solid rgba(0, 0, 0, 100);
border-radius: 6px;
font: 14px "Segoe UI", "Microsoft YaHei";
padding: 0px 80px 0 10px;
selection-background-color: --ThemeColorLight1;
}
SpinBox:hover,
DoubleSpinBox:hover,
DateEdit:hover,
DateTimeEdit:hover,
TimeEdit:hover {
background-color: rgb(252, 252, 252);
border: 1px solid rgba(0, 0, 0, 13);
border-bottom: 1px solid rgba(0, 0, 0, 100);
}
SpinBox:!focus,
DoubleSpinBox:!focus,
DateEdit:!focus,
DateTimeEdit:!focus,
TimeEdit:!focus {
background-color: white;
border-bottom: 1px solid rgba(0, 0, 0, 100);
}
SpinBox:focus,
DoubleSpinBox:focus,
DateEdit:focus,
DateTimeEdit:focus,
TimeEdit:focus {
border-bottom: 1px solid --ThemeColorPrimary;
background-color: white;
}
SpinBox:disabled,
DoubleSpinBox:disabled,
DateEdit:disabled,
DateTimeEdit:disabled,
TimeEdit:disabled {
color: rgba(0, 0, 0, 150);
background-color: rgb(252, 252, 252);
border: 1px solid rgb(237, 237, 237);
}
SpinButton {
background-color: transparent;
border-radius: 4px;
margin: 0;
}
SpinButton:hover {
background-color: rgba(0, 0, 0, 9);
}
SpinButton:pressed {
background-color: rgba(0, 0, 0, 6);
}
\ No newline at end of file
qfluentwidgets/_rc/resource.py
浏览文件 @
5f11da4a
此差异已折叠。
点击以展开。
qfluentwidgets/_rc/resource.qrc
浏览文件 @
5f11da4a
...
...
@@ -126,6 +126,10 @@
<file>images/info_bar/Warning_dark.svg</file>
<file>images/info_bar/Info_light.svg</file>
<file>images/info_bar/Info_dark.svg</file>
<file>images/spin_box/Up_white.svg</file>
<file>images/spin_box/Up_black.svg</file>
<file>images/spin_box/Down_white.svg</file>
<file>images/spin_box/Down_black.svg</file>
<file>qss/dark/color_dialog.qss</file>
<file>qss/dark/dialog.qss</file>
...
...
@@ -145,6 +149,7 @@
<file>qss/dark/line_edit.qss</file>
<file>qss/dark/check_box.qss</file>
<file>qss/dark/info_bar.qss</file>
<file>qss/dark/spin_box.qss</file>
<file>qss/light/color_dialog.qss</file>
<file>qss/light/dialog.qss</file>
...
...
@@ -164,5 +169,6 @@
<file>qss/light/line_edit.qss</file>
<file>qss/light/check_box.qss</file>
<file>qss/light/info_bar.qss</file>
<file>qss/light/spin_box.qss</file>
</qresource>
</RCC>
\ No newline at end of file
qfluentwidgets/components/dialog_box/dialog.py
浏览文件 @
5f11da4a
...
...
@@ -11,7 +11,7 @@ from ..widgets.button import PrimaryPushButton
from
.mask_dialog_base
import
MaskDialogBase
class
Ui_MessageBox
(
QObject
)
:
class
Ui_MessageBox
:
""" Ui of message box """
yesSignal
=
pyqtSignal
()
...
...
qfluentwidgets/components/widgets/__init__.py
浏览文件 @
5f11da4a
from
.button
import
PrimaryPushButton
,
PushButton
,
RadioButton
,
HyperlinkButton
,
ToolButton
from
.check_box
import
CheckBox
from
.combo_box
import
ComboBox
from
.line_edit
import
LineEdit
from
.icon_widget
import
IconWidget
from
.label
import
PixmapLabel
from
.menu
import
DWMMenu
,
LineEditMenu
,
RoundMenu
from
.info_bar
import
InfoBar
,
InfoBarIcon
,
InfoBarPosition
from
.scroll_area
import
ScrollArea
,
SmoothMode
,
SmoothScrollArea
,
SmoothScrollBar
from
.slider
import
Slider
,
HollowHandleStyle
from
.spin_box
import
SpinBox
,
DoubleSpinBox
,
DateEdit
,
DateTimeEdit
,
TimeEdit
from
.stacked_widget
import
PopUpAniStackedWidget
,
OpacityAniStackedWidget
from
.switch_button
import
SwitchButton
,
IndicatorPosition
from
.state_tool_tip
import
StateToolTip
,
ToastToolTip
from
.scroll_area
import
ScrollArea
,
SmoothMode
,
SmoothScrollArea
,
SmoothScrollBar
from
.tool_tip
import
ToolTip
,
ToolTipFilter
from
.button
import
PrimaryPushButton
,
PushButton
,
RadioButton
,
HyperlinkButton
,
ToolButton
from
.line_edit
import
LineEdit
from
.check_box
import
CheckBox
from
.icon_widget
import
IconWidget
from
.label
import
PixmapLabel
from
.info_bar
import
InfoBar
,
InfoBarIcon
,
InfoBarPosition
\ No newline at end of file
from
.switch_button
import
SwitchButton
,
IndicatorPosition
from
.tool_tip
import
ToolTip
,
ToolTipFilter
\ No newline at end of file
qfluentwidgets/components/widgets/line_edit.py
浏览文件 @
5f11da4a
...
...
@@ -4,6 +4,7 @@ from PyQt5.QtGui import QPainter
from
PyQt5.QtWidgets
import
QLineEdit
,
QToolButton
from
...common.style_sheet
import
setStyleSheet
from
...common.icon
import
writeSvg
,
isDarkTheme
,
drawSvgIcon
from
...common.icon
import
FluentIcon
as
FIF
from
.menu
import
LineEditMenu
...
...
@@ -23,7 +24,11 @@ class ClearButton(QToolButton):
super
().
paintEvent
(
e
)
painter
=
QPainter
(
self
)
painter
.
setRenderHints
(
QPainter
.
Antialiasing
|
QPainter
.
SmoothPixmapTransform
)
FIF
.
CLOSE
.
render
(
painter
,
QRectF
(
9.5
,
7
,
10
,
10
))
if
isDarkTheme
():
FIF
.
CLOSE
.
render
(
painter
,
QRectF
(
9.5
,
7
,
10
,
10
))
else
:
svg
=
writeSvg
(
FIF
.
CLOSE
.
path
(),
fill
=
'#656565'
)
drawSvgIcon
(
svg
.
encode
(),
painter
,
QRectF
(
9.5
,
7
,
10
,
10
))
class
LineEdit
(
QLineEdit
):
...
...
qfluentwidgets/components/widgets/spin_box.py
0 → 100644
浏览文件 @
5f11da4a
# coding:utf-8
from
enum
import
Enum
from
PyQt5.QtCore
import
Qt
,
QSize
,
QRectF
from
PyQt5.QtGui
import
QPainter
,
QTextCursor
from
PyQt5.QtWidgets
import
(
QSpinBox
,
QDoubleSpinBox
,
QToolButton
,
QHBoxLayout
,
QDateEdit
,
QDateTimeEdit
,
QTimeEdit
)
from
...common.style_sheet
import
setStyleSheet
from
...common.icon
import
FluentIconBase
,
Theme
,
getIconColor
from
...components.widgets
import
LineEditMenu
class
SpinIcon
(
FluentIconBase
,
Enum
):
""" Spin icon """
UP
=
"Up"
DOWN
=
"Down"
def
path
(
self
,
theme
=
Theme
.
AUTO
):
if
theme
==
Theme
.
AUTO
:
c
=
getIconColor
()
else
:
c
=
"white"
if
theme
==
Theme
.
DARK
else
"black"
return
f
':/qfluentwidgets/images/spin_box/
{
self
.
value
}
_
{
c
}
.svg'
class
SpinButton
(
QToolButton
):
def
__init__
(
self
,
icon
:
SpinIcon
,
parent
=
None
):
super
().
__init__
(
parent
=
parent
)
self
.
_icon
=
icon
self
.
setFixedSize
(
31
,
23
)
self
.
setIconSize
(
QSize
(
10
,
10
))
setStyleSheet
(
self
,
'spin_box'
)
def
paintEvent
(
self
,
e
):
super
().
paintEvent
(
e
)
painter
=
QPainter
(
self
)
painter
.
setRenderHints
(
QPainter
.
Antialiasing
|
QPainter
.
SmoothPixmapTransform
)
self
.
_icon
.
render
(
painter
,
QRectF
(
10
,
9
,
11
,
11
))
class
Ui_SpinBox
:
""" Spin box ui """
def
__init__
(
self
,
*
args
,
**
kwargs
):
pass
def
_setUpUi
(
self
):
setStyleSheet
(
self
,
'spin_box'
)
self
.
setButtonSymbols
(
QSpinBox
.
NoButtons
)
self
.
setFixedHeight
(
33
)
self
.
hBoxLayout
=
QHBoxLayout
(
self
)
self
.
upButton
=
SpinButton
(
SpinIcon
.
UP
,
self
)
self
.
downButton
=
SpinButton
(
SpinIcon
.
DOWN
,
self
)
self
.
hBoxLayout
.
setContentsMargins
(
0
,
4
,
4
,
4
)
self
.
hBoxLayout
.
setSpacing
(
5
)
self
.
hBoxLayout
.
addWidget
(
self
.
upButton
,
0
,
Qt
.
AlignRight
)
self
.
hBoxLayout
.
addWidget
(
self
.
downButton
,
0
,
Qt
.
AlignRight
)
self
.
hBoxLayout
.
setAlignment
(
Qt
.
AlignRight
|
Qt
.
AlignVCenter
)
self
.
upButton
.
clicked
.
connect
(
self
.
stepUp
)
self
.
downButton
.
clicked
.
connect
(
self
.
stepDown
)
self
.
setContextMenuPolicy
(
Qt
.
CustomContextMenu
)
self
.
customContextMenuRequested
.
connect
(
self
.
_showContextMenu
)
def
_showContextMenu
(
self
,
pos
):
menu
=
LineEditMenu
(
self
.
lineEdit
())
menu
.
exec_
(
self
.
mapToGlobal
(
pos
))
class
SpinBox
(
QSpinBox
,
Ui_SpinBox
):
""" Spin box """
def
__init__
(
self
,
parent
=
None
):
super
().
__init__
(
parent
=
parent
)
self
.
_setUpUi
()
class
DoubleSpinBox
(
QDoubleSpinBox
,
Ui_SpinBox
):
""" Double spin box """
def
__init__
(
self
,
parent
=
None
):
super
().
__init__
(
parent
)
self
.
_setUpUi
()
class
TimeEdit
(
QTimeEdit
,
Ui_SpinBox
):
""" Time edit """
def
__init__
(
self
,
parent
=
None
):
super
().
__init__
(
parent
)
self
.
_setUpUi
()
class
DateTimeEdit
(
QDateTimeEdit
,
Ui_SpinBox
):
""" Date time edit """
def
__init__
(
self
,
parent
=
None
):
super
().
__init__
(
parent
)
self
.
_setUpUi
()
class
DateEdit
(
QDateEdit
,
Ui_SpinBox
):
""" Date edit """
def
__init__
(
self
,
parent
=
None
):
super
().
__init__
(
parent
)
self
.
_setUpUi
()
setup.py
浏览文件 @
5f11da4a
...
...
@@ -6,7 +6,7 @@ with open('README.md', encoding='utf-8') as f:
setuptools
.
setup
(
name
=
"PyQt-Fluent-Widgets"
,
version
=
"0.5.
0
"
,
version
=
"0.5.
1
"
,
keywords
=
"pyqt fluent widgets"
,
author
=
"zhiyiYo"
,
author_email
=
"shokokawaii@outlook.com"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录