Compare commits
516 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
b03849d6de | |
|
|
187be9a947 | |
|
|
16145642e1 | |
|
|
39a50cca37 | |
|
|
2767618f84 | |
|
|
36c06be095 | |
|
|
80db4dd238 | |
|
|
3d0713f7a2 | |
|
|
af1259edbb | |
|
|
3b5ba9bbda | |
|
|
c8f2955bd0 | |
|
|
96d0b45dd0 | |
|
|
00109d07e3 | |
|
|
d2c2efc49a | |
|
|
9842a0644e | |
|
|
9d3d659afe | |
|
|
eaf96e824d | |
|
|
7c05bace4a | |
|
|
a892ddc4e2 | |
|
|
65cf7b4161 | |
|
|
6b7e941839 | |
|
|
dc2eaeb61c | |
|
|
4dd22b538d | |
|
|
2ea4e762fe | |
|
|
18388f26f8 | |
|
|
9e54cbfad4 | |
|
|
6ff5c37579 | |
|
|
dd35e33644 | |
|
|
f834cb588d | |
|
|
9f500cbe94 | |
|
|
44bed9e070 | |
|
|
3f1cfd6800 | |
|
|
1f44c47e55 | |
|
|
28c53f37e7 | |
|
|
75d176f234 | |
|
|
6d6a4a4380 | |
|
|
ed252239b2 | |
|
|
aa13f2a82f | |
|
|
decbf724b3 | |
|
|
7c2b35ae42 | |
|
|
ec6fbaf651 | |
|
|
d3b68df561 | |
|
|
5eb6b4c403 | |
|
|
75208f151f | |
|
|
5ce8bf3755 | |
|
|
0a0182faac | |
|
|
c52610f23c | |
|
|
6cc9f8ac48 | |
|
|
8110fd861e | |
|
|
3c16e777fe | |
|
|
c0812b7af6 | |
|
|
b0c91b8714 | |
|
|
dc5aa91b44 | |
|
|
976aa9113c | |
|
|
b566c12e40 | |
|
|
329bf5a247 | |
|
|
7362e047b7 | |
|
|
1ede364ac6 | |
|
|
e0873d04b3 | |
|
|
acd947fa3e | |
|
|
b152721ae8 | |
|
|
4bdfc69e31 | |
|
|
e33a3945b2 | |
|
|
7871d7c448 | |
|
|
df159744c6 | |
|
|
4ff3a644af | |
|
|
3a2792c869 | |
|
|
06dedd11df | |
|
|
00584efe94 | |
|
|
f5a7cc22cd | |
|
|
79440d4b47 | |
|
|
726790ee06 | |
|
|
cf97c88b76 | |
|
|
76d00b0301 | |
|
|
fed4aae652 | |
|
|
e10215f3c1 | |
|
|
16d4999f1b | |
|
|
1f0b9ed118 | |
|
|
b75b68a604 | |
|
|
d07aca6786 | |
|
|
5ad7ed1ce8 | |
|
|
de728b0bee | |
|
|
d435f92784 | |
|
|
43624a42e9 | |
|
|
b975592ce1 | |
|
|
f0a7d5d44d | |
|
|
a0398d03d5 | |
|
|
a407dc4032 | |
|
|
255f171e9f | |
|
|
525beab369 | |
|
|
231c29ac65 | |
|
|
6038e6fcf8 | |
|
|
316a3e741c | |
|
|
806457e8bc | |
|
|
b25353026b | |
|
|
8cf037d44b | |
|
|
af9a6fc359 | |
|
|
2dae5b2e82 | |
|
|
7a49e9c164 | |
|
|
b2c91d0c2e | |
|
|
4fb86c1204 | |
|
|
afe212871f | |
|
|
3a6a15b9f2 | |
|
|
c227e1adce | |
|
|
9c99626771 | |
|
|
6f375cfc0c | |
|
|
7ec030f0b9 | |
|
|
1ab1d9234f | |
|
|
75ce762ed0 | |
|
|
820e3030be | |
|
|
1ffd986e97 | |
|
|
b10836217d | |
|
|
12b60a3c8a | |
|
|
b23ef7058a | |
|
|
8900594c9f | |
|
|
da12696b21 | |
|
|
9c06164a2e | |
|
|
da27fb74b3 | |
|
|
7fee7b54b1 | |
|
|
46d504a819 | |
|
|
1c814a9217 | |
|
|
51c7e35161 | |
|
|
aeaccd30ce | |
|
|
1b9c238bbc | |
|
|
bffcdde9ea | |
|
|
c42d36671e | |
|
|
f9607e01a4 | |
|
|
069289d500 | |
|
|
1aa57f8b4e | |
|
|
20f5fc1d3b | |
|
|
f08256da6e | |
|
|
9d2673082e | |
|
|
4013869e09 | |
|
|
3b6cb2e9f2 | |
|
|
8561847a13 | |
|
|
754d5baff5 | |
|
|
0f079b0838 | |
|
|
d5c1ae779b | |
|
|
01af1cbc93 | |
|
|
2299e3137e | |
|
|
2d7435324c | |
|
|
7e3569496e | |
|
|
3ea215d46f | |
|
|
0dfac4ca6e | |
|
|
df8a05e159 | |
|
|
9e0396c5e6 | |
|
|
8cabfe86aa | |
|
|
a66d7ccbf3 | |
|
|
d471c7221a | |
|
|
d35f8e10fd | |
|
|
71aaf6a024 | |
|
|
dec5572b9b | |
|
|
0e8a4e0b91 | |
|
|
d6434448c1 | |
|
|
3b2949bbf3 | |
|
|
75633580dc | |
|
|
6bee9a679d | |
|
|
4f8d3739b5 | |
|
|
eef2f42fea | |
|
|
1da5179b08 | |
|
|
de4dc37e39 | |
|
|
f9d2dcdeb9 | |
|
|
69e79f8e3a | |
|
|
09b956383e | |
|
|
d3d7096c0d | |
|
|
b211db014e | |
|
|
1bbeb9f475 | |
|
|
f08f6ea538 | |
|
|
cd822bb2c8 | |
|
|
c2b0782d00 | |
|
|
3f1960067b | |
|
|
8f4319308b | |
|
|
c2b8c1508b | |
|
|
07b454ccb7 | |
|
|
5f457d2225 | |
|
|
afb7340011 | |
|
|
994133ca16 | |
|
|
9523642508 | |
|
|
e7834e1763 | |
|
|
fa3ca10d03 | |
|
|
ba55aa6e7d | |
|
|
1cb3939cf9 | |
|
|
ff836690e5 | |
|
|
95f8b5ffd3 | |
|
|
0b63795ee7 | |
|
|
e17e250fe1 | |
|
|
20c5c09315 | |
|
|
724af5ebf3 | |
|
|
b810be77cb | |
|
|
98b9632f63 | |
|
|
d867a02cda | |
|
|
0d9e457d13 | |
|
|
2c4cc71e0d | |
|
|
4350475fe1 | |
|
|
3cf033b048 | |
|
|
536f1f9dff | |
|
|
6588a86d71 | |
|
|
0ad02e6ce7 | |
|
|
62b66a9f05 | |
|
|
dcede1f96d | |
|
|
b683e97cbc | |
|
|
58095a743f | |
|
|
6c4bbde470 | |
|
|
dd10f593b7 | |
|
|
3196e5d7a0 | |
|
|
6b366af60a | |
|
|
8aee0513e7 | |
|
|
d52cc4c111 | |
|
|
6dc214c70a | |
|
|
978be55303 | |
|
|
7abf16d31a | |
|
|
99d184978b | |
|
|
5327c027c3 | |
|
|
4bcd6d8474 | |
|
|
b153abe460 | |
|
|
19492cbfb7 | |
|
|
6c06cf37cd | |
|
|
99e450c1cd | |
|
|
42edd583a4 | |
|
|
a3677d4bbf | |
|
|
0faedd5009 | |
|
|
cd21667c52 | |
|
|
d30876386c | |
|
|
9e54cba93c | |
|
|
2e966e94bf | |
|
|
6549a67eb3 | |
|
|
419e11629b | |
|
|
8a5e67652c | |
|
|
cca33d94c8 | |
|
|
f893e02fdf | |
|
|
5c948aa7ee | |
|
|
ebde919132 | |
|
|
66ab7451f2 | |
|
|
7fa65a0792 | |
|
|
e244d5d3fb | |
|
|
c1286c6502 | |
|
|
088bfea481 | |
|
|
3b8ab9c49b | |
|
|
451b85b4b2 | |
|
|
5de5c59984 | |
|
|
7d070dd912 | |
|
|
3135be671d | |
|
|
78cb5939ea | |
|
|
f79aeb8aaa | |
|
|
e400ddd110 | |
|
|
0d6cb64ca6 | |
|
|
5ca5df6ccf | |
|
|
7539108e26 | |
|
|
34a1fe3f19 | |
|
|
306baad983 | |
|
|
6a8bbff79e | |
|
|
f7e76a9706 | |
|
|
b6b4691e55 | |
|
|
c84d977c2b | |
|
|
87f2388f31 | |
|
|
0a76949970 | |
|
|
a74f91cc7b | |
|
|
f0b2a3c536 | |
|
|
e0081d840f | |
|
|
a69ed2efdc | |
|
|
2e8f35a33e | |
|
|
0f872fa323 | |
|
|
ded66d1d3b | |
|
|
2eae43e7be | |
|
|
d0bc6d89d5 | |
|
|
eed4e3faee | |
|
|
195e45f285 | |
|
|
edd51cbd8a | |
|
|
8e1a76a607 | |
|
|
2a9847a5a0 | |
|
|
5f33adfb3c | |
|
|
9dc1bb90d1 | |
|
|
2600e5ea59 | |
|
|
70cea31810 | |
|
|
d6cd2c8c63 | |
|
|
89698b4c1c | |
|
|
f0c7c06e79 | |
|
|
36eb4ff565 | |
|
|
b1a1654f69 | |
|
|
9fb5d8c794 | |
|
|
b6d844990b | |
|
|
1e305e8e38 | |
|
|
7f0057bcd0 | |
|
|
f688039440 | |
|
|
934be318be | |
|
|
de0385eca6 | |
|
|
f94b34cf37 | |
|
|
27eeedefdf | |
|
|
cedce64025 | |
|
|
aa23085099 | |
|
|
37aa254da9 | |
|
|
3fc47d2201 | |
|
|
5204f570ef | |
|
|
d30618f92b | |
|
|
999b6f5fc5 | |
|
|
f7324e32cf | |
|
|
69f96446c0 | |
|
|
798f77411a | |
|
|
084d467a83 | |
|
|
4cffb60f92 | |
|
|
09de488645 | |
|
|
9dbff1eb87 | |
|
|
adb29f1dff | |
|
|
c20933e29c | |
|
|
750478f24e | |
|
|
0abaada3ce | |
|
|
edd1ce77ac | |
|
|
bf97026e5e | |
|
|
77638b7fb5 | |
|
|
4869430d96 | |
|
|
d1188cf35b | |
|
|
7f227daf8a | |
|
|
b9d3127db6 | |
|
|
bdfcc85de9 | |
|
|
7efd175217 | |
|
|
689785e07e | |
|
|
1ad9b719d5 | |
|
|
c4bd7a1dd5 | |
|
|
0f802e61e4 | |
|
|
987b356f46 | |
|
|
75e7f708ae | |
|
|
c58b078b79 | |
|
|
8a9fa760f0 | |
|
|
2c345bbd26 | |
|
|
7e2f328a57 | |
|
|
20fd72d9d3 | |
|
|
ffe5dfa572 | |
|
|
0c3dd24063 | |
|
|
6002ec2b37 | |
|
|
ea044318c0 | |
|
|
a479eaa5a8 | |
|
|
4976a77764 | |
|
|
d0bf83a9f6 | |
|
|
454ba294a9 | |
|
|
b917cd8f65 | |
|
|
3cba7f1fce | |
|
|
326eb00c69 | |
|
|
71b349d2c7 | |
|
|
0f52bb9546 | |
|
|
e7568851c4 | |
|
|
5c15f33b5d | |
|
|
4b8687678b | |
|
|
503ac5d6b0 | |
|
|
7eefcfe8ae | |
|
|
ca0a01c9c7 | |
|
|
679a234177 | |
|
|
7484c50c08 | |
|
|
6393c2e1ee | |
|
|
2c0a96ce2a | |
|
|
3dd4b9b5fa | |
|
|
54ef3e64ca | |
|
|
e9c615b5dc | |
|
|
d145d3027d | |
|
|
411ceb5116 | |
|
|
eba6c902da | |
|
|
533d213b1b | |
|
|
885c1fd01f | |
|
|
794fdc7af4 | |
|
|
1d4d680ded | |
|
|
6d092b93f0 | |
|
|
a252a7fa1f | |
|
|
b3a9d5362b | |
|
|
38b51ed45d | |
|
|
56873401b9 | |
|
|
b4e53fb126 | |
|
|
678a18847e | |
|
|
1562b12e9a | |
|
|
0eae7ec610 | |
|
|
8f76d8e683 | |
|
|
918da56c8d | |
|
|
2b30030af2 | |
|
|
b22b1d6aa2 | |
|
|
6e800eb1d8 | |
|
|
b40b8b42a8 | |
|
|
d8f440c01e | |
|
|
ede95f3d9d | |
|
|
9777dc8959 | |
|
|
b24280bbe0 | |
|
|
86e21e00d0 | |
|
|
fe8ae12998 | |
|
|
6ef15092b2 | |
|
|
a7b6d0cbe0 | |
|
|
0ff3c8fa33 | |
|
|
7dd939a80f | |
|
|
18ee272b32 | |
|
|
1fe66600c3 | |
|
|
55351686f0 | |
|
|
24b51b64f2 | |
|
|
3ecea3b455 | |
|
|
99b89b3943 | |
|
|
86b29ebcdf | |
|
|
cf580cd804 | |
|
|
6b4bc297d4 | |
|
|
a53f41135d | |
|
|
10df23848f | |
|
|
0c81b195bf | |
|
|
03fb207df5 | |
|
|
c30d53d1ec | |
|
|
8350799750 | |
|
|
abd1a8d3e2 | |
|
|
d2b41535cd | |
|
|
ec1f342a38 | |
|
|
df4d814658 | |
|
|
14a2e1a0e1 | |
|
|
ffab5edef0 | |
|
|
17b58b0bb7 | |
|
|
a0d4c793e1 | |
|
|
118cf1daeb | |
|
|
0ee689b9c0 | |
|
|
b1c55d7fa4 | |
|
|
87b29bde2d | |
|
|
0bc6f7572b | |
|
|
93724d74c1 | |
|
|
88e0b51da7 | |
|
|
959c3ebc10 | |
|
|
5fcda3f5e0 | |
|
|
2161407cbc | |
|
|
b27f489812 | |
|
|
c988b2a824 | |
|
|
c9c2941aa8 | |
|
|
6e3f7d497d | |
|
|
307f0e94ff | |
|
|
63f1ce54b4 | |
|
|
183fcd429b | |
|
|
7925668a88 | |
|
|
58e254702f | |
|
|
278f960381 | |
|
|
066c89e6ed | |
|
|
d2ff5d299c | |
|
|
2ccf6dfc85 | |
|
|
13a42f4a9a | |
|
|
43075064f8 | |
|
|
357df725cb | |
|
|
263581fce3 | |
|
|
f27e05fb44 | |
|
|
2d18a7955d | |
|
|
a4faf581f3 | |
|
|
3088a98d7c | |
|
|
550a8c58ea | |
|
|
8389d05326 | |
|
|
30c310a75f | |
|
|
fde47fa1f3 | |
|
|
6f0a551492 | |
|
|
f18578db58 | |
|
|
a0e0513540 | |
|
|
a9423da236 | |
|
|
583c58b3b2 | |
|
|
47b80d5a1d | |
|
|
97f1c63d9f | |
|
|
910230573b | |
|
|
16d8bf2dee | |
|
|
c244347686 | |
|
|
a238a9466a | |
|
|
124068be0e | |
|
|
5f6ab73182 | |
|
|
0e9633f2e7 | |
|
|
ea60f6b0bb | |
|
|
6ae8f77d42 | |
|
|
de1f742ede | |
|
|
a3b9836b83 | |
|
|
e717fdaedd | |
|
|
6d92f7ee2d | |
|
|
3d3f3de410 | |
|
|
76f129da63 | |
|
|
4c159f015d | |
|
|
94e6ed00f1 | |
|
|
a1d77d3f1d | |
|
|
b227464a40 | |
|
|
8219b171f3 | |
|
|
557caf63d3 | |
|
|
f774bfc4f2 | |
|
|
b279354875 | |
|
|
ab57dd8dd0 | |
|
|
b5539b26fe | |
|
|
c3e0ce45ca | |
|
|
2582f298d6 | |
|
|
17d1d6af12 | |
|
|
eb80c8d763 | |
|
|
e0ff824d03 | |
|
|
3543ab0ac6 | |
|
|
ea029575d8 | |
|
|
66a653f465 | |
|
|
2a62e855bc | |
|
|
f15f19b10c | |
|
|
d402053227 | |
|
|
91d3c11943 | |
|
|
6b6efe32ea | |
|
|
ab1f527976 | |
|
|
3048443350 | |
|
|
e3ed72c652 | |
|
|
896675cc75 | |
|
|
cca21c5e51 | |
|
|
9e57aa6736 | |
|
|
512bf17e9f | |
|
|
773b21d8d2 | |
|
|
2d41615156 | |
|
|
d5e94c7d30 | |
|
|
705e9599b5 | |
|
|
1487cf4c56 | |
|
|
ad9d83530e | |
|
|
54b7c79e6d | |
|
|
00a1e3e0e2 | |
|
|
426bfac1ba | |
|
|
e0b5af5972 | |
|
|
94fd8d772d | |
|
|
80e83bc1a5 | |
|
|
bc33564826 | |
|
|
f1fa63fac2 | |
|
|
55dffb8646 | |
|
|
55f5fb2f64 | |
|
|
9ea7d2d311 | |
|
|
6286dceb20 | |
|
|
88c828b45c | |
|
|
5f781c7aac | |
|
|
cb5835885e | |
|
|
acba86a4c0 |
|
|
@ -0,0 +1,20 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: BUG Report | 缺陷报告
|
||||
url: https://github.com/linuxdeepin/dtk/issues/new?assignees=&labels=&template=bug-report.yml
|
||||
about: Please create bug reports to the issue board in our dtk repo.
|
||||
|
||||
- name: docs-update | 文档补充
|
||||
url: https://github.com/linuxdeepin/dtk/issues/new?assignees=&labels=&template=docs-update.yml
|
||||
about: Please create docs-update to the issue board in our dtk repo.
|
||||
|
||||
- name: unit-test-report | 单元测试报告
|
||||
url: https://github.com/linuxdeepin/dtk/issues/new?assignees=&labels=&template=unit-test-report.yml
|
||||
about: Please create unit-test-report to the issue board in our dtk repo.
|
||||
|
||||
- name: Feature Request | 特性请求
|
||||
url: https://github.com/linuxdeepin/developer-center/discussions/new?category=features-request-ideas-%E7%89%B9%E6%80%A7%E8%AF%B7%E6%B1%82-%E5%A4%B4%E8%84%91%E9%A3%8E%E6%9A%B4
|
||||
about: Please create feature requests to the discussion board in our developer-center repo.
|
||||
- name: General Discussion & Questions | 常规讨论与问答
|
||||
url: https://github.com/linuxdeepin/developer-center/discussions/categories/q-a-%E9%97%AE%E7%AD%94%E6%9D%BF%E5%9D%97
|
||||
about: Please use the discussion board in our developer-center repo.
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
name: backup to gitlab
|
||||
on: [push]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
backup-to-gitlabwh:
|
||||
uses: linuxdeepin/.github/.github/workflows/backup-to-gitlabwh.yml@master
|
||||
secrets: inherit
|
||||
|
||||
backup-to-gitee:
|
||||
uses: linuxdeepin/.github/.github/workflows/backup-to-gitee.yml@master
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
name: apiCheck
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
api-check:
|
||||
uses: linuxdeepin/.github/.github/workflows/api-check.yml@master
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
name: Auto Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Release version (e.g., 1.0.0)'
|
||||
type: string
|
||||
required: false
|
||||
name:
|
||||
description: 'The name of the person to release the version'
|
||||
type: string
|
||||
required: false
|
||||
email:
|
||||
description: 'The email of the person to release the version'
|
||||
type: string
|
||||
required: false
|
||||
timezone:
|
||||
description: 'The timezone in the debian changelog file'
|
||||
required: false
|
||||
type: string
|
||||
default: 'Asia/Shanghai'
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Release version (e.g., 1.0.0)'
|
||||
type: string
|
||||
required: true
|
||||
name:
|
||||
description: 'The name of the person to release the version'
|
||||
type: string
|
||||
required: false
|
||||
email:
|
||||
description: 'The email of the person to release the version'
|
||||
type: string
|
||||
required: false
|
||||
timezone:
|
||||
description: 'The timezone in the debian changelog file'
|
||||
required: false
|
||||
type: string
|
||||
default: 'Asia/Shanghai'
|
||||
|
||||
jobs:
|
||||
auto_release:
|
||||
uses: linuxdeepin/.github/.github/workflows/auto-release.yml@master
|
||||
secrets: inherit
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
name: ${{ inputs.name }}
|
||||
email: ${{ inputs.email }}
|
||||
timezone: ${{ inputs.timezone }}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
name: auto tag
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, closed]
|
||||
paths:
|
||||
- "debian/changelog"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-pull/${{ github.event.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
auto_tag:
|
||||
uses: linuxdeepin/.github/.github/workflows/auto-tag.yml@master
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
name: Call build-distribution
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- ".github/workflows/**"
|
||||
pull_request_target:
|
||||
paths-ignore:
|
||||
- ".github/workflows/**"
|
||||
|
||||
jobs:
|
||||
check_job:
|
||||
uses: linuxdeepin/.github/.github/workflows/build-distribution.yml@master
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
name: chatOps
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
chatopt:
|
||||
uses: linuxdeepin/.github/.github/workflows/chatOps.yml@master
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
name: Call CLA check
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_target:
|
||||
types: [opened, closed, synchronize]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-pull/${{ github.event.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
clacheck:
|
||||
uses: linuxdeepin/.github/.github/workflows/cla-check.yml@master
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
name: Call commitlint
|
||||
on:
|
||||
pull_request_target:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-pull/${{ github.event.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check_job:
|
||||
uses: linuxdeepin/.github/.github/workflows/commitlint.yml@master
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
name: debianCheck
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
debian-check:
|
||||
uses: linuxdeepin/.github/.github/workflows/debian-check.yml@master
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
name: deploy docs
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
deploydocs:
|
||||
uses: linuxdeepin/.github/.github/workflows/deploy-dev-doc.yml@master
|
||||
with:
|
||||
ref: ${{ inputs.tag }}
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
name: doxygen-check
|
||||
on:
|
||||
pull_request_target:
|
||||
paths-ignore:
|
||||
- ".github/workflows/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-pull/${{ github.event.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check_job:
|
||||
uses: linuxdeepin/.github/.github/workflows/doc-check.yml@master
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
name: Call License and README Check
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-pull/${{ github.event.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
license-check:
|
||||
uses: linuxdeepin/.github/.github/workflows/license-check.yml@master
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
name: staticCheck
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
static-check:
|
||||
uses: linuxdeepin/.github/.github/workflows/static-check.yml@master
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
name: Call synchronize to dtk6
|
||||
on:
|
||||
pull_request_target:
|
||||
paths-ignore:
|
||||
- "debian/**"
|
||||
- "archlinux/**"
|
||||
- "rpm/**"
|
||||
- ".obs/**"
|
||||
- ".github/**"
|
||||
|
||||
jobs:
|
||||
call-synchronize:
|
||||
uses: linuxdeepin/dtk/.github/workflows/synchronize-to-dtk6.yml@master
|
||||
secrets: inherit
|
||||
with:
|
||||
dest_repo: linuxdeepin/dtk6gui
|
||||
source_repo: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
source_ref: ${{ github.event.pull_request.head.ref }}
|
||||
pull_number: ${{ github.event.pull_request.number }}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
name: cppcheck
|
||||
on:
|
||||
pull_request_target:
|
||||
paths-ignore:
|
||||
- ".github/workflows/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-pull/${{ github.event.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
cppchceck:
|
||||
name: cppcheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: export
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
persist-credentials: false
|
||||
- uses: linuxdeepin/action-cppcheck@main
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
repository: ${{ github.repository }}
|
||||
pull_request_id: ${{ github.event.pull_request.number }}
|
||||
allow_approve: false
|
||||
|
|
@ -42,8 +42,28 @@ target_wrapper.*
|
|||
# QtCreator CMake
|
||||
CMakeLists.txt.user*
|
||||
|
||||
# vscode
|
||||
.vscode
|
||||
|
||||
# idea
|
||||
.idea
|
||||
|
||||
#clangformat
|
||||
.clang-format
|
||||
|
||||
# build
|
||||
compile_commands.json
|
||||
|
||||
bin
|
||||
cmake
|
||||
DtkGuis
|
||||
dtkgui_config.h
|
||||
qt_lib_dtkgui.pri
|
||||
qt_lib_dtkgui*.pri
|
||||
build
|
||||
.cache
|
||||
dtkgui.pc
|
||||
DtkGuiConfig.cmake
|
||||
asan.*
|
||||
Testing
|
||||
|
||||
# Ignore Doxygen theme files
|
||||
docs/doxygen-theme/
|
||||
|
|
|
|||
|
|
@ -1,2 +1,5 @@
|
|||
include:
|
||||
- remote: 'https://gitlab.deepin.io/dev-tools/letmeci/raw/master/gitlab-ci/dde.yml'
|
||||
variables:
|
||||
CPPCHECK: "true"
|
||||
CODESPELL: "true"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
test_build:
|
||||
steps:
|
||||
- link_package:
|
||||
source_project: deepin:Develop:dde
|
||||
source_package: %{SCM_REPOSITORY_NAME}
|
||||
target_project: deepin:CI
|
||||
|
||||
- configure_repositories:
|
||||
project: deepin:CI
|
||||
repositories:
|
||||
- name: deepin_develop
|
||||
paths:
|
||||
- target_project: deepin:CI
|
||||
target_repository: deepin_develop
|
||||
architectures:
|
||||
- x86_64
|
||||
- aarch64
|
||||
|
||||
- name: debian
|
||||
paths:
|
||||
- target_project: deepin:CI
|
||||
target_repository: debian_sid
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
- name: archlinux
|
||||
paths:
|
||||
- target_project: deepin:CI
|
||||
target_repository: archlinux
|
||||
architectures:
|
||||
- x86_64
|
||||
|
||||
filters:
|
||||
event: pull_request
|
||||
|
||||
tag_build:
|
||||
steps:
|
||||
- branch_package:
|
||||
source_project: deepin:Develop:dde
|
||||
source_package: %{SCM_REPOSITORY_NAME}
|
||||
target_project: deepin:Unstable:dde
|
||||
filters:
|
||||
event: tag_push
|
||||
|
||||
commit_build:
|
||||
steps:
|
||||
- trigger_services:
|
||||
project: deepin:Develop:dde
|
||||
package: %{SCM_REPOSITORY_NAME}
|
||||
filters:
|
||||
event: push
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# See the documentation for more information:
|
||||
# https://packit.dev/docs/configuration/
|
||||
|
||||
specfile_path: rpm/dtkgui.spec
|
||||
|
||||
# add or remove files that should be synced
|
||||
synced_files:
|
||||
- rpm/dtkgui.spec
|
||||
- .packit.yaml
|
||||
|
||||
upstream_package_name: dtkgui
|
||||
# downstream (Fedora) RPM package name
|
||||
downstream_package_name: dtkgui
|
||||
|
||||
actions:
|
||||
fix-spec-file: |
|
||||
bash -c "sed -i -r \"s/Version:(\s*)\S*/Version:\1${PACKIT_PROJECT_VERSION}/\" rpm/dtkgui.spec"
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: dtkgui
|
||||
Upstream-Contact: UnionTech Software Technology Co., Ltd. <>
|
||||
Source: https://github.com/linuxdeepin/dtkgui
|
||||
|
||||
# ci
|
||||
Files: .github/* .gitlab-ci.yml .obs/*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# gitignore
|
||||
Files: .gitignore .syncexclude
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# json conf yaml
|
||||
Files: *.json *conf *.yaml
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
#interface
|
||||
Files: include/DtkGui/D*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# RPM/Arch Packaging
|
||||
Files: archlinux/* rpm/*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# debian
|
||||
Files: debian/*
|
||||
Copyright: None
|
||||
License: LGPL-3.0-or-later
|
||||
|
||||
# README
|
||||
Files: *README.md *README.zh_CN.md CHANGELOG.md
|
||||
Copyright: None
|
||||
License: CC-BY-4.0
|
||||
|
||||
# Documentations
|
||||
Files: docs/*
|
||||
Copyright: 2022-2023 deepin doc doc go SIG
|
||||
License: CC-BY-4.0
|
||||
|
||||
# DBus
|
||||
Files: src/dbus/*.xml
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# Project file
|
||||
Files: *.pro *.prf *.pri *.qrc *CMakeLists.txt *.cmake *.in VERSION
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# images: png svg dci webp
|
||||
Files: src/util/icons/actions/* src/util/icons/icons/* src/util/icons/texts/*
|
||||
src/util/icons/dci/* tests/images/* tests/actions/* tests/dcis/* examples/animation-dci/*
|
||||
Copyright: UnionTech Software Technology Co., Ltd.
|
||||
License: LGPL-3.0-or-later
|
||||
|
||||
Files: toolGenerate/**/*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
Files: src/kernel/orgdeepindtkpreference.hpp
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Paths that will be exclude from synchronize workflow
|
||||
# Please use relative path which use project directory as root
|
||||
# Notice that
|
||||
# * .git
|
||||
# * debian
|
||||
# * archlinux
|
||||
# * .obs
|
||||
# * .github
|
||||
# are always ignored
|
||||
linglong.yaml
|
||||
conanfile.py
|
||||
VERSION
|
||||
CHANGELOG.md
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [5.7.25] - 2025-10-30
|
||||
|
||||
### Changed
|
||||
|
||||
- Improve icon theme generation with scalable support
|
||||
|
||||
## [5.7.24] - 2025-10-16
|
||||
|
||||
### Added
|
||||
|
||||
- Support Qt 6.10
|
||||
|
||||
### Changed
|
||||
|
||||
- Improve icon size detection and duplicate handling
|
||||
|
||||
### Fixed
|
||||
|
||||
- Correct lockfile path construction
|
||||
- Fix Qt6 compilation error with libxdg
|
||||
|
||||
## [5.7.23] - 2025-09-25
|
||||
|
||||
### Fixed
|
||||
|
||||
- 解决控制中心闪烁问题
|
||||
- Fix build for Qt 6.9
|
||||
|
||||
## [5.7.22] - 2025-09-04
|
||||
|
||||
### Added
|
||||
|
||||
- Add T11 font size and adjust T5 default
|
||||
|
||||
### Fixed
|
||||
|
||||
- Improve PID namespace detection in setSingleInstance
|
||||
|
||||
## [5.7.21] - 2025-08-14
|
||||
|
||||
### Added
|
||||
|
||||
- Add flags parameter to DDciIconPlayer play method
|
||||
|
||||
### Fixed
|
||||
|
||||
- Resolve compilation warnings and deprecation issues
|
||||
|
||||
## [5.7.20] - 2025-07-31
|
||||
|
||||
### Added
|
||||
|
||||
- Add pid namespace isolation to setSingleInstance
|
||||
- Add concurrent processing for DCI icon conversion
|
||||
|
||||
### Changed
|
||||
|
||||
- Update REUSE license file for CHANGELOG
|
||||
- Move icon finder functionality to separate tool
|
||||
- Switch to QGuiApplication for SVG rendering
|
||||
|
||||
## [5.7.19] - 2025-07-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Enhance build security hardening
|
||||
|
||||
## [5.7.18] - 2025-06-27
|
||||
|
||||
### Fixed
|
||||
|
||||
- Make version parameter optional in release workflow
|
||||
|
||||
## [5.7.17] - 2025-06-19
|
||||
|
||||
### Added
|
||||
|
||||
- Add missing header
|
||||
- Fix: add missing prefix for QTranslator::load()
|
||||
|
||||
### Changed
|
||||
|
||||
- Chore: use another QTranslator::load overload to tidy code
|
||||
- Support VERSION file
|
||||
- Add auto release workflow
|
||||
- Update .syncexclude
|
||||
|
||||
[5.7.17]: https://github.com/linuxdeepin/dtkgui/compare/5.7.16..5.7.17
|
||||
|
||||
<!-- generated by git-cliff -->
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
cmake_minimum_required(VERSION 3.25)
|
||||
|
||||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DTK_FILE_VERSION)
|
||||
string(STRIP "${DTK_FILE_VERSION}" DTK_FILE_VERSION)
|
||||
set(DTK_VERSION "${DTK_FILE_VERSION}" CACHE STRING "define project version")
|
||||
project(DtkGui
|
||||
VERSION ${DTK_VERSION}
|
||||
DESCRIPTION "DTK Gui module"
|
||||
HOMEPAGE_URL "https://github.com/linuxdeepin/dtkgui"
|
||||
LANGUAGES CXX C
|
||||
)
|
||||
|
||||
if("${PROJECT_VERSION_MAJOR}" STREQUAL "5")
|
||||
set(QT_VERSION_MAJOR "5")
|
||||
elseif("${PROJECT_VERSION_MAJOR}" STREQUAL "6")
|
||||
set(QT_VERSION_MAJOR "6")
|
||||
set(DTK_VERSION_MAJOR "6")
|
||||
else()
|
||||
message(SEND_ERROR "not support Prject Version ${PROJECT_VERSION}.")
|
||||
endif()
|
||||
|
||||
include(dtkgui.cmake)
|
||||
965
LICENSE
965
LICENSE
|
|
@ -1,674 +1,305 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license document.
|
||||
|
||||
4. Combined Works.
|
||||
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
“This License” refers to version 3 of the GNU General Public License.
|
||||
|
||||
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
||||
|
||||
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
|
||||
|
||||
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
|
||||
|
||||
A “covered work” means either the unmodified Program or a work based on the Program.
|
||||
|
||||
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
|
||||
|
||||
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
|
||||
|
||||
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
|
||||
|
||||
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
|
||||
|
||||
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
|
||||
|
||||
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
|
||||
|
||||
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
|
||||
|
||||
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
|
||||
|
||||
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,156 @@
|
|||
Creative Commons Attribution 4.0 International
|
||||
|
||||
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
|
||||
|
||||
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
|
||||
|
||||
Creative Commons Attribution 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||
|
||||
Section 1 – Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||
|
||||
d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
|
||||
|
||||
i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 – Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
A. reproduce and Share the Licensed Material, in whole or in part; and
|
||||
|
||||
B. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section 6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
||||
|
||||
B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
|
||||
|
||||
Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified form), You must:
|
||||
|
||||
A. retain the following if it is supplied by the Licensor with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||
|
||||
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
||||
|
||||
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
|
||||
|
||||
Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
||||
|
||||
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
|
||||
|
||||
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
Section 6 – Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
||||
|
||||
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
||||
|
||||
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
Section 7 – Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
||||
|
||||
Section 8 – Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
||||
|
||||
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
|
|
@ -0,0 +1,304 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license document.
|
||||
|
||||
4. Combined Works.
|
||||
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
“This License” refers to version 3 of the GNU General Public License.
|
||||
|
||||
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
||||
|
||||
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
|
||||
|
||||
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
|
||||
|
||||
A “covered work” means either the unmodified Program or a work based on the Program.
|
||||
|
||||
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
|
||||
|
||||
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
|
||||
|
||||
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
|
||||
|
||||
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
|
||||
|
||||
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
|
||||
|
||||
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
|
||||
|
||||
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
|
||||
|
||||
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
|
||||
|
||||
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
54
README.md
54
README.md
|
|
@ -1,2 +1,52 @@
|
|||
### dtkgui
|
||||
Deepin Toolkit, gui module for DDE look and feel
|
||||
## Deepin Tool Kit Gui
|
||||
|
||||
Deepin Tool Kit (DtkGui) is the development graphical user interface of all C++/Qt Developer work on Deepin.
|
||||
|
||||
You should read the <a href=doc/Specification.md>Deepin Application Specification</a> firstly.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Build dependencies
|
||||
|
||||
* Qt >= 5.10
|
||||
|
||||
## Installation
|
||||
|
||||
### Build from source code
|
||||
|
||||
1. Make sure you have installed all dependencies.
|
||||
|
||||
2. Build:
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
```
|
||||
|
||||
3. Install:
|
||||
|
||||
```bash
|
||||
sudo make install
|
||||
```
|
||||
|
||||
## Getting help
|
||||
|
||||
Any usage issues can ask for help via
|
||||
|
||||
* [Telegram group](https://t.me/deepin)
|
||||
* [Matrix](https://matrix.to/#/#deepin-community:matrix.org)
|
||||
* [IRC (libera.chat)](https://web.libera.chat/#deepin-community)
|
||||
* [Forum](https://bbs.deepin.org)
|
||||
* [WiKi](https://wiki.deepin.org/)
|
||||
|
||||
## Getting involved
|
||||
|
||||
We encourage you to report issues and contribute changes
|
||||
|
||||
* [Contribution guide for developers](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en).
|
||||
|
||||
## License
|
||||
|
||||
deepin-tool-kit is licensed under [LGPL-3.0-or-later](LICENSE).
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
## Deepin Tool Kit Gui
|
||||
|
||||
Deepin Tool Kit Gui(DtkGui) 提供开发图形用户界面应用程序所需的功能.
|
||||
|
||||
您应该首先阅读 <a href=doc/Specification.md>Deepin应用程序规范</a>.
|
||||
|
||||
## 依赖
|
||||
|
||||
### 编译依赖
|
||||
|
||||
* Qt >= 5.10
|
||||
|
||||
## 安装
|
||||
|
||||
### 从源代码构建
|
||||
|
||||
1. 确保已经安装了所有的编译依赖.
|
||||
|
||||
2. 构建:
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
```
|
||||
|
||||
3. 安装:
|
||||
|
||||
```bash
|
||||
sudo make install
|
||||
```
|
||||
|
||||
## 帮助
|
||||
|
||||
任何使用问题都可以通过以下方式寻求帮助:
|
||||
|
||||
* [Telegram 群组](https://t.me/deepin)
|
||||
* [Matrix](https://matrix.to/#/#deepin-community:matrix.org)
|
||||
* [IRC (libera.chat)](https://web.libera.chat/#deepin-community)
|
||||
* [Forum](https://bbs.deepin.org)
|
||||
* [WiKi](https://wiki.deepin.org/)
|
||||
|
||||
## 参与贡献
|
||||
|
||||
我们鼓励您报告问题并作出更改
|
||||
|
||||
* [开发者代码贡献指南](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers)
|
||||
|
||||
## 协议
|
||||
|
||||
DTK工具包遵循协议 [LGPL-3.0-or-later](LICENSE).
|
||||
|
|
@ -0,0 +1 @@
|
|||
@version@
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# Maintainer: justforlxz <justforlxz@gmail.com>
|
||||
pkgname=dtkgui-git
|
||||
pkgver=5.7.25
|
||||
pkgrel=1
|
||||
sourcename=dtkgui
|
||||
sourcetars=("$sourcename"_"$pkgver".tar.xz)
|
||||
sourcedir="$sourcename"
|
||||
pkgdesc='Deepin Toolkit, gui module for DDE look and feel'
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/linuxdeepin/dtkgui"
|
||||
license=('LGPL3')
|
||||
depends=('dtkcore-git' 'dtkcommon-git' 'qt5-svg' 'libqtxdg' 'freeimage' 'librsvg' 'qt5-wayland')
|
||||
# INFO: you can disable freeimage not to support RAW images
|
||||
# Then set DTK_DISABLE_EX_IMAGE_FORMAT=OFF
|
||||
makedepends=('git' 'qt5-tools' 'gtest' 'gmock' 'ninja' 'cmake' 'doxygen' 'extra-cmake-modules')
|
||||
conflicts=('dtkgui')
|
||||
provides=('dtkgui')
|
||||
groups=('deepin-git')
|
||||
source=("${sourcetars[@]}")
|
||||
sha512sums=('SKIP')
|
||||
|
||||
|
||||
build() {
|
||||
cd $sourcedir
|
||||
cmake -GNinja \
|
||||
-DMKSPECS_INSTALL_DIR=lib/qt/mkspecs/modules/ \
|
||||
-DBUILD_DOCS=ON \
|
||||
-DQCH_INSTALL_DESTINATION=share/doc/qt \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
ninja
|
||||
# INFO: Another cmake option is DTK_DISABLE_EX_IMAGE_FORMAT
|
||||
# If you not want to support RAW images, set it to off
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $sourcedir
|
||||
DESTDIR="$pkgdir" ninja install
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
#
|
||||
# Try to find the FreeImage library and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# FreeImage_FOUND
|
||||
# FreeImage_INCLUDE_PATH
|
||||
# FreeImage_LIBRARY
|
||||
#
|
||||
|
||||
find_path(FreeImage_INCLUDE_DIR
|
||||
NAMES FreeImage.h
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
${CMAKE_INCLUDE_PATH}
|
||||
${CMAKE_INSTALL_PREFIX}/include)
|
||||
|
||||
find_library(FreeImage_LIBRARY
|
||||
NAMES FreeImage freeimage
|
||||
PATHS
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/local/lib64
|
||||
/usr/local/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
${CMAKE_INSTALL_PREFIX}/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(FreeImage
|
||||
FOUND_VAR FreeImage_FOUND
|
||||
REQUIRED_VARS
|
||||
FreeImage_LIBRARY
|
||||
FreeImage_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(FreeImage_FOUND)
|
||||
set(FreeImage_LIBRARIES ${FreeImage_LIBRARY})
|
||||
set(FreeImage_INCLUDE_DIRS ${FreeImage_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(FreeImage_FOUND AND NOT TARGET FreeImage::FreeImage)
|
||||
add_library(FreeImage::FreeImage UNKNOWN IMPORTED)
|
||||
set_target_properties(FreeImage::FreeImage PROPERTIES
|
||||
IMPORTED_LOCATION "${FreeImage_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FreeImage_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
FreeImage_INCLUDE_DIR
|
||||
FreeImage_LIBRARY
|
||||
)
|
||||
|
|
@ -1,3 +1,445 @@
|
|||
dtkgui (5.7.25) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.25
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Thu, 30 Oct 2025 21:47:33 +0800
|
||||
|
||||
dtkgui (5.7.24) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.24
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Thu, 16 Oct 2025 19:45:30 +0800
|
||||
|
||||
dtkgui (5.7.23) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.23
|
||||
|
||||
-- yeshanshan <packages@deepin.org> Thu, 25 Sep 2025 16:49:18 +0800
|
||||
|
||||
dtkgui (5.7.22) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.22
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Thu, 04 Sep 2025 19:27:38 +0800
|
||||
|
||||
dtkgui (5.7.21) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.21
|
||||
|
||||
-- yeshanshan <packages@deepin.org> Thu, 14 Aug 2025 19:47:40 +0800
|
||||
|
||||
dtkgui (5.7.20) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.20
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Thu, 31 Jul 2025 19:59:35 +0800
|
||||
|
||||
dtkgui (5.7.19) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.19
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Thu, 03 Jul 2025 21:12:27 +0800
|
||||
|
||||
dtkgui (5.7.18) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.18
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Fri, 27 Jun 2025 17:09:35 +0800
|
||||
|
||||
dtkgui (5.7.17) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.17
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Thu, 19 Jun 2025 10:03:48 +0800
|
||||
|
||||
dtkgui (5.7.16) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.16
|
||||
|
||||
-- YeShanShan <yeshanshan@uniontech.com> Mon, 19 May 2025 17:21:59 +0800
|
||||
|
||||
dtkgui (5.7.15) unstable; urgency=medium
|
||||
|
||||
* fix: correct bitwise operation in preference handling
|
||||
* fix: prevent theme saving when DontSaveApplicationTheme is set
|
||||
* refactor: improve thread safety in OrgDeepinDTKPreference
|
||||
* fix: build failed in qt5
|
||||
* feat: use dconfig2cpp for read/write the DConfig
|
||||
* fix: fix build on Qt 6.8
|
||||
|
||||
-- YeShanShan <yeshanshan@uniontech.com> Thu, 08 May 2025 17:53:09 +0800
|
||||
|
||||
dtkgui (5.7.14) unstable; urgency=medium
|
||||
|
||||
* build: compiling failed with Qt 6.9
|
||||
|
||||
-- YeShanShan <yeshanshan@uniontech.com> Thu, 17 Apr 2025 21:51:32 +0800
|
||||
|
||||
dtkgui (5.7.13) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.13
|
||||
|
||||
-- YeShanShan <yeshanshan@uniontech.com> Thu, 20 Mar 2025 17:05:55 +0800
|
||||
|
||||
dtkgui (5.7.12) unstable; urgency=medium
|
||||
|
||||
* fix: palette refresh delayed in qt6
|
||||
* feat: Add files generated by qdbusXML2cpp and DCONG2cpp
|
||||
|
||||
-- YeShanShan <yeshanshan@uniontech.com> Thu, 06 Mar 2025 17:29:35 +0800
|
||||
|
||||
dtkgui (5.7.11) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.11
|
||||
|
||||
-- YeShanShan <yeshanshan@uniontech.com> Thu, 27 Feb 2025 20:47:39 +0800
|
||||
|
||||
dtkgui (5.7.10) unstable; urgency=medium
|
||||
|
||||
* fix: icon is blurry
|
||||
|
||||
-- YeShanShan <yeshanshan@uniontech.com> Thu, 13 Feb 2025 17:18:19 +0800
|
||||
|
||||
dtkgui (5.7.9) unstable; urgency=medium
|
||||
|
||||
[ root ]
|
||||
* UNRELEASED
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Thu, 23 Jan 2025 09:07:08 +0000
|
||||
|
||||
dtkgui (5.7.8) unstable; urgency=medium
|
||||
|
||||
* fix: missing window decoration for treeland
|
||||
* chore: update default window corner size
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Tue, 14 Jan 2025 11:17:31 +0000
|
||||
|
||||
dtkgui (5.7.7) unstable; urgency=medium
|
||||
|
||||
* fix: accessing wild pointer in qt6
|
||||
* chore: correct typos about Dtk::Gui::DDciIcon::IconAttribute
|
||||
Thanks to Felix Yan
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Thu, 09 Jan 2025 09:28:38 +0000
|
||||
|
||||
dtkgui (5.7.6) unstable; urgency=medium
|
||||
|
||||
* refact: refacting DPlatformHandle to adap treeland
|
||||
* Revert "refact: refacting DPlatformHandle to adap treeland"
|
||||
* refact: refacting DPlatformHandle to adapt treeland
|
||||
* fix: iterator out of bounds for dciicon
|
||||
* fix: set font family invalid
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Thu, 02 Jan 2025 05:43:53 +0000
|
||||
|
||||
dtkgui (5.7.5) unstable; urgency=medium
|
||||
|
||||
* fix: availableSizes not work on Qt6
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Thu, 12 Dec 2024 03:03:53 +0000
|
||||
|
||||
dtkgui (5.7.4) unstable; urgency=medium
|
||||
|
||||
* chore(CI): add debian check workflow
|
||||
Thanks to kuchune
|
||||
* refactor: xcb platform theme interface
|
||||
* refactor: treeland platform theme interface 扩展Treeland的个性化接口
|
||||
* fix: Possible null pointer dereference and Notitlebar input parameter error
|
||||
* feat: support treeland platform for wmHelper
|
||||
* fix: blur is invalid for treeland
|
||||
* feat: Limit maximum and minimum fonts
|
||||
* fix: app crashed when window destroyed in quick
|
||||
* fix: app crashed when window destroyed in quick
|
||||
* fix: linglong app load qt translations failed
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Tue, 03 Dec 2024 02:00:46 +0000
|
||||
|
||||
dtkgui (5.7.3) unstable; urgency=medium
|
||||
|
||||
* fix: No judgment on the validity of the protocol(Bug: 286859)
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Wed, 20 Nov 2024 02:19:06 +0000
|
||||
|
||||
dtkgui (5.7.2) unstable; urgency=medium
|
||||
|
||||
* chore: Correct the name of TreelandProtocols package in cmake
|
||||
* fix: Under treeland, the dialog has not disabled titlebar
|
||||
* fix: Print "load translate" debug log to channels(Bug: 284539)
|
||||
* chore: add IsWaylandPlatform attribute
|
||||
* chore: highlight color is inconsistency
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Wed, 13 Nov 2024 01:53:26 +0000
|
||||
|
||||
dtkgui (5.7.1) unstable; urgency=medium
|
||||
|
||||
* Revert "feat: add close.dci"(Issue: https://github.com/linuxdeepin/developer-center/issues/10482)
|
||||
* feat: Add notitlebar function on wayland platform
|
||||
* feat: support qt5 and qt6
|
||||
* fix: cannot move window on wayland
|
||||
* fix: remove treeland personalization protocols useless function
|
||||
* feat: add fixme note
|
||||
* chore: update license info
|
||||
* chore: add build dep
|
||||
* chore: update license
|
||||
* chore: add extra cmake modules
|
||||
* chore: add dtkgui namespace
|
||||
* fix: app crashed in x11
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Wed, 16 Oct 2024 03:30:46 +0000
|
||||
|
||||
dtkgui (5.6.34) unstable; urgency=medium
|
||||
|
||||
* feat: add close.dci
|
||||
Thanks to Yixue Wang
|
||||
* chore: animation-dci supports custom icon
|
||||
* fix: wrong judgment conditions
|
||||
* feat: support to change window effects(Bug: 244347)
|
||||
* feat: add window startup effect Type(Issue: https://github.com/linuxdeepin/developer-center/issues/10322)
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Tue, 20 Aug 2024 05:03:52 +0000
|
||||
|
||||
dtkgui (5.6.32) unstable; urgency=medium
|
||||
|
||||
* Revert "fix: jagged edges on ddciicon"(Issue: https://github.com/linuxdeepin/developer-center/issues/9443)
|
||||
* chore: dci-icon-theme tool tweak
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Mon, 08 Jul 2024 02:29:21 +0000
|
||||
|
||||
dtkgui (5.6.31) unstable; urgency=medium
|
||||
|
||||
* fix: jagged edges on ddciicon(Issue: https://github.com/linuxdeepin/developer-center/issues/8691)
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Thu, 27 Jun 2024 09:11:34 +0000
|
||||
|
||||
dtkgui (5.6.30) unstable; urgency=medium
|
||||
|
||||
[ root ]
|
||||
* UNRELEASED
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Thu, 30 May 2024 02:46:31 +0000
|
||||
|
||||
dtkgui (5.6.29) unstable; urgency=medium
|
||||
|
||||
[ root ]
|
||||
* UNRELEASED
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Mon, 13 May 2024 03:02:53 +0000
|
||||
|
||||
dtkgui (5.6.28) unstable; urgency=medium
|
||||
|
||||
* chore: insert to cache when icon is not null
|
||||
* chore: add flag to disable noncache flag
|
||||
* fix: missing initialization for baseFont of fontManager(Issue: https://github.com/linuxdeepin/developer-center/issues/8040)
|
||||
* feat: dci-icon-theme support multiple icon size
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Mon, 29 Apr 2024 08:23:44 +0000
|
||||
|
||||
dtkgui (5.6.27) unstable; urgency=medium
|
||||
|
||||
* fix: setWindowBlurAreaByWM only work once in qt6
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Fri, 19 Apr 2024 08:55:34 +0000
|
||||
|
||||
dtkgui (5.6.26) unstable; urgency=medium
|
||||
|
||||
* fix: wrong availableSizes for DIconProxyEngine
|
||||
* fix: PlaceholderText color tweak(Issue: https://github.com/linuxdeepin/developer-center/issues/7554)
|
||||
* feat: support to get specified palette
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Tue, 26 Mar 2024 05:47:35 +0000
|
||||
|
||||
dtkgui (5.6.25) unstable; urgency=medium
|
||||
|
||||
* fix: icon doesn't update when iconTheme changed
|
||||
* fix: font can't follow changes in qt6
|
||||
* fix: app refresh slowly
|
||||
* fix: changed paletteType's config value
|
||||
* fix: search icon can't change with theme change(Issue: #6230)
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Mon, 11 Mar 2024 01:16:27 +0000
|
||||
|
||||
dtkgui (5.6.22) unstable; urgency=medium
|
||||
|
||||
* fix: menu icon incorrect in dark mode(Issue: https://github.com/linuxdeepin/developer-center/issues/6624)
|
||||
* feat: enable xdgIconLoader under Qt6
|
||||
* chore: warning for connect
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Wed, 10 Jan 2024 02:30:59 +0000
|
||||
|
||||
dtkgui (5.6.21) unstable; urgency=medium
|
||||
|
||||
* chore: update cmake version
|
||||
* fix: xdg icon loading failed with qt6(Issue: https://github.com/linuxdeepin/developer-center/issues/6459)
|
||||
* fix: debian build failed
|
||||
* fix: DIconProxyEngine read not ensureEngine
|
||||
* chore: fix ut_dciiconengine failed on dark theme
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Tue, 09 Jan 2024 01:45:43 +0000
|
||||
|
||||
dtkgui (5.6.20) unstable; urgency=medium
|
||||
|
||||
* chore: add synchronization workflow
|
||||
* fix: indirect inclusion of QSharedPointer
|
||||
* feat: move ddesktopservices to dtkgui(Issue: #134)
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Tue, 28 Nov 2023 05:40:52 +0000
|
||||
|
||||
dtkgui (5.6.19) unstable; urgency=medium
|
||||
|
||||
[ root ]
|
||||
* UNRELEASED
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Mon, 23 Oct 2023 07:33:18 +0000
|
||||
|
||||
dtkgui (5.6.18) unstable; urgency=medium
|
||||
|
||||
* fix: Wrong value of DPalette::TextLively
|
||||
* chore: find qhelpgenerator from property
|
||||
* fix: svg with filter attribute rendering exception
|
||||
* fix: when iconName is absolute path
|
||||
* fix: missing link when disable librsvg
|
||||
* fix: Wrong IconName for DIconEngine(Issue: https://github.com/linuxdeepin/developer-center/issues/5760)
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Wed, 18 Oct 2023 06:01:44 +0000
|
||||
|
||||
dtkgui (5.6.17) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.17
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Fri, 08 Sep 2023 15:15:39 +0800
|
||||
|
||||
dtkgui (5.6.16) unstable; urgency=medium
|
||||
|
||||
* chore: ut build without source
|
||||
* fix: Compiling error in qt6.4
|
||||
* chore: add DtkBuildHelper depends
|
||||
* fix(build): ut failed on Qt6.4
|
||||
* fix: dci icon cache key miss theme name(Issue: https://github.com/linuxdeepin/developer-center/issues/4517)
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Tue, 22 Aug 2023 06:13:45 +0000
|
||||
|
||||
dtkgui (5.6.15) unstable; urgency=medium
|
||||
|
||||
* chore: iconengine tweak and uint test
|
||||
* chore: do not show ui in ut
|
||||
* chore: add unit test
|
||||
* chore: Adaptation for Qt5.11
|
||||
* refator: rewrite hasUserManual function
|
||||
|
||||
-- Yixue Wang <wangyixue@deepin.org> Fri, 11 Aug 2023 13:57:02 +0800
|
||||
|
||||
dtkgui (5.6.14) unstable; urgency=medium
|
||||
|
||||
* chore: ignore doxygen-theme folder
|
||||
Thanks to syn(Task: 99)
|
||||
* chore: change OUTPUT_DIR variable in cmake (#163)
|
||||
Thanks to WangFei
|
||||
* chore: adjust builtiniconengine (#164)
|
||||
Thanks to WangFei
|
||||
* chore: adjust xdgiconproxyengine (#167)
|
||||
Thanks to WangFei
|
||||
* chore: add unit test about builtinengine
|
||||
* refactor!: deprecate some interfaces in dtk6
|
||||
* chore: add dciiconengine
|
||||
* chore: adjust icontheme
|
||||
* chore: add unit test about dciiconengine
|
||||
* chore: reduce compilation warnings
|
||||
Thanks to SPUER(Issue: #96)
|
||||
* chore: Sync by https://github.com/linuxdeepin/.github/commit/559e91167d4919644f37bbcf123eb0651c1528ea(Influence: none)
|
||||
* chore: add proxyiconengine
|
||||
* refactor: Move dotsPerInch from normal function to slots
|
||||
* chore: remove unused pro files
|
||||
* fix: build failed in qt6 due to proxyengine
|
||||
* feat: DIconTheme::findQIcon add fallback icon
|
||||
* fix(build): DIconTheme ut failed
|
||||
* fix: DFileDragClient::serverDestroyed nerver emit
|
||||
* feat: add helper for high dpi pixmap
|
||||
* fix: dplatformtheme fetchPalette crash
|
||||
* feat: load app and qt Translation files
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Thu, 27 Jul 2023 06:56:34 +0000
|
||||
|
||||
dtkgui (5.6.12) unstable; urgency=medium
|
||||
|
||||
* chore: Sync by https://github.com/linuxdeepin/.github/commit/2e5e092ba3f86b16d1aabbabcf0bfd2ae65b19c8(Influence: none)
|
||||
* fix: fix build failure due to metasystem change
|
||||
* fix(build): suport build with Qt6 && Qt5
|
||||
* chore: Adapt Qt6 && Dtk6 compilation
|
||||
* fix: ut failed
|
||||
* chore: update dconfig appid
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Sun, 25 Jun 2023 14:43:42 +0800
|
||||
|
||||
dtkgui (5.6.11) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.11
|
||||
* Fix developer-center#4117
|
||||
* Fix bug-197713(App blocked by hasUserManual in live system)
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Mon, 08 May 2023 13:16:17 +0800
|
||||
|
||||
dtkgui (5.6.10) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.10
|
||||
* support XDG_SESSION_DESKTOP set to DDE
|
||||
* add DontSaveApplciationTheme Attribute
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Mon, 17 Apr 2023 17:11:55 +0800
|
||||
|
||||
dtkgui (5.6.9) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.9
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Mon, 03 Apr 2023 10:13:06 +0800
|
||||
|
||||
dtkgui (5.6.8) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.8
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Wed, 22 Feb 2023 14:12:16 +0800
|
||||
|
||||
dtkgui (5.6.6) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.6
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Tue, 21 Feb 2023 11:46:51 +0800
|
||||
|
||||
dtkgui (5.6.5) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.5
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Thu, 02 Feb 2023 14:12:15 +0800
|
||||
|
||||
dtkgui (5.6.4) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.4
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Mon, 09 Jan 2023 13:28:09 +0800
|
||||
|
||||
dtkgui (5.6.3) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.3
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Mon, 12 Dec 2022 14:44:49 +0800
|
||||
|
||||
dtkgui (5.6.2.2) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.2.2
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Wed, 30 Nov 2022 10:32:07 +0800
|
||||
|
||||
dtkgui (5.6.1.1) unstable; urgency=medium
|
||||
|
||||
* snipe release 5.6.1.1
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Wed, 22 Jun 2022 14:33:59 +0800
|
||||
|
||||
dtkgui (5.6.0.1) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.0.1
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Tue, 14 Jun 2022 10:51:30 +0800
|
||||
|
||||
dtkgui (5.0.0) unstable; urgency=medium
|
||||
|
||||
* Release 5.0.0
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
9
|
||||
|
|
@ -2,14 +2,17 @@ Source: dtkgui
|
|||
Section: libdevel
|
||||
Priority: optional
|
||||
Maintainer: Deepin Packages Builder <packages@deepin.com>
|
||||
Build-Depends: debhelper (>= 9), pkg-config,
|
||||
qtbase5-private-dev,
|
||||
libdtkcore-dev
|
||||
Build-Depends: debhelper-compat (= 12), pkg-config,
|
||||
qtbase5-private-dev, qtbase5-dev-tools, doxygen, graphviz, qttools5-dev,
|
||||
libdtkcore-dev, librsvg2-dev, libfreeimage-dev, libraw-dev, libgtest-dev, libgmock-dev,
|
||||
libqt5xdg-dev, libqt5xdgiconloader-dev, cmake, qt5-image-formats-plugins, libqt5waylandclient5-dev,
|
||||
extra-cmake-modules, qtwayland5-dev-tools, qtwayland5-private-dev, libkf5wayland-dev, treeland-protocols
|
||||
Standards-Version: 3.9.8
|
||||
|
||||
Package: libdtkgui5
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkdata,
|
||||
qt5-image-formats-plugins
|
||||
Multi-Arch: same
|
||||
Description: Deepin Tool Kit Gui library
|
||||
DtkGui is base library of Deepin Qt/C++ applications.
|
||||
|
|
@ -27,8 +30,17 @@ Description: Deepin Tool Kit Gui Utilities
|
|||
|
||||
Package: libdtkgui-dev
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkgui5( =${binary:Version})
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkgui5( =${binary:Version}), libdtkcommon-dev(>=5.6.16)
|
||||
Description: Deepin Tool Kit Gui Devel library
|
||||
DtkGui is base devel library of Deepin Qt/C++ applications.
|
||||
.
|
||||
This package contains the header files and static libraries of DtkGui
|
||||
|
||||
Package: libdtkgui-doc
|
||||
Build-Profiles: <!nodoc>
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}
|
||||
Description: Deepin Tool Kit Gui (Document)
|
||||
DtkGui is base devel library of Deepin Qt/C++ applications.
|
||||
.
|
||||
This package contains the qt Document of DtkGui
|
||||
|
|
|
|||
|
|
@ -3,20 +3,20 @@ Upstream-Name: dtkgui
|
|||
Source: https://github.com/linuxdeepin/dtkgui
|
||||
|
||||
Files: *
|
||||
Copyright: 2019 Deepin Technology Co., Ltd.
|
||||
License: GPL-3+
|
||||
Copyright: 2022 Uniontech Software Technology Co., Ltd.
|
||||
License: LGPL-3+
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
||||
On Debian systems, the complete text of the GNU Lesser General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3".
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
usr/share/qt5/doc/dtkgui.qch
|
||||
|
|
@ -1 +1 @@
|
|||
usr/lib/*/*/DGui/bin/*
|
||||
usr/*/*/DGui/bin/*
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
usr/lib/*/lib*.so.*
|
||||
#usr/share/dsg/*/*
|
||||
|
|
|
|||
|
|
@ -3,29 +3,30 @@ DPKG_EXPORT_BUILDFLAGS = 1
|
|||
include /usr/share/dpkg/default.mk
|
||||
export QT_SELECT = qt5
|
||||
|
||||
# 安全编译参数
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
export DEB_CFLAGS_MAINT_APPEND = -Wall
|
||||
export DEB_CXXFLAGS_MAINT_APPEND = -Wall
|
||||
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-E
|
||||
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
|
||||
ifneq (,$(wildcard .git/config))
|
||||
CONFIG_VERSION=
|
||||
else
|
||||
VERSION = $(DEB_VERSION_UPSTREAM)
|
||||
_PACK_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$1}')
|
||||
_BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g')
|
||||
_BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g' | awk '{print int($$1)}')
|
||||
ifeq ($(_BUILD_VER),)
|
||||
CONFIG_VERSION = $(_PACK_VER)
|
||||
else
|
||||
CONFIG_VERSION = $(_PACK_VER).$(_BUILD_VER)
|
||||
endif
|
||||
endif
|
||||
|
||||
%:
|
||||
dh $@ --parallel
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) VERSION=$(CONFIG_VERSION)
|
||||
|
||||
override_dh_auto_test:
|
||||
echo "skip auto test"
|
||||
dh_auto_configure -- -DBUILD_TESTING=OFF -DBUILD_DOCS=ON -DDTK_VERSION=$(_PACK_VER)
|
||||
#override_dh_auto_test:
|
||||
# echo "skip auto test"
|
||||
|
||||
override_dh_makeshlibs:
|
||||
dh_makeshlibs -V
|
||||
dh_makeshlibs -V "libdtkgui5 (>= $(shell echo $(VERSION) | cut -d '.' -f 1,2))"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.0 (quilt)
|
||||
3.0 (native)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,89 @@
|
|||
cmake_minimum_required (VERSION 3.10)
|
||||
|
||||
find_package (Doxygen REQUIRED)
|
||||
|
||||
set (QCH_INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/qt${QT_VERSION_MAJOR}/doc CACHE STRING "QCH install location")
|
||||
|
||||
set (DOXYGEN_GENERATE_HTML "YES" CACHE STRING "Doxygen HTML output")
|
||||
set (DOXYGEN_GENERATE_XML "YES" CACHE STRING "Doxygen XML output")
|
||||
set (DOXYGEN_GENERATE_QHP "YES" CACHE STRING "Doxygen QHP output")
|
||||
set (DOXYGEN_FILE_PATTERNS *.cpp *.h *.zh_CN.md *.zh_CN.dox CACHE STRING "Doxygen File Patterns")
|
||||
set (DOXYGEN_PROJECT_NUMBER ${CMAKE_PROJECT_VERSION} CACHE STRING "") # Should be the same as this project is using.
|
||||
set (DOXYGEN_EXTRACT_STATIC YES)
|
||||
set (DOXYGEN_OUTPUT_LANGUAGE "Chinese" CACHE STRING "Doxygen Output Language")
|
||||
set (DOXYGEN_IMAGE_PATH ${CMAKE_CURRENT_LIST_DIR}/images/)
|
||||
set (DOXYGEN_QHP_NAMESPACE "org.deepin.dtk.gui")
|
||||
set (DOXYGEN_QCH_FILE "dtkgui.qch")
|
||||
set (DOXYGEN_QHP_VIRTUAL_FOLDER "dtkgui")
|
||||
set (DOXYGEN_HTML_EXTRA_STYLESHEET "" CACHE STRING "Doxygen custom stylesheet for HTML output")
|
||||
set (DOXYGEN_TAGFILES "qtcore.tags=qthelp://org.qt-project.qtcore/qtcore/" CACHE STRING "Doxygen tag files")
|
||||
|
||||
# find from cmake target property
|
||||
if("${QT_VERSION_MAJOR}" STREQUAL "5")
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Help)
|
||||
else()
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ToolsTools)
|
||||
endif()
|
||||
get_target_property(_qhelpgenerator_location Qt${QT_VERSION_MAJOR}::qhelpgenerator IMPORTED_LOCATION)
|
||||
if("${_qhelpgenerator_location}" STREQUAL "")
|
||||
set(_qhelpgenerator_location "qhelpgenerator")
|
||||
endif()
|
||||
set (DOXYGEN_QHG_LOCATION ${_qhelpgenerator_location} CACHE STRING "Doxygen QHG path")
|
||||
|
||||
set (DOXYGEN_PREDEFINED
|
||||
"D_DECL_DEPRECATED_X(x)="
|
||||
"DCORE_BEGIN_NAMESPACE=namespace Dtk { namespace Core {"
|
||||
"DCORE_END_NAMESPACE=}}"
|
||||
"DCORE_USE_NAMESPACE=using namespace Dtk::Core\;"
|
||||
"DGUI_BEGIN_NAMESPACE=namespace Dtk { namespace Gui {"
|
||||
"DGUI_END_NAMESPACE=}}"
|
||||
"DGUI_USE_NAMESPACE=using namespace Dtk::Gui\;"
|
||||
)
|
||||
|
||||
set (BUILD_THEME OFF CACHE BOOL "Build doxgen theme")
|
||||
if(BUILD_THEME)
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/doxygen-theme")
|
||||
message(STATUS "doxygen-theme exists")
|
||||
else()
|
||||
execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
TIMEOUT 60
|
||||
)
|
||||
execute_process(COMMAND bash themesetting.sh
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/doxygen-theme/
|
||||
)
|
||||
endif()
|
||||
set (DOXYGEN_HTML_EXTRA_STYLESHEET "docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome.css"
|
||||
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-sidebar-only.css"
|
||||
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css"
|
||||
)
|
||||
set (DOXYGEN_HTML_EXTRA_FILES "docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js"
|
||||
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js"
|
||||
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-paragraph-link.js"
|
||||
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-interactive-toc.js"
|
||||
)
|
||||
set (DOXYGEN_GENERATE_TREEVIEW "YES")
|
||||
set (DOXYGEN_DISABLE_INDEX "NO")
|
||||
set (DOXYGEN_FULL_SIDEBAR "NO")
|
||||
set (DOXYGEN_HTML_HEADER "docs/doxygen-theme/doxygen-awesome-css/header.html")
|
||||
set (DOXYGEN_HTML_FOOTER "docs/doxygen-theme/doxygen-awesome-css/footer.html")
|
||||
endif()
|
||||
|
||||
set (DOXYGEN_MACRO_EXPANSION "YES")
|
||||
set (DOXYGEN_EXPAND_ONLY_PREDEF "YES")
|
||||
|
||||
# Exclude private classes.
|
||||
set (DOXYGEN_EXCLUDE_PATTERNS
|
||||
${PROJECT_SOURCE_DIR}/src/util/private/dimagehandlerlibs_p.h
|
||||
${PROJECT_SOURCE_DIR}/src/util/dimagehandlerlibs.cpp
|
||||
)
|
||||
|
||||
doxygen_add_docs (doxygen
|
||||
${PROJECT_SOURCE_DIR}/src
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/docs
|
||||
ALL
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMENT "Generate documentation via Doxygen"
|
||||
)
|
||||
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/html/dtkgui.qch DESTINATION ${QCH_INSTALL_DESTINATION})
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -0,0 +1,104 @@
|
|||
/*!
|
||||
@~chinese
|
||||
@file dpalette.h
|
||||
@ingroup palette
|
||||
@brief DPalette提供了调色板相关操作
|
||||
@sa [qpalette](https://doc.qt.io/qt-6/qpalette.html)
|
||||
|
||||
@class Dtk::Gui::DPalette
|
||||
@brief DPalette继承并且扩展了 QPalette 类, 提供了dtk特有的特性.
|
||||
|
||||
@enum Dtk::Gui::DPalette::ColorType
|
||||
DPalette::ColorType 定义了 DPalette 颜色类型
|
||||
@details
|
||||
| **键** | **值** | **含义** |
|
||||
|:-----------------:|:-----:|:-------------------------------------------------:|
|
||||
| NoType | 0 | 无类型 |
|
||||
| ItemBackground | 1 | 列表项的背景色 |
|
||||
| TextTitle | 2 | 标题型文本的颜色 |
|
||||
| TextTips | 3 | 提示性文本的颜色 |
|
||||
| TextWarning | 4 | 警告类型的文本颜色 |
|
||||
| TextLively | 5 | 活跃式文本颜色(不受活动色影响) |
|
||||
| LightLively | 6 | 活跃式按钮(recommend button)背景色中的亮色(不受活跃色影响) |
|
||||
| DarkLively | 7 | 活跃式按钮(recommend button)背景色中的暗色,会从亮色渐变到暗色(不受活跃色影响) |
|
||||
| FrameBorder | 8 | 控件边框颜色 |
|
||||
| PlaceholderText | 9 | 占位类型的文本颜色,可用于输入框占位内容等提示性文字 |
|
||||
| FrameShadowBorder | 10 | 用于跟阴影叠加的边框颜色 |
|
||||
| ObviousBackground | 11 | 明显的背景色 |
|
||||
| NColorTypes | 12 | 无颜色类型 |
|
||||
|
||||
@fn Dtk::Gui::DPalette::DPalette()
|
||||
@brief 构造一个 DPalette 对象
|
||||
|
||||
@fn Dtk::Gui::DPalette::DPalette(const DPalette &palette)
|
||||
@brief 构造一个 DPalette 对象
|
||||
@param[in] palette 要复制的 DPalette 对象
|
||||
|
||||
@fn Dtk::Gui::DPalette::DPalette(const QPalette &palette)
|
||||
@brief 构造一个 DPalette 对象
|
||||
@param[in] palette 要复制的 QPalette 对象
|
||||
|
||||
@fn const QColor Dtk::Gui::DPalette::clore(ColorGroup cg, ColorType ct) const
|
||||
@brief 获取指定颜色组和颜色类型的颜色
|
||||
@param[in] cg 颜色组
|
||||
@param[in] ct 颜色类型
|
||||
|
||||
@fn void Dtk::Gui::DPalette::brush(ColorGroup cg, ColorType ct, const QColor &color)
|
||||
@brief 设置指定颜色组和颜色类型的笔刷
|
||||
@param[in] cg 颜色组
|
||||
@param[in] ct 颜色类型
|
||||
@param[in] color 颜色
|
||||
|
||||
@fn void Dtk::Gui::DPalette::setColor(ColorGroup cg, ColorType ct, const QColor &color)
|
||||
@brief 设置指定颜色组和颜色类型的颜色
|
||||
@param[in] cg 颜色组
|
||||
@param[in] ct 颜色类型
|
||||
@param[in] color 颜色
|
||||
|
||||
@fn void Dtk::Gui::DPalette::setColor(ColorType ct, const QColor &color)
|
||||
@brief 设置指定颜色类型的颜色
|
||||
@param[in] ct 颜色类型
|
||||
@param[in] color 颜色
|
||||
|
||||
@fn void Dtk::Gui::DPalette::setBrush(ColorType ct, const QBrush &brush)
|
||||
@brief 设置指定颜色类型的笔刷
|
||||
@param[in] ct 颜色类型
|
||||
@param[in] brush 笔刷
|
||||
|
||||
@fn void Dtk::Gui::DPalette::setBrush(ColorGroup cg, ColorType ct, const QBrush &brush)
|
||||
@brief 设置指定颜色组和颜色类型的笔刷
|
||||
@param[in] cg 颜色组
|
||||
@param[in] ct 颜色类型
|
||||
@param[in] brush 笔刷
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::itemBackground() const
|
||||
@brief 获取列表项的背景色
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::textTitle() const
|
||||
@brief 获取标题型文本的颜色
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::textTips() const
|
||||
@brief 获取提示性文本的颜色
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::textWarning() const
|
||||
@brief 获取警告类型的文本颜色
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::textLively() const
|
||||
@brief 获取活跃式文本颜色(不受活动色影响)
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::lightLively() const
|
||||
@brief 获取活跃式按钮(recommend button)背景色中的亮色,会从暗色渐变到亮色(不受活跃色影响)
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::darkLively() const
|
||||
@brief 获取活跃式按钮(recommend button)背景色中的暗色,会从暗色渐变到亮色(不受活跃色影响)
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::frameBorder() const
|
||||
@brief 获取边框颜色
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::placeholderText() const
|
||||
@brief 获取占位符文本颜色
|
||||
|
||||
@fn const QBrush & Dtk::Gui::DPalette::frameShadowBorder() const
|
||||
@brief 获取阴影边框颜色
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
@page kernel kernel--dtkgui核心组件
|
||||
|
||||
# Dtk-Gui kernel
|
||||
|
||||
TODO:添加组件说明
|
||||
|
||||
|
||||
@defgroup palette
|
||||
@brief 调色板工具
|
||||
@details
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*!
|
||||
@~chinese
|
||||
@file dguiapplicationhelper.h
|
||||
|
||||
@class Dtk::Gui::DGuiApplicationHelper
|
||||
@ingroup dtkgui
|
||||
@brief DGuiApplicationHelper类提供了一个gui应用程序的应用帮助类,可提供widget和declarative的
|
||||
公共gui功能,例如调色板、字体、主题等功能。
|
||||
@details
|
||||
|
||||
@enum Dtk::Gui::DGuiApplicationHelper::SizeMode
|
||||
@brief 控件大小模式枚举包含 dtk支持的控件大小模式种类.
|
||||
| **值** | **含义** |
|
||||
|:-----------:|:---------------------:|
|
||||
| NormalMode | 普通模式,为默认模式 |
|
||||
| CompactMode | 紧凑模式 |
|
||||
|
||||
@fn void DGuiApplicationHelper::newProcessInstance(qint64 pid, const QStringList &arguments)
|
||||
@brief 通知新进程的信息。
|
||||
@details
|
||||
单例程序情况下,尝试启动新的程序实例将触发此信号,以便获取所传入的参数列表等信息,来进行进一步处理。
|
||||
|
||||
@param pid 进程 ID.
|
||||
@param arguments 启动进程时所传入的参数列表.
|
||||
|
||||
@fn DGuiApplicationHelper::SizeMode DGuiApplicationHelper::sizeMode() const
|
||||
@brief 当前应用的控件大小模式。
|
||||
@details
|
||||
- 若应用没有设置控件大小模式,则跟随系统的控件大小模式
|
||||
- 用户也可以设置环境变量 D_DTK_SIZEMODE 来影响应用的大小模式的支持,`D_DTK_SIZEMODE=1`为指定为普通模式,
|
||||
当应用没有显示设置控件大小模式,则会采用普通模式。
|
||||
- 优先级为 `DGuiApplicationHelper::setSizeMode` > `D_DTK_SIZEMODE` > `System's SizeMode`。
|
||||
|
||||
@fn void DGuiApplicationHelper::setSizeMode(const DGuiApplicationHelper::SizeMode sizeMode)
|
||||
@brief 设置应用控件大小模式,应用使用的为此模式,不再响应系统的控件大小模式。
|
||||
@param sizeMode 需要设置的控件大小模式.
|
||||
|
||||
@fn void DGuiApplicationHelper::resetSizeMode()
|
||||
@brief 重置设置应用控件大小模式,跟随系统的控件大小模式。
|
||||
|
||||
@fn static inline bool DGuiApplicationHelper::isCompactMode()
|
||||
@brief 当前控件大小模式是否为紧凑模式。
|
||||
|
||||
@fn void DGuiApplicationHelper::applicationPaletteChanged()
|
||||
@brief 通知调色板对象的改变。
|
||||
@sa windowPalette()
|
||||
|
||||
@fn void DGuiApplicationHelper::sizeModeChanged(DGuiApplicationHelper::SizeMode sizeMode)
|
||||
@brief 通知控件大小模式发生改变。
|
||||
|
||||
@fn static QStringList DGuiApplicationHelper::userManualPaths(const QString &appName)
|
||||
@brief 获取帮助手册已存在目录
|
||||
@param appName 目标应用名称
|
||||
@detail 目录深度具体到appName层级,例:一个典型的目录路径为:/usr/share/deepin-manual/manual-assets/application/appName
|
||||
*/
|
||||
|
|
@ -0,0 +1,243 @@
|
|||
/*!
|
||||
@~chinese
|
||||
@file dimagehandler.h
|
||||
|
||||
dimagehandler.h 提供图像处理类 DImageHandler
|
||||
|
||||
@class Dtk::Gui::DImageHandler
|
||||
@brief DImageHandler 提供图像处理,读取、保存、旋转、滤镜等。
|
||||
@details
|
||||
## 概述
|
||||
提供多种格式图片的读取、保存,允许对部分格式进行旋转。提供多种滤镜、锐化、二值化等图像处理算法。
|
||||
通过 `DImageHandler::setFileName` 设置当前处理的图片文件路径,通过 `DImageHandler::readImage`
|
||||
取得图片数据,通过 `DImageHandler::thumbnail` 取得图片缩略图。设置文件路径将不会立即加载图片,
|
||||
将在需要图片数据时读取,当不需要缓存数据时,可通过 `DImageHandler::clearCache` 清除缓存数据。
|
||||
|
||||
@note 拓展的图片格式依赖 FreeImage 和 LibRaw 公共库,DImageHandler 通过动态加载的方式解析公共库接口。
|
||||
可通过 DImageHandler::supportFormats() 获取当前支持的图片格式类型。
|
||||
|
||||
## 编译
|
||||
支持拓展的图片格式,编译时会判断环境是否存在依赖包,安装 libfreeimage-dev 及 libraw-dev ,
|
||||
设置编译选项 DTK_DISABLE_EX_IMAGE_FORMAT=OFF 后将开启拓展图片格式支持。
|
||||
|
||||
不同包构建环境默认策略不同,在 **debian** 和 **linglong** 构建环境默认依赖 libfreeimage-dev 及 libraw-dev ,
|
||||
支持拓展图片格式,其它环境需手动安装。
|
||||
|
||||
## image-handler 工具示例
|
||||
可在程序根目录 ./tools/image-handler 中查看 image-handler 工具项目。
|
||||
image-handler 工具可用于提取图像信息、旋转图像、设置图像滤镜等。
|
||||
```shell
|
||||
image-handler [options] [file...]
|
||||
```
|
||||
|
||||
### image-handler 选项
|
||||
| **选项** | **描述** |
|
||||
|---|---|
|
||||
| -h, --help | 显示工具帮助信息 |
|
||||
| -r, --rotate <degresses> | 根据设置角度旋转图片,旋转角度需为 **90度** 的倍数 |
|
||||
| -o, --output <file> | 保存处理后的文件到指定路径 |
|
||||
| -f <filter> | 为图片设置滤镜,可选图片滤镜包括 old, warm, cool, gray, anticolor, metal |
|
||||
| -l, --list | 列出所有图片的格式 |
|
||||
| -e | 列出所有图片的详细信息,结合 **-l** 使用 |
|
||||
|
||||
|
||||
@fn Dtk::Gui::DImageHandler::DImageHandler(QObject *parent)
|
||||
@brief 构造 DImageHandler 实例,并指定父控件
|
||||
@param[in] parent 作为实例的父控件
|
||||
|
||||
@fn Dtk::Gui::DImageHandler::~DImageHandler()
|
||||
@brief 销毁 DImageHandler 实例
|
||||
|
||||
@fn void Dtk::Gui::DImageHandler::setFileName(const QString &fileName)
|
||||
@brief 设置当前处理的图片文件路径
|
||||
@param[in] fileName 图片文件路径
|
||||
|
||||
@fn QString Dtk::Gui::DImageHandler::fileName() const
|
||||
@brief 返回当前处理的图片文件路径
|
||||
@return 图片文件路径
|
||||
|
||||
@fn QImage Dtk::Gui::DImageHandler::readImage()
|
||||
@brief 从设置的图片文件路径中读取图片
|
||||
@details 从 fileName() 设置的图片文件中读取图片,若读取失败,将返回空图片实例,
|
||||
错误信息通过 lastError() 获取
|
||||
@return 图片实例
|
||||
|
||||
@fn QImage Dtk::Gui::DImageHandler::thumbnail(const QSize &size, Qt::AspectRatioMode mode)
|
||||
@brief 获取当前处理图片指定大小的缩略图,可调整宽高比适配模式
|
||||
@param[in] 缩略图大小
|
||||
@return 缩略图实例
|
||||
|
||||
@fn QString Dtk::Gui::DImageHandler::imageFormat() const
|
||||
@brief 返回当前设置图片文件的格式,若未设置文件路径,返回空字符串
|
||||
@return 图片格式
|
||||
|
||||
@fn QSize Dtk::Gui::DImageHandler::imageSize()
|
||||
@brief 返回当前处理的图片尺寸,若未设置图片文件或加载失败,返回空图片尺寸 (-1, -1)
|
||||
@return 图片大小
|
||||
|
||||
@fn QHash<QString, QString> Dtk::Gui::DImageHandler::findAllMetaData()
|
||||
@brief 查询图片包含的所有元数据,在动态加载 FreeImage 库后有效
|
||||
@return 图片信息表
|
||||
|
||||
@fn void Dtk::Gui::DImageHandler::clearCache()
|
||||
@brief 清空缓存数据,释放缓存的图片和错误信息
|
||||
|
||||
@fn bool Dtk::Gui::DImageHandler::saveImage(const QString &fileName, const QString &format = QString())
|
||||
@brief 保存当前处理的图片至文件,可指定保存的图片格式, 若存在错误,将返回 false ,错误信息通过 lastError() 获取
|
||||
@param[in] fileName 保存的文件路径
|
||||
@param[in] format 指定保存图片格式,默认为空,表示保持原格式
|
||||
@return 是否成功保存图片
|
||||
|
||||
@fn bool Dtk::Gui::DImageHandler::saveImage(const QImage &image, const QString &fileName, const QString &format)
|
||||
@brief 保存图片至文件,可指定保存的图片格式, 若存在错误,将返回 false ,错误信息通过 lastError() 获取
|
||||
@param[in] image 图片实例
|
||||
@param[in] fileName 保存的文件路径
|
||||
@param[in] format 指定保存图片格式,默认为空,表示保持原格式
|
||||
@return 是否成功保存图片
|
||||
|
||||
@fn bool Dtk::Gui::DImageHandler::rotateImage(QImage &image, int angle)
|
||||
@brief 顺时针旋转图片,若存在错误,将返回 false ,错误信息通过 lastError() 获取
|
||||
@param[in,out] image 图片实例
|
||||
@param[in] angle 图片旋转角度,必须以90度为倍数
|
||||
@return 是否成功旋转图片
|
||||
|
||||
@fn bool Dtk::Gui::DImageHandler::rotateImageFile(const QString &fileName, int angle)
|
||||
@brief 顺时针旋转图片文件中的图片
|
||||
@details 读取 fileName 图片文件,顺时针旋转图片 angle 度,并将图片数据写回文件,
|
||||
若存在错误,将返回 false ,错误信息通过 lastError() 获取
|
||||
@param[in] fileName 图片文件路径
|
||||
@param[in] angle 图片旋转角度,必须以90度为倍数
|
||||
@return 是否成功旋转并保存图片文件
|
||||
|
||||
@fn bool Dtk::Gui::DImageHandler::isReadable() const
|
||||
@brief 返回当前设置的图片文件是否可读取,判断基于图片格式,fileName() 为空时返回 false
|
||||
@return 是否可读取
|
||||
|
||||
@fn bool Dtk::Gui::DImageHandler::isWriteable() const
|
||||
@brief 返回当前设置的图片文件是否可写入,判断基于图片格式,fileName() 为空时返回 false
|
||||
@return 是否可写入
|
||||
|
||||
@fn bool Dtk::Gui::DImageHandler::isRotatable() const
|
||||
@brief 返回当前设置的图片文件是否可旋转,判断基于图片格式,fileName() 为空时返回 false
|
||||
@return 是否可旋转
|
||||
|
||||
@fn static QStringList Dtk::Gui::DImageHandler::supportFormats()
|
||||
@brief 返回当前环境下 DImageHandler 可支持的图片格式,可动态加载 FreeImage 库以支持更多图片格式
|
||||
@return 支持的图片格式
|
||||
|
||||
@fn static QString Dtk::Gui::DImageHandler::detectImageFormat(const QString &fileName)
|
||||
@brief 根据文件名称及文件内容检测图片格式
|
||||
@param[in] fileName 图片文件路径
|
||||
@return 图片格式
|
||||
|
||||
@fn QString Dtk::Gui::DImageHandler::lastError() const;
|
||||
@brief 返回最近一次错误的详细信息
|
||||
@return 错误信息
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::oldColorFilter(const QImage &img)
|
||||
@brief 为图片设置老照片滤镜并返回处理图片实例
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::warmColorFilter(const QImage &img, int intensity = 30)
|
||||
@brief 为图片设置暖色滤镜并返回处理图片实例
|
||||
@param[in] img 待处理的图片实例
|
||||
@param[in] intensity 滤镜处理强度,取值范围 -255 ~ 255 ,默认30
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::coolColorFilter(const QImage &img, int intensity = 30)
|
||||
@brief 为图片设置冷色滤镜并返回处理图片实例
|
||||
@param[in] img 待处理的图片实例
|
||||
@param[in] intensity 滤镜处理强度,取值范围 -255 ~ 255 ,默认30
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::grayScaleColorFilter(const QImage &img)
|
||||
@brief 为图片设置灰色滤镜并返回处理图片实例
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::antiColorFilter(const QImage &img)
|
||||
@brief 为图片设置反色滤镜并返回处理图片实例
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::metalColorFilter(const QImage &img)
|
||||
@brief 为图片设置金属风格滤镜并返回处理图片实例
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::bilateralFilter(const QImage &img, double spatialDecay, double photometricStandardDeviation)
|
||||
@brief 对图片进行双边滤波处理,可保持边界并去除噪点,可用于磨皮等处理
|
||||
@param[in] img 待处理的图片实例
|
||||
@param[in] spatialDecay 空间衰减值,用于双边滤波的空域信息,默认 0.02
|
||||
@param[in] photometricStandardDeviation 光度标准差值,用于双边滤波的值域信息, 默认 10
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::contourExtraction(const QImage &img)
|
||||
@brief 提取图片轮廓
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::binaryzation(const QImage &img)
|
||||
@brief 对图片进行二值化处理
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::grayScale(const QImage &img)
|
||||
@brief 取得灰阶图片
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::laplaceSharpen(const QImage &img)
|
||||
@brief 拉普拉斯锐化处理
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::sobelEdgeDetector(const QImage &img)
|
||||
@brief sobel边缘检测处理,用于图片锐化
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::changeLightAndContrast(const QImage &img, int light = 100, int contrast = 150)
|
||||
@brief 变更图片的亮度和对比度并返回处理图片实例
|
||||
@param[in] img 待处理的图片实例
|
||||
@param[in] light 调整图片亮度,取值范围 0 ~ 300
|
||||
@param[in] constrase 调整图片对比度,取值范围 0 ~ 300
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::changeBrightness(const QImage &img, int brightness)
|
||||
@brief 调整图片亮度并返回处理图片实例,取值范围 -255 ~ 255
|
||||
@param[in] img 待处理的图片实例
|
||||
@param[in] brightness 图片亮度
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::changeTransparency(const QImage &img, int transparency)
|
||||
@brief 调整图片透明度并返回处理图片实例,取值范围 0 ~ 255
|
||||
@param[in] img 待处理的图片实例
|
||||
@param[in] transparency 图片透明度
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::changeStauration(const QImage &img, int saturation)
|
||||
@brief 调整图片饱和度并返回处理图片实例,取值范围 -100 ~ 100
|
||||
@param[in] img 待处理的图片实例
|
||||
@param[in] saturation 图片饱和度
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::replacePointColor(const QImage &img, QColor oldColor, QColor newColor)
|
||||
@brief 遍历图片所有像素点,替换图片像素点颜色
|
||||
@param[in] img 待处理的图片实例
|
||||
@param[in] oldColor 旧像素颜色
|
||||
@param[in] newColor 新像素颜色
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::flipHorizontal(const QImage &img)
|
||||
@brief 水平翻转图片
|
||||
@param[in] img 待处理的图片实例
|
||||
@return 处理完成的图片实例
|
||||
|
||||
@fn static QImage Dtk::Gui::DImageHandler::flipVertical(const QImage &img)
|
||||
@brief 垂直翻转图片
|
||||
@param[in] img 待处理的图片
|
||||
@return 处理完成的图片实例
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/*!
|
||||
@~chinese
|
||||
@file dplatformtheme.h
|
||||
|
||||
@class Dtk::Gui::DPlatformTheme
|
||||
@ingroup dtkgui
|
||||
@brief DPlatformTheme类提供了一个应用程序的主题配置管理类,可以在外部控制应用的默认主题行为,
|
||||
达到个性化主题的设置,所有的设置是实时响应的。
|
||||
|
||||
@property DPlatformTheme::sizeMode
|
||||
@brief 从配置中获取当前控件大小模式
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,340 @@
|
|||
/*!
|
||||
@~chinese
|
||||
@file include/util/ddciicon.h
|
||||
@ingroup dci
|
||||
@brief DCI图标类
|
||||
|
||||
@class Dtk::Gui::DDciIconImage ddciicon.h
|
||||
@details 用于获取 dci 图标某种状态的图片资源(位图数据),同时支持静态图和动态图,接口的设计类似于 QImageReader,一般通过调用 DDciIcon::image 构造此对象。与 DDciIcon 配合使用,其所支持的图片格式与 DDciIcon::pixmap 接口一致,都取决于 Qt 图片插件系统(即 QImageReader)所提供的能力。
|
||||
@sa DDciIcon::image
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::DDciIconImage()
|
||||
@details 构造一个空的对象。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::DDciIconImage(const DDciIconImage &other)
|
||||
@details 根据 other 对象构造一个新的 DDciIconImage 对象,这个新的对象将与 other 共享 DDciIconImagePrivate 对象。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::operator=(const DDciIconImage &other)
|
||||
@details 对当前对象进行赋值,这将导致此对象与 other 共享 DDciIconImagePrivate 对象。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::operator=(DDciIconImage &&other)
|
||||
@details 对当前对象进行赋值,这将导致此对象与 other 两者的 DDciIconImagePrivate 对象被交换。
|
||||
@sa DDciIconImage::swap
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::swap(DDciIconImage &other)
|
||||
@details 交换两个对象的数据,这将导致两者的 DDciIconImagePrivate 对象被交换。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::operator ==(const DDciIconImage &other) const
|
||||
@details 如果两个对象引用了相同的 DDciIconImagePrivate 数据对象,则返回 true,否则返回 false。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::operator !=(const DDciIconImage &other) const
|
||||
@details 如果两个对象引用了不同的 DDciIconImagePrivate 数据对象,则返回 true,否则返回 false。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::isNull() const
|
||||
@details 如果此对象为空,则返回 true,否则返回 false。当对象为空时,调用其它成员函数将获得一个无效的结果。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::reset()
|
||||
@details 重置数据的状态,将清理所有的内部缓存数据,并且重置所有的状态记录,与重新调用 DDciIcon::image 获取一个新的对象后的状态相同。对于动画图片而言,这会导致 DDciIconImage::atBegin 变成 true,即动画将从第一帧重新开始。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::toImage(const DDciIconPalette &palette) const
|
||||
@details 对于静态图片,将读取图片数据,并加载为 QImage 对象返回。对于动态图片,将返回当前帧的位图数据,且多次调用时不会重新加载,将返回缓存的 QImage 对象,另外需要注意的时,与 QImageReader::read 的不同,在调用此函数读取当前帧后,并不会自动跳转到下一帧,即在未调用 DDciIconImage::jumpToNextImage 时,多次调用此函数将返回同一帧。
|
||||
@param[in] palette 如果此图片支持指定调色板,则将根据传入的 DDciIconPalette 中指定的颜色对图片进行加工。详情请参见 DSG 标准中的 DCI 图片格式设计。
|
||||
@sa DDciIconImage::hasPalette DDciIconImage::paint
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::paint(QPainter *painter, const QRectF &rect, Qt::Alignment alignment, const DDciIconPalette &palette) const
|
||||
@details 将图片的位图数据通过传入的画笔进行绘制。
|
||||
@param[in] painter 指定画笔对象。
|
||||
@param[in] rect 指定绘制区域,此区域相对于画笔所对应的 QPainter::paintDevice(),如果此区域的宽度比图片的宽度小,则会在绘制时将图片缩小到此区域的大小,反之则保持图片自身大小,而不会知道图片被放大。
|
||||
@param[in] alignment 指定绘制时图片相对于 rect 所指定区域的位置,即当图片宽度小于 rect 所指定的宽度时,将根据此参数决定图片的显示位置。
|
||||
@param[in] palette 如果此图片支持指定调色板,则将根据传入的 DDciIconPalette 中指定的颜色对图片进行加工。详情请参见 DSG 标准中的 DCI 图片格式设计。
|
||||
@sa DDciIconImage::toImage
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::hasPalette() const
|
||||
@details 如果此图片支持指定调色板,则返回 true,否则返回 false。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::supportsAnimation() const
|
||||
@details 如果此图片支持动画,则返回 true,否则返回 false。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::atBegin() const
|
||||
@details 如果此图片支持动画且动画处于第一帧,则返回 true,否则返回 false。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::atEnd() const
|
||||
@details 如果此图片支持动画且动画处于最后一帧,则返回 true,否则返回 false。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::jumpToNextImage()
|
||||
@details 将动画跳转到下一帧,如果此图片支持动画且当前不是最后一帧,则返回 true,否则返回 false。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::loopCount() const
|
||||
@details 返回动画的轮播次数,如果此图片不支持动画,则返回值无效。如果返回值为 -1,则表明此动画需要无限循环播放。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::maxImageCount() const
|
||||
@details 返回动画的最大帧数,如果当前图片有多层且每一层都支持动画,则是所有动画帧数的累加,因此多个动画的播放时间会可能会有重叠的帧,所以无法确保播放此图片时一定能显示这么多帧,动画是否结束需要以 DDciIconImage::atEnd 的返回结果为准。如果此图片不支持动画,则返回值无效。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::currentImageDuration() const
|
||||
@details 返回当前动画帧的持续时间,单位为毫秒。如果此图片不支持动画,则返回值无效。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImage::currentImageNumber() const
|
||||
@details 返回动画已经播放到的帧的序号,此值一定小于 DDciIconImage::maxImageCount - 1。如果此图片不支持动画,则返回值无效。
|
||||
|
||||
@class Dtk::Gui::DDciIcon ddciicon.h
|
||||
@details 如果需要详细dci相关介绍以及规范文档, 可以参见[dci文件图标规范](https://github.com/linuxdeepin/deepin-specifications/blob/master/unstable/%E5%9B%BE%E6%A0%87%E6%96%87%E4%BB%B6%E8%A7%84%E8%8C%83.md)
|
||||
|
||||
## DDciIcon示例
|
||||
项目目录结构在同一目录下
|
||||
|
||||
## CMakeLists.txt
|
||||
```cmake
|
||||
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
|
||||
|
||||
project(ddciicon-example VERSION 1.0.0 LANGUAGES CXX) # 指定项目名称, 版本, 语言 cxx就是c++
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11) # 指定c++标准
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON) # 指定c++标准要求,至少为11以上
|
||||
|
||||
set(CMAKE_AUTOMOC ON) # 支持qt moc
|
||||
set(CMAKE_AUTORCC ON) # support qt resource file # 支持qt资源文件
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # 支持 clangd
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS "3.7.0") # 如果cmake版本小于3.7.0
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) # 设置包含当前目录
|
||||
endif()
|
||||
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core) # 寻找Qt5组件Core
|
||||
find_package(Qt5 REQUIRED COMPONENTS Gui) # 寻找Qt5组件Core
|
||||
find_package(Qt5 REQUIRED COMPONENTS Widgets) # 寻找Qt5组件Widgets
|
||||
find_package(DtkCore REQUIRED) # 寻找Dtk组件Core
|
||||
find_package(Dtk REQUIRED COMPONENTS Gui) # 寻找Dtk组件Gui
|
||||
find_package(Dtk REQUIRED COMPONENTS Widget) # 寻找Dtk组件Widget
|
||||
|
||||
add_executable(${PROJECT_NAME} # 生成可执行文件
|
||||
main.cpp
|
||||
qml.qrc
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE # 添加需要链接的共享库
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
Dtk::Core
|
||||
dtkgui
|
||||
dtkwidget
|
||||
)
|
||||
```
|
||||
|
||||
## main.cpp
|
||||
```cpp
|
||||
#include <DApplication>
|
||||
#include <DWidgetUtil>
|
||||
#include <DIconButton>
|
||||
#include <DDciIcon>
|
||||
#include <QtDebug>
|
||||
#include <QFormLayout>
|
||||
#include <DMainWindow>
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
DApplication a(argc, argv);
|
||||
DMainWindow win;
|
||||
|
||||
QWidget w;
|
||||
QFormLayout* layout = new QFormLayout(&w);
|
||||
|
||||
// fromTheme表示从图标主题中寻找资源。
|
||||
DDciIcon dci = DDciIcon::fromTheme("select_indicator");
|
||||
|
||||
auto icon = dci.matchIcon(0, DDciIcon::Light, DDciIcon::Hover);
|
||||
qDebug() << "DCI图标的实际大小" << dci.actualSize(icon);
|
||||
|
||||
// 定义一个函数,传入DIconButton,以及提示信息
|
||||
auto addBtnRow = [&](DIconButton *iconBtn, const QString name){
|
||||
iconBtn->setIconSize(QSize(32,32));
|
||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||
hlayout->addWidget(iconBtn);
|
||||
QLabel *btnLabel = new QLabel(name);
|
||||
hlayout->addWidget(btnLabel);
|
||||
return hlayout;
|
||||
};
|
||||
|
||||
// 将DDciIcon传入DIconButton
|
||||
DIconButton *iconBtn1 = new DIconButton(dci);
|
||||
layout->addRow(addBtnRow(iconBtn1, "icon button"));
|
||||
|
||||
DIconButton *iconBtn2 = new DIconButton(dci);
|
||||
iconBtn2->setDisabled(true);
|
||||
layout->addRow(addBtnRow(iconBtn2, "disabled state"));
|
||||
|
||||
DIconButton *iconBtn3 = new DIconButton(dci);
|
||||
iconBtn3->setDown(true);
|
||||
layout->addRow(addBtnRow(iconBtn3, "pressed state"));
|
||||
|
||||
win.setCentralWidget(&w);
|
||||
win.resize(200,100);
|
||||
win.show();
|
||||
Dtk::Widget::moveToCenter(&win);
|
||||
return a.exec();
|
||||
}
|
||||
```
|
||||
|
||||
## qml.qrc
|
||||
```xml
|
||||
<RCC>
|
||||
<qresource prefix="/dsg/built-in-icons">
|
||||
<file>select_indicator.dci</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
```
|
||||
|
||||
## select_indicator.dci
|
||||
下载dci-demo解压获取,这是个用qml编写的例子,使用DDciIcon更灵活
|
||||
[dci-demo](https://github.com/linuxdeepin/deepin-specifications/blob/master/unstable/dci-demo.zip)
|
||||
|
||||
编译和运行程序
|
||||
```bash
|
||||
cmake -B build
|
||||
cmake --build build
|
||||
./build/ddciicon-example
|
||||
```
|
||||
|
||||
程序运行效果如下:
|
||||

|
||||
|
||||
@enum Dtk::Gui::DDciIcon::Mode
|
||||
@brief DCI图标模式
|
||||
@details
|
||||
| 键 | 值 |
|
||||
|:--------:|:---:|
|
||||
| Normal | 0 |
|
||||
| Disabled | 1 |
|
||||
| Hover | 2 |
|
||||
| Pressed | 3 |
|
||||
|
||||
|
||||
@enum Dtk::Gui::DDciIcon::Theme
|
||||
@brief DCI图标主题
|
||||
@details
|
||||
| 键 | 值 |
|
||||
|:-----:|:---:|
|
||||
| Light | 0 |
|
||||
| Dark | 1 |
|
||||
|
||||
@enum Dtk::Gui::DDciIcon::IconAttribute
|
||||
@brief DCI图标属性
|
||||
@details
|
||||
| 键 | 值 |
|
||||
|:-----:|:---:|
|
||||
| HasPalette | 0x001 |
|
||||
这个属性为了获取dci图标的图层是否包含调色板颜色调整, 比如某一个图层的图片的需要用高亮色的填充就是 HasPalette, 这个高亮色还可以调整亮度饱和度rgba等参数
|
||||
|
||||
@enum Dtk::Gui::DDciIcon::IconMatchedFlag
|
||||
@brief DCI图标匹配参数
|
||||
@var DDciIcon::None
|
||||
@brief 空,无含义
|
||||
@var DDciIcon::DontFallbackMode
|
||||
@brief 在查找图片资源时,如果指定的 mode 不存在,则禁止回退,直接当作查找不到处理
|
||||
@var DDciIcon::RegardPaddingsAsSize
|
||||
@brief 将图层中携带的 paddings 属性算作图层大小的一部分,这会影响图片匹配时的大小判断
|
||||
|
||||
@fn Dtk::Gui::DDciIcon::DDciIcon()
|
||||
@brief 构造函数
|
||||
|
||||
@fn Dtk::Gui::DDciIcon::DDciIcon(const DCORE_NAMESPACE::DDciFile *dciFile)
|
||||
@brief 指定DCI文件的构造函数
|
||||
|
||||
@fn Dtk::Gui::DDciIcon(const QString &fileName)
|
||||
@brief 指定DCI文件名的构造函数
|
||||
|
||||
@fn Dtk::Gui::DDciIcon::DDciIcon(const QByteArray &data)
|
||||
@brief 指定DCI文件数据的构造函数
|
||||
|
||||
@fn Dtk::Gui::DDciIcon::DDciIcon(const DDciIcon &other)
|
||||
@brief 拷贝构造函数,重载赋值运算符
|
||||
|
||||
@fn Dtk::Gui::DDciIcon::swap(DDciIcon &other)
|
||||
@brief 交换两个DDciIcon对象
|
||||
|
||||
@fn bool Dtk::Gui::DDciIcon::isNull() const
|
||||
@brief 判断DCI图标是否为空
|
||||
|
||||
@fn DDciIconMatchResult Dtk::Gui::DDciIcon::matchIcon(int size, Theme theme, Mode mode, IconMatchedFlags flags = None) const
|
||||
@brief 获取DCI图标匹配元信息, 元信息仅能作为传入参数使用
|
||||
@param[in] size 图标大小
|
||||
@param[in] theme 图标主题
|
||||
@param[in] mode 图标模式
|
||||
@param[in] flags 图标匹配标志
|
||||
|
||||
@fn int Dtk::Gui::DDciIcon::actualSize(DDciIconMatchResult result) const
|
||||
@brief 获取DCI图标实际大小
|
||||
@param[in] result DCI图标匹配结果
|
||||
|
||||
@fn int Dtk::Gui::DDciIcon::actualSize(int size, Theme theme, Mode mode =Normal) const
|
||||
@brief 获取DCI图标实际大小
|
||||
@details 该函数会根据传入的参数获取DCI图标匹配结果,然后调用actualSize(DDciIconMatchResult result)函数获取DCI图标实际大小
|
||||
@sa DDciIcon::actualSize(DDciIconMatchResult result)
|
||||
|
||||
@fn QList<int> Dtk::Gui::DDciIcon::availableSizes(Theme theme, Mode mode=Normal) const
|
||||
@brief 获取DCI图标可用大小列表
|
||||
@param[in] theme 图标主题
|
||||
@param[in] mode 图标模式,默认为Normal
|
||||
|
||||
@fn bool Dtk::Gui::DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr)
|
||||
@brief 判断DCI图标是否支持指定属性
|
||||
@param[in] result DCI图标匹配结果
|
||||
@param[in] attr 图标属性
|
||||
|
||||
@fn QPixmap Dtk::Gui::DDciIcon::pixmap(qreal devicePixelRatio, int iconSize, Theme theme, Mode mode = Normal,const DDciIconPalette &palette = DDciIconPalette()) const
|
||||
@brief 获取DCI图标的QPixmap
|
||||
@param[in] devicePixelRatio 设备像素比
|
||||
@param[in] iconSize 图标大小
|
||||
@param[in] theme 图标主题
|
||||
@param[in] mode 图标模式, 默认为Normal
|
||||
@param[in] palette 图标调色板,默认为无(空)调色板
|
||||
|
||||
@fn QPixmap Dtk::Gui::DDciIcon::pixmap(qreal devicePixelRatio, int iconSize, DDciIconMatchResult result, const DDciIconPalette &palette = DDciIconPalette()) const
|
||||
@brief 获取DCI图标的QPixmap
|
||||
@param[in] devicePixelRatio 设备像素比
|
||||
@param[in] iconSize 图标大小
|
||||
@param[in] result DCI图标匹配结果
|
||||
@param[in] palette 图标调色板, 默认为无(空)调色板
|
||||
|
||||
@fn void Dtk::Gui::DDciIcon::paint(QPainter *painter, const QRect &rect, qreal devicePixelRatio, Theme theme, Mode mode = Normal, Qt::Alignment alignment = Qt::AlignCenter, const DDciIconPalette &palette = DDciIconPalette()) const
|
||||
@brief 绘制DCI图标
|
||||
@param[in] painter QPainter对象
|
||||
@param[in] rect 绘制区域
|
||||
@param[in] devicePixelRatio 设备像素比
|
||||
@param[in] theme 图标主题
|
||||
@param[in] mode 图标模式, 默认为Normal
|
||||
@param[in] alignment 对齐方式, 默认为Qt::AlignCenter
|
||||
@param[in] palette 图标调色板, 默认为无(空)调色板
|
||||
|
||||
@fn void Dtk::Gui::DDciIcon::paint(QPainter *painter, const QRect &rect, qreal devicePixelRatio, DDciIconMatchResult result, Qt::Alignment alignment = Qt::AlignCenter, const DDciIconPalette &palette = DDciIconPalette()) const
|
||||
@brief 绘制DCI图标
|
||||
@param[in] painter QPainter对象
|
||||
@param[in] rect 绘制区域
|
||||
@param[in] devicePixelRatio 设备像素比
|
||||
@param[in] result DCI图标匹配结果
|
||||
@param[in] alignment 对齐方式, 默认为Qt::AlignCenter
|
||||
@param[in] palette 图标调色板, 默认为无(空)调色板
|
||||
|
||||
@fn Dtk::Gui::DDciIcon::image(DDciIconMatchResult result, int size, qreal devicePixelRatio) const
|
||||
@details 构造一个 DDciIconImage 对象
|
||||
@param[in] result 匹配到的图片结果,将根据此匹配结果查找对应的图片数据。
|
||||
@param[in] size 期望获取到的图片大小,将根据此大小寻找最为接近的图片资源,当图片大小与传入的大小不一致时,将优先返回一个稍大的图片。
|
||||
@param[in] devicePixelRatio 期望获取到的图片的缩放比例,将根据其寻找最为接近的图片资源,当无法找到指定比例的图片时,将优先返回一个稍大比例的图片。
|
||||
@sa DDciIcon::matchIcon
|
||||
|
||||
@fn static DDciIcon Dtk::Gui::DDciIcon::fromTheme(const QString &name)
|
||||
@brief 从dci图标主题(包括内置dci图标资源)中获取图标名字为name的图标
|
||||
@param[in] name DCI图标名称
|
||||
|
||||
@fn static DDciIcon Dtk::Gui::DDciIcon::fromTheme (const QString &name, const DDciIcon &fallback)
|
||||
@brief 从dci图标主题(包括内置dci图标资源)中获取图标名字为name的图标
|
||||
@param[in] name DCI图标名称
|
||||
@param[in] fallback 当图标名为 name 的图标找不到时, fallback 到 fallback 的这个dci图标
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*!
|
||||
@~chinese
|
||||
@file include/util/ddciiconpalette.h
|
||||
@ingroup dci
|
||||
@brief DCI图标调色板
|
||||
|
||||
@class Dtk::Gui::DDciIconPalette ddciiconpalette.h
|
||||
@brief DCI图标调色板
|
||||
|
||||
@fn Dtk::Gui::DDciIconPalette::DDciIconPalette (QColor foreground=QColor::Invalid, QColor background=QColor::Invalid, QColor highlight=QColor::Invalid, QColor highlightForeground=QColor::Invalid)
|
||||
@brief 构造函数
|
||||
@param[in] foreground 前景色, 默认值为无效色
|
||||
@param[in] background 背景色, 默认值为无效色
|
||||
@param[in] highlight 高亮色, 默认值为无效色
|
||||
@param[in] highlightForeground 高亮前景色, 默认值为无效色
|
||||
|
||||
@property Dtk::Gui::DDciIconPalette::foreground()
|
||||
@brief foreground()属性
|
||||
@sa READ方法: QColor Dtk::Gui::DDciIconPalette::foreground()
|
||||
@sa WRITE方法: void Dtk::Gui::DDciIconPalette::setForeground(const QColor &foreground)
|
||||
|
||||
@fn QColor Dtk::Gui::DDciIconPalette::foreground() const
|
||||
@brief 返回前景色
|
||||
@sa DDciIconPalette::foreground
|
||||
|
||||
@fn void Dtk::Gui::DDciIconPalette::setForeground(const QColor &foreground)
|
||||
@brief 设置前景色
|
||||
@sa DDciIconPalette::foreground
|
||||
|
||||
@property Dtk::Gui::DDciIconPalette::background
|
||||
@brief background()属性
|
||||
@sa READ方法: QColor Dtk::Gui::DDciIconPalette::background()
|
||||
@sa WRITE方法: void Dtk::Gui::DDciIconPalette::setBackground(const QColor &background)
|
||||
|
||||
@fn QColor Dtk::Gui::DDciIconPalette::background() const
|
||||
@brief 返回背景色
|
||||
@sa DDciIconPalette::background
|
||||
|
||||
@fn void Dtk::Gui::DDciIconPalette::setBackground(const QColor &background)
|
||||
@brief 设置背景色
|
||||
@sa DDciIconPalette::background
|
||||
|
||||
@property Dtk::Gui::DDciIconPalette::highlightForeground
|
||||
@brief highlightForeground()属性
|
||||
@sa READ方法: QColor Dtk::Gui::DDciIconPalette::highlightForeground()
|
||||
@sa WRITE方法: void Dtk::Gui::DDciIconPalette::setHighlightForeground(const QColor &highlightForeground)
|
||||
|
||||
@fn QColor Dtk::Gui::DDciIconPalette::highlightForeground() const
|
||||
@brief 返回高亮前景色
|
||||
@sa DDciIconPalette::highlightForeground
|
||||
|
||||
@fn void Dtk::Gui::DDciIconPalette::setHighlightForeground(const QColor &highlightForeground)
|
||||
@brief 设置高亮前景色
|
||||
@sa DDciIconPalette::highlightForeground
|
||||
|
||||
@property Dtk::Gui::DDciIconPalette::highlight
|
||||
@brief highlight()属性
|
||||
@sa READ方法: QColor Dtk::Gui::DDciIconPalette::highlight()
|
||||
@sa WRITE方法: void Dtk::Gui::DDciIconPalette::setHighlight()
|
||||
|
||||
@fn QColor Dtk::Gui::DDciIconPalette::highlight() const
|
||||
@brief 返回高亮色
|
||||
@sa DDciIconPalette::highlight
|
||||
|
||||
@fn void Dtk::Gui::DDciIconPalette::setHighlight()
|
||||
@brief 设置高亮色
|
||||
@sa DDciIconPalette::highlight
|
||||
|
||||
@fn static QString Dtk::Gui::DDciIconPalette::convertToString(const DDciIconPalette &palette)
|
||||
@brief 将DDciIconPalette转换为字符串
|
||||
|
||||
@fn static DDciIconPalette Dtk::Gui::DDciIconPalette::convertFromString(const QString &data)
|
||||
@brief 将字符串转换为DDciIconPalette
|
||||
|
||||
@fn static DDciIconPalette Dtk::Gui::DDciIconPalette::fromQPalette(const QPalette &pa)
|
||||
@brief 将QPalette转换为DDciIconPalette
|
||||
@sa QPalette
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
/*!
|
||||
@~chinese
|
||||
@file include/util/ddciiconplayer.h
|
||||
@ingroup dci
|
||||
@brief DCI 图标播放工具
|
||||
|
||||
@class Dtk::Gui::DDciIconImagePlayer ddciiconplayer.h
|
||||
@details 用于 DDciIconImage 的动画播放,功能设计类似于 QMovie。支持无缝顺序播放播放多个图片、倒序播放等高级功能。
|
||||
|
||||
@enum Dtk::Gui::DDciIconImagePlayer::State
|
||||
@brief 播放状态
|
||||
@var DDciIconImagePlayer::NotRunning
|
||||
@brief 未播放动画
|
||||
@var DDciIconImagePlayer::WaitingRead
|
||||
@brief 正在播放动画,且等待读取当前帧
|
||||
@var DDciIconImagePlayer::Running
|
||||
@brief 正在播放动画,此时处于等待下一帧到来的状态
|
||||
|
||||
@enum Dtk::Gui::DDciIconImagePlayer::Flag
|
||||
@brief 播放参数
|
||||
@details 缓存的帧被判断为无效时将会被自动清理,如调用 DDciIconImagePlayer::setImage 改变了要播放的图片资源。
|
||||
@var DDciIconImagePlayer::Continue
|
||||
@brief 接着上一次动画停止时的状态继续播放,一般会配合 InvertedOrder 同时使用
|
||||
@var DDciIconImagePlayer::CacheAll
|
||||
@brief 缓存本次播放中的所有动画帧
|
||||
@var DDciIconImagePlayer::InvertedOrder
|
||||
@brief 倒序播放
|
||||
@var DDciIconImagePlayer::IgnoreLastImageLoop
|
||||
@brief 忽略最后一个图片的动画循环次数,即无论 DDciIconImage::loopCount 的值是什么,动画都只播放一次
|
||||
@var DDciIconImagePlayer::AllowNonLastImageLoop
|
||||
@brief 允许非最后一个图片循环播放,默认时不允许,以确保所有图片都有机会被播放,避免动画在前面的图片中无限循环进行播放
|
||||
@var DDciIconImagePlayer::ClearCacheOnStop
|
||||
@brief 在动画停止时清理缓存的帧,无论动画是播放完成时的自动停止还是被动停止
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::DDciIconImagePlayer(QObject *parent)
|
||||
@details 构造此对象。
|
||||
@param[in] parent 指定此 QObject 对象的父对象
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::setImages(const QVector<DDciIconImage> &images)
|
||||
@details 指定待播放的图片序列,如果当前的状态不是 NotRunning,并且与上一次指定的图片序列不同,则停止动画。
|
||||
@param[in] images 图片序列,当为多个时,将无缝顺序播放所有图片。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::images() const
|
||||
@details 返回当前已指定的图片序列。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::currentImage() const
|
||||
@details 返回当前正在播放的图片对象,如果当前的状态是 NotRunning,则会返回一个空的 DDciIconImage。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::currentLoopForever() const
|
||||
@details 如果当前正在播放的图片陷入了无限循环,则返回 true,否则返回 false。
|
||||
@sa DDciIconImagePlayer::Flag::IgnoreLastImageLoop DDciIconImagePlayer::Flag::AllowNonLastImageLoop
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::setPalette(const DDciIconPalette &palette)
|
||||
@details 指定读取动画帧时所使用的调色板,如果图片支持此功能,则能控制获取到的图片的某些颜色。如果设置成功,并且当前的状态是 NotRunning,则会立即清理缓存帧,否则会在动画停止时清理缓存帧。
|
||||
@param[out] 如果新的 DDciIconPalette 与当前的 DDciIconPalette 相同,则返回 false,否则返回 true。
|
||||
@sa DDciIconImagePlayer::palette
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::palette() const
|
||||
@details 返回当前已指定的调色板,如果未设置过调色板,则返回一个空的 DDciIconPalette。
|
||||
@sa DDciIconImagePlayer::setPalette
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::setLoopCount(int count)
|
||||
@details 指定动画的循环次数,当从调用 DDciIconImagePlayer::start 到收到 DDciIconImagePlayer::finished 信号为一次循环,除非调用 DDciIconImagePlayer::stop,否则不会终止此循环。另外,需要注意的是,此循环与 DDciIconImage::loopCount 无关,他们相互独立,且会叠加生效。
|
||||
@sa DDciIconImagePlayer::loopCount
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::loopCount() const
|
||||
@details 返回动画循环次数。
|
||||
@sa DDciIconImagePlayer::setLoopCount
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::abortLoop() const
|
||||
@details 终止本次播放中的所有动画循环,即后续的动画都仅播放一遍,这会导致忽略 DDciIconImage::loopCount 和 DDciIconImagePlayer::loopCount。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::readImage()
|
||||
@details 读取当前动画帧,这是一个“生产者-消费者”模型,只有当状态为 WaitingRead 时才能读取,且每一帧只能读取一次。
|
||||
@sa DDciIconImagePlayer::updated
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::state() const
|
||||
@details 返回当前的状态。
|
||||
@sa DDciIconImagePlayer::stateChanged
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::clearCache()
|
||||
@details 立即清理所有的缓存帧。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::start(float speed, DDciIconImagePlayer::Flags flags)
|
||||
@details 立即启动动画,应当在此之前调用 DDciIconImagePlayer::setImages。如果启动成功,将发送 started 信号。在启动后,会根据每一帧的间隔自动触发 updated 信号,以通知使用方在合适的时候显示新的帧。在动画播放完成后,将发送 finished 信号,在动画未播放结束前调用了 stop 主动结束动画则不会发送信号。
|
||||
@param[in] speed 本次动画的播放速度,其表示的是倍速,值越大动画播放的越快。设置为 0 时与设置为 1.0 等价。
|
||||
@param[in] flags 控制本次动画播放时的一些行为。
|
||||
@param[out] 如果动画启动成功则返回 true,否则返回 false。动画启动失败的原因一般是因为此时已经在播放动画、没有设置任何图片或所有图片都不支持动画。
|
||||
@sa DDciIconImagePlayer::started DDciIconImagePlayer::updated DDciIconImagePlayer::readImage DDciIconImagePlayer::finished DDciIconImagePlayer::stateChanged
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::stop()
|
||||
@details 立即停止当前动画的播放。这不会发送 finished 信号。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::started()
|
||||
@details 通知动画已开始播放。
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::updated()
|
||||
@details 通知动画的当前帧已经发生变化,在收到此信号后需要立即调用 readImage,否则动画会被暂停,不会自动到下一帧。
|
||||
@sa DDciIconImagePlayer::readImage
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::finished()
|
||||
@details 在本次动画播放结束时发送信号通知。因为调用 DDciIconImagePlayer::stop 导致的动画停止不会触发此信号。
|
||||
@sa DDciIconImagePlayer::start
|
||||
|
||||
@fn Dtk::Gui::DDciIconImagePlayer::stateChanged()
|
||||
@details 在状态改变时发送信号通知。
|
||||
@sa DDciIconImagePlayer::state
|
||||
|
||||
@class Dtk::Gui::DDciIconPlayer ddciiconplayer.h
|
||||
@details 实现根据 DDciIcon::Mode 的变化,自动化计算要显示的图标内容,支持动态图标,在 DDciIcon::Mode 被设置时通过 updated 信号通知控件绘制新的内容。对于动态图标的动画播放先后顺序、播放速度等规则遵守 DSG 规范中所提出的 DCI 图标文件标准。有几条特性:
|
||||
|
||||
1. 支持动画的倒序播放,如从 Hover 状态变为 Normal 时,可以倒序播放 Hover 状态所对应的 DDciIconImage。此功能依赖于 DDciIconImagePlayer 的实现。
|
||||
2. 支持动画无缝衔接播放,如从 Normal 状态变化为 Hover 时,在播放 Hover 动画的途中又变为 Pressed 状态,则不会立即将 Hover 的动画打断,将把 Pressed 动画在当前动画播放接受后自动播放。
|
||||
3. 支持动画记忆播放,如从 Normal 状态变化为 Hover 时,在播放 Hover 动画的途中变回了 Normal 状态,则会从当前已经播放到的这一帧开始倒序播放 Hover 动画。
|
||||
|
||||
@enum Dtk::Gui::DDciIconPlayer::State
|
||||
@brief 工作状态
|
||||
@var DDciIconPlayer::Idle
|
||||
@brief 处于空闲状态,一般表示此时未播放动画
|
||||
@var DDciIconPlayer::Busy
|
||||
@brief 处于忙碌状态,此时可能正在播放动画
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::DDciIconPlayer
|
||||
@details 构造此对象。
|
||||
@param[in] parent 指定此 QObject 对象的父对象
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::state() const
|
||||
@details 返回当前的状态。
|
||||
@sa DDciIconPlayer::State
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::setIcon(const DDciIcon &icon)
|
||||
@details 设置要处理的图标对象,这会导致当前动画停止播放,并且释放上一个 icon 相关的所有资源。会触发 updated 信号。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::icon() const
|
||||
@details 返回已设置的图标对象。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::setTheme(DDciIcon::Theme theme)
|
||||
@details 为图标指定要使用的主题,如果值发生变化,会导致当前动画停止播放,并且释放图标相关的所有资源。会触发 updated 信号。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::theme() const
|
||||
@details 返回已设置的图标主题。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::setMode(DDciIcon::Mode mode)
|
||||
@details 指定图标当前要使用的模式,如果值发生变化,会根据新旧模式的过渡规则计算接下来是否需要播放动画,以及当动画不存在或动画停止后所停留的内容。动画播放规则遵守 DSG 中 DCI 图标格式规范中的定义。
|
||||
@sa DDciIconPlayer::modeChanged DDciIconPlayer::updated
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::mode() const
|
||||
@details 返回已设置的图标模式。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::setIconSize(int size)
|
||||
@details 为图标指定要渲染的大小,如果值发生变化,会导致当前动画停止播放,并且释放图标相关的所有资源。会触发 updated 信号。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::iconSize() const
|
||||
@details 返回已设置的图标大小。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::setDevicePixelRatio(qreal devicePixelRatio)
|
||||
@details 为图标指定渲染时的缩放比例,如果值发生变化,会导致当前动画停止播放,并且释放图标相关的所有资源。会触发 updated 信号。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::devicePixelRatio() const
|
||||
@details 返回已设置的图标缩放比例。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::setPalette(const DDciIconPalette &palette)
|
||||
@details 为图标指定渲染时所使用的调色板,如果值发生变化,并且当前模式所对应的图片支持指定调色板,在 Busy 状态下,会导致接下来新的动画帧的颜色发生变化,在 Idle 状态下,则会重新为当前模式计算应该显示的内容,这可能会触发 updated 信号。
|
||||
@sa DDciIconImage::hasPalette DDciIconImage::toImage DDciIconImage::paint
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::currentImage() const
|
||||
@details 返回当前图标在当前时刻应该显示的位图数据。当此数据变化时会发送 updated 信号。
|
||||
@sa DDciIconPlayer::setIcon DDciIconPlayer::updated
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::play(DDciIcon::Mode mode)
|
||||
@details 为指定的图标模式计算要显示的内容,这可能会导致 currentImage 发生变化。这是个一次性行为,不会影响下一次调用 setMode 后的结果。
|
||||
@param[in] mode 指定要播放的图标模式,如果此模式支持动画,会触发此模式自身的动画播放(与 setMode 导致的动画不同的是,此动画不涉及两种模式变化时的过渡规则),否则将修改 currentImage 为此模式对应的静态图片资源。
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::play(DDciIcon::Mode mode, DDciIconImagePlayer::Flags flags)
|
||||
@details 为指定的图标模式和播放参数计算要显示的内容。
|
||||
@param[in] mode 指定要播放的图标模式。
|
||||
@param[in] flags 播放参数
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::stop()
|
||||
@details 如果当前正在播放动画,则停止当前动画的播放,但不会影响队列中下一个动画的播放。可能会导致 DDciIconPlayer::state 发生变化。
|
||||
@sa DDciIconPlayer::abort
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::abort()
|
||||
@details 如果当前正在播放动画,则停止当前动画的播放,并取消队列中所有计划播放的动画。可能会导致 DDciIconPlayer::state 发生变化。
|
||||
@sa DDciIconPlayer::stop
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::stateChanged()
|
||||
@details 通知状态发生变化。
|
||||
@sa DDciIconPlayer::state
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::updated()
|
||||
@details 通知 DDciIconPlayer::currentImage 发生变化。
|
||||
@sa DDciIconPlayer::currentImage
|
||||
|
||||
@fn Dtk::Gui::DDciIconPlayer::modeChanged(DDciIcon::Mode oldMode, DDciIcon::Mode newMode)
|
||||
@details 通知图标的模式发生变化。
|
||||
@param[in] oldMode 变化之前的 mode
|
||||
@param[in] newMode 变化之后的 mode
|
||||
@sa DDciIconPlayer::setMode DDciIconPlayer::setMode
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,164 @@
|
|||
/*!
|
||||
@~chinese
|
||||
@file include/util/ddesktopservices.h
|
||||
@ingroup DesktopServices
|
||||
@brief Dtk 提供常见桌面服务的方法工具类
|
||||
|
||||
@namespace Dtk::Gui::DDesktopServices ddesktopservices.h
|
||||
@details 用于提供一些接口,包括在文件管理器中显示目录,显示文件,显示文件属性,移入回收站,播放系统音效等。
|
||||
|
||||
@enum Dtk::Gui::DDesktopServices::SystemSoundEffect
|
||||
@brief 系统音效的枚举
|
||||
@var Dtk::Gui::DDesktopServices::SSE_Notifications
|
||||
@brief 显示通知的音效
|
||||
@var Dtk::Gui::DDesktopServices::SEE_Screenshot
|
||||
@brief 截屏的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_EmptyTrash
|
||||
@brief 清空回收站的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_SendFileComplete
|
||||
@brief 完成发送文件(到桌面)的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_BootUp
|
||||
@brief 开机的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_Shutdown
|
||||
@brief 关机的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_Logout
|
||||
@brief 注销的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_WakeUp
|
||||
@brief 唤醒的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_VolumeChange
|
||||
@brief 音量调节的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_LowBattery
|
||||
@brief 低电量的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_PlugIn
|
||||
@brief 电源接入的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_PlugOut
|
||||
@brief 电源移除的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_DeviceAdded
|
||||
@brief 移动设备接入的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_DeviceRemoved
|
||||
@brief 移动设备移除的音效
|
||||
@var Dtk::Gui::DDesktopServices::SSE_Error
|
||||
@brief 错误提示的音效
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFolder(const QString &localFilePath, const QString &startupId = QString())
|
||||
@details 通过文件管理器显示目录
|
||||
@param[in] localFilePath 要显示的目录路径
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFolders(const QList<QString> &localFilePaths, const QString &startupId = QString())
|
||||
@details 通过文件管理器显示多个目录
|
||||
@param[in] localFilePaths 要显示的目录路径列表
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFolder(const QUrl &url, const QString &startupId = QString())
|
||||
@details 通过文件管理器显示目录
|
||||
@param[in] url 要显示的目录 QUrl 形式路径
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFolders(const QList<QUrl> &urls, const QString &startupId = QString())
|
||||
@details 通过文件管理器显示多个目录
|
||||
@param[in] urls 要显示的目录路径 url 列表
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFileItemProperty(const QString &localFilePath, const QString &startupId = QString())
|
||||
@details 通过文件管理器显示文件的属性
|
||||
@param[in] localFilePath 要显示的文件路径
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFileItemProperties(const QList<QString> &localFilePaths, const QString &startupId = QString())
|
||||
@details 通过文件管理器显示多个文件的属性
|
||||
@param[in] localFilePaths 要显示的文件路径列表
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFileItemProperty(const QUrl &url, const QString &startupId = QString())
|
||||
@details 通过文件管理器显示文件的属性
|
||||
@param[in] url 要显示的文件 QUrl 形式路径
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFileItemProperties(const QList<QUrl> &urls, const QString &startupId = QString())
|
||||
@details 通过文件管理器显示多个文件的属性
|
||||
@param[in] urls 要显示的目录路径 url 列表
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFileItem(const QString &localFilePath, const QString &startupId = QString())
|
||||
@details 通过文件管理器在父目录中显示并选中文件(目录)
|
||||
@param[in] localFilePath 要显示(选中)的文件(目录)路径
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFileItems(const QList<QString> &localFilePaths, const QString &startupId = QString())
|
||||
@details 通过文件管理器父目录中显示并选中多个文件(目录)
|
||||
@param[in] localFilePaths 要显示(选中)的文件(目录)路径列表
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFileItem(const QUrl &url, const QString &startupId = QString())
|
||||
@details 通过文件管理器在父目录中显示并选中文件(目录)
|
||||
@param[in] url 要显示(选中)的文件(目录)QUrl 形式路径
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::showFileItems(const QList<QUrl> &urls, const QString &startupId = QString())
|
||||
@details 通过文件管理器父目录中显示并选中多个文件(目录)
|
||||
@param[in] urls 要显示选中)的文件(目录)路径 url 列表
|
||||
@param[in] startupId 本次启动的id, 默认为空
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::trash(const QString &localFilePath)
|
||||
@details 通过文件管理器将文件移入回收站
|
||||
@param[in] localFilePath 要移入回收站的文件路径
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::trash(const QList<QString> &localFilePaths)
|
||||
@details 通过文件管理器将多个文件移入回收站
|
||||
@param[in] localFilePaths 要移入回收站的文件路径列表
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::trash(const QUrl &url)
|
||||
@details 通过文件管理器将文件移入回收站
|
||||
@param[in] url 要移入回收站的文件 url 路径
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::trash(const QList<QUrl> &urls)
|
||||
@details 通过文件管理器将多个文件移入回收站
|
||||
@param[in] urls 要移入回收站的文件路径 url 列表
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::playSystemSoundEffect(const SystemSoundEffect &effect)
|
||||
@details 播放系统音效。如果系统音效被禁用或者要播放音效被禁用将播放失败
|
||||
@param[in] effect 要播放的音效,见枚举 Dtk::Gui::DDesktopServices::SystemSoundEffect
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::playSystemSoundEffect(const QString &name)
|
||||
@details 根据音效名播放系统音效。如果系统音效被禁用或者要播放音效被禁用将播放失败
|
||||
@param[in] name 要播放的音效名称,见 Dtk::Gui::DDesktopServices::getNameByEffectType
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::previewSystemSoundEffect(const SystemSoundEffect &effect)
|
||||
@details 系统音效预览。
|
||||
@param[in] effect 要播放的音效,见枚举 Dtk::Gui::DDesktopServices::SystemSoundEffect
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::previewSystemSoundEffect(const QString &name)
|
||||
@details 根据音效名预览系统音效。
|
||||
@param[in] name 要播放的音效名称,见 Dtk::Gui::DDesktopServices::getNameByEffectType
|
||||
@return 调用成功返回 true, 否则返回 false
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::getNameByEffectType(const SystemSoundEffect &effect)
|
||||
@details 根据音效名预览系统音效。
|
||||
@param[in] effect 要获取名称的音效,见枚举 Dtk::Gui::DDesktopServices::SystemSoundEffect
|
||||
@return QString effect 对应的音效名称
|
||||
|
||||
@fn Dtk::Gui::DDesktopServices::errorMessage()
|
||||
@details 文件管理器相关调用出错时可以通过此接口获取错误信息
|
||||
@return 错误信息
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
/*!
|
||||
@~chinese
|
||||
@file include/util/dicontheme.h
|
||||
@ingroup dci
|
||||
@brief Dtk 图标主题工具类
|
||||
|
||||
@namespace Dtk::Gui::DIconTheme dicontheme.h
|
||||
@details 用于提供一些接口,包括查找图标(包括 QIcon 和 DCI 图标 ),图标搜索路径等。
|
||||
|
||||
@enum Dtk::Gui::DIconTheme::Option
|
||||
@brief 查找图标时的选项
|
||||
@var Dtk::Gui::DIconTheme::DontFallbackToQIconFromTheme
|
||||
@brief 是否**不使用** QIcon::fromTheme 的方式去查找图标,当设置此 flag 时查找图标失败时直接返回空图标对象,否则回退到通过 QIcon::fromTheme 查找图标
|
||||
@var Dtk::Gui::DIconTheme::IgnoreBuiltinIcons
|
||||
@brief 是否忽略通过内置图标引擎方式查找图标资源,当设置此 flag 时查找图标会跳过内置图标引擎的方式查找图标资源,否则优先尝试内置图标引擎查找资源。
|
||||
|
||||
@class Dtk::Gui::DIconTheme::Cached
|
||||
@details 图标查找缓存类,提供的查找图标接口,如果找到会加入缓存,下次查找会更快。
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::Cached::Cached()
|
||||
@details 图标缓存构造函数
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::Cached::~Cached()
|
||||
@details 图标缓存析构函数
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::Cached::maxCost() const
|
||||
@details 返回允许的最大缓存数量
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::Cached::setMaxCost(int cost)
|
||||
@details 将最大允许的缓存数量设置为 cost 。如果当前的缓存数量大于 cost ,则某些缓存对象会立即删除。
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::Cached::clear()
|
||||
@details 清理所有缓存
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::Cached::findQIcon(const QString &iconName, Options options, const QIcon &fallback)
|
||||
@details 通过 iconName 查找 QIcon 的接口,找到时会加入缓存
|
||||
@param[in] iconName 要查找的图标名称
|
||||
@param[in] options 要查找的选项
|
||||
@param[in] fallback 图标查找失败时可以返回用户指定的 fallback 对象,默认为空
|
||||
@sa DIconTheme::findQIcon
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::Cached::findDciIconFile(const QString &iconName, const QString &themeName, const QString &fallback)
|
||||
@details 通过指定图标名 iconName 和主题名 themeName 查找 DCI 图标文件路径的接口,找到时会加入缓存
|
||||
@param[in] iconName 要查找的图标名称
|
||||
@param[in] options 指定 DCI 图标主题
|
||||
@param[in] fallback 图标查找失败时可以返回用户指定的 fallback ,默认为空
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::cached()
|
||||
@details 获取(首次次调用时构造)缓存对象。
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::findQIcon(const QString &iconName, Options options)
|
||||
@details 返回 DIconTheme::createIconEngine 接口创建的图标引擎构造 QIcon,当没有设置 DontFallbackToQIconFromTheme 和 createIconEngine 失败时回退到 QIcon::fromTheme
|
||||
@param[in] iconName 要查找的图标名称
|
||||
@param[in] options 要查找的选项, 选项默认为空
|
||||
@sa DIconTheme::Cached::findQIcon
|
||||
@sa DIconTheme::createIconEngine
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::findQIcon(const QString &iconName, const QIcon &fallback, Options options)
|
||||
@details 重载 DIconTheme::findQIcon, 当查找图标失败时返回调用者中提供的 fallback 图标
|
||||
@param[in] iconName 要查找的图标名称
|
||||
@param[in] options 要查找的选项, 选项默认为空
|
||||
@param[in] fallback 如果 iconName 无法找到, 返回此图标
|
||||
@sa DIconTheme::Cached::findQIcon
|
||||
@sa DIconTheme::createIconEngine
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::createIconEngine(const QString &iconName, Options options)
|
||||
@details 通过图标名构造图标引擎, 如果未设置 IgnoreBuiltinIcons 标志则优先尝试 qrc:/icons/deepin/builtin 目录查找图标来构造内置图标引擎,否则构造 XDG 图标引擎。
|
||||
@param[in] iconName 图标名称
|
||||
@param[in] options 选项, 选项默认为 DIconTheme::DontFallbackToQIconFromTheme
|
||||
@return QIconEngine 对象指针,注意图标查找失败时返回 nullptr。
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::findDciIconFile(const QString &iconName, const QString &themeName)
|
||||
@details 通过指定图标名 iconName 和主题名 themeName 查找 DCI 图标文件路径的接口
|
||||
@param[in] iconName 要查找的图标名称
|
||||
@param[in] options 指定 DCI 图标主题
|
||||
@return 返回找到的 DCI 图标文件路径
|
||||
@sa DDciIcon::fromTheme
|
||||
@sa DIconTheme::dciThemeSearchPaths()
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::dciThemeSearchPaths()
|
||||
@details 返回 DCI 图标的搜索路径。默认会从这些路径查找 /usr/share/dsg/icons/$theme_name, qrc:/dsg/icons/$theme_name, qrc:/dsg/built-in-icons
|
||||
@sa DIconTheme::findDciIconFile
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::setDciThemeSearchPaths(const QStringList &path)
|
||||
@details 设置查找 DCI 图标的搜索路径
|
||||
@sa DIconTheme::dciThemeSearchPaths
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::isBuiltinIcon(const QIcon &icon)
|
||||
@details 返回 QIcon 是否为内置图标,`内置图标` 是 DTK 中规定的一类集成在二进制内部的图标资源,其一般放置于 qrc:/icons/deepin/builtin 的路径下,在使用 findQIcon 或 createIconEngine 时,如找到此路径下对应的图标文件,则会为其使用一个自定义的 QIconEngine 进行渲染。此方法即通过判断 icon 所使用的 QIconEngine 确认其是否为内置图标。
|
||||
|
||||
@fn Dtk::Gui::DIconTheme::isXdgIcon(const QIcon &icon)
|
||||
@details 返回 QIcon 是否为 XDG 图标, XDG 图标一般放置于系统图标主题目录(如:/usr/share/icons)。和 isBuiltinIcon 类似,此方法是通过判断 icon 所使用的 QIconEngine 确认其是否为 XDG 图标。
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
@page util util--dtkgui工具组件
|
||||
|
||||
# Dtk-Gui util:dtk工具组件
|
||||
|
||||
TODO:添加组件说明
|
||||
|
||||
|
||||
@defgroup dci
|
||||
@brief dci图标操作类
|
||||
@details
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
message(STATUS "Current Qt Version: ${QT_VERSION_MAJOR}")
|
||||
|
||||
set(LIB_NAME dtk${DTK_VERSION_MAJOR}gui)
|
||||
|
||||
# Set install path
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX /usr)
|
||||
endif ()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(CMakePackageConfigHelpers)
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# Set build option
|
||||
option(DTK_DISABLE_LIBXDG "Disable libxdg" OFF)
|
||||
option(DTK_DISABLE_LIBRSVG "Disable librsvg" OFF)
|
||||
option(DTK_DISABLE_EX_IMAGE_FORMAT "Disable libraw and freeimage" OFF)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
if("${QT_VERSION_MAJOR}" STREQUAL "5")
|
||||
set (BUILD_DOCS ON CACHE BOOL "Generate doxygen-based documentation")
|
||||
else()
|
||||
# dtk6 not build doc
|
||||
set (BUILD_DOCS OFF CACHE BOOL "Generate doxygen-based documentation")
|
||||
endif()
|
||||
|
||||
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/dtk${PROJECT_VERSION_MAJOR}/DGui")
|
||||
set(TOOL_INSTALL_DIR "${CMAKE_INSTALL_LIBEXECDIR}/dtk${PROJECT_VERSION_MAJOR}/DGui/bin")
|
||||
set(LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
|
||||
set(MKSPECS_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/mkspecs/modules" CACHE STRING "Install dir for qt pri module files")
|
||||
set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}Gui")
|
||||
set(PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wextra -fopenmp")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(BUILD_TESTING ON)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -fno-omit-frame-pointer")
|
||||
else ()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast")
|
||||
endif ()
|
||||
|
||||
set(CONFIGNAME include/global/dtkgui_config.h)
|
||||
file(WRITE ${CONFIGNAME}
|
||||
"// This is an auto-generated header, please don't modify it.\n"
|
||||
)
|
||||
file(GLOB CONFIGSOURCE include/DtkGui/*)
|
||||
|
||||
foreach(FILENAME ${CONFIGSOURCE})
|
||||
get_filename_component(thefile ${FILENAME} NAME)
|
||||
file(APPEND ${CONFIGNAME} "#define DTKGUI_CLASS_${thefile}\n")
|
||||
endforeach()
|
||||
|
||||
# Generate cmake config file
|
||||
configure_package_config_file(misc/DtkGuiConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Dtk${DTK_VERSION_MAJOR}GuiConfig.cmake
|
||||
INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||
PATH_VARS TOOL_INSTALL_DIR
|
||||
)
|
||||
# Generate cmake version file
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Dtk${DTK_VERSION_MAJOR}GuiConfigVersion.cmake"
|
||||
VERSION ${DTK_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
# Install cmake config file and version file to CONFIG_INSTALL_DIR
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Dtk${DTK_VERSION_MAJOR}GuiConfig.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Dtk${DTK_VERSION_MAJOR}GuiConfigVersion.cmake
|
||||
DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||
)
|
||||
# Install pkgconfig file
|
||||
configure_file(misc/dtkgui.pc.in dtk${DTK_VERSION_MAJOR}gui.pc @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtk${DTK_VERSION_MAJOR}gui.pc DESTINATION "${PKGCONFIG_INSTALL_DIR}")
|
||||
# Install pri module
|
||||
configure_file(misc/qt_lib_dtkgui.pri.in qt_lib_dtkgui.pri @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qt_lib_dtkgui.pri DESTINATION "${MKSPECS_INSTALL_DIR}")
|
||||
|
||||
set(GUISGNAME DtkGuis)
|
||||
|
||||
file(WRITE ${GUISGNAME}
|
||||
"// This is an auto-generated header, please don't modify it.\n"
|
||||
"#ifndef DTK_GUI_MODULE_H\n"
|
||||
"#define DTK_GUI_MODULE_H\n"
|
||||
)
|
||||
file(GLOB FILEGRAGTOWRITSOURCE include/filedrag/*)
|
||||
|
||||
foreach(FILENAME ${FILEGRAGTOWRITSOURCE})
|
||||
get_filename_component(thefile ${FILENAME} NAME)
|
||||
file(APPEND ${GUISGNAME} "#include \"${thefile}\"\n")
|
||||
endforeach()
|
||||
file(GLOB KERNELTOWRITESOURCE include/kernel/*)
|
||||
foreach(FILENAME ${KERNELTOWRITESOURCE})
|
||||
get_filename_component(thefile ${FILENAME} NAME)
|
||||
file(APPEND ${GUISGNAME} "#include \"${thefile}\"\n")
|
||||
endforeach()
|
||||
file(GLOB UTILTOWRITESOURCE include/util/*)
|
||||
foreach(FILENAME ${UTILTOWRITESOURCE})
|
||||
get_filename_component(thefile ${FILENAME} NAME)
|
||||
file(APPEND ${GUISGNAME} "#include \"${thefile}\"\n")
|
||||
endforeach()
|
||||
file(APPEND ${GUISGNAME} "#endif")
|
||||
install(FILES DtkGuis DESTINATION "${INCLUDE_INSTALL_DIR}")
|
||||
|
||||
# Find common dependencies
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui DBus Network)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED Core)
|
||||
find_package(DtkBuildHelper REQUIRED)
|
||||
pkg_check_modules(librsvg REQUIRED IMPORTED_TARGET librsvg-2.0)
|
||||
|
||||
if(NOT DTK_DISABLE_LIBXDG)
|
||||
# Only use libxdg under Qt5
|
||||
if (${QT_VERSION_MAJOR} STREQUAL "5")
|
||||
find_package(Qt5XdgIconLoader REQUIRED)
|
||||
if (NOT Qt5XdgIconLoader_FOUND)
|
||||
message(WARNING " XdgIconLoader Not Found, DISABLE LIBXDG !")
|
||||
set (DTK_DISABLE_LIBXDG ON)
|
||||
endif()
|
||||
else()
|
||||
set (DTK_DISABLE_LIBXDG ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check optional image handler dependencies.
|
||||
find_package(FreeImage)
|
||||
pkg_check_modules(libraw IMPORTED_TARGET libraw)
|
||||
if(FreeImage_FOUND AND libraw_FOUND)
|
||||
set(EX_IMAGE_FORMAT_LIBS_FOUND ON)
|
||||
endif()
|
||||
|
||||
set(OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_subdirectory(src ${OUTPUT_DIR}/src)
|
||||
if(BUILD_TESTING)
|
||||
enable_testing()
|
||||
add_subdirectory(tests ${OUTPUT_DIR}/tests)
|
||||
endif()
|
||||
add_subdirectory(tools ${OUTPUT_DIR}/tools)
|
||||
add_subdirectory(examples ${OUTPUT_DIR}/examples)
|
||||
|
||||
if (BUILD_DOCS)
|
||||
add_subdirectory(docs ${OUTPUT_DIR}/docs)
|
||||
endif ()
|
||||
|
|
@ -1 +0,0 @@
|
|||
load(dtk_lib)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
add_subdirectory(dnd-example)
|
||||
#add_subdirectory(test-taskbar) # Don't build
|
||||
#add_subdirectory(frameless-window) # Don't build
|
||||
add_subdirectory(animation-dci)
|
||||
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
|||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
find_package(Dtk${DTK_VERSION_MAJOR}Core REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
|
||||
|
||||
set(BIN_NAME animation-dci)
|
||||
set(TARGET ${BIN_NAME}${DTK_VERSION_MAJOR})
|
||||
|
||||
add_executable(${TARGET}
|
||||
main.cpp
|
||||
test_dci_icon.qrc
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
${TARGET} PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
dtk${DTK_VERSION_MAJOR}gui
|
||||
)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${BIN_NAME})
|
||||
Binary file not shown.
|
|
@ -0,0 +1,166 @@
|
|||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#include <QApplication>
|
||||
#include <QWidget>
|
||||
#include <QImage>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QLabel>
|
||||
#include <QEvent>
|
||||
#include <QDebug>
|
||||
#include <QDateTime>
|
||||
#include <QMainWindow>
|
||||
#include <QStatusBar>
|
||||
#include <QMenuBar>
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QFileDialog>
|
||||
|
||||
#include <DDciIcon>
|
||||
#include <DDciIconPlayer>
|
||||
#include <QDropEvent>
|
||||
#include <QMimeData>
|
||||
|
||||
DGUI_USE_NAMESPACE
|
||||
|
||||
static QString iconModeToString(DDciIcon::Mode mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case DDciIcon::Normal:
|
||||
return "Normal";
|
||||
case DDciIcon::Hover:
|
||||
return "Hover";
|
||||
case DDciIcon::Pressed:
|
||||
return "Pressed";
|
||||
case DDciIcon::Disabled:
|
||||
return "Disabled";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
class IconWidget : public QMainWindow
|
||||
{
|
||||
public:
|
||||
IconWidget(const QString &iconName)
|
||||
{
|
||||
setCentralWidget(label = new QLabel(this));
|
||||
label->setAcceptDrops(true);
|
||||
centralWidget()->setAttribute(Qt::WA_MouseTracking);
|
||||
centralWidget()->installEventFilter(this);
|
||||
statusBar()->addWidget(message = new QLabel());
|
||||
|
||||
auto normal = new QPushButton("Normal");
|
||||
connect(normal, &QPushButton::clicked, this, [this] {
|
||||
player.setMode(DDciIcon::Normal);
|
||||
});
|
||||
auto hover = new QPushButton("Hover");
|
||||
connect(hover, &QPushButton::clicked, this, [this] {
|
||||
player.setMode(DDciIcon::Hover);
|
||||
});
|
||||
auto pressed = new QPushButton("Pressed");
|
||||
connect(pressed, &QPushButton::clicked, this, [this] {
|
||||
player.setMode(DDciIcon::Pressed);
|
||||
});
|
||||
auto disabled = new QPushButton("Disabled");
|
||||
connect(disabled, &QPushButton::clicked, this, [this] {
|
||||
player.setMode(DDciIcon::Disabled);
|
||||
});
|
||||
|
||||
auto open = new QPushButton("...");
|
||||
connect(open, &QPushButton::clicked, this, [this] {
|
||||
QString dciFile = QFileDialog::getOpenFileName(this, "select a dci icon file", "", "*.dci");
|
||||
player.setIcon(DDciIcon(dciFile));
|
||||
player.setMode(DDciIcon::Normal);
|
||||
});
|
||||
|
||||
QWidget *menuWidget = new QWidget(this);
|
||||
QHBoxLayout *layout = new QHBoxLayout(menuWidget);
|
||||
layout->addWidget(normal);
|
||||
layout->addWidget(hover);
|
||||
layout->addWidget(pressed);
|
||||
layout->addWidget(disabled);
|
||||
layout->addWidget(open);
|
||||
setMenuWidget(menuWidget);
|
||||
|
||||
icon = DDciIcon::fromTheme(iconName);
|
||||
|
||||
connect(&player, &DDciIconPlayer::updated, this, [this] {
|
||||
auto image = player.currentImage();
|
||||
label->setPixmap(QPixmap::fromImage(image));
|
||||
});
|
||||
connect(&player, &DDciIconPlayer::modeChanged, this, [this] (DDciIcon::Mode old, DDciIcon::Mode newMode) {
|
||||
message->setText(QString("Old State: %1, Current State: %2")
|
||||
.arg(iconModeToString(old))
|
||||
.arg(iconModeToString(newMode)));
|
||||
});
|
||||
|
||||
DDciIconPalette p("pink");
|
||||
player.setPalette(p);
|
||||
player.setDevicePixelRatio(devicePixelRatioF());
|
||||
player.setIcon(icon);
|
||||
}
|
||||
|
||||
private:
|
||||
bool event(QEvent *event) override {
|
||||
if (event->type() == QEvent::WindowActivate) {
|
||||
player.play(DDciIcon::Normal);
|
||||
}
|
||||
return QMainWindow::event(event);
|
||||
}
|
||||
bool eventFilter(QObject *watched, QEvent *event) {
|
||||
if (watched != label)
|
||||
return QMainWindow::eventFilter(watched, event);
|
||||
|
||||
if (event->type() == QEvent::Enter) {
|
||||
player.setMode(DDciIcon::Hover);
|
||||
} else if (event->type() == QEvent::Leave) {
|
||||
if (player.mode() == DDciIcon::Hover)
|
||||
player.setMode(DDciIcon::Normal);
|
||||
} else if (event->type() == QEvent::MouseButtonPress) {
|
||||
player.setMode(DDciIcon::Pressed);
|
||||
} else if (event->type() == QEvent::MouseButtonRelease) {
|
||||
player.setMode(label->hasMouseTracking() ? DDciIcon::Hover : DDciIcon::Normal);
|
||||
} else if (event->type() == QEvent::DragEnter) {
|
||||
event->accept();
|
||||
} else if (event->type() == QEvent::Drop) {
|
||||
auto de = static_cast<QDropEvent *>(event);
|
||||
if (de->mimeData()->hasFormat("text/uri-list")) {
|
||||
QString uris = de->mimeData()->data("text/uri-list");
|
||||
QUrl url(uris.split("\r\n").value(0));
|
||||
|
||||
DDciIcon icon(url.path());
|
||||
if (!icon.isNull()) {
|
||||
player.setIcon(icon);
|
||||
player.setMode(DDciIcon::Normal);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
DDciIcon icon;
|
||||
DDciIconPlayer player;
|
||||
|
||||
QLabel *message = nullptr;
|
||||
QLabel *label = nullptr;
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
IconWidget *window = new IconWidget(QStringLiteral("test_heart"));
|
||||
|
||||
window->setMinimumSize(300, 300);
|
||||
window->show();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="/dsg/built-in-icons/test_heart.dci">dci_heart.dci</file>
|
||||
<file alias="/dsg/built-in-icons/test_static_3depict.dci">3depict.dci</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
|
||||
|
||||
set(BIN1 dnd-test-client)
|
||||
set(BIN2 dnd-test-server)
|
||||
set(TARGET1 ${BIN1}${DTK_VERSION_MAJOR})
|
||||
set(TARGET2 ${BIN2}${DTK_VERSION_MAJOR})
|
||||
|
||||
add_executable(${TARGET1}
|
||||
dnd-test-client.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(${TARGET1} PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::DBus
|
||||
${LIB_NAME}
|
||||
)
|
||||
|
||||
add_executable(${TARGET2}
|
||||
dnd-test-server.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(${TARGET2} PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::DBus
|
||||
${LIB_NAME}
|
||||
)
|
||||
|
||||
set_target_properties(${TARGET1} PROPERTIES OUTPUT_NAME ${BIN1})
|
||||
set_target_properties(${TARGET2} PROPERTIES OUTPUT_NAME ${BIN2})
|
||||
|
||||
install(TARGETS ${TARGET1} DESTINATION "${TOOL_INSTALL_DIR}")
|
||||
install(TARGETS ${TARGET2} DESTINATION "${TOOL_INSTALL_DIR}")
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#include "dfiledragclient.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QFrame>
|
||||
#include <QDragEnterEvent>
|
||||
#include <QDragMoveEvent>
|
||||
#include <QDropEvent>
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QProgressBar>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QTimer>
|
||||
|
||||
#include <QDBusConnectionInterface>
|
||||
|
||||
DGUI_USE_NAMESPACE
|
||||
|
||||
static DFileDragClient *c;
|
||||
static QProgressBar *p;
|
||||
|
||||
class DropArea : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DropArea(QString s)
|
||||
: lb(new QLabel(s, this))
|
||||
, le(new QLineEdit(this))
|
||||
{
|
||||
setLayout(new QVBoxLayout);
|
||||
setFrameShape(Shape::Box);
|
||||
layout()->addWidget(lb);
|
||||
layout()->addWidget(le);
|
||||
lb->setAlignment(Qt::AlignmentFlag::AlignCenter);
|
||||
le->setText("/tmp");
|
||||
le->setPlaceholderText(QString("do not accept drop when edit is empty"));
|
||||
setAcceptDrops(true);
|
||||
}
|
||||
protected:
|
||||
void dragEnterEvent(QDragEnterEvent *e)
|
||||
{
|
||||
if (DFileDragClient::checkMimeData(e->mimeData())) {
|
||||
if (le->text().isEmpty())
|
||||
e->ignore(); // or e->setDropAction(Qt::IgnoreAction);
|
||||
else
|
||||
e->acceptProposedAction();
|
||||
|
||||
DFileDragClient::setTargetUrl(e->mimeData(), QUrl(le->text()));
|
||||
}
|
||||
}
|
||||
void dragMoveEvent(QDragMoveEvent *e)
|
||||
{
|
||||
if (DFileDragClient::checkMimeData(e->mimeData())) {
|
||||
e->acceptProposedAction();
|
||||
DFileDragClient::setTargetUrl(e->mimeData(), QUrl(le->text()));
|
||||
}
|
||||
}
|
||||
void dropEvent(QDropEvent *e)
|
||||
{
|
||||
if (DFileDragClient::checkMimeData(e->mimeData())) {
|
||||
e->acceptProposedAction();
|
||||
DFileDragClient::setTargetUrl(e->mimeData(), QUrl(le->text()));
|
||||
c = new DFileDragClient(e->mimeData());
|
||||
connect(c, &DFileDragClient::progressChanged, p, &QProgressBar::setValue);
|
||||
}
|
||||
}
|
||||
private:
|
||||
QLabel *lb;
|
||||
QLineEdit *le;
|
||||
};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
QDialog d;
|
||||
d.show();
|
||||
|
||||
QHBoxLayout *lo = new QHBoxLayout();
|
||||
lo->addWidget(new DropArea("area 51"));
|
||||
lo->addWidget(new DropArea("area 61"));
|
||||
|
||||
QScopedPointer<QProgressBar> pp (new QProgressBar());
|
||||
p = pp.data();
|
||||
p->setMinimum(0);
|
||||
p->setMaximum(100);
|
||||
|
||||
QVBoxLayout *hlo = new QVBoxLayout();
|
||||
d.setLayout(hlo);
|
||||
hlo->addLayout(lo);
|
||||
hlo->addWidget(p);
|
||||
|
||||
a.exec();
|
||||
}
|
||||
|
||||
#include "dnd-test-client.moc"
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#include "dfiledragserver.h"
|
||||
#include "dfiledrag.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QLabel>
|
||||
#include <QTimer>
|
||||
#include <QMimeData>
|
||||
#include <QApplication>
|
||||
#include <QMouseEvent>
|
||||
#include <QVBoxLayout>
|
||||
#include <QProgressBar>
|
||||
#include <QDebug>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
DGUI_USE_NAMESPACE
|
||||
|
||||
static int p;
|
||||
static DFileDragServer *s = nullptr;
|
||||
static QLabel *lbr = nullptr;
|
||||
|
||||
class DraggableLabel : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using QLabel::QLabel;
|
||||
|
||||
Q_SIGNALS:
|
||||
void dragFinished();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
if (e->button() == Qt::MouseButton::LeftButton) {
|
||||
dragpos = e->pos();
|
||||
}
|
||||
}
|
||||
|
||||
void mouseMoveEvent(QMouseEvent *e)
|
||||
{
|
||||
if (!(e->buttons() & Qt::MouseButton::LeftButton) || s) {
|
||||
return;
|
||||
}
|
||||
if ((e->pos() - dragpos).manhattanLength() < QApplication::startDragDistance()) {
|
||||
return;
|
||||
}
|
||||
|
||||
s = new DFileDragServer();
|
||||
DFileDrag *drag = new DFileDrag(this, s);
|
||||
QMimeData *m = new QMimeData();
|
||||
m->setText("your stuff here");
|
||||
drag->setMimeData(m);
|
||||
|
||||
connect(drag, &DFileDrag::targetUrlChanged, [drag] {
|
||||
lbr->setText(drag->targetUrl().toString());
|
||||
});
|
||||
|
||||
Qt::DropAction res = drag->exec(Qt::MoveAction);
|
||||
if (res!= Qt::IgnoreAction)
|
||||
Q_EMIT dragFinished();
|
||||
else {
|
||||
s->deleteLater();
|
||||
s = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
QPoint dragpos;
|
||||
};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
QDialog d;
|
||||
d.show();
|
||||
|
||||
DraggableLabel l("Drag me", &d);
|
||||
l.setAlignment(Qt::AlignCenter);
|
||||
|
||||
QTimer t;
|
||||
t.setInterval(50);
|
||||
t.setSingleShot(false);
|
||||
|
||||
QProgressBar pg;
|
||||
pg.setMinimum(0);
|
||||
pg.setMaximum(100);
|
||||
|
||||
QLabel lb;
|
||||
lbr = &lb;
|
||||
lb.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||
|
||||
QObject::connect(&l, &DraggableLabel::dragFinished, [&t] {
|
||||
p = -1;
|
||||
t.start();
|
||||
});
|
||||
|
||||
QObject::connect(&t, &QTimer::timeout, [&t, &pg] {
|
||||
if (QRandomGenerator::global()->generate() & 1) {
|
||||
s->setProgress(++p);
|
||||
pg.setValue(p);
|
||||
if(p == 100) {
|
||||
t.stop();
|
||||
s->deleteLater();
|
||||
s = nullptr;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
QVBoxLayout lo;
|
||||
lo.addWidget(&l);
|
||||
lo.addWidget(&pg);
|
||||
lo.addWidget(&lb);
|
||||
d.setLayout(&lo);
|
||||
|
||||
a.exec();
|
||||
}
|
||||
|
||||
#include "dnd-test-server.moc"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS X11Extras)
|
||||
pkg_check_modules(XCB IMPORTED_TARGET xcb)
|
||||
|
||||
set(BIN_NAME frameless-window)
|
||||
|
||||
add_executable(${BIN_NAME}
|
||||
main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(${BIN_NAME} PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::GuiPrivate
|
||||
Qt${QT_VERSION_MAJOR}::X11Extras
|
||||
PkgConfig::XCB
|
||||
)
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QWindow>
|
||||
#include <QX11Info>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include <qpa/qplatformwindow.h>
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
void setWindowProperty(quint32 WId, xcb_atom_t propAtom, xcb_atom_t typeAtom, const void *data, quint32 len, uint8_t format)
|
||||
{
|
||||
xcb_connection_t* conn = QX11Info::connection();
|
||||
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, WId, propAtom, typeAtom, format, len, data);
|
||||
xcb_flush(conn);
|
||||
}
|
||||
|
||||
void clearWindowProperty(quint32 WId, xcb_atom_t propAtom)
|
||||
{
|
||||
xcb_delete_property_checked(QX11Info::connection(), WId, propAtom);
|
||||
}
|
||||
|
||||
xcb_atom_t internAtom(xcb_connection_t *connection, const char *name, bool only_if_exists)
|
||||
{
|
||||
if (!name || *name == 0)
|
||||
return XCB_NONE;
|
||||
|
||||
xcb_intern_atom_cookie_t cookie = xcb_intern_atom(connection, only_if_exists, strlen(name), name);
|
||||
xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(connection, cookie, 0);
|
||||
|
||||
if (!reply)
|
||||
return XCB_NONE;
|
||||
|
||||
xcb_atom_t atom = reply->atom;
|
||||
free(reply);
|
||||
|
||||
return atom;
|
||||
}
|
||||
|
||||
xcb_atom_t internAtom(const char *name, bool only_if_exists)
|
||||
{
|
||||
return internAtom(QX11Info::connection(), name, only_if_exists);
|
||||
}
|
||||
|
||||
bool isSupported(xcb_atom_t targetAtom)
|
||||
{
|
||||
// get _NET_SUPPORTED from root window
|
||||
QVector<xcb_atom_t> net_wm_atoms;
|
||||
|
||||
xcb_window_t root = QX11Info::appRootWindow();
|
||||
int offset = 0;
|
||||
int remaining = 0;
|
||||
xcb_connection_t *xcb_connection = QX11Info::connection();
|
||||
auto _net_supported = internAtom(QT_STRINGIFY(_NET_SUPPORTED), false);
|
||||
|
||||
do {
|
||||
xcb_get_property_cookie_t cookie = xcb_get_property(xcb_connection, false, root, _net_supported,
|
||||
XCB_ATOM_ATOM, offset, 1024);
|
||||
xcb_get_property_reply_t *reply = xcb_get_property_reply(xcb_connection, cookie, NULL);
|
||||
if (!reply)
|
||||
break;
|
||||
|
||||
remaining = 0;
|
||||
|
||||
if (reply->type == XCB_ATOM_ATOM && reply->format == 32) {
|
||||
int len = xcb_get_property_value_length(reply)/sizeof(xcb_atom_t);
|
||||
xcb_atom_t *atoms = (xcb_atom_t *)xcb_get_property_value(reply);
|
||||
int s = net_wm_atoms.size();
|
||||
net_wm_atoms.resize(s + len);
|
||||
memcpy(net_wm_atoms.data() + s, atoms, len*sizeof(xcb_atom_t));
|
||||
|
||||
remaining = reply->bytes_after;
|
||||
offset += len;
|
||||
}
|
||||
|
||||
free(reply);
|
||||
} while (remaining > 0);
|
||||
|
||||
return net_wm_atoms.contains(targetAtom);
|
||||
}
|
||||
|
||||
bool setNoTitlebar(quint32 WId, bool on)
|
||||
{
|
||||
xcb_atom_t _deepin_no_titlebar = internAtom(QT_STRINGIFY(_DEEPIN_NO_TITLEBAR), false);
|
||||
if (!isSupported(_deepin_no_titlebar))
|
||||
return false;
|
||||
|
||||
quint8 value = on;
|
||||
setWindowProperty(WId, _deepin_no_titlebar, XCB_ATOM_CARDINAL, &value, 1, 8);
|
||||
|
||||
// force enable window decorations, becouse we need the window shadow and border, its contains in decorations.
|
||||
xcb_atom_t _deepin_force_decorate = internAtom(QT_STRINGIFY(_DEEPIN_FORCE_DECORATE), false);
|
||||
if (on) {
|
||||
quint8 value = on;
|
||||
setWindowProperty(WId, _deepin_force_decorate, XCB_ATOM_CARDINAL, &value, 1, 8);
|
||||
} else {
|
||||
clearWindowProperty(WId, _deepin_force_decorate);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
QObject *createNativeSettingsFor(QWindow *window)
|
||||
{
|
||||
// The platform function in dxcb plugin:
|
||||
// https://github.com/linuxdeepin/qt5platform-plugins/blob/master/src/dnativesettings.h
|
||||
static QFunctionPointer build_function = qApp->platformFunction("_d_buildNativeSettings");
|
||||
|
||||
if (!build_function) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QObject *obj = new QObject(window);
|
||||
bool ok = reinterpret_cast<bool(*)(QObject*, quint32)>(build_function)(obj, window->winId());
|
||||
if (!ok) {
|
||||
delete obj;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
class Window : public QWindow
|
||||
{
|
||||
public:
|
||||
bool handleMoveing = false;
|
||||
|
||||
private:
|
||||
void mouseMoveEvent(QMouseEvent *e) override {
|
||||
if (handleMoveing && e->buttons() == Qt::LeftButton) {
|
||||
handle()->startSystemMove();
|
||||
} else {
|
||||
QWindow::mouseMoveEvent(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QGuiApplication app(argc, argv);
|
||||
Window window;
|
||||
window.resize(200, 200);
|
||||
|
||||
if (setNoTitlebar(window.winId(), true)) {
|
||||
// If enabled no titlebar mode, the window is no min/max/close buttons, you need to implement it by Qt widgets.
|
||||
// Like as https://github.com/linuxdeepin/dtkwidget/blob/master/src/widgets/dtitlebar.cpp
|
||||
window.handleMoveing = true;
|
||||
|
||||
auto nativeSettings = createNativeSettingsFor(&window);
|
||||
if (nativeSettings) {
|
||||
nativeSettings->setProperty("DTK/WindowRadius", "100,100");
|
||||
nativeSettings->setProperty("borderWidth", 2);
|
||||
nativeSettings->setProperty("borderColor", QColor(Qt::red));
|
||||
nativeSettings->setProperty("shadowOffset", "30,30");
|
||||
nativeSettings->setProperty("shadowRadius", 30);
|
||||
nativeSettings->setProperty("shadowColor", QColor(Qt::blue));
|
||||
// See more properties in DPlatformTheme
|
||||
}
|
||||
}
|
||||
|
||||
window.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
|
||||
|
||||
set(BIN taskbar)
|
||||
set(TARGET_NAME ${BIN}${DTK_VERSION_MAJOR})
|
||||
|
||||
add_executable(${TARGET_NAME}
|
||||
testtaskbarwindow.h
|
||||
testtaskbarwindow.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
${LIB_NAME}
|
||||
)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${BIN})
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#include <DGuiApplicationHelper>
|
||||
#include <DFontManager>
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include "testtaskbarwindow.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
auto name = QUuid::createUuid().toString() + QStringLiteral(".desktop");
|
||||
a.setDesktopFileName(name);
|
||||
QDir appDir = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
|
||||
QFile desktopFile(appDir.absoluteFilePath(name));
|
||||
if(!desktopFile.exists()) {
|
||||
desktopFile.open(QIODevice::WriteOnly);
|
||||
desktopFile.write("[Desktop Entry]\n");
|
||||
desktopFile.write("Type=Application\n");
|
||||
desktopFile.write("Version=1.1\n");
|
||||
desktopFile.write("Name=" + QApplication::applicationDisplayName().toUtf8() + "\n");
|
||||
desktopFile.write("Exec=" + QApplication::applicationFilePath().toUtf8() + "\n");
|
||||
desktopFile.close();
|
||||
}
|
||||
|
||||
TestTaskbarWindow *pTaskbarWindow = new TestTaskbarWindow;
|
||||
pTaskbarWindow->showMaximized();
|
||||
|
||||
//这里删除用于测试的desktop文件
|
||||
QObject::connect(pTaskbarWindow, &TestTaskbarWindow::closeWindow, [&desktopFile] {
|
||||
QFile::remove(desktopFile.fileName());
|
||||
});
|
||||
|
||||
//控制中心修改字体大小可以看到打印输出
|
||||
QObject::connect(DGuiApplicationHelper::instance()->fontManager(), &DFontManager::fontChanged, [] {
|
||||
qDebug() << DGuiApplicationHelper::instance()->fontManager()->baseFont();
|
||||
});
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#include "testtaskbarwindow.h"
|
||||
|
||||
#include <QIntValidator>
|
||||
#include <QApplication>
|
||||
#include <QCloseEvent>
|
||||
|
||||
TestTaskbarWindow::TestTaskbarWindow(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
QHBoxLayout *pHBoxLayout_1 = new QHBoxLayout;
|
||||
m_pProgressBox = new QCheckBox("progress");
|
||||
m_pProgress = new QSlider(Qt::Horizontal);
|
||||
m_pProgress->setRange(0, 100);
|
||||
m_pProgress->setMinimumWidth(300);
|
||||
pHBoxLayout_1->addWidget(m_pProgressBox);
|
||||
pHBoxLayout_1->addWidget(m_pProgress);
|
||||
|
||||
QHBoxLayout *pHBoxLayout_2 = new QHBoxLayout;
|
||||
m_pCounterBox = new QCheckBox("counter");
|
||||
m_pNumEdit = new QLineEdit;
|
||||
m_pNumEdit->setMinimumWidth(300);
|
||||
m_pNumEdit->setValidator(new QIntValidator);
|
||||
pHBoxLayout_2->addWidget(m_pCounterBox);
|
||||
pHBoxLayout_2->addWidget(m_pNumEdit);
|
||||
|
||||
m_pUrgencyBox= new QCheckBox("test urgency");
|
||||
QHBoxLayout *pHBoxLayout_3 = new QHBoxLayout;
|
||||
pHBoxLayout_3->addWidget(m_pUrgencyBox);
|
||||
|
||||
QVBoxLayout *pVBoxLayout = new QVBoxLayout;
|
||||
setLayout(pVBoxLayout);
|
||||
pVBoxLayout->addStretch();
|
||||
pVBoxLayout->addLayout(pHBoxLayout_1);
|
||||
pVBoxLayout->addSpacing(30);
|
||||
pVBoxLayout->addLayout(pHBoxLayout_2);
|
||||
pVBoxLayout->addSpacing(50);
|
||||
pVBoxLayout->addLayout(pHBoxLayout_3);
|
||||
pVBoxLayout->addStretch();
|
||||
|
||||
m_pTaskbarControl = new DTaskbarControl(this);
|
||||
m_pTaskbarControl->setProgress(false, 0);
|
||||
m_pTaskbarControl->setCounter(false, 0);
|
||||
|
||||
connect(m_pProgressBox, &QCheckBox::stateChanged, this, [this] (int state) {
|
||||
m_pTaskbarControl->setProgress(state == Qt::Checked, static_cast<double>(m_pProgress->value()) / 100);
|
||||
});
|
||||
|
||||
connect(m_pCounterBox, &QCheckBox::stateChanged, this, [this] (int state) {
|
||||
m_pTaskbarControl->setCounterVisible(state == Qt::Checked);
|
||||
});
|
||||
|
||||
connect(m_pProgress, &QSlider::valueChanged, this, [this] (int value) {
|
||||
m_pTaskbarControl->setProgress(m_pProgressBox->checkState() == Qt::Checked, static_cast<double>(value) / 100);
|
||||
});
|
||||
|
||||
connect(m_pNumEdit, &QLineEdit::textChanged, [this] (const QString &str) {
|
||||
m_pTaskbarControl->setCounter(m_pCounterBox->checkState() == Qt::Checked, str.toInt());
|
||||
});
|
||||
|
||||
connect(m_pUrgencyBox, &QCheckBox::stateChanged, this, [this] (int state) {
|
||||
m_pTaskbarControl->setUrgency(state == Qt::Checked);
|
||||
});
|
||||
}
|
||||
|
||||
TestTaskbarWindow::~TestTaskbarWindow()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void TestTaskbarWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
Q_EMIT closeWindow();
|
||||
event->accept();
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#ifndef TESTTASKBARWINDOW_H
|
||||
#define TESTTASKBARWINDOW_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPushButton>
|
||||
#include <QUuid>
|
||||
#include <QDir>
|
||||
#include <QStandardPaths>
|
||||
#include <QDebug>
|
||||
#include <QColor>
|
||||
#include <QCheckBox>
|
||||
#include <QSlider>
|
||||
#include <QColorDialog>
|
||||
#include <QLineEdit>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "dtaskbarcontrol.h"
|
||||
|
||||
DGUI_USE_NAMESPACE
|
||||
|
||||
class TestTaskbarWindow : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TestTaskbarWindow(QWidget *parent = nullptr);
|
||||
~TestTaskbarWindow();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
Q_SIGNALS:
|
||||
void closeWindow();
|
||||
|
||||
private:
|
||||
DTaskbarControl *m_pTaskbarControl;
|
||||
QCheckBox *m_pProgressBox;
|
||||
QCheckBox *m_pCounterBox;
|
||||
QLineEdit *m_pNumEdit;
|
||||
QSlider *m_pProgress;
|
||||
QCheckBox *m_pUrgencyBox;
|
||||
};
|
||||
|
||||
#endif // TESTTASKBARWINDOW_H
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "ddciicon.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "ddciiconplayer.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "ddciiconpalette.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "ddciiconplayer.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "ddesktopservices.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dfiledrag.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dfiledragclient.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dfiledragserver.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dfontmanager.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dicon.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dicontheme.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dimagehandler.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dregionmonitor.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dsvgrenderer.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dtaskbarcontrol.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#include "dthumbnailprovider.h"
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#ifndef DFILEDRAG_H
|
||||
#define DFILEDRAG_H
|
||||
|
||||
#include <dtkgui_global.h>
|
||||
|
||||
#include <DObject>
|
||||
|
||||
#include <QDrag>
|
||||
#include <QUrl>
|
||||
|
||||
DGUI_BEGIN_NAMESPACE
|
||||
|
||||
class DFileDragServer;
|
||||
class DFileDragPrivate;
|
||||
|
||||
class DFileDrag : public QDrag, public DCORE_NAMESPACE::DObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DFileDrag(QObject *source, DFileDragServer *server);
|
||||
|
||||
QUrl targetUrl();
|
||||
void setMimeData(QMimeData *data);
|
||||
|
||||
Q_SIGNALS:
|
||||
void targetUrlChanged(QUrl url);
|
||||
|
||||
private:
|
||||
D_DECLARE_PRIVATE(DFileDrag)
|
||||
};
|
||||
|
||||
DGUI_END_NAMESPACE
|
||||
|
||||
#endif // DFILEDRAG_H
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#ifndef DFILEDRAGCLIENT_H
|
||||
#define DFILEDRAGCLIENT_H
|
||||
|
||||
#include "dfiledragcommon.h"
|
||||
|
||||
#include <dtkgui_global.h>
|
||||
#include <DObject>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class QMimeData;
|
||||
|
||||
DGUI_BEGIN_NAMESPACE
|
||||
|
||||
class DFileDragClientPrivate;
|
||||
class DFileDragClient : public QObject, public DCORE_NAMESPACE::DObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DFileDragClient(const QMimeData *data, QObject *parent = nullptr);
|
||||
int progress() const;
|
||||
DFileDragState state() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void progressChanged(int progress);
|
||||
void stateChanged(DFileDragState state);
|
||||
void serverDestroyed();
|
||||
|
||||
public:
|
||||
static bool checkMimeData(const QMimeData *data);
|
||||
static void setTargetData(const QMimeData *data, QString key, QVariant value);
|
||||
static void setTargetUrl(const QMimeData *data, QUrl url);
|
||||
|
||||
private:
|
||||
D_DECLARE_PRIVATE(DFileDragClient)
|
||||
};
|
||||
|
||||
DGUI_END_NAMESPACE
|
||||
|
||||
#endif // DFILEDRAGCLIENT_H
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#ifndef DFILEDRAGCOMMON_H
|
||||
#define DFILEDRAGCOMMON_H
|
||||
|
||||
#include <dtkgui_global.h>
|
||||
|
||||
DGUI_BEGIN_NAMESPACE
|
||||
|
||||
enum DFileDragState
|
||||
{
|
||||
Failed = -1,
|
||||
Stalled,
|
||||
Paused,
|
||||
Running,
|
||||
Finished,
|
||||
CustomState = 0x100
|
||||
};
|
||||
|
||||
DGUI_END_NAMESPACE
|
||||
|
||||
#endif // DFILEDRAGCOMMON_H
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue