Compare commits
600 Commits
fix-python
...
v1.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fb70009cc | ||
|
|
289ddffbe2 | ||
|
|
54738bbea2 | ||
|
|
5c6eb352d6 | ||
|
|
f657399ef8 | ||
|
|
c4ffe10e12 | ||
|
|
efcad6d2be | ||
|
|
b6925c928a | ||
|
|
75368d334a | ||
|
|
d39ce8f66e | ||
|
|
805ea41d8a | ||
|
|
d7ed2494be | ||
|
|
0990337cdc | ||
|
|
e41cdb6f78 | ||
|
|
666673a251 | ||
|
|
34cb2ae5f0 | ||
|
|
51d8c2ff3e | ||
|
|
aa9f50d0f4 | ||
|
|
b7c36a2ec9 | ||
|
|
e18fb7ffd8 | ||
|
|
96439339c7 | ||
|
|
04d418b2e9 | ||
|
|
c04d856322 | ||
|
|
1c41c33f33 | ||
|
|
1dae128511 | ||
|
|
eab80c0545 | ||
|
|
288c3df30b | ||
|
|
e8728e8a35 | ||
|
|
94bfc4f2d1 | ||
|
|
d2da07508a | ||
|
|
7082e40cd5 | ||
|
|
2c8bbd10f7 | ||
|
|
ed8a401fe8 | ||
|
|
72428075f0 | ||
|
|
562db7c812 | ||
|
|
3ee15d1307 | ||
|
|
cf232dda34 | ||
|
|
bfeac02a45 | ||
|
|
22f4c36eb0 | ||
|
|
3dc56ea4ef | ||
|
|
cbedc06e97 | ||
|
|
8f85f28ed4 | ||
|
|
b5c2757874 | ||
|
|
46f57ffbbc | ||
|
|
fb6e2afd7b | ||
|
|
f74eb73326 | ||
|
|
ceb796d807 | ||
|
|
9a9488117c | ||
|
|
e55d75ba98 | ||
|
|
742763e6e5 | ||
|
|
d7242f17b7 | ||
|
|
eba395dc4c | ||
|
|
89635d8b98 | ||
|
|
f475312f11 | ||
|
|
9f604829dd | ||
|
|
85f829f97a | ||
|
|
e3bb0b3d48 | ||
|
|
22c0b6f9b6 | ||
|
|
200cb7aded | ||
|
|
4999fdd819 | ||
|
|
76aca4139a | ||
|
|
64276cb872 | ||
|
|
aad63d117b | ||
|
|
bd66af0a9f | ||
|
|
a21d80279e | ||
|
|
4347aefc8f | ||
|
|
b6341154fb | ||
|
|
16f6692b79 | ||
|
|
6c1026956a | ||
|
|
97679abb02 | ||
|
|
e173a4cfff | ||
|
|
26971ef1e2 | ||
|
|
d7bde47105 | ||
|
|
143c82291d | ||
|
|
979b2fdd40 | ||
|
|
46337d900b | ||
|
|
ec1f1bea9a | ||
|
|
d207028d60 | ||
|
|
a237eae508 | ||
|
|
243396f22b | ||
|
|
f240bf5d40 | ||
|
|
785db1b50c | ||
|
|
b6a7048a4f | ||
|
|
52bff59024 | ||
|
|
bba0195196 | ||
|
|
41fdb9c7df | ||
|
|
c1c1da25a8 | ||
|
|
b4e7b97646 | ||
|
|
2c687fe469 | ||
|
|
10e0402afa | ||
|
|
ebb1179167 | ||
|
|
15c196d865 | ||
|
|
e897ce6e8e | ||
|
|
83d9db1b64 | ||
|
|
60331fc654 | ||
|
|
e8f16dd172 | ||
|
|
44bd451362 | ||
|
|
1d2a791dfc | ||
|
|
a4ba45b423 | ||
|
|
12576970c6 | ||
|
|
e0ee7d14b0 | ||
|
|
66f447ad3f | ||
|
|
75db599142 | ||
|
|
a5c65ae039 | ||
|
|
5c055e0b8d | ||
|
|
090483f04e | ||
|
|
953219f6f3 | ||
|
|
8356bb0c3c | ||
|
|
758548f7a2 | ||
|
|
2aa16eb6d9 | ||
|
|
9d6cef24c1 | ||
|
|
52999d4cc9 | ||
|
|
bc2fff2c04 | ||
|
|
40fa4e98f8 | ||
|
|
a07f63a2c7 | ||
|
|
39c9a4da9b | ||
|
|
e0aa547393 | ||
|
|
08eab8882f | ||
|
|
04723ac3a9 | ||
|
|
c25043fa00 | ||
|
|
5372920cd0 | ||
|
|
28ae4c3b8c | ||
|
|
6158ebd520 | ||
|
|
b77430e574 | ||
|
|
fad81d595a | ||
|
|
0980a7f601 | ||
|
|
46830713e0 | ||
|
|
cd796db0ff | ||
|
|
29da5f4a8a | ||
|
|
315bdc71e5 | ||
|
|
a8965bea91 | ||
|
|
bf259c7ffc | ||
|
|
8a990451d7 | ||
|
|
974bdbd637 | ||
|
|
cb9d77cd18 | ||
|
|
af10efa587 | ||
|
|
a0fb47af58 | ||
|
|
598fbdc51b | ||
|
|
81c3f3f0c6 | ||
|
|
b9962b3df0 | ||
|
|
a71386e62a | ||
|
|
812ce1c08b | ||
|
|
189e82450b | ||
|
|
a3dbc3739c | ||
|
|
c8d34375af | ||
|
|
6c3775ea45 | ||
|
|
5a72e1adab | ||
|
|
0f7f310734 | ||
|
|
e8bf2a5222 | ||
|
|
468f545c9a | ||
|
|
a59ff6dfee | ||
|
|
4fa415ba05 | ||
|
|
d851c60b2f | ||
|
|
bf097098e5 | ||
|
|
8c93b85a24 | ||
|
|
f87d67dd59 | ||
|
|
bc3278b218 | ||
|
|
d2c55a67df | ||
|
|
a3414fd92b | ||
|
|
12f3ba9074 | ||
|
|
034d2c8aee | ||
|
|
ad3f4141c8 | ||
|
|
cde2e4e571 | ||
|
|
e0775467b2 | ||
|
|
b20ffcde61 | ||
|
|
43bdb6a4c2 | ||
|
|
929aabdc0d | ||
|
|
6a90a5125f | ||
|
|
77016a619f | ||
|
|
dc328ff7c4 | ||
|
|
dc13665566 | ||
|
|
d1279ab119 | ||
|
|
80bf6032f3 | ||
|
|
22437e75c6 | ||
|
|
801e49de9d | ||
|
|
a847a574ed | ||
|
|
ef8807bc09 | ||
|
|
d441477fa9 | ||
|
|
ece7b22bec | ||
|
|
97d8e4f18b | ||
|
|
9937f5d789 | ||
|
|
675edfe6db | ||
|
|
c23d179385 | ||
|
|
36af020505 | ||
|
|
7b2d195139 | ||
|
|
984ab3bb13 | ||
|
|
0331f90791 | ||
|
|
b19c53d650 | ||
|
|
3670cf2377 | ||
|
|
864670b0a1 | ||
|
|
0cf148b389 | ||
|
|
921d0892a0 | ||
|
|
beb2d9e659 | ||
|
|
59168da231 | ||
|
|
3dbf699c49 | ||
|
|
baa7561b13 | ||
|
|
ac5f4b871c | ||
|
|
52bf449366 | ||
|
|
08a1c4e6df | ||
|
|
156dad6e03 | ||
|
|
b642d2df2f | ||
|
|
5cedfab82c | ||
|
|
af9d62a58c | ||
|
|
0758496b0d | ||
|
|
a452723919 | ||
|
|
774e66ba6f | ||
|
|
f13de89db5 | ||
|
|
1393ae224f | ||
|
|
d92d7c258c | ||
|
|
619ca74051 | ||
|
|
aa39a71ae5 | ||
|
|
f4e33c1409 | ||
|
|
ad96336a36 | ||
|
|
50d1e75709 | ||
|
|
793c4e509b | ||
|
|
e4a33ad8b7 | ||
|
|
52cf53ce5c | ||
|
|
8791870efb | ||
|
|
4f8c47bfa4 | ||
|
|
ad141df6b1 | ||
|
|
72605292b7 | ||
|
|
1443eff1d9 | ||
|
|
22d5db32ce | ||
|
|
e9a321039f | ||
|
|
b93f115b53 | ||
|
|
7faaf2cc69 | ||
|
|
978f9d3a5e | ||
|
|
09793b3481 | ||
|
|
f4d9a96ddb | ||
|
|
4ac892038f | ||
|
|
387ba291be | ||
|
|
5d3d189774 | ||
|
|
a6a1047f75 | ||
|
|
3e70b846e8 | ||
|
|
0a2aebd78d | ||
|
|
ddad0feaf3 | ||
|
|
aba1cce1f6 | ||
|
|
7318675e84 | ||
|
|
cf700f8eb6 | ||
|
|
2c1d099c83 | ||
|
|
91ff29ae64 | ||
|
|
523dfb0d12 | ||
|
|
b84e0f3605 | ||
|
|
f72e8e6a1c | ||
|
|
c6c1fe79c3 | ||
|
|
ea382dcc17 | ||
|
|
c142eb8ecd | ||
|
|
46c039153e | ||
|
|
473f03360c | ||
|
|
3fb3984a72 | ||
|
|
9c5e3cf5af | ||
|
|
7419ca806d | ||
|
|
8a51c31663 | ||
|
|
a586a7894b | ||
|
|
31fcbebaff | ||
|
|
c4cc6b3e6e | ||
|
|
420ac9044e | ||
|
|
392dac5691 | ||
|
|
29744c01c6 | ||
|
|
a16adb9578 | ||
|
|
49e488df24 | ||
|
|
1a3f00eac8 | ||
|
|
c6ea8d5525 | ||
|
|
7738585d01 | ||
|
|
61bc24c6ea | ||
|
|
ae90001d7a | ||
|
|
c0ea3a097c | ||
|
|
abca57be11 | ||
|
|
645201480c | ||
|
|
8cffba3e22 | ||
|
|
8f62004f5b | ||
|
|
4fff6edb7b | ||
|
|
64cff4ba49 | ||
|
|
ce3c4d5661 | ||
|
|
5f333f0934 | ||
|
|
f70722934c | ||
|
|
b9eb9f10d4 | ||
|
|
6f89d94eef | ||
|
|
3a494d706a | ||
|
|
2ffbe07bcf | ||
|
|
371fd361a8 | ||
|
|
97416607e5 | ||
|
|
51ccbe7c7c | ||
|
|
65599399c7 | ||
|
|
c0816d4924 | ||
|
|
2988e97e14 | ||
|
|
046ceae500 | ||
|
|
33c0cda582 | ||
|
|
df7acc1075 | ||
|
|
3859e4b277 | ||
|
|
26253b65c7 | ||
|
|
424453ab57 | ||
|
|
d7de0ebd20 | ||
|
|
bf1c5140cd | ||
|
|
fb7a35db5b | ||
|
|
5872c2fbe3 | ||
|
|
ba04c70d5a | ||
|
|
de1e2d301f | ||
|
|
b67bdf779e | ||
|
|
78a3221395 | ||
|
|
f698b56dad | ||
|
|
4ed18fdf1d | ||
|
|
6e05f13c77 | ||
|
|
cb51d0af11 | ||
|
|
a146cd81b2 | ||
|
|
8dbd6df456 | ||
|
|
ac6d845c8d | ||
|
|
cfc9d1abcd | ||
|
|
a66748f6ca | ||
|
|
e5f46ead3b | ||
|
|
171023558e | ||
|
|
059a424b88 | ||
|
|
307b22deaf | ||
|
|
e405688f67 | ||
|
|
68554119f4 | ||
|
|
86a4a740ef | ||
|
|
0a004b83ca | ||
|
|
4fa47403c5 | ||
|
|
9e418ced53 | ||
|
|
bc04863439 | ||
|
|
77f259a435 | ||
|
|
16bcace663 | ||
|
|
52fddaa1cd | ||
|
|
f3d7400c15 | ||
|
|
7ebc3f3533 | ||
|
|
0ee94b425e | ||
|
|
d44a173945 | ||
|
|
ac001d6f32 | ||
|
|
e3de2df69c | ||
|
|
39d3c90b2f | ||
|
|
bca21defa5 | ||
|
|
dd3116ae7f | ||
|
|
49b3765eae | ||
|
|
1f5dd35bec | ||
|
|
6fce8e6161 | ||
|
|
e57b46979d | ||
|
|
683b67abb0 | ||
|
|
6479bcabfb | ||
|
|
a8c9735652 | ||
|
|
93b25b6a31 | ||
|
|
4eb5a0940e | ||
|
|
c2cc914b5c | ||
|
|
1219ba90af | ||
|
|
beef3c7fb5 | ||
|
|
52184ca72b | ||
|
|
78cd7c56f7 | ||
|
|
7805a1dc25 | ||
|
|
92f426e4c0 | ||
|
|
90f10042fd | ||
|
|
697c140883 | ||
|
|
3369816d31 | ||
|
|
819725351a | ||
|
|
860cbd29bc | ||
|
|
07db9f9a7a | ||
|
|
2fd4f9ce97 | ||
|
|
77d7cd7d58 | ||
|
|
e5cb42c4fe | ||
|
|
1fe1d619a9 | ||
|
|
697cc34c23 | ||
|
|
b00d1d80b0 | ||
|
|
67bb42c5b4 | ||
|
|
d50fcb80c5 | ||
|
|
9571ffc30e | ||
|
|
f4a88276b8 | ||
|
|
4ea254029a | ||
|
|
f5e85c2196 | ||
|
|
926103325c | ||
|
|
20b2988165 | ||
|
|
39aefd312b | ||
|
|
b5478bcb0d | ||
|
|
d403557b9e | ||
|
|
db9884ea64 | ||
|
|
74148aabc3 | ||
|
|
7bfac091ae | ||
|
|
60a68817b6 | ||
|
|
a56e6d7fe8 | ||
|
|
1f0b208922 | ||
|
|
9da147f50e | ||
|
|
c175451284 | ||
|
|
9a88cf3a72 | ||
|
|
d0255e5310 | ||
|
|
2a2fb0a4f2 | ||
|
|
b0ad939db8 | ||
|
|
5abf118b8c | ||
|
|
f5099167b6 | ||
|
|
30949bd4c3 | ||
|
|
63279c187e | ||
|
|
fad03f8e0b | ||
|
|
6edfcc4f02 | ||
|
|
17df7b5b4e | ||
|
|
62cbd823c9 | ||
|
|
bdcc211308 | ||
|
|
ddeb4611a1 | ||
|
|
ad639c8001 | ||
|
|
15dc64d550 | ||
|
|
03b575d16e | ||
|
|
4cacee45e8 | ||
|
|
873b860203 | ||
|
|
128ae2d889 | ||
|
|
b0ec0e22e4 | ||
|
|
6aa4e979dc | ||
|
|
36f225b859 | ||
|
|
48a75b2450 | ||
|
|
2af4f939dd | ||
|
|
b592d21064 | ||
|
|
3cdd5afe7a | ||
|
|
0ef56c1302 | ||
|
|
96f7f38a0e | ||
|
|
689ba7da8f | ||
|
|
951aeece6e | ||
|
|
2ea0d54e6c | ||
|
|
1c98fe04ca | ||
|
|
59a9ab6642 | ||
|
|
7ee5949ae2 | ||
|
|
721f08e29b | ||
|
|
df07133c9d | ||
|
|
b9e3024720 | ||
|
|
d848d3e39a | ||
|
|
3f26f4c8f2 | ||
|
|
dc9d709dd7 | ||
|
|
543f734650 | ||
|
|
3fb723a82f | ||
|
|
71c2f34ed4 | ||
|
|
d4b3bf9de6 | ||
|
|
2b234f313c | ||
|
|
d1b2d17f7d | ||
|
|
f062ab7a64 | ||
|
|
f009f57581 | ||
|
|
f86a818e69 | ||
|
|
bb80c2158d | ||
|
|
86fa6258f6 | ||
|
|
545536fab5 | ||
|
|
ef23553b66 | ||
|
|
fcf56664cc | ||
|
|
d932166bcd | ||
|
|
0c5783774d | ||
|
|
aa42ea15f7 | ||
|
|
9dd778d55d | ||
|
|
ac35a919f4 | ||
|
|
a32c5017e6 | ||
|
|
7995a6d13b | ||
|
|
d4ec2eec88 | ||
|
|
12ad3b3484 | ||
|
|
9a53c36c14 | ||
|
|
8fb3802343 | ||
|
|
c035df7e85 | ||
|
|
92f81e28ca | ||
|
|
7a87db608b | ||
|
|
d42fb81790 | ||
|
|
73934e2f90 | ||
|
|
1c8642298b | ||
|
|
bfc45bb0e9 | ||
|
|
58af9e2516 | ||
|
|
4228c044ea | ||
|
|
ccc0aec968 | ||
|
|
3718d3fe79 | ||
|
|
26ed9b722b | ||
|
|
6751669249 | ||
|
|
c7955dce1e | ||
|
|
2e432f402f | ||
|
|
07791cd901 | ||
|
|
1458da92d9 | ||
|
|
c56f998292 | ||
|
|
991075d69e | ||
|
|
234ca75728 | ||
|
|
e34d62d3e5 | ||
|
|
423be28afd | ||
|
|
eb7bed9601 | ||
|
|
fa09521012 | ||
|
|
bb30f322a3 | ||
|
|
0e35c93ae5 | ||
|
|
603224e553 | ||
|
|
9b82063d52 | ||
|
|
c210a523e3 | ||
|
|
e33151d482 | ||
|
|
835f67a106 | ||
|
|
a50f6ec602 | ||
|
|
4a49dbc6b4 | ||
|
|
05c843397b | ||
|
|
e4871eb340 | ||
|
|
0e696ff2dd | ||
|
|
9f15773a9b | ||
|
|
a00984f95a | ||
|
|
c7e9632f18 | ||
|
|
7080712501 | ||
|
|
03b574434c | ||
|
|
6a46744073 | ||
|
|
7e52c510b3 | ||
|
|
9bf060af9a | ||
|
|
b5973fcf8c | ||
|
|
ac7d06d4fe | ||
|
|
75e9137e3a | ||
|
|
5168940422 | ||
|
|
cfd2dafa53 | ||
|
|
188b0a0edd | ||
|
|
206c418ebc | ||
|
|
b0acf8d1ae | ||
|
|
f279ea41e6 | ||
|
|
d2a929f35d | ||
|
|
6f5258b5dd | ||
|
|
4f223a9439 | ||
|
|
ea98eb3d44 | ||
|
|
cdb8f85620 | ||
|
|
f459dcb8b3 | ||
|
|
967a539e71 | ||
|
|
db615da0ee | ||
|
|
c4b420bd31 | ||
|
|
a6c4730c44 | ||
|
|
eb1f4c5a14 | ||
|
|
b303af738c | ||
|
|
af5e11a265 | ||
|
|
8d7627069c | ||
|
|
9e94c0d67d | ||
|
|
55ddacf978 | ||
|
|
005e0552b6 | ||
|
|
54b28c42e2 | ||
|
|
2659ddb76b | ||
|
|
c85873c6ce | ||
|
|
6e32f3f915 | ||
|
|
b8891a5727 | ||
|
|
fcb6f5a6af | ||
|
|
0365f3194d | ||
|
|
76e2ec6429 | ||
|
|
a5d0a202a5 | ||
|
|
def752632f | ||
|
|
f296048063 | ||
|
|
1c1b816292 | ||
|
|
fbd463e18b | ||
|
|
9e01363648 | ||
|
|
67bf7e9775 | ||
|
|
d8c2100b24 | ||
|
|
d1a3e39f17 | ||
|
|
3d5c081333 | ||
|
|
e1085fb770 | ||
|
|
c294c19be7 | ||
|
|
87726fb0a7 | ||
|
|
d28e61f412 | ||
|
|
890e750c23 | ||
|
|
1fe5cfd121 | ||
|
|
c8eaf88cf1 | ||
|
|
f3f812205d | ||
|
|
7b2ec52831 | ||
|
|
72785cf869 | ||
|
|
e92ef472b3 | ||
|
|
deec6ffa31 | ||
|
|
47779c8d0a | ||
|
|
3e9e802b6c | ||
|
|
8bd429db4c | ||
|
|
d76b27863f | ||
|
|
576627eb17 | ||
|
|
74adb5f021 | ||
|
|
dcdcef1fb2 | ||
|
|
cf7311682e | ||
|
|
beb2128804 | ||
|
|
85cb289bc4 | ||
|
|
5293943a50 | ||
|
|
ee4d720c51 | ||
|
|
f8b698e669 | ||
|
|
0e3fcc7749 | ||
|
|
5755e5ff65 | ||
|
|
d9db3d0b29 | ||
|
|
87ba2e0ee7 | ||
|
|
eaeed567f3 | ||
|
|
a2054359a2 | ||
|
|
85b533d4c4 | ||
|
|
2d2c8524ee | ||
|
|
62271b11a7 | ||
|
|
869cacc568 | ||
|
|
0155790b02 | ||
|
|
2cb25fefe4 | ||
|
|
98225ac9a3 | ||
|
|
4bdfc35c8c | ||
|
|
f090a51485 | ||
|
|
b510c2fd5f | ||
|
|
03e58c7443 | ||
|
|
676086ba90 | ||
|
|
4f6b9e3dff | ||
|
|
c8a5bd3f15 | ||
|
|
5e83ddf7bd | ||
|
|
6b28a804f8 | ||
|
|
7c5e159677 | ||
|
|
63f8468f48 | ||
|
|
933a535494 | ||
|
|
518a7cb398 | ||
|
|
eac2cff09c | ||
|
|
9a601a5172 | ||
|
|
cf8f25988c | ||
|
|
a613e401e2 | ||
|
|
23e27ee953 | ||
|
|
633dc06e6f | ||
|
|
5ddf0ada76 | ||
|
|
c8664c4d44 | ||
|
|
d6d28b3f7b | ||
|
|
eddcfef5d8 | ||
|
|
737d63eede | ||
|
|
ba3890acfa | ||
|
|
9e8353f50f | ||
|
|
2db4398637 | ||
|
|
1348434b50 | ||
|
|
4ebf60a9c8 |
11
.gitignore
vendored
@@ -6,7 +6,6 @@ Makefile
|
||||
CMakeFiles
|
||||
CMakeCache.txt
|
||||
/examples/example
|
||||
libdocks.so
|
||||
tst_docks
|
||||
CMakeLists.txt.user*
|
||||
/build
|
||||
@@ -34,7 +33,7 @@ cmake_install.cmake
|
||||
latex
|
||||
html
|
||||
custom_titlebar
|
||||
libkddockwidgets.so
|
||||
libkddockwidgets.so*
|
||||
*.depends
|
||||
kddockwidgets_basic_quick
|
||||
/src/KDDockWidgetsConfig.cmake
|
||||
@@ -51,3 +50,11 @@ mylayout.json
|
||||
*.pri
|
||||
/docks-w
|
||||
kddockwidgets_minimal_example
|
||||
/docs/api/Doxyfile
|
||||
/docs/api/qch/kddockwidgets-api.qch
|
||||
/doxygen.log
|
||||
/kddockwidgets.tag
|
||||
/CMakeDoxyfile.in
|
||||
/CMakeDoxygenDefaults.cmake
|
||||
/Testing
|
||||
/layout_tst*
|
||||
|
||||
4
.vscode/settings.json
vendored
@@ -4,7 +4,7 @@
|
||||
"qevent": "cpp"
|
||||
},
|
||||
"cmake.configureSettings": {
|
||||
"OPTION_DEVELOPER_MODE" : "ON",
|
||||
"OPTION_QTQUICK" : true
|
||||
"KDDockWidgets_DEVELOPER_MODE" : "ON",
|
||||
"KDDockWidgets_QTQUICK" : true
|
||||
}
|
||||
}
|
||||
|
||||
108
CMakeLists.txt
@@ -11,12 +11,17 @@
|
||||
|
||||
# Pass the following variables to cmake to control the build:
|
||||
#
|
||||
# -DKDDockWidgets_QT6=[true|false]
|
||||
# Build against Qt6 rather than Qt5
|
||||
# Default=false (Qt5 will be used even if Qt6 is available)
|
||||
#
|
||||
# -DKDDockWidgets_STATIC=[true|false]
|
||||
# Build static versions of the libraries
|
||||
# Default=false
|
||||
#
|
||||
# -DKDDockWidgets_TESTS=[true|false]
|
||||
# Build the test harness.
|
||||
# Currently does nothing unless you also set KDDockWidgets_DEVELOPER_MODE=True
|
||||
# Default=false
|
||||
#
|
||||
# -DKDDockWidgets_EXAMPLES=[true|false]
|
||||
@@ -25,18 +30,30 @@
|
||||
#
|
||||
# -DKDDockWidgets_DOCS=[true|false]
|
||||
# Build the API documentation.
|
||||
# Default=true
|
||||
# Default=false
|
||||
#
|
||||
# -DOPTION_DEVELOPER_MODE=[true|false]
|
||||
# -DKDDockWidgets_DEVELOPER_MODE=[true|false]
|
||||
# Configure the build for a developer setup.
|
||||
# Enables some features that are not geared towards end-users.
|
||||
# Forces the test harness to be built.
|
||||
# Default=false
|
||||
#
|
||||
# -DOPTION_BUILD_PYTHON_BINDINGS=[true|false]
|
||||
# -DKDDockWidgets_QTQUICK == IN DEVELOPMENT. DO NOT USE! ==
|
||||
# Build for QtQuick instead of QtWidgets
|
||||
# Default=false
|
||||
#
|
||||
# -DKDDockWidgets_PYTHON_BINDINGS=[true|false]
|
||||
# Build/Generate python bindings. Always false for Debug builds
|
||||
# Default=false
|
||||
#
|
||||
# -DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=[path]
|
||||
# Set an alternative install path for Python bindings
|
||||
# Default=CMAKE_INSTALL_PREFIX
|
||||
#
|
||||
# -DKDDockWidgets_UNITY_BUILD=[true|false]
|
||||
# Build with CMake's UNITY_BUILD (requires CMake version 3.16 or higher)
|
||||
# Default=true
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
if(POLICY CMP0020)
|
||||
@@ -46,10 +63,12 @@ if(POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
endif()
|
||||
|
||||
if("${CMAKE_INSTALL_PREFIX}" STREQUAL "")
|
||||
set(USE_DEFAULT_INSTALL_LOCATION True)
|
||||
else()
|
||||
set(USE_DEFAULT_INSTALL_LOCATION False)
|
||||
set(KDAB_INSTALL True)
|
||||
if((NOT DEFINED ${USE_DEFAULT_INSTALL_LOCATION}) OR (NOT ${USE_DEFAULT_INSTALL_LOCATION}))
|
||||
if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "")
|
||||
set(KDAB_INSTALL False)
|
||||
endif()
|
||||
set(USE_DEFAULT_INSTALL_LOCATION ${KDAB_INSTALL} CACHE INTERNAL "Install to default KDAB Location" FORCE)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
||||
@@ -62,32 +81,49 @@ else()
|
||||
endif()
|
||||
|
||||
set(${PROJECT_NAME}_VERSION_MAJOR 1)
|
||||
set(${PROJECT_NAME}_VERSION_MINOR 0)
|
||||
set(${PROJECT_NAME}_VERSION_PATCH 95)
|
||||
set(${PROJECT_NAME}_VERSION_MINOR 2)
|
||||
set(${PROJECT_NAME}_VERSION_PATCH 0)
|
||||
set(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH})
|
||||
set(${PROJECT_NAME}_SOVERSION "1.1")
|
||||
set(${PROJECT_NAME}_SOVERSION "1.2")
|
||||
|
||||
include(FeatureSummary)
|
||||
|
||||
option(OPTION_DEVELOPER_MODE "Developer Mode" OFF)
|
||||
option(OPTION_BUILD_PYTHON_BINDINGS "Build python bindings" OFF)
|
||||
if(OPTION_BUILD_PYTHON_BINDINGS AND (CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR ${PROJECT_NAME}_STATIC))
|
||||
option(${PROJECT_NAME}_QT6 "Build against Qt 6" OFF)
|
||||
option(${PROJECT_NAME}_DEVELOPER_MODE "Developer Mode" OFF)
|
||||
option(${PROJECT_NAME}_PYTHON_BINDINGS "Build python bindings" OFF)
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
|
||||
option(${PROJECT_NAME}_UNITY_BUILD "Build with CMake's UNITY_BUILD" ON)
|
||||
endif()
|
||||
|
||||
|
||||
if(${PROJECT_NAME}_PYTHON_BINDINGS AND (CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR ${PROJECT_NAME}_STATIC))
|
||||
message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.")
|
||||
endif()
|
||||
|
||||
option(${PROJECT_NAME}_TESTS "Build the tests" OFF)
|
||||
option(${PROJECT_NAME}_EXAMPLES "Build the examples" ON)
|
||||
option(${PROJECT_NAME}_DOCS "Build the API documentation" ON)
|
||||
option(${PROJECT_NAME}_DOCS "Build the API documentation" OFF)
|
||||
|
||||
#Always build the test harness in developer-mode
|
||||
if(OPTION_DEVELOPER_MODE)
|
||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
set(${PROJECT_NAME}_TESTS ON)
|
||||
endif()
|
||||
|
||||
# option(OPTION_QTQUICK "Build for QtQuick instead of QtWidgets" OFF)
|
||||
#option(${PROJECT_NAME}_QTQUICK "Build for QtQuick instead of QtWidgets" OFF)
|
||||
|
||||
find_package(Qt5Widgets 5.9 REQUIRED)
|
||||
if (${PROJECT_NAME}_QT6)
|
||||
find_package(Qt6Widgets REQUIRED)
|
||||
find_package(Qt6Test REQUIRED)
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
else()
|
||||
find_package(Qt5Widgets 5.9 REQUIRED)
|
||||
find_package(Qt5Test 5.9 REQUIRED)
|
||||
set(QT_MAJOR_VERSION 5)
|
||||
endif()
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(ECM_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ECM/modules/")
|
||||
set(PYTHON_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}/cmake/Python")
|
||||
@@ -99,15 +135,18 @@ include(InstallLocation)
|
||||
include(QtInstallPaths) #to set QT_INSTALL_FOO variables
|
||||
|
||||
macro(set_compiler_flags targetName)
|
||||
if(OPTION_DEVELOPER_MODE)
|
||||
target_compile_definitions(${targetName} PRIVATE DOCKS_DEVELOPER_MODE QT_FORCE_ASSERTS)
|
||||
if(NOT MSVC)
|
||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
target_compile_definitions(${targetName} PUBLIC DOCKS_DEVELOPER_MODE PRIVATE QT_FORCE_ASSERTS)
|
||||
if(NOT MSVC AND NOT ${PROJECT_NAME}_QT6) # We're not warnings clean with Qt6 yet
|
||||
target_compile_options(${targetName} PRIVATE -Wall -Wextra -Werror -Wno-error=deprecated-declarations)
|
||||
if (APPLE)
|
||||
target_compile_options(${targetName} PRIVATE -Wweak-vtables)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if(OPTION_QTQUICK)
|
||||
if(${PROJECT_NAME}_QTQUICK)
|
||||
find_package(Qt5Quick)
|
||||
find_package(Qt5QuickControls2)
|
||||
add_definitions(-DKDDOCKWIDGETS_QTQUICK)
|
||||
@@ -142,14 +181,13 @@ install(FILES LICENSE.txt README.md DESTINATION ${INSTALL_DOC_DIR})
|
||||
install(DIRECTORY LICENSES DESTINATION ${INSTALL_DOC_DIR})
|
||||
|
||||
add_subdirectory(src)
|
||||
if(OPTION_BUILD_PYTHON_BINDINGS)
|
||||
if(${PROJECT_NAME}_PYTHON_BINDINGS)
|
||||
add_subdirectory(python)
|
||||
endif()
|
||||
|
||||
if(${PROJECT_NAME}_EXAMPLES)
|
||||
if (OPTION_QTQUICK)
|
||||
if (${PROJECT_NAME}_QTQUICK)
|
||||
add_subdirectory(examples/qtquick)
|
||||
set_compiler_flags(kddockwidgets_example_quick)
|
||||
else()
|
||||
add_subdirectory(examples/dockwidgets)
|
||||
add_subdirectory(examples/minimal)
|
||||
@@ -158,16 +196,15 @@ if(${PROJECT_NAME}_EXAMPLES)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPTION_DEVELOPER_MODE)
|
||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
include(ECMEnableSanitizers)
|
||||
if(${PROJECT_NAME}_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
|
||||
if (NOT OPTION_QTQUICK)
|
||||
#Require Qt5.15.1 or higher to run the tests_launcher tests on Mac
|
||||
if(NOT APPLE OR Qt5Widgets_VERSION VERSION_GREATER 5.15.0)
|
||||
# tst_docks.exe is pretty big (140 tests), so split it in 6 runs so we can use threads.
|
||||
# Require Qt5.15.1 or higher to run the tests_launcher tests on Mac
|
||||
if (NOT APPLE OR Qt5Widgets_VERSION VERSION_GREATER 5.15.0)
|
||||
# tst_docks.exe is pretty big (160 tests), so split it in more runs so we can use threads.
|
||||
add_test(NAME tst_docks0 COMMAND tests_launcher 0 5)
|
||||
add_test(NAME tst_docks1 COMMAND tests_launcher 1 5)
|
||||
add_test(NAME tst_docks2 COMMAND tests_launcher 2 5)
|
||||
@@ -190,15 +227,20 @@ if(OPTION_DEVELOPER_MODE)
|
||||
add_test(NAME tst_docks19 COMMAND tests_launcher 18 5)
|
||||
add_test(NAME tst_docks20 COMMAND tests_launcher 19 5)
|
||||
add_test(NAME tst_docks21 COMMAND tests_launcher 20 5) # one more for rounding leftovers
|
||||
endif()
|
||||
endif()
|
||||
if (NOT ${PROJECT_NAME}_QTQUICK)
|
||||
# tst_multisplitter depends on QWidget
|
||||
add_test(NAME tst_multisplitter COMMAND tst_multisplitter)
|
||||
endif()
|
||||
|
||||
add_test(NAME tst_multisplitter COMMAND tst_multisplitter)
|
||||
add_test(NAME tst_common COMMAND tst_common)
|
||||
|
||||
add_test(NAME tst_docks COMMAND tst_docks)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${PROJECT_NAME}_DOCS)
|
||||
add_subdirectory(docs) # needs to go last, in case there are build source files
|
||||
endif()
|
||||
|
||||
if (${PROJECT_NAME}_UNITY_BUILD)
|
||||
set_target_properties(kddockwidgets PROPERTIES UNITY_BUILD ON)
|
||||
endif()
|
||||
|
||||
100
Changelog
@@ -1,37 +1,65 @@
|
||||
* v0.1 (November 4th, 2019)
|
||||
* v1.3.0 (unreleased)
|
||||
- [TODO] QtQuick support
|
||||
|
||||
* v1.2.0 (17 December 2020)
|
||||
- Wayland support
|
||||
- Added Flag_KeepAboveIfNotUtilityWindow, so you can have keep above even if
|
||||
floating window is shown in the task-bar.
|
||||
- Added DockWidget::windowActiveAboutToChange() signal
|
||||
- Added support for Qt6 (PySide6 support is lacking)
|
||||
- Added WASM support
|
||||
|
||||
* v1.1.1 (11 December 2020)
|
||||
- Windows: Fixed a crash when clicking on the close button for floating windows in some situations (#110)
|
||||
- Don't show dock/undock icon when dockwidget is not dockable (#99)
|
||||
|
||||
* v1.1.0 (26 October 2020)
|
||||
- New drop indicator style type: Segmented Indicators
|
||||
- Windows: Drop Shadow for floating windows
|
||||
- Added AutoHide / SideBar support
|
||||
- Added FocusScope support
|
||||
- Added DockWidget::isFocused() and DockWidgetBase::isFocusedChanged()
|
||||
- Added Config::Flag_AlwaysTitleBarWhenFloating, which complements Flag_HideTitleBarWhenTabsVisible
|
||||
- Added Config::Flag_DontUseUtilityWindowsForFloating
|
||||
- Added Config::Flag_TitleBarHasMinimizeButton
|
||||
- Added Config::Flag_TitleBarNoFloatButton
|
||||
- Added Config::Flag_AutoHideSupport
|
||||
- Added Config::setTabbingAllowedFunc(TabbingAllowedFunc func)
|
||||
- HDPI improvements, new high-res icons
|
||||
- Bugfixes:
|
||||
- Windows: Fixed windows not having proper minimum size.
|
||||
- Windows: Fixed moving windows across screens with different DPI (#72)
|
||||
- Don't center floating windows if the user set a custom position (#75)
|
||||
- Fixed floating window's title not being correct (#74)
|
||||
- Fixed focus scope not reacting when clicking on current tab (#71)
|
||||
- Fixed floating window borders not being rendered correctly on HDPI due to rounding errors.
|
||||
- cmake/Python - don't require pkg-config, only use if available (#68)
|
||||
|
||||
* v1.0.0 (2 September 2020)
|
||||
- PySide2 bindings
|
||||
- Rewrote the layouting engine, resulting in a huge stability gain and makes it easy to add new features
|
||||
- Honour min/max sizes and some QSizePolicy heuristics
|
||||
- Lazy resize (resize only when dropping the separator)
|
||||
- Native Windows dragging (supporting Aero-snap)
|
||||
- Allow to hide TitleBar and just show tabs. Allow dragging via the tab bar.
|
||||
- Reordering tabs with mouse
|
||||
- Partial layout save/restore (affecting only a subset)
|
||||
- Double-click on title bar to maximize
|
||||
- Maximize button on the title bar
|
||||
- HDPI: Relative layouting restore
|
||||
- Allow to make a dock widget non-closable and non-dockable
|
||||
- Show close button on tabs
|
||||
- Multiple Main Window support
|
||||
- Allowing to dock on different parents
|
||||
- Support for affinities, making some dock widgets only dockable on certain main windows
|
||||
- 200 unit-tests
|
||||
- Fuzzer which found plenty of crashes in the old layouting engine
|
||||
- ASAN fixes
|
||||
- Double click on separator to distribute equally
|
||||
- Hovering over an indicator returns the true size that the dropped widget will get
|
||||
- Static build support
|
||||
- Namespaced Qt support
|
||||
- Dozens of crash fixes, bugs and much more...
|
||||
|
||||
* v0.1 (4 November 2019)
|
||||
- Initial Release and blog
|
||||
|
||||
* v1.0.0 (, 2020)
|
||||
- PySide2 bindings
|
||||
- Rewrote the layouting engine, resulting in a huge stability gain and makes it easy to add new features
|
||||
- Honour min/max sizes and some QSizePolicy heuristics
|
||||
- Lazy resize (resize only when dropping the separator)
|
||||
- Native Windows dragging (supporting Aero-snap)
|
||||
- Allow to hide TitleBar and just show tabs. Allow dragging via the tab bar.
|
||||
- Reordering tabs with mouse
|
||||
- Partial layout save/restore (affecting only a subset)
|
||||
- Double-click on title bar to maximize
|
||||
- Maximize button on the title bar
|
||||
- HDPI: Relative layouting restore
|
||||
- Allow to make a dock widget non-closable and non-dockable
|
||||
- Show close button on tabs
|
||||
- Multiple Main Window support
|
||||
- Allowing to dock on different parents
|
||||
- Support for affinities, making some dock widgets only dockable on certain main windows
|
||||
- 200 unit-tests
|
||||
- Fuzzer which found plenty of crashes in the old layouting engine
|
||||
- ASAN fixes
|
||||
- Double click on separator to distribute equally
|
||||
- Hovering over an indicator returns the true size that the dropped widget will get
|
||||
- Static build support
|
||||
- Namespaced Qt support
|
||||
- Dozens of crash fixes, bugs and much more...
|
||||
|
||||
* v1.1.0 (, 2020)
|
||||
- New drop indicator style type: Segmented Indicators
|
||||
- Added FocusScope support
|
||||
- Added DockWidget::isFocused() and DockWidgetBase::isFocusedChanged()
|
||||
- Added Config::Flag_AlwaysTitleBarWhenFloating, which complements Flag_HideTitleBarWhenTabsVisible
|
||||
|
||||
* Roadmap
|
||||
- QtQuick support
|
||||
|
||||
29
README-WASM.md
Normal file
@@ -0,0 +1,29 @@
|
||||
WebAssembly
|
||||
===========
|
||||
|
||||
KDDockWidgets works with WebAssembly with the following known limitations:
|
||||
|
||||
- Classic drop indicators are not supported, only the segmented ones. This is because
|
||||
WASM doesn't support windows with translucency.
|
||||
|
||||
- It's slow while dragging Windows and resizing.
|
||||
Please file a bug with Qt, as it's out of scope for KDDW to fix.
|
||||
|
||||
|
||||
Build tips for KDDW:
|
||||
====================
|
||||
|
||||
- Visit https://doc.qt.io/qt-5/wasm.html if you haven't yet
|
||||
- Open a terminal suitable for WASM development (with the correct Qt and toolchain in PATH, etc)
|
||||
- KDDockWidgets can be built with `cmake -DCMAKE_TOOLCHAIN_FILE=/usr/local/emsdk-1.39.8/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_FIND_ROOT_PATH=~/Qt/5.15.1/wasm_32/ -DKDDockWidgets_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release`
|
||||
(Adapt the paths to your own situation)
|
||||
|
||||
Builds tips for your own app:
|
||||
=============================
|
||||
- Link to KDDW (libkddockwidgets.so, or similar)
|
||||
- As the build is static, don't forget to initialize KDDW's resources:
|
||||
```
|
||||
#ifdef QT_STATIC
|
||||
Q_INIT_RESOURCE(kddockwidgets_resources);
|
||||
#endif
|
||||
```
|
||||
34
README-Wayland.md
Normal file
@@ -0,0 +1,34 @@
|
||||
Wayland support is done and has been tested on KDE (Kwin) and weston.
|
||||
|
||||
Limitations
|
||||
============
|
||||
|
||||
Wayland works very differently than traditional desktops and imposes us some,
|
||||
limitations. Here's a list of different behaviours which KDDockWidgets will have
|
||||
when running on Wayland:
|
||||
|
||||
|
||||
- A title bar can either be used for drag&dock or for moving the window around.
|
||||
|
||||
- For this reason, floating windows now have two title bars.
|
||||
The native one, drawn by the server and the client one, drawn by KDDockWidgets.
|
||||
The native one allows you to drag the window around but not drop/dock.
|
||||
The client title bar allows you to perform a drag and drop/dock but not move the window around.
|
||||
|
||||
- You can detach a window by:
|
||||
- Clicking the title-bar's float button
|
||||
- Double-clicking the title bar of a docked widget
|
||||
- Double-clicking a tab
|
||||
- If no title bar is shown, double-clicking the empty space of the tab bar will detach
|
||||
the entire group of tabbed dock widgets
|
||||
|
||||
- Layout save/restore won't restore the position of floating windows, as wayland
|
||||
doesn't allow us to set geometry.
|
||||
|
||||
- Kwin specific:
|
||||
- The pixmap that's shown during a drag can't be bigger than 250x250. Might be a bug.
|
||||
|
||||
|
||||
|
||||
All in all it's pretty decent and usable. Any further improvements should be done at the server or
|
||||
protocol level now.
|
||||
30
README.md
@@ -1,5 +1,5 @@
|
||||
KDDockWidgets
|
||||
==============
|
||||
=============
|
||||
`KDDockWidgets` is a Qt dock widget library written by KDAB, suitable for replacing
|
||||
`QDockWidget` and implementing advanced functionalities missing in Qt.
|
||||
|
||||
@@ -20,7 +20,7 @@ creative with their requests, so it was clear we needed a better docking framewo
|
||||
|
||||
You will find more information in these places:
|
||||
|
||||
* [our official home page](https://www.kdab.com/kddockwidgets)
|
||||
* [our official home page](https://www.kdab.com/development-resources/qt-tools/kddockwidgets)
|
||||
* [online detailed browsable API reference](https://docs.kdab.com/kddockwidgets)
|
||||
* [our example programs](examples/)
|
||||
|
||||
@@ -43,6 +43,8 @@ Features
|
||||
- Customize title bars
|
||||
- Customize window frames
|
||||
- Custom widget separators
|
||||
- Crossplatform (macOS, Linux, Windows, WebAssembly, Wayland, X11/XCB, EGLFS are working)
|
||||
See README-Wayland.md and README-WASM.md for platform specific information.
|
||||
- Layouting engine honouring min/max size constraints and some size policies
|
||||
- PySide2 bindings
|
||||
- Clean codebase
|
||||
@@ -56,15 +58,15 @@ Features
|
||||
- Double click on separator to distribute equally
|
||||
- Show close button on tabs
|
||||
- Allow to make a dock widget non-closable and/or non-dockable
|
||||
- Optional maximize button on the title bar
|
||||
- Optional minimize and maximize button on the title bar
|
||||
- FloatingWindows can be utility windows or full native
|
||||
|
||||

|
||||
|
||||
|
||||
Roadmap
|
||||
========
|
||||
- QtQuick support for v1.1
|
||||
- "Minimization bar" for v1.2
|
||||
- QtQuick support
|
||||
|
||||
Trying out the examples
|
||||
=======================
|
||||
@@ -81,15 +83,15 @@ Build and install the KDDockWidgets framework:
|
||||
|
||||
```
|
||||
$ cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/path/where/to/install ../path/to/kddockwidgets
|
||||
$ make
|
||||
$ make install
|
||||
$ cmake --build .
|
||||
$ cmake --build . --target install
|
||||
```
|
||||
|
||||
Now build and run the example:
|
||||
```
|
||||
$ cd path/to/kddockwidgets/examples/dockwidgets/
|
||||
$ cmake -DCMAKE_PREFIX_PATH=/path/where/to/install
|
||||
$ make
|
||||
$ cmake -G Ninja -DCMAKE_PREFIX_PATH=/path/where/to/install
|
||||
$ cmake --build .
|
||||
$ ./kddockwidgets_example
|
||||
|
||||
```
|
||||
@@ -114,13 +116,13 @@ For more info visit https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html
|
||||
Once QtForPython is installed you are ready to generate the PySide bindings
|
||||
for KDDockwWidgets.
|
||||
|
||||
Next pass `-DOPTION_BUILD_PYTHON_BINDINGS=ON` to CMake, followed by the
|
||||
Next pass `-DKDDockWidgets_PYTHON_BINDINGS=ON` to CMake, followed by the
|
||||
make command.
|
||||
|
||||
The bindings will be installed to the passed `-DCMAKE_INSTALL_PREFIX`, which
|
||||
might require setting the `PYTHONPATH` env variable to point to that path when
|
||||
running applications. Alternatively, configure the bindings install location
|
||||
by passing `-DPYTHON_BINDINGS_INSTALL_PREFIX=/usr/lib/python3.8/site-packages`
|
||||
by passing `-DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=/usr/lib/python3.8/site-packages`
|
||||
to CMake (adjust to the python path on your system).
|
||||
|
||||
To run the KDDW python example
|
||||
@@ -136,6 +138,7 @@ Supported Qt versions
|
||||
======================
|
||||
KDDockWidgets requires Qt >= 5.9 (or >=5.12 if Python bindings are enabled).
|
||||
The QtQuick support will require Qt >= 5.15.
|
||||
Qt 6 will be support as long as QTBUG-88611 is finished, most likely for 6.1.
|
||||
|
||||
Licensing
|
||||
=========
|
||||
@@ -170,3 +173,8 @@ to the Qt Project. We can give advanced or standard trainings anywhere
|
||||
around the globe on Qt as well as C++, OpenGL, 3D and more.
|
||||
|
||||
Please visit https://www.kdab.com to meet the people who write code like this.
|
||||
|
||||
Stay up-to-date with KDAB product announcements:
|
||||
|
||||
* [KDAB Newsletter](https://news.kdab.com)
|
||||
* [KDAB Blogs](https://www.kdab.com/category/blogs)
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
@@ -15,9 +13,12 @@
|
||||
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide2
|
||||
#
|
||||
# You can install PySide2 from Qt repository with
|
||||
# pip3 install --index-url=https://download.qt.io/snapshots/ci/pyside/<Qt-Version>/latest/ pyside2 --trusted-host download.qt.io
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(PYSIDE2_PRIV pyside2 QUIET)
|
||||
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython --trusted-host download.qt.io pyside2
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PYSIDE2_PRIV QUIET pyside2)
|
||||
endif()
|
||||
|
||||
set(PYSIDE2_FOUND FALSE)
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
@@ -15,9 +13,12 @@
|
||||
# SHIBOKEN_BUILD_TYPE - Tells if Shiboken was compiled in Release or Debug mode.
|
||||
|
||||
# You can install Shiboken from Qt repository with
|
||||
# pip3 install --index-url=https://download.qt.io/snapshots/ci/pyside/<Qt-Version>/latest/ shiboken2-generator --trusted-host download.qt.io
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SHIBOKEN2_PRIV shiboken2 QUIET)
|
||||
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython --trusted-host download.qt.io shiboken2-generator
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SHIBOKEN2_PRIV QUIET shiboken2)
|
||||
endif()
|
||||
|
||||
set(SHIBOKEN_FOUND FALSE)
|
||||
|
||||
@@ -114,7 +115,6 @@ else()
|
||||
set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PATH})
|
||||
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR})
|
||||
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR})
|
||||
message(STATUS "BOO: ${SHIBOKEN_SEARCH_PATHS}")
|
||||
find_file(SHIBOKEN_LIBRARY
|
||||
${SHIBOKEN_LIBRARY_BASENAMES}
|
||||
PATHS ${SHIBOKEN_SEARCH_PATHS}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
@@ -9,11 +7,11 @@
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
if (NOT PYTHON_BINDINGS_INSTALL_PREFIX)
|
||||
SET(PYTHON_BINDINGS_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE FILEPATH "Custom path to install python bindings.")
|
||||
if (NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
|
||||
SET(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE FILEPATH "Custom path to install python bindings.")
|
||||
endif()
|
||||
|
||||
message(STATUS "PYTHON INSTALL PREFIX ${PYTHON_BINDINGS_INSTALL_PREFIX}")
|
||||
message(STATUS "PYTHON INSTALL PREFIX ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}")
|
||||
|
||||
if (WIN32)
|
||||
set(PATH_SEP "\;")
|
||||
@@ -23,6 +21,19 @@ endif()
|
||||
if (NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
|
||||
get_target_property(QtCore_is_framework Qt5::Core FRAMEWORK)
|
||||
if (QtCore_is_framework)
|
||||
# Get the path to the framework dir.
|
||||
list(GET Qt5Core_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
|
||||
get_filename_component(QT_FRAMEWORK_INCLUDE_DIR "${QT_INCLUDE_DIR}/../" ABSOLUTE)
|
||||
|
||||
# QT_INCLUDE_DIR points to the QtCore.framework directory, so we need to adjust this to point
|
||||
# to the actual include directory, which has include files for non-framework parts of Qt.
|
||||
get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
# Flags that we will pass to shiboken-generator
|
||||
# --generator-set=shiboken: tells the generator that we want to use shiboken to generate code,
|
||||
# a doc generator is also available
|
||||
@@ -41,6 +52,15 @@ set(GENERATOR_EXTRA_FLAGS --generator-set=shiboken
|
||||
--enable-return-value-heuristic
|
||||
--use-isnull-as-nb_nonzero
|
||||
-std=c++${CMAKE_CXX_STANDARD})
|
||||
|
||||
# 2017-04-24 The protected hack can unfortunately not be disabled, because
|
||||
# Clang does produce linker errors when we disable the hack.
|
||||
# But the ugly workaround in Python is replaced by a shiboken change.
|
||||
if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
|
||||
set(GENERATOR_EXTRA_FLAGS ${GENERATOR_EXTRA_FLAGS} --avoid-protected-hack)
|
||||
add_definitions(-DAVOID_PROTECTED_HACK)
|
||||
endif()
|
||||
|
||||
macro(make_path varname)
|
||||
# accepts any number of path variables
|
||||
string(REPLACE ";" "${PATH_SEP}" ${varname} "${ARGN}")
|
||||
@@ -133,5 +153,5 @@ macro(CREATE_PYTHON_BINDINGS
|
||||
LINK_FLAGS "-undefined dynamic_lookup")
|
||||
endif()
|
||||
install(TARGETS ${TARGET_NAME}
|
||||
LIBRARY DESTINATION ${PYTHON_BINDINGS_INSTALL_PREFIX}/${TARGET_NAME})
|
||||
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}/${TARGET_NAME})
|
||||
endmacro()
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
|
||||
#
|
||||
# Create variables for all the various install paths for the Qt version in use
|
||||
# Make sure to have found Qt5 before using this.
|
||||
# Make sure to have found Qt before using this.
|
||||
# sets variables like QT_INSTALL_PREFIX, QT_INSTALL_DATA, QT_INSTALL_DOCS, etc.
|
||||
# run qmake -query to see a full list
|
||||
|
||||
if(TARGET Qt5::qmake)
|
||||
get_target_property(QT_QMAKE_EXECUTABLE Qt5::qmake LOCATION)
|
||||
if(TARGET Qt${QT_MAJOR_VERSION}::qmake)
|
||||
get_target_property(QT_QMAKE_EXECUTABLE Qt${QT_MAJOR_VERSION}::qmake LOCATION)
|
||||
else()
|
||||
message(FATAL_ERROR "No supported Qt version found. Make sure you find Qt before calling this")
|
||||
endif()
|
||||
|
||||
@@ -11,7 +11,7 @@ from conans import ConanFile, CMake, tools
|
||||
|
||||
class KDDockWidgetsConan(ConanFile):
|
||||
name = "kddockwidgets"
|
||||
version = "0.99.9"
|
||||
version = "1.2.0"
|
||||
default_user = "kdab"
|
||||
default_channel = "stable"
|
||||
license = ("https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-2.0-only.txt",
|
||||
@@ -51,7 +51,7 @@ class KDDockWidgetsConan(ConanFile):
|
||||
self.cmake.definitions["KDDockWidgets_STATIC"] = self.options.build_static
|
||||
self.cmake.definitions["KDDockWidgets_EXAMPLES"] = self.options.build_examples
|
||||
self.cmake.definitions["KDDockWidgets_TESTS"] = self.options.build_tests
|
||||
self.cmake.definitions["OPTION_BUILD_PYTHON_BINDINGS"] = self.options.build_python_bindings
|
||||
self.cmake.definitions["KDDockWidgets_PYTHON_BINDINGS"] = self.options.build_python_bindings
|
||||
self.cmake.configure()
|
||||
self.cmake.build()
|
||||
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
kddockwidgets (1.2.0) release candidate; urgency=high
|
||||
|
||||
* 1.2.0 final
|
||||
|
||||
-- Allen Winter <allen.winter@kdab.com> Thu, 17 Dec 2020 12:00:00 -0500
|
||||
|
||||
kddockwidgets (1.1.1) release candidate; urgency=high
|
||||
|
||||
* 1.1.1 final
|
||||
|
||||
-- Allen Winter <allen.winter@kdab.com> Fri, 11 Dec 2020 12:00:00 -0500
|
||||
|
||||
kddockwidgets (1.1.0) release candidate; urgency=high
|
||||
|
||||
* 1.1.0 final
|
||||
|
||||
-- Allen Winter <allen.winter@kdab.com> Mon, 26 Oct 2020 12:00:00 -0500
|
||||
|
||||
kddockwidgets (1.0.0) release candidate; urgency=high
|
||||
|
||||
* 1.0.0 final
|
||||
|
||||
-- Allen Winter <allen.winter@kdab.com> Wed, 2 Sep 2020 12:00:00 -0500
|
||||
|
||||
kddockwidgets (0.99.9) release candidate; urgency=high
|
||||
|
||||
* 1.0.0 release candidate
|
||||
|
||||
@@ -25,7 +25,7 @@ find_package(Doxygen)
|
||||
set_package_properties(Doxygen PROPERTIES
|
||||
TYPE OPTIONAL
|
||||
DESCRIPTION "API Documentation system"
|
||||
URL "http://www.doxygen.org"
|
||||
URL "https://www.doxygen.org"
|
||||
PURPOSE "Needed to build the API documentation."
|
||||
)
|
||||
if(DOXYGEN_DOT_EXECUTABLE)
|
||||
|
||||
@@ -31,7 +31,7 @@ add_custom_command(
|
||||
OUTPUT ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
#handle a bug in doxygen where image files referred to in markdown are not copied the output
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/screencap.gif ${DOXYGEN_OUTPUT_DIR}/html
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../../screencap.gif ${DOXYGEN_OUTPUT_DIR}/html
|
||||
DEPENDS ${_dox_deps} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
@@ -51,7 +51,7 @@ PROJECT_BRIEF =
|
||||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
|
||||
# the logo to the output directory.
|
||||
|
||||
PROJECT_LOGO =
|
||||
PROJECT_LOGO = "@CMAKE_SOURCE_DIR@/images/KDDockWidgets-64x64.png"
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
|
||||
# into which the generated documentation will be written. If a relative path is
|
||||
@@ -1083,35 +1083,6 @@ USE_HTAGS = NO
|
||||
|
||||
VERBATIM_HEADERS = NO
|
||||
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
|
||||
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
|
||||
# cost of reduced performance. This can be particularly helpful with template
|
||||
# rich C++ code for which doxygen's built-in parser lacks the necessary type
|
||||
# information.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
# The default value is: NO.
|
||||
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the compiler with command
|
||||
# line options that you would normally use when invoking the compiler. Note that
|
||||
# the include paths will already be set by doxygen for the files and directories
|
||||
# specified with INPUT and INCLUDE_PATH.
|
||||
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
|
||||
|
||||
CLANG_OPTIONS =
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the clang parser with the
|
||||
# path to the compilation database (see:
|
||||
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
|
||||
# were built. This is equivalent to specifying the "-p" option to a clang tool,
|
||||
# such as clang-check. These options will then be passed to the parser.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
|
||||
#TOO NEW CLANG_DATABASE_PATH =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1225,7 +1196,8 @@ HTML_EXTRA_STYLESHEET =
|
||||
# files will be copied as-is; there are no commands or markers available.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_FILES = "@CMAKE_CURRENT_SOURCE_DIR@/kdab-logo-16x16.png"
|
||||
HTML_EXTRA_FILES = "@CMAKE_CURRENT_SOURCE_DIR@/kdab-logo-16x16.png" \
|
||||
"@CMAKE_CURRENT_SOURCE_DIR@/kdab-kddockwidgets-logo-16x16.png"
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
<img src="kdab-logo-16x16.png">
|
||||
<font style="font-weight: bold;">Klarälvdalens Datakonsult AB (KDAB)</font>
|
||||
<br>
|
||||
"The Qt Experts"<br>
|
||||
"The Qt, C++ and OpenGL Experts"<br>
|
||||
<a href="https://www.kdab.com/">https://www.kdab.com/</a>
|
||||
</div>
|
||||
|
||||
<div style="text-align: right;">
|
||||
<!-- <img src="kddockwidgets-logo-16x16.png" /><br> -->
|
||||
<img src="kdab-kddockwidgets-logo-16x16.png" />
|
||||
<font style="font-weight: bold;">KDDockWidgets</font>
|
||||
<br>
|
||||
Advanced Dock Widget Framework for Qt<br>
|
||||
<a href="https://www.kdab.com/development-resources/qt-tools/kd-dockwidgets/">https://www.kdab.com/development-resources/qt-tools/kd-dockwidgets/</a>
|
||||
<a href="https://www.kdab.com/development-resources/qt-tools/kddockwidgets/">https://www.kdab.com/development-resources/qt-tools/kddockwidgets/</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
BIN
docs/api/kdab-kddockwidgets-logo-16x16.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
@@ -13,6 +13,7 @@ cmake_minimum_required(VERSION 3.7)
|
||||
project(kddockwidgets_example)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||
|
||||
if(NOT TARGET kddockwidgets)
|
||||
@@ -21,7 +22,7 @@ if(NOT TARGET kddockwidgets)
|
||||
find_package(KDDockWidgets REQUIRED)
|
||||
endif()
|
||||
|
||||
qt5_add_resources(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_example.qrc)
|
||||
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_example.qrc)
|
||||
|
||||
add_executable(kddockwidgets_example
|
||||
main.cpp
|
||||
|
||||
@@ -32,6 +32,8 @@ public:
|
||||
init();
|
||||
}
|
||||
|
||||
~MyTitleBar() override;
|
||||
|
||||
void init()
|
||||
{
|
||||
setFixedHeight(60);
|
||||
@@ -56,6 +58,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
MyTitleBar::~MyTitleBar() = default;
|
||||
|
||||
// Inheriting from SeparatorWidget instead of Separator as it handles moving and mouse cursor changing
|
||||
class MySeparator : public Layouting::SeparatorWidget
|
||||
{
|
||||
@@ -65,6 +69,8 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~MySeparator() override;
|
||||
|
||||
void paintEvent(QPaintEvent *) override
|
||||
{
|
||||
QPainter p(this);
|
||||
@@ -72,6 +78,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
MySeparator::~MySeparator() = default;
|
||||
|
||||
KDDockWidgets::TitleBar * CustomWidgetFactory::createTitleBar(KDDockWidgets::Frame *frame) const
|
||||
{
|
||||
return new MyTitleBar(frame);
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <QRandomGenerator>
|
||||
#endif
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ MyWidget::MyWidget(const QString &backgroundFile, const QString &logoFile, QWidg
|
||||
}
|
||||
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
#if 0
|
||||
// Uncomment to show focus propagation working
|
||||
new QLineEdit(this);
|
||||
auto l2 = new QLineEdit(this);
|
||||
l2->move(0, 100);
|
||||
setFocusProxy(l2);
|
||||
#endif
|
||||
if (qEnvironmentVariableIsSet("KDDW_DEBUG_FOCUS")) {
|
||||
// Uncomment to show focus propagation working
|
||||
new QLineEdit(this);
|
||||
auto l2 = new QLineEdit(this);
|
||||
l2->move(0, 100);
|
||||
setFocusProxy(l2);
|
||||
}
|
||||
}
|
||||
|
||||
MyWidget::~MyWidget()
|
||||
|
||||
@@ -26,8 +26,10 @@ using namespace KDDockWidgets;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif
|
||||
QApplication app(argc, argv);
|
||||
|
||||
app.setOrganizationName(QStringLiteral("KDAB"));
|
||||
@@ -37,6 +39,7 @@ int main(int argc, char **argv)
|
||||
parser.setApplicationDescription("KDDockWidgets example application");
|
||||
parser.addHelpOption();
|
||||
|
||||
// Fusion looks better in general, but feel free to change
|
||||
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
||||
|
||||
QCommandLineOption customStyle("p", QCoreApplication::translate("main", "Shows how to style framework internals via FrameworkWidgetFactory"));
|
||||
@@ -78,12 +81,21 @@ int main(int argc, char **argv)
|
||||
QCommandLineOption nonDockable("d", QCoreApplication::translate("main", "DockWidget #9 will be non-dockable"));
|
||||
parser.addOption(nonDockable);
|
||||
|
||||
QCommandLineOption maximizeButton("b", QCoreApplication::translate("main", "DockWidgets have maximize/restore buttons instead of float/dock button"));
|
||||
parser.addOption(maximizeButton);
|
||||
QCommandLineOption maximizeButtonOption("b", QCoreApplication::translate("main", "Floating dockWidgets have maximize/restore buttons instead of float/dock button"));
|
||||
parser.addOption(maximizeButtonOption);
|
||||
|
||||
QCommandLineOption minimizeButtonOption("k", QCoreApplication::translate("main", "Floating dockWidgets have a minimize button. Implies not being an utility window (~Qt::Tool)"));
|
||||
parser.addOption(minimizeButtonOption);
|
||||
|
||||
QCommandLineOption segmentedIndicators("y", QCoreApplication::translate("main", "Use segmented indicators instead of classical"));
|
||||
parser.addOption(segmentedIndicators);
|
||||
|
||||
QCommandLineOption noUtilityWindows("u", QCoreApplication::translate("main", "FloatingWindows will be normal windows instead of utility windows"));
|
||||
parser.addOption(noUtilityWindows);
|
||||
|
||||
QCommandLineOption keepAbove("o", QCoreApplication::translate("main", "FloatingWindows will have Qt::WindowStaysOnTopHint. Implies not being an utility window (try it with -u too)"));
|
||||
parser.addOption(keepAbove);
|
||||
|
||||
parser.addPositionalArgument("savedlayout", QCoreApplication::translate("main", "loads the specified json file at startup"));
|
||||
|
||||
#ifdef KDDOCKWIDGETS_SUPPORTS_NESTED_MAINWINDOWS
|
||||
@@ -95,8 +107,27 @@ int main(int argc, char **argv)
|
||||
parser.addOption(maxSizeOption);
|
||||
|
||||
QCommandLineOption centralFrame("f", QCoreApplication::translate("main", "Persistent central frame"));
|
||||
|
||||
QCommandLineOption autoHideSupport("w", QCoreApplication::translate("main", "Enables auto-hide/minimization to side-bar support"));
|
||||
parser.addOption(autoHideSupport);
|
||||
|
||||
#if defined(DOCKS_DEVELOPER_MODE)
|
||||
parser.addOption(centralFrame);
|
||||
|
||||
QCommandLineOption noQtTool("no-qttool", QCoreApplication::translate("main", "(internal) Don't use Qt::Tool"));
|
||||
QCommandLineOption noParentForFloating("no-parent-for-floating", QCoreApplication::translate("main", "(internal) FloatingWindows won't have a parent"));
|
||||
QCommandLineOption nativeTitleBar("native-title-bar", QCoreApplication::translate("main", "(internal) FloatingWindows a native title bar"));
|
||||
QCommandLineOption noDropIndicators("no-drop-indicators", QCoreApplication::translate("main", "(internal) Don't use any drop indicators"));
|
||||
|
||||
parser.addOption(noQtTool);
|
||||
parser.addOption(noParentForFloating);
|
||||
parser.addOption(nativeTitleBar);
|
||||
parser.addOption(noDropIndicators);
|
||||
|
||||
# if defined(Q_OS_WIN)
|
||||
QCommandLineOption noAeroSnap("no-aero-snap", QCoreApplication::translate("main", "(internal) Disable AeroSnap"));
|
||||
parser.addOption(noAeroSnap);
|
||||
# endif
|
||||
#else
|
||||
Q_UNUSED(centralFrame)
|
||||
#endif
|
||||
@@ -114,15 +145,42 @@ int main(int argc, char **argv)
|
||||
KDDockWidgets::DefaultWidgetFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::Segmented;
|
||||
|
||||
MainWindowOptions options = MainWindowOption_None;
|
||||
auto flags = KDDockWidgets::Config::self().flags();
|
||||
#if defined(DOCKS_DEVELOPER_MODE)
|
||||
options = parser.isSet(centralFrame) ? MainWindowOption_HasCentralFrame
|
||||
: MainWindowOption_None;
|
||||
|
||||
if (parser.isSet(noQtTool))
|
||||
flags |= KDDockWidgets::Config::Flag_internal_DontUseQtToolWindowsForFloatingWindows;
|
||||
|
||||
if (parser.isSet(keepAbove))
|
||||
flags |= KDDockWidgets::Config::Flag_KeepAboveIfNotUtilityWindow;
|
||||
|
||||
if (parser.isSet(noParentForFloating))
|
||||
flags |= KDDockWidgets::Config::Flag_internal_DontUseParentForFloatingWindows;
|
||||
|
||||
if (parser.isSet(nativeTitleBar))
|
||||
flags |= KDDockWidgets::Config::Flag_NativeTitleBar;
|
||||
|
||||
if (parser.isSet(noDropIndicators))
|
||||
KDDockWidgets::DefaultWidgetFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::None;
|
||||
|
||||
# if defined(Q_OS_WIN)
|
||||
if (parser.isSet(noAeroSnap))
|
||||
flags |= KDDockWidgets::Config::Flag_internal_NoAeroSnap;
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
auto flags = KDDockWidgets::Config::self().flags();
|
||||
if (parser.isSet(autoHideSupport))
|
||||
flags |= Config::Flag_AutoHideSupport;
|
||||
|
||||
if (parser.isSet(noTitleBars))
|
||||
flags |= KDDockWidgets::Config::Flag_HideTitleBarWhenTabsVisible;
|
||||
|
||||
if (parser.isSet(noUtilityWindows))
|
||||
flags |= KDDockWidgets::Config::Flag_DontUseUtilityFloatingWindows;
|
||||
|
||||
if (parser.isSet(alwaysTabs))
|
||||
flags |= KDDockWidgets::Config::Flag_AlwaysShowTabs;
|
||||
|
||||
@@ -134,15 +192,18 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (parser.isSet(customStyle))
|
||||
if (parser.isSet(customStyle) || qEnvironmentVariableIsSet("KDDW_DEBUG_FOCUS"))
|
||||
flags |= KDDockWidgets::Config::Flag_TitleBarIsFocusable; // also showing title bar focus with -p, just to not introduce another switch
|
||||
|
||||
if (parser.isSet(reorderTabsOption))
|
||||
flags |= KDDockWidgets::Config::Flag_AllowReorderTabs;
|
||||
|
||||
if (parser.isSet(maximizeButton))
|
||||
if (parser.isSet(maximizeButtonOption))
|
||||
flags |= KDDockWidgets::Config::Flag_TitleBarHasMaximizeButton;
|
||||
|
||||
if (parser.isSet(minimizeButtonOption))
|
||||
flags |= KDDockWidgets::Config::Flag_TitleBarHasMinimizeButton;
|
||||
|
||||
if (parser.isSet(lazyResizeOption))
|
||||
flags |= KDDockWidgets::Config::Flag_LazyResize;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ cmake_minimum_required(VERSION 3.7)
|
||||
project(kddockwidgets_minimal_example)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||
|
||||
if(NOT TARGET kddockwidgets)
|
||||
@@ -21,7 +22,7 @@ if(NOT TARGET kddockwidgets)
|
||||
find_package(KDDockWidgets REQUIRED)
|
||||
endif()
|
||||
|
||||
qt5_add_resources(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/resources_example.qrc)
|
||||
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/resources_example.qrc)
|
||||
|
||||
add_executable(kddockwidgets_minimal_example
|
||||
main.cpp
|
||||
|
||||
@@ -24,6 +24,7 @@ class MyWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MyWidget() = default;
|
||||
explicit MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent = nullptr);
|
||||
~MyWidget();
|
||||
protected:
|
||||
|
||||
@@ -14,19 +14,27 @@
|
||||
#include <kddockwidgets/DockWidget.h>
|
||||
#include <kddockwidgets/MainWindow.h>
|
||||
|
||||
#include <QStyleFactory>
|
||||
#include <QApplication>
|
||||
|
||||
// clazy:excludeall=qstring-allocations
|
||||
|
||||
using namespace KDDockWidgets;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif
|
||||
QApplication app(argc, argv);
|
||||
|
||||
app.setOrganizationName(QStringLiteral("KDAB"));
|
||||
app.setApplicationName(QStringLiteral("Test app"));
|
||||
|
||||
// Fusion looks better in general, but feel free to change
|
||||
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
||||
|
||||
// # 1. Create our main window
|
||||
|
||||
KDDockWidgets::MainWindow mainWindow(QStringLiteral("MyMainWindow"));
|
||||
@@ -34,10 +42,9 @@ int main(int argc, char **argv)
|
||||
mainWindow.resize(1200, 1200);
|
||||
mainWindow.show();
|
||||
|
||||
// # 2. Create four dock widgets. Each needs an unique name.
|
||||
// # 2. Create a dock widget, it needs a unique name
|
||||
auto dock1 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock1"));
|
||||
auto widget1 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
||||
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
||||
auto widget1 = new MyWidget();
|
||||
dock1->setWidget(widget1);
|
||||
|
||||
auto dock2 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock2"));
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
@@ -9,26 +8,8 @@
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
project(kddockwidgets_example_quick)
|
||||
add_subdirectory(customtitlebar)
|
||||
add_subdirectory(dockwidgets)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||
|
||||
if(NOT TARGET kddockwidgets)
|
||||
# This will look for Qt, do find_package yourself manually before
|
||||
# if you want to look for a specific Qt version for instance.
|
||||
find_package(KDDockWidgets REQUIRED)
|
||||
endif()
|
||||
|
||||
qt5_add_resources(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_example.qrc)
|
||||
|
||||
add_executable(kddockwidgets_example_quick
|
||||
main.cpp
|
||||
${RESOURCES_EXAMPLE_SRC}
|
||||
)
|
||||
|
||||
target_link_libraries(kddockwidgets_example_quick
|
||||
PRIVATE
|
||||
KDAB::kddockwidgets
|
||||
)
|
||||
set_compiler_flags(kddockwidgets_example_quick)
|
||||
set_compiler_flags(kddockwidgets_customtitlebar_quick)
|
||||
|
||||
37
examples/qtquick/customtitlebar/CMakeLists.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
project(kddockwidgets_customtitlebar_quick)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||
|
||||
if(NOT TARGET kddockwidgets)
|
||||
# This will look for Qt, do find_package yourself manually before
|
||||
# if you want to look for a specific Qt version for instance.
|
||||
find_package(KDDockWidgets REQUIRED)
|
||||
endif()
|
||||
|
||||
set(RESOURCES_EXAMPLE_SRC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_example.qrc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc)
|
||||
|
||||
add_executable(kddockwidgets_customtitlebar_quick
|
||||
main.cpp
|
||||
${RESOURCES_EXAMPLE_SRC}
|
||||
)
|
||||
|
||||
target_link_libraries(kddockwidgets_customtitlebar_quick
|
||||
PRIVATE
|
||||
KDAB::kddockwidgets
|
||||
)
|
||||
36
examples/qtquick/customtitlebar/Guest.qml
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
import QtQuick 2.9
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property alias background: background.source
|
||||
property alias logo: logo.source
|
||||
|
||||
|
||||
Image {
|
||||
id: background
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
|
||||
Image {
|
||||
id: logo
|
||||
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 50
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
examples/qtquick/customtitlebar/Guest1.qml
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
import QtQuick 2.9
|
||||
|
||||
Guest {
|
||||
anchors.fill: parent
|
||||
background: "qrc:/assets/triangles.png"
|
||||
logo: "qrc:/assets/KDAB_bubble_white.png"
|
||||
}
|
||||
@@ -11,10 +11,7 @@
|
||||
|
||||
import QtQuick 2.9
|
||||
|
||||
Rectangle {
|
||||
color: "pink"
|
||||
Guest {
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
text: "Guest Widget #2!"
|
||||
}
|
||||
logo: "qrc:/assets/KDAB_bubble_blue.png"
|
||||
}
|
||||
@@ -11,10 +11,8 @@
|
||||
|
||||
import QtQuick 2.9
|
||||
|
||||
Rectangle {
|
||||
color: "lightblue"
|
||||
Guest {
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
text: "Guest Widget #1 !"
|
||||
}
|
||||
background: "qrc:/assets/base.png"
|
||||
logo: "qrc:/assets/KDAB_bubble_fulcolor.png"
|
||||
}
|
||||
54
examples/qtquick/customtitlebar/MyTitleBar.qml
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
import QtQuick 2.6
|
||||
|
||||
// Will be moved to a plugin in the future
|
||||
import "qrc:/kddockwidgets/private/quick/qml/" as KDDW
|
||||
|
||||
KDDW.TitleBarBase {
|
||||
id: root
|
||||
color: "black"
|
||||
border.color: "orange"
|
||||
border.width: 2
|
||||
heightWhenVisible: 50
|
||||
|
||||
Text {
|
||||
color: "orange"
|
||||
font.bold: true
|
||||
text: root.title
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: 10
|
||||
verticalCenter: root.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: closeButton
|
||||
enabled: root.closeButtonEnabled
|
||||
radius: 5
|
||||
color: "green"
|
||||
height: root.height - 20
|
||||
width: height
|
||||
anchors {
|
||||
right: root.right
|
||||
rightMargin: 10
|
||||
verticalCenter: root.verticalCenter
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
root.closeButtonClicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,24 +10,51 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "private/DockRegistry_p.h"
|
||||
#include "private/quick/DockWidgetQuick.h"
|
||||
#include "Config.h"
|
||||
#include <kddockwidgets/Config.h>
|
||||
#include <kddockwidgets/DockWidgetQuick.h>
|
||||
#include <kddockwidgets/private/DockRegistry_p.h>
|
||||
#include <kddockwidgets/FrameworkWidgetFactory.h>
|
||||
|
||||
#include <QQuickView>
|
||||
#include <QGuiApplication>
|
||||
|
||||
class CustomFrameworkWidgetFactory : public KDDockWidgets::DefaultWidgetFactory
|
||||
{
|
||||
public:
|
||||
|
||||
~CustomFrameworkWidgetFactory() override;
|
||||
|
||||
QUrl titleBarFilename() const override
|
||||
{
|
||||
return QUrl("qrc:/MyTitleBar.qml");
|
||||
}
|
||||
};
|
||||
|
||||
CustomFrameworkWidgetFactory::~CustomFrameworkWidgetFactory() = default;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
QGuiApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||
#endif
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
auto &config = KDDockWidgets::Config::self();
|
||||
auto flags = config.flags();
|
||||
|
||||
config.setFlags(flags);
|
||||
config.setFrameworkWidgetFactory(new CustomFrameworkWidgetFactory());
|
||||
|
||||
QQuickView view;
|
||||
view.setObjectName("MainWindow QQuickView");
|
||||
KDDockWidgets::Config::self().setQmlEngine(view.engine());
|
||||
view.resize(1000, 800);
|
||||
view.show();
|
||||
view.setResizeMode(QQuickView::SizeRootObjectToView);
|
||||
|
||||
auto dw1 = new KDDockWidgets::DockWidgetQuick("Dock #1");
|
||||
view.setSource(QUrl("qrc:/main.qml"));
|
||||
|
||||
dw1->setWidget(QStringLiteral("qrc:/Guest1.qml"));
|
||||
dw1->resize(QSize(800, 800));
|
||||
dw1->show();
|
||||
@@ -39,15 +66,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
auto dw3 = new KDDockWidgets::DockWidgetQuick("Dock #3");
|
||||
dw3->setWidget(QStringLiteral("qrc:/Guest3.qml"));
|
||||
dw3->resize(QSize(800, 800));
|
||||
dw3->show();
|
||||
|
||||
view.setSource(QUrl("qrc:/main.qml"));
|
||||
|
||||
dw1->addDockWidgetToContainingWindow(dw3, KDDockWidgets::Location_OnRight);
|
||||
|
||||
KDDockWidgets::MainWindowBase *mainWindow = KDDockWidgets::DockRegistry::self()->mainwindows().constFirst();
|
||||
mainWindow->addDockWidget(dw2, KDDockWidgets::Location_OnTop);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>main.qml</file>
|
||||
<file>Guest1.qml</file>
|
||||
<file>Guest2.qml</file>
|
||||
<file>Guest3.qml</file>
|
||||
<file>Guest.qml</file>
|
||||
<file>MyTitleBar.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -12,9 +12,7 @@
|
||||
import QtQuick 2.9
|
||||
|
||||
Rectangle {
|
||||
color: "blue"
|
||||
id: root
|
||||
color: "green"
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
text: "Guest Widget!"
|
||||
}
|
||||
}
|
||||
37
examples/qtquick/dockwidgets/CMakeLists.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
project(kddockwidgets_example_quick)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||
|
||||
if(NOT TARGET kddockwidgets)
|
||||
# This will look for Qt, do find_package yourself manually before
|
||||
# if you want to look for a specific Qt version for instance.
|
||||
find_package(KDDockWidgets REQUIRED)
|
||||
endif()
|
||||
|
||||
set(RESOURCES_EXAMPLE_SRC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_example.qrc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc)
|
||||
|
||||
add_executable(kddockwidgets_example_quick
|
||||
main.cpp
|
||||
${RESOURCES_EXAMPLE_SRC}
|
||||
)
|
||||
|
||||
target_link_libraries(kddockwidgets_example_quick
|
||||
PRIVATE
|
||||
KDAB::kddockwidgets
|
||||
)
|
||||
36
examples/qtquick/dockwidgets/Guest.qml
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
import QtQuick 2.9
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property alias background: background.source
|
||||
property alias logo: logo.source
|
||||
|
||||
|
||||
Image {
|
||||
id: background
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
|
||||
Image {
|
||||
id: logo
|
||||
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 50
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
47
examples/qtquick/dockwidgets/Guest1.qml
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.12
|
||||
import com.kdab.dockwidgets 1.0 as KDDW
|
||||
|
||||
Guest {
|
||||
anchors.fill: parent
|
||||
background: "qrc:/assets/triangles.png"
|
||||
logo: "qrc:/assets/KDAB_bubble_white.png"
|
||||
|
||||
KDDW.DockWidget {
|
||||
id: another
|
||||
uniqueName: "another1"
|
||||
source: ":/Another.qml"
|
||||
}
|
||||
|
||||
Button {
|
||||
text: "Toggle Another"
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
margins: 5
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
|
||||
if (another.dockWidget.visible) {
|
||||
another.dockWidget.close();
|
||||
} else {
|
||||
another.dockWidget.show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,10 +11,7 @@
|
||||
|
||||
import QtQuick 2.9
|
||||
|
||||
Rectangle {
|
||||
color: "gray"
|
||||
Guest {
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
text: "Guest Widget #3!"
|
||||
}
|
||||
logo: "qrc:/assets/KDAB_bubble_blue.png"
|
||||
}
|
||||
18
examples/qtquick/dockwidgets/Guest3.qml
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
import QtQuick 2.9
|
||||
|
||||
Guest {
|
||||
anchors.fill: parent
|
||||
background: "qrc:/assets/base.png"
|
||||
logo: "qrc:/assets/KDAB_bubble_fulcolor.png"
|
||||
}
|
||||
103
examples/qtquick/dockwidgets/main.cpp
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
|
||||
#include <kddockwidgets/Config.h>
|
||||
#include <kddockwidgets/DockWidgetQuick.h>
|
||||
#include <kddockwidgets/private/DockRegistry_p.h>
|
||||
#include <kddockwidgets/FrameworkWidgetFactory.h>
|
||||
|
||||
#include <QQuickView>
|
||||
#include <QGuiApplication>
|
||||
#include <QCommandLineParser>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
QGuiApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||
#endif
|
||||
QGuiApplication app(argc, argv);
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription("KDDockWidgets example application");
|
||||
parser.addHelpOption();
|
||||
|
||||
|
||||
#if defined(DOCKS_DEVELOPER_MODE)
|
||||
QCommandLineOption noQtTool("no-qttool", QCoreApplication::translate("main", "(internal) Don't use Qt::Tool"));
|
||||
QCommandLineOption noParentForFloating("no-parent-for-floating", QCoreApplication::translate("main", "(internal) FloatingWindows won't have a parent"));
|
||||
QCommandLineOption nativeTitleBar("native-title-bar", QCoreApplication::translate("main", "(internal) FloatingWindows a native title bar"));
|
||||
QCommandLineOption noDropIndicators("no-drop-indicators", QCoreApplication::translate("main", "(internal) Don't use any drop indicators"));
|
||||
|
||||
parser.addOption(noQtTool);
|
||||
parser.addOption(noParentForFloating);
|
||||
parser.addOption(nativeTitleBar);
|
||||
parser.addOption(noDropIndicators);
|
||||
|
||||
# if defined(Q_OS_WIN)
|
||||
QCommandLineOption noAeroSnap("no-aero-snap", QCoreApplication::translate("main", "(internal) Disable AeroSnap"));
|
||||
parser.addOption(noAeroSnap);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
auto flags = KDDockWidgets::Config::self().flags();
|
||||
|
||||
#if defined(DOCKS_DEVELOPER_MODE)
|
||||
parser.process(app);
|
||||
|
||||
if (parser.isSet(noQtTool))
|
||||
flags |= KDDockWidgets::Config::Flag_internal_DontUseQtToolWindowsForFloatingWindows;
|
||||
|
||||
if (parser.isSet(noParentForFloating))
|
||||
flags |= KDDockWidgets::Config::Flag_internal_DontUseParentForFloatingWindows;
|
||||
|
||||
if (parser.isSet(nativeTitleBar))
|
||||
flags |= KDDockWidgets::Config::Flag_NativeTitleBar;
|
||||
else if (parser.isSet(noDropIndicators))
|
||||
KDDockWidgets::DefaultWidgetFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::None;
|
||||
|
||||
# if defined(Q_OS_WIN)
|
||||
if (parser.isSet(noAeroSnap))
|
||||
flags |= KDDockWidgets::Config::Flag_internal_NoAeroSnap;
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
KDDockWidgets::Config::self().setFlags(flags);
|
||||
|
||||
QQuickView view;
|
||||
view.setObjectName("MainWindow QQuickView");
|
||||
KDDockWidgets::Config::self().setQmlEngine(view.engine());
|
||||
view.resize(1000, 800);
|
||||
view.show();
|
||||
view.setResizeMode(QQuickView::SizeRootObjectToView);
|
||||
|
||||
auto dw1 = new KDDockWidgets::DockWidgetQuick("Dock #1");
|
||||
view.setSource(QUrl("qrc:/main.qml"));
|
||||
|
||||
dw1->setWidget(QStringLiteral("qrc:/Guest1.qml"));
|
||||
dw1->resize(QSize(800, 800));
|
||||
dw1->show();
|
||||
|
||||
auto dw2 = new KDDockWidgets::DockWidgetQuick("Dock #2");
|
||||
dw2->setWidget(QStringLiteral("qrc:/Guest2.qml"));
|
||||
dw2->resize(QSize(800, 800));
|
||||
dw2->show();
|
||||
|
||||
auto dw3 = new KDDockWidgets::DockWidgetQuick("Dock #3");
|
||||
dw3->setWidget(QStringLiteral("qrc:/Guest3.qml"));
|
||||
|
||||
dw1->addDockWidgetToContainingWindow(dw3, KDDockWidgets::Location_OnRight);
|
||||
|
||||
KDDockWidgets::MainWindowBase *mainWindow = KDDockWidgets::DockRegistry::self()->mainwindows().constFirst();
|
||||
mainWindow->addDockWidget(dw2, KDDockWidgets::Location_OnTop);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
23
examples/qtquick/dockwidgets/main.qml
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
import QtQuick 2.6
|
||||
import com.kdab.dockwidgets 1.0 as KDDW
|
||||
|
||||
KDDW.MainWindow {
|
||||
id: root
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
root.init("MyWindowName-1");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,5 +4,7 @@
|
||||
<file>Guest1.qml</file>
|
||||
<file>Guest2.qml</file>
|
||||
<file>Guest3.qml</file>
|
||||
<file>Guest.qml</file>
|
||||
<file>Another.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
BIN
images/KDDockWidgets-128x128.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
320
images/KDDockWidgets-128x128.svg
Normal file
@@ -0,0 +1,320 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 33.866665 33.866667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="128x128.svg"
|
||||
inkscape:export-filename="/home/pinheiro/media/server/kdab/2017/templates/Marketing/Branding/products/kddockwidgets/icons/256x256.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<defs
|
||||
id="defs2">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4182"
|
||||
id="linearGradient2204"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.51735502,0,0,0.51741082,-2340.918,-1199.7217)"
|
||||
x1="4533.3271"
|
||||
y1="2365.7585"
|
||||
x2="4573.1943"
|
||||
y2="2342.7412" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4182">
|
||||
<stop
|
||||
style="stop-color:#04a5e7;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4184" />
|
||||
<stop
|
||||
style="stop-color:#2982c4;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4186" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient2202"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,0.61581147,-0.61574507,0,3061.0284,-1011.6512)"
|
||||
x1="1710.802"
|
||||
y1="4975.228"
|
||||
x2="1652.1422"
|
||||
y2="4926.0415" />
|
||||
<linearGradient
|
||||
id="linearGradient4733"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4735"
|
||||
offset="0"
|
||||
style="stop-color:#1abafb;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#19aff2;stop-opacity:1;"
|
||||
offset="0.6658641696"
|
||||
id="stop4739" />
|
||||
<stop
|
||||
id="stop4737"
|
||||
offset="1"
|
||||
style="stop-color:#187fcb;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient2200"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-0.61581147,-0.61574507,0,3061.0284,1048.8936)"
|
||||
x1="1710.802"
|
||||
y1="4975.228"
|
||||
x2="1652.1422"
|
||||
y2="4926.0415" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2198"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.22796197,0,0,0.22798656,-1029.3611,-516.35749)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient2009">
|
||||
<stop
|
||||
style="stop-color:#f5f5f5;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2005" />
|
||||
<stop
|
||||
style="stop-color:#f5f5f5;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2007" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient2196"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,0.22945621,-0.22945621,0,1158.704,-373.75425)"
|
||||
x1="1710.802"
|
||||
y1="4975.228"
|
||||
x2="1652.1422"
|
||||
y2="4926.0415" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient2194"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-0.097279,0.09727896,0,-449.73978,167.5063)"
|
||||
x1="1632.0477"
|
||||
y1="4981.3447"
|
||||
x2="1693.9222"
|
||||
y2="4946.9316" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2192"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.22945621,0,0,0.22945621,-1030.9526,-524.92857)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4539.2959"
|
||||
y2="2351.7751" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2190"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.23947392,0,0,0.23947399,-1071.1667,-551.60122)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4539.2959"
|
||||
y2="2351.7751" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2188"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,0.22798656,-0.22796197,0,541.76567,-1033.9073)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2186"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-0.22798656,-0.22796197,0,541.76567,1071.2141)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2184"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-0.22798656,0.22796197,0,-511.86527,1071.2141)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="107.45186"
|
||||
inkscape:cy="35.577827"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="true"
|
||||
units="px"
|
||||
inkscape:showpageshadow="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:bbox-paths="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-bbox-edge-midpoints="false"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:snap-nodes="true"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:snap-page="true"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid319"
|
||||
originx="-6.9805273e-15"
|
||||
originy="-6.980528e-15" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="opacity:0.04470928;fill:#050505;stroke:none;stroke-width:0.192438;stroke-linecap:square;paint-order:stroke fill markers;fill-opacity:0.03451458"
|
||||
id="rect339"
|
||||
width="33.866665"
|
||||
height="33.866665"
|
||||
x="3.4902638e-15"
|
||||
y="3.4902638e-15" />
|
||||
<path
|
||||
id="path2172"
|
||||
style="opacity:1;fill:url(#linearGradient2194);fill-opacity:1;stroke:#ffffff;stroke-width:0.189129;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
d="M 29.460396,6.7875213 V 2.72324 l 4.064309,4.0642813 z"
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<g
|
||||
id="g1175"
|
||||
transform="matrix(1.0177349,0,0,1.0177349,-0.15056408,-0.31430128)"
|
||||
style="stroke-width:0.982574">
|
||||
<path
|
||||
id="path2170"
|
||||
style="opacity:1;fill:url(#linearGradient2196);fill-opacity:1;stroke:#ffffff;stroke-width:0.185833;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
d="M 28.393217,5.3400577 V 14.926735 L 18.806543,5.3400577 Z"
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2192);stroke-width:0.12682;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 28.393217,5.3400577 23.61143,10.122934"
|
||||
id="path2174"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2190);stroke-width:0.129069;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 31.506974,4.7404732 29.460396,6.7875213"
|
||||
id="path2176"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<g
|
||||
id="g1171"
|
||||
transform="matrix(1.00156,0,0,1.0014514,0.06599202,-0.11494774)"
|
||||
style="stroke-width:0.9985">
|
||||
<path
|
||||
id="path2162"
|
||||
style="opacity:1;fill:url(#linearGradient2204);fill-opacity:1;stroke:#ffffff;stroke-width:0.187626;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
d="M 2.1413076,5.7567952 H 18.336441 l 9.506012,9.5070378 V 31.46073 H 2.1413076 Z"
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
id="path2164"
|
||||
style="opacity:0.404507;fill:url(#linearGradient2202);fill-opacity:1;stroke:none;stroke-width:0.213405;stroke-linecap:square;stroke-linejoin:round;paint-order:stroke fill markers"
|
||||
d="M 27.842495,15.26388 V 31.485416 L 2.1166666,5.7568177 H 18.33646 Z"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
id="path2166"
|
||||
style="opacity:0.404507;fill:url(#linearGradient2200);fill-opacity:1;stroke:none;stroke-width:0.213405;stroke-linecap:square;stroke-linejoin:round;paint-order:stroke fill markers"
|
||||
d="M 27.842495,31.485416 V 15.26388 L 23.059402,10.539405 2.1166666,31.485416 Z"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2198);stroke-width:0.128043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 23.086067,10.514784 -8.135893,8.138618"
|
||||
id="path2168"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2188);stroke-width:0.128043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14.950174,18.653402 6.8124322,10.516629"
|
||||
id="path2178"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2186);stroke-width:0.128043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14.950174,18.653402 6.8124322,26.790173"
|
||||
id="path2180"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2184);stroke-width:0.128043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 14.950174,18.653402 8.137738,8.136771"
|
||||
id="path2182"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
BIN
images/KDDockWidgets-16x16.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
images/KDDockWidgets-24x24.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
images/KDDockWidgets-32x32.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
images/KDDockWidgets-48x48.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
images/KDDockWidgets-64x64.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
images/KDDockWidgets-banner.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
862
images/KDDockWidgets-banner.svg
Normal file
@@ -0,0 +1,862 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="301.11804mm"
|
||||
height="104.09705mm"
|
||||
viewBox="0 0 1066.9537 368.84777"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="kddw.svg"
|
||||
inkscape:export-filename="/home/pinheiro/media/server/kdab/2017/templates/Marketing/Branding/products/kddockwidgets/kddw.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient2009">
|
||||
<stop
|
||||
style="stop-color:#f5f5f5;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2005" />
|
||||
<stop
|
||||
style="stop-color:#f5f5f5;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2007" />
|
||||
</linearGradient>
|
||||
<inkscape:path-effect
|
||||
pattern-nodetypes="cscscsscssc"
|
||||
fuse_tolerance="0"
|
||||
vertical_pattern="true"
|
||||
prop_units="true"
|
||||
tang_offset="0"
|
||||
normal_offset="0"
|
||||
spacing="0"
|
||||
scale_y_rel="false"
|
||||
prop_scale="0.88207218"
|
||||
copytype="single_stretched"
|
||||
pattern="m 4206.4067,1373.8314 c 1.1289,-1.7427 2.2338,-2.9184 2.9093,-4.8116 0.4125,-1.156 -0.031,-16.8273 0.6649,-16.8273 0.6422,0 0.2359,15.574 0.6242,16.7092 0.6713,1.9621 1.7981,3.1516 2.95,4.9297 11.1033,14.807 11.2215,45.5151 0,60.2344 -0.7017,0.9204 -1.6243,2.6721 -2.3634,4.5072 -0.7184,1.7837 -1.2634,-18.8714 -1.2634,-17.6169 0,-1.3447 -0.5565,19.2474 -1.2655,17.457 -0.7387,-1.8651 -1.6429,-3.5838 -2.2561,-4.3473 -11.7524,-14.6327 -11.1808,-45.7893 0,-60.2344 z"
|
||||
is_visible="true"
|
||||
id="path-effect12719"
|
||||
effect="skeletal"
|
||||
lpeversion="0"
|
||||
hide_knot="false" />
|
||||
<inkscape:path-effect
|
||||
effect="skeletal"
|
||||
id="path-effect12715"
|
||||
is_visible="true"
|
||||
pattern="m 4176.4353,1393.8123 c 1.1289,-1.7427 2.2338,-2.9184 2.9093,-4.8116 0.4125,-1.156 -0.031,-16.8273 0.665,-16.8273 0.6421,0 0.2358,15.574 0.6242,16.7092 0.6713,1.9621 1.7981,3.1516 2.95,4.9297 11.1033,14.807 11.2215,45.5151 0,60.2344 -0.7017,0.9204 -1.6244,2.6721 -2.3635,4.5072 -0.7184,1.7837 -1.2633,-18.8714 -1.2633,-17.6169 0,-1.3448 -0.5565,19.2474 -1.2656,17.457 -0.7386,-1.8651 -1.6429,-3.5839 -2.2561,-4.3473 -11.7523,-14.6327 -11.1808,-45.7893 0,-60.2344 z"
|
||||
copytype="single_stretched"
|
||||
prop_scale="0.88207218"
|
||||
scale_y_rel="false"
|
||||
spacing="0"
|
||||
normal_offset="0"
|
||||
tang_offset="0"
|
||||
prop_units="true"
|
||||
vertical_pattern="true"
|
||||
fuse_tolerance="0"
|
||||
pattern-nodetypes="cscscsscssc"
|
||||
lpeversion="0"
|
||||
hide_knot="false" />
|
||||
<inkscape:path-effect
|
||||
pattern-nodetypes="cscscsscssc"
|
||||
fuse_tolerance="0"
|
||||
vertical_pattern="true"
|
||||
prop_units="true"
|
||||
tang_offset="0"
|
||||
normal_offset="0"
|
||||
spacing="0"
|
||||
scale_y_rel="false"
|
||||
prop_scale="0.88207218"
|
||||
copytype="single_stretched"
|
||||
pattern="m 4176.4353,1398.5578 c 1.1289,-1.7428 2.2338,-2.9184 2.9093,-4.8116 0.4125,-1.1561 -0.031,-16.8273 0.665,-16.8273 0.6421,0 0.2358,15.574 0.6242,16.7092 0.6713,1.9621 1.7981,3.1515 2.95,4.9297 11.1033,14.807 11.2215,45.515 0,60.2343 -0.7017,0.9205 -1.6244,2.6722 -2.3635,4.5073 -0.7184,1.7836 -1.2633,-18.8714 -1.2633,-17.617 0,-1.3447 -0.5565,19.2475 -1.2656,17.4571 -0.7386,-1.8652 -1.6429,-3.5839 -2.2561,-4.3474 -11.7523,-14.6327 -11.1808,-45.7892 0,-60.2343 z"
|
||||
is_visible="true"
|
||||
id="path-effect12711"
|
||||
effect="skeletal"
|
||||
lpeversion="0"
|
||||
hide_knot="false" />
|
||||
<inkscape:path-effect
|
||||
effect="skeletal"
|
||||
id="path-effect12616"
|
||||
is_visible="true"
|
||||
pattern="m 4231.537,1404.0525 c 1.1289,-1.7427 2.2338,-2.9184 2.9093,-4.8116 0.4125,-1.156 -0.031,-16.8273 0.6649,-16.8273 0.6422,0 0.2359,15.574 0.6242,16.7092 0.6713,1.9621 1.7981,3.1516 2.95,4.9297 11.1033,14.807 11.2215,45.5151 0,60.2344 -0.7017,0.9204 -1.6243,2.6721 -2.3634,4.5072 -0.7184,1.7837 -1.2634,-18.8714 -1.2634,-17.6169 0,-1.3447 -0.5565,19.2474 -1.2655,17.457 -0.7387,-1.8651 -1.6429,-3.5838 -2.2561,-4.3473 -11.7524,-14.6327 -11.1808,-45.7893 0,-60.2344 z"
|
||||
copytype="single_stretched"
|
||||
prop_scale="0.88207218"
|
||||
scale_y_rel="false"
|
||||
spacing="0"
|
||||
normal_offset="0"
|
||||
tang_offset="0"
|
||||
prop_units="true"
|
||||
vertical_pattern="true"
|
||||
fuse_tolerance="0"
|
||||
pattern-nodetypes="cscscsscssc"
|
||||
lpeversion="0"
|
||||
hide_knot="false" />
|
||||
<inkscape:path-effect
|
||||
effect="ellipse_5pts"
|
||||
id="path-effect12614"
|
||||
is_visible="false"
|
||||
lpeversion="0" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient1176">
|
||||
<stop
|
||||
style="stop-color:#fdc324;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop1170" />
|
||||
<stop
|
||||
id="stop1172"
|
||||
offset="0.8829243779"
|
||||
style="stop-color:#fb8510;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#fb410e;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop1174" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4304">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4306" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4308" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5010"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop5012"
|
||||
offset="0"
|
||||
style="stop-color:#fdc324;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#fb5010;stop-opacity:1;"
|
||||
offset="0.8829243779"
|
||||
id="stop5016" />
|
||||
<stop
|
||||
id="stop5014"
|
||||
offset="1"
|
||||
style="stop-color:#fb410e;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4733"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4735"
|
||||
offset="0"
|
||||
style="stop-color:#1abafb;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#19aff2;stop-opacity:1;"
|
||||
offset="0.6658641696"
|
||||
id="stop4739" />
|
||||
<stop
|
||||
id="stop4737"
|
||||
offset="1"
|
||||
style="stop-color:#187fcb;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4182">
|
||||
<stop
|
||||
style="stop-color:#04a5e7;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4184" />
|
||||
<stop
|
||||
style="stop-color:#2982c4;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4186" />
|
||||
</linearGradient>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath4715">
|
||||
<circle
|
||||
transform="rotate(-7.0121541)"
|
||||
r="21.990837"
|
||||
cy="535.98236"
|
||||
cx="166.16179"
|
||||
id="circle4717"
|
||||
style="opacity:1;fill:url(#radialGradient4719);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4182"
|
||||
id="radialGradient4719"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.90375526,-0.01183805,0.01309761,0.99991422,8.8420044,1.9777154)"
|
||||
cx="163.26299"
|
||||
cy="524.61469"
|
||||
fx="163.26299"
|
||||
fy="524.61469"
|
||||
r="21.990837" />
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath4857">
|
||||
<circle
|
||||
transform="rotate(-7.0121541)"
|
||||
r="20.994516"
|
||||
cy="547.18286"
|
||||
cx="257.22266"
|
||||
id="circle4859"
|
||||
style="opacity:1;fill:url(#radialGradient4861);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="radialGradient4861"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.85037313,-0.14640233,0.12774601,0.74200851,47.860692,172.55092)"
|
||||
cx="164.63748"
|
||||
cy="531.20685"
|
||||
fx="164.78966"
|
||||
fy="519.24323"
|
||||
r="21.990837" />
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter5080"
|
||||
x="-0.16258018"
|
||||
width="1.3251604"
|
||||
y="-0.092115037"
|
||||
height="1.1842301">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="3.753083949"
|
||||
id="feGaussianBlur5082" />
|
||||
</filter>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath5086">
|
||||
<path
|
||||
style="opacity:1;fill:url(#radialGradient5090);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="circle5088"
|
||||
transform="rotate(-7.0121541)"
|
||||
r="21.2975940704"
|
||||
cy="547.763061523"
|
||||
cx="261.940002441"
|
||||
d="" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5010"
|
||||
id="radialGradient5090"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.94081295,-0.13201913,0.11519568,0.82092341,44.333431,128.77695)"
|
||||
cx="164.63748"
|
||||
cy="531.20685"
|
||||
fx="165.19966"
|
||||
fy="522.50458"
|
||||
r="21.990837" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4304"
|
||||
id="linearGradient4818"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="538.8783"
|
||||
y1="1254.7184"
|
||||
x2="538.8783"
|
||||
y2="1463.9575"
|
||||
gradientTransform="translate(0,-2501.2316)" />
|
||||
<mask
|
||||
maskUnits="userSpaceOnUse"
|
||||
id="mask4814">
|
||||
<rect
|
||||
style="opacity:0.821;fill:url(#linearGradient4818);fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect4816"
|
||||
width="534.79858"
|
||||
height="279.44431"
|
||||
x="273.93802"
|
||||
y="-1314.6536"
|
||||
transform="scale(1,-1)" />
|
||||
</mask>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath1276">
|
||||
<circle
|
||||
style="opacity:1;fill:url(#radialGradient1280);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="circle1278"
|
||||
cx="440.63205"
|
||||
cy="722.66998"
|
||||
r="85.281738"
|
||||
transform="rotate(-7.0121541)" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1176"
|
||||
id="radialGradient1280"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(4.6443382,-1.2687174,1.1434364,4.1857275,-939.86166,-1313.7824)"
|
||||
cx="163.84512"
|
||||
cy="535.58044"
|
||||
fx="164.13194"
|
||||
fy="524.82343"
|
||||
r="21.990837" />
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath1713">
|
||||
<path
|
||||
style="opacity:1;fill:url(#radialGradient1717);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="m 518.8522,558.0521 c -0.82495,-10e-4 -1.65149,0.008 -2.48033,0.0264 -3.44325,0.0774 -6.88048,0.32689 -10.29881,0.7477 -5.92658,0.72912 -17.20559,3.60819 -17.20559,3.60819 l 6.91055,14.03625 c 0,0 8.00571,-1.85496 12.17321,-2.3677 2.90897,-0.35809 5.83402,-0.57046 8.76419,-0.63629 45.14453,-1.01173 82.94959,34.62 86.4993,76.24601 4.23839,49.70191 -36.47733,87.05581 -73.79756,91.14458 -0.12198,-4.28104 75.73972,20.55263 91.79648,-92.08877 -6.37636,-51.85265 -50.39015,-90.64928 -102.36144,-90.7164 z"
|
||||
id="path1715"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="sccccccsccs" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1176"
|
||||
id="radialGradient1717"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(6.0139763,-1.6118698,1.4523165,5.4215643,-1286.7694,-2022.8268)"
|
||||
cx="163.84512"
|
||||
cy="535.58044"
|
||||
fx="164.13194"
|
||||
fy="524.82343"
|
||||
r="21.990837" />
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath1545">
|
||||
<rect
|
||||
style="opacity:1;fill:#eff0f1;fill-opacity:1;fill-rule:nonzero;stroke:#fcfcfc;stroke-width:1.84406;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect1547"
|
||||
width="499.94531"
|
||||
height="626.17499"
|
||||
x="1503.0391"
|
||||
y="115.11468" />
|
||||
</clipPath>
|
||||
<style
|
||||
id="current-color-scheme"
|
||||
type="text/css">
|
||||
.ColorScheme-Text {
|
||||
color:#f2f2f2;
|
||||
}
|
||||
</style>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath2129">
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.91875;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect2131"
|
||||
width="90.85743"
|
||||
height="216.4682"
|
||||
x="-4259.5063"
|
||||
y="1335.9559"
|
||||
ry="0.79583901"
|
||||
transform="scale(-1,1)" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath3852">
|
||||
<rect
|
||||
style="opacity:0.547;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#bb0000;stroke-width:1.10063;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect3854"
|
||||
width="117.72582"
|
||||
height="199.94704"
|
||||
x="-5563.061"
|
||||
y="1545.0594"
|
||||
ry="0.52556229"
|
||||
transform="scale(-1,1)" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath2142">
|
||||
<path
|
||||
style="opacity:0.892;fill:none;fill-opacity:0;fill-rule:nonzero;stroke:#fffafa;stroke-width:0.344063;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.374332;paint-order:markers fill stroke"
|
||||
d="m 3696.4014,591.63757 v 219.42444 h 177.3285 V 591.63757 Z m 103.6395,111.05164 c 3.718,0 7.1638,0.70279 10.2319,2.15515 a 2.6924666,2.6924666 0 0 1 1.3074,3.53028 l -0.9723,2.18078 a 2.6924666,2.6924666 0 0 1 -3.6639,1.31104 c -2.1746,-1.08732 -4.3873,-1.61133 -6.7621,-1.61133 -3.7727,0 -6.2834,1.07384 -8.2617,3.27759 -1.9791,2.20458 -3.0579,5.25668 -3.0579,9.62951 0,4.51996 1.0495,7.63935 2.8803,9.76502 1.8165,2.10909 4.2427,3.16772 8.0603,3.16772 2.6784,0 5.0788,-0.34226 7.2271,-0.99792 a 2.6924666,2.6924666 0 0 1 3.4772,2.57446 v 2.13318 a 2.6924666,2.6924666 0 0 1 -1.7981,2.53967 c -2.6875,0.94525 -5.8344,1.36231 -9.4757,1.36231 -5.4481,0 -10.197,-1.89711 -13.5095,-5.62134 -3.3288,-3.74252 -4.8761,-8.88316 -4.8761,-14.9707 0,-3.86297 0.736,-7.40293 2.2705,-10.50843 a 2.6924666,2.6924666 0 0 1 0.01,-0.0128 c 1.5539,-3.10779 3.8721,-5.61989 6.8097,-7.33155 2.9591,-1.73083 6.391,-2.57263 10.1074,-2.57263 z m -48.219,0.35706 h 1.5418 a 2.6924666,2.6924666 0 0 1 2.5067,1.70837 l 13.656,34.80286 a 2.6924666,2.6924666 0 0 1 -2.5067,3.67492 h -2.7265 a 2.6924666,2.6924666 0 0 1 -2.5049,-1.70654 l -4.1418,-10.52673 h -10.4169 l -4.1656,10.53222 a 2.6924666,2.6924666 0 0 1 -2.5031,1.70105 h -2.6788 a 2.6924666,2.6924666 0 0 1 -2.4994,-3.69323 l 13.9398,-34.80286 a 2.6924666,2.6924666 0 0 1 2.4994,-1.69006 z m 77.2083,0.14099 h 2.4188 a 2.6924666,2.6924666 0 0 1 2.6916,2.69165 v 11.48437 l 12.7881,-13.34655 a 2.6924666,2.6924666 0 0 1 1.9446,-0.82947 h 3.0835 a 2.6924666,2.6924666 0 0 1 1.9336,4.56482 l -12.6251,13.02429 13.2458,18.17871 a 2.6924666,2.6924666 0 0 1 -2.1753,4.27734 h -2.9645 a 2.6924666,2.6924666 0 0 1 -2.1771,-1.10962 l -11.5594,-15.9082 -1.4942,1.31653 v 13.00964 a 2.6924666,2.6924666 0 0 1 -2.6916,2.69165 h -2.4188 a 2.6924666,2.6924666 0 0 1 -2.6917,-2.69165 v -34.66186 a 2.6924666,2.6924666 0 0 1 2.6917,-2.69165 z m -76.4942,14.30786 -2.3181,5.93994 h 4.5612 z"
|
||||
id="path2144"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4182"
|
||||
id="linearGradient1962"
|
||||
x1="4533.3271"
|
||||
y1="2365.7585"
|
||||
x2="4573.1943"
|
||||
y2="2342.7412"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.753257,0,0,3.753257,-16367.842,-8500.4241)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient1977"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="1710.802"
|
||||
y1="4975.228"
|
||||
x2="1652.1422"
|
||||
y2="4926.0415"
|
||||
gradientTransform="matrix(0,1.6537964,-1.6537964,0,8966.582,-2491.3872)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient1983"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,4.4670474,-4.4670474,0,22821.673,-7136.1767)"
|
||||
x1="1710.802"
|
||||
y1="4975.228"
|
||||
x2="1652.1422"
|
||||
y2="4926.0415" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient1987"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-4.4670474,-4.4670474,0,22821.673,7810.8518)"
|
||||
x1="1710.802"
|
||||
y1="4975.228"
|
||||
x2="1652.1422"
|
||||
y2="4926.0415" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient1991"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-0.6718043,0.6718042,0,-2481.8694,1362.3567)"
|
||||
x1="1632.0477"
|
||||
y1="4981.3447"
|
||||
x2="1693.9222"
|
||||
y2="4946.9316" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2011"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.6537964,0,0,1.6537964,-6852.8864,-3543.355)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2016"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4539.2959"
|
||||
y2="2351.7751"
|
||||
gradientTransform="matrix(1.6537964,0,0,1.6537964,-6815.2795,-3580.97)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2024"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.6537964,0,0,1.6537964,-6773.4163,-3603.767)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4539.2959"
|
||||
y2="2351.7751" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2028"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162"
|
||||
gradientTransform="matrix(0,1.6537964,-1.6537964,0,4545.1713,-7297.62)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2032"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-1.6537964,-1.6537964,0,4545.1714,7972.7634)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2036"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-1.6537964,1.6537964,0,-3098.608,7972.7634)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2184"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-2.6306245,2.6306245,0,-4989.2651,12512.226)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2186"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-2.6306245,-2.6306245,0,7169.374,12512.226)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2188"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,2.6306245,-2.6306245,0,7169.3738,-11777.732)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2190"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(2.6306245,0,0,2.6306245,-10834.629,-5902.075)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4539.2959"
|
||||
y2="2351.7751" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2192"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(2.6306245,0,0,2.6306245,-10901.219,-5865.8128)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4539.2959"
|
||||
y2="2351.7751" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient2194"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-1.0686109,1.0686107,0,-4008.2449,1997.3295)"
|
||||
x1="1632.0477"
|
||||
y1="4981.3447"
|
||||
x2="1693.9222"
|
||||
y2="4946.9316" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient2196"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,2.6306245,-2.6306245,0,14202.326,-4132.6592)"
|
||||
x1="1710.802"
|
||||
y1="4975.228"
|
||||
x2="1652.1422"
|
||||
y2="4926.0415" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2009"
|
||||
id="linearGradient2198"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(2.6306245,0,0,2.6306245,-10961.038,-5805.9802)"
|
||||
x1="4620.3696"
|
||||
y1="2304.967"
|
||||
x2="4567.6602"
|
||||
y2="2342.3162" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient2200"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,-7.1055448,-7.1055448,0,36241.038,12254.68)"
|
||||
x1="1710.802"
|
||||
y1="4975.228"
|
||||
x2="1652.1422"
|
||||
y2="4926.0415" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4733"
|
||||
id="linearGradient2202"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,7.1055448,-7.1055448,0,36241.038,-11520.931)"
|
||||
x1="1710.802"
|
||||
y1="4975.228"
|
||||
x2="1652.1422"
|
||||
y2="4926.0415" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4182"
|
||||
id="linearGradient2204"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(5.9701483,0,0,5.9701483,-26096.079,-13690.983)"
|
||||
x1="4533.3271"
|
||||
y1="2365.7585"
|
||||
x2="4573.1943"
|
||||
y2="2342.7412" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="1020.3148"
|
||||
inkscape:cy="-114.96383"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:window-width="1714"
|
||||
inkscape:window-height="1203"
|
||||
inkscape:window-x="552"
|
||||
inkscape:window-y="164"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-page="false"
|
||||
inkscape:lockguides="false"
|
||||
inkscape:document-rotation="0"
|
||||
fit-margin-top="30"
|
||||
fit-margin-left="30"
|
||||
fit-margin-bottom="30"
|
||||
fit-margin-right="30">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1761"
|
||||
originx="151.86636"
|
||||
originy="-166.49869" />
|
||||
<sodipodi:guide
|
||||
position="4396.866,-873.03128"
|
||||
orientation="0,1"
|
||||
id="guide12660"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="4356.202,-851.11722"
|
||||
orientation="1,0"
|
||||
id="guide12666"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="4387.784,-904.14456"
|
||||
orientation="0,1"
|
||||
id="guide12692"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="4386.9051,-921.42972"
|
||||
orientation="1,0"
|
||||
id="guide12694"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="4372.1395,-876.42972"
|
||||
orientation="1,0"
|
||||
id="guide12696"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="968.67798,222.36216"
|
||||
orientation="-0.70710678,-0.70710678"
|
||||
id="guide2114" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Camada 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(151.86636,-166.4987)">
|
||||
<path
|
||||
clip-path="url(#clipPath5086)"
|
||||
sodipodi:nodetypes="cscssscscccscc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5279"
|
||||
d="m 338.65051,492.26754 6.78652,6.38162 c 3.12988,2.94314 3.15859,8.98109 1.39414,16.79863 -2.23777,8.35146 -8.50357,13.53359 -15.111,15.04217 -6.31742,1.44237 -13.30427,-0.34272 -17.90992,-4.61744 -1.44603,-1.34212 -2.21872,-3.81133 -1.67407,-5.84402 0.60965,-2.27523 0.73619,-5.45316 2.06641,-6.24219 -0.76814,0.26722 -1.70405,0.57479 -2.82422,1.63086 -1.88644,1.77848 -1.96369,4.28221 -4.42969,4.97266 0.25165,-7.08965 -4.15819,-10.96822 -4.46346,-14.11351 -2.9188,16.12091 12.65231,34.52007 31.91417,29.35887 12.41302,-3.09834 19.81219,-12.21234 22.25881,-22.50042 1.41285,-5.94104 0.97674,-12.06732 -0.30664,-17.20899 z"
|
||||
style="opacity:0.656;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5080)"
|
||||
transform="translate(0,171.82695)" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.75px;line-height:125%;font-family:'Helvetica Neue LT Std';-inkscape-font-specification:'Helvetica Neue LT Std, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="5413.5938"
|
||||
y="1750.3309"
|
||||
id="text3551" />
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3585"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:'Helvetica Neue LT Std';-inkscape-font-specification:'Helvetica Neue LT Std, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"><flowRegion
|
||||
id="flowRegion3587"><rect
|
||||
id="rect3589"
|
||||
width="638"
|
||||
height="558"
|
||||
x="7608"
|
||||
y="2084.51977539" /></flowRegion><flowPara
|
||||
id="flowPara3591" /></flowRoot>
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3593"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:'Helvetica Neue LT Std';-inkscape-font-specification:'Helvetica Neue LT Std, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"><flowRegion
|
||||
id="flowRegion3595"><rect
|
||||
id="rect3597"
|
||||
width="1124"
|
||||
height="944"
|
||||
x="6470"
|
||||
y="1612.51965332" /></flowRegion><flowPara
|
||||
id="flowPara3599" /></flowRoot>
|
||||
<path
|
||||
id="rect1131"
|
||||
style="opacity:1;fill:url(#linearGradient1962);fill-opacity:1;stroke:#ffffff;stroke-width:0.68156246;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
d="m 630.35714,244.02067 h 117.49083 l 68.9633,68.9633 v 117.491 H 630.35714 Z"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
id="path1981"
|
||||
style="opacity:0.404507;fill:url(#linearGradient1983);fill-opacity:1;stroke:none;stroke-width:0.775215;stroke-linecap:square;stroke-linejoin:round;paint-order:stroke fill markers"
|
||||
d="m 816.8116,312.98431 v 117.66976 l -186.63323,-186.63323 117.66977,0 z"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
id="path1985"
|
||||
style="opacity:0.404507;fill:url(#linearGradient1987);fill-opacity:1;stroke:none;stroke-width:0.775215;stroke-linecap:square;stroke-linejoin:round;paint-order:stroke fill markers"
|
||||
d="M 816.8116,430.65407 V 312.98431 L 782.11165,278.71335 630.17837,430.65407 Z"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2011);stroke-width:0.46513;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 782.30514,278.53475 -59.0235,59.03688"
|
||||
id="path2003"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
id="path1975"
|
||||
style="opacity:1;fill:url(#linearGradient1977);fill-opacity:1;stroke:#ffffff;stroke-width:0.68156246;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
d="m 819.91214,240.91981 v 69.0956 l -69.09561,-69.0956 z"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
id="path1989"
|
||||
style="opacity:1;fill:url(#linearGradient1991);fill-opacity:1;stroke:#ffffff;stroke-width:0.68156246;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1;paint-order:stroke fill markers;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="m 827.46585,252.44015 v -28.06774 l 28.06807,28.06774 z"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2016);stroke-width:0.46513;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 819.91214,240.91981 785.44752,275.3922"
|
||||
id="path2014"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2024);stroke-width:0.46513;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 841.59952,238.30333 -14.13367,14.13682"
|
||||
id="path2022"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2028);stroke-width:0.46513;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 723.28164,337.57163 -59.03688,-59.0235"
|
||||
id="path2026"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2032);stroke-width:0.46513;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 723.28164,337.57163 -59.03688,59.0235"
|
||||
id="path2030"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2036);stroke-width:0.46513;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 723.28164,337.57163 59.0369,59.0235"
|
||||
id="path2034"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:93.0993px;line-height:125%;font-family:'Helvetica Neue LT Std';-inkscape-font-specification:'Helvetica Neue LT Std, Normal';text-align:start;letter-spacing:6.17598px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#292929;fill-opacity:1;stroke:none;stroke-width:8.58756px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="-81.289284"
|
||||
y="449.83054"
|
||||
id="text2108"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan2106"
|
||||
x="-81.289284"
|
||||
y="449.83054"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-family:'Open Sans';-inkscape-font-specification:'Open Sans Light';letter-spacing:6.17598px;word-spacing:10.7995px;fill:#292929;fill-opacity:1;stroke-width:8.58756px">KDDockWidgets</tspan></text>
|
||||
<path
|
||||
id="path2162"
|
||||
style="opacity:1;fill:url(#linearGradient2204);fill-opacity:1;stroke:#ffffff;stroke-width:1.08414;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
d="M 942.24318,218.43936 H 1129.131 l 109.697,109.69702 v 186.888 H 942.24318 Z"
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
id="path2164"
|
||||
style="opacity:0.404507;fill:url(#linearGradient2202);fill-opacity:1;stroke:none;stroke-width:1.2331;stroke-linecap:square;stroke-linejoin:round;paint-order:stroke fill markers"
|
||||
d="M 1238.8285,328.13692 V 515.30927 L 941.95882,218.43962 h 187.17238 z"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
id="path2166"
|
||||
style="opacity:0.404507;fill:url(#linearGradient2200);fill-opacity:1;stroke:none;stroke-width:1.2331;stroke-linecap:square;stroke-linejoin:round;paint-order:stroke fill markers"
|
||||
d="M 1238.8285,515.30927 V 328.13692 l -55.1957,-54.51338 -241.67398,241.68573 z"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2198);stroke-width:0.739863;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 1183.9405,273.33945 -93.8862,93.90749"
|
||||
id="path2168"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
id="path2170"
|
||||
style="opacity:1;fill:url(#linearGradient2196);fill-opacity:1;stroke:#ffffff;stroke-width:1.08414;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
d="M 1243.7603,213.50695 V 323.41441 L 1133.8529,213.50695 Z"
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
id="path2172"
|
||||
style="opacity:1;fill:url(#linearGradient2194);fill-opacity:1;stroke:#ffffff;stroke-width:1.08414;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
d="m 1255.7759,231.83187 v -44.64618 l 44.6465,44.64618 z"
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2192);stroke-width:0.739863;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 1243.7603,213.50695 -54.8213,54.83378"
|
||||
id="path2174"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2190);stroke-width:0.739863;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 1278.2576,209.34502 -22.4817,22.48685"
|
||||
id="path2176"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2188);stroke-width:0.739863;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 1090.0543,367.24694 -93.90751,-93.8862"
|
||||
id="path2178"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2186);stroke-width:0.739863;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 1090.0543,367.24694 -93.90751,93.8862"
|
||||
id="path2180"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient2184);stroke-width:0.739863;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 1090.0543,367.24694 93.9075,93.8862"
|
||||
id="path2182"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 38 KiB |
BIN
images/KDDockWidgets-logo.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
1
kddockwidgets-rpmlintrc
Normal file
@@ -0,0 +1 @@
|
||||
addFilter("E: shlib-policy-name-error")
|
||||
@@ -1,10 +1,10 @@
|
||||
Format: 1.0
|
||||
Source: kddockwidgets
|
||||
Version: 0.99.9
|
||||
Version: 1.2.0-1
|
||||
Binary: kddockwidgets
|
||||
Maintainer: Allen Winter <allen.winter@kdab.com>
|
||||
Architecture: any
|
||||
Build-Depends: debhelper (>=9), cdbs, cmake, qt5-default, qtbase5-dev, libqt5x11extras5-dev
|
||||
|
||||
Files:
|
||||
00000000000000000000000000000000 00000 kddockwidgets-0.99.9.tar.gz
|
||||
00000000000000000000000000000000 00000 kddockwidgets-1.2.0.tar.gz
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
Name: kddockwidgets
|
||||
Version: 0.99.9
|
||||
Version: 1.2.0
|
||||
Release: 1
|
||||
Summary: KDAB's Dock Widget Framework for Qt
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: %{name}-%{version}.tar.gz.asc
|
||||
Source2: %{name}-rpmlintrc
|
||||
URL: https://github.com/KDAB/KDDockWidgets
|
||||
Group: System/Libraries
|
||||
License: GPL-2.0-only OR GPL-3.0-only
|
||||
@@ -75,7 +76,6 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
|
||||
%defattr(-,root,root)
|
||||
%{_prefix}/share/doc/KDDockWidgets
|
||||
%{_libdir}/libkddockwidgets.so.*
|
||||
%{_libdir}/libkddockwidgets_multisplitter.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
@@ -85,8 +85,15 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
|
||||
%dir %{_libdir}/cmake/KDDockWidgets
|
||||
%{_libdir}/cmake/KDDockWidgets/*
|
||||
%{_libdir}/libkddockwidgets.so
|
||||
%{_libdir}/libkddockwidgets_multisplitter.so
|
||||
|
||||
%changelog
|
||||
* Thu Aug 06 2020 Allen Winter <allen.winter@kdb.com> 0.99.9
|
||||
* Thu Dec 17 2020 Allen Winter <allen.winter@kdab.com> 1.2.0
|
||||
1.2.0 final
|
||||
* Fri Dec 11 2020 Allen Winter <allen.winter@kdab.com> 1.1.1
|
||||
1.1.1 final
|
||||
* Mon Oct 26 2020 Allen Winter <allen.winter@kdab.com> 1.1.0
|
||||
1.1.0 final
|
||||
* Wed Sep 02 2020 Allen Winter <allen.winter@kdab.com> 1.0.0
|
||||
1.0.0 final
|
||||
* Thu Aug 06 2020 Allen Winter <allen.winter@kdab.com> 0.99.9
|
||||
1.0.0 release candidate
|
||||
|
||||
@@ -41,7 +41,7 @@ set(PyKDDockWidgets_typesystem_paths
|
||||
|
||||
# Include flags/path that will be set in 'target_include_directories'
|
||||
set(PyKDDockWidgets_target_include_directories
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
# Libraries that will be necessary to link the target, this will used in the command 'target_link_libraries'
|
||||
@@ -74,8 +74,8 @@ create_python_bindings(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
# Make moduled import from build dir works
|
||||
# Make module import from build dir work
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${CMAKE_CURRENT_BINARY_DIR}/__init__.py)
|
||||
|
||||
# install
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py DESTINATION ${PYTHON_BINDINGS_INSTALL_PREFIX}/PyKDDockWidgets)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}/PyKDDockWidgets)
|
||||
|
||||
@@ -17,8 +17,11 @@
|
||||
// Define PYTHON_BINDINGS this will be used in some part of c++ to skip problematic parts
|
||||
#define PYTHON_BINDINGS
|
||||
|
||||
#include <MainWindowBase.h>
|
||||
#include <MainWindow.h>
|
||||
#include <DockWidgetBase.h>
|
||||
#include <DockWidget.h>
|
||||
#ifndef QT_WIDGETS_LIB
|
||||
# define QT_WIDGETS_LIB
|
||||
#endif
|
||||
|
||||
#include <kddockwidgets/MainWindowBase.h>
|
||||
#include <kddockwidgets/MainWindow.h>
|
||||
#include <kddockwidgets/DockWidgetBase.h>
|
||||
#include <kddockwidgets/DockWidget.h>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<!-- this is used in a public virtual pure function we need to declare it
|
||||
otherwise shiboken will ignore the function and will fail to create a wrapper -->
|
||||
<primitive-type name="DropAreaWithCentralFrame"/>
|
||||
<primitive-type name="SideBar"/>
|
||||
|
||||
<!-- Some plublic enum and flags -->
|
||||
<enum-type name="Location"/>
|
||||
@@ -19,6 +20,9 @@
|
||||
<enum-type name="RestoreOption" flags="RestoreOptions"/>
|
||||
<enum-type name="DefaultSizeMode"/>
|
||||
<enum-type name="FrameOption" flags="FrameOptions"/>
|
||||
<enum-type name="DropIndicatorType"/>
|
||||
<enum-type name="SideBarLocation"/>
|
||||
<enum-type name="TitleBarButtonType"/>
|
||||
|
||||
<!-- our classes
|
||||
For class we can use two types:
|
||||
@@ -32,6 +36,7 @@
|
||||
<!-- this class contains a internal enum, so it should be declared
|
||||
inside of the object-type -->
|
||||
<enum-type name="Option" flags="Options" />
|
||||
<enum-type name="IconPlace" flags="IconPlaces" />
|
||||
</object-type>
|
||||
|
||||
<object-type name="DockWidget" />
|
||||
|
||||
@@ -23,29 +23,66 @@ add_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS
|
||||
|
||||
set(DOCKSLIBS_SRCS
|
||||
Config.cpp
|
||||
Config.h
|
||||
Qt5Qt6Compat_p.h
|
||||
FocusScope.cpp
|
||||
FocusScope.h
|
||||
FrameworkWidgetFactory.cpp
|
||||
FrameworkWidgetFactory.h
|
||||
DockWidgetBase.cpp
|
||||
DockWidgetBase.h
|
||||
MainWindowBase.cpp
|
||||
MainWindowBase.h
|
||||
LayoutSaver.cpp
|
||||
LayoutSaver.h
|
||||
LayoutSaver_p.h
|
||||
private/MultiSplitter.cpp
|
||||
private/MultiSplitter_p.h
|
||||
private/Position.cpp
|
||||
private/ObjectViewer.cpp
|
||||
private/Position_p.h
|
||||
private/DropIndicatorOverlayInterface.cpp
|
||||
private/DropIndicatorOverlayInterface_p.h
|
||||
private/DropArea.cpp
|
||||
private/DropArea_p.h
|
||||
private/FloatingWindow.cpp
|
||||
private/FloatingWindow_p.h
|
||||
private/Logging.cpp
|
||||
private/Logging_p.h
|
||||
private/TitleBar.cpp
|
||||
private/TitleBar_p.h
|
||||
private/SideBar.cpp
|
||||
private/SideBar_p.h
|
||||
private/DockRegistry.cpp
|
||||
private/DockRegistry_p.h
|
||||
private/Draggable.cpp
|
||||
private/Draggable_p.h
|
||||
private/WindowBeingDragged.cpp
|
||||
private/WindowBeingDragged_p.h
|
||||
private/DragController.cpp
|
||||
private/DragController_p.h
|
||||
private/Frame.cpp
|
||||
private/Frame_p.h
|
||||
private/DropAreaWithCentralFrame.cpp
|
||||
private/DropAreaWithCentralFrame_p.h
|
||||
private/WidgetResizeHandler.cpp
|
||||
private/WidgetResizeHandler_p.h
|
||||
private/indicators/NullIndicators.cpp
|
||||
private/indicators/NullIndicators_p.h
|
||||
private/indicators/ClassicIndicators.cpp
|
||||
private/indicators/ClassicIndicators_p.h
|
||||
private/indicators/ClassicIndicatorsWindow.cpp
|
||||
private/indicators/ClassicIndicatorsWindow_p.h
|
||||
|
||||
private/multisplitter/Item.cpp
|
||||
private/multisplitter/Item_p.h
|
||||
private/multisplitter/Logging.cpp
|
||||
private/multisplitter/Logging_p.h
|
||||
private/multisplitter/MultiSplitterConfig.cpp
|
||||
private/multisplitter/MultiSplitterConfig.h
|
||||
private/multisplitter/Separator.cpp
|
||||
private/multisplitter/Separator_p.h
|
||||
private/multisplitter/Widget.cpp
|
||||
private/multisplitter/Widget.h
|
||||
)
|
||||
|
||||
set(DOCKS_INSTALLABLE_INCLUDES
|
||||
@@ -54,6 +91,7 @@ set(DOCKS_INSTALLABLE_INCLUDES
|
||||
FrameworkWidgetFactory.h
|
||||
DockWidgetBase.h
|
||||
KDDockWidgets.h
|
||||
Qt5Qt6Compat_p.h
|
||||
FocusScope.h
|
||||
QWidgetAdapter.h
|
||||
LayoutSaver.h
|
||||
@@ -61,16 +99,21 @@ set(DOCKS_INSTALLABLE_INCLUDES
|
||||
)
|
||||
|
||||
set(DOCKS_INSTALLABLE_PRIVATE_INCLUDES
|
||||
private/DragController_p.h
|
||||
private/Draggable_p.h
|
||||
private/DropIndicatorOverlayInterface_p.h
|
||||
private/FloatingWindow_p.h
|
||||
private/Frame_p.h
|
||||
private/SideBar_p.h
|
||||
private/TitleBar_p.h
|
||||
private/WindowBeingDragged_p.h
|
||||
private/DockRegistry_p.h
|
||||
)
|
||||
|
||||
set(DOCKS_INSTALLABLE_PRIVATE_WIDGET_INCLUDES
|
||||
private/widgets/QWidgetAdapter_widgets_p.h
|
||||
private/widgets/TitleBarWidget_p.h
|
||||
private/widgets/SideBarWidget_p.h
|
||||
private/widgets/FloatingWindowWidget_p.h
|
||||
private/widgets/FrameWidget_p.h
|
||||
private/widgets/TabBarWidget_p.h
|
||||
@@ -78,34 +121,69 @@ set(DOCKS_INSTALLABLE_PRIVATE_WIDGET_INCLUDES
|
||||
private/widgets/TabWidget_p.h
|
||||
)
|
||||
|
||||
if(OPTION_QTQUICK)
|
||||
if(${PROJECT_NAME}_QTQUICK)
|
||||
set(DOCKSLIBS_SRCS ${DOCKSLIBS_SRCS}
|
||||
private/quick/DockWidgetQuick.cpp
|
||||
DockWidgetQuick.cpp
|
||||
DockWidgetQuick.h
|
||||
private/quick/DockWidgetInstantiator.cpp
|
||||
private/quick/DockWidgetInstantiator_p.h
|
||||
private/quick/QWidgetAdapter_quick.cpp
|
||||
private/quick/QWidgetAdapter_quick_p.h
|
||||
private/quick/FloatingWindowQuick.cpp
|
||||
private/quick/FloatingWindowQuick_p.h
|
||||
private/quick/TitleBarQuick.cpp
|
||||
private/quick/TitleBarQuick_p.h
|
||||
private/quick/QmlTypes.cpp
|
||||
private/quick/QmlTypes.h
|
||||
private/quick/FrameQuick.cpp
|
||||
private/quick/FrameQuick_p.h
|
||||
private/quick/RubberBandQuick.cpp
|
||||
private/quick/RubberBandQuick.h
|
||||
private/quick/MainWindowQuick.cpp
|
||||
private/quick/MainWindowQuick_p.h
|
||||
private/quick/MainWindowWrapper.cpp
|
||||
)
|
||||
|
||||
qt5_add_resources(RESOURCES_QUICK ${CMAKE_CURRENT_SOURCE_DIR}/qtquick.qrc)
|
||||
private/quick/MainWindowWrapper_p.h
|
||||
private/multisplitter/Widget_quick.cpp
|
||||
private/multisplitter/Widget_quick.h
|
||||
private/multisplitter/Separator_quick.cpp
|
||||
private/multisplitter/Separator_quick.h
|
||||
private/multisplitter/Rubberband_quick.cpp
|
||||
private/multisplitter/Rubberband_quick.h
|
||||
kddockwidgets_qtquick.qrc)
|
||||
else()
|
||||
set(DOCKSLIBS_SRCS ${DOCKSLIBS_SRCS}
|
||||
private/DebugWindow.cpp
|
||||
private/DebugWindow_p.h
|
||||
private/ObjectViewer.cpp
|
||||
private/ObjectViewer_p.h
|
||||
MainWindow.cpp
|
||||
MainWindow.h
|
||||
DockWidget.h
|
||||
private/multisplitter/Widget_qwidget.cpp
|
||||
private/multisplitter/Widget_qwidget.h
|
||||
private/multisplitter/Separator_qwidget.cpp
|
||||
private/multisplitter/Separator_qwidget.h
|
||||
private/widgets/TabWidget.cpp
|
||||
private/widgets/TabWidget_p.h
|
||||
private/widgets/TabBarWidget.cpp
|
||||
private/widgets/TabBarWidget_p.h
|
||||
private/widgets/FloatingWindowWidget.cpp
|
||||
private/widgets/FloatingWindowWidget_p.h
|
||||
private/widgets/FrameWidget.cpp
|
||||
private/widgets/FrameWidget_p.h
|
||||
private/widgets/SideBarWidget.cpp
|
||||
private/widgets/SideBarWidget_p.h
|
||||
private/widgets/TabWidgetWidget.cpp
|
||||
private/widgets/TabWidgetWidget_p.h
|
||||
private/widgets/TitleBarWidget.cpp
|
||||
private/widgets/TitleBarWidget_p.h
|
||||
private/widgets/DockWidget.cpp
|
||||
private/widgets/QWidgetAdapter_widgets.cpp
|
||||
private/widgets/QWidgetAdapter_widgets_p.h
|
||||
private/indicators/SegmentedIndicators.cpp
|
||||
private/indicators/SegmentedIndicators_p.h
|
||||
# private/indicators/AnimatedIndicators.cpp
|
||||
)
|
||||
)
|
||||
|
||||
set(DOCKS_INSTALLABLE_INCLUDES
|
||||
${DOCKS_INSTALLABLE_INCLUDES}
|
||||
@@ -121,9 +199,7 @@ else()
|
||||
set(IS_CLANG_BUILD FALSE)
|
||||
endif()
|
||||
|
||||
add_subdirectory(private/multisplitter)
|
||||
|
||||
qt5_add_resources(RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/resources.qrc)
|
||||
set(RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/kddockwidgets_resources.qrc)
|
||||
|
||||
add_library(kddockwidgets ${KDDockWidgets_LIBRARY_MODE} ${DOCKSLIBS_SRCS} ${DOCKS_INSTALLABLE_INCLUDES} ${RESOURCES} ${RESOURCES_QUICK})
|
||||
add_library(KDAB::kddockwidgets ALIAS kddockwidgets)
|
||||
@@ -132,12 +208,11 @@ set_compiler_flags(kddockwidgets)
|
||||
target_include_directories(kddockwidgets
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:include>
|
||||
$<INSTALL_INTERFACE:include/kddockwidgets>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/fwd_headers>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/private
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/private/multisplitter/
|
||||
)
|
||||
|
||||
target_compile_definitions(kddockwidgets
|
||||
@@ -161,18 +236,24 @@ if(CMAKE_COMPILER_IS_GNUCXX OR IS_CLANG_BUILD)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPTION_QTQUICK)
|
||||
target_link_libraries(kddockwidgets PUBLIC Qt5::Widgets Qt5::Quick Qt5::QuickControls2 kddockwidgets_multisplitter)
|
||||
if(${PROJECT_NAME}_QTQUICK)
|
||||
target_link_libraries(kddockwidgets PUBLIC Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Quick Qt${QT_MAJOR_VERSION}::QuickControls2)
|
||||
else()
|
||||
target_link_libraries(kddockwidgets PUBLIC Qt5::Widgets kddockwidgets_multisplitter)
|
||||
target_link_libraries(kddockwidgets PUBLIC Qt${QT_MAJOR_VERSION}::Widgets)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32 AND NOT APPLE)
|
||||
find_package(Qt5X11Extras)
|
||||
target_link_libraries(kddockwidgets PUBLIC Qt5::X11Extras)
|
||||
if (WIN32)
|
||||
target_link_libraries(kddockwidgets PRIVATE Qt${QT_MAJOR_VERSION}::GuiPrivate Dwmapi)
|
||||
elseif(NOT APPLE AND NOT EMSCRIPTEN AND NOT ${PROJECT_NAME}_QT6)
|
||||
find_package(Qt${QT_MAJOR_VERSION}X11Extras)
|
||||
target_link_libraries(kddockwidgets PUBLIC Qt${QT_MAJOR_VERSION}::X11Extras)
|
||||
endif()
|
||||
|
||||
set_target_properties(kddockwidgets PROPERTIES VERSION ${${PROJECT_NAME}_SOVERSION})
|
||||
set_target_properties(kddockwidgets PROPERTIES
|
||||
SOVERSION ${${PROJECT_NAME}_SOVERSION}
|
||||
VERSION ${${PROJECT_NAME}_VERSION}
|
||||
)
|
||||
|
||||
#version libraries on Windows
|
||||
if(WIN32)
|
||||
set(postfix ${${PROJECT_NAME}_VERSION_MAJOR})
|
||||
@@ -200,7 +281,6 @@ install(FILES private/multisplitter/Widget.h DESTINATION include/kddockwidgets/p
|
||||
install(FILES private/multisplitter/Widget_qwidget.h DESTINATION include/kddockwidgets/private/multisplitter)
|
||||
install(FILES private/multisplitter/Separator_p.h DESTINATION include/kddockwidgets/private/multisplitter)
|
||||
install(FILES private/multisplitter/Separator_qwidget.h DESTINATION include/kddockwidgets/private/multisplitter)
|
||||
install(FILES private/multisplitter/multisplitter_export.h DESTINATION include/kddockwidgets/private/multisplitter)
|
||||
install(FILES ${DOCKS_INSTALLABLE_PRIVATE_WIDGET_INCLUDES} DESTINATION include/kddockwidgets/private/widgets)
|
||||
|
||||
install(FILES private/indicators/ClassicIndicators_p.h DESTINATION include/kddockwidgets/private/indicators)
|
||||
@@ -224,12 +304,13 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KDDockWidgetsConfig.cmake"
|
||||
DESTINATION ${INSTALL_LIBRARY_DIR}/cmake/KDDockWidgets
|
||||
)
|
||||
|
||||
if(OPTION_DEVELOPER_MODE)
|
||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
# Under developer mode since kddw might be a sub-folder of a project setting a different value for QT_DISABLE_DEPRECATED_BEFORE
|
||||
target_compile_definitions(kddockwidgets PRIVATE QT_DISABLE_DEPRECATED_BEFORE=0x060000)
|
||||
|
||||
if (NOT OPTION_QTQUICK) # TODO: We can support it
|
||||
if (NOT ${PROJECT_NAME}_QTQUICK) # TODO: We can support it
|
||||
add_executable(kddockwidgets_linter layoutlinter_main.cpp)
|
||||
target_link_libraries(kddockwidgets_linter kddockwidgets kddockwidgets_multisplitter Qt5::Widgets)
|
||||
target_link_libraries(kddockwidgets_linter kddockwidgets Qt${QT_MAJOR_VERSION}::Widgets)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
@@ -18,14 +18,19 @@
|
||||
|
||||
#include "Config.h"
|
||||
#include "multisplitter/MultiSplitterConfig.h"
|
||||
#include "multisplitter/Widget_qwidget.h"
|
||||
#include "multisplitter/Widget.h"
|
||||
#include "DockRegistry_p.h"
|
||||
#include "FrameworkWidgetFactory.h"
|
||||
#include "Utils_p.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QOperatingSystemVersion>
|
||||
|
||||
#ifdef KDDOCKWIDGETS_QTQUICK
|
||||
# include <QQmlEngine>
|
||||
# include <QQmlContext>
|
||||
#endif
|
||||
|
||||
namespace KDDockWidgets
|
||||
{
|
||||
|
||||
@@ -47,7 +52,8 @@ public:
|
||||
QQmlEngine *m_qmlEngine = nullptr;
|
||||
DockWidgetFactoryFunc m_dockWidgetFactoryFunc = nullptr;
|
||||
MainWindowFactoryFunc m_mainWindowFactoryFunc = nullptr;
|
||||
FrameworkWidgetFactory *m_frameworkWidgetFactory;
|
||||
TabbingAllowedFunc m_tabbingAllowedFunc = nullptr;
|
||||
FrameworkWidgetFactory *m_frameworkWidgetFactory = nullptr;
|
||||
Flags m_flags = Flag_Default;
|
||||
qreal m_draggedWindowOpacity = Q_QNAN;
|
||||
};
|
||||
@@ -83,8 +89,11 @@ Config::Flags Config::flags() const
|
||||
|
||||
void Config::setFlags(Flags f)
|
||||
{
|
||||
if (!DockRegistry::self()->isEmpty()) {
|
||||
qWarning() << Q_FUNC_INFO << "Only use this function at startup before creating any DockWidget or MainWindow";
|
||||
auto dr = DockRegistry::self();
|
||||
if (!dr->isEmpty(/*excludeBeingDeleted=*/ true)) {
|
||||
qWarning() << Q_FUNC_INFO << "Only use this function at startup before creating any DockWidget or MainWindow"
|
||||
<< "; These are already created: " << dr->mainWindowsNames()
|
||||
<< dr->dockWidgetNames() << dr->floatingWindows();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -135,7 +144,7 @@ int Config::separatorThickness() const
|
||||
|
||||
void Config::setSeparatorThickness(int value)
|
||||
{
|
||||
if (!DockRegistry::self()->isEmpty()) {
|
||||
if (!DockRegistry::self()->isEmpty(/*excludeBeingDeleted=*/ true)) {
|
||||
qWarning() << Q_FUNC_INFO << "Only use this function at startup before creating any DockWidget or MainWindow";
|
||||
return;
|
||||
}
|
||||
@@ -153,6 +162,17 @@ qreal Config::draggedWindowOpacity() const
|
||||
return d->m_draggedWindowOpacity;
|
||||
}
|
||||
|
||||
void Config::setTabbingAllowedFunc(TabbingAllowedFunc func)
|
||||
{
|
||||
d->m_tabbingAllowedFunc = func;
|
||||
}
|
||||
|
||||
TabbingAllowedFunc Config::tabbingAllowedFunc() const
|
||||
{
|
||||
return d->m_tabbingAllowedFunc;
|
||||
}
|
||||
|
||||
#ifdef KDDOCKWIDGETS_QTQUICK
|
||||
void Config::setQmlEngine(QQmlEngine *qmlEngine)
|
||||
{
|
||||
if (d->m_qmlEngine) {
|
||||
@@ -160,13 +180,22 @@ void Config::setQmlEngine(QQmlEngine *qmlEngine)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!qmlEngine) {
|
||||
qWarning() << Q_FUNC_INFO << "Null QML engine";
|
||||
return;
|
||||
}
|
||||
|
||||
d->m_qmlEngine = qmlEngine;
|
||||
|
||||
QQmlContext *context = qmlEngine->rootContext();
|
||||
context->setContextProperty(QStringLiteral("_kddw_widgetFactory"), d->m_frameworkWidgetFactory);
|
||||
}
|
||||
|
||||
QQmlEngine *Config::qmlEngine() const
|
||||
{
|
||||
return d->m_qmlEngine;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Config::Private::fixFlags()
|
||||
{
|
||||
@@ -174,6 +203,9 @@ void Config::Private::fixFlags()
|
||||
if (QOperatingSystemVersion::current().majorVersion() < 10) {
|
||||
// Aero-snap requires Windows 10
|
||||
m_flags = m_flags & ~Flag_AeroSnapWithClientDecos;
|
||||
} else {
|
||||
// Unconditional now
|
||||
m_flags |= Flag_AeroSnapWithClientDecos;
|
||||
}
|
||||
|
||||
// These are mutually exclusive:
|
||||
@@ -185,14 +217,32 @@ void Config::Private::fixFlags()
|
||||
// Not supported on macOS:
|
||||
m_flags = m_flags & ~Flag_AeroSnapWithClientDecos;
|
||||
#else
|
||||
// Not supported on linux.
|
||||
// On Linux, dragging the title bar of a window doesn't generate NonClientMouseEvents
|
||||
m_flags = m_flags & ~Flag_NativeTitleBar;
|
||||
if (KDDockWidgets::isWayland()) {
|
||||
// Native title bar is forced on Wayland. Needed for moving the window.
|
||||
// The inner KDDW title bar is used for DnD.
|
||||
m_flags |= Flag_NativeTitleBar;
|
||||
} else {
|
||||
// Not supported on linux/X11
|
||||
// On Linux, dragging the title bar of a window doesn't generate NonClientMouseEvents
|
||||
// at least with KWin anyway. We can make this more granular and allow it for other
|
||||
// X11 window managers
|
||||
m_flags = m_flags & ~Flag_NativeTitleBar;
|
||||
m_flags = m_flags & ~Flag_AeroSnapWithClientDecos;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (!defined(Q_OS_WIN) && !defined(Q_OS_MACOS))
|
||||
// QtQuick doesn't support AeroSnap yet. Some problem with the native events not being received...
|
||||
m_flags = m_flags & ~Flag_AeroSnapWithClientDecos;
|
||||
#endif
|
||||
|
||||
#if !defined(Q_OS_WIN) && !defined(Q_OS_MACOS)
|
||||
m_flags = m_flags & ~Flag_AeroSnapWithClientDecos;
|
||||
|
||||
#if defined(DOCKS_DEVELOPER_MODE)
|
||||
// We allow to disable aero-snap during development
|
||||
if (m_flags & Flag_internal_NoAeroSnap) {
|
||||
// The only way to disable AeroSnap
|
||||
m_flags = m_flags & ~Flag_AeroSnapWithClientDecos;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
75
src/Config.h
@@ -35,6 +35,14 @@ class FrameworkWidgetFactory;
|
||||
typedef KDDockWidgets::DockWidgetBase* (*DockWidgetFactoryFunc)(const QString &name);
|
||||
typedef KDDockWidgets::MainWindowBase* (*MainWindowFactoryFunc)(const QString &name);
|
||||
|
||||
/// @brief Function to allow the user more granularity to disallow dock widgets to tab together
|
||||
/// @param source The dock widgets being dragged
|
||||
/// @param target The dock widgets within an existing docked tab group
|
||||
/// @return true if the docking is allowed.
|
||||
/// @sa setTabbingAllowedFunc
|
||||
typedef bool (*TabbingAllowedFunc)(const QVector<DockWidgetBase*> &source,
|
||||
const QVector<DockWidgetBase*> &target);
|
||||
|
||||
/**
|
||||
* @brief Singleton to allow to choose certain behaviours of the framework.
|
||||
*
|
||||
@@ -53,19 +61,31 @@ public:
|
||||
|
||||
///@brief Flag enum to tune certain behaviours, the defaults are Flag_Default
|
||||
enum Flag {
|
||||
Flag_None = 0, ///> No option set
|
||||
Flag_NativeTitleBar = 1, ///> Enables the Native OS title bar on OSes that support it (Windows 10, macOS), ignored otherwise. This is mutually exclusive with Flag_AeroSnap
|
||||
Flag_AeroSnapWithClientDecos = 2, ///> Enables AeroSnap even if we're not using the native title bar. Only supported on Windows 10.
|
||||
Flag_AlwaysTitleBarWhenFloating = 4, ///> Floating windows will have a title bar even if Flag_HideTitleBarWhenTabsVisible is specified. Unneeded if Flag_HideTitleBarWhenTabsVisible isn't specified, as that's the default already.
|
||||
Flag_HideTitleBarWhenTabsVisible = 8, ///> Hides the title bar if there's tabs visible. The empty space in the tab bar becomes draggable.
|
||||
Flag_AlwaysShowTabs = 16, ///> Always show tabs, even if there's only one,
|
||||
Flag_AllowReorderTabs = 32, /// Allows user to re-order tabs by dragging them
|
||||
Flag_TabsHaveCloseButton = 64, /// Tabs will have a close button. Equivalent to QTabWidget::setTabsClosable(true).
|
||||
Flag_DoubleClickMaximizes = 128, /// Double clicking the titlebar will maximize a floating window instead of re-docking it
|
||||
Flag_TitleBarHasMaximizeButton = 256, /// The title bar will have a maximize/restore button when floating. This is mutually-exclusive with the floating button (since many apps behave that way).
|
||||
Flag_TitleBarIsFocusable = 512, /// You can click the title bar and it will focus the last focused widget in the focus scope. If no previously focused widget then it focuses the user's dock widget guest, which should accept focus or use a focus proxy.
|
||||
Flag_LazyResize = 1024, /// The dock widgets are resized in a lazy manner. The actual resize only happens when you release the mouse button.
|
||||
Flag_Default = Flag_AeroSnapWithClientDecos ///> The defaults
|
||||
Flag_None = 0, ///< No option set
|
||||
Flag_NativeTitleBar = 1, ///< Enables the Native OS title bar on OSes that support it (Windows 10, macOS), ignored otherwise. This is mutually exclusive with Flag_AeroSnap
|
||||
Flag_AeroSnapWithClientDecos = 2, ///< Deprecated. This is now default and cannot be turned off. Moving a window on Windows 10 uses native moving, as that works well across screens with different HDPI settings. There's no reason to use manual client/Qt window moving.
|
||||
Flag_AlwaysTitleBarWhenFloating = 4, ///< Floating windows will have a title bar even if Flag_HideTitleBarWhenTabsVisible is specified. Unneeded if Flag_HideTitleBarWhenTabsVisible isn't specified, as that's the default already.
|
||||
Flag_HideTitleBarWhenTabsVisible = 8, ///< Hides the title bar if there's tabs visible. The empty space in the tab bar becomes draggable.
|
||||
Flag_AlwaysShowTabs = 16, ///< Always show tabs, even if there's only one,
|
||||
Flag_AllowReorderTabs = 32, ///< Allows user to re-order tabs by dragging them
|
||||
Flag_TabsHaveCloseButton = 64, ///< Tabs will have a close button. Equivalent to QTabWidget::setTabsClosable(true).
|
||||
Flag_DoubleClickMaximizes = 128, ///< Double clicking the titlebar will maximize a floating window instead of re-docking it
|
||||
Flag_TitleBarHasMaximizeButton = 256, ///< The title bar will have a maximize/restore button when floating. This is mutually-exclusive with the floating button (since many apps behave that way).
|
||||
Flag_TitleBarIsFocusable = 512, ///< You can click the title bar and it will focus the last focused widget in the focus scope. If no previously focused widget then it focuses the user's dock widget guest, which should accept focus or use a focus proxy.
|
||||
Flag_LazyResize = 1024, ///< The dock widgets are resized in a lazy manner. The actual resize only happens when you release the mouse button.
|
||||
|
||||
// These two are internal, for testing purposes across platforms. Use Flag_DontUseUtilityFloatingWindows instead.
|
||||
Flag_internal_DontUseQtToolWindowsForFloatingWindows = 0x800, ///< FloatingWindows will use Qt::Window instead of Qt::Tool. Internal, use Flag_DontUseUtilityFloatingWindows instead.
|
||||
Flag_internal_DontUseParentForFloatingWindows = 0x1000, ///< FloatingWindows won't have a parent top-level. Internal, use Flag_DontUseUtilityFloatingWindows instead.
|
||||
|
||||
Flag_DontUseUtilityFloatingWindows = Flag_internal_DontUseQtToolWindowsForFloatingWindows | Flag_internal_DontUseParentForFloatingWindows,
|
||||
Flag_TitleBarHasMinimizeButton = 0x2000 | Flag_DontUseUtilityFloatingWindows, ///< The title bar will have a minimize button when floating. This implies Flag_DontUseUtilityFloatingWindows too, otherwise they wouldn't appear in the task bar.
|
||||
Flag_TitleBarNoFloatButton = 0x4000, ///< The TitleBar won't show the float button
|
||||
Flag_AutoHideSupport = 0x8000 | Flag_TitleBarNoFloatButton, ///< Supports minimizing dock widgets to the side-bar.
|
||||
///< By default it also turns off the float button, but you can remove Flag_TitleBarNoFloatButton to have both.
|
||||
Flag_KeepAboveIfNotUtilityWindow = 0x10000, ///< Only meaningful if Flag_DontUseUtilityFloatingWindows is set. If floating windows are normal windows, you might still want them to keep above and not minimize when you focus the main window.
|
||||
Flag_internal_NoAeroSnap = 0x20000, ///< Internal flag, only for development. Disables Aero-snap.
|
||||
Flag_Default = Flag_AeroSnapWithClientDecos ///< The defaults
|
||||
};
|
||||
Q_DECLARE_FLAGS(Flags, Flag)
|
||||
|
||||
@@ -140,9 +160,38 @@ public:
|
||||
///By default it's 1.0, fully opaque
|
||||
qreal draggedWindowOpacity() const;
|
||||
|
||||
/**
|
||||
* @brief Allows the user to intercept a docking attempt to center (tabbed) and disallow it.
|
||||
*
|
||||
* Whenever the user tries to tab two widgets together, the framework will call @p func. If
|
||||
* it returns true, then tabbing is allowed, otherwise not.
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* #include <kddockwidgets/Config.h>
|
||||
* (...)
|
||||
*
|
||||
* auto func = [] (const KDDockWidgets::DockWidgetBase::List &source,
|
||||
* const KDDockWidgets::DockWidgetBase::List &target)
|
||||
* {
|
||||
* // disallows dockFoo to be tabbed with dockBar.
|
||||
* return !(source.contains(dockFoo) && target.contains(dockBar));
|
||||
* }
|
||||
* @endcode
|
||||
* KDDockWidgets::Config::self()->setTabbingAllowedFunc(func);
|
||||
*/
|
||||
void setTabbingAllowedFunc(TabbingAllowedFunc func);
|
||||
|
||||
///@brief Used internally by the framework. Returns the function which was passed to setTabbingAllowedFunc()
|
||||
///By default it's nullptr.
|
||||
///@sa setTabbingAllowedFunc().
|
||||
TabbingAllowedFunc tabbingAllowedFunc() const;
|
||||
|
||||
#ifdef KDDOCKWIDGETS_QTQUICK
|
||||
///@brief Sets the QQmlEngine to use. Applicable only when using QtQuick.
|
||||
void setQmlEngine(QQmlEngine *);
|
||||
QQmlEngine* qmlEngine() const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(Config)
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "FrameworkWidgetFactory.h"
|
||||
#include "private/Position_p.h"
|
||||
#include "WindowBeingDragged_p.h"
|
||||
#include "SideBar_p.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QEvent>
|
||||
#include <QCloseEvent>
|
||||
#include <QTimer>
|
||||
@@ -57,10 +57,12 @@ public:
|
||||
}
|
||||
});
|
||||
|
||||
q->connect(floatAction, &QAction::toggled, q, [this] (bool enabled) {
|
||||
q->connect(floatAction, &QAction::toggled, q, [this] (bool checked) {
|
||||
if (!m_updatingFloatAction) { // guard against recursiveness
|
||||
q->setFloating(enabled);
|
||||
q->setFloating(checked);
|
||||
}
|
||||
|
||||
Q_EMIT q->isFloatingChanged(checked);
|
||||
});
|
||||
|
||||
toggleAction->setCheckable(true);
|
||||
@@ -77,6 +79,26 @@ public:
|
||||
return qobject_cast<FloatingWindow*>(q->window());
|
||||
}
|
||||
|
||||
MainWindowBase *mainWindow() const
|
||||
{
|
||||
if (q->isWindow())
|
||||
return nullptr;
|
||||
|
||||
// Note: Don't simply use window(), as the MainWindow might be embedded into something else
|
||||
QWidgetOrQuick *p = q->parentWidget();
|
||||
while (p) {
|
||||
if (auto window = qobject_cast<MainWindowBase*>(p))
|
||||
return window;
|
||||
|
||||
if (p->isWindow())
|
||||
return nullptr;
|
||||
|
||||
p = p->parentWidget();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QPoint defaultCenterPosForFloating();
|
||||
|
||||
void updateTitle();
|
||||
@@ -87,7 +109,7 @@ public:
|
||||
void onDockWidgetHidden();
|
||||
void show();
|
||||
void close();
|
||||
void restoreToPreviousPosition();
|
||||
bool restoreToPreviousPosition();
|
||||
void maybeRestoreToPreviousPosition();
|
||||
int currentTabIndex() const;
|
||||
|
||||
@@ -123,6 +145,9 @@ DockWidgetBase::DockWidgetBase(const QString &name, Options options)
|
||||
|
||||
if (name.isEmpty())
|
||||
qWarning() << Q_FUNC_INFO << "Name can't be null";
|
||||
|
||||
setAttribute(Qt::WA_PendingMoveEvent, false);
|
||||
qApp->installEventFilter(this);
|
||||
}
|
||||
|
||||
DockWidgetBase::~DockWidgetBase()
|
||||
@@ -160,7 +185,7 @@ void DockWidgetBase::addDockWidgetAsTab(DockWidgetBase *other, AddingOption addi
|
||||
Frame *frame = this->frame();
|
||||
|
||||
if (frame) {
|
||||
if (frame->contains(other)) {
|
||||
if (frame->containsDockWidget(other)) {
|
||||
qWarning() << Q_FUNC_INFO << "Already contains" << other;
|
||||
return;
|
||||
}
|
||||
@@ -244,15 +269,12 @@ bool DockWidgetBase::isFloating() const
|
||||
return fw && fw->hasSingleDockWidget();
|
||||
}
|
||||
|
||||
void DockWidgetBase::setFloating(bool floats)
|
||||
bool DockWidgetBase::setFloating(bool floats)
|
||||
{
|
||||
const bool alreadyFloating = isFloating();
|
||||
|
||||
qCDebug(docking) << Q_FUNC_INFO << "yes=" << floats
|
||||
<< "; already floating=" << alreadyFloating;
|
||||
|
||||
if ((floats && alreadyFloating) || (!floats && !alreadyFloating))
|
||||
return; // Nothing to do
|
||||
return true; // Nothing to do
|
||||
|
||||
if (floats) {
|
||||
d->saveTabIndex();
|
||||
@@ -262,6 +284,7 @@ void DockWidgetBase::setFloating(bool floats)
|
||||
qWarning() << "DockWidget::setFloating: Tabbed but no frame exists"
|
||||
<< this;
|
||||
Q_ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
frame->detachTab(this);
|
||||
@@ -274,9 +297,10 @@ void DockWidgetBase::setFloating(bool floats)
|
||||
if (auto fw = floatingWindow())
|
||||
fw->setSuggestedGeometry(lastGeo, /*preserveCenter=*/true);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
saveLastFloatingGeometry();
|
||||
d->restoreToPreviousPosition();
|
||||
return d->restoreToPreviousPosition();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +329,7 @@ void DockWidgetBase::setTitle(const QString &title)
|
||||
if (title != d->title) {
|
||||
d->title = title;
|
||||
d->updateTitle();
|
||||
Q_EMIT titleChanged();
|
||||
Q_EMIT titleChanged(title);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,6 +454,16 @@ bool DockWidgetBase::isMainWindow() const
|
||||
return qobject_cast<MainWindowBase*>(widget());
|
||||
}
|
||||
|
||||
bool DockWidgetBase::isInMainWindow() const
|
||||
{
|
||||
return d->mainWindow() != nullptr;
|
||||
}
|
||||
|
||||
MainWindowBase* DockWidgetBase::mainWindow() const
|
||||
{
|
||||
return d->mainWindow();
|
||||
}
|
||||
|
||||
bool DockWidgetBase::isFocused() const
|
||||
{
|
||||
auto f = this->frame();
|
||||
@@ -459,6 +493,30 @@ void DockWidgetBase::setAffinities(const QStringList &affinityNames)
|
||||
d->affinities = affinities;
|
||||
}
|
||||
|
||||
void DockWidgetBase::moveToSideBar()
|
||||
{
|
||||
if (MainWindowBase *m = mainWindow())
|
||||
m->moveToSideBar(this);
|
||||
}
|
||||
|
||||
bool DockWidgetBase::isOverlayed() const
|
||||
{
|
||||
if (MainWindowBase *m = mainWindow())
|
||||
return m->overlayedDockWidget() == this;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
SideBarLocation DockWidgetBase::sideBarLocation() const
|
||||
{
|
||||
return DockRegistry::self()->sideBarLocationForDockWidget(this);
|
||||
}
|
||||
|
||||
bool DockWidgetBase::hasPreviousDockedLocation() const
|
||||
{
|
||||
return d->m_lastPositions.isValid();
|
||||
}
|
||||
|
||||
FloatingWindow *DockWidgetBase::morphIntoFloatingWindow()
|
||||
{
|
||||
qCDebug(creation) << "DockWidget::morphIntoFloatingWindow() this=" << this
|
||||
@@ -471,9 +529,12 @@ FloatingWindow *DockWidgetBase::morphIntoFloatingWindow()
|
||||
QRect geo = d->m_lastPositions.lastFloatingGeometry();
|
||||
if (geo.isNull()) {
|
||||
geo = geometry();
|
||||
const QPoint center = d->defaultCenterPosForFloating();
|
||||
if (!center.isNull())
|
||||
geo.moveCenter(center);
|
||||
|
||||
if (!testAttribute(Qt::WA_PendingMoveEvent)) { // If user already moved it, we don't interfere
|
||||
const QPoint center = d->defaultCenterPosForFloating();
|
||||
if (!center.isNull())
|
||||
geo.moveCenter(center);
|
||||
}
|
||||
}
|
||||
|
||||
auto frame = Config::self().frameworkWidgetFactory()->createFrame();
|
||||
@@ -535,6 +596,16 @@ void DockWidgetBase::updateFloatAction()
|
||||
d->updateFloatAction();
|
||||
}
|
||||
|
||||
bool DockWidgetBase::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
const bool isWindowActivate = event->type() == QEvent::WindowActivate;
|
||||
const bool isWindowDeactivate = event->type() == QEvent::WindowDeactivate;
|
||||
if ((isWindowActivate || isWindowDeactivate) && watched == window())
|
||||
Q_EMIT windowActiveAboutToChange(isWindowActivate);
|
||||
|
||||
return QWidgetAdapter::eventFilter(watched, event);
|
||||
}
|
||||
|
||||
QPoint DockWidgetBase::Private::defaultCenterPosForFloating()
|
||||
{
|
||||
MainWindowBase::List mainWindows = DockRegistry::self()->mainwindows();
|
||||
@@ -594,14 +665,12 @@ void DockWidgetBase::Private::onDockWidgetShown()
|
||||
{
|
||||
updateToggleAction();
|
||||
updateFloatAction();
|
||||
qCDebug(hiding) << Q_FUNC_INFO << "parent=" << q->parentWidget();
|
||||
}
|
||||
|
||||
void DockWidgetBase::Private::onDockWidgetHidden()
|
||||
{
|
||||
updateToggleAction();
|
||||
updateFloatAction();
|
||||
qCDebug(hiding) << Q_FUNC_INFO << "parent=" << q->parentWidget();
|
||||
}
|
||||
|
||||
void DockWidgetBase::Private::close()
|
||||
@@ -618,19 +687,24 @@ void DockWidgetBase::Private::close()
|
||||
if (Frame *frame = q->frame()) {
|
||||
frame->removeWidget(q);
|
||||
q->setParent(nullptr);
|
||||
|
||||
if (SideBar *sb = DockRegistry::self()->sideBarForDockWidget(q)) {
|
||||
sb->removeDockWidget(q);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DockWidgetBase::Private::restoreToPreviousPosition()
|
||||
bool DockWidgetBase::Private::restoreToPreviousPosition()
|
||||
{
|
||||
if (!m_lastPositions.isValid())
|
||||
return;
|
||||
return false;
|
||||
|
||||
Layouting::Item *item = m_lastPositions.lastItem();
|
||||
|
||||
MultiSplitter *layout = DockRegistry::self()->layoutForItem(item);
|
||||
Q_ASSERT(layout);
|
||||
layout->restorePlaceholder(q, item, m_lastPositions.lastTabIndex());
|
||||
return true;
|
||||
}
|
||||
|
||||
void DockWidgetBase::Private::maybeRestoreToPreviousPosition()
|
||||
@@ -722,7 +796,7 @@ void DockWidgetBase::onHidden(bool spontaneous)
|
||||
}
|
||||
}
|
||||
|
||||
void DockWidgetBase::onClosed(QCloseEvent *e)
|
||||
void DockWidgetBase::onCloseEvent(QCloseEvent *e)
|
||||
{
|
||||
e->accept(); // By default we accept, means DockWidget closes
|
||||
if (d->widget)
|
||||
|
||||
@@ -30,10 +30,81 @@ QT_BEGIN_NAMESPACE
|
||||
class QAction;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class TestDocks;
|
||||
|
||||
namespace Layouting {
|
||||
class Item;
|
||||
}
|
||||
|
||||
#if defined(QT_WIDGETS_LIB)
|
||||
# include <QAction>
|
||||
#else
|
||||
// A QAction for QtQuick. Just so it compiles, for now
|
||||
class QAction : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using QObject::QObject;
|
||||
|
||||
bool isChecked() const {
|
||||
return m_isChecked ;
|
||||
}
|
||||
|
||||
void setCheckable(bool is) {
|
||||
m_isCheckable = is;
|
||||
}
|
||||
|
||||
void setText(const QString &text) {
|
||||
m_text = text;
|
||||
}
|
||||
|
||||
void setToolTip(const QString &text) {
|
||||
m_toolTip = text;
|
||||
}
|
||||
|
||||
QString toolTip() const {
|
||||
returm m_toolTip;
|
||||
}
|
||||
|
||||
bool enabled() const {
|
||||
return m_enabled;
|
||||
}
|
||||
|
||||
void setEnabled(bool enabled) {
|
||||
m_enabled = enabled;
|
||||
}
|
||||
|
||||
bool checked() const {
|
||||
return m_checked;
|
||||
}
|
||||
|
||||
void setChecked(bool checked) {
|
||||
m_checked = checked;
|
||||
}
|
||||
|
||||
bool isEnabled() const {
|
||||
return m_enabled;
|
||||
}
|
||||
|
||||
void toggle() {
|
||||
m_enabled = !m_enabled;
|
||||
Q_EMIT toggled(m_enabled);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
bool toggled(bool);
|
||||
private:
|
||||
QString m_text;
|
||||
QString m_toolTip;
|
||||
|
||||
bool m_isChecked = false;
|
||||
bool m_isCheckable = false;
|
||||
bool m_enabled = false;
|
||||
bool m_checked = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
namespace KDDockWidgets {
|
||||
|
||||
struct LastPositions;
|
||||
@@ -46,6 +117,7 @@ class TabWidget;
|
||||
class TitleBar;
|
||||
class MainWindowBase;
|
||||
class StateDragging;
|
||||
class FrameQuick;
|
||||
|
||||
/**
|
||||
* @brief The DockWidget base-class. DockWidget and DockWidgetBase are only
|
||||
@@ -61,6 +133,8 @@ class DOCKS_EXPORT DockWidgetBase : public QWidget
|
||||
#endif
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool isFocused READ isFocused NOTIFY isFocusedChanged)
|
||||
Q_PROPERTY(bool isFloating READ isFloating WRITE setFloating NOTIFY isFloatingChanged)
|
||||
public:
|
||||
typedef QVector<DockWidgetBase *> List;
|
||||
|
||||
@@ -130,14 +204,14 @@ public:
|
||||
|
||||
/**
|
||||
* @brief sets the widget which this dock widget hosts.
|
||||
* @param widget widget to show inside this dock widget. Must not be null.
|
||||
* @param widget the widget to show inside this dock widget. Must not be null.
|
||||
*
|
||||
* Ownership for @p widget is transfered to DockWidgetBase.
|
||||
* Ownsership for any previously existing widget is transfered back to the user. Meaning if you
|
||||
* Ownership for @p widget is transferred to DockWidgetBase.
|
||||
* Ownsership for any previously existing widget is transferred back to the user. Meaning if you
|
||||
* call setWidget(A) followed by setWidget(B) then A will have to be deleted by you, while B is
|
||||
* owned by the dock widget.
|
||||
*/
|
||||
void setWidget(QWidgetOrQuick *widget);
|
||||
virtual void setWidget(QWidgetOrQuick *widget);
|
||||
|
||||
/**
|
||||
* @brief returns the widget which this dock widget hosts
|
||||
@@ -156,8 +230,10 @@ public:
|
||||
/**
|
||||
* @brief setter to make the dock widget float or dock.
|
||||
* @param floats If true makes the dock widget float, otherwise docks it.
|
||||
*
|
||||
* Returns true if the request was accomplished
|
||||
*/
|
||||
void setFloating(bool floats);
|
||||
bool setFloating(bool floats);
|
||||
|
||||
/**
|
||||
* @brief Returns the QAction that allows to hide/show the dock widget
|
||||
@@ -252,7 +328,7 @@ public:
|
||||
* @brief Like QWidget::close() but the hosted widget won't be asked if we
|
||||
* should close.
|
||||
*/
|
||||
void forceClose();
|
||||
Q_INVOKABLE void forceClose();
|
||||
|
||||
/**
|
||||
* @brief Returns this dock widget's title bar.
|
||||
@@ -297,7 +373,7 @@ public:
|
||||
QStringList affinities() const;
|
||||
|
||||
/// @brief Equivalent to QWidget::show(), but it's optimized to reduce flickering on some platforms
|
||||
void show();
|
||||
Q_INVOKABLE void show();
|
||||
|
||||
/// @brief Brings the dock widget to the front.
|
||||
///
|
||||
@@ -306,7 +382,7 @@ public:
|
||||
/// - If the dock widget is floating, QWindow::raise() is called.
|
||||
///
|
||||
/// This only applies if the dock widget is already open. If closed, does nothing.
|
||||
void raise();
|
||||
Q_INVOKABLE void raise();
|
||||
|
||||
/**
|
||||
* @brief Returns whether widget() is a KDDockWidget::MainWindow
|
||||
@@ -320,12 +396,50 @@ public:
|
||||
*/
|
||||
bool isMainWindow() const;
|
||||
|
||||
/**
|
||||
* @brief Returns whether this dock widget is docked into a main window.
|
||||
*
|
||||
* Note that isFloating() returning false might either mean the dock widget is docked into a
|
||||
* main window or into a floating window (groupped/nested with other dock widgets. Use this function
|
||||
* then if you need to disambiguate
|
||||
*/
|
||||
bool isInMainWindow() const;
|
||||
|
||||
/// @brief Returns the main window this dock widget is in. nullptr if it's not inside a main window
|
||||
MainWindowBase *mainWindow() const;
|
||||
|
||||
///@brief Returns whether This or any child of this dock widget is focused
|
||||
///Not to be confused with QWidget::hasFocus(), which just refers to 1 widget. This includes
|
||||
///variant includes children.
|
||||
///@sa isFocusedChanged()
|
||||
bool isFocused() const;
|
||||
|
||||
/**
|
||||
* @brief Minimizes this dock widget to the MainWindow's side-bar.
|
||||
*
|
||||
* It will be undocked from current layout. It's previous docked position will be remembered.
|
||||
*
|
||||
* This action is only available if the dock widget is docked into a MainWindow.
|
||||
* The dockwidget will initially be visible and overlayed on top of the current layout (this is
|
||||
* the auto-hide feature).
|
||||
*/
|
||||
void moveToSideBar();
|
||||
|
||||
/// @brief Returns whether this dock widget is overlayed on top of the main window, instead of
|
||||
/// docked into the layout. This is only relevant when using the auto-hide and side-bar feature.
|
||||
bool isOverlayed() const;
|
||||
|
||||
///@brief Returns whether this dock widget is in a side bar, and which.
|
||||
/// SideBarLocation::None is returned if it's not in a sidebar.
|
||||
/// This is only relevant when using the auto-hide and side-bar feature.
|
||||
SideBarLocation sideBarLocation() const;
|
||||
|
||||
/// @brief Returns whether this floating dock widget knows its previous docked location
|
||||
/// Result only makes sense if it's floating.
|
||||
///
|
||||
/// When you call dockWidget->setFloating(false) it will only dock if it knows where to.
|
||||
bool hasPreviousDockedLocation() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
///@brief signal emitted when the parent changed
|
||||
void parentChanged();
|
||||
@@ -340,7 +454,8 @@ Q_SIGNALS:
|
||||
void iconChanged();
|
||||
|
||||
///@brief signal emitted when the title changed
|
||||
void titleChanged();
|
||||
///@param title the new title
|
||||
void titleChanged(const QString &title);
|
||||
|
||||
///@brief emitted when the hosted widget changed
|
||||
void widgetChanged(KDDockWidgets::QWidgetOrQuick *);
|
||||
@@ -353,11 +468,32 @@ Q_SIGNALS:
|
||||
///@sa isFocused
|
||||
void isFocusedChanged(bool);
|
||||
|
||||
///@brief emitted when isOverlayed changes
|
||||
///@sa isOverlayed
|
||||
void isOverlayedChanged(bool);
|
||||
|
||||
///@brief emitted when isFloating changes
|
||||
bool isFloatingChanged(bool);
|
||||
|
||||
///@brief emitted when this dock widget is removed from a side-bar.
|
||||
///Only relevant for the auto-hide/sidebar feature
|
||||
void removedFromSideBar();
|
||||
|
||||
///@brief Emitted when the top-level window this dock widget is in is activated or deactivated
|
||||
///This is convenience to replace tracking dockWidget->window(), since the window changes when
|
||||
///docking and undocking
|
||||
///
|
||||
/// It's called 'aboutTo' because it's done in an event filter and the target window doesn't
|
||||
/// have it's 'activeWindow' property updated yet at this point.
|
||||
void windowActiveAboutToChange(bool activated);
|
||||
|
||||
protected:
|
||||
void onParentChanged();
|
||||
void onShown(bool spontaneous);
|
||||
void onHidden(bool spontaneous);
|
||||
void onClosed(QCloseEvent *e);
|
||||
#ifndef PYTHON_BINDINGS //Pyside bug: https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1327
|
||||
void onCloseEvent(QCloseEvent *e) override;
|
||||
#endif
|
||||
|
||||
#if defined(DOCKS_DEVELOPER_MODE)
|
||||
public Q_SLOTS:
|
||||
@@ -383,13 +519,15 @@ private:
|
||||
friend class MultiSplitter;
|
||||
friend class Frame;
|
||||
friend class DropArea;
|
||||
friend class TestDocks;
|
||||
friend class ::TestDocks;
|
||||
friend class StateDragging;
|
||||
friend class KDDockWidgets::TabWidget;
|
||||
friend class KDDockWidgets::TitleBar;
|
||||
friend class KDDockWidgets::DragController;
|
||||
friend class KDDockWidgets::DockRegistry;
|
||||
friend class KDDockWidgets::LayoutSaver;
|
||||
friend class KDDockWidgets::MainWindowBase;
|
||||
friend class KDDockWidgets::FrameQuick;
|
||||
|
||||
/**
|
||||
* @brief the Frame which contains this dock widgets.
|
||||
@@ -421,6 +559,9 @@ private:
|
||||
///@brief Updates the floatAction state
|
||||
void updateFloatAction();
|
||||
|
||||
///@reimp
|
||||
bool eventFilter(QObject *, QEvent *) override;
|
||||
|
||||
class Private;
|
||||
Private *const d;
|
||||
};
|
||||
|
||||
@@ -44,6 +44,8 @@ DockWidgetQuick::DockWidgetQuick(const QString &name, Options options)
|
||||
: DockWidgetBase(name, options)
|
||||
, d(new Private(this))
|
||||
{
|
||||
// To mimic what QtWidgets does when creating a new QWidget.
|
||||
setVisible(false);
|
||||
}
|
||||
|
||||
DockWidgetQuick::~DockWidgetQuick()
|
||||
@@ -60,9 +62,15 @@ void DockWidgetQuick::setWidget(const QString &qmlFilename)
|
||||
auto adapter = new QWidgetAdapter(this);
|
||||
guest->setParentItem(adapter);
|
||||
guest->setParent(adapter);
|
||||
QWidgetAdapter::makeItemFillParent(adapter);
|
||||
|
||||
DockWidgetBase::setWidget(adapter);
|
||||
setWidget(adapter);
|
||||
}
|
||||
|
||||
void DockWidgetQuick::setWidget(QWidgetAdapter *widget)
|
||||
{
|
||||
widget->QWidgetAdapter::setParent(this);
|
||||
QWidgetAdapter::makeItemFillParent(widget);
|
||||
DockWidgetBase::setWidget(widget);
|
||||
}
|
||||
|
||||
bool DockWidgetQuick::event(QEvent *e)
|
||||
@@ -74,8 +82,28 @@ bool DockWidgetQuick::event(QEvent *e)
|
||||
} else if (e->type() == QEvent::Hide) {
|
||||
onHidden(e->spontaneous());
|
||||
} else if (e->type() == QEvent::Close) {
|
||||
onClosed(static_cast<QCloseEvent*>(e));
|
||||
onCloseEvent(static_cast<QCloseEvent*>(e));
|
||||
}
|
||||
|
||||
return DockWidgetBase::event(e);
|
||||
}
|
||||
|
||||
QSize DockWidgetQuick::minimumSize() const
|
||||
{
|
||||
if (QWidgetAdapter *guestWidget = widget()) {
|
||||
// The guests min-size is the same as the widget's, there's no spacing or margins.
|
||||
return guestWidget->minimumSize();
|
||||
}
|
||||
|
||||
return DockWidgetBase::minimumSize();
|
||||
}
|
||||
|
||||
QSize DockWidgetQuick::maximumSize() const
|
||||
{
|
||||
if (QWidgetAdapter *guestWidget = widget()) {
|
||||
// The guests max-size is the same as the widget's, there's no spacing or margins.
|
||||
return guestWidget->maximumSize();
|
||||
}
|
||||
|
||||
return DockWidgetBase::maximumSize();
|
||||
}
|
||||
@@ -54,6 +54,15 @@ public:
|
||||
/// Similar to DockWidgetBase::setWidget(QQuickItem*)
|
||||
void setWidget(const QString &qmlFilename);
|
||||
|
||||
/// @reimp
|
||||
void setWidget(QWidgetAdapter *widget) override;
|
||||
|
||||
/// @reimp
|
||||
QSize minimumSize() const override;
|
||||
|
||||
/// @reimp
|
||||
QSize maximumSize() const override;
|
||||
|
||||
protected:
|
||||
bool event(QEvent *e) override;
|
||||
|
||||
@@ -18,9 +18,12 @@
|
||||
|
||||
#include "FocusScope.h"
|
||||
#include "TitleBar_p.h"
|
||||
#include "Frame_p.h"
|
||||
#include "DockWidgetBase.h"
|
||||
#include "DockRegistry_p.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QApplication>
|
||||
#include <QGuiApplication>
|
||||
#include <QPointer>
|
||||
|
||||
using namespace KDDockWidgets;
|
||||
@@ -40,9 +43,12 @@ public:
|
||||
m_inCtor = false;
|
||||
}
|
||||
|
||||
~Private() override;
|
||||
|
||||
void setIsFocused(bool);
|
||||
void onFocusObjectChanged(QObject *);
|
||||
bool isInFocusScope(WidgetType *) const;
|
||||
void emitDockWidgetFocusChanged();
|
||||
|
||||
FocusScope *const q;
|
||||
QWidgetAdapter *const m_thisWidget;
|
||||
@@ -51,6 +57,9 @@ public:
|
||||
QPointer<WidgetType> m_lastFocusedInScope;
|
||||
};
|
||||
|
||||
FocusScope::Private::~Private()
|
||||
{
|
||||
}
|
||||
|
||||
FocusScope::FocusScope(QWidgetAdapter *thisWidget)
|
||||
: d(new Private(this, thisWidget))
|
||||
@@ -96,6 +105,9 @@ void FocusScope::Private::setIsFocused(bool is)
|
||||
if (is != m_isFocused) {
|
||||
m_isFocused = is;
|
||||
|
||||
if (is)
|
||||
emitDockWidgetFocusChanged();
|
||||
|
||||
if (!m_inCtor) // Hack so we don't call pure-virtual
|
||||
Q_EMIT q->isFocusedChanged();
|
||||
}
|
||||
@@ -104,16 +116,19 @@ void FocusScope::Private::setIsFocused(bool is)
|
||||
void FocusScope::Private::onFocusObjectChanged(QObject *obj)
|
||||
{
|
||||
auto widget = qobject_cast<WidgetType*>(obj);
|
||||
if (!widget)
|
||||
if (!widget) {
|
||||
setIsFocused(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const bool is = isInFocusScope(widget);
|
||||
if (is && m_lastFocusedInScope != widget && !qobject_cast<TitleBar*>(obj)) {
|
||||
m_lastFocusedInScope = widget;
|
||||
setIsFocused(is);
|
||||
Q_EMIT q->focusedWidgetChanged();
|
||||
} else {
|
||||
setIsFocused(is);
|
||||
}
|
||||
|
||||
setIsFocused(is);
|
||||
}
|
||||
|
||||
bool FocusScope::Private::isInFocusScope(WidgetType *widget) const
|
||||
@@ -128,3 +143,33 @@ bool FocusScope::Private::isInFocusScope(WidgetType *widget) const
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void FocusScope::Private::emitDockWidgetFocusChanged()
|
||||
{
|
||||
auto p = qobject_cast<WidgetType*>(qApp->focusObject());
|
||||
if (!p) return;
|
||||
|
||||
// Find the nearest DockWidget and send the focusChangedSignal
|
||||
while (p) {
|
||||
if (auto frame = qobject_cast<Frame*>(p)) {
|
||||
// Special case: The focused widget is inside the frame but not inside the dockwidget.
|
||||
// For example, it's a line edit in the QTabBar. We still need to send the signal for
|
||||
// the current dw in the tab group
|
||||
if (auto dw = frame->currentDockWidget()) {
|
||||
DockRegistry::self()->setFocusedDockWidget(dw);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (p == m_thisWidget)
|
||||
break;
|
||||
|
||||
if (auto dw = qobject_cast<DockWidgetBase*>(p)) {
|
||||
DockRegistry::self()->setFocusedDockWidget(dw);
|
||||
break;
|
||||
}
|
||||
|
||||
p = KDDockWidgets::Private::parentWidget(p);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
namespace KDDockWidgets
|
||||
{
|
||||
///@brief Allows to implement a similar functionality to QtQuick's FocusScope item, in QtWidgets
|
||||
class FocusScope
|
||||
class DOCKS_EXPORT FocusScope
|
||||
{
|
||||
public:
|
||||
///@brief constructor
|
||||
explicit FocusScope(QWidgetAdapter *thisWidget);
|
||||
~FocusScope();
|
||||
virtual ~FocusScope();
|
||||
|
||||
///@brief Returns true if this FocusScope is focused.
|
||||
///This is similar to the QWidget::hasFocus(), except that it counts with the children being focused too.
|
||||
|
||||
@@ -16,23 +16,28 @@
|
||||
#include "FloatingWindow_p.h"
|
||||
#include "Config.h"
|
||||
#include "indicators/ClassicIndicators_p.h"
|
||||
#include "indicators/NullIndicators_p.h"
|
||||
#include "Utils_p.h"
|
||||
|
||||
#ifdef KDDOCKWIDGETS_QTWIDGETS
|
||||
# include "indicators/ClassicIndicators_p.h"
|
||||
# include "widgets/TabWidget_p.h"
|
||||
# include "widgets/FrameWidget_p.h"
|
||||
# include "widgets/TitleBarWidget_p.h"
|
||||
# include "widgets/TabBarWidget_p.h"
|
||||
# include "widgets/SideBarWidget_p.h"
|
||||
# include "widgets/TabWidgetWidget_p.h"
|
||||
# include "multisplitter/Separator_qwidget.h"
|
||||
# include "widgets/FloatingWindowWidget_p.h"
|
||||
# include "indicators/SegmentedIndicators_p.h"
|
||||
|
||||
# include <QRubberBand>
|
||||
# include <QToolButton>
|
||||
#else
|
||||
# include "DockWidgetQuick.h"
|
||||
# include "quick/FrameQuick_p.h"
|
||||
# include "quick/DockWidgetQuick.h"
|
||||
# include "quick/TitleBarQuick_p.h"
|
||||
# include "quick/FloatingWindowQuick_p.h"
|
||||
# include "quick/RubberBandQuick.h"
|
||||
# include "multisplitter/Separator_quick.h"
|
||||
#endif
|
||||
|
||||
@@ -87,11 +92,18 @@ FloatingWindow *DefaultWidgetFactory::createFloatingWindow(Frame *frame, MainWin
|
||||
|
||||
DropIndicatorOverlayInterface *DefaultWidgetFactory::createDropIndicatorOverlay(DropArea *dropArea) const
|
||||
{
|
||||
#ifdef Q_OS_WASM
|
||||
// On WASM windows don't support translucency, which is required for the classic indicators.
|
||||
return new SegmentedIndicators(dropArea);
|
||||
#endif
|
||||
|
||||
switch (s_dropIndicatorType) {
|
||||
case DropIndicatorType::Classic:
|
||||
return new ClassicIndicators(dropArea);
|
||||
case DropIndicatorType::Segmented:
|
||||
return new SegmentedIndicators(dropArea);
|
||||
case DropIndicatorType::None:
|
||||
return new NullIndicators(dropArea);
|
||||
}
|
||||
|
||||
return new ClassicIndicators(dropArea);
|
||||
@@ -102,6 +114,24 @@ QWidgetOrQuick *DefaultWidgetFactory::createRubberBand(QWidgetOrQuick *parent) c
|
||||
return new QRubberBand(QRubberBand::Rectangle, parent);
|
||||
}
|
||||
|
||||
SideBar *DefaultWidgetFactory::createSideBar(SideBarLocation loc, MainWindowBase *parent) const
|
||||
{
|
||||
return new SideBarWidget(loc, parent);
|
||||
}
|
||||
|
||||
QAbstractButton* DefaultWidgetFactory::createTitleBarButton(QWidget *parent, TitleBarButtonType type) const
|
||||
{
|
||||
if (!parent) {
|
||||
qWarning() << Q_FUNC_INFO << "Parent not provided";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto button = new Button(parent);
|
||||
button->setIcon(iconForButtonType(type, parent->devicePixelRatioF()));
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
Frame *DefaultWidgetFactory::createFrame(QWidgetOrQuick *parent, FrameOptions options) const
|
||||
@@ -136,6 +166,16 @@ FloatingWindow *DefaultWidgetFactory::createFloatingWindow(Frame *frame, MainWin
|
||||
|
||||
DropIndicatorOverlayInterface *DefaultWidgetFactory::createDropIndicatorOverlay(DropArea *dropArea) const
|
||||
{
|
||||
switch (s_dropIndicatorType) {
|
||||
case DropIndicatorType::Classic:
|
||||
return new ClassicIndicators(dropArea);
|
||||
case DropIndicatorType::Segmented:
|
||||
qWarning() << "Segmented indicators not supported for QtQuick yet";
|
||||
return new NullIndicators(dropArea);
|
||||
case DropIndicatorType::None:
|
||||
return new NullIndicators(dropArea);
|
||||
}
|
||||
|
||||
return new ClassicIndicators(dropArea);
|
||||
}
|
||||
|
||||
@@ -160,7 +200,78 @@ Layouting::Separator *DefaultWidgetFactory::createSeparator(Layouting::Widget *p
|
||||
|
||||
QWidgetOrQuick *DefaultWidgetFactory::createRubberBand(QWidgetOrQuick *parent) const
|
||||
{
|
||||
return new QWidgetOrQuick(parent);
|
||||
return new RubberBandQuick(parent);
|
||||
}
|
||||
|
||||
SideBar *DefaultWidgetFactory::createSideBar(SideBarLocation loc, MainWindowBase *parent) const
|
||||
{
|
||||
Q_UNUSED(loc);
|
||||
Q_UNUSED(parent);
|
||||
|
||||
qWarning() << Q_FUNC_INFO << "Not implemented yet";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QUrl DefaultWidgetFactory::titleBarFilename() const
|
||||
{
|
||||
return QUrl(QStringLiteral("qrc:/kddockwidgets/private/quick/qml/TitleBar.qml"));
|
||||
}
|
||||
|
||||
#endif // QtQuick
|
||||
|
||||
// iconForButtonType impl is the same for QtQuick and QtWidgets
|
||||
QIcon DefaultWidgetFactory::iconForButtonType(TitleBarButtonType type, qreal dpr) const
|
||||
{
|
||||
QString iconName;
|
||||
switch (type) {
|
||||
case TitleBarButtonType::AutoHide:
|
||||
iconName = QStringLiteral("auto-hide");
|
||||
break;
|
||||
case TitleBarButtonType::UnautoHide:
|
||||
iconName = QStringLiteral("unauto-hide");
|
||||
break;
|
||||
case TitleBarButtonType::Close:
|
||||
iconName = QStringLiteral("close");
|
||||
break;
|
||||
case TitleBarButtonType::Minimize:
|
||||
iconName = QStringLiteral("min");
|
||||
break;
|
||||
case TitleBarButtonType::Maximize:
|
||||
iconName = QStringLiteral("max");
|
||||
break;
|
||||
case TitleBarButtonType::Normal:
|
||||
// We're using the same icon as dock/float
|
||||
iconName = QStringLiteral("dock-float");
|
||||
break;
|
||||
case TitleBarButtonType::Float:
|
||||
iconName = QStringLiteral("dock-float");
|
||||
break;
|
||||
}
|
||||
|
||||
if (iconName.isEmpty())
|
||||
return {};
|
||||
|
||||
QIcon icon(QStringLiteral(":/img/%1.png").arg(iconName));
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 2)
|
||||
const bool isFractional = int(dpr) != dpr;
|
||||
if (isFractional) {
|
||||
// We don't support 1.5x yet.
|
||||
// Problem with Linux is that rendering is off due to a rounding bug only fixed in 5.15.2
|
||||
// Will enable for fractional later.
|
||||
// QTBUG-86170
|
||||
// Mostly affects Linux. Unless you're using Qt::HighDpiScaleFactorRoundingPolicy::PassThrough, in which case it will
|
||||
// affect other OSes too.
|
||||
return icon;
|
||||
}
|
||||
#else
|
||||
// Not using Qt's sugar syntax, which doesn't support 1.5x anyway when we need it.
|
||||
// Simply add the high-res files and Qt will pick them when needed
|
||||
|
||||
icon.addFile(QStringLiteral(":/img/%1-1.5x.png").arg(iconName));
|
||||
Q_UNUSED(dpr);
|
||||
#endif
|
||||
icon.addFile(QStringLiteral(":/img/%1-2x.png").arg(iconName));
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
* @author Sérgio Martins \<sergio.martins@kdab.com\>
|
||||
*/
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAbstractButton;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Layouting {
|
||||
class Separator;
|
||||
class Widget;
|
||||
@@ -37,6 +41,7 @@ class TabWidget;
|
||||
class TitleBar;
|
||||
class Frame;
|
||||
class DropArea;
|
||||
class SideBar;
|
||||
class TabBar;
|
||||
|
||||
/**
|
||||
@@ -56,7 +61,12 @@ class TabBar;
|
||||
*
|
||||
* @sa Config::setFrameworkWidgetFactory()
|
||||
*/
|
||||
class DOCKS_EXPORT FrameworkWidgetFactory {
|
||||
class DOCKS_EXPORT FrameworkWidgetFactory : public QObject
|
||||
{
|
||||
#ifdef KDDOCKWIDGETS_QTQUICK
|
||||
Q_PROPERTY(QUrl titleBarFilename READ titleBarFilename CONSTANT)
|
||||
#endif
|
||||
Q_OBJECT
|
||||
public:
|
||||
FrameworkWidgetFactory() = default;
|
||||
|
||||
@@ -121,6 +131,23 @@ public:
|
||||
///@brief Called internally by the framework to create a RubberBand to show as drop zone
|
||||
///Returns a rubber band
|
||||
virtual QWidgetOrQuick *createRubberBand(QWidgetOrQuick *parent) const = 0;
|
||||
|
||||
///@brief Called internally by the framework to create a SideBar
|
||||
///@param loc The side-bar location without the main window. Just forward into your SideBar sub-class ctor.
|
||||
///@param parent The MainWindow. Just forward into your SideBar sub-class ctor.
|
||||
virtual SideBar *createSideBar(SideBarLocation loc, MainWindowBase *parent) const = 0;
|
||||
|
||||
#ifdef KDDOCKWIDGETS_QTWIDGETS
|
||||
///@brief Called internally by the framework to create a title bar button
|
||||
///@p parent the button's parent
|
||||
virtual QAbstractButton* createTitleBarButton(QWidget *parent, TitleBarButtonType) const = 0;
|
||||
#else
|
||||
virtual QUrl titleBarFilename() const = 0;
|
||||
#endif
|
||||
|
||||
/// @brief Returns the icon to be used with the specified @p type
|
||||
/// @param dpr the device pixel ratio of the button
|
||||
virtual QIcon iconForButtonType(TitleBarButtonType type, qreal dpr) const = 0;
|
||||
private:
|
||||
Q_DISABLE_COPY(FrameworkWidgetFactory)
|
||||
};
|
||||
@@ -142,6 +169,15 @@ public:
|
||||
FloatingWindow *createFloatingWindow(Frame *frame, MainWindowBase *parent = nullptr) const override;
|
||||
DropIndicatorOverlayInterface *createDropIndicatorOverlay(DropArea*) const override;
|
||||
QWidgetOrQuick *createRubberBand(QWidgetOrQuick *parent) const override;
|
||||
SideBar *createSideBar(SideBarLocation loc, MainWindowBase *parent) const override;
|
||||
|
||||
#ifdef KDDOCKWIDGETS_QTWIDGETS
|
||||
QAbstractButton* createTitleBarButton(QWidget *parent, TitleBarButtonType) const override;
|
||||
#else
|
||||
QUrl titleBarFilename() const override;
|
||||
#endif
|
||||
|
||||
QIcon iconForButtonType(TitleBarButtonType type, qreal dpr) const override;
|
||||
|
||||
static DropIndicatorType s_dropIndicatorType;
|
||||
private:
|
||||
|
||||
@@ -19,15 +19,15 @@
|
||||
#ifndef KD_KDDOCKWIDGETS_H
|
||||
#define KD_KDDOCKWIDGETS_H
|
||||
|
||||
#include "Qt5Qt6Compat_p.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Only on Windows, where this is popular. On linux it the Qt::Tool windows need reparenting. Untested on macOS.
|
||||
// Only on Windows, where this is popular. On linux the Qt::Tool windows need reparenting. Untested on macOS.
|
||||
# define KDDOCKWIDGETS_SUPPORTS_NESTED_MAINWINDOWS
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
namespace KDDockWidgets
|
||||
{
|
||||
enum Location {
|
||||
@@ -53,7 +53,8 @@ namespace KDDockWidgets
|
||||
enum FrameOption {
|
||||
FrameOption_None = 0,
|
||||
FrameOption_AlwaysShowsTabs = 1,
|
||||
FrameOption_IsCentralFrame = 2
|
||||
FrameOption_IsCentralFrame = 2,
|
||||
FrameOption_IsOverlayed = 4
|
||||
};
|
||||
Q_DECLARE_FLAGS(FrameOptions, FrameOption)
|
||||
|
||||
@@ -75,7 +76,8 @@ namespace KDDockWidgets
|
||||
|
||||
enum class DropIndicatorType {
|
||||
Classic, ///< The default
|
||||
Segmented
|
||||
Segmented, ///< Segmented indicators
|
||||
None ///< Don't show any drop indicators while dragging
|
||||
};
|
||||
|
||||
///@internal
|
||||
@@ -96,6 +98,32 @@ namespace KDDockWidgets
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
/// @brief Each main window supports 4 sidebars
|
||||
enum class SideBarLocation {
|
||||
None,
|
||||
North,
|
||||
East,
|
||||
West,
|
||||
South
|
||||
};
|
||||
|
||||
///@brief describes a type of button you can have in the title bar
|
||||
enum class TitleBarButtonType {
|
||||
Close,
|
||||
Float,
|
||||
Minimize,
|
||||
Maximize,
|
||||
Normal, // Restore from maximized state
|
||||
AutoHide,
|
||||
UnautoHide
|
||||
};
|
||||
|
||||
///@internal
|
||||
inline Qt5Qt6Compat::qhashtype qHash(SideBarLocation loc, Qt5Qt6Compat::qhashtype seed)
|
||||
{
|
||||
return ::qHash(static_cast<uint>(loc), seed);
|
||||
}
|
||||
}
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(KDDockWidgets::FrameOptions)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
find_dependency(Qt5Widgets REQUIRED)
|
||||
if (@OPTION_QTQUICK@)
|
||||
if (@KDDockWidgets_QTQUICK@)
|
||||
find_dependency(Qt5Quick REQUIRED)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#include "multisplitter/Item_p.h"
|
||||
#include "FrameworkWidgetFactory.h"
|
||||
#include "MainWindowBase.h"
|
||||
#include "FloatingWindow_p.h"
|
||||
|
||||
#include <qmath.h>
|
||||
#include <QDebug>
|
||||
#include <QSettings>
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
|
||||
#include <memory>
|
||||
@@ -163,7 +163,7 @@ QByteArray LayoutSaver::serializeLayout() const
|
||||
layout.mainWindows.push_back(mainWindow->serialize());
|
||||
}
|
||||
|
||||
const QVector<KDDockWidgets::FloatingWindow*> floatingWindows = d->m_dockRegistry->nestedwindows();
|
||||
const QVector<KDDockWidgets::FloatingWindow*> floatingWindows = d->m_dockRegistry->floatingWindows();
|
||||
layout.floatingWindows.reserve(floatingWindows.size());
|
||||
for (KDDockWidgets::FloatingWindow *floatingWindow : floatingWindows) {
|
||||
if (d->matchesAffinity(floatingWindow->affinities()))
|
||||
@@ -700,6 +700,12 @@ QVariantMap LayoutSaver::MainWindow::toVariantMap() const
|
||||
map.insert(QStringLiteral("isVisible"), isVisible);
|
||||
map.insert(QStringLiteral("affinities"), stringListToVariant(affinities));
|
||||
|
||||
for (SideBarLocation loc : { SideBarLocation::North, SideBarLocation::East, SideBarLocation::West, SideBarLocation::South }) {
|
||||
const QStringList dockWidgets = dockWidgetsPerSideBar.value(loc);
|
||||
if (!dockWidgets.isEmpty())
|
||||
map.insert(QStringLiteral("sidebar-%1").arg(int(loc)), stringListToVariant(dockWidgets));
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -720,6 +726,13 @@ void LayoutSaver::MainWindow::fromVariantMap(const QVariantMap &map)
|
||||
affinities.push_back(affinityName);
|
||||
}
|
||||
|
||||
// Load the SideBars:
|
||||
dockWidgetsPerSideBar.clear();
|
||||
for (SideBarLocation loc : { SideBarLocation::North, SideBarLocation::East, SideBarLocation::West, SideBarLocation::South }) {
|
||||
const QVariantList dockWidgets = map.value(QStringLiteral("sidebar-%1").arg(int(loc))).toList();
|
||||
if (!dockWidgets.isEmpty())
|
||||
dockWidgetsPerSideBar.insert(loc, variantToStringList(dockWidgets));
|
||||
}
|
||||
}
|
||||
|
||||
bool LayoutSaver::MultiSplitter::isValid() const
|
||||
|
||||
@@ -27,6 +27,8 @@ QT_BEGIN_NAMESPACE
|
||||
class QByteArray;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class TestDocks;
|
||||
|
||||
namespace KDDockWidgets {
|
||||
|
||||
class DockWidgetBase;
|
||||
@@ -105,7 +107,7 @@ public:
|
||||
struct ScreenInfo;
|
||||
private:
|
||||
Q_DISABLE_COPY(LayoutSaver)
|
||||
friend class TestDocks;
|
||||
friend class ::TestDocks;
|
||||
|
||||
class Private;
|
||||
Private *const d;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <QRect>
|
||||
#include <QDebug>
|
||||
#include <QScreen>
|
||||
#include <QApplication>
|
||||
#include <QGuiApplication>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#include <memory>
|
||||
@@ -236,6 +236,7 @@ public:
|
||||
QVariantMap toVariantMap() const;
|
||||
void fromVariantMap(const QVariantMap &map);
|
||||
|
||||
QHash<SideBarLocation, QStringList> dockWidgetsPerSideBar;
|
||||
KDDockWidgets::MainWindowOptions options;
|
||||
LayoutSaver::MultiSplitter multiSplitterLayout;
|
||||
QString uniqueName;
|
||||
|
||||
@@ -17,12 +17,14 @@
|
||||
*/
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "Config.h"
|
||||
#include "DropArea_p.h"
|
||||
#include "Frame_p.h"
|
||||
#include "Logging_p.h"
|
||||
#include "SideBar_p.h"
|
||||
#include "DropAreaWithCentralFrame_p.h"
|
||||
#include "FrameworkWidgetFactory.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QVBoxLayout>
|
||||
#include <QPainter>
|
||||
|
||||
@@ -31,11 +33,21 @@ using namespace KDDockWidgets;
|
||||
class MainWindow::Private
|
||||
{
|
||||
public:
|
||||
explicit Private(MainWindowOptions, MainWindowBase *)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
explicit Private(MainWindowOptions, MainWindowBase *mainWindow)
|
||||
: m_supportsAutoHide(Config::self().flags() & Config::Flag_AutoHideSupport)
|
||||
{
|
||||
if (m_supportsAutoHide) {
|
||||
for (auto location : { SideBarLocation::North, SideBarLocation::East,
|
||||
SideBarLocation::West, SideBarLocation::South}) {
|
||||
m_sideBars.insert(location, Config::self().frameworkWidgetFactory()->createSideBar(location, mainWindow) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const bool m_supportsAutoHide;
|
||||
QHash<SideBarLocation, SideBar*> m_sideBars;
|
||||
};
|
||||
|
||||
namespace KDDockWidgets {
|
||||
class MyCentralWidget : public QWidget
|
||||
@@ -67,12 +79,25 @@ MainWindow::MainWindow(const QString &name, MainWindowOptions options,
|
||||
, d(new Private(options, this))
|
||||
{
|
||||
auto centralWidget = new MyCentralWidget(this);
|
||||
auto layout = new QVBoxLayout(centralWidget);
|
||||
layout->setContentsMargins(1, 5, 1, 1);
|
||||
layout->addWidget(dropArea()); // 1 level of indirection so we can add some margins
|
||||
setCentralWidget(centralWidget);
|
||||
auto layout = new QHBoxLayout(centralWidget); // 1 level of indirection so we can add some margins
|
||||
layout->setSpacing(0);
|
||||
layout->setContentsMargins(centerWidgetMargins());
|
||||
|
||||
// qApp->installEventFilter(this);
|
||||
if (d->m_supportsAutoHide) {
|
||||
layout->addWidget(sideBar(SideBarLocation::West));
|
||||
auto innerVLayout = new QVBoxLayout();
|
||||
innerVLayout->setSpacing(0);
|
||||
innerVLayout->setContentsMargins(0, 0, 0, 0);
|
||||
innerVLayout->addWidget(sideBar(SideBarLocation::North));
|
||||
innerVLayout->addWidget(dropArea());
|
||||
innerVLayout->addWidget(sideBar(SideBarLocation::South));
|
||||
layout->addLayout(innerVLayout);
|
||||
layout->addWidget(sideBar(SideBarLocation::East));
|
||||
} else {
|
||||
layout->addWidget(dropArea());
|
||||
}
|
||||
|
||||
setCentralWidget(centralWidget);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@@ -84,3 +109,24 @@ void MainWindow::setCentralWidget(QWidget *w)
|
||||
{
|
||||
QMainWindow::setCentralWidget(w);
|
||||
}
|
||||
|
||||
SideBar *MainWindow::sideBar(SideBarLocation location) const
|
||||
{
|
||||
return d->m_sideBars.value(location);
|
||||
}
|
||||
|
||||
void MainWindow::resizeEvent(QResizeEvent *ev)
|
||||
{
|
||||
MainWindowBase::resizeEvent(ev);
|
||||
onResized(ev); // Also call our own handler, since QtQuick doesn't have resizeEvent()
|
||||
}
|
||||
|
||||
QMargins MainWindow::centerWidgetMargins() const
|
||||
{
|
||||
return { 1, 5, 1, 1};
|
||||
}
|
||||
|
||||
QRect MainWindow::centralAreaGeometry() const
|
||||
{
|
||||
return centralWidget()->geometry();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace KDDockWidgets {
|
||||
|
||||
class SideBar;
|
||||
|
||||
/**
|
||||
* @brief The QMainwindow sub-class that the application should use to be able
|
||||
* to dock KDDockWidget::DockWidget instances.
|
||||
@@ -45,6 +47,13 @@ public:
|
||||
///@brief Destructor
|
||||
~MainWindow() override;
|
||||
|
||||
///@brief returns the sidebar for the specified location
|
||||
SideBar *sideBar(SideBarLocation) const override;
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
QMargins centerWidgetMargins() const override;
|
||||
QRect centralAreaGeometry() const override;
|
||||
private:
|
||||
using QMainWindow::setCentralWidget;
|
||||
void setCentralWidget(QWidget *); // overridden just to make it private
|
||||
|
||||
@@ -22,7 +22,10 @@
|
||||
#include "DropArea_p.h"
|
||||
#include "Frame_p.h"
|
||||
#include "Utils_p.h"
|
||||
#include "SideBar_p.h"
|
||||
#include "Logging_p.h"
|
||||
#include "Item_p.h"
|
||||
#include "FrameworkWidgetFactory.h"
|
||||
#include "DropAreaWithCentralFrame_p.h"
|
||||
|
||||
using namespace KDDockWidgets;
|
||||
@@ -42,15 +45,21 @@ public:
|
||||
return m_options & MainWindowOption_HasCentralFrame;
|
||||
}
|
||||
|
||||
QRect rectForOverlay(Frame *, SideBarLocation) const;
|
||||
SideBarLocation preferredSideBar(DockWidgetBase *) const;
|
||||
void updateOverlayGeometry();
|
||||
void clearSideBars();
|
||||
|
||||
QString name;
|
||||
QStringList affinities;
|
||||
const MainWindowOptions m_options;
|
||||
MainWindowBase *const q;
|
||||
QPointer<DockWidgetBase> m_overlayedDockWidget;
|
||||
DropAreaWithCentralFrame *const m_dropArea;
|
||||
};
|
||||
|
||||
MainWindowBase::MainWindowBase(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
||||
QWidgetOrQuick *parent, Qt::WindowFlags flags)
|
||||
WidgetType *parent, Qt::WindowFlags flags)
|
||||
: QMainWindowOrQuick(parent, flags)
|
||||
, d(new Private(this, options))
|
||||
{
|
||||
@@ -149,6 +158,316 @@ void MainWindowBase::layoutParentContainerEqually(DockWidgetBase *dockWidget)
|
||||
dropArea()->layoutParentContainerEqually(dockWidget);
|
||||
}
|
||||
|
||||
QRect MainWindowBase::Private::rectForOverlay(Frame *frame, SideBarLocation location) const
|
||||
{
|
||||
SideBar *sb = q->sideBar(location);
|
||||
if (!sb)
|
||||
return {};
|
||||
|
||||
const QRect centralAreaGeo = q->centralAreaGeometry();
|
||||
const QMargins centerWidgetMargins = q->centerWidgetMargins();
|
||||
|
||||
QRect rect;
|
||||
const int margin = 1;
|
||||
switch (location) {
|
||||
case SideBarLocation::North:
|
||||
case SideBarLocation::South: {
|
||||
|
||||
SideBar *leftSideBar = q->sideBar(SideBarLocation::West);
|
||||
SideBar *rightSideBar = q->sideBar(SideBarLocation::East);
|
||||
const int leftSideBarWidth = (leftSideBar && leftSideBar->isVisible()) ? leftSideBar->width()
|
||||
: 0;
|
||||
const int rightSideBarWidth = (rightSideBar && rightSideBar->isVisible()) ? rightSideBar->width()
|
||||
: 0;
|
||||
rect.setHeight(qMax(300, frame->minSize().height()));
|
||||
rect.setWidth(centralAreaGeo.width() - margin * 2 - leftSideBarWidth - rightSideBarWidth);
|
||||
rect.moveLeft(margin + leftSideBarWidth);
|
||||
if (location == SideBarLocation::South) {
|
||||
rect.moveTop(centralAreaGeo.bottom() - centerWidgetMargins.bottom() - rect.height() - sb->height());
|
||||
} else {
|
||||
rect.moveTop(centralAreaGeo.y() + sb->height() + centerWidgetMargins.top());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SideBarLocation::West:
|
||||
case SideBarLocation::East: {
|
||||
SideBar *topSideBar = q->sideBar(SideBarLocation::North);
|
||||
SideBar *bottomSideBar = q->sideBar(SideBarLocation::South);
|
||||
const int topSideBarHeight = (topSideBar && topSideBar->isVisible()) ? topSideBar->height()
|
||||
: 0;
|
||||
const int bottomSideBarHeight = (bottomSideBar && bottomSideBar->isVisible()) ? bottomSideBar->height()
|
||||
: 0;
|
||||
rect.setWidth(qMax(300, frame->minSize().width()));
|
||||
rect.setHeight(centralAreaGeo.height() - topSideBarHeight - bottomSideBarHeight - centerWidgetMargins.top() - centerWidgetMargins.bottom());
|
||||
rect.moveTop(sb->mapTo(q, QPoint(0, 0)).y() + topSideBarHeight - 1);
|
||||
if (location == SideBarLocation::East) {
|
||||
rect.moveLeft(centralAreaGeo.width() - rect.width() - sb->width() - centerWidgetMargins.right() - margin);
|
||||
} else {
|
||||
rect.moveLeft(margin + centralAreaGeo.x() + centerWidgetMargins.left() + sb->width());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case SideBarLocation::None:
|
||||
break;
|
||||
}
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
static SideBarLocation opposedSideBarLocationForBorder(Layouting::Item::LayoutBorderLocation loc)
|
||||
{
|
||||
switch (loc) {
|
||||
case Layouting::Item::LayoutBorderLocation_North:
|
||||
return SideBarLocation::South;
|
||||
case Layouting::Item::LayoutBorderLocation_East:
|
||||
return SideBarLocation::West;
|
||||
case Layouting::Item::LayoutBorderLocation_West:
|
||||
return SideBarLocation::East;
|
||||
case Layouting::Item::LayoutBorderLocation_South:
|
||||
return SideBarLocation::North;
|
||||
case Layouting::Item::LayoutBorderLocation_All:
|
||||
case Layouting::Item::LayoutBorderLocation_Verticals:
|
||||
case Layouting::Item::LayoutBorderLocation_Horizontals:
|
||||
case Layouting::Item::LayoutBorderLocation_None:
|
||||
break;
|
||||
}
|
||||
|
||||
qWarning() << Q_FUNC_INFO << "Unknown loc" << loc;
|
||||
return SideBarLocation::None;
|
||||
}
|
||||
|
||||
static SideBarLocation sideBarLocationForBorder(Layouting::Item::LayoutBorderLocations loc)
|
||||
{
|
||||
switch (loc) {
|
||||
case Layouting::Item::LayoutBorderLocation_North:
|
||||
return SideBarLocation::North;
|
||||
case Layouting::Item::LayoutBorderLocation_East:
|
||||
return SideBarLocation::East;
|
||||
case Layouting::Item::LayoutBorderLocation_West:
|
||||
return SideBarLocation::West;
|
||||
case Layouting::Item::LayoutBorderLocation_South:
|
||||
return SideBarLocation::South;
|
||||
case Layouting::Item::LayoutBorderLocation_All:
|
||||
case Layouting::Item::LayoutBorderLocation_Verticals:
|
||||
case Layouting::Item::LayoutBorderLocation_Horizontals:
|
||||
case Layouting::Item::LayoutBorderLocation_None:
|
||||
break;
|
||||
}
|
||||
|
||||
return SideBarLocation::None;
|
||||
}
|
||||
|
||||
SideBarLocation MainWindowBase::Private::preferredSideBar(DockWidgetBase *dw) const
|
||||
{
|
||||
// TODO: Algorithm can still be made smarter
|
||||
|
||||
Layouting::Item *item = q->multiSplitter()->itemForFrame(dw->frame());
|
||||
if (!item) {
|
||||
qWarning() << Q_FUNC_INFO << "No item for dock widget";
|
||||
return SideBarLocation::None;
|
||||
}
|
||||
|
||||
const Layouting::Item::LayoutBorderLocations borders = item->adjacentLayoutBorders();
|
||||
const qreal aspectRatio = dw->width() / (dw->height() * 1.0);
|
||||
|
||||
/// 1. It's touching all borders
|
||||
if (borders == Layouting::Item::LayoutBorderLocation_All) {
|
||||
return aspectRatio > 1.0 ? SideBarLocation::South
|
||||
: SideBarLocation::East;
|
||||
}
|
||||
|
||||
/// 2. It's touching 3 borders
|
||||
for (auto borderLoc : { Layouting::Item::LayoutBorderLocation_North, Layouting::Item::LayoutBorderLocation_East,
|
||||
Layouting::Item::LayoutBorderLocation_West, Layouting::Item::LayoutBorderLocation_South }) {
|
||||
if (borders == (Layouting::Item::LayoutBorderLocation_All & ~borderLoc))
|
||||
return opposedSideBarLocationForBorder(borderLoc);
|
||||
}
|
||||
|
||||
/// 3. It's touching left and right borders
|
||||
if ((borders & Layouting::Item::LayoutBorderLocation_Verticals) == Layouting::Item::LayoutBorderLocation_Verticals) {
|
||||
// We could measure the distance to the top though.
|
||||
return SideBarLocation::South;
|
||||
}
|
||||
|
||||
/// 4. It's touching top and bottom borders
|
||||
if ((borders & Layouting::Item::LayoutBorderLocation_Horizontals) == Layouting::Item::LayoutBorderLocation_Horizontals) {
|
||||
// We could measure the distance to the left though.
|
||||
return SideBarLocation::East;
|
||||
}
|
||||
|
||||
// 5. It's in a corner
|
||||
if (borders == (Layouting::Item::LayoutBorderLocation_West | Layouting::Item::LayoutBorderLocation_South)) {
|
||||
return aspectRatio > 1.0 ? SideBarLocation::South
|
||||
: SideBarLocation::West;
|
||||
} else if (borders == (Layouting::Item::LayoutBorderLocation_East | Layouting::Item::LayoutBorderLocation_South)) {
|
||||
return aspectRatio > 1.0 ? SideBarLocation::South
|
||||
: SideBarLocation::East;
|
||||
} else if (borders == (Layouting::Item::LayoutBorderLocation_West | Layouting::Item::LayoutBorderLocation_North)) {
|
||||
return aspectRatio > 1.0 ? SideBarLocation::North
|
||||
: SideBarLocation::West;
|
||||
} else if (borders == (Layouting::Item::LayoutBorderLocation_East | Layouting::Item::LayoutBorderLocation_North)) {
|
||||
return aspectRatio > 1.0 ? SideBarLocation::North
|
||||
: SideBarLocation::East;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
// 6. It's only touching 1 border
|
||||
SideBarLocation loc = sideBarLocationForBorder(borders);
|
||||
if (loc != SideBarLocation::None)
|
||||
return loc;
|
||||
}
|
||||
|
||||
// It's not touching any border, use aspect ratio.
|
||||
return aspectRatio > 1.0 ? SideBarLocation::South
|
||||
: SideBarLocation::West;
|
||||
}
|
||||
|
||||
void MainWindowBase::Private::updateOverlayGeometry()
|
||||
{
|
||||
if (!m_overlayedDockWidget)
|
||||
return;
|
||||
|
||||
SideBar *sb = q->sideBarForDockWidget(m_overlayedDockWidget);
|
||||
if (!sb) {
|
||||
qWarning() << Q_FUNC_INFO << "Expected a sidebar";
|
||||
return;
|
||||
}
|
||||
|
||||
m_overlayedDockWidget->frame()->QWidgetAdapter::setGeometry(rectForOverlay(m_overlayedDockWidget->frame(), sb->location()));
|
||||
}
|
||||
|
||||
void MainWindowBase::Private::clearSideBars()
|
||||
{
|
||||
for (auto loc : { SideBarLocation::North, SideBarLocation::South,
|
||||
SideBarLocation::East, SideBarLocation::West }) {
|
||||
if (SideBar *sb = q->sideBar(loc))
|
||||
sb->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindowBase::moveToSideBar(DockWidgetBase *dw)
|
||||
{
|
||||
moveToSideBar(dw, d->preferredSideBar(dw));
|
||||
}
|
||||
|
||||
void MainWindowBase::moveToSideBar(DockWidgetBase *dw, SideBarLocation location)
|
||||
{
|
||||
if (SideBar *sb = sideBar(location)) {
|
||||
dw->forceClose();
|
||||
sb->addDockWidget(dw);
|
||||
} else {
|
||||
// Shouldn't happen
|
||||
qWarning() << Q_FUNC_INFO << "Minimization supported, probably disabled in Config::self().flags()";
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindowBase::restoreFromSideBar(DockWidgetBase *dw)
|
||||
{
|
||||
// First un-overlay it, if it's overlayed
|
||||
if (dw == d->m_overlayedDockWidget)
|
||||
clearSideBarOverlay();
|
||||
|
||||
SideBar *sb = sideBarForDockWidget(dw);
|
||||
if (!sb) {
|
||||
// Doesn't happen
|
||||
qWarning() << Q_FUNC_INFO << "Dock widget isn't in any sidebar";
|
||||
return;
|
||||
}
|
||||
|
||||
sb->removeDockWidget(dw);
|
||||
dw->setFloating(false); // dock it
|
||||
}
|
||||
|
||||
void MainWindowBase::overlayOnSideBar(DockWidgetBase *dw)
|
||||
{
|
||||
if (!dw)
|
||||
return;
|
||||
|
||||
const SideBar *sb = sideBarForDockWidget(dw);
|
||||
if (sb == nullptr) {
|
||||
qWarning() << Q_FUNC_INFO << "You need to add the dock widget to the sidebar before you can overlay it";
|
||||
return;
|
||||
}
|
||||
|
||||
if (d->m_overlayedDockWidget == dw) {
|
||||
// Already overlayed
|
||||
return;
|
||||
}
|
||||
|
||||
// We only support one overlay at a time, remove any existing overlay
|
||||
clearSideBarOverlay();
|
||||
|
||||
auto frame = Config::self().frameworkWidgetFactory()->createFrame(this, FrameOption_IsOverlayed);
|
||||
d->m_overlayedDockWidget = dw;
|
||||
frame->addWidget(dw);
|
||||
d->updateOverlayGeometry();
|
||||
frame->QWidgetAdapter::show();
|
||||
|
||||
Q_EMIT dw->isOverlayedChanged(true);
|
||||
}
|
||||
|
||||
void MainWindowBase::toggleOverlayOnSideBar(DockWidgetBase *dw)
|
||||
{
|
||||
const bool wasOverlayed = d->m_overlayedDockWidget == dw;
|
||||
clearSideBarOverlay(); // Because only 1 dock widget can be overlayed each time
|
||||
if (!wasOverlayed) {
|
||||
overlayOnSideBar(dw);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindowBase::clearSideBarOverlay()
|
||||
{
|
||||
if (!d->m_overlayedDockWidget)
|
||||
return;
|
||||
|
||||
Frame *frame = d->m_overlayedDockWidget->frame();
|
||||
d->m_overlayedDockWidget->setParent(nullptr);
|
||||
Q_EMIT d->m_overlayedDockWidget->isOverlayedChanged(false);
|
||||
d->m_overlayedDockWidget = nullptr;
|
||||
delete frame;
|
||||
}
|
||||
|
||||
SideBar *MainWindowBase::sideBarForDockWidget(const DockWidgetBase *dw) const
|
||||
{
|
||||
for (auto loc : { SideBarLocation::North, SideBarLocation::South,
|
||||
SideBarLocation::East, SideBarLocation::West }) {
|
||||
|
||||
if (SideBar *sb = sideBar(loc)) {
|
||||
if (sb->containsDockWidget(const_cast<DockWidgetBase *>(dw)))
|
||||
return sb;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DockWidgetBase *MainWindowBase::overlayedDockWidget() const
|
||||
{
|
||||
return d->m_overlayedDockWidget;
|
||||
}
|
||||
|
||||
bool MainWindowBase::sideBarIsVisible(SideBarLocation loc) const
|
||||
{
|
||||
if (SideBar *sb = sideBar(loc)) {
|
||||
return !sb->isEmpty(); // isVisible() is always true, but its height is 0 when empty.
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MainWindowBase::anySideBarIsVisible() const
|
||||
{
|
||||
for (auto loc : { SideBarLocation::North, SideBarLocation::South,
|
||||
SideBarLocation::East, SideBarLocation::West }) {
|
||||
if (sideBarIsVisible(loc))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void MainWindowBase::setUniqueName(const QString &uniqueName)
|
||||
{
|
||||
if (uniqueName.isEmpty())
|
||||
@@ -163,6 +482,12 @@ void MainWindowBase::setUniqueName(const QString &uniqueName)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindowBase::onResized(QResizeEvent *)
|
||||
{
|
||||
if (d->m_overlayedDockWidget)
|
||||
d->updateOverlayGeometry();
|
||||
}
|
||||
|
||||
bool MainWindowBase::deserialize(const LayoutSaver::MainWindow &mw)
|
||||
{
|
||||
if (mw.options != options()) {
|
||||
@@ -178,7 +503,34 @@ bool MainWindowBase::deserialize(const LayoutSaver::MainWindow &mw)
|
||||
d->affinities = mw.affinities;
|
||||
}
|
||||
|
||||
return dropArea()->deserialize(mw.multiSplitterLayout);
|
||||
const bool success = dropArea()->deserialize(mw.multiSplitterLayout);
|
||||
|
||||
// Restore the SideBars
|
||||
d->clearSideBars();
|
||||
for (SideBarLocation loc : { SideBarLocation::North, SideBarLocation::East, SideBarLocation::West, SideBarLocation::South }) {
|
||||
SideBar *sb = sideBar(loc);
|
||||
if (!sb)
|
||||
continue;
|
||||
|
||||
const QStringList dockWidgets = mw.dockWidgetsPerSideBar.value(loc);
|
||||
for (const QString &uniqueName : dockWidgets) {
|
||||
|
||||
DockWidgetBase *dw = DockRegistry::self()->dockByName(uniqueName);
|
||||
if (!dw) {
|
||||
qWarning() << Q_FUNC_INFO << "Could not find dock widget" << uniqueName
|
||||
<< ". Won't restore it to sidebar";
|
||||
continue;
|
||||
}
|
||||
|
||||
sb->addDockWidget(dw);
|
||||
}
|
||||
}
|
||||
|
||||
// Commented-out for now, we dont' want to restore the popup/overlay. popups are perishable
|
||||
//if (!mw.overlayedDockWidget.isEmpty())
|
||||
// overlayOnSideBar(DockRegistry::self()->dockByName(mw.overlayedDockWidget));
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
LayoutSaver::MainWindow MainWindowBase::serialize() const
|
||||
@@ -194,5 +546,13 @@ LayoutSaver::MainWindow MainWindowBase::serialize() const
|
||||
m.multiSplitterLayout = dropArea()->serialize();
|
||||
m.affinities = d->affinities;
|
||||
|
||||
for (SideBarLocation loc : { SideBarLocation::North, SideBarLocation::East, SideBarLocation::West, SideBarLocation::South }) {
|
||||
if (SideBar *sb = sideBar(loc)) {
|
||||
const QStringList dockwidgets = sb->serialize();
|
||||
if (!dockwidgets.isEmpty())
|
||||
m.dockWidgetsPerSideBar.insert(loc, dockwidgets);
|
||||
}
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
#include "LayoutSaver_p.h"
|
||||
|
||||
#include <QVector>
|
||||
#include <QMargins>
|
||||
|
||||
class TestDocks;
|
||||
|
||||
namespace KDDockWidgets {
|
||||
|
||||
@@ -34,6 +37,7 @@ class Frame;
|
||||
class DropArea;
|
||||
class MultiSplitter;
|
||||
class DropAreaWithCentralFrame;
|
||||
class SideBar;
|
||||
|
||||
/**
|
||||
* @brief The MainWindow base-class. MainWindow and MainWindowBase are only
|
||||
@@ -52,7 +56,7 @@ class DOCKS_EXPORT MainWindowBase : public QMainWindow
|
||||
public:
|
||||
typedef QVector<MainWindowBase*> List;
|
||||
explicit MainWindowBase(const QString &uniqueName, MainWindowOptions options = MainWindowOption_HasCentralFrame,
|
||||
QWidgetOrQuick *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
WidgetType *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
|
||||
~MainWindowBase() override;
|
||||
|
||||
@@ -131,8 +135,48 @@ public:
|
||||
/// sub-tree.
|
||||
void layoutParentContainerEqually(DockWidgetBase *dockWidget);
|
||||
|
||||
///@brief Moves the dock widget into one of the MainWindow's sidebar.
|
||||
/// Means the dock widget is removed from the layout, and the sidebar shows a button that if pressed
|
||||
/// will toggle the dock widget's visibility as an overlay over the layout. This is the auto-hide
|
||||
/// functionality.
|
||||
///
|
||||
/// The chosen side bar will depend on some heuristics, mostly proximity.
|
||||
void moveToSideBar(DockWidgetBase *);
|
||||
|
||||
/// @brief overload that allows to specify which sidebar to use, instead of using heuristics.
|
||||
void moveToSideBar(DockWidgetBase *, SideBarLocation);
|
||||
|
||||
/// @brief Removes the dock widget from the sidebar and docks it into the main window again
|
||||
void restoreFromSideBar(DockWidgetBase *);
|
||||
|
||||
///@brief Shows the dock widget overlayed on top of the main window, placed next to the sidebar
|
||||
void overlayOnSideBar(DockWidgetBase *);
|
||||
|
||||
///@brief Shows or hides an overlay. It's assumed the dock widget is already in a side-bar.
|
||||
void toggleOverlayOnSideBar(DockWidgetBase *);
|
||||
|
||||
/// @brief closes any overlayed dock widget. The sidebar still displays them as button.
|
||||
void clearSideBarOverlay();
|
||||
|
||||
/// @brief Returns the sidebar this dockwidget is in. nullptr if not in any.
|
||||
SideBar *sideBarForDockWidget(const DockWidgetBase *) const;
|
||||
|
||||
/// @brief returns the dock widget which is currently overlayed. nullptr if none.
|
||||
/// This is only relevant when using the auto-hide and side-bar feature.
|
||||
DockWidgetBase *overlayedDockWidget() const;
|
||||
|
||||
/// @brief Returns whether the specified sidebar is visible
|
||||
bool sideBarIsVisible(SideBarLocation) const;
|
||||
|
||||
/// @brief Returns whether any side bar is visible
|
||||
bool anySideBarIsVisible() const;
|
||||
|
||||
protected:
|
||||
void setUniqueName(const QString &uniqueName);
|
||||
void onResized(QResizeEvent *); // Because QtQuick doesn't have resizeEvent()
|
||||
virtual QMargins centerWidgetMargins() const = 0;
|
||||
virtual SideBar* sideBar(SideBarLocation) const = 0;
|
||||
virtual QRect centralAreaGeometry() const { return {}; }
|
||||
|
||||
Q_SIGNALS:
|
||||
void uniqueNameChanged();
|
||||
@@ -141,6 +185,7 @@ private:
|
||||
class Private;
|
||||
Private *const d;
|
||||
|
||||
friend class ::TestDocks;
|
||||
friend class LayoutSaver;
|
||||
bool deserialize(const LayoutSaver::MainWindow &);
|
||||
LayoutSaver::MainWindow serialize() const;
|
||||
|
||||
@@ -79,6 +79,8 @@ public:
|
||||
, LayoutGuestWidgetBase(this)
|
||||
{
|
||||
}
|
||||
|
||||
~LayoutGuestWidget() override;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -13,20 +13,39 @@
|
||||
#define KDDOCKWIDGETS_QT5QT6_COMPAT_P_H
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QDropEvent>
|
||||
|
||||
namespace KDDockWidgets {
|
||||
namespace Qt5Qt6Compat {
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
||||
using QEnterEvent = QEnterEvent;
|
||||
using qintptr = ::qintptr;
|
||||
using qhashtype = size_t;
|
||||
|
||||
inline QPoint eventPos(QDropEvent *ev)
|
||||
{
|
||||
return ev->position().toPoint();
|
||||
}
|
||||
|
||||
inline QPoint eventGlobalPos(QMouseEvent *ev)
|
||||
{
|
||||
return ev->globalPosition().toPoint();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// Qt 5:
|
||||
|
||||
using QEnterEvent = QEvent;
|
||||
using qintptr = long;
|
||||
using qhashtype = uint;
|
||||
|
||||
inline QPoint eventPos(QDropEvent *ev)
|
||||
{
|
||||
return ev->pos();
|
||||
}
|
||||
|
||||
inline QPoint eventGlobalPos(QMouseEvent *ev)
|
||||
{
|
||||
return ev->globalPos();
|
||||
|
||||
12
src/fwd_headers/kddockwidgets/DockWidgetBase.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "../../DockWidgetBase.h"
|
||||
12
src/fwd_headers/kddockwidgets/DockWidgetQuick.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "../../DockWidgetQuick.h"
|
||||
12
src/fwd_headers/kddockwidgets/FocusScope.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "../../FocusScope.h"
|
||||
12
src/fwd_headers/kddockwidgets/MainWindowBase.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "../../MainWindowBase.h"
|
||||
12
src/fwd_headers/kddockwidgets/QWidgetAdapter.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "../../QWidgetAdapter.h"
|
||||
12
src/fwd_headers/kddockwidgets/Qt5Qt6Compat_p.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "../../Qt5Qt6Compat_p.h"
|
||||
12
src/fwd_headers/kddockwidgets/docks_export.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "../../docks_export.h"
|
||||
12
src/fwd_headers/kddockwidgets/private/DockRegistry_p.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "../../../private/DockRegistry_p.h"
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
#include "../../../../private/widgets/SideBarWidget_p.h"
|
||||
BIN
src/img/auto-hide-1.5x.png
Normal file
|
After Width: | Height: | Size: 473 B |
BIN
src/img/auto-hide-2x.png
Normal file
|
After Width: | Height: | Size: 477 B |
BIN
src/img/auto-hide.png
Normal file
|
After Width: | Height: | Size: 208 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
src/img/close-1.5x.png
Normal file
|
After Width: | Height: | Size: 496 B |
BIN
src/img/close-2x.png
Normal file
|
After Width: | Height: | Size: 543 B |
BIN
src/img/close.png
Normal file
|
After Width: | Height: | Size: 405 B |
BIN
src/img/dock-float-1.5x.png
Normal file
|
After Width: | Height: | Size: 438 B |