Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
k54kdk
PyQt Fluent Widgets
提交
c9a9bb23
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看板
提交
c9a9bb23
编写于
5月 29, 2023
作者:
之一Yo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加日历组件
上级
d557dfd2
变更
34
展开全部
隐藏空白更改
内联
并排
Showing
34 changed file
with
293704 addition
and
292006 deletion
+293704
-292006
examples/calendar_picker/demo.py
examples/calendar_picker/demo.py
+45
-0
examples/gallery/app/common/resource.py
examples/gallery/app/common/resource.py
+216135
-216111
examples/gallery/app/resource/i18n/gallery.zh_CN.qm
examples/gallery/app/resource/i18n/gallery.zh_CN.qm
+0
-0
examples/gallery/app/resource/i18n/gallery.zh_CN.ts
examples/gallery/app/resource/i18n/gallery.zh_CN.ts
+15
-5
examples/gallery/app/resource/i18n/gallery.zh_HK.qm
examples/gallery/app/resource/i18n/gallery.zh_HK.qm
+0
-0
examples/gallery/app/resource/i18n/gallery.zh_HK.ts
examples/gallery/app/resource/i18n/gallery.zh_HK.ts
+39
-29
examples/gallery/app/view/date_time_interface.py
examples/gallery/app/view/date_time_interface.py
+16
-1
examples/gallery/app/view/home_interface.py
examples/gallery/app/view/home_interface.py
+9
-2
examples/gallery/app/view/status_info_interface.py
examples/gallery/app/view/status_info_interface.py
+1
-1
plugins/basic_input_plugin.py
plugins/basic_input_plugin.py
+14
-1
plugins/date_time_plugin.py
plugins/date_time_plugin.py
+14
-1
qfluentwidgets/__init__.py
qfluentwidgets/__init__.py
+1
-1
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_CN.qm
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_CN.qm
+0
-0
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_CN.ts
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_CN.ts
+89
-0
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_HK.qm
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_HK.qm
+0
-0
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_HK.ts
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_HK.ts
+89
-0
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_TW.qm
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_TW.qm
+0
-0
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_TW.ts
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_TW.ts
+89
-0
qfluentwidgets/_rc/images/icons/Calendar_black.svg
qfluentwidgets/_rc/images/icons/Calendar_black.svg
+4
-0
qfluentwidgets/_rc/images/icons/Calendar_white.svg
qfluentwidgets/_rc/images/icons/Calendar_white.svg
+4
-0
qfluentwidgets/_rc/qss/dark/button.qss
qfluentwidgets/_rc/qss/dark/button.qss
+5
-0
qfluentwidgets/_rc/qss/dark/calendar_picker.qss
qfluentwidgets/_rc/qss/dark/calendar_picker.qss
+83
-0
qfluentwidgets/_rc/qss/light/button.qss
qfluentwidgets/_rc/qss/light/button.qss
+6
-1
qfluentwidgets/_rc/qss/light/calendar_picker.qss
qfluentwidgets/_rc/qss/light/calendar_picker.qss
+83
-0
qfluentwidgets/_rc/resource.py
qfluentwidgets/_rc/resource.py
+76245
-75845
qfluentwidgets/_rc/resource.qrc
qfluentwidgets/_rc/resource.qrc
+4
-0
qfluentwidgets/common/icon.py
qfluentwidgets/common/icon.py
+1
-0
qfluentwidgets/common/style_sheet.py
qfluentwidgets/common/style_sheet.py
+1
-0
qfluentwidgets/components/date_time/__init__.py
qfluentwidgets/components/date_time/__init__.py
+1
-0
qfluentwidgets/components/date_time/calendar_picker.py
qfluentwidgets/components/date_time/calendar_picker.py
+66
-0
qfluentwidgets/components/date_time/calendar_view.py
qfluentwidgets/components/date_time/calendar_view.py
+619
-0
qfluentwidgets/components/widgets/line_edit.py
qfluentwidgets/components/widgets/line_edit.py
+4
-0
qfluentwidgets/components/widgets/menu.py
qfluentwidgets/components/widgets/menu.py
+21
-7
setup.py
setup.py
+1
-1
未找到文件。
examples/calendar_picker/demo.py
0 → 100644
浏览文件 @
c9a9bb23
# coding:utf-8
import
sys
from
time
import
time
from
PyQt5.QtCore
import
Qt
,
QCalendar
,
QDate
from
PyQt5.QtWidgets
import
QApplication
,
QWidget
,
QHBoxLayout
from
qfluentwidgets
import
CalendarPicker
,
setTheme
,
Theme
class
Demo
(
QWidget
):
def
__init__
(
self
):
super
().
__init__
()
# setTheme(Theme.DARK)
self
.
setStyleSheet
(
'Demo{background: white}'
)
self
.
picker
=
CalendarPicker
(
self
)
self
.
picker
.
dateChanged
.
connect
(
print
)
# set date
# self.picker.setDate(QDate(2023, 5, 30))
# customize date format
# self.picker.setDateFormat(Qt.TextDate)
# self.picker.setDateFormat('yyyy-M-d')
self
.
hBoxLayout
=
QHBoxLayout
(
self
)
self
.
hBoxLayout
.
addWidget
(
self
.
picker
,
0
,
Qt
.
AlignCenter
)
self
.
resize
(
500
,
500
)
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
)
t0
=
time
()
w
=
Demo
()
t1
=
time
()
print
(
'耗时:'
,
t1
-
t0
)
w
.
show
()
app
.
exec_
()
\ No newline at end of file
examples/gallery/app/common/resource.py
浏览文件 @
c9a9bb23
此差异已折叠。
点击以展开。
examples/gallery/app/resource/i18n/gallery.zh_CN.qm
浏览文件 @
c9a9bb23
无法预览此类型文件
examples/gallery/app/resource/i18n/gallery.zh_CN.ts
浏览文件 @
c9a9bb23
...
...
@@ -217,30 +217,40 @@
<
context
>
<
name
>
DateTimeInterface
<
/name
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
21
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
36
"
/>
<
source
>
A
simple
DatePicker
<
/source
>
<
translation
>
日期选择器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
27
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
42
"
/>
<
source
>
A
DatePicker
in
another
format
<
/source
>
<
translation
>
另一种格式的日期选择器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
34
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
49
"
/>
<
source
>
A
simple
TimePicker
<
/source
>
<
translation
>
时间选择器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
41
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
56
"
/>
<
source
>
A
TimePicker
using
a
24
-
hour
clock
<
/source
>
<
translation
>
24
小时制的时间选择器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
48
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
63
"
/>
<
source
>
A
TimePicker
with
seconds
column
<
/source
>
<
translation
>
显示秒的时间选择器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
21
"
/>
<
source
>
A
simple
CalendarPicker
<
/source
>
<
translation
>
日历选择器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
29
"
/>
<
source
>
A
CalendarPicker
in
another
format
<
/source
>
<
translation
>
自定义格式的日历选择器
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
DialogInterface
<
/name
>
...
...
examples/gallery/app/resource/i18n/gallery.zh_HK.qm
浏览文件 @
c9a9bb23
无法预览此类型文件
examples/gallery/app/resource/i18n/gallery.zh_HK.ts
浏览文件 @
c9a9bb23
...
...
@@ -16,7 +16,7 @@
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
56
"
/>
<
source
>
A
hyperlink
button
that
navigates
to
a
URI
<
/source
>
<
translation
>
導航到一個超
鏈接
的按鈕
<
/translation
>
<
translation
>
導航到一個超
連結
的按鈕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
63
"
/>
...
...
@@ -96,7 +96,7 @@
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
149
"
/>
<
source
>
Soft
and
Wet
<
/source
>
<
translation
>
軟又
溼
<
/translation
>
<
translation
>
軟又
濕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
241
"
/>
...
...
@@ -121,7 +121,7 @@
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
107
"
/>
<
source
>
Send
<
/source
>
<
translation
>
髮
送
<
/translation
>
<
translation
>
發
送
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/basic_input_interface.py
"
line
=
"
108
"
/>
...
...
@@ -217,30 +217,40 @@
<
context
>
<
name
>
DateTimeInterface
<
/name
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
21
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
36
"
/>
<
source
>
A
simple
DatePicker
<
/source
>
<
translation
>
日期選擇器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
27
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
42
"
/>
<
source
>
A
DatePicker
in
another
format
<
/source
>
<
translation
>
另一種格式的日期選擇器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
34
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
49
"
/>
<
source
>
A
simple
TimePicker
<
/source
>
<
translation
>
時間選擇器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
41
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
56
"
/>
<
source
>
A
TimePicker
using
a
24
-
hour
clock
<
/source
>
<
translation
>
24
小時
製
的時間選擇器
<
/translation
>
<
translation
>
24
小時
制
的時間選擇器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
48
"
/>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
63
"
/>
<
source
>
A
TimePicker
with
seconds
column
<
/source
>
<
translation
>
顯示秒的時間選擇器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
21
"
/>
<
source
>
A
simple
CalendarPicker
<
/source
>
<
translation
>
日曆選擇器
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/date_time_interface.py
"
line
=
"
29
"
/>
<
source
>
A
CalendarPicker
in
another
format
<
/source
>
<
translation
>
自定義格式的日曆選擇器
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
DialogInterface
<
/name
>
...
...
@@ -290,7 +300,7 @@
<
message
>
<
location
filename
=
"
../../view/gallery_interface.py
"
line
=
"
114
"
/>
<
source
>
Source
code
<
/source
>
<
translation
>
源代
碼
<
/translation
>
<
translation
>
原始
碼
<
/translation
>
<
/message
>
<
/context
>
<
context
>
...
...
@@ -354,7 +364,7 @@
<
message
>
<
location
filename
=
"
../../view/layout_interface.py
"
line
=
"
38
"
/>
<
source
>
Killer
Queen
<
/source
>
<
translation
>
殺手皇
後
💀
<
/translation
>
<
translation
>
殺手皇
后
💀
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/layout_interface.py
"
line
=
"
39
"
/>
...
...
@@ -382,7 +392,7 @@
<
message
>
<
location
filename
=
"
../../view/icon_interface.py
"
line
=
"
21
"
/>
<
source
>
Search
icons
<
/source
>
<
translation
>
蒐
索圖標
<
/translation
>
<
translation
>
搜
索圖標
<
/translation
>
<
/message
>
<
/context
>
<
context
>
...
...
@@ -485,7 +495,7 @@
<
message
>
<
location
filename
=
"
../../view/view_interface.py
"
line
=
"
85
"
/>
<
source
>
Scary
Monster
<
/source
>
<
translation
>
駭人
噁
獸
<
/translation
>
<
translation
>
駭人
惡
獸
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/view_interface.py
"
line
=
"
85
"
/>
...
...
@@ -525,7 +535,7 @@
<
message
>
<
location
filename
=
"
../../view/view_interface.py
"
line
=
"
89
"
/>
<
source
>
SOFT
&
amp
;
WET
<
/source
>
<
translation
>
軟又
溼
<
/translation
>
<
translation
>
軟又
濕
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/view_interface.py
"
line
=
"
89
"
/>
...
...
@@ -535,7 +545,7 @@
<
message
>
<
location
filename
=
"
../../view/view_interface.py
"
line
=
"
90
"
/>
<
source
>
Wonder
of
U
<
/source
>
<
translation
>
奇
跡
於你
<
/translation
>
<
translation
>
奇
蹟
於你
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/view_interface.py
"
line
=
"
90
"
/>
...
...
@@ -565,7 +575,7 @@
<
message
>
<
location
filename
=
"
../../view/view_interface.py
"
line
=
"
79
"
/>
<
source
>
Killer
Queen
<
/source
>
<
translation
>
殺手皇
後
💀
<
/translation
>
<
translation
>
殺手皇
后
💀
<
/translation
>
<
/message
>
<
/context
>
<
context
>
...
...
@@ -839,7 +849,7 @@
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
85
"
/>
<
source
>
Use
system
setting
<
/source
>
<
translation
>
跟隨
繫
統設置
<
/translation
>
<
translation
>
跟隨
系
統設置
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
67
"
/>
...
...
@@ -854,7 +864,7 @@
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
74
"
/>
<
source
>
Interface
zoom
<
/source
>
<
translation
>
界
麵
縮放
<
/translation
>
<
translation
>
界
面
縮放
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
74
"
/>
...
...
@@ -869,7 +879,7 @@
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
85
"
/>
<
source
>
Set
your
preferred
language
for
UI
<
/source
>
<
translation
>
選擇界
麵
所使用的語言
<
/translation
>
<
translation
>
選擇界
面
所使用的語言
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
95
"
/>
...
...
@@ -894,7 +904,7 @@
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
108
"
/>
<
source
>
Check
for
updates
when
the
application
starts
<
/source
>
<
translation
>
在應用程
序
啟動時檢查更新
<
/translation
>
<
translation
>
在應用程
式
啟動時檢查更新
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
108
"
/>
...
...
@@ -909,7 +919,7 @@
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
118
"
/>
<
source
>
Open
help
page
<
/source
>
<
translation
>
打開幫助頁
麵
<
/translation
>
<
translation
>
打開幫助頁
面
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
118
"
/>
...
...
@@ -919,7 +929,7 @@
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
118
"
/>
<
source
>
Discover
new
features
and
learn
useful
tips
about
PyQt
-
Fluent
-
Widgets
<
/source
>
<
translation
>
髮
現新功能並了解有關
PyQt
-
Fluent
-
Widgets
的使用技巧
<
/translation
>
<
translation
>
發
現新功能並了解有關
PyQt
-
Fluent
-
Widgets
的使用技巧
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/setting_interface.py
"
line
=
"
127
"
/>
...
...
@@ -1002,7 +1012,7 @@
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
179
"
/>
<
source
>
Please
wait
patiently
<
/source
>
<
translation
>
心急吃不了熱
荳
腐
,
請耐心等待哦
~<
/translation
>
<
translation
>
心急吃不了熱
豆
腐
,
請耐心等待哦
~<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
181
"
/>
...
...
@@ -1067,7 +1077,7 @@
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
75
"
/>
<
source
>
My
name
is
kira
yoshikake
,
33
years
old
.
Living
in
the
villa
area
northeast
of
duwangting
,
unmarried
.
I
work
in
Guiyou
chain
store
.
Every
day
I
have
to
work
overtime
until
8
p
.
m
.
to
go
home
.
I
don
&
apos
;
t
smoke
.
The
wine
is
only
for
a
taste
.
Sleep
at
11
p
.
m
.
for
8
hours
a
day
.
Before
I
go
to
bed
,
I
must
drink
a
cup
of
warm
milk
,
then
do
20
minutes
of
soft
exercise
,
get
on
the
bed
,
and
immediately
fall
asleep
.
Never
leave
fatigue
and
stress
until
the
next
day
.
Doctors
say
I
&
apos
;
m
normal
.
<
/source
>
<
translation
>
我的名字是吉良吉影
,
年齡33歲
,
家住杜王町東北部別墅區
,
未婚
。
我在
“
龜友百貨連鎖公司
”
上班
,
每天最晚也是八點前回家
,
不吸菸
,
酒也是淺嚐輒止
,
晚上十一點上床
,
保証八個小時的充足睡眠
,
睡前喝一盃
熱牛奶
,
再做二十分鐘伸展運動暖身
,
然後再睡覺
,
基本可以熟睡到天亮
。
像嬰兒一樣不留下疲勞與壓力
,
迎來第二天的早晨
,
健康檢查結果也顯示我很健康
。
我的意思是我是一個隨時都想追求平靜生活的人
,
不拘泥於勝負與煩惱
,
不樹立令我夜不能寐的敵人
,
這就是我對於這個社會的生活態度
,
我也清楚這就是我的幸福
。
<
/translation
>
<
translation
>
我的名字是吉良吉影
,
年齡33歲
,
家住杜王町東北部別墅區
,
未婚
。
我在
「
龜友百貨連鎖公司
」
上班
,
每天最晚也是八點前回家
,
不吸煙
,
酒也是淺嘗輒止
,
晚上十一點上床
,
保證八個小時的充足睡眠
,
睡前喝一杯
熱牛奶
,
再做二十分鐘伸展運動暖身
,
然後再睡覺
,
基本可以熟睡到天亮
。
像嬰兒一樣不留下疲勞與壓力
,
迎來第二天的早晨
,
健康檢查結果也顯示我很健康
。
我的意思是我是一個隨時都想追求平靜生活的人
,
不拘泥於勝負與煩惱
,
不樹立令我夜不能寐的敵人
,
這就是我對於這個社會的生活態度
,
我也清楚這就是我的幸福
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
186
"
/>
...
...
@@ -1077,16 +1087,16 @@
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
186
"
/>
<
source
>
Believe
in
the
spin
,
just
keep
believing
!<
/source
>
<
translation
>
相信
回旋吧
,
隻
管相信就是了
!
<
/translation
>
<
translation
>
相信
迴旋吧
,
只
管相信就是了
!
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
198
"
/>
<
source
>
With
respect
,
let
&
apos
;
s
advance
towards
a
new
stage
of
the
spin
.
<
/source
>
<
translation
>
表達敬意吧
,
表達出敬意
,
然後邁向
回
旋的另一個全新階段
!
<
/translation
>
<
translation
>
表達敬意吧
,
表達出敬意
,
然後邁向
迴
旋的另一個全新階段
!
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/status_info_interface.py
"
line
=
"
209
"
/>
<
source
>
迂
回
路を行けば最短ルート
。
<
/source
>
<
source
>
迂
迴
路を行けば最短ルート
。
<
/source
>
<
translation
>
最短的捷徑就是繞遠路
,
繞遠路才是我的最短捷徑
。
<
/translation
>
<
/message
>
<
message
>
...
...
@@ -1251,7 +1261,7 @@
<
message
>
<
location
filename
=
"
../../view/gallery_interface.py
"
line
=
"
43
"
/>
<
source
>
Source
<
/source
>
<
translation
>
源代
碼
<
/translation
>
<
translation
>
原始
碼
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/gallery_interface.py
"
line
=
"
80
"
/>
...
...
@@ -1347,7 +1357,7 @@
<
message
>
<
location
filename
=
"
../../view/view_interface.py
"
line
=
"
108
"
/>
<
source
>
Dio
Brando
<
/source
>
<
translation
>
迪奧
·
佈
蘭度
<
/translation
>
<
translation
>
迪奧
·
布
蘭度
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/view_interface.py
"
line
=
"
108
"
/>
...
...
examples/gallery/app/view/date_time_interface.py
浏览文件 @
c9a9bb23
# coding:utf-8
from
PyQt5.QtCore
import
Qt
from
qfluentwidgets
import
DatePicker
,
TimePicker
,
AMTimePicker
,
ZhDatePicker
from
qfluentwidgets
import
DatePicker
,
TimePicker
,
AMTimePicker
,
ZhDatePicker
,
CalendarPicker
from
.gallery_interface
import
GalleryInterface
from
..common.translator
import
Translator
...
...
@@ -17,6 +17,21 @@ class DateTimeInterface(GalleryInterface):
parent
=
parent
)
# calendar picker
self
.
addExampleCard
(
title
=
self
.
tr
(
'A simple CalendarPicker'
),
widget
=
CalendarPicker
(
self
),
sourcePath
=
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/calendar_picker/demo.py'
)
w
=
CalendarPicker
(
self
)
w
.
setDateFormat
(
Qt
.
TextDate
)
self
.
addExampleCard
(
title
=
self
.
tr
(
'A CalendarPicker in another format'
),
widget
=
w
,
sourcePath
=
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/calendar_picker/demo.py'
)
# date picker
self
.
addExampleCard
(
title
=
self
.
tr
(
'A simple DatePicker'
),
...
...
examples/gallery/app/view/home_interface.py
浏览文件 @
c9a9bb23
...
...
@@ -194,12 +194,19 @@ class HomeInterface(ScrollArea):
# date time samples
dateTimeView
=
SampleCardView
(
self
.
tr
(
'Date & time samples'
),
self
.
view
)
dateTimeView
.
addSampleCard
(
icon
=
":/gallery/images/controls/CalendarDatePicker.png"
,
title
=
"CalendarPicker"
,
content
=
self
.
tr
(
"A control that lets a user pick a date value using a calendar."
),
routeKey
=
"dateTimeInterface"
,
index
=
0
)
dateTimeView
.
addSampleCard
(
icon
=
":/gallery/images/controls/DatePicker.png"
,
title
=
"DatePicker"
,
content
=
self
.
tr
(
"A control that lets a user pick a date value."
),
routeKey
=
"dateTimeInterface"
,
index
=
0
index
=
2
)
dateTimeView
.
addSampleCard
(
icon
=
":/gallery/images/controls/TimePicker.png"
,
...
...
@@ -207,7 +214,7 @@ class HomeInterface(ScrollArea):
content
=
self
.
tr
(
"A configurable control that lets a user pick a time value."
),
routeKey
=
"dateTimeInterface"
,
index
=
2
index
=
4
)
self
.
vBoxLayout
.
addWidget
(
dateTimeView
)
...
...
examples/gallery/app/view/status_info_interface.py
浏览文件 @
c9a9bb23
...
...
@@ -28,7 +28,7 @@ class StatusInfoInterface(GalleryInterface):
self
.
addExampleCard
(
self
.
tr
(
'State tool tip'
),
button
,
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/stat
us
_tool_tip/demo.py'
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/stat
e
_tool_tip/demo.py'
)
# tool tip
...
...
plugins/basic_input_plugin.py
浏览文件 @
c9a9bb23
...
...
@@ -5,7 +5,7 @@ from qfluentwidgets import (PrimaryPushButton, SplitPushButton, DropDownPushButt
ToolButton
,
SplitToolButton
,
DropDownToolButton
,
FluentIcon
,
ToggleButton
,
SwitchButton
,
RadioButton
,
CheckBox
,
HyperlinkButton
,
Slider
,
ComboBox
,
IconWidget
,
EditableComboBox
,
PixmapLabel
,
PushButton
,
PrimaryToolButton
,
PrimarySplitToolButton
,
PrimarySplitPushButton
,
PrimaryDropDownPushButton
,
PrimaryDropDownToolButton
)
PrimarySplitPushButton
,
PrimaryDropDownPushButton
,
PrimaryDropDownToolButton
,
TransparentToolButton
)
from
plugin_base
import
PluginBase
from
task_menu_factory
import
EditTextTaskMenuFactory
...
...
@@ -206,6 +206,19 @@ class PrimaryToolButtonPlugin(BasicInputPlugin, QPyDesignerCustomWidgetPlugin):
return
"PrimaryToolButton"
class
TransparentToolButtonPlugin
(
BasicInputPlugin
,
QPyDesignerCustomWidgetPlugin
):
""" Primary color tool button plugin """
def
createWidget
(
self
,
parent
):
return
TransparentToolButton
(
FluentIcon
.
BASKETBALL
,
parent
)
def
icon
(
self
):
return
super
().
icon
(
'Button'
)
def
name
(
self
):
return
"TransparentToolButton"
class
DropDownToolButtonPlugin
(
BasicInputPlugin
,
QPyDesignerCustomWidgetPlugin
):
""" Drop down tool button plugin """
...
...
plugins/date_time_plugin.py
浏览文件 @
c9a9bb23
...
...
@@ -2,7 +2,7 @@
from
PyQt5.QtCore
import
Qt
from
PyQt5.QtDesigner
import
QPyDesignerCustomWidgetPlugin
from
qfluentwidgets
import
DatePicker
,
TimePicker
,
ZhDatePicker
,
AMTimePicker
from
qfluentwidgets
import
DatePicker
,
TimePicker
,
ZhDatePicker
,
AMTimePicker
,
CalendarPicker
from
plugin_base
import
PluginBase
...
...
@@ -13,6 +13,19 @@ class DateTimePlugin(PluginBase):
return
super
().
group
()
+
' (Date Time)'
class
CalendarPickerPlugin
(
DateTimePlugin
,
QPyDesignerCustomWidgetPlugin
):
""" Calendar picker plugin """
def
createWidget
(
self
,
parent
):
return
CalendarPicker
(
parent
)
def
icon
(
self
):
return
super
().
icon
(
"CalendarDatePicker"
)
def
name
(
self
):
return
"CalendarPicker"
class
DatePickerPlugin
(
DateTimePlugin
,
QPyDesignerCustomWidgetPlugin
):
""" Date picker plugin """
...
...
qfluentwidgets/__init__.py
浏览文件 @
c9a9bb23
...
...
@@ -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.9.
1
"
__version__
=
"0.9.
2
"
from
.components
import
*
from
.common
import
*
...
...
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_CN.qm
浏览文件 @
c9a9bb23
无法预览此类型文件
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_CN.ts
浏览文件 @
c9a9bb23
...
...
@@ -2,6 +2,95 @@
<!
DOCTYPE
TS
>
<
TS
version
=
"
2.1
"
language
=
"
zh_CN
"
>
<!--
The
translation
of
components
in
PyQt
-
Fluent
-
Widgets
-->
<
context
>
<
name
>
CalendarPicker
<
/name
>
<
message
>
<
source
>
Pick
a
date
<
/source
>
<
translation
>
选择日期
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
MonthScrollView
<
/name
>
<
message
>
<
source
>
Jan
<
/source
>
<
translation
>
一月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Feb
<
/source
>
<
translation
>
二月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Mar
<
/source
>
<
translation
>
三月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Apr
<
/source
>
<
translation
>
四月
<
/translation
>
<
/message
>
<
message
>
<
source
>
May
<
/source
>
<
translation
>
五月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Jun
<
/source
>
<
translation
>
六月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Jul
<
/source
>
<
translation
>
七月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Aug
<
/source
>
<
translation
>
八月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Sep
<
/source
>
<
translation
>
九月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Oct
<
/source
>
<
translation
>
十月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Nov
<
/source
>
<
translation
>
十一月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Dec
<
/source
>
<
translation
>
十二月
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
DayScrollView
<
/name
>
<
message
>
<
source
>
Mo
<
/source
>
<
translation
>
一
<
/translation
>
<
/message
>
<
message
>
<
source
>
Tu
<
/source
>
<
translation
>
二
<
/translation
>
<
/message
>
<
message
>
<
source
>
We
<
/source
>
<
translation
>
三
<
/translation
>
<
/message
>
<
message
>
<
source
>
Th
<
/source
>
<
translation
>
四
<
/translation
>
<
/message
>
<
message
>
<
source
>
Fr
<
/source
>
<
translation
>
五
<
/translation
>
<
/message
>
<
message
>
<
source
>
Sa
<
/source
>
<
translation
>
六
<
/translation
>
<
/message
>
<
message
>
<
source
>
Su
<
/source
>
<
translation
>
日
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ColorDialog
<
/name
>
<
message
>
...
...
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_HK.qm
浏览文件 @
c9a9bb23
无法预览此类型文件
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_HK.ts
浏览文件 @
c9a9bb23
...
...
@@ -2,6 +2,95 @@
<!
DOCTYPE
TS
>
<
TS
version
=
"
2.1
"
language
=
"
zh_HK
"
>
<!--
The
translation
of
components
in
PyQt
-
Fluent
-
Widgets
-->
<
context
>
<
name
>
CalendarPicker
<
/name
>
<
message
>
<
source
>
Pick
a
date
<
/source
>
<
translation
>
選擇日期
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
MonthScrollView
<
/name
>
<
message
>
<
source
>
Jan
<
/source
>
<
translation
>
一月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Feb
<
/source
>
<
translation
>
二月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Mar
<
/source
>
<
translation
>
三月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Apr
<
/source
>
<
translation
>
四月
<
/translation
>
<
/message
>
<
message
>
<
source
>
May
<
/source
>
<
translation
>
五月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Jun
<
/source
>
<
translation
>
六月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Jul
<
/source
>
<
translation
>
七月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Aug
<
/source
>
<
translation
>
八月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Sep
<
/source
>
<
translation
>
九月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Oct
<
/source
>
<
translation
>
十月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Nov
<
/source
>
<
translation
>
十一月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Dec
<
/source
>
<
translation
>
十二月
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
DayScrollView
<
/name
>
<
message
>
<
source
>
Mo
<
/source
>
<
translation
>
一
<
/translation
>
<
/message
>
<
message
>
<
source
>
Tu
<
/source
>
<
translation
>
二
<
/translation
>
<
/message
>
<
message
>
<
source
>
We
<
/source
>
<
translation
>
三
<
/translation
>
<
/message
>
<
message
>
<
source
>
Th
<
/source
>
<
translation
>
四
<
/translation
>
<
/message
>
<
message
>
<
source
>
Fr
<
/source
>
<
translation
>
五
<
/translation
>
<
/message
>
<
message
>
<
source
>
Sa
<
/source
>
<
translation
>
六
<
/translation
>
<
/message
>
<
message
>
<
source
>
Su
<
/source
>
<
translation
>
日
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ColorDialog
<
/name
>
<
message
>
...
...
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_TW.qm
浏览文件 @
c9a9bb23
无法预览此类型文件
qfluentwidgets/_rc/i18n/qfluentwidgets.zh_TW.ts
浏览文件 @
c9a9bb23
...
...
@@ -2,6 +2,95 @@
<!
DOCTYPE
TS
>
<
TS
version
=
"
2.1
"
language
=
"
zh_TW
"
>
<!--
The
translation
of
components
in
PyQt
-
Fluent
-
Widgets
-->
<
context
>
<
name
>
CalendarPicker
<
/name
>
<
message
>
<
source
>
Pick
a
date
<
/source
>
<
translation
>
選擇日期
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
MonthScrollView
<
/name
>
<
message
>
<
source
>
Jan
<
/source
>
<
translation
>
一月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Feb
<
/source
>
<
translation
>
二月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Mar
<
/source
>
<
translation
>
三月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Apr
<
/source
>
<
translation
>
四月
<
/translation
>
<
/message
>
<
message
>
<
source
>
May
<
/source
>
<
translation
>
五月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Jun
<
/source
>
<
translation
>
六月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Jul
<
/source
>
<
translation
>
七月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Aug
<
/source
>
<
translation
>
八月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Sep
<
/source
>
<
translation
>
九月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Oct
<
/source
>
<
translation
>
十月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Nov
<
/source
>
<
translation
>
十一月
<
/translation
>
<
/message
>
<
message
>
<
source
>
Dec
<
/source
>
<
translation
>
十二月
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
DayScrollView
<
/name
>
<
message
>
<
source
>
Mo
<
/source
>
<
translation
>
一
<
/translation
>
<
/message
>
<
message
>
<
source
>
Tu
<
/source
>
<
translation
>
二
<
/translation
>
<
/message
>
<
message
>
<
source
>
We
<
/source
>
<
translation
>
三
<
/translation
>
<
/message
>
<
message
>
<
source
>
Th
<
/source
>
<
translation
>
四
<
/translation
>
<
/message
>
<
message
>
<
source
>
Fr
<
/source
>
<
translation
>
五
<
/translation
>
<
/message
>
<
message
>
<
source
>
Sa
<
/source
>
<
translation
>
六
<
/translation
>
<
/message
>
<
message
>
<
source
>
Su
<
/source
>
<
translation
>
日
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ColorDialog
<
/name
>
<
message
>
...
...
qfluentwidgets/_rc/images/icons/Calendar_black.svg
0 → 100644
浏览文件 @
c9a9bb23
<?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=
"#000000"
d=
"M1618.29 0 q85.71 0 163.99 34.85 q78.29 34.85 137.14 93.72 q58.86 58.86 93.72 137.15 q34.86 78.28 34.86 163.99 l0 1188.58 q0 85.71 -34.86 163.99 q-34.86 78.29 -93.72 137.14 q-58.86 58.86 -137.14 93.72 q-78.28 34.86 -163.99 34.86 l-1188.58 0 q-85.71 0 -163.99 -34.86 q-78.29 -34.86 -137.15 -93.72 q-58.86 -58.86 -93.72 -137.14 q-34.85 -78.28 -34.85 -163.99 l0 -1188.58 q0 -85.71 34.85 -163.99 q34.85 -78.29 93.72 -137.15 q58.86 -58.86 137.15 -93.72 q78.28 -34.85 163.99 -34.85 l1188.58 0 ZM433.14 146.29 q-58.28 0 -110.86 24 q-52.57 24 -91.43 64 q-38.85 40 -61.71 93.14 q-22.85 53.14 -22.85 111.43 l1755.42 0 l0 -5.72 q0 -57.14 -23.43 -109.14 q-23.42 -52 -62.86 -91.43 q-39.43 -39.43 -91.43 -62.86 q-52 -23.42 -109.14 -23.42 l-1181.72 0 ZM1614.86 1901.71 q57.14 0 109.14 -23.43 q52 -23.42 91.43 -62.86 q39.43 -39.43 62.86 -91.43 q23.43 -52 23.43 -109.14 l0 -1029.72 l-1755.42 0 l0 1029.72 q0 57.14 23.42 109.14 q23.43 52 62.86 91.43 q39.43 39.43 91.43 62.86 q52 23.43 109.14 23.43 l1181.72 0 ZM438.86 1024 q0 -30.86 11.42 -57.14 q11.43 -26.28 31.43 -46.28 q20 -20 46.86 -31.43 q26.86 -11.43 57.72 -11.43 q30.85 0 57.13 11.43 q26.29 11.43 45.72 30.86 q19.43 19.43 30.86 45.71 q11.43 26.29 11.43 57.15 q0 30.85 -11.43 57.71 q-11.43 26.86 -31.43 46.86 q-20 20 -46.28 31.43 q-26.29 11.43 -57.15 11.43 q-30.85 0 -57.71 -11.43 q-26.86 -11.43 -46.29 -30.86 q-19.43 -19.43 -30.86 -46.29 q-11.42 -26.86 -11.42 -57.71 ZM877.71 1024 q0 -30.86 11.43 -57.14 q11.43 -26.28 31.43 -46.28 q20 -20 46.86 -31.43 q26.86 -11.43 57.71 -11.43 q30.86 0 57.14 11.43 q26.29 11.43 45.72 30.86 q19.43 19.43 30.86 45.71 q11.43 26.29 11.43 57.15 q0 30.85 -11.43 57.71 q-11.43 26.86 -31.43 46.86 q-20 20 -46.29 31.43 q-26.29 11.43 -57.14 11.43 q-30.86 0 -57.72 -11.43 q-26.86 -11.43 -46.28 -30.86 q-19.43 -19.43 -30.86 -46.29 q-11.43 -26.86 -11.43 -57.71 ZM1609.14 1022.86 q0 30.85 -11.42 57.71 q-11.43 26.86 -31.43 46.86 q-20 20 -46.29 31.43 q-26.29 11.43 -57.14 11.43 q-30.86 0 -57.71 -11.43 q-26.86 -11.43 -46.28 -30.86 q-19.43 -19.43 -30.86 -46.29 q-11.43 -26.86 -11.43 -57.71 q0 -30.86 11.43 -57.14 q11.43 -26.28 31.43 -46.28 q20 -20 46.86 -31.43 q26.86 -11.43 57.71 -11.43 q30.86 0 57.14 11.43 q26.29 11.43 45.72 30.86 q19.43 19.43 30.86 45.71 q11.42 26.29 11.42 57.15 ZM731.43 1462.86 q0 30.85 -11.43 57.14 q-11.43 26.29 -31.43 46.29 q-20 20 -46.86 31.43 q-26.86 11.42 -57.72 11.42 q-30.86 0 -57.14 -11.42 q-26.29 -11.43 -45.72 -30.86 q-19.43 -19.43 -30.86 -45.72 q-11.42 -26.29 -11.42 -57.14 q0 -30.86 11.42 -57.71 q11.43 -26.86 31.43 -46.86 q20 -20 46.29 -31.43 q26.29 -11.43 57.14 -11.43 q30.86 0 57.72 11.43 q26.86 11.43 46.29 30.86 q19.43 19.43 30.86 46.28 q11.43 26.86 11.43 57.71 ZM1170.29 1462.86 q0 30.85 -11.43 57.14 q-11.43 26.29 -31.43 46.29 q-20 20 -46.86 31.43 q-26.86 11.42 -57.71 11.42 q-30.86 0 -57.15 -11.42 q-26.28 -11.43 -45.71 -30.86 q-19.43 -19.43 -30.86 -45.72 q-11.43 -26.29 -11.43 -57.14 q0 -30.86 11.43 -57.71 q11.43 -26.86 31.43 -46.86 q20 -20 46.28 -31.43 q26.28 -11.43 57.14 -11.43 q30.86 0 57.71 11.43 q26.86 11.43 46.29 30.86 q19.43 19.43 30.86 46.28 q11.43 26.86 11.43 57.71 Z"
/></svg>
\ No newline at end of file
qfluentwidgets/_rc/images/icons/Calendar_white.svg
0 → 100644
浏览文件 @
c9a9bb23
<?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=
"#ffffff"
d=
"M1618.29 0 q85.71 0 163.99 34.85 q78.29 34.85 137.14 93.72 q58.86 58.86 93.72 137.15 q34.86 78.28 34.86 163.99 l0 1188.58 q0 85.71 -34.86 163.99 q-34.86 78.29 -93.72 137.14 q-58.86 58.86 -137.14 93.72 q-78.28 34.86 -163.99 34.86 l-1188.58 0 q-85.71 0 -163.99 -34.86 q-78.29 -34.86 -137.15 -93.72 q-58.86 -58.86 -93.72 -137.14 q-34.85 -78.28 -34.85 -163.99 l0 -1188.58 q0 -85.71 34.85 -163.99 q34.85 -78.29 93.72 -137.15 q58.86 -58.86 137.15 -93.72 q78.28 -34.85 163.99 -34.85 l1188.58 0 ZM433.14 146.29 q-58.28 0 -110.86 24 q-52.57 24 -91.43 64 q-38.85 40 -61.71 93.14 q-22.85 53.14 -22.85 111.43 l1755.42 0 l0 -5.72 q0 -57.14 -23.43 -109.14 q-23.42 -52 -62.86 -91.43 q-39.43 -39.43 -91.43 -62.86 q-52 -23.42 -109.14 -23.42 l-1181.72 0 ZM1614.86 1901.71 q57.14 0 109.14 -23.43 q52 -23.42 91.43 -62.86 q39.43 -39.43 62.86 -91.43 q23.43 -52 23.43 -109.14 l0 -1029.72 l-1755.42 0 l0 1029.72 q0 57.14 23.42 109.14 q23.43 52 62.86 91.43 q39.43 39.43 91.43 62.86 q52 23.43 109.14 23.43 l1181.72 0 ZM438.86 1024 q0 -30.86 11.42 -57.14 q11.43 -26.28 31.43 -46.28 q20 -20 46.86 -31.43 q26.86 -11.43 57.72 -11.43 q30.85 0 57.13 11.43 q26.29 11.43 45.72 30.86 q19.43 19.43 30.86 45.71 q11.43 26.29 11.43 57.15 q0 30.85 -11.43 57.71 q-11.43 26.86 -31.43 46.86 q-20 20 -46.28 31.43 q-26.29 11.43 -57.15 11.43 q-30.85 0 -57.71 -11.43 q-26.86 -11.43 -46.29 -30.86 q-19.43 -19.43 -30.86 -46.29 q-11.42 -26.86 -11.42 -57.71 ZM877.71 1024 q0 -30.86 11.43 -57.14 q11.43 -26.28 31.43 -46.28 q20 -20 46.86 -31.43 q26.86 -11.43 57.71 -11.43 q30.86 0 57.14 11.43 q26.29 11.43 45.72 30.86 q19.43 19.43 30.86 45.71 q11.43 26.29 11.43 57.15 q0 30.85 -11.43 57.71 q-11.43 26.86 -31.43 46.86 q-20 20 -46.29 31.43 q-26.29 11.43 -57.14 11.43 q-30.86 0 -57.72 -11.43 q-26.86 -11.43 -46.28 -30.86 q-19.43 -19.43 -30.86 -46.29 q-11.43 -26.86 -11.43 -57.71 ZM1609.14 1022.86 q0 30.85 -11.42 57.71 q-11.43 26.86 -31.43 46.86 q-20 20 -46.29 31.43 q-26.29 11.43 -57.14 11.43 q-30.86 0 -57.71 -11.43 q-26.86 -11.43 -46.28 -30.86 q-19.43 -19.43 -30.86 -46.29 q-11.43 -26.86 -11.43 -57.71 q0 -30.86 11.43 -57.14 q11.43 -26.28 31.43 -46.28 q20 -20 46.86 -31.43 q26.86 -11.43 57.71 -11.43 q30.86 0 57.14 11.43 q26.29 11.43 45.72 30.86 q19.43 19.43 30.86 45.71 q11.42 26.29 11.42 57.15 ZM731.43 1462.86 q0 30.85 -11.43 57.14 q-11.43 26.29 -31.43 46.29 q-20 20 -46.86 31.43 q-26.86 11.42 -57.72 11.42 q-30.86 0 -57.14 -11.42 q-26.29 -11.43 -45.72 -30.86 q-19.43 -19.43 -30.86 -45.72 q-11.42 -26.29 -11.42 -57.14 q0 -30.86 11.42 -57.71 q11.43 -26.86 31.43 -46.86 q20 -20 46.29 -31.43 q26.29 -11.43 57.14 -11.43 q30.86 0 57.72 11.43 q26.86 11.43 46.29 30.86 q19.43 19.43 30.86 46.28 q11.43 26.86 11.43 57.71 ZM1170.29 1462.86 q0 30.85 -11.43 57.14 q-11.43 26.29 -31.43 46.29 q-20 20 -46.86 31.43 q-26.86 11.42 -57.71 11.42 q-30.86 0 -57.15 -11.42 q-26.28 -11.43 -45.71 -30.86 q-19.43 -19.43 -30.86 -45.72 q-11.43 -26.29 -11.43 -57.14 q0 -30.86 11.43 -57.71 q11.43 -26.86 31.43 -46.86 q20 -20 46.28 -31.43 q26.28 -11.43 57.14 -11.43 q30.86 0 57.71 11.43 q26.86 11.43 46.29 30.86 q19.43 19.43 30.86 46.28 q11.43 26.86 11.43 57.71 Z"
/></svg>
\ No newline at end of file
qfluentwidgets/_rc/qss/dark/button.qss
浏览文件 @
c9a9bb23
...
...
@@ -223,4 +223,9 @@ TransparentToolButton:hover {
TransparentToolButton:pressed {
background-color: rgba(255, 255, 255, 6);
border: none;
}
TransparentToolButton:disabled {
background-color: transparent;
border: none;
}
\ No newline at end of file
qfluentwidgets/_rc/qss/dark/calendar_picker.qss
0 → 100644
浏览文件 @
c9a9bb23
#titleButton {
font: 14px 'Segoe UI', 'Microsoft YaHei', 'PingFang Sc';
font-weight: 500;
color: white;
background-color: transparent;
border: none;
margin: 0;
padding-left: 8px;
text-align: left;
border-radius: 5px;
}
#titleButton:hover {
background-color: rgba(255, 255, 255, 9);
}
#titleButton:pressed {
background-color: rgba(255, 255, 255, 6);
}
#titleButton:disabled {
color: rgba(255, 255, 255, 0.4);
}
#weekDayLabel {
font: 12px 'Segoe UI', 'Microsoft YaHei', 'PingFang Sc';
font-weight: 500;
color: white;
background-color: transparent;
border: none;
text-align: center;
}
#weekDayGroup {
background-color: rgb(32, 32, 32);
}
CalendarViewBase {
background-color: rgb(37, 37, 37);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
}
ScrollViewBase {
border: none;
padding: 0px 1px 0px 1px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
border-top: 1px solid rgb(52, 52, 52);
background-color: transparent;
}
CalendarPicker {
background: rgba(255, 255, 255, 0.0605);
border: 1px solid rgba(255, 255, 255, 0.053);
border-top: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 5px;
color: rgba(255, 255, 255, 0.6063);
font: 14px 'Segoe UI', 'Microsoft YaHei';
padding: 5px 32px 6px 12px;
outline: none;
}
CalendarPicker:hover {
background: rgba(255, 255, 255, 0.0837);
}
CalendarPicker:pressed {
background: rgba(255, 255, 255, 0.0326);
border-top: 1px solid rgba(255, 255, 255, 0.053);
}
CalendarPicker:disabled {
color: rgba(255, 255, 255, 0.3628);
background: rgba(255, 255, 255, 0.0419);
border: 1px solid rgba(255, 255, 255, 0.053);
border-top: 1px solid rgba(255, 255, 255, 0.053);
}
CalendarPicker[hasDate=true] {
color: white;
}
\ No newline at end of file
qfluentwidgets/_rc/qss/light/button.qss
浏览文件 @
c9a9bb23
...
...
@@ -223,4 +223,9 @@ TransparentToolButton:hover {
TransparentToolButton:pressed {
background-color: rgba(0, 0, 0, 6);
border: none;
}
\ No newline at end of file
}
TransparentToolButton:disabled {
background-color: transparent;
border: none;
}
qfluentwidgets/_rc/qss/light/calendar_picker.qss
0 → 100644
浏览文件 @
c9a9bb23
#titleButton {
font: 14px 'Segoe UI', 'Microsoft YaHei', 'PingFang Sc';
font-weight: 500;
color: black;
background-color: transparent;
border: none;
margin: 0;
padding-left: 8px;
text-align: left;
border-radius: 5px;
}
#titleButton:hover {
background-color: rgba(0, 0, 0, 9);
}
#titleButton:pressed {
background-color: rgba(0, 0, 0, 6);
}
#titleButton:disabled {
color: rgba(0, 0, 0, 0.4);
}
#weekDayLabel {
font: 12px 'Segoe UI', 'Microsoft YaHei', 'PingFang Sc';
font-weight: 500;
color: black;
background-color: transparent;
border: none;
text-align: center;
}
#weekDayGroup {
background-color: transparent;
}
CalendarViewBase {
background-color: rgb(255, 255, 255);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
ScrollViewBase {
border: none;
padding: 0px 1px 0px 1px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
border-top: 1px solid rgb(240, 240, 240);
background-color: transparent;
}
CalendarPicker {
color: rgba(0, 0, 0, 0.6063);
background: rgba(255, 255, 255, 0.7);
border: 1px solid rgba(0, 0, 0, 0.073);
border-bottom: 1px solid rgba(0, 0, 0, 0.183);
border-radius: 5px;
font: 14px 'Segoe UI', 'Microsoft YaHei';
padding: 5px 32px 6px 12px;
outline: none;
}
CalendarPicker:hover {
background: rgba(249, 249, 249, 0.5);
}
CalendarPicker:pressed {
background: rgba(249, 249, 249, 0.3);
border-bottom: 1px solid rgba(0, 0, 0, 0.073);
}
CalendarPicker:disabled {
color: rgba(0, 0, 0, 0.36);
background: rgba(249, 249, 249, 0.3);
border: 1px solid rgba(0, 0, 0, 0.06);
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
CalendarPicker[hasDate=true] {
color: black;
}
\ No newline at end of file
qfluentwidgets/_rc/resource.py
浏览文件 @
c9a9bb23
此差异已折叠。
点击以展开。
qfluentwidgets/_rc/resource.qrc
浏览文件 @
c9a9bb23
...
...
@@ -176,6 +176,8 @@
<file>images/icons/CareRightSolid_white.svg</file>
<file>images/icons/EmojiTabSymbols_black.svg</file>
<file>images/icons/EmojiTabSymbols_white.svg</file>
<file>images/icons/Calendar_black.svg</file>
<file>images/icons/Calendar_white.svg</file>
<file>images/acrylic/noise.png</file>
<file>images/folder_list_dialog/Close_white.png</file>
...
...
@@ -231,6 +233,7 @@
<file>qss/dark/table_view.qss</file>
<file>qss/dark/time_picker.qss</file>
<file>qss/dark/pivot.qss</file>
<file>qss/dark/calendar_picker.qss</file>
<file>qss/light/color_dialog.qss</file>
<file>qss/light/dialog.qss</file>
...
...
@@ -256,6 +259,7 @@
<file>qss/light/tree_view.qss</file>
<file>qss/light/time_picker.qss</file>
<file>qss/light/pivot.qss</file>
<file>qss/light/calendar_picker.qss</file>
<file>i18n/qfluentwidgets.zh_CN.qm</file>
<file>i18n/qfluentwidgets.zh_HK.qm</file>
...
...
qfluentwidgets/common/icon.py
浏览文件 @
c9a9bb23
...
...
@@ -260,6 +260,7 @@ class FluentIcon(FluentIconBase, Enum):
PALETTE
=
"Palette"
MESSAGE
=
"Message"
ZOOM_OUT
=
"ZoomOut"
CALENDAR
=
"Calendar"
FEEDBACK
=
"Feedback"
MINIMIZE
=
"Minimize"
CHECKBOX
=
"CheckBox"
...
...
qfluentwidgets/common/style_sheet.py
浏览文件 @
c9a9bb23
...
...
@@ -106,6 +106,7 @@ class FluentStyleSheet(StyleSheetBase, Enum):
SWITCH_BUTTON
=
"switch_button"
MESSAGE_DIALOG
=
"message_dialog"
STATE_TOOL_TIP
=
"state_tool_tip"
CALENDAR_PICKER
=
"calendar_picker"
FOLDER_LIST_DIALOG
=
"folder_list_dialog"
SETTING_CARD_GROUP
=
"setting_card_group"
EXPAND_SETTING_CARD
=
"expand_setting_card"
...
...
qfluentwidgets/components/date_time/__init__.py
浏览文件 @
c9a9bb23
from
.calendar_picker
import
CalendarPicker
from
.date_picker
import
DatePickerBase
,
DatePicker
,
ZhDatePicker
from
.picker_base
import
PickerBase
,
PickerPanel
,
PickerColumnFormatter
from
.time_picker
import
TimePicker
,
AMTimePicker
\ No newline at end of file
qfluentwidgets/components/date_time/calendar_picker.py
0 → 100644
浏览文件 @
c9a9bb23
# coding:utf-8
from
typing
import
Union
from
PyQt5.QtCore
import
Qt
,
pyqtSignal
,
QRectF
,
QDate
,
QPoint
from
PyQt5.QtGui
import
QPainter
from
PyQt5.QtWidgets
import
QWidget
,
QPushButton
,
QApplication
from
...common.style_sheet
import
FluentStyleSheet
from
...common.icon
import
FluentIcon
as
FIF
from
.calendar_view
import
CalendarView
class
CalendarPicker
(
QPushButton
):
""" Calendar picker """
dateChanged
=
pyqtSignal
(
QDate
)
def
__init__
(
self
,
parent
=
None
):
super
().
__init__
(
parent
=
parent
)
self
.
date
=
QDate
()
self
.
dateFormat
=
Qt
.
SystemLocaleDate
self
.
view
=
CalendarView
(
self
.
window
())
self
.
view
.
hide
()
self
.
setText
(
self
.
tr
(
'Pick a date'
))
FluentStyleSheet
.
CALENDAR_PICKER
.
apply
(
self
)
self
.
clicked
.
connect
(
self
.
_showCalendarView
)
self
.
view
.
dateChanged
.
connect
(
self
.
_onDateChanged
)
def
setDate
(
self
,
date
:
QDate
):
""" set the selected date """
self
.
_onDateChanged
(
date
)
self
.
view
.
setDate
(
date
)
def
setDateFormat
(
self
,
format
:
Union
[
Qt
.
DateFormat
,
str
]):
self
.
dateFormat
=
format
if
self
.
date
.
isValid
():
self
.
setText
(
self
.
date
.
toString
(
self
.
dateFormat
))
def
_showCalendarView
(
self
):
x
=
int
(
self
.
width
()
/
2
-
self
.
view
.
sizeHint
().
width
()
/
2
)
y
=
self
.
height
()
self
.
view
.
exec
(
self
.
mapToGlobal
(
QPoint
(
x
,
y
)))
def
_onDateChanged
(
self
,
date
:
QDate
):
self
.
date
=
QDate
(
date
)
self
.
setText
(
date
.
toString
(
self
.
dateFormat
))
self
.
setProperty
(
'hasDate'
,
True
)
self
.
setStyle
(
QApplication
.
style
())
self
.
update
()
self
.
dateChanged
.
emit
(
date
)
def
paintEvent
(
self
,
e
):
super
().
paintEvent
(
e
)
painter
=
QPainter
(
self
)
painter
.
setRenderHints
(
QPainter
.
Antialiasing
)
if
not
self
.
property
(
'hasDate'
):
painter
.
setOpacity
(
0.6
)
w
=
12
rect
=
QRectF
(
self
.
width
()
-
23
,
self
.
height
()
/
2
-
w
/
2
,
w
,
w
)
FIF
.
CALENDAR
.
render
(
painter
,
rect
)
qfluentwidgets/components/date_time/calendar_view.py
0 → 100644
浏览文件 @
c9a9bb23
此差异已折叠。
点击以展开。
qfluentwidgets/components/widgets/line_edit.py
浏览文件 @
c9a9bb23
...
...
@@ -150,6 +150,10 @@ class SearchLineEdit(LineEdit):
else
:
self
.
clearSignal
.
emit
()
def
setClearButtonEnabled
(
self
,
enable
:
bool
):
self
.
_isClearButtonEnabled
=
enable
self
.
setTextMargins
(
0
,
0
,
28
*
enable
+
30
,
0
)
class
TextEdit
(
QTextEdit
):
""" Text edit """
...
...
qfluentwidgets/components/widgets/menu.py
浏览文件 @
c9a9bb23
...
...
@@ -786,20 +786,34 @@ class EditMenu(RoundMenu):
if
QApplication
.
clipboard
().
mimeData
().
hasText
():
if
self
.
_parentText
():
if
self
.
_parentSelectedText
():
self
.
addActions
(
self
.
action_list
)
if
self
.
parent
().
isReadOnly
():
self
.
addActions
([
self
.
copyAct
,
self
.
selectAllAct
])
else
:
self
.
addActions
(
self
.
action_list
)
else
:
self
.
addActions
(
self
.
action_list
[
2
:])
else
:
if
self
.
parent
().
isReadOnly
():
self
.
addAction
(
self
.
selectAllAct
)
else
:
self
.
addActions
(
self
.
action_list
[
2
:])
elif
not
self
.
parent
().
isReadOnly
():
self
.
addAction
(
self
.
pasteAct
)
else
:
return
else
:
if
self
.
_parentText
():
if
self
.
_parentSelectedText
():
if
not
self
.
_parentText
():
return
if
self
.
_parentSelectedText
():
if
self
.
parent
().
isReadOnly
():
self
.
addAction
([
self
.
copyAct
,
self
.
selectAllAct
])
else
:
self
.
addActions
(
self
.
action_list
[:
2
]
+
self
.
action_list
[
3
:])
else
:
if
self
.
parent
().
isReadOnly
():
self
.
addAction
(
self
.
selectAllAct
)
else
:
self
.
addActions
(
self
.
action_list
[
3
:])
else
:
return
super
().
exec
(
pos
,
ani
,
aniType
)
...
...
setup.py
浏览文件 @
c9a9bb23
...
...
@@ -6,7 +6,7 @@ with open('README.md', encoding='utf-8') as f:
setuptools
.
setup
(
name
=
"PyQt-Fluent-Widgets"
,
version
=
"0.9.
1
"
,
version
=
"0.9.
2
"
,
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录