Compare commits
1950 Commits
aero_suppo
...
python-ins
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd01e9cdde | ||
|
|
dc1e5103e2 | ||
|
|
33c5647e57 | ||
|
|
f6f772edc5 | ||
|
|
7e460d8f34 | ||
|
|
7af2095f2f | ||
|
|
8307598d5d | ||
|
|
13fe276dbe | ||
|
|
13a5a472cd | ||
|
|
b5c11ce199 | ||
|
|
83c8c22736 | ||
|
|
c8ca7bf9e1 | ||
|
|
0184deb54d | ||
|
|
389042f3cc | ||
|
|
736358a71f | ||
|
|
bffe671679 | ||
|
|
fafc0b7946 | ||
|
|
3574feea98 | ||
|
|
25b48920bb | ||
|
|
e22ca48674 | ||
|
|
3b9773f872 | ||
|
|
3e3cf10fff | ||
|
|
421b401b4f | ||
|
|
a0c97e3388 | ||
|
|
d2a3968897 | ||
|
|
4ea7953a76 | ||
|
|
0cc0972eea | ||
|
|
77b5d1630d | ||
|
|
f962989484 | ||
|
|
1ccdf445eb | ||
|
|
3fb8861eee | ||
|
|
78381badd1 | ||
|
|
8b1a9f2a41 | ||
|
|
9ee52a0011 | ||
|
|
240169ce23 | ||
|
|
97a431f367 | ||
|
|
3769ad9615 | ||
|
|
8332ab3ddc | ||
|
|
3b4a2f134f | ||
|
|
5899e3716c | ||
|
|
25bc05ae40 | ||
|
|
f42629a6e5 | ||
|
|
192cb2daaa | ||
|
|
63cc87af2d | ||
|
|
3e1ea3ec67 | ||
|
|
c27a09c13c | ||
|
|
b3486ebca8 | ||
|
|
6a7230e546 | ||
|
|
ca173de71d | ||
|
|
5732e8ed14 | ||
|
|
5cc7a0864b | ||
|
|
e4671f175c | ||
|
|
17fd6b2454 | ||
|
|
7ed3945d58 | ||
|
|
35de0a2fef | ||
|
|
8a0e475f21 | ||
|
|
63d14f2345 | ||
|
|
e91849759c | ||
|
|
ee3a3af408 | ||
|
|
c470c89fc6 | ||
|
|
73cfa64ebb | ||
|
|
ffe5d5f6cb | ||
|
|
aff4450b42 | ||
|
|
d40580c550 | ||
|
|
8e19b81eb9 | ||
|
|
d5191696e1 | ||
|
|
1d01466181 | ||
|
|
1cead0e2b8 | ||
|
|
aff4d426b8 | ||
|
|
4597cdeda8 | ||
|
|
2e7f0bf51d | ||
|
|
fa551b84f6 | ||
|
|
ce105212ab | ||
|
|
31d4b62181 | ||
|
|
7ec542a211 | ||
|
|
e615d1c618 | ||
|
|
ce349d0fcd | ||
|
|
c86813b1cb | ||
|
|
1fe651aaa7 | ||
|
|
ba7809236b | ||
|
|
84814b3c59 | ||
|
|
73ca6e6671 | ||
|
|
a26759f340 | ||
|
|
200ef12b4a | ||
|
|
990fac9a0a | ||
|
|
31ec4cdecb | ||
|
|
1d968bd902 | ||
|
|
69a632cfc2 | ||
|
|
9a784f1222 | ||
|
|
4a390696d5 | ||
|
|
68aaccadab | ||
|
|
3940228b59 | ||
|
|
f8abe48c82 | ||
|
|
86db81e5b7 | ||
|
|
34676f016f | ||
|
|
4448891315 | ||
|
|
fc1f12b77c | ||
|
|
a50057f5d2 | ||
|
|
d7b32e475e | ||
|
|
e32aaccaac | ||
|
|
8b695eec79 | ||
|
|
c85904c67e | ||
|
|
22a709a39e | ||
|
|
4f4a5de700 | ||
|
|
08ecbb2ca6 | ||
|
|
048b494874 | ||
|
|
1539d7233b | ||
|
|
214dbdf359 | ||
|
|
473ce60340 | ||
|
|
74ba8c6bd2 | ||
|
|
11a1023e79 | ||
|
|
3302401a36 | ||
|
|
3c5f07ac79 | ||
|
|
c0c1383254 | ||
|
|
ec4a4d1c86 | ||
|
|
5ef330f479 | ||
|
|
bbdbadd630 | ||
|
|
80a1483617 | ||
|
|
13a7d27046 | ||
|
|
8800c02403 | ||
|
|
dd9ec48979 | ||
|
|
262d703608 | ||
|
|
5629e1dfc2 | ||
|
|
7001aa58ce | ||
|
|
d87898b59e | ||
|
|
d1078adad2 | ||
|
|
e4f0fae7e5 | ||
|
|
4b06706d61 | ||
|
|
7e1331bd76 | ||
|
|
f735f25fb0 | ||
|
|
750c089ab0 | ||
|
|
3088f33837 | ||
|
|
1d598d2585 | ||
|
|
768c51f01c | ||
|
|
a2e2b32fc3 | ||
|
|
a6abf73669 | ||
|
|
a6e62ec74d | ||
|
|
93441a5754 | ||
|
|
fe57686715 | ||
|
|
330f5aebdf | ||
|
|
02c17e59dd | ||
|
|
be8af12a90 | ||
|
|
238193f56b | ||
|
|
54233085a4 | ||
|
|
2241b938c9 | ||
|
|
631d036c26 | ||
|
|
d70f795dea | ||
|
|
0be99d3e79 | ||
|
|
45aab49be7 | ||
|
|
2c66238791 | ||
|
|
bec1ddae67 | ||
|
|
913d3b263d | ||
|
|
614e20a183 | ||
|
|
f9f270980d | ||
|
|
763b878ca1 | ||
|
|
d3d040adee | ||
|
|
31f5cc10cf | ||
|
|
38c9a3d9c6 | ||
|
|
362f2d5750 | ||
|
|
463b6a1322 | ||
|
|
00a95ac468 | ||
|
|
966f30e356 | ||
|
|
f0217f53c2 | ||
|
|
ced1c4dcc8 | ||
|
|
e1578436d0 | ||
|
|
701df72db6 | ||
|
|
c4ebef1f1e | ||
|
|
6f0eb7a2f2 | ||
|
|
be6c3ca2df | ||
|
|
18b49686f1 | ||
|
|
02d4611501 | ||
|
|
2fe8117e80 | ||
|
|
457ea402d5 | ||
|
|
89623eb8b4 | ||
|
|
df02382387 | ||
|
|
7470d62b7c | ||
|
|
9eb9018f47 | ||
|
|
d7bcbe666c | ||
|
|
aaa5b4ba26 | ||
|
|
720dad1ed6 | ||
|
|
6417db6d91 | ||
|
|
ec681e99ca | ||
|
|
47ef203643 | ||
|
|
844aa2f36a | ||
|
|
e2e8f10948 | ||
|
|
1c49e2297a | ||
|
|
6f031e3c33 | ||
|
|
f74fd52d53 | ||
|
|
2d4cef670b | ||
|
|
dfaf455624 | ||
|
|
5d2e09de36 | ||
|
|
c86de50032 | ||
|
|
5ff720f432 | ||
|
|
6f7e47324c | ||
|
|
b68f81779c | ||
|
|
4c1b433269 | ||
|
|
7c63da18ed | ||
|
|
6f2e5ecc3b | ||
|
|
759cf33f08 | ||
|
|
77279d21ef | ||
|
|
46872fdfe8 | ||
|
|
79fe9c2875 | ||
|
|
f04ea37ac2 | ||
|
|
d2db92f1e7 | ||
|
|
206433e430 | ||
|
|
fb1f3fa931 | ||
|
|
3d106ae2f1 | ||
|
|
05f0a6463b | ||
|
|
7b5d5d0f31 | ||
|
|
20174989a6 | ||
|
|
80d48adc07 | ||
|
|
3454185df4 | ||
|
|
9de0868c74 | ||
|
|
66cb6c7dee | ||
|
|
1ce67b1c8f | ||
|
|
a9bb5b2f42 | ||
|
|
97ca7fd2a0 | ||
|
|
b85e291d40 | ||
|
|
b3e3752789 | ||
|
|
7cd6928b87 | ||
|
|
bb1b3c7b7b | ||
|
|
49c7cea3a5 | ||
|
|
64f5009297 | ||
|
|
0ab701bab6 | ||
|
|
1721415799 | ||
|
|
26269459db | ||
|
|
675da6b2e2 | ||
|
|
517bfca259 | ||
|
|
3e30685eb4 | ||
|
|
95cbba4618 | ||
|
|
d89c6b9c06 | ||
|
|
4bda994d5c | ||
|
|
2b4f6f33af | ||
|
|
62500a322f | ||
|
|
ae58a8b9df | ||
|
|
2a8732fdcd | ||
|
|
19931ec18e | ||
|
|
b981fc4b7d | ||
|
|
4b2f268921 | ||
|
|
7fb5a8d444 | ||
|
|
913cc16371 | ||
|
|
4e8a9ff8ed | ||
|
|
68034de1a7 | ||
|
|
f67d8615ca | ||
|
|
4483c921ea | ||
|
|
e8732ecfc0 | ||
|
|
71a538651a | ||
|
|
18c9963124 | ||
|
|
cd0f2f4e33 | ||
|
|
fc028ec0be | ||
|
|
2dbdb9f7eb | ||
|
|
50f6e76e81 | ||
|
|
c6af93adcb | ||
|
|
bd985781b9 | ||
|
|
70ecdaf54c | ||
|
|
a04287b9b3 | ||
|
|
be8d00f0c8 | ||
|
|
b08797c400 | ||
|
|
2836edd32d | ||
|
|
92f6886217 | ||
|
|
0c9518dc74 | ||
|
|
944ee7c7dc | ||
|
|
917dbf09f6 | ||
|
|
d732be4e17 | ||
|
|
18dbbb291a | ||
|
|
3bb7922f2c | ||
|
|
4aedba3b2b | ||
|
|
99c0e99b26 | ||
|
|
28ab554cb3 | ||
|
|
cd80a47c93 | ||
|
|
eb05b54b0e | ||
|
|
bbbce6f694 | ||
|
|
ba0d515330 | ||
|
|
69154c0384 | ||
|
|
66ac5e9d2f | ||
|
|
4924b951cc | ||
|
|
96f7def396 | ||
|
|
4556f1c949 | ||
|
|
a4cca3bcc2 | ||
|
|
6254c2089f | ||
|
|
89f50769b6 | ||
|
|
a24f5e31b9 | ||
|
|
b338f183e1 | ||
|
|
8ab8e0524b | ||
|
|
affb48f44d | ||
|
|
d5b2336b69 | ||
|
|
580e3a6a2c | ||
|
|
e3d5203f1a | ||
|
|
9e42b11272 | ||
|
|
ce93c3b739 | ||
|
|
6a8e00bfa2 | ||
|
|
0b5a99860f | ||
|
|
3f012a2ef1 | ||
|
|
a102e4ae1e | ||
|
|
03f5817488 | ||
|
|
0f2edfdb4e | ||
|
|
d289134b15 | ||
|
|
7475c7cc71 | ||
|
|
7958eeeded | ||
|
|
f29f773555 | ||
|
|
a113205881 | ||
|
|
7830ccb017 | ||
|
|
6a205a5406 | ||
|
|
d91a42930d | ||
|
|
6f3df707f4 | ||
|
|
f388b11d0d | ||
|
|
66d12fef82 | ||
|
|
83c744041e | ||
|
|
dcac39a35f | ||
|
|
c4d3ba71b2 | ||
|
|
74c74593e2 | ||
|
|
62591bc360 | ||
|
|
1fca162fb2 | ||
|
|
82967435ea | ||
|
|
7738354be1 | ||
|
|
0d2166770e | ||
|
|
9d7de9ea4d | ||
|
|
5aa3ba25cc | ||
|
|
b330f902fd | ||
|
|
aa76dfba02 | ||
|
|
b3c2d87a9b | ||
|
|
cc1347adf8 | ||
|
|
df0a80b320 | ||
|
|
26f7557834 | ||
|
|
e6c2f29532 | ||
|
|
37cc16fe17 | ||
|
|
c7ac88836a | ||
|
|
536e048f1c | ||
|
|
4671848428 | ||
|
|
4449785e2c | ||
|
|
39deb9ee83 | ||
|
|
2266f4a75c | ||
|
|
06b680f603 | ||
|
|
ec6be7d1a5 | ||
|
|
37040bfc9e | ||
|
|
1f4f7ec0e5 | ||
|
|
a31571ab2c | ||
|
|
714ef2adb8 | ||
|
|
e447bbf03b | ||
|
|
3846b638fb | ||
|
|
6ae8a203d9 | ||
|
|
1dbd491738 | ||
|
|
e8693edb33 | ||
|
|
5cbad00cb5 | ||
|
|
c6e4deb0ca | ||
|
|
693fb84a3e | ||
|
|
b0a7d5d4a0 | ||
|
|
818acc0ff1 | ||
|
|
819fec6061 | ||
|
|
4ea8c98243 | ||
|
|
95317a7336 | ||
|
|
9b6abfbbc3 | ||
|
|
4bee3023d2 | ||
|
|
45f12db8d3 | ||
|
|
9956b3fed3 | ||
|
|
374e837aa9 | ||
|
|
6ffd3e574f | ||
|
|
8a3706f6cb | ||
|
|
faa16ad910 | ||
|
|
eb69e25622 | ||
|
|
b006bb0c3c | ||
|
|
02ed50b336 | ||
|
|
f0023bc084 | ||
|
|
6502f7760d | ||
|
|
7606691ea3 | ||
|
|
257a1e9474 | ||
|
|
9f02ccbb48 | ||
|
|
a18199e9a2 | ||
|
|
cdd6f998c4 | ||
|
|
df21b6fc6f | ||
|
|
edf7dee78e | ||
|
|
f723e5ea59 | ||
|
|
748243f512 | ||
|
|
e7d37402d7 | ||
|
|
7c101ae3af | ||
|
|
cf9cdd8b3b | ||
|
|
b18783c17a | ||
|
|
201d06d878 | ||
|
|
742ef7d529 | ||
|
|
3d73fc10cd | ||
|
|
075c1b06f7 | ||
|
|
2706a3d379 | ||
|
|
e476dce1d4 | ||
|
|
2f25657cfa | ||
|
|
1167545199 | ||
|
|
fcd1fae77e | ||
|
|
06db10561c | ||
|
|
ead9e8945e | ||
|
|
15d4f77d5d | ||
|
|
c903a64726 | ||
|
|
8fa63a8773 | ||
|
|
8a0e6c90b9 | ||
|
|
e4fdf33cfc | ||
|
|
548e38fca0 | ||
|
|
c804c806e1 | ||
|
|
7c291691aa | ||
|
|
cec8cf25ef | ||
|
|
5a2812ecf3 | ||
|
|
0f09ba717f | ||
|
|
1026abbbf4 | ||
|
|
5b578c86e8 | ||
|
|
d7e4a782c1 | ||
|
|
d65dfeceb0 | ||
|
|
e9a7a3a5f5 | ||
|
|
8504252142 | ||
|
|
19730ab6a4 | ||
|
|
44ae75110b | ||
|
|
4ab2a93d59 | ||
|
|
f82ea82403 | ||
|
|
fff6c004e0 | ||
|
|
75c7744e59 | ||
|
|
1e8bdba2dd | ||
|
|
2587831855 | ||
|
|
f00a283722 | ||
|
|
e3b333aca8 | ||
|
|
c9602c2b0a | ||
|
|
c660c80a15 | ||
|
|
6f889d1c3b | ||
|
|
80577832d7 | ||
|
|
7a18ef77cd | ||
|
|
e29f7cb1d3 | ||
|
|
8970274810 | ||
|
|
d57fd8bfd3 | ||
|
|
8507866891 | ||
|
|
425d53fbe3 | ||
|
|
b0cb983830 | ||
|
|
02515d8956 | ||
|
|
447b4337dd | ||
|
|
633daf124e | ||
|
|
446560931b | ||
|
|
9fe11a7ad5 | ||
|
|
b099994ac5 | ||
|
|
a8d56ef4e6 | ||
|
|
1f8d212dee | ||
|
|
64ea87f4cc | ||
|
|
e6fef433d5 | ||
|
|
2f212031b3 | ||
|
|
586ab710f6 | ||
|
|
d263ae649e | ||
|
|
c81ca45e41 | ||
|
|
9ce50fa305 | ||
|
|
f0240deaeb | ||
|
|
017f06dcfb | ||
|
|
54f17cb546 | ||
|
|
f174ab6ebc | ||
|
|
263f936690 | ||
|
|
bd903a0353 | ||
|
|
5040d3a6b6 | ||
|
|
3684da776d | ||
|
|
bc17c8e5b3 | ||
|
|
778c647782 | ||
|
|
2a91f6279b | ||
|
|
4ef2ddbfec | ||
|
|
ff06f0cc73 | ||
|
|
a37ab34fae | ||
|
|
cb2ffe66af | ||
|
|
16b0770d72 | ||
|
|
3fe44ee735 | ||
|
|
40d1a72300 | ||
|
|
4d428d42f6 | ||
|
|
7e9896263b | ||
|
|
cf0665c9b6 | ||
|
|
93c011c69d | ||
|
|
f50c0b9d06 | ||
|
|
6fc79d942b | ||
|
|
d01228d9ff | ||
|
|
b58d766d54 | ||
|
|
79cbb96a38 | ||
|
|
aabaeacb81 | ||
|
|
3ab3e6d41b | ||
|
|
f2f4afd0bb | ||
|
|
0d62c43b9e | ||
|
|
1614d5702c | ||
|
|
610b9542e9 | ||
|
|
946f32a274 | ||
|
|
c7a6bc015e | ||
|
|
19fd1635e6 | ||
|
|
74b034a195 | ||
|
|
581139d099 | ||
|
|
e5492ea906 | ||
|
|
623133a0dc | ||
|
|
6baa8f2dbb | ||
|
|
d2739d7218 | ||
|
|
5702101935 | ||
|
|
35d45a7523 | ||
|
|
e37c1f0e8c | ||
|
|
ac0d35ef12 | ||
|
|
15e63381a9 | ||
|
|
aa49ddacd5 | ||
|
|
f68e876bcb | ||
|
|
6b82ded399 | ||
|
|
000e67a09e | ||
|
|
1b6aa4c3d1 | ||
|
|
8912a2c842 | ||
|
|
4de50db68c | ||
|
|
6b95e4aac9 | ||
|
|
c27658822e | ||
|
|
8ec980c1e8 | ||
|
|
a952c5829a | ||
|
|
20e1b55a8a | ||
|
|
a2605868db | ||
|
|
67be35b9f8 | ||
|
|
b15eb1e62f | ||
|
|
d2e3ec0448 | ||
|
|
828c403fe5 | ||
|
|
53d3bc86ea | ||
|
|
6ed8742cc1 | ||
|
|
7bd047f6e6 | ||
|
|
482757b1cc | ||
|
|
c143f832c6 | ||
|
|
67a173ef53 | ||
|
|
c2c37488a3 | ||
|
|
8c1840b9cf | ||
|
|
1088e37cd4 | ||
|
|
4d6c3dac3d | ||
|
|
adf29873ef | ||
|
|
772afe29ea | ||
|
|
9c78953800 | ||
|
|
ff67b9bcbc | ||
|
|
103de4f910 | ||
|
|
7c3f06f98f | ||
|
|
6ac77a7662 | ||
|
|
610b85d01a | ||
|
|
d4d222ebd3 | ||
|
|
5cbed1d34b | ||
|
|
ba4a2eef5c | ||
|
|
acdf03fc84 | ||
|
|
a6f19e07c4 | ||
|
|
f07301bb1e | ||
|
|
2116e3741b | ||
|
|
1f11c732ed | ||
|
|
e42bee27a4 | ||
|
|
b36dcf1325 | ||
|
|
421746c943 | ||
|
|
f544ac58e6 | ||
|
|
6047275cfa | ||
|
|
630d832f50 | ||
|
|
e0a34465d8 | ||
|
|
443a4049c3 | ||
|
|
54980e7585 | ||
|
|
14ff8bb26b | ||
|
|
615bb0ee3f | ||
|
|
986fd8c13b | ||
|
|
ec1cc27815 | ||
|
|
3874e2d886 | ||
|
|
1afcf21529 | ||
|
|
4c0f3bd7cb | ||
|
|
9aafa2a662 | ||
|
|
029ba1202e | ||
|
|
b5043b2b87 | ||
|
|
52ce80fd97 | ||
|
|
cd19c5eb38 | ||
|
|
0d101d779f | ||
|
|
1ff6f43eac | ||
|
|
98d892f643 | ||
|
|
cc80afff7d | ||
|
|
91ad74e3ad | ||
|
|
b128d25fbe | ||
|
|
8b23769ccc | ||
|
|
13f84ab518 | ||
|
|
feadc1ff9e | ||
|
|
f75c3a123e | ||
|
|
12dfe49d9b | ||
|
|
545618964d | ||
|
|
a6f3f21b70 | ||
|
|
e6135f49fb | ||
|
|
cd3a1c869e | ||
|
|
8bb21b12aa | ||
|
|
f500791ba3 | ||
|
|
4ebc4e9546 | ||
|
|
94ee2e55fd | ||
|
|
e3c370eb6b | ||
|
|
6fea5af585 | ||
|
|
e9e149d55e | ||
|
|
bb5d98164f | ||
|
|
8941f41d1c | ||
|
|
d45e17b603 | ||
|
|
c2b3e6b36e | ||
|
|
b8405c01f1 | ||
|
|
3d191da07e | ||
|
|
aeb61993a4 | ||
|
|
3679e1da3a | ||
|
|
52aefd23f0 | ||
|
|
76a2b84925 | ||
|
|
a89b2c7ed1 | ||
|
|
5dd4eb2d20 | ||
|
|
600661a570 | ||
|
|
92f6453d26 | ||
|
|
8bf3aa9b4d | ||
|
|
c52db1945b | ||
|
|
09a10cd791 | ||
|
|
07fd577894 | ||
|
|
ed900b8531 | ||
|
|
fa010357b3 | ||
|
|
da6ffc85ef | ||
|
|
b7c23087e1 | ||
|
|
656f482cad | ||
|
|
5e03003b94 | ||
|
|
48b5b27d42 | ||
|
|
fccb815d5a | ||
|
|
544d3b026a | ||
|
|
15ff882919 | ||
|
|
18d405bdfb | ||
|
|
4379e7c544 | ||
|
|
51e2be9b7b | ||
|
|
f2b21d04b3 | ||
|
|
a73f35af22 | ||
|
|
7b3ef03924 | ||
|
|
a4d03c1514 | ||
|
|
eccdee0081 | ||
|
|
48f3390d71 | ||
|
|
df6f1e6c8f | ||
|
|
3c95081aee | ||
|
|
329a980510 | ||
|
|
d8605e9ce3 | ||
|
|
7dcc6dc114 | ||
|
|
64db52fd17 | ||
|
|
c0957024ec | ||
|
|
649571a2eb | ||
|
|
60adb0d50b | ||
|
|
f751d7c24e | ||
|
|
5ec5ade62f | ||
|
|
788c497cbb | ||
|
|
f6c274b82f | ||
|
|
5a6b4a6fdd | ||
|
|
ef212b8c0f | ||
|
|
aa2f46fd00 | ||
|
|
a30808e6b7 | ||
|
|
f23c55dfec | ||
|
|
583d3188ca | ||
|
|
ae81f64d07 | ||
|
|
8dca2e346c | ||
|
|
b995986318 | ||
|
|
0579b6dcd3 | ||
|
|
4d147c7ff3 | ||
|
|
baf5f088dc | ||
|
|
2adaacb922 | ||
|
|
bc6870f4ee | ||
|
|
c6abaf22c1 | ||
|
|
e04e066177 | ||
|
|
6ad01f4994 | ||
|
|
f6ad75e214 | ||
|
|
a76864450e | ||
|
|
3fe9994322 | ||
|
|
3bcfcc40c0 | ||
|
|
92b54f949b | ||
|
|
a73746fe8b | ||
|
|
da1fddffe1 | ||
|
|
e3b0feb967 | ||
|
|
4e6811cfdc | ||
|
|
cc47e46e1f | ||
|
|
4246d99b93 | ||
|
|
ba38e3c1aa | ||
|
|
83aa64928d | ||
|
|
5fbff7211b | ||
|
|
eb67f19e3e | ||
|
|
2130a31dfd | ||
|
|
f3ce208ec1 | ||
|
|
146478eb5e | ||
|
|
05413d5a99 | ||
|
|
eac726fcb8 | ||
|
|
b25af85234 | ||
|
|
02167a0788 | ||
|
|
54cce9aa41 | ||
|
|
73cdc7136c | ||
|
|
1567a2b847 | ||
|
|
9fe795f8dd | ||
|
|
0d6cfd183d | ||
|
|
bba36d041b | ||
|
|
710716f658 | ||
|
|
b39798ac24 | ||
|
|
1f8fbb8518 | ||
|
|
51dc666181 | ||
|
|
2a6e716e07 | ||
|
|
01d68f30e4 | ||
|
|
1b73d01de8 | ||
|
|
a421cb0b01 | ||
|
|
2177336d65 | ||
|
|
059a8cc38f | ||
|
|
4c33cd6409 | ||
|
|
ea48d52447 | ||
|
|
85f4be750a | ||
|
|
0ba37a347b | ||
|
|
6ee1900331 | ||
|
|
44bf1ef322 | ||
|
|
863691c313 | ||
|
|
97d7cbf657 | ||
|
|
3089535de6 | ||
|
|
36818093c6 | ||
|
|
e5857df439 | ||
|
|
42d25dc1a5 | ||
|
|
3b5e78bfba | ||
|
|
639dce7c53 | ||
|
|
882f54647c | ||
|
|
38443048b8 | ||
|
|
621c3dbeca | ||
|
|
f1e4f7ecda | ||
|
|
249d1b6790 | ||
|
|
894e0fd03a | ||
|
|
ec1f009914 | ||
|
|
697417b906 | ||
|
|
dadf57c184 | ||
|
|
7caa83be19 | ||
|
|
e745d38b1e | ||
|
|
6d389315bf | ||
|
|
024d56505a | ||
|
|
daec97ad66 | ||
|
|
a98daead1d | ||
|
|
2c5cf77cf2 | ||
|
|
a6b9a82e9c | ||
|
|
02cf9d1cd2 | ||
|
|
cde814b216 | ||
|
|
5f435cd8c7 | ||
|
|
6ccd98ca01 | ||
|
|
799f2a81a7 | ||
|
|
eb9fa6f567 | ||
|
|
9ebd595202 | ||
|
|
b50d301f44 | ||
|
|
b01b8908ea | ||
|
|
78c2cdddc4 | ||
|
|
1eaac74fb0 | ||
|
|
ee759a5459 | ||
|
|
e9d19805d7 | ||
|
|
1f74ba43f0 | ||
|
|
bc1e686455 | ||
|
|
5cc0552c57 | ||
|
|
6c06bc6af8 | ||
|
|
2193c131a8 | ||
|
|
9a38626af5 | ||
|
|
f0c243f6d1 | ||
|
|
f0441f1a08 | ||
|
|
8a9d9f9fce | ||
|
|
db06c496cf | ||
|
|
2aa97e6565 | ||
|
|
68597cac22 | ||
|
|
afa543ec79 | ||
|
|
d1df6e910b | ||
|
|
74ae567ced | ||
|
|
8d657c5b18 | ||
|
|
802bdc102f | ||
|
|
218d18793d | ||
|
|
723c29e33b | ||
|
|
2e248c6658 | ||
|
|
7fbd66d54c | ||
|
|
4bede063ae | ||
|
|
cbc5fec119 | ||
|
|
81927b088b | ||
|
|
5556edd83b | ||
|
|
2834532b5f | ||
|
|
17638bc29f | ||
|
|
67b48cc417 | ||
|
|
451996016a | ||
|
|
52b9a9223d | ||
|
|
d5b80b0bbd | ||
|
|
ae14e49338 | ||
|
|
c23bce9829 | ||
|
|
40a549ca29 | ||
|
|
cac435a2a5 | ||
|
|
b81f50402a | ||
|
|
44587cb947 | ||
|
|
54314273a0 | ||
|
|
de068dc6ff | ||
|
|
64f537ad1e | ||
|
|
312c89f884 | ||
|
|
d9fd7eb3a5 | ||
|
|
af9206f350 | ||
|
|
7c99bb084e | ||
|
|
1a2757b00a | ||
|
|
1e7a2110b1 | ||
|
|
243146fe49 | ||
|
|
370d139dfc | ||
|
|
c4e7db34a4 | ||
|
|
a4f6b72157 | ||
|
|
de3ca6dba5 | ||
|
|
bdfcfdd0fe | ||
|
|
dbf357ce66 | ||
|
|
e950cf7fc3 | ||
|
|
8dfad1c910 | ||
|
|
107d4e973c | ||
|
|
e33766a4fa | ||
|
|
6a550c6c4a | ||
|
|
a0fc2a8ce7 | ||
|
|
ab257b3468 | ||
|
|
e6bdb28484 | ||
|
|
c52446f3b0 | ||
|
|
9cadfb26d9 | ||
|
|
7d5ea8f908 | ||
|
|
161b33370e | ||
|
|
8dd7a90b34 | ||
|
|
7ff865a36f | ||
|
|
d0b8ee606a | ||
|
|
c6c3b16fd2 | ||
|
|
64a6cbb2e4 | ||
|
|
e1cf532437 | ||
|
|
67f2127710 | ||
|
|
9111b424a1 | ||
|
|
772b51216f | ||
|
|
a79a2f5ecb | ||
|
|
585c0d64ed | ||
|
|
7ddb95a417 | ||
|
|
02648eb54e | ||
|
|
54a1050fbb | ||
|
|
f997b2d2f0 | ||
|
|
8f61e57b57 | ||
|
|
cfcff6f2d7 | ||
|
|
44d7cc0588 | ||
|
|
c91275d091 | ||
|
|
69c88919c0 | ||
|
|
e0e6f55868 | ||
|
|
7698584ee0 | ||
|
|
d034722ba9 | ||
|
|
e1e07c95ba | ||
|
|
4e79c68a7d | ||
|
|
d80325ec8f | ||
|
|
e9925785ab | ||
|
|
81efda2d11 | ||
|
|
36eef80192 | ||
|
|
306bf26f66 | ||
|
|
e07fb7f121 | ||
|
|
bc86cfcb1f | ||
|
|
63bb7e31cd | ||
|
|
1840d50fc0 | ||
|
|
c6fd4e4bc4 | ||
|
|
46210203f7 | ||
|
|
5a2d000ddd | ||
|
|
c73c26e5cb | ||
|
|
39c3e4fd13 | ||
|
|
011d83b7d9 | ||
|
|
26f1b75976 | ||
|
|
309a90d3a6 | ||
|
|
946e1e977e | ||
|
|
7f1347f15d | ||
|
|
b81c32b1c9 | ||
|
|
2e498f644b | ||
|
|
ee0272e036 | ||
|
|
4aa87c1758 | ||
|
|
3b1158b82f | ||
|
|
1aee98bebd | ||
|
|
b5a6433950 | ||
|
|
077264fd54 | ||
|
|
bee653cf80 | ||
|
|
e1363aadaa | ||
|
|
43877ca712 | ||
|
|
f7cc54ad38 | ||
|
|
538f318fac | ||
|
|
f0376fa7a2 | ||
|
|
0d2bccc15e | ||
|
|
842b89c36d | ||
|
|
1d74c67bd4 | ||
|
|
ea0dd04bd9 | ||
|
|
a5dbab096b | ||
|
|
f1f555d5ab | ||
|
|
5b60a929ab | ||
|
|
f4404dcbe0 | ||
|
|
dd81e02d94 | ||
|
|
f4643aeefd | ||
|
|
e563ffb673 | ||
|
|
4cceec82ac | ||
|
|
4b868e2078 | ||
|
|
875544a449 | ||
|
|
a2f4c972a6 | ||
|
|
2b0a6e5d06 | ||
|
|
5f7e645ed6 | ||
|
|
59c90c01f9 | ||
|
|
92063ab61b | ||
|
|
003ec5aa5b | ||
|
|
02bf43b468 | ||
|
|
50e1285839 | ||
|
|
3fb6574322 | ||
|
|
fa2501d5e4 | ||
|
|
0fe58fd160 | ||
|
|
01f3042f48 | ||
|
|
6719dd2b9e | ||
|
|
08c058b214 | ||
|
|
e4502d4f64 | ||
|
|
db928a0fca | ||
|
|
5582f37a18 | ||
|
|
a28e152a37 | ||
|
|
d6dea6f426 | ||
|
|
d29f9fdd0d | ||
|
|
a2a80df5df | ||
|
|
48ce3a972f | ||
|
|
9fae250897 | ||
|
|
4dd703dcb2 | ||
|
|
e46b5b2edf | ||
|
|
7febcf2170 | ||
|
|
012ed4cf1d | ||
|
|
18283c4d1a | ||
|
|
2bb46b1cdf | ||
|
|
113263a4a1 | ||
|
|
a6ca44cde6 | ||
|
|
894be60a75 | ||
|
|
244a1bec24 | ||
|
|
51d78ba20b | ||
|
|
8291025dfa | ||
|
|
6ea1d4ca58 | ||
|
|
771bf10951 | ||
|
|
67a3270324 | ||
|
|
cd859d6725 | ||
|
|
092b4afe4a | ||
|
|
f8d0ffe7ba | ||
|
|
10f47a701f | ||
|
|
d3224ed266 | ||
|
|
2ccb5391bb | ||
|
|
5c0c9799a4 | ||
|
|
5ccbb5b056 | ||
|
|
fc04455e93 | ||
|
|
4ae8f461cb | ||
|
|
17539e5b88 | ||
|
|
e53b9c71da | ||
|
|
9275f852d6 | ||
|
|
dd8f46880f | ||
|
|
e9159a08bd | ||
|
|
cf89891e4f | ||
|
|
1cc8824f84 | ||
|
|
b73c526c57 | ||
|
|
add577c46f | ||
|
|
9ddd65ea71 | ||
|
|
b15afa9231 | ||
|
|
f8dfde2784 | ||
|
|
6e0898a31e | ||
|
|
8b98dafba2 | ||
|
|
a123437d03 | ||
|
|
616c871da7 | ||
|
|
925c9725b3 | ||
|
|
1a173a7c72 | ||
|
|
a959da46db | ||
|
|
a9c70d086c | ||
|
|
48bacb2811 | ||
|
|
6b846fcdff | ||
|
|
fdc97fecaf | ||
|
|
86983d58f5 | ||
|
|
58f7edb0bc | ||
|
|
302bbeceb0 | ||
|
|
cd9e16398c | ||
|
|
1e1ea8db34 | ||
|
|
7ac3ea1fcf | ||
|
|
3f661d0322 | ||
|
|
8dad079df5 | ||
|
|
1727e50489 | ||
|
|
1ab9688f58 | ||
|
|
613b1b8524 | ||
|
|
ae5edc9ebf | ||
|
|
d0c15b5da2 | ||
|
|
ccbd15c922 | ||
|
|
7b9673e4e2 | ||
|
|
7fbcbbacdf | ||
|
|
d1f48b0685 | ||
|
|
9ee6b91f61 | ||
|
|
e6c89c0564 | ||
|
|
8b97088c70 | ||
|
|
e5809c06c7 | ||
|
|
23b69d4e9e | ||
|
|
0f468033fb | ||
|
|
468074cda8 | ||
|
|
7acbe0c62e | ||
|
|
2c1a70280a | ||
|
|
d2fa5efafe | ||
|
|
a437bc5d07 | ||
|
|
2447bb12c8 | ||
|
|
1082d5e8e1 | ||
|
|
3b1ac9a2d0 | ||
|
|
4635405fb5 | ||
|
|
c481875e55 | ||
|
|
62f50f9458 | ||
|
|
c86252665c | ||
|
|
d141863ffb | ||
|
|
e99b9678e4 | ||
|
|
e0a034748d | ||
|
|
c3377431cc | ||
|
|
2fb70009cc | ||
|
|
289ddffbe2 | ||
|
|
54738bbea2 | ||
|
|
5c6eb352d6 | ||
|
|
f657399ef8 | ||
|
|
be0f72ca25 | ||
|
|
31598d8334 | ||
|
|
5e64463a8c | ||
|
|
27ffb64eb4 | ||
|
|
c4ffe10e12 | ||
|
|
efcad6d2be | ||
|
|
c7dc7bdb3d | ||
|
|
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 | ||
|
|
6cf527403e | ||
|
|
d738f6f43f | ||
|
|
92843b4972 | ||
|
|
ae000e75bc | ||
|
|
e017438605 | ||
|
|
bcd29f1dcc | ||
|
|
b2df16dcb0 | ||
|
|
9903780792 | ||
|
|
8bb15f5447 | ||
|
|
2977f0b8c6 | ||
|
|
251423116f | ||
|
|
5a66d09266 | ||
|
|
04e2a71b66 | ||
|
|
e3f89b6c17 | ||
|
|
9d8587aa40 | ||
|
|
a06fec51c8 | ||
|
|
4b4d839074 | ||
|
|
83eda81263 | ||
|
|
1bb476ca95 | ||
|
|
1c65b3e453 | ||
|
|
70a4ca6533 | ||
|
|
073647cf79 | ||
|
|
f0ac455ec1 | ||
|
|
44b2fc6944 | ||
|
|
113e6453ea | ||
|
|
283d814dc6 | ||
|
|
034dc25483 | ||
|
|
b1333b2c4c | ||
|
|
ff58ff72f9 | ||
|
|
90da74b211 | ||
|
|
fbe88f7b99 | ||
|
|
05276999ad | ||
|
|
00b4dbc821 | ||
|
|
35076bbdb6 | ||
|
|
2dc98804f4 | ||
|
|
961600fe74 | ||
|
|
7fdca76a4c | ||
|
|
32592f6ad1 | ||
|
|
1545e98e6d | ||
|
|
a1c473fb0e | ||
|
|
85b3feb10b | ||
|
|
721b4de55e | ||
|
|
d9fdd20caa | ||
|
|
9e2d001ac5 | ||
|
|
750f9b6142 | ||
|
|
1c3cf8cf2d | ||
|
|
f1b9ce714b | ||
|
|
db19cb40d7 | ||
|
|
2b0a426135 | ||
|
|
369a020d81 | ||
|
|
037fa76fff | ||
|
|
caa2ece751 | ||
|
|
22f2975f3c | ||
|
|
d3323d824a | ||
|
|
41d1ea8f61 | ||
|
|
b1b5cd169a | ||
|
|
1e85b1e7fb | ||
|
|
75464708af | ||
|
|
f007451442 | ||
|
|
f591270d46 | ||
|
|
390423d0c1 | ||
|
|
5061620f46 | ||
|
|
23ee5d538c | ||
|
|
1aed8c7429 | ||
|
|
fa0576362d | ||
|
|
0aee56114b | ||
|
|
b3ec7423e8 | ||
|
|
179cd4cf45 | ||
|
|
75d26c3cce | ||
|
|
40d868581b | ||
|
|
9071664ef2 | ||
|
|
1980f9c42c | ||
|
|
2c917dcd7c | ||
|
|
5ccf15b9ed | ||
|
|
f8a6bd7ad4 | ||
|
|
635a63deba | ||
|
|
8731450cda | ||
|
|
1eb5392aef | ||
|
|
f58a76426a | ||
|
|
2e6623c9e7 | ||
|
|
7eaac87640 | ||
|
|
5b9f08c754 | ||
|
|
02c165163a | ||
|
|
4bbc0f1d4f | ||
|
|
cf692797b6 | ||
|
|
0e4ec055b2 | ||
|
|
cf7c25cd88 | ||
|
|
60b5eb00a3 | ||
|
|
0705b4da72 | ||
|
|
09b3e685a9 | ||
|
|
64791eec82 | ||
|
|
dc3aa354ec | ||
|
|
890784ba5a | ||
|
|
c9468bef8a | ||
|
|
0b4c017f22 | ||
|
|
6de558773f | ||
|
|
2fdb85f3fb | ||
|
|
94258abf43 | ||
|
|
10026ba191 | ||
|
|
0a6f760100 | ||
|
|
8db40d368c | ||
|
|
96a3eea108 | ||
|
|
47b20f03f9 | ||
|
|
bdcd8c1e20 | ||
|
|
eaff83251c | ||
|
|
1cdd1a1b74 | ||
|
|
21938e4b3f | ||
|
|
95710d9e5e | ||
|
|
8a3252473f | ||
|
|
c52c8922dc | ||
|
|
80dcd57d91 | ||
|
|
37590b44d7 | ||
|
|
051f8ab3a6 | ||
|
|
78dcb0f7f3 | ||
|
|
6bb0d7ab08 | ||
|
|
c7afbf0803 | ||
|
|
bbea17b81b | ||
|
|
769d34d746 | ||
|
|
64020568d6 | ||
|
|
b7df2fb5f5 | ||
|
|
ddc6da5894 | ||
|
|
6502ee5071 | ||
|
|
22a13c7c9c | ||
|
|
a29f80f90b | ||
|
|
0ccd4b8afa | ||
|
|
48433a05fb | ||
|
|
c6a455a059 | ||
|
|
3e3df799e6 | ||
|
|
912f2de1ee | ||
|
|
1ad8a67caf | ||
|
|
a0588cd312 | ||
|
|
40f0c0f322 | ||
|
|
52626b1874 | ||
|
|
1cfceb4d07 | ||
|
|
fd56ab7932 | ||
|
|
4fd28f9577 | ||
|
|
fd6d9654bc | ||
|
|
31f391294c | ||
|
|
9dd4e733eb | ||
|
|
e4f6893324 | ||
|
|
3c841aa2a9 | ||
|
|
85b4fc3751 | ||
|
|
197a0abb7e | ||
|
|
1df0e6d6dd | ||
|
|
36407d2abe | ||
|
|
2ffdfcad24 | ||
|
|
0e1dc4bd45 | ||
|
|
2853f54ac7 | ||
|
|
76efd45e2d | ||
|
|
7c5e0826c6 | ||
|
|
7c77c9597e | ||
|
|
312d95a376 | ||
|
|
dc1b4f79e4 | ||
|
|
44da2dca65 | ||
|
|
9657bc50a3 | ||
|
|
affd7dfb87 | ||
|
|
dc59ecb4eb | ||
|
|
f95e3d10e7 | ||
|
|
a664a05201 | ||
|
|
7b3e858aa3 | ||
|
|
1d032abb72 | ||
|
|
61a5fec3cb | ||
|
|
4e6022e529 | ||
|
|
9216964b02 | ||
|
|
a87a694e3c | ||
|
|
8736d2cdb6 | ||
|
|
fc633f2547 | ||
|
|
82abc90133 | ||
|
|
f8f596ad30 | ||
|
|
c13f9c00aa | ||
|
|
0ff9b95577 | ||
|
|
ab28c63273 | ||
|
|
cbe6e47233 | ||
|
|
dc3a598594 | ||
|
|
6738bb0ae1 | ||
|
|
1286fc28ca | ||
|
|
6104fdf2e0 | ||
|
|
f42f3804a1 | ||
|
|
10226fc61a | ||
|
|
ba2ce8b8db | ||
|
|
dccdeda18a | ||
|
|
a23c76f6fb | ||
|
|
0245b6e81b | ||
|
|
35728f54cd | ||
|
|
fc7af85c83 | ||
|
|
c87f5ba6eb | ||
|
|
a574364100 | ||
|
|
88e10ffb31 | ||
|
|
2895de3ef5 | ||
|
|
5346f808f9 | ||
|
|
36e6613f6a | ||
|
|
0090799f7f | ||
|
|
c64b938e40 | ||
|
|
08721ea458 | ||
|
|
fa7e8af014 | ||
|
|
7d01b7649a | ||
|
|
9275432aea | ||
|
|
df5738dd34 | ||
|
|
119cadae30 | ||
|
|
f6837ee4e5 | ||
|
|
ed752d953a | ||
|
|
34ea666007 | ||
|
|
0659f1e52b | ||
|
|
1f09bfa9d5 | ||
|
|
ebda537a11 | ||
|
|
ac115bc078 | ||
|
|
a84fea36fe | ||
|
|
e4c87f60e9 | ||
|
|
a21abef6bd | ||
|
|
6fe8d7aea0 | ||
|
|
2a34ecd563 | ||
|
|
2e2288cc0f | ||
|
|
1a44d36838 | ||
|
|
c53d71e2de | ||
|
|
e2674d2a68 | ||
|
|
e66cbae09f | ||
|
|
08dc55ea06 | ||
|
|
5c0c204859 | ||
|
|
85c32abdf0 | ||
|
|
b7353d2bba | ||
|
|
e9131897e4 | ||
|
|
fab0c5f8f8 | ||
|
|
77307a1664 | ||
|
|
40e944ee9d | ||
|
|
a9402d1073 | ||
|
|
9a15ac4bfa | ||
|
|
6a13085e77 | ||
|
|
14e862f1fb | ||
|
|
b4f49895c2 | ||
|
|
2d0dcb9dbe | ||
|
|
9b2b8bbc02 | ||
|
|
1ae66eb8c2 | ||
|
|
478c6e3bbc | ||
|
|
41b48bd41c | ||
|
|
709728e456 | ||
|
|
e1bf1cd786 | ||
|
|
8474f246ae | ||
|
|
beaa45d16d | ||
|
|
ffe13f4bea | ||
|
|
2559b29b30 | ||
|
|
7dfcdd1981 | ||
|
|
341f682274 | ||
|
|
5349ff3832 | ||
|
|
259a78ebaf | ||
|
|
090392a02e | ||
|
|
563d569ec4 | ||
|
|
0899a4e0c8 | ||
|
|
29e625b85f | ||
|
|
380c3eee81 | ||
|
|
21ef8017e8 | ||
|
|
eee8cb8341 | ||
|
|
9630f0f48a | ||
|
|
0f71b30096 | ||
|
|
2ec226c432 | ||
|
|
fa2cd1bc74 | ||
|
|
730af05aa1 | ||
|
|
4788f41593 | ||
|
|
84b0b8f6ad | ||
|
|
cf1514f8a4 | ||
|
|
47f0dfd3ae | ||
|
|
183c48696e | ||
|
|
2462f991be | ||
|
|
d373585e0c | ||
|
|
7f324dda91 | ||
|
|
c5739e8626 | ||
|
|
5362200d21 | ||
|
|
d7f9bf7adc | ||
|
|
52c37f28d0 | ||
|
|
bcfb57f89d | ||
|
|
16fac61a9d | ||
|
|
5203718f93 | ||
|
|
d3aee0dabb | ||
|
|
b6e8703038 | ||
|
|
153aa65b40 | ||
|
|
0701e8aa97 | ||
|
|
baed168458 | ||
|
|
6b45f97215 | ||
|
|
1fc1e3abb2 | ||
|
|
b825e0b9ea | ||
|
|
7aa45ebed9 | ||
|
|
c50fe5fa88 | ||
|
|
ba2fdfc46c | ||
|
|
815b496599 | ||
|
|
b2e79d4285 | ||
|
|
4c630f6c6a | ||
|
|
bf4ef05d00 | ||
|
|
e35fcb02df | ||
|
|
4fa2be3263 | ||
|
|
7c04cd96c6 | ||
|
|
a8bd46155c | ||
|
|
5f4d8b515f | ||
|
|
da4b90e373 | ||
|
|
7ec2f31a46 | ||
|
|
3217c61713 | ||
|
|
2a33599bde | ||
|
|
2994046c7b | ||
|
|
842e72c4c3 | ||
|
|
3b5ca4dafb | ||
|
|
b76ec9e611 | ||
|
|
7a1a2f2c43 | ||
|
|
4ffe5e72d8 | ||
|
|
0275fe441e | ||
|
|
44bf882a2a | ||
|
|
f9196203e7 | ||
|
|
275e334120 | ||
|
|
f97f920ffb | ||
|
|
7773c3fe27 | ||
|
|
19d5467f4d | ||
|
|
4c0e418bc1 | ||
|
|
fab4d39f92 | ||
|
|
91b291a1a9 | ||
|
|
be4a71685a | ||
|
|
8b862b7843 | ||
|
|
b0503cfeb4 | ||
|
|
ecb01ff9c3 | ||
|
|
40c816e0c5 | ||
|
|
6bbba2bff7 | ||
|
|
36fba5db3d | ||
|
|
744f351c4e | ||
|
|
b8664c44c7 | ||
|
|
e3276411f9 | ||
|
|
84989745b4 | ||
|
|
3121b4cf28 | ||
|
|
da6df47706 | ||
|
|
e5c0316ebb | ||
|
|
c0d8f22049 | ||
|
|
c2d8991283 | ||
|
|
a599736c1b | ||
|
|
5526022a57 | ||
|
|
25dd149475 | ||
|
|
e6b67101fa | ||
|
|
16c32cea4b | ||
|
|
9f44eb3154 | ||
|
|
c7b6a1a654 | ||
|
|
6bbcb8f8f2 | ||
|
|
163b194398 | ||
|
|
86e58dd8a7 | ||
|
|
e54ef787ed | ||
|
|
d5957a0dc5 | ||
|
|
bb79bd12a7 | ||
|
|
47795d0751 | ||
|
|
e234ad65ab | ||
|
|
1c3dd93ee3 | ||
|
|
ccf161e139 | ||
|
|
9636054ccc | ||
|
|
6e77dce573 | ||
|
|
e6a335a3f7 | ||
|
|
a442419db2 | ||
|
|
479e1acece | ||
|
|
a7878122ac | ||
|
|
fa32054085 | ||
|
|
f3de1ad63d | ||
|
|
8baac15d24 | ||
|
|
4cf1159019 | ||
|
|
ee065795b9 | ||
|
|
7f9d160658 | ||
|
|
daa220d513 | ||
|
|
d5797a3aea | ||
|
|
ab8545e2c2 | ||
|
|
5fc16954f5 | ||
|
|
6610e48cb3 | ||
|
|
dabfeeaf3b | ||
|
|
9601f57050 | ||
|
|
7c442dce85 | ||
|
|
07ea3ff1a6 | ||
|
|
874fd7d69f | ||
|
|
69a737e286 | ||
|
|
ddc49c9358 | ||
|
|
2b3c3b75bf | ||
|
|
296889cace | ||
|
|
4ebe8ed631 | ||
|
|
ecfa43f801 | ||
|
|
f5f39a37a1 | ||
|
|
0a75d89848 | ||
|
|
e418725c13 |
73
.clang-format
Normal file
73
.clang-format
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: WebKit
|
||||||
|
Language: Cpp
|
||||||
|
Standard: Cpp11
|
||||||
|
|
||||||
|
IndentWidth: 4
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
TabWidth: 8
|
||||||
|
UseTab: Never
|
||||||
|
SortIncludes: false
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
MaxEmptyLinesToKeep: 3
|
||||||
|
BreakBeforeBinaryOperators: NonAssignment
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializers: BeforeColon
|
||||||
|
BreakConstructorInitializersBeforeComma: true
|
||||||
|
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
BraceWrapping:
|
||||||
|
AfterClass: true
|
||||||
|
AfterControlStatement: false
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: true
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: true
|
||||||
|
AfterUnion: false
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
IndentBraces: false
|
||||||
|
|
||||||
|
ForEachMacros:
|
||||||
|
- forever # avoids { wrapped to next line
|
||||||
|
- foreach
|
||||||
|
- Q_FOREACH
|
||||||
|
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
AlignEscapedNewlinesLeft: false
|
||||||
|
AlignTrailingComments: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: true
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: false
|
||||||
|
AllowShortEnumsOnASingleLine: false # requires clang-format 11
|
||||||
|
AlignAfterOpenBracket: true
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
AlwaysBreakTemplateDeclarations: true
|
||||||
|
BinPackParameters: true
|
||||||
|
ColumnLimit: 0
|
||||||
|
Cpp11BracedListStyle: false
|
||||||
|
DerivePointerBinding: false
|
||||||
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
IndentCaseLabels: false
|
||||||
|
NamespaceIndentation: None
|
||||||
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 19
|
||||||
|
PenaltyBreakComment: 60
|
||||||
|
PenaltyBreakFirstLessLess: 120
|
||||||
|
PenaltyBreakString: 1000
|
||||||
|
PenaltyExcessCharacter: 1000000
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
|
PointerBindsToType: false
|
||||||
|
SpaceAfterTemplateKeyword: false
|
||||||
|
IndentFunctionDeclarationAfterType: false
|
||||||
|
SpaceAfterControlStatementKeyword: true
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesInAngles: false
|
||||||
|
SpacesInCStyleCastParentheses: true
|
||||||
|
SpacesInParentheses: false
|
||||||
|
...
|
||||||
|
|
||||||
2
.clazy
2
.clazy
@@ -1 +1 @@
|
|||||||
CHECKS level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots
|
CHECKS level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-qobject-macro
|
||||||
|
|||||||
4
.codespellrc
Normal file
4
.codespellrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[codespell]
|
||||||
|
skip = ./build-*,.git
|
||||||
|
interactive = 3
|
||||||
|
ignore-words-list = overlay,overlayed
|
||||||
22
.gitignore
vendored
22
.gitignore
vendored
@@ -6,7 +6,6 @@ Makefile
|
|||||||
CMakeFiles
|
CMakeFiles
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
/examples/example
|
/examples/example
|
||||||
libdocks.so
|
|
||||||
tst_docks
|
tst_docks
|
||||||
CMakeLists.txt.user*
|
CMakeLists.txt.user*
|
||||||
/build
|
/build
|
||||||
@@ -34,7 +33,7 @@ cmake_install.cmake
|
|||||||
latex
|
latex
|
||||||
html
|
html
|
||||||
custom_titlebar
|
custom_titlebar
|
||||||
libkddockwidgets.so
|
libkddockwidgets.so*
|
||||||
*.depends
|
*.depends
|
||||||
kddockwidgets_basic_quick
|
kddockwidgets_basic_quick
|
||||||
/src/KDDockWidgetsConfig.cmake
|
/src/KDDockWidgetsConfig.cmake
|
||||||
@@ -46,3 +45,22 @@ build-*
|
|||||||
CTestTestfile.cmake
|
CTestTestfile.cmake
|
||||||
mylayout.json
|
mylayout.json
|
||||||
*.cbp
|
*.cbp
|
||||||
|
*.pyc
|
||||||
|
/python/examples/rc_assets.py
|
||||||
|
*.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*
|
||||||
|
/x64
|
||||||
|
/src/kddockwidgets_version.h
|
||||||
|
*.vcxproj*
|
||||||
|
*.sln
|
||||||
|
*.dir
|
||||||
|
.vscode
|
||||||
|
|||||||
11
.krazy
11
.krazy
@@ -1,18 +1,23 @@
|
|||||||
CHECKSETS qt5,c++
|
CHECKSETS qt5,c++
|
||||||
|
|
||||||
#KDAB-specific checks
|
#KDAB-specific checks
|
||||||
EXTRA kdabcopyright
|
EXTRA kdabcopyright-reuse,kdabcontactus,fosslicense-reuse
|
||||||
|
|
||||||
#additional checks
|
#additional checks
|
||||||
#EXTRA defines,null
|
#EXTRA defines,null
|
||||||
|
|
||||||
#exclude checks now being done by clazy or clang-tools
|
#exclude checks now being done by clazy or clang-tools
|
||||||
EXCLUDE strings,explicit,normalize,passbyvalue,operators,nullstrcompare,nullstrassign,doublequote_chars,qobject,sigsandslots,staticobjects,dpointer,inline
|
EXCLUDE strings,explicit,normalize,passbyvalue,operators,nullstrcompare,nullstrassign,doublequote_chars,qobject,sigsandslots,staticobjects,dpointer,inline,postfixop
|
||||||
#exclude more checks
|
#exclude more checks
|
||||||
EXCLUDE style
|
EXCLUDE style
|
||||||
|
|
||||||
|
SKIP /fwd_headers/
|
||||||
|
SKIP Doxyfile.cmake
|
||||||
|
|
||||||
#skip CMake files
|
#skip CMake files
|
||||||
SKIP /KDDockWidgetsConfig.cmake.in
|
SKIP /KDDockWidgetsConfig.cmake.in
|
||||||
|
#skip more files
|
||||||
|
SKIP CMakePresets.json
|
||||||
#skip the borrowed code in the cmake subdir
|
#skip the borrowed code in the cmake subdir
|
||||||
SKIP /cmake/Qt5Portability.cmake|/cmake/ECM/
|
SKIP /cmake/InstallLocation.cmake|/cmake/ECM/|/cmake/KDAB/
|
||||||
|
|
||||||
|
|||||||
18
.reuse/dep5
Normal file
18
.reuse/dep5
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: KDDockWidgets
|
||||||
|
Upstream-Contact: <info@kdab.com>
|
||||||
|
Source: https://www.github.com/KDAB/KDDockWidgets
|
||||||
|
|
||||||
|
Files: *.qrc *.json *.xml *.html src/fwd_headers/*
|
||||||
|
Copyright: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
License: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|
||||||
|
#artwork
|
||||||
|
Files: screencap.gif images/* src/img/* docs/api/*.png examples/dockwidgets/assets/*.png src/img/classic_indicators/*.png
|
||||||
|
Copyright: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
License: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|
||||||
|
#3rdparty
|
||||||
|
Files: cmake/ECM/modules/*
|
||||||
|
Copyright:
|
||||||
|
License: BSD-3-Clause
|
||||||
66
.travis.yml
Normal file
66
.travis.yml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
env:
|
||||||
|
global:
|
||||||
|
- secure: "NlWO/NTPlOU6cowOMuPOvjAprXVwIjmpHHf9CoMR71E2c/eBFFKIHj10kXuyFwz2KihHAIExmo9OlGtGniNWobvIrVrabO3dsOSb6UGbPAQkzQiyQLKsDNQAZx3nMuWEKBtMsVRee6rd7/2uGTY4WB5Ot3VhrUYcN1FoRgQQ9gk="
|
||||||
|
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
dist: bionic
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode11.5
|
||||||
|
env:
|
||||||
|
- QT_SELECT=qt5
|
||||||
|
- CMAKE_PREFIX_PATH=/usr/local/opt/qt
|
||||||
|
|
||||||
|
language: cpp
|
||||||
|
compiler:
|
||||||
|
- gcc
|
||||||
|
- clang
|
||||||
|
|
||||||
|
script:
|
||||||
|
- mkdir build
|
||||||
|
- cd build
|
||||||
|
- cmake -DCMAKE_BUILD_TYPE=Release -DKDDockWidgets_TESTS=True -KDDockWidgets_EXAMPLES=True -DKDDockWidgets_DEVELOPER_MODE=True ..
|
||||||
|
- make
|
||||||
|
- make test
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email:
|
||||||
|
recipients:
|
||||||
|
- allen.winter@kdab.com
|
||||||
|
- sergio.martins@kdab.com
|
||||||
|
on_success: never
|
||||||
|
on_failure: always
|
||||||
|
|
||||||
|
dist: bionic
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
packages:
|
||||||
|
- qt5-default
|
||||||
|
- qtbase5-dev
|
||||||
|
- qtbase5-dev-tools
|
||||||
|
- qtbase5-private-dev
|
||||||
|
- qttools5-dev
|
||||||
|
- qttools5-dev-tools
|
||||||
|
- qtdeclarative5-dev
|
||||||
|
- qtdeclarative5-dev-tools
|
||||||
|
- libqt5xmlpatterns5-dev
|
||||||
|
- libqt5xmlpatterns5
|
||||||
|
- qtxmlpatterns5-dev-tools
|
||||||
|
- libqt5x11extras5-dev
|
||||||
|
homebrew:
|
||||||
|
update: true
|
||||||
|
packages:
|
||||||
|
- qt5
|
||||||
|
coverity_scan:
|
||||||
|
project:
|
||||||
|
name: KDAB/KDDockWidgets
|
||||||
|
notification_email: allen.winter@kdab.com
|
||||||
|
build_command_prepend: cd build && cmake ..
|
||||||
|
build_command: make
|
||||||
|
branch_pattern: coverity_scan
|
||||||
635
.uncrustify
635
.uncrustify
@@ -1,635 +0,0 @@
|
|||||||
align_asm_colon = false
|
|
||||||
align_assign_span = 0
|
|
||||||
align_assign_thresh = 0
|
|
||||||
align_enum_equ_span = 0
|
|
||||||
align_enum_equ_thresh = 0
|
|
||||||
align_func_params = false
|
|
||||||
align_func_params_gap = 0
|
|
||||||
align_func_params_span = 0
|
|
||||||
align_func_params_thresh = 0
|
|
||||||
align_func_proto_gap = 0
|
|
||||||
align_func_proto_span = 0
|
|
||||||
align_keep_extra_space = false
|
|
||||||
align_keep_tabs = false
|
|
||||||
align_left_shift = true
|
|
||||||
align_mix_var_proto = false
|
|
||||||
align_nl_cont = false
|
|
||||||
align_number_right = false
|
|
||||||
align_oc_decl_colon = false
|
|
||||||
align_oc_msg_colon_first = false
|
|
||||||
align_oc_msg_colon_span = 0
|
|
||||||
align_oc_msg_spec_span = 0
|
|
||||||
align_on_operator = false
|
|
||||||
align_on_tabstop = false
|
|
||||||
align_pp_define_gap = 0
|
|
||||||
align_pp_define_span = 0
|
|
||||||
align_pp_define_together = false
|
|
||||||
align_right_cmt_at_col = 0
|
|
||||||
align_right_cmt_gap = 0
|
|
||||||
align_right_cmt_mix = false
|
|
||||||
align_right_cmt_span = 0
|
|
||||||
align_same_func_call_params = false
|
|
||||||
align_single_line_brace = false
|
|
||||||
align_single_line_brace_gap = 0
|
|
||||||
align_single_line_func = false
|
|
||||||
align_struct_init_span = 0
|
|
||||||
align_typedef_amp_style = 0
|
|
||||||
align_typedef_func = 0
|
|
||||||
align_typedef_gap = 0
|
|
||||||
align_typedef_span = 0
|
|
||||||
align_typedef_star_style = 0
|
|
||||||
align_var_class_gap = 0
|
|
||||||
align_var_class_span = 0
|
|
||||||
align_var_class_thresh = 0
|
|
||||||
align_var_def_amp_style = 0
|
|
||||||
align_var_def_attribute = false
|
|
||||||
align_var_def_colon = false
|
|
||||||
align_var_def_colon_gap = 0
|
|
||||||
align_var_def_gap = 0
|
|
||||||
align_var_def_inline = false
|
|
||||||
align_var_def_span = 0
|
|
||||||
align_var_def_star_style = 0
|
|
||||||
align_var_def_thresh = 0
|
|
||||||
align_var_struct_gap = 0
|
|
||||||
align_var_struct_span = 0
|
|
||||||
align_var_struct_thresh = 0
|
|
||||||
align_with_tabs = false
|
|
||||||
cmt_c_group = false
|
|
||||||
cmt_c_nl_end = false
|
|
||||||
cmt_c_nl_start = false
|
|
||||||
cmt_convert_tab_to_spaces = false
|
|
||||||
cmt_cpp_group = false
|
|
||||||
cmt_cpp_nl_end = false
|
|
||||||
cmt_cpp_nl_start = false
|
|
||||||
cmt_cpp_to_c = false
|
|
||||||
cmt_indent_multi = false
|
|
||||||
cmt_insert_before_ctor_dtor = false
|
|
||||||
cmt_insert_before_inlines = true
|
|
||||||
cmt_insert_before_preproc = false
|
|
||||||
cmt_insert_class_header = ""
|
|
||||||
cmt_insert_file_footer = ""
|
|
||||||
cmt_insert_file_header = ""
|
|
||||||
cmt_insert_func_header = ""
|
|
||||||
cmt_insert_oc_msg_header = ""
|
|
||||||
cmt_multi_check_last = true
|
|
||||||
cmt_multi_first_len_minimum = 4
|
|
||||||
cmt_reflow_mode = 0
|
|
||||||
cmt_sp_after_star_cont = 0
|
|
||||||
cmt_sp_before_star_cont = 0
|
|
||||||
cmt_star_cont = false
|
|
||||||
cmt_width = 0
|
|
||||||
code_width = 0
|
|
||||||
disable_processing_cmt = ""
|
|
||||||
eat_blanks_after_open_brace = false
|
|
||||||
eat_blanks_before_close_brace = false
|
|
||||||
enable_digraphs = false
|
|
||||||
enable_processing_cmt = ""
|
|
||||||
force_tab_after_define = false
|
|
||||||
include_category_0 = ""
|
|
||||||
include_category_1 = ""
|
|
||||||
include_category_2 = ""
|
|
||||||
indent_access_spec = -4
|
|
||||||
indent_access_spec_body = false
|
|
||||||
indent_align_assign = true
|
|
||||||
indent_align_paren = true
|
|
||||||
indent_align_string = false
|
|
||||||
indent_bool_paren = false
|
|
||||||
indent_brace = 0
|
|
||||||
indent_brace_parent = false
|
|
||||||
indent_braces = false
|
|
||||||
indent_braces_no_class = false
|
|
||||||
indent_braces_no_func = false
|
|
||||||
indent_braces_no_struct = false
|
|
||||||
indent_case_brace = 0
|
|
||||||
indent_case_shift = 0
|
|
||||||
indent_class_colon = false
|
|
||||||
indent_class_on_colon = false
|
|
||||||
indent_class = true
|
|
||||||
indent_cmt_with_tabs = false
|
|
||||||
indent_col1_comment = false
|
|
||||||
indent_columns = 4
|
|
||||||
indent_comma_paren = false
|
|
||||||
indent_constr_colon = false
|
|
||||||
indent_continue = 0
|
|
||||||
indent_cpp_lambda_body = false
|
|
||||||
indent_cpp_lambda_only_once = true
|
|
||||||
indent_ctor_init = 0
|
|
||||||
indent_ctor_init_leading = 2
|
|
||||||
indent_else_if = false
|
|
||||||
indent_extern = false
|
|
||||||
indent_first_bool_expr = false
|
|
||||||
indent_first_for_expr = false
|
|
||||||
indent_func_call_param = false
|
|
||||||
indent_func_class_param = false
|
|
||||||
indent_func_const = 0
|
|
||||||
indent_func_ctor_var_param = false
|
|
||||||
indent_func_def_force_col1 = false
|
|
||||||
indent_func_def_param = false
|
|
||||||
indent_func_param_double = false
|
|
||||||
indent_func_proto_param = false
|
|
||||||
indent_func_throw = 0
|
|
||||||
indent_ignore_asm_block = false
|
|
||||||
indent_label = 1
|
|
||||||
indent_member = 0
|
|
||||||
indent_member_single = false
|
|
||||||
indent_min_vbrace_open = 0
|
|
||||||
indent_namespace = false
|
|
||||||
indent_namespace_level = 0
|
|
||||||
indent_namespace_limit = 0
|
|
||||||
indent_namespace_single_indent = false
|
|
||||||
indent_oc_block = false
|
|
||||||
indent_oc_block_msg = 0
|
|
||||||
indent_oc_block_msg_from_brace = false
|
|
||||||
indent_oc_block_msg_from_caret = false
|
|
||||||
indent_oc_block_msg_from_colon = false
|
|
||||||
indent_oc_block_msg_from_keyword = false
|
|
||||||
indent_oc_block_msg_xcode_style = false
|
|
||||||
indent_oc_msg_colon = 0
|
|
||||||
indent_oc_msg_prioritize_first_colon = true
|
|
||||||
indent_off_after_return_new = false
|
|
||||||
indent_param = 0
|
|
||||||
indent_paren_after_func_call = false
|
|
||||||
indent_paren_after_func_decl = false
|
|
||||||
indent_paren_after_func_def = false
|
|
||||||
indent_paren_close = 0
|
|
||||||
indent_paren_nl = false
|
|
||||||
indent_paren_open_brace = false
|
|
||||||
indent_preserve_sql = false
|
|
||||||
indent_relative_single_line_comments = false
|
|
||||||
indent_semicolon_for_paren = false
|
|
||||||
indent_shift = false
|
|
||||||
indent_single_after_return = false
|
|
||||||
indent_single_newlines = false
|
|
||||||
indent_sing_line_comments = 0
|
|
||||||
indent_square_nl = false
|
|
||||||
indent_switch_case = 0
|
|
||||||
indent_switch_pp = true
|
|
||||||
indent_template_param = false
|
|
||||||
indent_ternary_operator = 2
|
|
||||||
indent_token_after_brace = true
|
|
||||||
indent_var_def_blk = 0
|
|
||||||
indent_var_def_cont = false
|
|
||||||
indent_vbrace_open_on_tabstop = false
|
|
||||||
indent_with_tabs = 0
|
|
||||||
indent_xml_string = 0
|
|
||||||
input_tab_size = 4
|
|
||||||
ls_code_width = false
|
|
||||||
ls_for_split_full = false
|
|
||||||
ls_func_split_full = false
|
|
||||||
mod_add_long_class_closebrace_comment = 0
|
|
||||||
mod_add_long_function_closebrace_comment = 0
|
|
||||||
mod_add_long_ifdef_else_comment = 0
|
|
||||||
mod_add_long_ifdef_endif_comment = 0
|
|
||||||
mod_add_long_namespace_closebrace_comment = 0
|
|
||||||
mod_add_long_switch_closebrace_comment = 0
|
|
||||||
mod_case_brace = ignore
|
|
||||||
mod_full_brace_do = ignore
|
|
||||||
mod_full_brace_for = ignore
|
|
||||||
mod_full_brace_function = ignore
|
|
||||||
mod_full_brace_if_chain = false
|
|
||||||
mod_full_brace_if_chain_only = false
|
|
||||||
mod_full_brace_if = ignore
|
|
||||||
mod_full_brace_nl = 0
|
|
||||||
mod_full_brace_nl_block_rem_mlcond = false
|
|
||||||
mod_full_brace_using = ignore
|
|
||||||
mod_full_brace_while = ignore
|
|
||||||
mod_full_paren_if_bool = false
|
|
||||||
mod_move_case_break = false
|
|
||||||
mod_paren_on_return = ignore
|
|
||||||
mod_pawn_semicolon = false
|
|
||||||
mod_remove_empty_return = false
|
|
||||||
mod_remove_extra_semicolon = false
|
|
||||||
mod_sort_import = false
|
|
||||||
mod_sort_include = false
|
|
||||||
mod_sort_oc_properties = false
|
|
||||||
mod_sort_oc_property_class_weight = 0
|
|
||||||
mod_sort_oc_property_getter_weight = 0
|
|
||||||
mod_sort_oc_property_nullability_weight = 0
|
|
||||||
mod_sort_oc_property_readwrite_weight = 0
|
|
||||||
mod_sort_oc_property_reference_weight = 0
|
|
||||||
mod_sort_oc_property_setter_weight = 0
|
|
||||||
mod_sort_oc_property_thread_safe_weight = 0
|
|
||||||
mod_sort_using = false
|
|
||||||
newlines = auto
|
|
||||||
nl_after_access_spec = 0
|
|
||||||
nl_after_annotation = ignore
|
|
||||||
nl_after_brace_close = false
|
|
||||||
nl_after_brace_open_cmt = false
|
|
||||||
nl_after_brace_open = false
|
|
||||||
nl_after_case = false
|
|
||||||
nl_after_class = 0
|
|
||||||
nl_after_do = ignore
|
|
||||||
nl_after_for = ignore
|
|
||||||
nl_after_func_body = 0
|
|
||||||
nl_after_func_body_class = 0
|
|
||||||
nl_after_func_body_one_liner = 0
|
|
||||||
nl_after_func_class_proto = 0
|
|
||||||
nl_after_func_class_proto_group = 0
|
|
||||||
nl_after_func_proto = 0
|
|
||||||
nl_after_func_proto_group = 0
|
|
||||||
nl_after_if = ignore
|
|
||||||
nl_after_label_colon = false
|
|
||||||
nl_after_multiline_comment = false
|
|
||||||
nl_after_return = false
|
|
||||||
nl_after_semicolon = false
|
|
||||||
nl_after_square_assign = ignore
|
|
||||||
nl_after_struct = 0
|
|
||||||
nl_after_switch = ignore
|
|
||||||
nl_after_synchronized = ignore
|
|
||||||
nl_after_try_catch_finally = 0
|
|
||||||
nl_after_vbrace_close = false
|
|
||||||
nl_after_vbrace_open_empty = false
|
|
||||||
nl_after_vbrace_open = false
|
|
||||||
nl_after_while = ignore
|
|
||||||
nl_around_cs_property = 0
|
|
||||||
nl_assign_brace = ignore
|
|
||||||
nl_assign_leave_one_liners = false
|
|
||||||
nl_assign_square = ignore
|
|
||||||
nl_before_access_spec = 0
|
|
||||||
nl_before_block_comment = 0
|
|
||||||
nl_before_case = false
|
|
||||||
nl_before_c_comment = 0
|
|
||||||
nl_before_class = 0
|
|
||||||
nl_before_cpp_comment = 0
|
|
||||||
nl_before_do = ignore
|
|
||||||
nl_before_for = ignore
|
|
||||||
nl_before_func_body_def = 0
|
|
||||||
nl_before_func_body_proto = 0
|
|
||||||
nl_before_func_class_def = 0
|
|
||||||
nl_before_func_class_proto = 0
|
|
||||||
nl_before_if_closing_paren = ignore
|
|
||||||
nl_before_if = ignore
|
|
||||||
nl_before_return = false
|
|
||||||
nl_before_switch = ignore
|
|
||||||
nl_before_synchronized = ignore
|
|
||||||
nl_before_throw = ignore
|
|
||||||
nl_before_while = ignore
|
|
||||||
nl_between_annotation = ignore
|
|
||||||
nl_between_get_set = 0
|
|
||||||
nl_brace_brace = ignore
|
|
||||||
nl_brace_catch = ignore
|
|
||||||
nl_brace_else = ignore
|
|
||||||
nl_brace_finally = ignore
|
|
||||||
nl_brace_fparen = ignore
|
|
||||||
nl_brace_square = ignore
|
|
||||||
nl_brace_struct_var = ignore
|
|
||||||
nl_brace_while = ignore
|
|
||||||
nl_case_colon_brace = ignore
|
|
||||||
nl_catch_brace = ignore
|
|
||||||
nl_class_brace = ignore
|
|
||||||
nl_class_colon = remove
|
|
||||||
nl_class_init_args = add
|
|
||||||
nl_class_leave_one_liners = false
|
|
||||||
nl_collapse_empty_body = false
|
|
||||||
nl_comment_func_def = 0
|
|
||||||
nl_constr_colon = ignore
|
|
||||||
nl_constr_init_args = ignore
|
|
||||||
nl_cpp_lambda_leave_one_liners = true
|
|
||||||
nl_cpp_ldef_brace = remove
|
|
||||||
nl_create_for_one_liner = false
|
|
||||||
nl_create_func_def_one_liner = false
|
|
||||||
nl_create_if_one_liner = false
|
|
||||||
nl_create_while_one_liner = false
|
|
||||||
nl_cs_property_leave_one_liners = false
|
|
||||||
nl_define_macro = false
|
|
||||||
nl_do_brace = ignore
|
|
||||||
nl_ds_struct_enum_close_brace = false
|
|
||||||
nl_ds_struct_enum_cmt = false
|
|
||||||
nl_else_brace = ignore
|
|
||||||
nl_elseif_brace = ignore
|
|
||||||
nl_else_if = ignore
|
|
||||||
nl_end_of_file = ignore
|
|
||||||
nl_end_of_file_min = 0
|
|
||||||
nl_enum_brace = ignore
|
|
||||||
nl_enum_class_identifier = ignore
|
|
||||||
nl_enum_class = ignore
|
|
||||||
nl_enum_colon_type = ignore
|
|
||||||
nl_enum_identifier_colon = ignore
|
|
||||||
nl_enum_leave_one_liners = false
|
|
||||||
nl_enum_own_lines = ignore
|
|
||||||
nl_fcall_brace = ignore
|
|
||||||
nl_fdef_brace = ignore
|
|
||||||
nl_finally_brace = ignore
|
|
||||||
nl_for_brace = ignore
|
|
||||||
nl_func_call_args_multi_line = false
|
|
||||||
nl_func_call_empty = ignore
|
|
||||||
nl_func_call_end_multi_line = false
|
|
||||||
nl_func_call_paren_empty = ignore
|
|
||||||
nl_func_call_paren = ignore
|
|
||||||
nl_func_call_start_multi_line = false
|
|
||||||
nl_func_class_scope = ignore
|
|
||||||
nl_func_decl_args = ignore
|
|
||||||
nl_func_decl_args_multi_line = false
|
|
||||||
nl_func_decl_empty = ignore
|
|
||||||
nl_func_decl_end = ignore
|
|
||||||
nl_func_decl_end_multi_line = false
|
|
||||||
nl_func_decl_end_single = ignore
|
|
||||||
nl_func_decl_start = ignore
|
|
||||||
nl_func_decl_start_multi_line = false
|
|
||||||
nl_func_decl_start_single = ignore
|
|
||||||
nl_func_def_args = ignore
|
|
||||||
nl_func_def_args_multi_line = false
|
|
||||||
nl_func_def_empty = ignore
|
|
||||||
nl_func_def_end = ignore
|
|
||||||
nl_func_def_end_multi_line = false
|
|
||||||
nl_func_def_end_single = ignore
|
|
||||||
nl_func_def_paren_empty = ignore
|
|
||||||
nl_func_def_paren = ignore
|
|
||||||
nl_func_def_start = ignore
|
|
||||||
nl_func_def_start_multi_line = false
|
|
||||||
nl_func_def_start_single = ignore
|
|
||||||
nl_func_leave_one_liners = true
|
|
||||||
nl_func_paren_empty = ignore
|
|
||||||
nl_func_paren = ignore
|
|
||||||
nl_func_proto_type_name = ignore
|
|
||||||
nl_func_scope_name = ignore
|
|
||||||
nl_func_type_name_class = ignore
|
|
||||||
nl_func_type_name = ignore
|
|
||||||
nl_func_var_def_blk = 0
|
|
||||||
nl_getset_brace = ignore
|
|
||||||
nl_getset_leave_one_liners = false
|
|
||||||
nl_if_brace = ignore
|
|
||||||
nl_if_leave_one_liners = false
|
|
||||||
nl_max = 0
|
|
||||||
nl_max_blank_in_func = 0
|
|
||||||
nl_multi_line_cond = false
|
|
||||||
nl_multi_line_define = false
|
|
||||||
nl_namespace_brace = ignore
|
|
||||||
nl_namespace_two_to_one_liner = false
|
|
||||||
nl_oc_block_brace = ignore
|
|
||||||
nl_oc_brace_catch = ignore
|
|
||||||
nl_oc_catch_brace = ignore
|
|
||||||
nl_oc_implementation_brace = ignore
|
|
||||||
nl_oc_interface_brace = ignore
|
|
||||||
nl_oc_msg_args = false
|
|
||||||
nl_oc_msg_leave_one_liner = false
|
|
||||||
nl_paren_dbrace_open = ignore
|
|
||||||
nl_property_brace = ignore
|
|
||||||
nl_remove_extra_newlines = 0
|
|
||||||
nl_return_expr = ignore
|
|
||||||
nl_scope_brace = ignore
|
|
||||||
nl_split_for_one_liner = false
|
|
||||||
nl_split_if_one_liner = false
|
|
||||||
nl_split_while_one_liner = false
|
|
||||||
nl_squeeze_ifdef = false
|
|
||||||
nl_squeeze_ifdef_top_level = false
|
|
||||||
nl_squeeze_paren_close = false
|
|
||||||
nl_start_of_file = ignore
|
|
||||||
nl_start_of_file_min = 0
|
|
||||||
nl_struct_brace = ignore
|
|
||||||
nl_switch_brace = ignore
|
|
||||||
nl_synchronized_brace = ignore
|
|
||||||
nl_template_class = ignore
|
|
||||||
nl_try_brace = ignore
|
|
||||||
nl_tsquare_brace = ignore
|
|
||||||
nl_type_brace_init_lst_close = ignore
|
|
||||||
nl_type_brace_init_lst = ignore
|
|
||||||
nl_type_brace_init_lst_open = ignore
|
|
||||||
nl_typedef_blk_end = 0
|
|
||||||
nl_typedef_blk_in = 0
|
|
||||||
nl_typedef_blk_start = 0
|
|
||||||
nl_union_brace = ignore
|
|
||||||
nl_unittest_brace = ignore
|
|
||||||
nl_using_brace = ignore
|
|
||||||
nl_var_def_blk_end = 0
|
|
||||||
nl_var_def_blk_in = 0
|
|
||||||
nl_var_def_blk_start = 0
|
|
||||||
nl_version_brace = ignore
|
|
||||||
nl_while_brace = ignore
|
|
||||||
nl_while_leave_one_liners = false
|
|
||||||
output_tab_size = 4
|
|
||||||
pos_arith = ignore
|
|
||||||
pos_assign = ignore
|
|
||||||
pos_bool = ignore
|
|
||||||
pos_class_colon = lead
|
|
||||||
pos_class_comma = lead
|
|
||||||
pos_comma = ignore
|
|
||||||
pos_compare = ignore
|
|
||||||
pos_conditional = ignore
|
|
||||||
pos_constr_colon = ignore
|
|
||||||
pos_constr_comma = ignore
|
|
||||||
pos_enum_comma = ignore
|
|
||||||
pp_define_at_level = false
|
|
||||||
pp_if_indent_code = false
|
|
||||||
pp_ignore_define_body = false
|
|
||||||
pp_indent_at_level = false
|
|
||||||
pp_indent_brace = true
|
|
||||||
pp_indent_case = true
|
|
||||||
pp_indent_count = 1
|
|
||||||
pp_indent_extern = true
|
|
||||||
pp_indent_func_def = true
|
|
||||||
pp_indent_if = 0
|
|
||||||
pp_indent = ignore
|
|
||||||
pp_indent_region = 0
|
|
||||||
pp_region_indent_code = false
|
|
||||||
pp_space_count = 0
|
|
||||||
pp_space = ignore
|
|
||||||
sp_addr = remove
|
|
||||||
sp_after_angle = ignore
|
|
||||||
sp_after_assign = ignore
|
|
||||||
sp_after_byref_func = remove
|
|
||||||
sp_after_byref = remove
|
|
||||||
sp_after_cast = ignore
|
|
||||||
sp_after_class_colon = add
|
|
||||||
sp_after_comma = add
|
|
||||||
sp_after_constr_colon = ignore
|
|
||||||
sp_after_dc = ignore
|
|
||||||
sp_after_for_colon = ignore
|
|
||||||
sp_after_invariant_paren = ignore
|
|
||||||
sp_after_mdatype_commas = ignore
|
|
||||||
sp_after_new = ignore
|
|
||||||
sp_after_newop_paren = ignore
|
|
||||||
sp_after_noexcept = ignore
|
|
||||||
sp_after_oc_at_sel = ignore
|
|
||||||
sp_after_oc_block_caret = ignore
|
|
||||||
sp_after_oc_colon = ignore
|
|
||||||
sp_after_oc_dict_colon = ignore
|
|
||||||
sp_after_oc_msg_receiver = ignore
|
|
||||||
sp_after_oc_property = ignore
|
|
||||||
sp_after_oc_return_type = ignore
|
|
||||||
sp_after_oc_scope = ignore
|
|
||||||
sp_after_oc_synchronized = ignore
|
|
||||||
sp_after_oc_type = ignore
|
|
||||||
sp_after_operator = ignore
|
|
||||||
sp_after_operator_sym_empty = ignore
|
|
||||||
sp_after_operator_sym = ignore
|
|
||||||
sp_after_ptr_block_caret = ignore
|
|
||||||
sp_after_ptr_star_func = remove
|
|
||||||
sp_after_ptr_star = remove
|
|
||||||
sp_after_ptr_star_qualifier = ignore
|
|
||||||
sp_after_semi = add
|
|
||||||
sp_after_semi_for_empty = ignore
|
|
||||||
sp_after_semi_for = force
|
|
||||||
sp_after_send_oc_colon = ignore
|
|
||||||
sp_after_sparen = ignore
|
|
||||||
sp_after_tag = ignore
|
|
||||||
sp_after_throw = ignore
|
|
||||||
sp_after_tparen_close = remove
|
|
||||||
sp_after_type_brace_init_lst_open = ignore
|
|
||||||
sp_after_type = force
|
|
||||||
sp_angle_colon = ignore
|
|
||||||
sp_angle_paren_empty = ignore
|
|
||||||
sp_angle_paren = ignore
|
|
||||||
sp_angle_shift = remove
|
|
||||||
sp_angle_word = ignore
|
|
||||||
sp_annotation_paren = ignore
|
|
||||||
sp_arith_additive = ignore
|
|
||||||
sp_arith = ignore
|
|
||||||
sp_assign_default = ignore
|
|
||||||
sp_assign = ignore
|
|
||||||
sp_attribute_paren = ignore
|
|
||||||
sp_balance_nested_parens = false
|
|
||||||
sp_before_angle = ignore
|
|
||||||
sp_before_assign = ignore
|
|
||||||
sp_before_byref_func = ignore
|
|
||||||
sp_before_byref = add
|
|
||||||
sp_before_case_colon = remove
|
|
||||||
sp_before_class_colon = add
|
|
||||||
sp_before_comma = remove
|
|
||||||
sp_before_constr_colon = ignore
|
|
||||||
sp_before_dc = ignore
|
|
||||||
sp_before_ellipsis = ignore
|
|
||||||
sp_before_for_colon = ignore
|
|
||||||
sp_before_mdatype_commas = ignore
|
|
||||||
sp_before_nl_cont = add
|
|
||||||
sp_before_oc_block_caret = ignore
|
|
||||||
sp_before_oc_colon = ignore
|
|
||||||
sp_before_oc_dict_colon = ignore
|
|
||||||
sp_before_pp_stringify = ignore
|
|
||||||
sp_before_ptr_star_func = ignore
|
|
||||||
sp_before_ptr_star = add
|
|
||||||
sp_before_semi_for_empty = ignore
|
|
||||||
sp_before_semi_for = ignore
|
|
||||||
sp_before_semi = remove
|
|
||||||
sp_before_send_oc_colon = ignore
|
|
||||||
sp_before_sparen = ignore
|
|
||||||
sp_before_square = ignore
|
|
||||||
sp_before_squares = ignore
|
|
||||||
sp_before_template_paren = ignore
|
|
||||||
sp_before_tr_emb_cmt = ignore
|
|
||||||
sp_before_type_brace_init_lst_close = ignore
|
|
||||||
sp_before_unnamed_byref = ignore
|
|
||||||
sp_before_unnamed_ptr_star = ignore
|
|
||||||
sp_between_mdatype_commas = ignore
|
|
||||||
sp_between_new_paren = ignore
|
|
||||||
sp_between_ptr_star = ignore
|
|
||||||
sp_bool = ignore
|
|
||||||
sp_brace_catch = ignore
|
|
||||||
sp_brace_else = ignore
|
|
||||||
sp_brace_finally = ignore
|
|
||||||
sp_brace_typedef = ignore
|
|
||||||
sp_case_label = ignore
|
|
||||||
sp_catch_brace = ignore
|
|
||||||
sp_catch_paren = ignore
|
|
||||||
sp_cmt_cpp_doxygen = false
|
|
||||||
sp_cmt_cpp_qttr = false
|
|
||||||
sp_cmt_cpp_start = ignore
|
|
||||||
sp_compare = ignore
|
|
||||||
sp_cond_colon_after = ignore
|
|
||||||
sp_cond_colon_before = ignore
|
|
||||||
sp_cond_colon = ignore
|
|
||||||
sp_cond_question_after = ignore
|
|
||||||
sp_cond_question_before = ignore
|
|
||||||
sp_cond_question = ignore
|
|
||||||
sp_cond_ternary_short = ignore
|
|
||||||
sp_cparen_oparen = ignore
|
|
||||||
sp_cpp_before_struct_binding = ignore
|
|
||||||
sp_cpp_cast_paren = ignore
|
|
||||||
sp_cpp_lambda_assign = ignore
|
|
||||||
sp_cpp_lambda_paren = ignore
|
|
||||||
sp_d_array_colon = ignore
|
|
||||||
sp_defined_paren = ignore
|
|
||||||
sp_deref = remove
|
|
||||||
sp_else_brace = ignore
|
|
||||||
sp_endif_cmt = ignore
|
|
||||||
sp_enum_after_assign = ignore
|
|
||||||
sp_enum_assign = ignore
|
|
||||||
sp_enum_before_assign = ignore
|
|
||||||
sp_enum_colon = ignore
|
|
||||||
sp_enum_paren = ignore
|
|
||||||
sp_extern_paren = ignore
|
|
||||||
sp_finally_brace = ignore
|
|
||||||
sp_fparen_brace = ignore
|
|
||||||
sp_fparen_brace_initializer = ignore
|
|
||||||
sp_fparen_dbrace = ignore
|
|
||||||
sp_func_call_paren_empty = ignore
|
|
||||||
sp_func_call_paren = ignore
|
|
||||||
sp_func_call_user_inside_fparen = ignore
|
|
||||||
sp_func_call_user_paren = ignore
|
|
||||||
sp_func_call_user_paren_paren = remove
|
|
||||||
sp_func_class_paren_empty = ignore
|
|
||||||
sp_func_class_paren = ignore
|
|
||||||
sp_func_def_paren_empty = ignore
|
|
||||||
sp_func_def_paren = ignore
|
|
||||||
sp_func_proto_paren_empty = ignore
|
|
||||||
sp_func_proto_paren = ignore
|
|
||||||
sp_getset_brace = ignore
|
|
||||||
sp_incdec = remove
|
|
||||||
sp_inside_angle = ignore
|
|
||||||
sp_inside_braces_empty = remove
|
|
||||||
sp_inside_braces_enum = ignore
|
|
||||||
sp_inside_braces = ignore
|
|
||||||
sp_inside_braces_oc_dict = ignore
|
|
||||||
sp_inside_braces_struct = ignore
|
|
||||||
sp_inside_fparen = ignore
|
|
||||||
sp_inside_fparens = remove
|
|
||||||
sp_inside_newop_paren_close = ignore
|
|
||||||
sp_inside_newop_paren = ignore
|
|
||||||
sp_inside_newop_paren_open = ignore
|
|
||||||
sp_inside_oc_at_sel_parens = ignore
|
|
||||||
sp_inside_paren_cast = ignore
|
|
||||||
sp_inside_paren = ignore
|
|
||||||
sp_inside_sparen_close = ignore
|
|
||||||
sp_inside_sparen = ignore
|
|
||||||
sp_inside_sparen_open = ignore
|
|
||||||
sp_inside_square = ignore
|
|
||||||
sp_inside_square_oc_array = ignore
|
|
||||||
sp_inside_tparen = ignore
|
|
||||||
sp_inside_type_brace_init_lst = ignore
|
|
||||||
sp_invariant_paren = ignore
|
|
||||||
sp_inv = remove
|
|
||||||
sp_macro_func = ignore
|
|
||||||
sp_macro = ignore
|
|
||||||
sp_member = remove
|
|
||||||
sp_not = remove
|
|
||||||
sp_num_before_tr_emb_cmt = 0
|
|
||||||
sp_oc_brace_catch = ignore
|
|
||||||
sp_oc_catch_brace = ignore
|
|
||||||
sp_oc_catch_paren = ignore
|
|
||||||
sp_paren_brace = remove
|
|
||||||
sp_paren_comma = force
|
|
||||||
sp_paren_paren = remove
|
|
||||||
sp_permit_cpp11_shift = true
|
|
||||||
sp_pp_concat = add
|
|
||||||
sp_pp_stringify = ignore
|
|
||||||
sp_ptr_star_paren = ignore
|
|
||||||
sp_range = ignore
|
|
||||||
sp_return_paren = ignore
|
|
||||||
sp_scope_paren = ignore
|
|
||||||
sp_sign = remove
|
|
||||||
sp_sizeof_paren = ignore
|
|
||||||
sp_skip_vbrace_tokens = false
|
|
||||||
sp_sparen_brace = add
|
|
||||||
sp_special_semi = ignore
|
|
||||||
sp_square_fparen = ignore
|
|
||||||
sp_super_paren = remove
|
|
||||||
sp_template_angle = ignore
|
|
||||||
sp_this_paren = remove
|
|
||||||
sp_throw_paren = ignore
|
|
||||||
sp_try_brace = ignore
|
|
||||||
sp_type_brace_init_lst = ignore
|
|
||||||
sp_type_func = ignore
|
|
||||||
sp_version_paren = ignore
|
|
||||||
sp_word_brace = add
|
|
||||||
sp_word_brace_ns = add
|
|
||||||
string_escape_char2 = 0
|
|
||||||
string_escape_char = 92
|
|
||||||
string_replace_tab_chars = false
|
|
||||||
tok_split_gte = false
|
|
||||||
use_indent_continue_only_once = false
|
|
||||||
use_indent_func_call_param = true
|
|
||||||
use_options_overriding_for_qt_macros = true
|
|
||||||
utf8_bom = ignore
|
|
||||||
utf8_byte = false
|
|
||||||
utf8_force = false
|
|
||||||
warn_level_tabs_found_in_verbatim_string_literals = 2
|
|
||||||
49
.vscode/launch.json
vendored
49
.vscode/launch.json
vendored
@@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "(gdb) kddockwidgets_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build/bin/kddockwidgets_example",
|
|
||||||
"args": [],
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"environment": [],
|
|
||||||
"externalConsole": false,
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"setupCommands": [
|
|
||||||
{
|
|
||||||
"description": "Enable pretty-printing for gdb",
|
|
||||||
"text": "-enable-pretty-printing",
|
|
||||||
"ignoreFailures": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "(vs) kddockwidgets_example",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build/bin/kddockwidgets_example.exe",
|
|
||||||
"args": [],
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"environment": [],
|
|
||||||
"externalConsole": false,
|
|
||||||
"sourceFileMap" : {
|
|
||||||
"C:\\Users\\qt\\work\\qt\\qtbase\\src" : "D:\\Qt\\5.14.2\\Src\\qtbase\\src"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "(vs) tst_docks",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build/bin/tst_docks.exe",
|
|
||||||
"args": ["tst_moreTitleBarCornerCases", "-platform", "windows"],
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"environment": [],
|
|
||||||
"externalConsole": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
9
.vscode/settings.json
vendored
9
.vscode/settings.json
vendored
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools",
|
|
||||||
"files.associations": {
|
|
||||||
"qevent": "cpp"
|
|
||||||
},
|
|
||||||
"cmake.configureSettings": {
|
|
||||||
"OPTION_DEVELOPER_MODE" : "ON"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
349
CMakeLists.txt
349
CMakeLists.txt
@@ -1,53 +1,342 @@
|
|||||||
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2021 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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 ignored unless you also set KDDockWidgets_DEVELOPER_MODE=True
|
||||||
|
# Default=false
|
||||||
|
#
|
||||||
|
# -DKDDockWidgets_EXAMPLES=[true|false]
|
||||||
|
# Build the examples.
|
||||||
|
# Default=true
|
||||||
|
#
|
||||||
|
# -DKDDockWidgets_DOCS=[true|false]
|
||||||
|
# Build the API documentation. Enables the 'docs' build target.
|
||||||
|
# Default=false
|
||||||
|
#
|
||||||
|
# -DKDDockWidgets_QTQUICK=[true|false]
|
||||||
|
# Build for QtQuick instead of QtWidgets.
|
||||||
|
# Default=false
|
||||||
|
#
|
||||||
|
# -DKDDockWidgets_PYTHON_BINDINGS=[true|false]
|
||||||
|
# Build/Generate python bindings. Always false for Debug builds
|
||||||
|
# (If your shiboken or pyside is installed in a non-standard locations
|
||||||
|
# try passing the SHIBOKEN_CUSTOM_PREFIX and PYSIDE_CUSTOM_PREFIX variables.)
|
||||||
|
# Default=false
|
||||||
|
#
|
||||||
|
# -DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=[path]
|
||||||
|
# Set an alternative install path for Python bindings
|
||||||
|
# Default=CMAKE_INSTALL_PREFIX
|
||||||
|
|
||||||
|
# ## DO NOT USE IF YOU ARE AN END-USER. FOR THE DEVELOPERS ONLY!!
|
||||||
|
## Special CMake Options for Developers
|
||||||
|
#
|
||||||
|
# -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
|
||||||
|
#
|
||||||
|
# -DKDDockWidgets_WERROR=[true|false]
|
||||||
|
# Compile with the -Werror gcc/clang option (always true for developer-mode)
|
||||||
|
# Default=false
|
||||||
|
#
|
||||||
|
# -DKDDockWidgets_LINTER=[true|false]
|
||||||
|
# Build the layout linter.
|
||||||
|
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True
|
||||||
|
# Default=true
|
||||||
|
#
|
||||||
|
# -DKDDockWidgets_FUZZER=[true|false]
|
||||||
|
# Build the fuzzer.
|
||||||
|
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True
|
||||||
|
# Default=true
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
|
|
||||||
if (${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
# Allow using a non-KDAB install location.
|
||||||
project(KDDockWidgets VERSION 0.1 LANGUAGES CXX)
|
set(KDAB_INSTALL True CACHE INTERNAL "Install to default KDAB Location")
|
||||||
|
if(DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "")
|
||||||
|
set(KDAB_INSTALL False CACHE INTERNAL "Install to non-KDAB Location")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
||||||
|
project(KDDockWidgets LANGUAGES CXX)
|
||||||
else()
|
else()
|
||||||
project(KDDockWidgets
|
project(KDDockWidgets
|
||||||
VERSION 0.1
|
|
||||||
DESCRIPTION "An advanced docking system for Qt"
|
DESCRIPTION "An advanced docking system for Qt"
|
||||||
HOMEPAGE_URL "https://github.com/KDAB/KDDockWidgets"
|
HOMEPAGE_URL "https://github.com/KDAB/KDDockWidgets"
|
||||||
LANGUAGES CXX)
|
LANGUAGES CXX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_VERSION_MAJOR 1)
|
||||||
|
set(${PROJECT_NAME}_VERSION_MINOR 4)
|
||||||
|
set(${PROJECT_NAME}_VERSION_PATCH 95)
|
||||||
|
set(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH})
|
||||||
|
set(PROJECT_VERSION ${${PROJECT_NAME}_VERSION}) #PROJECT_VERSION is needed by some ECM modules
|
||||||
|
set(${PROJECT_NAME}_SOVERSION "1.5")
|
||||||
|
|
||||||
cmake_policy(SET CMP0020 NEW)
|
include(FeatureSummary)
|
||||||
cmake_policy(SET CMP0042 NEW)
|
|
||||||
|
|
||||||
option(OPTION_DEVELOPER_MODE "Developer Mode" OFF)
|
option(${PROJECT_NAME}_QT6 "Build against Qt 6" OFF)
|
||||||
# option(OPTION_QTQUICK "Build for QtQuick instead of QtWidgets" OFF)
|
option(${PROJECT_NAME}_DEVELOPER_MODE "Developer Mode" OFF)
|
||||||
|
option(${PROJECT_NAME}_PYTHON_BINDINGS "Build python bindings" OFF)
|
||||||
|
option(${PROJECT_NAME}_QTQUICK "Build for QtQuick instead of QtWidgets" OFF)
|
||||||
|
option(${PROJECT_NAME}_STATIC "Build statically" OFF)
|
||||||
|
option(${PROJECT_NAME}_TESTS "Build the tests" OFF)
|
||||||
|
option(${PROJECT_NAME}_EXAMPLES "Build the examples" ON)
|
||||||
|
option(${PROJECT_NAME}_DOCS "Build the API documentation" OFF)
|
||||||
|
option(${PROJECT_NAME}_WERROR "Use -Werror (will be true for developer-mode unconditionally)" OFF)
|
||||||
|
option(${PROJECT_NAME}_X11EXTRAS "On Linux, link against QtX11Extras so we can detect if the compositor supports transparency. Not applicable to other platforms or Qt6." ON)
|
||||||
|
|
||||||
find_package(Qt5Widgets)
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/ECM/modules")
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/KDAB/modules")
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
# Set a default build type if none was specified
|
||||||
|
set(default_build_type "Release")
|
||||||
set(ECM_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ECM/modules/")
|
if(EXISTS "${CMAKE_SOURCE_DIR}/.git" OR ${PROJECT_NAME}_DEVELOPER_MODE)
|
||||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_DIR})
|
set(default_build_type "Debug")
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
endif()
|
||||||
|
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
if (OPTION_DEVELOPER_MODE)
|
message(STATUS "Setting build type to ${default_build_type} as none was specified.")
|
||||||
include(ECMEnableSanitizers)
|
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
|
||||||
add_definitions(-DDOCKS_DEVELOPER_MODE -DQT_FORCE_ASSERTS)
|
# Set the possible values of build type for cmake-gui
|
||||||
if (NOT MSVC)
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||||
add_compile_options(-Wall -Wextra -Werror -Wno-error=deprecated-declarations)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (OPTION_QTQUICK)
|
if(${PROJECT_NAME}_QT6)
|
||||||
find_package(Qt5Quick)
|
set(Qt_VERSION_MAJOR 6)
|
||||||
|
set(QT_MIN_VERSION "6.0.0")
|
||||||
|
find_package(Qt6Widgets ${QT_MIN_VERSION} REQUIRED)
|
||||||
|
find_package(Qt6Test ${QT_MIN_VERSION} REQUIRED)
|
||||||
|
set(${PROJECT_NAME}_LIBRARY_QTID "-qt6")
|
||||||
|
else()
|
||||||
|
set(Qt_VERSION_MAJOR 5)
|
||||||
|
set(QT_MIN_VERSION "5.12")
|
||||||
|
find_package(Qt5Widgets ${QT_MIN_VERSION} REQUIRED)
|
||||||
|
find_package(Qt5Test ${QT_MIN_VERSION} REQUIRED)
|
||||||
|
set(${PROJECT_NAME}_LIBRARY_QTID "")
|
||||||
|
endif()
|
||||||
|
include(KDQtInstallPaths) #to set QT_INSTALL_FOO variables
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_DEPS "widgets")
|
||||||
|
if(${PROJECT_NAME}_QTQUICK)
|
||||||
|
find_package(Qt${Qt_VERSION_MAJOR}Quick)
|
||||||
|
find_package(Qt${Qt_VERSION_MAJOR}QuickControls2)
|
||||||
add_definitions(-DKDDOCKWIDGETS_QTQUICK)
|
add_definitions(-DKDDOCKWIDGETS_QTQUICK)
|
||||||
|
set(${PROJECT_NAME}_DEPS "${${PROJECT_NAME}_DEPS} quick quickcontrols2")
|
||||||
else()
|
else()
|
||||||
add_definitions(-DKDDOCKWIDGETS_QTWIDGETS)
|
add_definitions(-DKDDOCKWIDGETS_QTWIDGETS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(src)
|
if(NOT WIN32 AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ${PROJECT_NAME}_QT6 AND ${PROJECT_NAME}_X11EXTRAS)
|
||||||
add_subdirectory(examples/dockwidgets)
|
set(${PROJECT_NAME}_DEPS "${${PROJECT_NAME}_DEPS} x11extras")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (OPTION_DEVELOPER_MODE)
|
#Always build the test harness in developer-mode
|
||||||
if (NOT OPTION_QTQUICK)
|
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||||
enable_testing()
|
set(${PROJECT_NAME}_TESTS ON)
|
||||||
add_subdirectory(tests)
|
set(${PROJECT_NAME}_WERROR ON)
|
||||||
add_test(NAME tst_docks COMMAND tst_docks)
|
include(ECMEnableSanitizers)
|
||||||
add_test(NAME tst_multisplitter COMMAND tst_multisplitter)
|
endif()
|
||||||
|
|
||||||
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
|
set(IS_CLANG_BUILD TRUE)
|
||||||
|
else()
|
||||||
|
set(IS_CLANG_BUILD FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${PROJECT_NAME}_QTQUICK)
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
# Default to hidden visibility for symbols
|
||||||
|
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||||
|
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||||
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||||
|
|
||||||
|
macro(set_compiler_flags targetName)
|
||||||
|
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||||
|
target_compile_definitions(${targetName} PUBLIC DOCKS_DEVELOPER_MODE PRIVATE QT_FORCE_ASSERTS)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
target_compile_options(${targetName} PRIVATE -Wall -Wextra)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
target_compile_options(${targetName} PRIVATE -Wweak-vtables)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Enable -Werror
|
||||||
|
if(${PROJECT_NAME}_WERROR AND (NOT MSVC OR IS_CLANG_BUILD)) # clang-cl accepts these too
|
||||||
|
target_compile_options(${targetName} PRIVATE -Werror -Wundef -Wno-error=deprecated-declarations)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) OR
|
||||||
|
(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE) OR
|
||||||
|
(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32))
|
||||||
|
# Linker warnings should be treated as errors
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||||
|
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_MODULE_LINKER_FLAGS}")
|
||||||
|
|
||||||
|
string(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" compileflags)
|
||||||
|
if("${CMAKE_CXX_FLAGS} ${${compileflags}}" MATCHES "-fsanitize")
|
||||||
|
set(sanitizers_enabled TRUE)
|
||||||
|
else()
|
||||||
|
set(sanitizers_enabled FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# cannot enable this for clang + sanitizers
|
||||||
|
if (NOT sanitizers_enabled OR NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
# Do not allow undefined symbols, even in non-symbolic shared libraries
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||||
|
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(${PROJECT_NAME}_STATIC)
|
||||||
|
set(${PROJECT_NAME}_LIBRARY_MODE "STATIC")
|
||||||
|
else()
|
||||||
|
set(${PROJECT_NAME}_LIBRARY_MODE "SHARED")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(KDAB_INSTALL)
|
||||||
|
if(UNIX)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "/usr/local/KDAB/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}" CACHE INTERNAL "Install to default KDAB Location")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "C:\\KDAB\\${PROJECT_NAME}-$$VERSION" CACHE INTERNAL "Install to default KDAB Location")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# setup default install locations
|
||||||
|
include(InstallLocation)
|
||||||
|
|
||||||
|
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||||
|
set(${PROJECT_NAME}_IS_ROOT_PROJECT TRUE)
|
||||||
|
|
||||||
|
message(STATUS "Building ${PROJECT_NAME} ${${PROJECT_NAME}_VERSION} in ${CMAKE_BUILD_TYPE} mode. Installing to ${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
|
||||||
|
|
||||||
|
install(FILES LICENSE.txt README.md DESTINATION ${INSTALL_DOC_DIR})
|
||||||
|
install(DIRECTORY LICENSES DESTINATION ${INSTALL_DOC_DIR})
|
||||||
|
|
||||||
|
# Generate .pri file for qmake users
|
||||||
|
#TODO: ECM does not support Qt6 yet
|
||||||
|
if(Qt_VERSION_MAJOR EQUAL 5 AND
|
||||||
|
CMAKE_VERSION VERSION_GREATER "3.11.99" AND NOT CMAKE_CONFIGURATION_TYPES) # Not working with VS generator or older cmake versions
|
||||||
|
include(ECMGeneratePriFile)
|
||||||
|
set(PROJECT_VERSION_STRING ${${PROJECT_NAME}_VERSION})
|
||||||
|
ecm_generate_pri_file(BASE_NAME KDDockWidgets
|
||||||
|
LIB_NAME kddockwidgets
|
||||||
|
DEPS ${${PROJECT_NAME}_DEPS}
|
||||||
|
FILENAME_VAR pri_filename
|
||||||
|
INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
)
|
||||||
|
install(FILES ${pri_filename} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
if(${PROJECT_NAME}_PYTHON_BINDINGS)
|
||||||
|
if(CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR ${PROJECT_NAME}_STATIC)
|
||||||
|
message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.")
|
||||||
|
endif()
|
||||||
|
add_subdirectory(python)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${PROJECT_NAME}_IS_ROOT_PROJECT)
|
||||||
|
if(${PROJECT_NAME}_EXAMPLES)
|
||||||
|
if(${PROJECT_NAME}_QTQUICK)
|
||||||
|
add_subdirectory(examples/qtquick)
|
||||||
|
else()
|
||||||
|
add_subdirectory(examples/dockwidgets)
|
||||||
|
add_subdirectory(examples/minimal)
|
||||||
|
add_subdirectory(examples/minimal-mdi)
|
||||||
|
set_compiler_flags(kddockwidgets_example)
|
||||||
|
set_compiler_flags(kddockwidgets_minimal_example)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||||
|
|
||||||
|
if(${PROJECT_NAME}_TESTS)
|
||||||
|
enable_testing()
|
||||||
|
add_subdirectory(tests)
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
add_test(NAME tst_docks3 COMMAND tests_launcher 3 5)
|
||||||
|
add_test(NAME tst_docks4 COMMAND tests_launcher 4 5)
|
||||||
|
add_test(NAME tst_docks5 COMMAND tests_launcher 5 5)
|
||||||
|
add_test(NAME tst_docks6 COMMAND tests_launcher 6 5)
|
||||||
|
add_test(NAME tst_docks7 COMMAND tests_launcher 7 5)
|
||||||
|
add_test(NAME tst_docks8 COMMAND tests_launcher 8 5)
|
||||||
|
add_test(NAME tst_docks9 COMMAND tests_launcher 9 5)
|
||||||
|
add_test(NAME tst_docks10 COMMAND tests_launcher 10 5)
|
||||||
|
add_test(NAME tst_docks11 COMMAND tests_launcher 10 5)
|
||||||
|
add_test(NAME tst_docks12 COMMAND tests_launcher 11 5)
|
||||||
|
add_test(NAME tst_docks13 COMMAND tests_launcher 12 5)
|
||||||
|
add_test(NAME tst_docks14 COMMAND tests_launcher 13 5)
|
||||||
|
add_test(NAME tst_docks15 COMMAND tests_launcher 14 5)
|
||||||
|
add_test(NAME tst_docks16 COMMAND tests_launcher 15 5)
|
||||||
|
add_test(NAME tst_docks17 COMMAND tests_launcher 16 5)
|
||||||
|
add_test(NAME tst_docks18 COMMAND tests_launcher 17 5)
|
||||||
|
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()
|
||||||
|
if(NOT ${PROJECT_NAME}_QTQUICK)
|
||||||
|
# tst_multisplitter depends on QWidget
|
||||||
|
add_test(NAME tst_multisplitter COMMAND tst_multisplitter)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${PROJECT_NAME}_DOCS)
|
||||||
|
add_subdirectory(docs) # needs to go last, in case there are build source files
|
||||||
|
else()
|
||||||
|
add_custom_target(docs
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E echo "Sorry, there is no docs target since KDDockWidgets_DOCS=OFF."
|
||||||
|
"Re-run cmake with the -DKDDockWidgets_DOCS=True option if you want to generate the documentation.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Add uninstall target
|
||||||
|
include(ECMUninstallTarget)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||||
|
|||||||
318
CMakePresets.json
Normal file
318
CMakePresets.json
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "dev",
|
||||||
|
"displayName": "dev",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
||||||
|
"KDDockWidgets_FUZZER" : "OFF"
|
||||||
|
},
|
||||||
|
"warnings" : {
|
||||||
|
"uninitialized" : true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev-gammaray",
|
||||||
|
"displayName": "dev-gammaray",
|
||||||
|
"description": "A Gammaray friendly build. (No ASAN)",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev-gammaray",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
||||||
|
"KDDockWidgets_FUZZER" : "OFF"
|
||||||
|
},
|
||||||
|
"warnings" : {
|
||||||
|
"uninitialized" : true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clazy",
|
||||||
|
"displayName": "clazy",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-clazy",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_WERROR": "ON",
|
||||||
|
"KDDockWidgets_EXAMPLES" : "OFF"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CXX": "clazy",
|
||||||
|
"CCACHE_DISABLE" : "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clazy-qtquick",
|
||||||
|
"displayName": "clazy-qtquick",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-clazy-qtquick",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_EXAMPLES" : "OFF",
|
||||||
|
"KDDockWidgets_WERROR": "ON",
|
||||||
|
"KDDockWidgets_QTQUICK": "ON"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CXX": "clazy",
|
||||||
|
"CCACHE_DISABLE" : "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"displayName": "release",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-release",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"CMAKE_UNITY_BUILD" : "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "release-no-x11extras",
|
||||||
|
"displayName": "release-no-x11extras",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-release-no-x11extras",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"CMAKE_UNITY_BUILD" : "ON",
|
||||||
|
"KDDockWidgets_X11EXTRAS" : "OFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "release-qtquick",
|
||||||
|
"displayName": "release-qtquick",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-release-qtquick",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_QTQUICK": "ON",
|
||||||
|
"CMAKE_UNITY_BUILD" : "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev-qtquick",
|
||||||
|
"displayName": "dev-qtquick",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev-qtquick",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_QTQUICK": "ON",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
||||||
|
"KDDockWidgets_FUZZER" : "OFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "python",
|
||||||
|
"displayName": "python",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-python",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_PYTHON_BINDINGS": "ON",
|
||||||
|
"CMAKE_UNITY_BUILD" : "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "static",
|
||||||
|
"displayName": "static",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-static",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_STATIC": "ON",
|
||||||
|
"CMAKE_UNITY_BUILD" : "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "static-qtquick",
|
||||||
|
"displayName": "static-qtquick",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-static-qtquick",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_STATIC": "ON",
|
||||||
|
"KDDockWidgets_QTQUICK": "ON",
|
||||||
|
"CMAKE_UNITY_BUILD" : "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "release6",
|
||||||
|
"displayName": "release6",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-release6",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_QT6": "ON",
|
||||||
|
"CMAKE_UNITY_BUILD" : "ON",
|
||||||
|
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev6",
|
||||||
|
"displayName": "dev6",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev6",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_QT6": "ON",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
||||||
|
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
|
||||||
|
"KDDockWidgets_FUZZER" : "OFF",
|
||||||
|
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "release-qtquick6",
|
||||||
|
"displayName": "release-qtquick6",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-release-qtquick6",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_QTQUICK": "ON",
|
||||||
|
"KDDockWidgets_QT6": "ON",
|
||||||
|
"CMAKE_UNITY_BUILD" : "ON",
|
||||||
|
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev-qtquick6",
|
||||||
|
"displayName": "dev-qtquick6",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev-qtquick6",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_QTQUICK": "ON",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
|
||||||
|
"KDDockWidgets_QT6": "ON",
|
||||||
|
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}",
|
||||||
|
"QML2_IMPORT_PATH" : "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml",
|
||||||
|
"LD_LIBRARY_PATH" : "$env{QT6_DIR}/lib"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev-clangcl",
|
||||||
|
"displayName": "dev-clangcl",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev-clangcl",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
||||||
|
"KDDockWidgets_FUZZER" : "ON"
|
||||||
|
},
|
||||||
|
"warnings" : {
|
||||||
|
"uninitialized" : true
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CC": "clang-cl",
|
||||||
|
"CXX": "clang-cl"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev-qtquick-clangcl",
|
||||||
|
"displayName": "dev-qtquick-clangcl",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev-qtquick-clangcl",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"KDDockWidgets_FUZZER" : "OFF",
|
||||||
|
"KDDockWidgets_QTQUICK": "ON"
|
||||||
|
},
|
||||||
|
"warnings" : {
|
||||||
|
"uninitialized" : true
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CC": "clang-cl",
|
||||||
|
"CXX": "clang-cl"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev-clangcl6",
|
||||||
|
"displayName": "dev-clangcl6",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev-clangcl6",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"KDDockWidgets_FUZZER" : "ON",
|
||||||
|
"KDDockWidgets_QT6": "ON",
|
||||||
|
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
||||||
|
},
|
||||||
|
"warnings" : {
|
||||||
|
"uninitialized" : true
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CC": "clang-cl",
|
||||||
|
"CXX": "clang-cl",
|
||||||
|
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev-qtquick-clangcl6",
|
||||||
|
"displayName": "dev-qtquick-clangcl6",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev-qtquick-clangcl6",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"KDDockWidgets_FUZZER" : "OFF",
|
||||||
|
"KDDockWidgets_QTQUICK": "ON",
|
||||||
|
"KDDockWidgets_QT6": "ON",
|
||||||
|
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
||||||
|
},
|
||||||
|
"warnings" : {
|
||||||
|
"uninitialized" : true
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CC": "clang-cl",
|
||||||
|
"CXX": "clang-cl",
|
||||||
|
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}",
|
||||||
|
"QML2_IMPORT_PATH" : "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml",
|
||||||
|
"LD_LIBRARY_PATH" : "$env{QT6_DIR}/lib"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "clazy",
|
||||||
|
"configurePreset": "clazy",
|
||||||
|
"environment": {
|
||||||
|
"CLAZY_CHECKS" : "level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo",
|
||||||
|
"CCACHE_DISABLE" : "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clazy-qtquick",
|
||||||
|
"configurePreset": "clazy-qtquick",
|
||||||
|
"environment": {
|
||||||
|
"CLAZY_CHECKS" : "level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo",
|
||||||
|
"CCACHE_DISABLE" : "ON"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
8
CONTRIBUTORS.txt
Normal file
8
CONTRIBUTORS.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
People who have signed the CLA:
|
||||||
|
|
||||||
|
Christian Riggenbach <criggenbach@magahugu.ch>
|
||||||
|
Jacob Young <amazingjacob@gmail.com>
|
||||||
|
Matthew Waltz <matthewwaltzis@gmail.com>
|
||||||
|
Roman Pudashkin <r.pudashkin@gmail.com>
|
||||||
|
Elnur Ismailzada <eismailzada@gmail.com>
|
||||||
|
Daniel Price <danielp@nvidia.com>
|
||||||
146
Changelog
146
Changelog
@@ -1,10 +1,138 @@
|
|||||||
* v1.0 (November 4th, 2019)
|
* v1.5.0 (unreleased)
|
||||||
- Initial Release
|
- Install the Python bindings to "site-packages"
|
||||||
|
- The Python bindings for Qt6 use the "PyKDDockWidgetsQt6" namespace
|
||||||
|
- Co-installable with Qt6
|
||||||
|
- Adds support for non-detachable central widget, MainWindowOption_HasCentralWidget. (#225)
|
||||||
|
|
||||||
* v1.1 (, 2020)
|
* v1.4.1 (unreleased)
|
||||||
Features:
|
-
|
||||||
- Allow tab re-ordering with mouse, via KDDockWidgets::Config::Flag_AllowReorderTabs.
|
|
||||||
- Allow tabs to have a close button, via KDDockWidgets::Config::Flag_TabsHaveCloseButton.
|
* v1.4.0 (16 July 2021)
|
||||||
- Add support for lazy resize, via KDDockWidgets::Config::Flag_LazyResize. Resize is only done when mouse is released.
|
- No longer supports Qt versions less than 5.12
|
||||||
Fixes:
|
- Experimental MDI support. By using MainWindowMDI you can now have "docked" dock widgets
|
||||||
- Fix dock widgets not filling their complete available space
|
which are free to be arbitrarily positioned and even overlapped inside the main window.
|
||||||
|
- TitleBar's height is now controlled by sizeHint() instead of hardcoded.
|
||||||
|
If you haven't overridden TitleBar or just inheriting from TitleBarWidget then there's nothing to do,
|
||||||
|
as TitleBarWidget already reimplements sizeHint. If you're inheriting directly from TitleBar then make
|
||||||
|
sure to provide a sizeHint.
|
||||||
|
- Added MainWindow::closeDockWidgets()
|
||||||
|
- Fixed crash in MainWindow::layoutEqually()
|
||||||
|
- QtQuick: Added more declarative API
|
||||||
|
- FloatingWindow now honours the dockwidget's max-size, if there's a single
|
||||||
|
dock widget docked. Tabbed cases are more difficult since QStackedLayout doesn't
|
||||||
|
propagate size constraints.
|
||||||
|
- Added MainWindowBase::frameCountChanged()
|
||||||
|
- Introduced Config::setDropIndicatorsInhibited(), which allows you to disable support
|
||||||
|
for drop indicators while dragging.
|
||||||
|
- Fixed embedding the main window into a non-kddw main window (#204, #168)
|
||||||
|
- Fixed crash with an MFC application
|
||||||
|
- Allows to disable translucency via the KDDW_NO_TRANSLUCENCY env var, useful
|
||||||
|
in case running on weird Window Managers.
|
||||||
|
- Added Flag_ShowButtonsOnTabBarIfTitleBarHidden, which can be used when using Flag_HideTitleBarWhenTabsVisible.
|
||||||
|
The close and float buttons will be shown directly in the tab-bar.
|
||||||
|
- Fixes persistent central frame being invisible after closing all tabs (#220)
|
||||||
|
- Added python bindings for the InitialOption struct (#198)
|
||||||
|
- Generate and install camelcase forwarding headers (public, exported classes)
|
||||||
|
- Build in Release mode by default (in non-developer situations)
|
||||||
|
|
||||||
|
* v1.3.1 (7 June 2021)
|
||||||
|
- Improve restoring layout when RestoreOption_RelativeToMainWindow is used (#171)
|
||||||
|
- Improved dragging windows across screens in mixed hdpi setups
|
||||||
|
- Fixed Flag_NativeTitleBar not hiding the client title bars when restoring (#170)
|
||||||
|
- Double clicking a native title bar of a Qt::Tool window will now redock the window (#173)
|
||||||
|
- Size of FloatingWindow now accounts for the fact that it's using Flag_NativeTitleBar and
|
||||||
|
resizes its content accordingly (#174)
|
||||||
|
- Fixed popups on overlayed dock widgets not working
|
||||||
|
- Don't restore maximized state when using RestoreOption_RelativeToMainWindow (#184)
|
||||||
|
|
||||||
|
* v1.3.0 (8 February 2021)
|
||||||
|
- Experimental QtQuick support (#49)
|
||||||
|
- Added static DockWidgetBase::byName() (#126)
|
||||||
|
- The enum KDDockWidgets::AddingOption has been deprecated, use
|
||||||
|
KDDockWidgets::InitialVisibilityOption instead
|
||||||
|
- You can now pass a preferred initial size to MainWindow::addDockWidget() (#95)
|
||||||
|
- Added DockWidgetBase::Option_DeleteOnClose
|
||||||
|
- Added Config::Flag_CloseOnlyCurrentTab
|
||||||
|
- PySide6 support
|
||||||
|
- Layout restorer now restores maximzied/minimized state too (#81)
|
||||||
|
- Fixed dock indicators sometimes not appearing on Windows (#103)
|
||||||
|
- Fixed Flag_NativeTitleBar not working
|
||||||
|
- Fixed drag offset when dragging too fast with mouse
|
||||||
|
- Fixed bug where last tab index position wouldn't be remembered in case user
|
||||||
|
had manually reordered tabs (#154)
|
||||||
|
- Fixed crash when hosting a QQuickWidget (#150)
|
||||||
|
- Fixed CMake Visual Studio generator not working
|
||||||
|
- Sidebar overlays now maintain their size when toggled (#155)
|
||||||
|
- Added DockWidget::setFloatingGeometry() (#144)
|
||||||
|
|
||||||
|
* v1.2.1 (6 February 2021)
|
||||||
|
- Support for resizing dock widgets when they are in overlay/popup mode (autohide/sidebar feature)
|
||||||
|
- Fixed title bar close button enabled state not being restored with Layout saver (#137)
|
||||||
|
- Installs a version header (kddockwidgets_version.h) that defines a version string and other useful versioning macros (#138)
|
||||||
|
- DockWidgetBase::eventFilter() is protected instead of private (regression vs v1.1) (#148)
|
||||||
|
It's recommended that you rebuild your application when updating KDDW, as MSVC encodes private/protected in the name mangling.
|
||||||
|
- Fixed WASM build on Windows (#163)
|
||||||
|
- Fixed sidebar overlay not getting hidden when clicking on the main window docking area (#157)
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
The KDDockWidgets software is Copyright (C) 2018-2020 Klaralvdalens Datakonsult AB.
|
The KDDockWidgets software is Copyright (C) 2018-2021 Klaralvdalens Datakonsult AB.
|
||||||
|
|
||||||
You may use, distribute and copy the KDDockWidgets software under the terms of
|
You may use, distribute and copy the KDDockWidgets software under the terms of
|
||||||
the GNU General Public License version 2 or under the terms of GNU General
|
the GNU General Public License version 2 or under the terms of GNU General
|
||||||
|
|||||||
7
LICENSE.txt
Normal file
7
LICENSE.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
KDDockWidgets is (C) 2018-2021, Klarälvdalens Datakonsult AB, and is licensed
|
||||||
|
according to the terms of the:
|
||||||
|
GNU General Public License version 2.0 (see LICENSES/GPL-2.0-only.txt)
|
||||||
|
or the
|
||||||
|
GNU General Public License version 3.0 (see LICENSES/GPL-3.0-only.txt).
|
||||||
|
|
||||||
|
Contact KDAB at <info@kdab.com> to inquire about commercial licensing.
|
||||||
28
LICENSES/BSD-3-Clause.txt
Normal file
28
LICENSES/BSD-3-Clause.txt
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Copyright (c) <year> <owner>. All rights reserved.
|
||||||
|
|
||||||
|
This license applies to the CMake ECM modules only.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its contributors
|
||||||
|
may be used to endorse or promote products derived from this software without
|
||||||
|
specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||||
|
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
319
LICENSES/GPL-2.0-only.txt
Normal file
319
LICENSES/GPL-2.0-only.txt
Normal file
@@ -0,0 +1,319 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||||
|
document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your freedom to share
|
||||||
|
and change it. By contrast, the GNU General Public License is intended to
|
||||||
|
guarantee your freedom to share and change free software--to make sure the
|
||||||
|
software is free for all its users. This General Public License applies to
|
||||||
|
most of the Free Software Foundation's software and to any other program whose
|
||||||
|
authors commit to using it. (Some other Free Software Foundation software
|
||||||
|
is covered by the GNU Lesser General Public License instead.) You can apply
|
||||||
|
it to your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not price. Our
|
||||||
|
General Public Licenses are designed to make sure that you have the freedom
|
||||||
|
to distribute copies of free software (and charge for this service if you
|
||||||
|
wish), that you receive source code or can get it if you want it, that you
|
||||||
|
can change the software or use pieces of it in new free programs; and that
|
||||||
|
you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid anyone to
|
||||||
|
deny you these rights or to ask you to surrender the rights. These restrictions
|
||||||
|
translate to certain responsibilities for you if you distribute copies of
|
||||||
|
the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether gratis or
|
||||||
|
for a fee, you must give the recipients all the rights that you have. You
|
||||||
|
must make sure that they, too, receive or can get the source code. And you
|
||||||
|
must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||||
|
offer you this license which gives you legal permission to copy, distribute
|
||||||
|
and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain that
|
||||||
|
everyone understands that there is no warranty for this free software. If
|
||||||
|
the software is modified by someone else and passed on, we want its recipients
|
||||||
|
to know that what they have is not the original, so that any problems introduced
|
||||||
|
by others will not reflect on the original authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software patents. We
|
||||||
|
wish to avoid the danger that redistributors of a free program will individually
|
||||||
|
obtain patent licenses, in effect making the program proprietary. To prevent
|
||||||
|
this, we have made it clear that any patent must be licensed for everyone's
|
||||||
|
free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and modification
|
||||||
|
follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains a notice
|
||||||
|
placed by the copyright holder saying it may be distributed under the terms
|
||||||
|
of this General Public License. The "Program", below, refers to any such program
|
||||||
|
or work, and a "work based on the Program" means either the Program or any
|
||||||
|
derivative work under copyright law: that is to say, a work containing the
|
||||||
|
Program or a portion of it, either verbatim or with modifications and/or translated
|
||||||
|
into another language. (Hereinafter, translation is included without limitation
|
||||||
|
in the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not covered
|
||||||
|
by this License; they are outside its scope. The act of running the Program
|
||||||
|
is not restricted, and the output from the Program is covered only if its
|
||||||
|
contents constitute a work based on the Program (independent of having been
|
||||||
|
made by running the Program). Whether that is true depends on what the Program
|
||||||
|
does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's source code
|
||||||
|
as you receive it, in any medium, provided that you conspicuously and appropriately
|
||||||
|
publish on each copy an appropriate copyright notice and disclaimer of warranty;
|
||||||
|
keep intact all the notices that refer to this License and to the absence
|
||||||
|
of any warranty; and give any other recipients of the Program a copy of this
|
||||||
|
License along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and you
|
||||||
|
may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion of it,
|
||||||
|
thus forming a work based on the Program, and copy and distribute such modifications
|
||||||
|
or work under the terms of Section 1 above, provided that you also meet all
|
||||||
|
of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices stating that
|
||||||
|
you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in whole or
|
||||||
|
in part contains or is derived from the Program or any part thereof, to be
|
||||||
|
licensed as a whole at no charge to all third parties under the terms of this
|
||||||
|
License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively when run,
|
||||||
|
you must cause it, when started running for such interactive use in the most
|
||||||
|
ordinary way, to print or display an announcement including an appropriate
|
||||||
|
copyright notice and a notice that there is no warranty (or else, saying that
|
||||||
|
you provide a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this License.
|
||||||
|
(Exception: if the Program itself is interactive but does not normally print
|
||||||
|
such an announcement, your work based on the Program is not required to print
|
||||||
|
an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If identifiable
|
||||||
|
sections of that work are not derived from the Program, and can be reasonably
|
||||||
|
considered independent and separate works in themselves, then this License,
|
||||||
|
and its terms, do not apply to those sections when you distribute them as
|
||||||
|
separate works. But when you distribute the same sections as part of a whole
|
||||||
|
which is a work based on the Program, the distribution of the whole must be
|
||||||
|
on the terms of this License, whose permissions for other licensees extend
|
||||||
|
to the entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest your
|
||||||
|
rights to work written entirely by you; rather, the intent is to exercise
|
||||||
|
the right to control the distribution of derivative or collective works based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program with
|
||||||
|
the Program (or with a work based on the Program) on a volume of a storage
|
||||||
|
or distribution medium does not bring the other work under the scope of this
|
||||||
|
License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it, under Section
|
||||||
|
2) in object code or executable form under the terms of Sections 1 and 2 above
|
||||||
|
provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable source code,
|
||||||
|
which must be distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three years, to give
|
||||||
|
any third party, for a charge no more than your cost of physically performing
|
||||||
|
source distribution, a complete machine-readable copy of the corresponding
|
||||||
|
source code, to be distributed under the terms of Sections 1 and 2 above on
|
||||||
|
a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer to distribute
|
||||||
|
corresponding source code. (This alternative is allowed only for noncommercial
|
||||||
|
distribution and only if you received the program in object code or executable
|
||||||
|
form with such an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for making
|
||||||
|
modifications to it. For an executable work, complete source code means all
|
||||||
|
the source code for all modules it contains, plus any associated interface
|
||||||
|
definition files, plus the scripts used to control compilation and installation
|
||||||
|
of the executable. However, as a special exception, the source code distributed
|
||||||
|
need not include anything that is normally distributed (in either source or
|
||||||
|
binary form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component itself
|
||||||
|
accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering access to
|
||||||
|
copy from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place counts as distribution of the source code,
|
||||||
|
even though third parties are not compelled to copy the source along with
|
||||||
|
the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program except
|
||||||
|
as expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||||
|
sublicense or distribute the Program is void, and will automatically terminate
|
||||||
|
your rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses terminated
|
||||||
|
so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not signed
|
||||||
|
it. However, nothing else grants you permission to modify or distribute the
|
||||||
|
Program or its derivative works. These actions are prohibited by law if you
|
||||||
|
do not accept this License. Therefore, by modifying or distributing the Program
|
||||||
|
(or any work based on the Program), you indicate your acceptance of this License
|
||||||
|
to do so, and all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the Program),
|
||||||
|
the recipient automatically receives a license from the original licensor
|
||||||
|
to copy, distribute or modify the Program subject to these terms and conditions.
|
||||||
|
You may not impose any further restrictions on the recipients' exercise of
|
||||||
|
the rights granted herein. You are not responsible for enforcing compliance
|
||||||
|
by third parties to this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent infringement
|
||||||
|
or for any other reason (not limited to patent issues), conditions are imposed
|
||||||
|
on you (whether by court order, agreement or otherwise) that contradict the
|
||||||
|
conditions of this License, they do not excuse you from the conditions of
|
||||||
|
this License. If you cannot distribute so as to satisfy simultaneously your
|
||||||
|
obligations under this License and any other pertinent obligations, then as
|
||||||
|
a consequence you may not distribute the Program at all. For example, if a
|
||||||
|
patent license would not permit royalty-free redistribution of the Program
|
||||||
|
by all those who receive copies directly or indirectly through you, then the
|
||||||
|
only way you could satisfy both it and this License would be to refrain entirely
|
||||||
|
from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply and
|
||||||
|
the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any patents
|
||||||
|
or other property right claims or to contest validity of any such claims;
|
||||||
|
this section has the sole purpose of protecting the integrity of the free
|
||||||
|
software distribution system, which is implemented by public license practices.
|
||||||
|
Many people have made generous contributions to the wide range of software
|
||||||
|
distributed through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing to
|
||||||
|
distribute software through any other system and a licensee cannot impose
|
||||||
|
that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to be a
|
||||||
|
consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in certain
|
||||||
|
countries either by patents or by copyrighted interfaces, the original copyright
|
||||||
|
holder who places the Program under this License may add an explicit geographical
|
||||||
|
distribution limitation excluding those countries, so that distribution is
|
||||||
|
permitted only in or among countries not thus excluded. In such case, this
|
||||||
|
License incorporates the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the General Public License from time to time. Such new versions will be similar
|
||||||
|
in spirit to the present version, but may differ in detail to address new
|
||||||
|
problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program specifies
|
||||||
|
a version number of this License which applies to it and "any later version",
|
||||||
|
you have the option of following the terms and conditions either of that version
|
||||||
|
or of any later version published by the Free Software Foundation. If the
|
||||||
|
Program does not specify a version number of this License, you may choose
|
||||||
|
any version ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free programs
|
||||||
|
whose distribution conditions are different, write to the author to ask for
|
||||||
|
permission. For software which is copyrighted by the Free Software Foundation,
|
||||||
|
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||||
|
Our decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing and reuse
|
||||||
|
of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||||
|
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||||
|
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
|
||||||
|
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||||
|
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
|
||||||
|
OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
|
||||||
|
OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
|
||||||
|
OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
|
||||||
|
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
|
||||||
|
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest possible
|
||||||
|
use to the public, the best way to achieve this is to make it free software
|
||||||
|
which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest to attach
|
||||||
|
them to the start of each source file to most effectively convey the exclusion
|
||||||
|
of warranty; and each file should have at least the "copyright" line and a
|
||||||
|
pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and an idea of what it does.>
|
||||||
|
|
||||||
|
Copyright (C)< yyyy> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 2 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||||
|
Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this when
|
||||||
|
it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
|
||||||
|
with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software,
|
||||||
|
and you are welcome to redistribute it under certain conditions; type `show
|
||||||
|
c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may be
|
||||||
|
called something other than `show w' and `show c'; they could even be mouse-clicks
|
||||||
|
or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
|
||||||
|
is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'
|
||||||
|
(which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon >, 1 April 1989 Ty Coon, President of Vice This General
|
||||||
|
Public License does not permit incorporating your program into proprietary
|
||||||
|
programs. If your program is a subroutine library, you may consider it more
|
||||||
|
useful to permit linking proprietary applications with the library. If this
|
||||||
|
is what you want to do, use the GNU Lesser General Public License instead
|
||||||
|
of this License.
|
||||||
625
LICENSES/GPL-3.0-only.txt
Normal file
625
LICENSES/GPL-3.0-only.txt
Normal file
@@ -0,0 +1,625 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||||
|
document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for software and
|
||||||
|
other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed to take
|
||||||
|
away your freedom to share and change the works. By contrast, the GNU General
|
||||||
|
Public License is intended to guarantee your freedom to share and change all
|
||||||
|
versions of a program--to make sure it remains free software for all its users.
|
||||||
|
We, the Free Software Foundation, use the GNU General Public License for most
|
||||||
|
of our software; it applies also to any other work released this way by its
|
||||||
|
authors. You can apply it to your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not price. Our
|
||||||
|
General Public Licenses are designed to make sure that you have the freedom
|
||||||
|
to distribute copies of free software (and charge for them if you wish), that
|
||||||
|
you receive source code or can get it if you want it, that you can change
|
||||||
|
the software or use pieces of it in new free programs, and that you know you
|
||||||
|
can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you these rights
|
||||||
|
or asking you to surrender the rights. Therefore, you have certain responsibilities
|
||||||
|
if you distribute copies of the software, or if you modify it: responsibilities
|
||||||
|
to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether gratis or
|
||||||
|
for a fee, you must pass on to the recipients the same freedoms that you received.
|
||||||
|
You must make sure that they, too, receive or can get the source code. And
|
||||||
|
you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps: (1) assert
|
||||||
|
copyright on the software, and (2) offer you this License giving you legal
|
||||||
|
permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains that
|
||||||
|
there is no warranty for this free software. For both users' and authors'
|
||||||
|
sake, the GPL requires that modified versions be marked as changed, so that
|
||||||
|
their problems will not be attributed erroneously to authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run modified
|
||||||
|
versions of the software inside them, although the manufacturer can do so.
|
||||||
|
This is fundamentally incompatible with the aim of protecting users' freedom
|
||||||
|
to change the software. The systematic pattern of such abuse occurs in the
|
||||||
|
area of products for individuals to use, which is precisely where it is most
|
||||||
|
unacceptable. Therefore, we have designed this version of the GPL to prohibit
|
||||||
|
the practice for those products. If such problems arise substantially in other
|
||||||
|
domains, we stand ready to extend this provision to those domains in future
|
||||||
|
versions of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents. States
|
||||||
|
should not allow patents to restrict development and use of software on general-purpose
|
||||||
|
computers, but in those that do, we wish to avoid the special danger that
|
||||||
|
patents applied to a free program could make it effectively proprietary. To
|
||||||
|
prevent this, the GPL assures that patents cannot be used to render the program
|
||||||
|
non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and modification
|
||||||
|
follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of works,
|
||||||
|
such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this License.
|
||||||
|
Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals
|
||||||
|
or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work in
|
||||||
|
a fashion requiring copyright permission, other than the making of an exact
|
||||||
|
copy. The resulting work is called a "modified version" of the earlier work
|
||||||
|
or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based on the
|
||||||
|
Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without permission,
|
||||||
|
would make you directly or secondarily liable for infringement under applicable
|
||||||
|
copyright law, except executing it on a computer or modifying a private copy.
|
||||||
|
Propagation includes copying, distribution (with or without modification),
|
||||||
|
making available to the public, and in some countries other activities as
|
||||||
|
well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other parties
|
||||||
|
to make or receive copies. Mere interaction with a user through a computer
|
||||||
|
network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices" to the
|
||||||
|
extent that it includes a convenient and prominently visible feature that
|
||||||
|
(1) displays an appropriate copyright notice, and (2) tells the user that
|
||||||
|
there is no warranty for the work (except to the extent that warranties are
|
||||||
|
provided), that licensees may convey the work under this License, and how
|
||||||
|
to view a copy of this License. If the interface presents a list of user commands
|
||||||
|
or options, such as a menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work for making
|
||||||
|
modifications to it. "Object code" means any non-source form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official standard
|
||||||
|
defined by a recognized standards body, or, in the case of interfaces specified
|
||||||
|
for a particular programming language, one that is widely used among developers
|
||||||
|
working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other than
|
||||||
|
the work as a whole, that (a) is included in the normal form of packaging
|
||||||
|
a Major Component, but which is not part of that Major Component, and (b)
|
||||||
|
serves only to enable use of the work with that Major Component, or to implement
|
||||||
|
a Standard Interface for which an implementation is available to the public
|
||||||
|
in source code form. A "Major Component", in this context, means a major essential
|
||||||
|
component (kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to produce
|
||||||
|
the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all the source
|
||||||
|
code needed to generate, install, and (for an executable work) run the object
|
||||||
|
code and to modify the work, including scripts to control those activities.
|
||||||
|
However, it does not include the work's System Libraries, or general-purpose
|
||||||
|
tools or generally available free programs which are used unmodified in performing
|
||||||
|
those activities but which are not part of the work. For example, Corresponding
|
||||||
|
Source includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically linked
|
||||||
|
subprograms that the work is specifically designed to require, such as by
|
||||||
|
intimate data communication or control flow between those subprograms and
|
||||||
|
other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users can regenerate
|
||||||
|
automatically from other parts of the Corresponding Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of copyright
|
||||||
|
on the Program, and are irrevocable provided the stated conditions are met.
|
||||||
|
This License explicitly affirms your unlimited permission to run the unmodified
|
||||||
|
Program. The output from running a covered work is covered by this License
|
||||||
|
only if the output, given its content, constitutes a covered work. This License
|
||||||
|
acknowledges your rights of fair use or other equivalent, as provided by copyright
|
||||||
|
law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not convey, without
|
||||||
|
conditions so long as your license otherwise remains in force. You may convey
|
||||||
|
covered works to others for the sole purpose of having them make modifications
|
||||||
|
exclusively for you, or provide you with facilities for running those works,
|
||||||
|
provided that you comply with the terms of this License in conveying all material
|
||||||
|
for which you do not control copyright. Those thus making or running the covered
|
||||||
|
works for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of your copyrighted
|
||||||
|
material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under the conditions
|
||||||
|
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological measure
|
||||||
|
under any applicable law fulfilling obligations under article 11 of the WIPO
|
||||||
|
copyright treaty adopted on 20 December 1996, or similar laws prohibiting
|
||||||
|
or restricting circumvention of such measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid circumvention
|
||||||
|
of technological measures to the extent such circumvention is effected by
|
||||||
|
exercising rights under this License with respect to the covered work, and
|
||||||
|
you disclaim any intention to limit operation or modification of the work
|
||||||
|
as a means of enforcing, against the work's users, your or third parties'
|
||||||
|
legal rights to forbid circumvention of technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you receive
|
||||||
|
it, in any medium, provided that you conspicuously and appropriately publish
|
||||||
|
on each copy an appropriate copyright notice; keep intact all notices stating
|
||||||
|
that this License and any non-permissive terms added in accord with section
|
||||||
|
7 apply to the code; keep intact all notices of the absence of any warranty;
|
||||||
|
and give all recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey, and you
|
||||||
|
may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to produce
|
||||||
|
it from the Program, in the form of source code under the terms of section
|
||||||
|
4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified it, and
|
||||||
|
giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is released under
|
||||||
|
this License and any conditions added under section 7. This requirement modifies
|
||||||
|
the requirement in section 4 to "keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this License to anyone
|
||||||
|
who comes into possession of a copy. This License will therefore apply, along
|
||||||
|
with any applicable section 7 additional terms, to the whole of the work,
|
||||||
|
and all its parts, regardless of how they are packaged. This License gives
|
||||||
|
no permission to license the work in any other way, but it does not invalidate
|
||||||
|
such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display Appropriate
|
||||||
|
Legal Notices; however, if the Program has interactive interfaces that do
|
||||||
|
not display Appropriate Legal Notices, your work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent works,
|
||||||
|
which are not by their nature extensions of the covered work, and which are
|
||||||
|
not combined with it such as to form a larger program, in or on a volume of
|
||||||
|
a storage or distribution medium, is called an "aggregate" if the compilation
|
||||||
|
and its resulting copyright are not used to limit the access or legal rights
|
||||||
|
of the compilation's users beyond what the individual works permit. Inclusion
|
||||||
|
of a covered work in an aggregate does not cause this License to apply to
|
||||||
|
the other parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms of sections
|
||||||
|
4 and 5, provided that you also convey the machine-readable Corresponding
|
||||||
|
Source under the terms of this License, in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product (including
|
||||||
|
a physical distribution medium), accompanied by the Corresponding Source fixed
|
||||||
|
on a durable physical medium customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product (including
|
||||||
|
a physical distribution medium), accompanied by a written offer, valid for
|
||||||
|
at least three years and valid for as long as you offer spare parts or customer
|
||||||
|
support for that product model, to give anyone who possesses the object code
|
||||||
|
either (1) a copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical medium customarily
|
||||||
|
used for software interchange, for a price no more than your reasonable cost
|
||||||
|
of physically performing this conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the written
|
||||||
|
offer to provide the Corresponding Source. This alternative is allowed only
|
||||||
|
occasionally and noncommercially, and only if you received the object code
|
||||||
|
with such an offer, in accord with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated place (gratis
|
||||||
|
or for a charge), and offer equivalent access to the Corresponding Source
|
||||||
|
in the same way through the same place at no further charge. You need not
|
||||||
|
require recipients to copy the Corresponding Source along with the object
|
||||||
|
code. If the place to copy the object code is a network server, the Corresponding
|
||||||
|
Source may be on a different server (operated by you or a third party) that
|
||||||
|
supports equivalent copying facilities, provided you maintain clear directions
|
||||||
|
next to the object code saying where to find the Corresponding Source. Regardless
|
||||||
|
of what server hosts the Corresponding Source, you remain obligated to ensure
|
||||||
|
that it is available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided you inform
|
||||||
|
other peers where the object code and Corresponding Source of the work are
|
||||||
|
being offered to the general public at no charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded from
|
||||||
|
the Corresponding Source as a System Library, need not be included in conveying
|
||||||
|
the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any tangible
|
||||||
|
personal property which is normally used for personal, family, or household
|
||||||
|
purposes, or (2) anything designed or sold for incorporation into a dwelling.
|
||||||
|
In determining whether a product is a consumer product, doubtful cases shall
|
||||||
|
be resolved in favor of coverage. For a particular product received by a particular
|
||||||
|
user, "normally used" refers to a typical or common use of that class of product,
|
||||||
|
regardless of the status of the particular user or of the way in which the
|
||||||
|
particular user actually uses, or expects or is expected to use, the product.
|
||||||
|
A product is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent the
|
||||||
|
only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods, procedures,
|
||||||
|
authorization keys, or other information required to install and execute modified
|
||||||
|
versions of a covered work in that User Product from a modified version of
|
||||||
|
its Corresponding Source. The information must suffice to ensure that the
|
||||||
|
continued functioning of the modified object code is in no case prevented
|
||||||
|
or interfered with solely because modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or specifically
|
||||||
|
for use in, a User Product, and the conveying occurs as part of a transaction
|
||||||
|
in which the right of possession and use of the User Product is transferred
|
||||||
|
to the recipient in perpetuity or for a fixed term (regardless of how the
|
||||||
|
transaction is characterized), the Corresponding Source conveyed under this
|
||||||
|
section must be accompanied by the Installation Information. But this requirement
|
||||||
|
does not apply if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has been installed
|
||||||
|
in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a requirement
|
||||||
|
to continue to provide support service, warranty, or updates for a work that
|
||||||
|
has been modified or installed by the recipient, or for the User Product in
|
||||||
|
which it has been modified or installed. Access to a network may be denied
|
||||||
|
when the modification itself materially and adversely affects the operation
|
||||||
|
of the network or violates the rules and protocols for communication across
|
||||||
|
the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided, in accord
|
||||||
|
with this section must be in a format that is publicly documented (and with
|
||||||
|
an implementation available to the public in source code form), and must require
|
||||||
|
no special password or key for unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this License
|
||||||
|
by making exceptions from one or more of its conditions. Additional permissions
|
||||||
|
that are applicable to the entire Program shall be treated as though they
|
||||||
|
were included in this License, to the extent that they are valid under applicable
|
||||||
|
law. If additional permissions apply only to part of the Program, that part
|
||||||
|
may be used separately under those permissions, but the entire Program remains
|
||||||
|
governed by this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option remove any
|
||||||
|
additional permissions from that copy, or from any part of it. (Additional
|
||||||
|
permissions may be written to require their own removal in certain cases when
|
||||||
|
you modify the work.) You may place additional permissions on material, added
|
||||||
|
by you to a covered work, for which you have or can give appropriate copyright
|
||||||
|
permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you add
|
||||||
|
to a covered work, you may (if authorized by the copyright holders of that
|
||||||
|
material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the terms of
|
||||||
|
sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or author
|
||||||
|
attributions in that material or in the Appropriate Legal Notices displayed
|
||||||
|
by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or requiring
|
||||||
|
that modified versions of such material be marked in reasonable ways as different
|
||||||
|
from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or authors
|
||||||
|
of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some trade names,
|
||||||
|
trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that material by
|
||||||
|
anyone who conveys the material (or modified versions of it) with contractual
|
||||||
|
assumptions of liability to the recipient, for any liability that these contractual
|
||||||
|
assumptions directly impose on those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further restrictions"
|
||||||
|
within the meaning of section 10. If the Program as you received it, or any
|
||||||
|
part of it, contains a notice stating that it is governed by this License
|
||||||
|
along with a term that is a further restriction, you may remove that term.
|
||||||
|
If a license document contains a further restriction but permits relicensing
|
||||||
|
or conveying under this License, you may add to a covered work material governed
|
||||||
|
by the terms of that license document, provided that the further restriction
|
||||||
|
does not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you must place,
|
||||||
|
in the relevant source files, a statement of the additional terms that apply
|
||||||
|
to those files, or a notice indicating where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the form
|
||||||
|
of a separately written license, or stated as exceptions; the above requirements
|
||||||
|
apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly provided
|
||||||
|
under this License. Any attempt otherwise to propagate or modify it is void,
|
||||||
|
and will automatically terminate your rights under this License (including
|
||||||
|
any patent licenses granted under the third paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your license from
|
||||||
|
a particular copyright holder is reinstated (a) provisionally, unless and
|
||||||
|
until the copyright holder explicitly and finally terminates your license,
|
||||||
|
and (b) permanently, if the copyright holder fails to notify you of the violation
|
||||||
|
by some reasonable means prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is reinstated permanently
|
||||||
|
if the copyright holder notifies you of the violation by some reasonable means,
|
||||||
|
this is the first time you have received notice of violation of this License
|
||||||
|
(for any work) from that copyright holder, and you cure the violation prior
|
||||||
|
to 30 days after your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the licenses
|
||||||
|
of parties who have received copies or rights from you under this License.
|
||||||
|
If your rights have been terminated and not permanently reinstated, you do
|
||||||
|
not qualify to receive new licenses for the same material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or run a copy
|
||||||
|
of the Program. Ancillary propagation of a covered work occurring solely as
|
||||||
|
a consequence of using peer-to-peer transmission to receive a copy likewise
|
||||||
|
does not require acceptance. However, nothing other than this License grants
|
||||||
|
you permission to propagate or modify any covered work. These actions infringe
|
||||||
|
copyright if you do not accept this License. Therefore, by modifying or propagating
|
||||||
|
a covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically receives
|
||||||
|
a license from the original licensors, to run, modify and propagate that work,
|
||||||
|
subject to this License. You are not responsible for enforcing compliance
|
||||||
|
by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an organization,
|
||||||
|
or substantially all assets of one, or subdividing an organization, or merging
|
||||||
|
organizations. If propagation of a covered work results from an entity transaction,
|
||||||
|
each party to that transaction who receives a copy of the work also receives
|
||||||
|
whatever licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the Corresponding
|
||||||
|
Source of the work from the predecessor in interest, if the predecessor has
|
||||||
|
it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the rights
|
||||||
|
granted or affirmed under this License. For example, you may not impose a
|
||||||
|
license fee, royalty, or other charge for exercise of rights granted under
|
||||||
|
this License, and you may not initiate litigation (including a cross-claim
|
||||||
|
or counterclaim in a lawsuit) alleging that any patent claim is infringed
|
||||||
|
by making, using, selling, offering for sale, or importing the Program or
|
||||||
|
any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this License
|
||||||
|
of the Program or a work on which the Program is based. The work thus licensed
|
||||||
|
is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims owned or controlled
|
||||||
|
by the contributor, whether already acquired or hereafter acquired, that would
|
||||||
|
be infringed by some manner, permitted by this License, of making, using,
|
||||||
|
or selling its contributor version, but do not include claims that would be
|
||||||
|
infringed only as a consequence of further modification of the contributor
|
||||||
|
version. For purposes of this definition, "control" includes the right to
|
||||||
|
grant patent sublicenses in a manner consistent with the requirements of this
|
||||||
|
License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free patent
|
||||||
|
license under the contributor's essential patent claims, to make, use, sell,
|
||||||
|
offer for sale, import and otherwise run, modify and propagate the contents
|
||||||
|
of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express agreement
|
||||||
|
or commitment, however denominated, not to enforce a patent (such as an express
|
||||||
|
permission to practice a patent or covenant not to sue for patent infringement).
|
||||||
|
To "grant" such a patent license to a party means to make such an agreement
|
||||||
|
or commitment not to enforce a patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license, and the
|
||||||
|
Corresponding Source of the work is not available for anyone to copy, free
|
||||||
|
of charge and under the terms of this License, through a publicly available
|
||||||
|
network server or other readily accessible means, then you must either (1)
|
||||||
|
cause the Corresponding Source to be so available, or (2) arrange to deprive
|
||||||
|
yourself of the benefit of the patent license for this particular work, or
|
||||||
|
(3) arrange, in a manner consistent with the requirements of this License,
|
||||||
|
to extend the patent license to downstream recipients. "Knowingly relying"
|
||||||
|
means you have actual knowledge that, but for the patent license, your conveying
|
||||||
|
the covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that country
|
||||||
|
that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or arrangement,
|
||||||
|
you convey, or propagate by procuring conveyance of, a covered work, and grant
|
||||||
|
a patent license to some of the parties receiving the covered work authorizing
|
||||||
|
them to use, propagate, modify or convey a specific copy of the covered work,
|
||||||
|
then the patent license you grant is automatically extended to all recipients
|
||||||
|
of the covered work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within the scope
|
||||||
|
of its coverage, prohibits the exercise of, or is conditioned on the non-exercise
|
||||||
|
of one or more of the rights that are specifically granted under this License.
|
||||||
|
You may not convey a covered work if you are a party to an arrangement with
|
||||||
|
a third party that is in the business of distributing software, under which
|
||||||
|
you make payment to the third party based on the extent of your activity of
|
||||||
|
conveying the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory patent
|
||||||
|
license (a) in connection with copies of the covered work conveyed by you
|
||||||
|
(or copies made from those copies), or (b) primarily for and in connection
|
||||||
|
with specific products or compilations that contain the covered work, unless
|
||||||
|
you entered into that arrangement, or that patent license was granted, prior
|
||||||
|
to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting any implied
|
||||||
|
license or other defenses to infringement that may otherwise be available
|
||||||
|
to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or otherwise)
|
||||||
|
that contradict the conditions of this License, they do not excuse you from
|
||||||
|
the conditions of this License. If you cannot convey a covered work so as
|
||||||
|
to satisfy simultaneously your obligations under this License and any other
|
||||||
|
pertinent obligations, then as a consequence you may not convey it at all.
|
||||||
|
For example, if you agree to terms that obligate you to collect a royalty
|
||||||
|
for further conveying from those to whom you convey the Program, the only
|
||||||
|
way you could satisfy both those terms and this License would be to refrain
|
||||||
|
entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have permission to
|
||||||
|
link or combine any covered work with a work licensed under version 3 of the
|
||||||
|
GNU Affero General Public License into a single combined work, and to convey
|
||||||
|
the resulting work. The terms of this License will continue to apply to the
|
||||||
|
part which is the covered work, but the special requirements of the GNU Affero
|
||||||
|
General Public License, section 13, concerning interaction through a network
|
||||||
|
will apply to the combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of the
|
||||||
|
GNU General Public License from time to time. Such new versions will be similar
|
||||||
|
in spirit to the present version, but may differ in detail to address new
|
||||||
|
problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program specifies
|
||||||
|
that a certain numbered version of the GNU General Public License "or any
|
||||||
|
later version" applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that numbered version or of any later version published
|
||||||
|
by the Free Software Foundation. If the Program does not specify a version
|
||||||
|
number of the GNU General Public License, you may choose any version ever
|
||||||
|
published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future versions of
|
||||||
|
the GNU General Public License can be used, that proxy's public statement
|
||||||
|
of acceptance of a version permanently authorizes you to choose that version
|
||||||
|
for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different permissions. However,
|
||||||
|
no additional obligations are imposed on any author or copyright holder as
|
||||||
|
a result of your choosing to follow a later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
|
||||||
|
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||||
|
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM
|
||||||
|
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||||
|
CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
|
||||||
|
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM
|
||||||
|
AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
|
||||||
|
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO
|
||||||
|
USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
|
||||||
|
INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
|
||||||
|
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||||
|
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided above cannot
|
||||||
|
be given local legal effect according to their terms, reviewing courts shall
|
||||||
|
apply local law that most closely approximates an absolute waiver of all civil
|
||||||
|
liability in connection with the Program, unless a warranty or assumption
|
||||||
|
of liability accompanies a copy of the Program in return for a fee. END OF
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest possible
|
||||||
|
use to the public, the best way to achieve this is to make it free software
|
||||||
|
which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest to attach
|
||||||
|
them to the start of each source file to most effectively state the exclusion
|
||||||
|
of warranty; and each file should have at least the "copyright" line and a
|
||||||
|
pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short notice like
|
||||||
|
this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
|
||||||
|
This is free software, and you are welcome to redistribute it under certain
|
||||||
|
conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands might
|
||||||
|
be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary. For
|
||||||
|
more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General Public
|
||||||
|
License instead of this License. But first, please read <https://www.gnu.org/
|
||||||
|
licenses /why-not-lgpl.html>.
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
This software is provided as GPLv2 (read LICENSE.GPL.txt), or, alternatively,
|
|
||||||
contact KDAB at <info@kdab.com> if you need different licensing.
|
|
||||||
18
README-QtQuick.md
Normal file
18
README-QtQuick.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Supported Qt versions and toolchains
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
KDDockWidgets for QtQuick requires a C++17 capable compiler and either
|
||||||
|
Qt >= 5.15.0 or Qt >= 6.2.
|
||||||
|
|
||||||
|
|
||||||
|
TROUBLESHOOTING
|
||||||
|
===============
|
||||||
|
|
||||||
|
- QtGraphicalEffects is not supported, as it's buggy when moving between different QWindows.
|
||||||
|
See for example QTBUG-94943, KDDockWidgets issue #213. Also search the Qt bug tracker
|
||||||
|
for "QQuickItem: Cannot use same item on different windows at the same time"
|
||||||
|
|
||||||
|
- Very rarely, in some Nvidia/X11 setups, floating/docking has noticeable lag (like 1 second)
|
||||||
|
This could be solved by going to Nvidia's settings and making sure all monitors have
|
||||||
|
the same refresh rate and disabling "Allow Flipping". It's not known why this solves it. Might also
|
||||||
|
be a bug in Qt.
|
||||||
33
README-WASM.md
Normal file
33
README-WASM.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
|
- Might be slow on Linux, depending on your browser, while dragging or resizing windows.
|
||||||
|
Please file a bug with Qt, as it's out of scope for KDDW to fix.
|
||||||
|
|
||||||
|
Demo:
|
||||||
|
=====
|
||||||
|
|
||||||
|
A demo is available at https://demos.kdab.com/wasm/kddockwidgets/dockwidgets.html
|
||||||
|
|
||||||
|
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.a, 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
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.
|
||||||
74
README-bindings.md
Normal file
74
README-bindings.md
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
These are the instructions for building the Python bindings for KDDockWidgets.
|
||||||
|
|
||||||
|
Make sure you have PySide2, shiboken2 and shiboken2-generator installed.
|
||||||
|
As this time, you cannot get shiboken2-generator because the wheels are not on PyPi.
|
||||||
|
To use the wheels do this:
|
||||||
|
|
||||||
|
```
|
||||||
|
% pip3 install \
|
||||||
|
--index-url=http://download.qt.io/official_releases/QtForPython/ \
|
||||||
|
--trusted-host download.qt.io \
|
||||||
|
shiboken2 pyside2 shiboken2_generator
|
||||||
|
```
|
||||||
|
|
||||||
|
For more info visit https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html
|
||||||
|
|
||||||
|
afterwards run 'pip3 list | grep PySide2'
|
||||||
|
Note the version *must* match the same Qt you intend to use when building KDDockWidgets.
|
||||||
|
|
||||||
|
Not supported:
|
||||||
|
- Debug builds
|
||||||
|
- static builds
|
||||||
|
- python2 bindings
|
||||||
|
- only some 32-bit platforms are supported. see https://wiki.qt.io/Qt_for_Python
|
||||||
|
|
||||||
|
Tell CMake to build the bindings by passing the `-DKDDockWidgets_PYTHON_BINDINGS=True' option,
|
||||||
|
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 `-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
|
||||||
|
|
||||||
|
```
|
||||||
|
$ export PYTHONPATH=/kddw/install/path # Only if needed
|
||||||
|
$ cd python/examples/
|
||||||
|
$ rcc -g python -o rc_assets.py ../../examples/dockwidgets/resources_example.qrc
|
||||||
|
$ python3 main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
Build Issues
|
||||||
|
|
||||||
|
* If you see errors like "Unable to locate Clang's built-in include directory"
|
||||||
|
then first make sure you have llvm installed. If you still have problems try
|
||||||
|
setting the environment variable `LLVM_INSTALL_DIR` to point to your llvm installation.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
```
|
||||||
|
export LLVM_INSTALL_DIR=/usr/local/opt/llvm-11
|
||||||
|
set "LLVM_INSTALL_DIR=C:\Program Files\LLVM" #Windows
|
||||||
|
```
|
||||||
|
|
||||||
|
* When building the examples you may encounter errors loading shared libraries from shiboken2_generator.
|
||||||
|
|
||||||
|
Try:
|
||||||
|
|
||||||
|
```
|
||||||
|
export LD_LIBRARY_PATH=/usr/local/lib/python/dist-packages/PySide2/Qt/lib #linux
|
||||||
|
export DYLD_LIBRARY_PATH=/usr/local/lib/python/dist-packages/PySide2/Qt/lib #Mac
|
||||||
|
#adjust to wherever your PySide is installed
|
||||||
|
```
|
||||||
|
|
||||||
|
* On Windows the `libclang.dll` that ship with QtForPython is not compatible with MSVC2019.
|
||||||
|
To fix this, copy the `libclang.dll` that comes with llvm into shiboken2, like so:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd C:\Python37\Lib\site-packages\shiboken2_generator
|
||||||
|
copy libclang.dll libclang.dll.save
|
||||||
|
copy "C:\Program Files\llvm\bin\libclang.dll" libclang.dll
|
||||||
|
#Python3 installation in C:\Python37 and llvm in c:\Program Files\llvm. adjust as needed
|
||||||
|
```
|
||||||
3
README-troubleshooting
Normal file
3
README-troubleshooting
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# PySide: `ImportError: DLL load failed while importing KDDockWidgets`
|
||||||
|
|
||||||
|
If you're getting this error with Python see issue #114 and the proposed solution there.
|
||||||
174
README.md
174
README.md
@@ -1,7 +1,17 @@
|
|||||||
KDDockWidgets
|
[](https://travis-ci.com/KDAB/KDDockWidgets)
|
||||||
==============
|
|
||||||
`KDDockWidgets` is a KDAB effort to provide an advanced docking system for Qt.
|
|
||||||
|
|
||||||
|
KDDockWidgets
|
||||||
|
=============
|
||||||
|
`KDDockWidgets` is a Qt dock widget library written by KDAB, suitable for replacing
|
||||||
|
`QDockWidget` and implementing advanced functionalities missing in Qt.
|
||||||
|
|
||||||
|
Although `KDDockWidgets` is ready to be used out of the box, it can also be seen
|
||||||
|
as a framework to allow building very tailored custom docking systems. It tries
|
||||||
|
to expose every internal widget and every knob for the app developer to tune.
|
||||||
|
|
||||||
|
|
||||||
|
Motivation
|
||||||
|
==========
|
||||||
Throughout the years KDAB contributed and funded bug fixes and features to `QDockWidget`.
|
Throughout the years KDAB contributed and funded bug fixes and features to `QDockWidget`.
|
||||||
Sadly, this was very painful. Each bug fix or feature took many days of implementation,
|
Sadly, this was very painful. Each bug fix or feature took many days of implementation,
|
||||||
and an equal number of days just to fix dozens of regressions.
|
and an equal number of days just to fix dozens of regressions.
|
||||||
@@ -10,78 +20,170 @@ and an equal number of days just to fix dozens of regressions.
|
|||||||
to move forward with new features. Furthermore, our customers were getting more
|
to move forward with new features. Furthermore, our customers were getting more
|
||||||
creative with their requests, so it was clear we needed a better docking framework.
|
creative with their requests, so it was clear we needed a better docking framework.
|
||||||
|
|
||||||
|
You will find more information in these places:
|
||||||
|
|
||||||
|
* [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/)
|
||||||
|
|
||||||
|
We also have an [in browser demo](https://demos.kdab.com/wasm/kddockwidgets/dockwidgets.html). Note
|
||||||
|
however that this demo isn't fully featured, as it's running on Qt for WebAssembly.
|
||||||
|
|
||||||
Features
|
Features
|
||||||
========
|
========
|
||||||
- Provide advanced docking that QDockWidgets doesn't support
|
- Provide advanced docking that QDockWidget doesn't support
|
||||||
|
- Native window resize on Windows (allowing for Aero-snap even with custom title bar decorations)
|
||||||
|
- Arrow drop indicators for great drop precision
|
||||||
|
- Allow for totally different, user provided, drop indicator types
|
||||||
- Nesting dock widgets in a floating window and docking that group back to main window
|
- Nesting dock widgets in a floating window and docking that group back to main window
|
||||||
- Docking to any main window, not only to the parent main window
|
- Docking to any main window, not only to the parent main window
|
||||||
- Docking to center of main window, or simply removing the concept of "central widget"
|
- Docking to center of main window, or simply removing the concept of "central widget"
|
||||||
- Main window supporting detachable tabs in center widget
|
- Main window supporting detachable tabs in center widget
|
||||||
- Detaching arbitrary tabs from a tab bar into a dock area
|
- Detaching arbitrary tabs from a tab bar into a dock area
|
||||||
|
- Supporting more than 1 main window
|
||||||
|
- Support for affinities, making some dock widgets only dockable on certain main windows
|
||||||
|
- Allow to hide TitleBar and just show tabs. Allows dragging via the tab bar.
|
||||||
- Exposing inner helper widgets so the user can customize them or provide his own
|
- Exposing inner helper widgets so the user can customize them or provide his own
|
||||||
- Customize tab widgets
|
- Customize tab widgets
|
||||||
- Customize title bars
|
- Customize title bars
|
||||||
- Customize window frames
|
- Customize window frames
|
||||||
|
- Custom widget separators
|
||||||
|
- Cross-platform (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
|
- Clean codebase
|
||||||
- Not mixing GUI with state with logic with animations
|
- Not mixing GUI with state with logic with animations
|
||||||
- Unit-test everything, even the GUI and DnD operations (140 tests currently)
|
- Great test coverage, even the GUI and DnD operations are tested. 200 tests currently.
|
||||||
- Fuzzer for doing random testing
|
- Fuzzer for doing random testing and finding bugs
|
||||||
|
- Lazy separator resize
|
||||||
|
- Reordering tabs with mouse
|
||||||
|
- Partial layout save/restore, affecting only a chosen sub-set
|
||||||
|
- Double click on title bar to maximize
|
||||||
|
- 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 minimize and maximize button on the title bar
|
||||||
|
- FloatingWindows can be utility windows or full native
|
||||||
|
|
||||||

|
Screen capture
|
||||||
|
==============
|
||||||
Roadmap
|

|
||||||
========
|
|
||||||
- Different forms of docking indicators (through plugins)
|
|
||||||
- QtQuick support
|
|
||||||
|
|
||||||
|
|
||||||
Trying out the demo
|
Trying out the examples
|
||||||
====================
|
=======================
|
||||||
|
A full demo that showcases most of the features lives in [examples/dockwidgets](examples/dockwidgets).
|
||||||
|
|
||||||
Open a terminal capable of building Qt5 applications (Should have cmake, ninja, compiler, Qt, etc in PATH).
|
A simpler example can be found in [examples/minimal](examples/minimal),
|
||||||
|
which might be more indicated to learn the API, as it's less overwhelming than the full demo.
|
||||||
|
|
||||||
Feel free to adapt the instructions to suit your cmake generator and operating system.
|
Open a terminal capable of building Qt5 applications.
|
||||||
|
Make sure you have cmake, ninja, compiler, Qt, etc in PATH.
|
||||||
|
|
||||||
|
Adapt the instructions to suit your cmake generator and operating system.
|
||||||
Build and install the KDDockWidgets framework:
|
Build and install the KDDockWidgets framework:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/path/where/to/install ../path/to/kddockwidgets
|
$ cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/path/where/to/install ../path/to/kddockwidgets
|
||||||
$ make
|
$ cmake --build .
|
||||||
$ make install
|
$ cmake --build . --target install
|
||||||
```
|
```
|
||||||
|
|
||||||
Now build and run the example:
|
Now build and run the example:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd path/to/kddockwidgets/examples/dockwidgets/
|
$ cd path/to/kddockwidgets/examples/dockwidgets/
|
||||||
$ cmake -DCMAKE_PREFIX_PATH=/path/where/to/install
|
$ cmake -G Ninja -DCMAKE_PREFIX_PATH=/path/where/to/install
|
||||||
$ make
|
$ cmake --build .
|
||||||
$ ./kddockwidgets_example
|
$ ./kddockwidgets_example
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Supported Qt versions
|
The installation directory defaults to `c:\KDAB\KDDockWidgets-<version>` on Windows
|
||||||
======================
|
and `/usr/local/KDAB/KDDockWidgets-<version>` on non-Windows.
|
||||||
KDDockWidgets requires Qt >= 5.9
|
|
||||||
|
You can change the installation location by passing the option `-DCMAKE_INSTALL_PREFIX=/install/path` to cmake.
|
||||||
|
|
||||||
|
Using
|
||||||
|
=====
|
||||||
|
From your CMake Qt5 project, add
|
||||||
|
|
||||||
|
```
|
||||||
|
find_package(KDDockWidgets CONFIG)
|
||||||
|
```
|
||||||
|
|
||||||
|
or for Qt6
|
||||||
|
|
||||||
|
```
|
||||||
|
find_package(KDDockWidgets-qt6 CONFIG)
|
||||||
|
```
|
||||||
|
|
||||||
|
and link to the imported target `KDAB::kddockwidgets`.
|
||||||
|
That's all you need to do (the imported target also brings in the include directories)
|
||||||
|
|
||||||
|
You may also need to modify the `CMAKE_PREFIX_PATH` environment variable depending
|
||||||
|
on where you installed KDDockWidgets.
|
||||||
|
|
||||||
|
|
||||||
|
Python Bindings
|
||||||
|
================
|
||||||
|
Please refer to [README-bindings.md](README-bindings.md).
|
||||||
|
|
||||||
|
Versioning
|
||||||
|
==========
|
||||||
|
|
||||||
|
New features go to master while the stable branch only accepts non-intrusive bug fixes.
|
||||||
|
|
||||||
|
We'll try to remain source-compatible across versions. API will get a deprecation
|
||||||
|
notice before being removed in the next version. Note that this source-compatibility
|
||||||
|
effort is only for the public API. Private API (headers ending in _p.h) might change so you
|
||||||
|
shouldn't depend on them. Private API is only exposed so more advanced users can
|
||||||
|
override, for example `paintEvent()`, and not so they can change internal business logic.
|
||||||
|
|
||||||
|
We don't promise or test binary compatibility. It's advised that you recompile
|
||||||
|
your application whenever updating KDDW.
|
||||||
|
|
||||||
|
|
||||||
|
Supported Qt versions and toolchains
|
||||||
|
=====================================
|
||||||
|
KDDockWidgets requires Qt5 >= 5.12 or Qt6 >= 6.1.
|
||||||
|
The QtQuick support requires Qt5 >= 5.15 or Qt6 >= 6.1.
|
||||||
|
|
||||||
|
|
||||||
|
Regarding compilers, whatever toolchain is able to build Qt 5.9 should also be
|
||||||
|
fine. Note however that MSVC 2013 isn't supported anymore due to compiler crashes.
|
||||||
|
|
||||||
|
|
||||||
Licensing
|
Licensing
|
||||||
=========
|
=========
|
||||||
KDDockWidgets is (C) 2018-2020, Klarälvdalens Datakonsult AB, and is available
|
KDDockWidgets is (C) 2019-2021, Klarälvdalens Datakonsult AB, and is licensed according to
|
||||||
under the terms of the GPLv2 (see LICENSE.GPL.txt).
|
the terms of the [GPL 2.0](LICENSES/GPL-2.0-only.txt) or [GPL 3.0](LICENSES/GPL-3.0-only.txt).
|
||||||
|
|
||||||
|
Contact KDAB at <info@kdab.com> to inquire about commercial licensing.
|
||||||
|
|
||||||
Contact KDAB at <info@kdab.com> if you need different licensing options.
|
|
||||||
|
|
||||||
Get Involved
|
Get Involved
|
||||||
============
|
============
|
||||||
KDAB will happily accept external contributions; however, **all**
|
Please submit your issue reports to our GitHub space at
|
||||||
contributions will require a signed Contributor License Agreement
|
https://github.com/KDAB/KDDockWidgets
|
||||||
(see docs/KDDockWidgets-CopyrightAssignmentForm.docx).
|
|
||||||
|
|
||||||
|
When reporting bugs please make it easy for the maintainer to reproduce it. Use `examples/minimal/` or
|
||||||
|
`examples/dockwidgets/` for reproducing the problem. If you did modifications to the example in order to
|
||||||
|
reproduce then please attach the *patch* and not a picture of your changes. You can get a patch by doing
|
||||||
|
`git diff > repro.diff` at the repo root.
|
||||||
|
|
||||||
|
Also state which KDDW sha1, branch or version you're using, and which operating system.
|
||||||
|
|
||||||
|
|
||||||
|
KDAB will happily accept external contributions; however, **all** contributions require a
|
||||||
|
signed [Copyright Assignment Agreement](docs/KDDockWidgets-CopyrightAssignmentForm.pdf).
|
||||||
|
|
||||||
|
This is needed so we can continue to dual-license it.
|
||||||
|
|
||||||
Contact info@kdab.com for more information.
|
Contact info@kdab.com for more information.
|
||||||
|
|
||||||
Please submit your contributions or issue reports from our GitHub space at
|
Thanks to our [contributors](CONTRIBUTORS.txt).
|
||||||
https://github.com/KDAB/KDDockWidgets
|
|
||||||
|
|
||||||
About KDAB
|
About KDAB
|
||||||
==========
|
==========
|
||||||
@@ -97,3 +199,9 @@ 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.
|
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.
|
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)
|
||||||
|
* [KDAB on Twitter](https://twitter.com/KDABQt)
|
||||||
|
|||||||
80
appveyor.yml
Normal file
80
appveyor.yml
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
#---------------------------------#
|
||||||
|
# general configuration #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
# version format
|
||||||
|
version: 1.0.{build}-{branch}
|
||||||
|
|
||||||
|
# branches to build
|
||||||
|
branches:
|
||||||
|
except:
|
||||||
|
- gh-pages
|
||||||
|
|
||||||
|
# Do not build on tags (GitHub and BitBucket)
|
||||||
|
skip_tags: false
|
||||||
|
|
||||||
|
#---------------------------------#
|
||||||
|
# environment configuration #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
# Build worker image
|
||||||
|
image:
|
||||||
|
- Visual Studio 2019
|
||||||
|
|
||||||
|
# scripts that are called at very beginning, before repo cloning
|
||||||
|
init:
|
||||||
|
- git config --global core.autocrlf input
|
||||||
|
|
||||||
|
#---------------------------------#
|
||||||
|
# build configuration #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
|
||||||
|
platform:
|
||||||
|
- x64
|
||||||
|
|
||||||
|
# build Configuration, i.e. Debug, Release, etc.
|
||||||
|
configuration:
|
||||||
|
- Release
|
||||||
|
|
||||||
|
install:
|
||||||
|
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||||
|
- set QTDIR=C:\Qt\5.15\msvc2019_64
|
||||||
|
- set PATH=%QTDIR%\bin;%PATH%
|
||||||
|
build_script:
|
||||||
|
- mkdir build
|
||||||
|
- cd build
|
||||||
|
- cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DKDDockWidgets_TESTS=True -DKDDockWidgets_EXAMPLES=True -DKDDockWidgets_DEVELOPER_MODE=True ..
|
||||||
|
- nmake
|
||||||
|
|
||||||
|
# to disable automatic builds
|
||||||
|
#build: off
|
||||||
|
|
||||||
|
#---------------------------------#
|
||||||
|
# tests configuration #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
- nmake test
|
||||||
|
|
||||||
|
# to disable automatic tests
|
||||||
|
#test: off
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------#
|
||||||
|
# deployment configuration #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
deploy: off
|
||||||
|
|
||||||
|
#---------------------------------#
|
||||||
|
# notifications #
|
||||||
|
#---------------------------------#
|
||||||
|
notifications:
|
||||||
|
# Email
|
||||||
|
- provider: Email
|
||||||
|
to:
|
||||||
|
- allen.winter@kdab.com
|
||||||
|
- sergio.martins@kdab.com
|
||||||
|
on_build_success: false
|
||||||
|
on_build_failure: true
|
||||||
28
cmake/ECM/modules/BSD-3-Clause.txt
Normal file
28
cmake/ECM/modules/BSD-3-Clause.txt
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Copyright (c) <year> <owner>. All rights reserved.
|
||||||
|
|
||||||
|
This license applies to the CMake ECM modules only.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its contributors
|
||||||
|
may be used to endorse or promote products derived from this software without
|
||||||
|
specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||||
|
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@@ -40,6 +40,8 @@
|
|||||||
# - thread
|
# - thread
|
||||||
# - leak
|
# - leak
|
||||||
# - undefined
|
# - undefined
|
||||||
|
# - fuzzer-no-link
|
||||||
|
# - fuzzer
|
||||||
#
|
#
|
||||||
# The sanitizers "address", "memory" and "thread" are mutually exclusive. You
|
# The sanitizers "address", "memory" and "thread" are mutually exclusive. You
|
||||||
# cannot enable two of them in the same build.
|
# cannot enable two of them in the same build.
|
||||||
@@ -69,30 +71,9 @@
|
|||||||
# Since 1.3.0.
|
# Since 1.3.0.
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2014 Mathieu Tarral <mathieu.tarral@gmail.com>
|
# SPDX-FileCopyrightText: 2014 Mathieu Tarral <mathieu.tarral@gmail.com>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
# modification, are permitted provided that the following conditions
|
|
||||||
# are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer.
|
|
||||||
# 2. Redistributions in binary form must reproduce the copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer in the
|
|
||||||
# documentation and/or other materials provided with the distribution.
|
|
||||||
# 3. The name of the author may not be used to endorse or promote products
|
|
||||||
# derived from this software without specific prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
||||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
||||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
||||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
||||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
# MACRO check_compiler_version
|
# MACRO check_compiler_version
|
||||||
#-----------------------------
|
#-----------------------------
|
||||||
@@ -122,27 +103,47 @@ endmacro ()
|
|||||||
# MACRO check_compiler_support
|
# MACRO check_compiler_support
|
||||||
#------------------------------
|
#------------------------------
|
||||||
macro (enable_sanitizer_flags sanitize_option)
|
macro (enable_sanitizer_flags sanitize_option)
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
|
if (${sanitize_option} MATCHES "address")
|
||||||
|
set(msvc_asan_required_version "19.28")
|
||||||
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${msvc_asan_required_version})
|
||||||
|
message(WARNING "Address sanitizer requires at least MSVC ${msvc_asan_required_version}")
|
||||||
|
else()
|
||||||
|
set(XSAN_COMPILE_FLAGS "-fsanitize=address")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(WARNING "Compiler sanitizer option \"${sanitize_option}\" not supported on MSVC yet")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
if (${sanitize_option} MATCHES "address")
|
if (${sanitize_option} MATCHES "address")
|
||||||
check_compiler_version("4.8" "3.1")
|
check_compiler_version("4.8" "3.1")
|
||||||
set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||||
set(XSAN_LINKER_FLAGS "-lasan")
|
set(XSAN_LINKER_FLAGS "asan")
|
||||||
elseif (${sanitize_option} MATCHES "thread")
|
elseif (${sanitize_option} MATCHES "thread")
|
||||||
check_compiler_version("4.8" "3.1")
|
check_compiler_version("4.8" "3.1")
|
||||||
set(XSAN_COMPILE_FLAGS "-fsanitize=thread")
|
set(XSAN_COMPILE_FLAGS "-fsanitize=thread")
|
||||||
set(XSAN_LINKER_FLAGS "-ltsan")
|
set(XSAN_LINKER_FLAGS "tsan")
|
||||||
elseif (${sanitize_option} MATCHES "memory")
|
elseif (${sanitize_option} MATCHES "memory")
|
||||||
check_compiler_version("99.99" "3.1")
|
check_compiler_version("99.99" "3.1")
|
||||||
set(XSAN_COMPILE_FLAGS "-fsanitize=memory")
|
set(XSAN_COMPILE_FLAGS "-fsanitize=memory")
|
||||||
elseif (${sanitize_option} MATCHES "leak")
|
elseif (${sanitize_option} MATCHES "leak")
|
||||||
check_compiler_version("4.9" "3.4")
|
check_compiler_version("4.9" "3.4")
|
||||||
set(XSAN_COMPILE_FLAGS "-fsanitize=leak")
|
set(XSAN_COMPILE_FLAGS "-fsanitize=leak")
|
||||||
set(XSAN_LINKER_FLAGS "-llsan")
|
set(XSAN_LINKER_FLAGS "lsan")
|
||||||
elseif (${sanitize_option} MATCHES "undefined")
|
elseif (${sanitize_option} MATCHES "undefined")
|
||||||
check_compiler_version("4.9" "3.1")
|
check_compiler_version("4.9" "3.1")
|
||||||
set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||||
|
elseif (${sanitize_option} MATCHES "fuzzer-no-link")
|
||||||
|
check_compiler_version("99.99" "6.0")
|
||||||
|
set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer-no-link")
|
||||||
|
set(XSAN_LINKER_FLAGS "-fsanitize=fuzzer-no-link")
|
||||||
|
elseif (${sanitize_option} MATCHES "fuzzer")
|
||||||
|
check_compiler_version("99.99" "6.0")
|
||||||
|
set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer")
|
||||||
else ()
|
else ()
|
||||||
message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
|
message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
|
||||||
endif ()
|
endif ()
|
||||||
|
endif()
|
||||||
endmacro ()
|
endmacro ()
|
||||||
|
|
||||||
if (ECM_ENABLE_SANITIZERS)
|
if (ECM_ENABLE_SANITIZERS)
|
||||||
@@ -155,18 +156,22 @@ if (ECM_ENABLE_SANITIZERS)
|
|||||||
enable_sanitizer_flags ( ${CUR_SANITIZER} )
|
enable_sanitizer_flags ( ${CUR_SANITIZER} )
|
||||||
# TODO: GCC will not link pthread library if enabled ASan
|
# TODO: GCC will not link pthread library if enabled ASan
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} ${XSAN_COMPILE_FLAGS}" )
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XSAN_COMPILE_FLAGS}" )
|
||||||
endif()
|
endif()
|
||||||
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" )
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" )
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${XSAN_LINKER_FLAGS}")
|
link_libraries(${XSAN_LINKER_FLAGS})
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${XSAN_LINKER_FLAGS}")
|
|
||||||
endif()
|
endif()
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||||
string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
|
string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
|
||||||
endif ()
|
endif ()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
|
foreach (CUR_SANITIZER ${ECM_ENABLE_SANITIZERS})
|
||||||
|
enable_sanitizer_flags(${CUR_SANITIZER})
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}")
|
||||||
|
endforeach()
|
||||||
else()
|
else()
|
||||||
message(STATUS "Tried to enable sanitizers (-DECM_ENABLE_SANITIZERS=${ECM_ENABLE_SANITIZERS}), \
|
message(STATUS "Tried to enable sanitizers (-DECM_ENABLE_SANITIZERS=${ECM_ENABLE_SANITIZERS}), \
|
||||||
but compiler (${CMAKE_CXX_COMPILER_ID}) does not have sanitizer support")
|
but compiler (${CMAKE_CXX_COMPILER_ID}) does not have sanitizer support")
|
||||||
|
|||||||
223
cmake/ECM/modules/ECMGenerateHeaders.cmake
Normal file
223
cmake/ECM/modules/ECMGenerateHeaders.cmake
Normal file
@@ -0,0 +1,223 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2013 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
|
||||||
|
# SPDX-FileCopyrightText: 2014 Alex Merry <alex.merry@kdemail.net>
|
||||||
|
# SPDX-FileCopyrightText: 2015 Patrick Spendrin <patrick.spendrin@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
ECMGenerateHeaders
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Generate C/C++ CamelCase forwarding headers.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
ecm_generate_headers(<camelcase_forwarding_headers_var>
|
||||||
|
HEADER_NAMES <CamelCaseName> [<CamelCaseName> [...]]
|
||||||
|
[ORIGINAL <CAMELCASE|LOWERCASE>]
|
||||||
|
[HEADER_EXTENSION <header_extension>]
|
||||||
|
[OUTPUT_DIR <output_dir>]
|
||||||
|
[PREFIX <prefix>]
|
||||||
|
[REQUIRED_HEADERS <variable>]
|
||||||
|
[COMMON_HEADER <HeaderName>]
|
||||||
|
[RELATIVE <relative_path>])
|
||||||
|
|
||||||
|
For each CamelCase header name passed to HEADER_NAMES, a file of that name
|
||||||
|
will be generated that will include a version with ``.h`` or, if set,
|
||||||
|
``.<header_extension>`` appended.
|
||||||
|
For example, the generated header ``ClassA`` will include ``classa.h`` (or
|
||||||
|
``ClassA.h``, see ORIGINAL).
|
||||||
|
If a CamelCaseName consists of multiple comma-separated files, e.g.
|
||||||
|
``ClassA,ClassB,ClassC``, then multiple camelcase header files will be
|
||||||
|
generated which are redirects to the first header file.
|
||||||
|
The file locations of these generated headers will be stored in
|
||||||
|
<camelcase_forwarding_headers_var>.
|
||||||
|
|
||||||
|
ORIGINAL specifies how the name of the original header is written: lowercased
|
||||||
|
or also camelcased. The default is LOWERCASE. Since 1.8.0.
|
||||||
|
|
||||||
|
HEADER_EXTENSION specifies what file name extension is used for the header
|
||||||
|
files. The default is "h". Since 5.48.0.
|
||||||
|
|
||||||
|
PREFIX places the generated headers in subdirectories. This should be a
|
||||||
|
CamelCase name like ``KParts``, which will cause the CamelCase forwarding
|
||||||
|
headers to be placed in the ``KParts`` directory (e.g. ``KParts/Part``). It
|
||||||
|
will also, for the convenience of code in the source distribution, generate
|
||||||
|
forwarding headers based on the original names (e.g. ``kparts/part.h``). This
|
||||||
|
allows includes like ``"#include <kparts/part.h>"`` to be used before
|
||||||
|
installation, as long as the include_directories are set appropriately.
|
||||||
|
|
||||||
|
OUTPUT_DIR specifies where the files will be generated; this should be within
|
||||||
|
the build directory. By default, ``${CMAKE_CURRENT_BINARY_DIR}`` will be used.
|
||||||
|
This option can be used to avoid file conflicts.
|
||||||
|
|
||||||
|
REQUIRED_HEADERS specifies an output variable name where all the required
|
||||||
|
headers will be appended so that they can be installed together with the
|
||||||
|
generated ones. This is mostly intended as a convenience so that adding a new
|
||||||
|
header to a project only requires specifying the CamelCase variant in the
|
||||||
|
CMakeLists.txt file; the original variant will then be added to this
|
||||||
|
variable.
|
||||||
|
|
||||||
|
COMMON_HEADER generates an additional convenience header which includes all
|
||||||
|
other header files.
|
||||||
|
|
||||||
|
The RELATIVE argument indicates where the original headers can be found
|
||||||
|
relative to CMAKE_CURRENT_SOURCE_DIR. It does not affect the generated
|
||||||
|
CamelCase forwarding files, but ecm_generate_headers() uses it when checking
|
||||||
|
that the original header exists, and to generate originally named forwarding
|
||||||
|
headers when PREFIX is set.
|
||||||
|
|
||||||
|
To allow other parts of the source distribution (eg: tests) to use the
|
||||||
|
generated headers before installation, it may be desirable to set the
|
||||||
|
INCLUDE_DIRECTORIES property for the library target to output_dir. For
|
||||||
|
example, if OUTPUT_DIR is CMAKE_CURRENT_BINARY_DIR (the default), you could do
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
target_include_directories(MyLib PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
|
||||||
|
|
||||||
|
Example usage (without PREFIX):
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
ecm_generate_headers(
|
||||||
|
MyLib_FORWARDING_HEADERS
|
||||||
|
HEADERS
|
||||||
|
MLFoo
|
||||||
|
MLBar
|
||||||
|
# etc
|
||||||
|
REQUIRED_HEADERS MyLib_HEADERS
|
||||||
|
COMMON_HEADER MLGeneral
|
||||||
|
)
|
||||||
|
install(FILES ${MyLib_FORWARDING_HEADERS} ${MyLib_HEADERS}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
|
||||||
|
COMPONENT Devel)
|
||||||
|
|
||||||
|
Example usage (with PREFIX):
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
ecm_generate_headers(
|
||||||
|
MyLib_FORWARDING_HEADERS
|
||||||
|
HEADERS
|
||||||
|
Foo
|
||||||
|
# several classes are contained in bar.h, so generate
|
||||||
|
# additional files
|
||||||
|
Bar,BarList
|
||||||
|
# etc
|
||||||
|
PREFIX MyLib
|
||||||
|
REQUIRED_HEADERS MyLib_HEADERS
|
||||||
|
)
|
||||||
|
install(FILES ${MyLib_FORWARDING_HEADERS}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/MyLib
|
||||||
|
COMPONENT Devel)
|
||||||
|
install(FILES ${MyLib_HEADERS}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/mylib
|
||||||
|
COMPONENT Devel)
|
||||||
|
|
||||||
|
Since pre-1.0.0.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
include(CMakeParseArguments)
|
||||||
|
|
||||||
|
function(ECM_GENERATE_HEADERS camelcase_forwarding_headers_var)
|
||||||
|
set(options)
|
||||||
|
set(oneValueArgs ORIGINAL HEADER_EXTENSION OUTPUT_DIR PREFIX REQUIRED_HEADERS COMMON_HEADER RELATIVE)
|
||||||
|
set(multiValueArgs HEADER_NAMES)
|
||||||
|
cmake_parse_arguments(EGH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
|
if (EGH_UNPARSED_ARGUMENTS)
|
||||||
|
message(FATAL_ERROR "Unexpected arguments to ECM_GENERATE_HEADERS: ${EGH_UNPARSED_ARGUMENTS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT EGH_HEADER_NAMES)
|
||||||
|
message(FATAL_ERROR "Missing header_names argument to ECM_GENERATE_HEADERS")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT EGH_ORIGINAL)
|
||||||
|
# default
|
||||||
|
set(EGH_ORIGINAL "LOWERCASE")
|
||||||
|
endif()
|
||||||
|
if(NOT EGH_ORIGINAL STREQUAL "LOWERCASE" AND NOT EGH_ORIGINAL STREQUAL "CAMELCASE")
|
||||||
|
message(FATAL_ERROR "Unexpected value for original argument to ECM_GENERATE_HEADERS: ${EGH_ORIGINAL}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT EGH_HEADER_EXTENSION)
|
||||||
|
set(EGH_HEADER_EXTENSION "h")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT EGH_OUTPUT_DIR)
|
||||||
|
set(EGH_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Make sure EGH_RELATIVE is /-terminated when it's not empty
|
||||||
|
if (EGH_RELATIVE AND NOT "${EGH_RELATIVE}" MATCHES "^.*/$")
|
||||||
|
set(EGH_RELATIVE "${EGH_RELATIVE}/")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(originalprefix)
|
||||||
|
if (EGH_PREFIX)
|
||||||
|
if (NOT "${EGH_PREFIX}" MATCHES "^.*/$")
|
||||||
|
set(EGH_PREFIX "${EGH_PREFIX}/")
|
||||||
|
endif()
|
||||||
|
if (EGH_ORIGINAL STREQUAL "CAMELCASE")
|
||||||
|
set(originalprefix "${EGH_PREFIX}")
|
||||||
|
else()
|
||||||
|
string(TOLOWER "${EGH_PREFIX}" originalprefix)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
foreach(_classnameentry ${EGH_HEADER_NAMES})
|
||||||
|
string(REPLACE "," ";" _classnames ${_classnameentry})
|
||||||
|
list(GET _classnames 0 _baseclass)
|
||||||
|
|
||||||
|
if (EGH_ORIGINAL STREQUAL "CAMELCASE")
|
||||||
|
set(originalbasename "${_baseclass}")
|
||||||
|
else()
|
||||||
|
string(TOLOWER "${_baseclass}" originalbasename)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_actualheader "${CMAKE_CURRENT_SOURCE_DIR}/${EGH_RELATIVE}${originalbasename}.${EGH_HEADER_EXTENSION}")
|
||||||
|
if (NOT EXISTS ${_actualheader})
|
||||||
|
message(FATAL_ERROR "Could not find \"${_actualheader}\"")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
foreach(_CLASSNAME ${_classnames})
|
||||||
|
set(FANCY_HEADER_FILE "${EGH_OUTPUT_DIR}/${EGH_PREFIX}${_CLASSNAME}")
|
||||||
|
if (NOT EXISTS ${FANCY_HEADER_FILE})
|
||||||
|
file(WRITE ${FANCY_HEADER_FILE} "#include \"${originalprefix}${originalbasename}.${EGH_HEADER_EXTENSION}\"\n")
|
||||||
|
endif()
|
||||||
|
list(APPEND ${camelcase_forwarding_headers_var} "${FANCY_HEADER_FILE}")
|
||||||
|
if (EGH_PREFIX)
|
||||||
|
# Local forwarding header, for namespaced headers, e.g. kparts/part.h
|
||||||
|
if(EGH_ORIGINAL STREQUAL "CAMELCASE")
|
||||||
|
set(originalclassname "${_CLASSNAME}")
|
||||||
|
else()
|
||||||
|
string(TOLOWER "${_CLASSNAME}" originalclassname)
|
||||||
|
endif()
|
||||||
|
set(REGULAR_HEADER_NAME ${EGH_OUTPUT_DIR}/${originalprefix}${originalclassname}.${EGH_HEADER_EXTENSION})
|
||||||
|
if (NOT EXISTS ${REGULAR_HEADER_NAME})
|
||||||
|
file(WRITE ${REGULAR_HEADER_NAME} "#include \"${_actualheader}\"\n")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
list(APPEND _REQUIRED_HEADERS "${_actualheader}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(EGH_COMMON_HEADER)
|
||||||
|
#combine required headers into 1 big convenience header
|
||||||
|
set(COMMON_HEADER ${EGH_OUTPUT_DIR}/${EGH_PREFIX}${EGH_COMMON_HEADER})
|
||||||
|
file(WRITE ${COMMON_HEADER} "// convenience header\n")
|
||||||
|
foreach(_header ${_REQUIRED_HEADERS})
|
||||||
|
get_filename_component(_base ${_header} NAME)
|
||||||
|
file(APPEND ${COMMON_HEADER} "#include \"${_base}\"\n")
|
||||||
|
endforeach()
|
||||||
|
list(APPEND ${camelcase_forwarding_headers_var} "${COMMON_HEADER}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(${camelcase_forwarding_headers_var} ${${camelcase_forwarding_headers_var}} PARENT_SCOPE)
|
||||||
|
if (EGH_REQUIRED_HEADERS)
|
||||||
|
set(${EGH_REQUIRED_HEADERS} ${${EGH_REQUIRED_HEADERS}} ${_REQUIRED_HEADERS} PARENT_SCOPE)
|
||||||
|
endif ()
|
||||||
|
endfunction()
|
||||||
242
cmake/ECM/modules/ECMGeneratePriFile.cmake
Normal file
242
cmake/ECM/modules/ECMGeneratePriFile.cmake
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2014 David Faure <faure@kde.org>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
ECMGeneratePriFile
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Generate a ``.pri`` file for the benefit of qmake-based projects.
|
||||||
|
|
||||||
|
As well as the function below, this module creates the cache variable
|
||||||
|
``ECM_MKSPECS_INSTALL_DIR`` and sets the default value to ``mkspecs/modules``.
|
||||||
|
This assumes Qt and the current project are both installed to the same
|
||||||
|
non-system prefix. Packagers who use ``-DCMAKE_INSTALL_PREFIX=/usr`` will
|
||||||
|
certainly want to set ``ECM_MKSPECS_INSTALL_DIR`` to something like
|
||||||
|
``share/qt5/mkspecs/modules``.
|
||||||
|
|
||||||
|
The main thing is that this should be the ``modules`` subdirectory of either
|
||||||
|
the default qmake ``mkspecs`` directory or of a directory that will be in the
|
||||||
|
``$QMAKEPATH`` environment variable when qmake is run.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
ecm_generate_pri_file(BASE_NAME <baseName>
|
||||||
|
LIB_NAME <libName>
|
||||||
|
[VERSION <version>] # since 5.83
|
||||||
|
[DEPS "<dep> [<dep> [...]]"]
|
||||||
|
[FILENAME_VAR <filename_variable>]
|
||||||
|
[INCLUDE_INSTALL_DIR <dir>]
|
||||||
|
[LIB_INSTALL_DIR <dir>])
|
||||||
|
|
||||||
|
If your CMake project produces a Qt-based library, you may expect there to be
|
||||||
|
applications that wish to use it that use a qmake-based build system, rather
|
||||||
|
than a CMake-based one. Creating a ``.pri`` file will make use of your
|
||||||
|
library convenient for them, in much the same way that CMake config files make
|
||||||
|
things convenient for CMake-based applications. ``ecm_generate_pri_file()``
|
||||||
|
generates just such a file.
|
||||||
|
|
||||||
|
VERSION specifies the version of the library the ``.pri`` file describes. If
|
||||||
|
not set, the value is taken from the context variable ``PROJECT_VERSION``.
|
||||||
|
This variable is usually set by the ``project(... VERSION ...)`` command or,
|
||||||
|
if CMake policy CMP0048 is not NEW, by :module:`ECMSetupVersion`.
|
||||||
|
For backward-compatibility with older ECM versions the
|
||||||
|
``PROJECT_VERSION_STRING`` variable as set by :module:`ECMSetupVersion`
|
||||||
|
will be preferred over ``PROJECT_VERSION`` if set, unless the minimum
|
||||||
|
required version of ECM is 5.83 and newer. Since 5.83.
|
||||||
|
|
||||||
|
BASE_NAME specifies the name qmake project (.pro) files should use to refer to
|
||||||
|
the library (eg: KArchive). LIB_NAME is the name of the actual library to
|
||||||
|
link to (ie: the first argument to add_library()). DEPS is a space-separated
|
||||||
|
list of the base names of other libraries (for Qt libraries, use the same
|
||||||
|
names you use with the ``QT`` variable in a qmake project file, such as "core"
|
||||||
|
for QtCore). FILENAME_VAR specifies the name of a variable to store the path
|
||||||
|
to the generated file in.
|
||||||
|
|
||||||
|
INCLUDE_INSTALL_DIR is the path (relative to ``CMAKE_INSTALL_PREFIX``) that
|
||||||
|
include files will be installed to. It defaults to
|
||||||
|
``${INCLUDE_INSTALL_DIR}/<baseName>`` if the ``INCLUDE_INSTALL_DIR`` variable
|
||||||
|
is set. If that variable is not set, the ``CMAKE_INSTALL_INCLUDEDIR`` variable
|
||||||
|
is used instead, and if neither are set ``include`` is used. LIB_INSTALL_DIR
|
||||||
|
operates similarly for the installation location for libraries; it defaults to
|
||||||
|
``${LIB_INSTALL_DIR}``, ``${CMAKE_INSTALL_LIBDIR}`` or ``lib``, in that order.
|
||||||
|
|
||||||
|
Example usage:
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
ecm_generate_pri_file(
|
||||||
|
BASE_NAME KArchive
|
||||||
|
LIB_NAME KF5KArchive
|
||||||
|
DEPS "core"
|
||||||
|
FILENAME_VAR pri_filename
|
||||||
|
VERSION 4.2.0
|
||||||
|
)
|
||||||
|
install(FILES ${pri_filename} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
|
||||||
|
|
||||||
|
A qmake-based project that wished to use this would then do::
|
||||||
|
|
||||||
|
QT += KArchive
|
||||||
|
|
||||||
|
in their ``.pro`` file.
|
||||||
|
|
||||||
|
Since pre-1.0.0.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
# Replicate the logic from KDEInstallDirs.cmake as we can't depend on it
|
||||||
|
# Ask qmake if we're using the same prefix as Qt
|
||||||
|
set(_askqmake OFF)
|
||||||
|
if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS)
|
||||||
|
include(ECMQueryQmake)
|
||||||
|
query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX TRY)
|
||||||
|
if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
set(_askqmake ON)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(KDE_INSTALL_USE_QT_SYS_PATHS OR _askqmake)
|
||||||
|
include(ECMQueryQmake)
|
||||||
|
query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX)
|
||||||
|
query_qmake(qt_host_data_dir QT_HOST_DATA)
|
||||||
|
if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
file(RELATIVE_PATH qt_host_data_dir ${qt_install_prefix_dir} ${qt_host_data_dir})
|
||||||
|
endif()
|
||||||
|
if(qt_host_data_dir STREQUAL "")
|
||||||
|
set(mkspecs_install_dir mkspecs/modules)
|
||||||
|
else()
|
||||||
|
set(mkspecs_install_dir ${qt_host_data_dir}/mkspecs/modules)
|
||||||
|
endif()
|
||||||
|
set(ECM_MKSPECS_INSTALL_DIR ${mkspecs_install_dir} CACHE PATH "The directory where mkspecs will be installed to.")
|
||||||
|
else()
|
||||||
|
set(ECM_MKSPECS_INSTALL_DIR mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
function(ECM_GENERATE_PRI_FILE)
|
||||||
|
set(options )
|
||||||
|
set(oneValueArgs BASE_NAME LIB_NAME DEPS FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR VERSION)
|
||||||
|
set(multiValueArgs )
|
||||||
|
|
||||||
|
cmake_parse_arguments(EGPF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
|
if(EGPF_UNPARSED_ARGUMENTS)
|
||||||
|
message(FATAL_ERROR "Unknown keywords given to ECM_GENERATE_PRI_FILE(): \"${EGPF_UNPARSED_ARGUMENTS}\"")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ECM_GLOBAL_FIND_VERSION VERSION_LESS 5.83.0)
|
||||||
|
set(_support_backward_compat_version_string_var TRUE)
|
||||||
|
else()
|
||||||
|
set(_support_backward_compat_version_string_var FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT EGPF_BASE_NAME)
|
||||||
|
message(FATAL_ERROR "Required argument BASE_NAME missing in ECM_GENERATE_PRI_FILE() call")
|
||||||
|
endif()
|
||||||
|
if(NOT EGPF_LIB_NAME)
|
||||||
|
message(FATAL_ERROR "Required argument LIB_NAME missing in ECM_GENERATE_PRI_FILE() call")
|
||||||
|
endif()
|
||||||
|
if(NOT EGPF_VERSION)
|
||||||
|
if(_support_backward_compat_version_string_var)
|
||||||
|
if(NOT PROJECT_VERSION_STRING AND NOT PROJECT_VERSION)
|
||||||
|
message(FATAL_ERROR "Required variable PROJECT_VERSION_STRING or PROJECT_VERSION not set before ECM_GENERATE_PRI_FILE() call. Missing call of ecm_setup_version() or project(VERSION)?")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if(NOT PROJECT_VERSION)
|
||||||
|
message(FATAL_ERROR "Required variable PROJECT_VERSION not set before ECM_GENERATE_PRI_FILE() call. Missing call of ecm_setup_version() or project(VERSION)?")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(NOT EGPF_INCLUDE_INSTALL_DIR)
|
||||||
|
if(INCLUDE_INSTALL_DIR)
|
||||||
|
set(EGPF_INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_DIR}/${EGPF_BASE_NAME}")
|
||||||
|
elseif(CMAKE_INSTALL_INCLUDEDIR)
|
||||||
|
set(EGPF_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${EGPF_BASE_NAME}")
|
||||||
|
else()
|
||||||
|
set(EGPF_INCLUDE_INSTALL_DIR "include/${EGPF_BASE_NAME}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(NOT EGPF_LIB_INSTALL_DIR)
|
||||||
|
if(LIB_INSTALL_DIR)
|
||||||
|
set(EGPF_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}")
|
||||||
|
elseif(CMAKE_INSTALL_LIBDIR)
|
||||||
|
set(EGPF_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
else()
|
||||||
|
set(EGPF_LIB_INSTALL_DIR "lib")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(EGPF_VERSION)
|
||||||
|
set(PRI_VERSION "${EGPF_VERSION}")
|
||||||
|
else()
|
||||||
|
if(_support_backward_compat_version_string_var AND PROJECT_VERSION_STRING)
|
||||||
|
set(PRI_VERSION "${PROJECT_VERSION_STRING}")
|
||||||
|
if(NOT PROJECT_VERSION_STRING STREQUAL PROJECT_VERSION)
|
||||||
|
message(DEPRECATION "ECM_GENERATE_PRI_FILE() will no longer support PROJECT_VERSION_STRING when the required minimum version of ECM is 5.83 or newer. Set VERSION parameter or use PROJECT_VERSION instead.")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(PRI_VERSION "${PROJECT_VERSION}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" PRI_VERSION_MAJOR "${PRI_VERSION}")
|
||||||
|
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" PRI_VERSION_MINOR "${PRI_VERSION}")
|
||||||
|
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PRI_VERSION_PATCH "${PRI_VERSION}")
|
||||||
|
|
||||||
|
# Prepare the right number of "../.." to go from ECM_MKSPECS_INSTALL_DIR to the install prefix
|
||||||
|
# This allows to make the generated pri files relocatable (no absolute paths)
|
||||||
|
if (IS_ABSOLUTE ${ECM_MKSPECS_INSTALL_DIR})
|
||||||
|
set(BASEPATH ${CMAKE_INSTALL_PREFIX})
|
||||||
|
else()
|
||||||
|
string(REGEX REPLACE "[^/]+" ".." PRI_ROOT_RELATIVE_TO_MKSPECS ${ECM_MKSPECS_INSTALL_DIR})
|
||||||
|
set(BASEPATH "$$PWD/${PRI_ROOT_RELATIVE_TO_MKSPECS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(PRI_TARGET_BASENAME ${EGPF_BASE_NAME})
|
||||||
|
set(PRI_TARGET_LIBNAME ${EGPF_LIB_NAME})
|
||||||
|
set(PRI_TARGET_QTDEPS ${EGPF_DEPS})
|
||||||
|
if(IS_ABSOLUTE "${EGPF_INCLUDE_INSTALL_DIR}")
|
||||||
|
set(PRI_TARGET_INCLUDES "${EGPF_INCLUDE_INSTALL_DIR}")
|
||||||
|
else()
|
||||||
|
set(PRI_TARGET_INCLUDES "${BASEPATH}/${EGPF_INCLUDE_INSTALL_DIR}")
|
||||||
|
endif()
|
||||||
|
if(IS_ABSOLUTE "${EGPF_LIB_INSTALL_DIR}")
|
||||||
|
set(PRI_TARGET_LIBS "${EGPF_LIB_INSTALL_DIR}")
|
||||||
|
else()
|
||||||
|
set(PRI_TARGET_LIBS "${BASEPATH}/${EGPF_LIB_INSTALL_DIR}")
|
||||||
|
endif()
|
||||||
|
set(PRI_TARGET_DEFINES "")
|
||||||
|
|
||||||
|
set(PRI_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/qt_${PRI_TARGET_BASENAME}.pri)
|
||||||
|
if (EGPF_FILENAME_VAR)
|
||||||
|
set(${EGPF_FILENAME_VAR} ${PRI_FILENAME} PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(PRI_TARGET_MODULE_CONFIG "")
|
||||||
|
# backward compat: it was not obvious LIB_NAME needs to be a target name,
|
||||||
|
# and some projects where the target name was not the actual library output name
|
||||||
|
# passed the output name for LIB_NAME, so .name & .module prperties are correctly set.
|
||||||
|
# TODO: improve API dox, allow control over module name if target name != output name
|
||||||
|
if(TARGET ${EGPF_LIB_NAME})
|
||||||
|
get_target_property(target_type ${EGPF_LIB_NAME} TYPE)
|
||||||
|
if (target_type STREQUAL "STATIC_LIBRARY")
|
||||||
|
set(PRI_TARGET_MODULE_CONFIG "staticlib")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(GENERATE
|
||||||
|
OUTPUT ${PRI_FILENAME}
|
||||||
|
CONTENT
|
||||||
|
"QT.${PRI_TARGET_BASENAME}.VERSION = ${PRI_VERSION}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.MAJOR_VERSION = ${PRI_VERSION_MAJOR}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.MINOR_VERSION = ${PRI_VERSION_MINOR}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.PATCH_VERSION = ${PRI_VERSION_PATCH}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.name = ${PRI_TARGET_LIBNAME}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.module = ${PRI_TARGET_LIBNAME}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.defines = ${PRI_TARGET_DEFINES}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.includes = ${PRI_TARGET_INCLUDES}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.private_includes =
|
||||||
|
QT.${PRI_TARGET_BASENAME}.libs = ${PRI_TARGET_LIBS}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.depends = ${PRI_TARGET_QTDEPS}
|
||||||
|
QT.${PRI_TARGET_BASENAME}.module_config = ${PRI_TARGET_MODULE_CONFIG}
|
||||||
|
"
|
||||||
|
)
|
||||||
|
endfunction()
|
||||||
46
cmake/ECM/modules/ECMQueryQmake.cmake
Normal file
46
cmake/ECM/modules/ECMQueryQmake.cmake
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
find_package(Qt5Core QUIET)
|
||||||
|
|
||||||
|
if (Qt5Core_FOUND)
|
||||||
|
set(_qmake_executable_default "qmake-qt5")
|
||||||
|
endif ()
|
||||||
|
if (TARGET Qt5::qmake)
|
||||||
|
get_target_property(_qmake_executable_default Qt5::qmake LOCATION)
|
||||||
|
endif()
|
||||||
|
set(QMAKE_EXECUTABLE ${_qmake_executable_default}
|
||||||
|
CACHE FILEPATH "Location of the Qt5 qmake executable")
|
||||||
|
|
||||||
|
# Helper method
|
||||||
|
# This is not public API (yet)!
|
||||||
|
# Usage: query_qmake(<result_variable> <qt_variable> [TRY])
|
||||||
|
# Passing TRY will result in the method not failing fatal if no qmake executable
|
||||||
|
# has been found, but instead simply returning an empty string
|
||||||
|
function(query_qmake result_variable qt_variable)
|
||||||
|
set(options TRY)
|
||||||
|
set(oneValueArgs )
|
||||||
|
set(multiValueArgs )
|
||||||
|
|
||||||
|
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
|
if(NOT QMAKE_EXECUTABLE)
|
||||||
|
if(ARGS_TRY)
|
||||||
|
set(${result_variable} "" PARENT_SCOPE)
|
||||||
|
message(STATUS "No qmake Qt5 binary found. Can't check ${qt_variable}")
|
||||||
|
return()
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "No qmake Qt5 binary found. Can't check ${qt_variable} as required")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${QMAKE_EXECUTABLE} -query "${qt_variable}"
|
||||||
|
RESULT_VARIABLE return_code
|
||||||
|
OUTPUT_VARIABLE output
|
||||||
|
)
|
||||||
|
if(return_code EQUAL 0)
|
||||||
|
string(STRIP "${output}" output)
|
||||||
|
file(TO_CMAKE_PATH "${output}" output_path)
|
||||||
|
set(${result_variable} "${output_path}" PARENT_SCOPE)
|
||||||
|
else()
|
||||||
|
message(WARNING "Failed call: ${QMAKE_EXECUTABLE} -query \"${qt_variable}\"")
|
||||||
|
message(FATAL_ERROR "QMake call failed: ${return_code}")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
212
cmake/ECM/modules/ECMSetupVersion.cmake
Normal file
212
cmake/ECM/modules/ECMSetupVersion.cmake
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2014 Alex Merry <alex.merry@kde.org>
|
||||||
|
# SPDX-FileCopyrightText: 2012 Alexander Neundorf <neundorf@kde.org>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
ECMSetupVersion
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Handle library version information.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
ecm_setup_version(<version>
|
||||||
|
VARIABLE_PREFIX <prefix>
|
||||||
|
[SOVERSION <soversion>]
|
||||||
|
[VERSION_HEADER <filename>]
|
||||||
|
[PACKAGE_VERSION_FILE <filename> [COMPATIBILITY <compat>]] )
|
||||||
|
|
||||||
|
This parses a version string and sets up a standard set of version variables.
|
||||||
|
It can optionally also create a C version header file and a CMake package
|
||||||
|
version file to install along with the library.
|
||||||
|
|
||||||
|
If the ``<version>`` argument is of the form ``<major>.<minor>.<patch>``
|
||||||
|
(or ``<major>.<minor>.<patch>.<tweak>``), The following CMake variables are
|
||||||
|
set::
|
||||||
|
|
||||||
|
<prefix>_VERSION_MAJOR - <major>
|
||||||
|
<prefix>_VERSION_MINOR - <minor>
|
||||||
|
<prefix>_VERSION_PATCH - <patch>
|
||||||
|
<prefix>_VERSION - <version>
|
||||||
|
<prefix>_SOVERSION - <soversion>, or <major> if SOVERSION was not given
|
||||||
|
|
||||||
|
For backward-compatibility also this variable is set (only if the minimum required
|
||||||
|
version of ECM is < 5.83)::
|
||||||
|
|
||||||
|
<prefix>_VERSION_STRING - <version> (use <prefix>_VERSION instead)
|
||||||
|
|
||||||
|
If CMake policy CMP0048 is not NEW, the following CMake variables will also
|
||||||
|
be set::
|
||||||
|
|
||||||
|
PROJECT_VERSION_MAJOR - <major>
|
||||||
|
PROJECT_VERSION_MINOR - <minor>
|
||||||
|
PROJECT_VERSION_PATCH - <patch>
|
||||||
|
PROJECT_VERSION - <version>
|
||||||
|
|
||||||
|
For backward-compatibility, if CMake policy CMP0048 is not NEW, also this variable is set
|
||||||
|
(only if the minimum required version of ECM is < 5.83)::
|
||||||
|
|
||||||
|
PROJECT_VERSION_STRING - <version> (use PROJECT_VERSION instead)
|
||||||
|
|
||||||
|
If the VERSION_HEADER option is used, a simple C header is generated with the
|
||||||
|
given filename. If filename is a relative path, it is interpreted as relative
|
||||||
|
to CMAKE_CURRENT_BINARY_DIR. The generated header contains the following
|
||||||
|
macros::
|
||||||
|
|
||||||
|
<prefix>_VERSION_MAJOR - <major> as an integer
|
||||||
|
<prefix>_VERSION_MINOR - <minor> as an integer
|
||||||
|
<prefix>_VERSION_PATCH - <patch> as an integer
|
||||||
|
<prefix>_VERSION_STRING - <version> as a C string
|
||||||
|
<prefix>_VERSION - the version as an integer
|
||||||
|
|
||||||
|
``<prefix>_VERSION`` has ``<patch>`` in the bottom 8 bits, ``<minor>`` in the
|
||||||
|
next 8 bits and ``<major>`` in the remaining bits. Note that ``<patch>`` and
|
||||||
|
``<minor>`` must be less than 256.
|
||||||
|
|
||||||
|
If the PACKAGE_VERSION_FILE option is used, a simple CMake package version
|
||||||
|
file is created using the write_basic_package_version_file() macro provided by
|
||||||
|
CMake. It should be installed in the same location as the Config.cmake file of
|
||||||
|
the library so that it can be found by find_package(). If the filename is a
|
||||||
|
relative path, it is interpreted as relative to CMAKE_CURRENT_BINARY_DIR. The
|
||||||
|
optional COMPATIBILITY option is forwarded to
|
||||||
|
write_basic_package_version_file(), and defaults to AnyNewerVersion.
|
||||||
|
|
||||||
|
If CMake policy CMP0048 is NEW, an alternative form of the command is
|
||||||
|
available::
|
||||||
|
|
||||||
|
ecm_setup_version(PROJECT
|
||||||
|
[VARIABLE_PREFIX <prefix>]
|
||||||
|
[SOVERSION <soversion>]
|
||||||
|
[VERSION_HEADER <filename>]
|
||||||
|
[PACKAGE_VERSION_FILE <filename>] )
|
||||||
|
|
||||||
|
This will use the version information set by the project() command.
|
||||||
|
VARIABLE_PREFIX defaults to the project name. Note that PROJECT must be the
|
||||||
|
first argument. In all other respects, it behaves like the other form of the
|
||||||
|
command.
|
||||||
|
|
||||||
|
Since pre-1.0.0.
|
||||||
|
|
||||||
|
COMPATIBILITY option available since 1.6.0.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
include(CMakePackageConfigHelpers)
|
||||||
|
|
||||||
|
# save the location of the header template while CMAKE_CURRENT_LIST_DIR
|
||||||
|
# has the value we want
|
||||||
|
set(_ECM_SETUP_VERSION_HEADER_TEMPLATE "${CMAKE_CURRENT_LIST_DIR}/ECMVersionHeader.h.in")
|
||||||
|
|
||||||
|
function(ecm_setup_version _version)
|
||||||
|
set(options )
|
||||||
|
set(oneValueArgs VARIABLE_PREFIX SOVERSION VERSION_HEADER PACKAGE_VERSION_FILE COMPATIBILITY)
|
||||||
|
set(multiValueArgs )
|
||||||
|
|
||||||
|
cmake_parse_arguments(ESV "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
|
if(ESV_UNPARSED_ARGUMENTS)
|
||||||
|
message(FATAL_ERROR "Unknown keywords given to ECM_SETUP_VERSION(): \"${ESV_UNPARSED_ARGUMENTS}\"")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(project_manages_version FALSE)
|
||||||
|
set(use_project_version FALSE)
|
||||||
|
cmake_policy(GET CMP0048 project_version_policy)
|
||||||
|
if(project_version_policy STREQUAL "NEW")
|
||||||
|
set(project_manages_version TRUE)
|
||||||
|
if(_version STREQUAL "PROJECT")
|
||||||
|
set(use_project_version TRUE)
|
||||||
|
endif()
|
||||||
|
elseif(_version STREQUAL "PROJECT")
|
||||||
|
message(FATAL_ERROR "ecm_setup_version given PROJECT argument, but CMP0048 is not NEW")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(should_set_prefixed_vars TRUE)
|
||||||
|
if(NOT ESV_VARIABLE_PREFIX)
|
||||||
|
if(use_project_version)
|
||||||
|
set(ESV_VARIABLE_PREFIX "${PROJECT_NAME}")
|
||||||
|
set(should_set_prefixed_vars FALSE)
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Required argument PREFIX missing in ECM_SETUP_VERSION() call")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(use_project_version)
|
||||||
|
set(_version "${PROJECT_VERSION}")
|
||||||
|
set(_major "${PROJECT_VERSION_MAJOR}")
|
||||||
|
set(_minor "${PROJECT_VERSION_MINOR}")
|
||||||
|
set(_patch "${PROJECT_VERSION_PATCH}")
|
||||||
|
else()
|
||||||
|
string(REGEX REPLACE "^0*([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" _major "${_version}")
|
||||||
|
string(REGEX REPLACE "^[0-9]+\\.0*([0-9]+)\\.[0-9]+.*" "\\1" _minor "${_version}")
|
||||||
|
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.0*([0-9]+).*" "\\1" _patch "${_version}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT ESV_SOVERSION)
|
||||||
|
set(ESV_SOVERSION ${_major})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ECM_GLOBAL_FIND_VERSION VERSION_LESS 5.83.0)
|
||||||
|
set(_set_backward_compat_version_string_vars TRUE)
|
||||||
|
else()
|
||||||
|
set(_set_backward_compat_version_string_vars FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(should_set_prefixed_vars)
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION "${_version}")
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION_MAJOR ${_major})
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION_MINOR ${_minor})
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION_PATCH ${_patch})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_SOVERSION ${ESV_SOVERSION})
|
||||||
|
|
||||||
|
if(NOT project_manages_version)
|
||||||
|
set(PROJECT_VERSION "${_version}")
|
||||||
|
set(PROJECT_VERSION_MAJOR "${_major}")
|
||||||
|
set(PROJECT_VERSION_MINOR "${_minor}")
|
||||||
|
set(PROJECT_VERSION_PATCH "${_patch}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(_set_backward_compat_version_string_vars)
|
||||||
|
set(PROJECT_VERSION_STRING "${PROJECT_VERSION}")
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION_STRING "${${ESV_VARIABLE_PREFIX}_VERSION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ESV_VERSION_HEADER)
|
||||||
|
set(HEADER_PREFIX "${ESV_VARIABLE_PREFIX}")
|
||||||
|
set(HEADER_VERSION "${_version}")
|
||||||
|
set(HEADER_VERSION_MAJOR "${_major}")
|
||||||
|
set(HEADER_VERSION_MINOR "${_minor}")
|
||||||
|
set(HEADER_VERSION_PATCH "${_patch}")
|
||||||
|
configure_file("${_ECM_SETUP_VERSION_HEADER_TEMPLATE}" "${ESV_VERSION_HEADER}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ESV_PACKAGE_VERSION_FILE)
|
||||||
|
if(NOT ESV_COMPATIBILITY)
|
||||||
|
set(ESV_COMPATIBILITY AnyNewerVersion)
|
||||||
|
endif()
|
||||||
|
write_basic_package_version_file("${ESV_PACKAGE_VERSION_FILE}" VERSION ${_version} COMPATIBILITY ${ESV_COMPATIBILITY})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(should_set_prefixed_vars)
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION_MAJOR "${${ESV_VARIABLE_PREFIX}_VERSION_MAJOR}" PARENT_SCOPE)
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION_MINOR "${${ESV_VARIABLE_PREFIX}_VERSION_MINOR}" PARENT_SCOPE)
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION_PATCH "${${ESV_VARIABLE_PREFIX}_VERSION_PATCH}" PARENT_SCOPE)
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION "${${ESV_VARIABLE_PREFIX}_VERSION}" PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# always set the soversion
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_SOVERSION "${${ESV_VARIABLE_PREFIX}_SOVERSION}" PARENT_SCOPE)
|
||||||
|
|
||||||
|
if(NOT project_manages_version)
|
||||||
|
set(PROJECT_VERSION "${PROJECT_VERSION}" PARENT_SCOPE)
|
||||||
|
set(PROJECT_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}" PARENT_SCOPE)
|
||||||
|
set(PROJECT_VERSION_MINOR "${PROJECT_VERSION_MINOR}" PARENT_SCOPE)
|
||||||
|
set(PROJECT_VERSION_PATCH "${PROJECT_VERSION_PATCH}" PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(_set_backward_compat_version_string_vars)
|
||||||
|
set(PROJECT_VERSION_STRING "${PROJECT_VERSION_STRING}" PARENT_SCOPE)
|
||||||
|
set(${ESV_VARIABLE_PREFIX}_VERSION_STRING "${${ESV_VARIABLE_PREFIX}_VERSION}" PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
50
cmake/ECM/modules/ECMUninstallTarget.cmake
Normal file
50
cmake/ECM/modules/ECMUninstallTarget.cmake
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2015 Alex Merry <alex.merry@kde.org>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
ECMUninstallTarget
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Add an ``uninstall`` target.
|
||||||
|
|
||||||
|
By including this module, an ``uninstall`` target will be added to your CMake
|
||||||
|
project. This will remove all files installed (or updated) by a previous
|
||||||
|
invocation of the ``install`` target. It will not remove files created or
|
||||||
|
modified by an ``install(SCRIPT)`` or ``install(CODE)`` command; you should
|
||||||
|
create a custom uninstallation target for these and use ``add_dependency`` to
|
||||||
|
make the ``uninstall`` target depend on it:
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
include(ECMUninstallTarget)
|
||||||
|
install(SCRIPT install-foo.cmake)
|
||||||
|
add_custom_target(uninstall_foo COMMAND ${CMAKE_COMMAND} -P uninstall-foo.cmake)
|
||||||
|
add_dependency(uninstall uninstall_foo)
|
||||||
|
|
||||||
|
The target will fail if the ``install`` target has not yet been run (so it is
|
||||||
|
not possible to run CMake on the project and then immediately run the
|
||||||
|
``uninstall`` target).
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
CMake deliberately does not provide an ``uninstall`` target by default on
|
||||||
|
the basis that such a target has the potential to remove important files
|
||||||
|
from a user's computer. Use with caution.
|
||||||
|
|
||||||
|
Since 1.7.0.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if (NOT TARGET uninstall)
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/ecm_uninstall.cmake.in"
|
||||||
|
"${CMAKE_BINARY_DIR}/ecm_uninstall.cmake"
|
||||||
|
IMMEDIATE
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(uninstall
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/ecm_uninstall.cmake"
|
||||||
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
17
cmake/ECM/modules/ECMVersionHeader.h.in
Normal file
17
cmake/ECM/modules/ECMVersionHeader.h.in
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
// This file was generated by ecm_setup_version(): DO NOT EDIT!
|
||||||
|
|
||||||
|
#ifndef @HEADER_PREFIX@_VERSION_H
|
||||||
|
#define @HEADER_PREFIX@_VERSION_H
|
||||||
|
|
||||||
|
#define @HEADER_PREFIX@_VERSION_STRING "@HEADER_VERSION@"
|
||||||
|
#define @HEADER_PREFIX@_VERSION_MAJOR @HEADER_VERSION_MAJOR@
|
||||||
|
#define @HEADER_PREFIX@_VERSION_MINOR @HEADER_VERSION_MINOR@
|
||||||
|
#define @HEADER_PREFIX@_VERSION_PATCH @HEADER_VERSION_PATCH@
|
||||||
|
#define @HEADER_PREFIX@_VERSION @HEADER_PREFIX@_VERSION_CHECK(@HEADER_PREFIX@_VERSION_MAJOR, @HEADER_PREFIX@_VERSION_MINOR, @HEADER_PREFIX@_VERSION_PATCH)
|
||||||
|
|
||||||
|
/*
|
||||||
|
for example: @HEADER_PREFIX@_VERSION >= @HEADER_PREFIX@_VERSION_CHECK(1, 2, 2))
|
||||||
|
*/
|
||||||
|
#define @HEADER_PREFIX@_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
|
||||||
|
|
||||||
|
#endif
|
||||||
21
cmake/ECM/modules/ecm_uninstall.cmake.in
Normal file
21
cmake/ECM/modules/ecm_uninstall.cmake.in
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||||
|
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
||||||
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||||
|
foreach(file ${files})
|
||||||
|
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||||
|
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
exec_program(
|
||||||
|
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||||
|
OUTPUT_VARIABLE rm_out
|
||||||
|
RETURN_VALUE rm_retval
|
||||||
|
)
|
||||||
|
if(NOT "${rm_retval}" STREQUAL 0)
|
||||||
|
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
35
cmake/InstallLocation.cmake
Normal file
35
cmake/InstallLocation.cmake
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Some default installation locations. These should be global, with any project
|
||||||
|
# specific locations added to the end. These paths are all relative to the
|
||||||
|
# install prefix.
|
||||||
|
#
|
||||||
|
# These paths attempt to adhere to the FHS, and are similar to those provided
|
||||||
|
# by autotools and used in many Linux distributions.
|
||||||
|
|
||||||
|
# Use GNU install directories
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
if(NOT INSTALL_RUNTIME_DIR)
|
||||||
|
set(INSTALL_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})
|
||||||
|
endif()
|
||||||
|
if(NOT INSTALL_LIBRARY_DIR)
|
||||||
|
set(INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
endif()
|
||||||
|
if(NOT INSTALL_ARCHIVE_DIR)
|
||||||
|
set(INSTALL_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
endif()
|
||||||
|
if(NOT INSTALL_INCLUDE_DIR)
|
||||||
|
set(INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
|
endif()
|
||||||
|
if(NOT INSTALL_DATADIR)
|
||||||
|
set(INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR})
|
||||||
|
endif()
|
||||||
|
if(NOT INSTALL_DOC_DIR)
|
||||||
|
set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${KDDockWidgets_LIBRARY_QTID})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
if(APPLE)
|
||||||
|
set(CMAKE_MACOSX_RPATH ON)
|
||||||
|
else()
|
||||||
|
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${INSTALL_LIBRARY_DIR}")
|
||||||
|
endif()
|
||||||
154
cmake/KDAB/modules/FindPySide2.cmake
Normal file
154
cmake/KDAB/modules/FindPySide2.cmake
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
# PYSIDE_BASEDIR - Top of the PySide2 installation
|
||||||
|
# PYSIDE_INCLUDE_DIR - Directories to include to use PySide2
|
||||||
|
# PYSIDE_LIBRARY - Files to link against to use PySide2
|
||||||
|
# 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/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)
|
||||||
|
|
||||||
|
if(PYSIDE2_PRIV_FOUND)
|
||||||
|
set(PYSIDE2_FOUND TRUE)
|
||||||
|
message(STATUS "Using PySide2 found in the system!")
|
||||||
|
pkg_get_variable(SHIBOKEN_BINARY
|
||||||
|
pyside2
|
||||||
|
generator_location
|
||||||
|
)
|
||||||
|
pkg_get_variable(PYSIDE2_BASEDIR
|
||||||
|
pyside2
|
||||||
|
typesystemdir
|
||||||
|
)
|
||||||
|
pkg_get_variable(PYSIDE_INCLUDE_DIR
|
||||||
|
pyside2
|
||||||
|
includedir
|
||||||
|
)
|
||||||
|
set(PYSIDE_TYPESYSTEMS ${PYSIDE2_BASEDIR})
|
||||||
|
set(PYSIDE2_SO_VERSION ${PYSIDE2_PRIV_VERSION})
|
||||||
|
set(PYSIDE_LIBRARY ${PYSIDE2_PRIV_LINK_LIBRARIES})
|
||||||
|
list(GET PYSIDE_LIBRARY 0 PYSIDE_LIBRARY)
|
||||||
|
else()
|
||||||
|
# extract python library basename
|
||||||
|
list(GET Python3_LIBRARIES 0 PYTHON_LIBRARY_FILENAME)
|
||||||
|
get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARY_FILENAME} NAME)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os, sys
|
||||||
|
try:
|
||||||
|
import PySide2.QtCore as QtCore
|
||||||
|
print(os.path.dirname(QtCore.__file__))
|
||||||
|
except Exception as error:
|
||||||
|
print(error, file=sys.stderr)
|
||||||
|
exit()
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE PYSIDE2_BASEDIR
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
if(NOT PYSIDE2_BASEDIR)
|
||||||
|
message(FATAL_ERROR "The PySide2 module could not be imported. Make sure you have it installed by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(PYSIDE_BASEDIR ${PYSIDE2_BASEDIR} CACHE PATH "Top level install of PySide2" FORCE)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
import PySide2.QtCore as QtCore
|
||||||
|
print(os.path.basename(QtCore.__file__).split('.', 1)[1])
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE PYSIDE2_SUFFIX
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
import PySide2.QtCore as QtCore
|
||||||
|
print(';'.join(map(str, QtCore.__version_info__)))
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE PYSIDE2_SO_VERSION
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
list(GET PYSIDE2_SO_VERSION 0 PYSIDE2_SO_MACRO_VERSION)
|
||||||
|
list(GET PYSIDE2_SO_VERSION 1 PYSIDE2_SO_MICRO_VERSION)
|
||||||
|
list(GET PYSIDE2_SO_VERSION 2 PYSIDE2_SO_MINOR_VERSION)
|
||||||
|
string(REPLACE ";" "." PYSIDE2_SO_VERSION "${PYSIDE2_SO_VERSION}")
|
||||||
|
|
||||||
|
if(NOT APPLE)
|
||||||
|
set(PYSIDE2_SUFFIX "${PYSIDE2_SUFFIX}.${PYSIDE2_SO_MACRO_VERSION}.${PYSIDE2_SO_MICRO_VERSION}")
|
||||||
|
else()
|
||||||
|
string(REPLACE ".so" "" PYSIDE2_SUFFIX ${PYSIDE2_SUFFIX})
|
||||||
|
set(PYSIDE2_SUFFIX "${PYSIDE2_SUFFIX}.${PYSIDE2_SO_MACRO_VERSION}.${PYSIDE2_SO_MICRO_VERSION}.dylib")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(PYSIDE2_FOUND TRUE)
|
||||||
|
message(STATUS "PySide2 base dir: ${PYSIDE2_BASEDIR}")
|
||||||
|
message(STATUS "PySide2 suffix: ${PYSIDE2_SUFFIX}")
|
||||||
|
|
||||||
|
#PySide
|
||||||
|
#===============================================================================
|
||||||
|
find_path(PYSIDE_INCLUDE_DIR
|
||||||
|
pyside.h
|
||||||
|
PATHS ${PYSIDE2_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include/PySide2
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
# Platform specific library names
|
||||||
|
if(MSVC)
|
||||||
|
set(PYSIDE_LIBRARY_BASENAMES "pyside2.abi3.lib")
|
||||||
|
elseif(CYGWIN)
|
||||||
|
set(PYSIDE_LIBRARY_BASENAMES "")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(PYSIDE_LIBRARY_BASENAMES "libpyside2.${PYSIDE2_SUFFIX}")
|
||||||
|
else()
|
||||||
|
set(PYSIDE_LIBRARY_BASENAMES "libpyside2.${PYSIDE2_SUFFIX}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_file(PYSIDE_LIBRARY
|
||||||
|
${PYSIDE_LIBRARY_BASENAMES}
|
||||||
|
PATHS ${PYSIDE2_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
find_path(PYSIDE_TYPESYSTEMS
|
||||||
|
typesystem_core.xml
|
||||||
|
PATHS ${PYSIDE2_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide2/typesystems
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(PYSIDE2_FOUND)
|
||||||
|
message(STATUS "PySide include dir: ${PYSIDE_INCLUDE_DIR}")
|
||||||
|
message(STATUS "PySide library: ${PYSIDE_LIBRARY}")
|
||||||
|
message(STATUS "PySide typesystems: ${PYSIDE_TYPESYSTEMS}")
|
||||||
|
message(STATUS "PySide2 version: ${PYSIDE2_SO_VERSION}")
|
||||||
|
|
||||||
|
# Create PySide2 target
|
||||||
|
add_library(PySide2::pyside2 SHARED IMPORTED GLOBAL)
|
||||||
|
if(MSVC)
|
||||||
|
set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY})
|
||||||
|
endif()
|
||||||
|
set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY})
|
||||||
|
set_property(TARGET PySide2::pyside2 APPEND PROPERTY
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES
|
||||||
|
${PYSIDE_INCLUDE_DIR}
|
||||||
|
${PYSIDE_INCLUDE_DIR}/QtCore/
|
||||||
|
${PYSIDE_INCLUDE_DIR}/QtGui/
|
||||||
|
${PYSIDE_INCLUDE_DIR}/QtWidgets/
|
||||||
|
${Python3_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(PySide2
|
||||||
|
REQUIRED_VARS PYSIDE2_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS
|
||||||
|
VERSION_VAR PYSIDE2_SO_VERSION
|
||||||
|
)
|
||||||
132
cmake/KDAB/modules/FindPySide6.cmake
Normal file
132
cmake/KDAB/modules/FindPySide6.cmake
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
# PYSIDE_BASEDIR - Top of the PySide6 installation
|
||||||
|
# PYSIDE_INCLUDE_DIR - Directories to include to use PySide6
|
||||||
|
# PYSIDE_LIBRARY - Files to link against to use PySide6
|
||||||
|
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide6
|
||||||
|
#
|
||||||
|
# You can install PySide6 from Qt repository with
|
||||||
|
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython --trusted-host download.qt.io pyside6
|
||||||
|
|
||||||
|
set(PYSIDE6_FOUND FALSE)
|
||||||
|
|
||||||
|
# extract python library basename
|
||||||
|
list(GET Python3_LIBRARIES 0 PYTHON_LIBRARY_FILENAME)
|
||||||
|
get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARY_FILENAME} NAME)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os, sys
|
||||||
|
try:
|
||||||
|
import PySide6.QtCore as QtCore
|
||||||
|
print(os.path.dirname(QtCore.__file__))
|
||||||
|
except Exception as error:
|
||||||
|
print(error, file=sys.stderr)
|
||||||
|
exit()
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE PYSIDE6_BASEDIR
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
if(NOT PYSIDE6_BASEDIR)
|
||||||
|
message(FATAL_ERROR "The PySide6 module could not be imported. Make sure you have it installed by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(PYSIDE6_BASEDIR)
|
||||||
|
set(PYSIDE_BASEDIR ${PYSIDE6_BASEDIR} CACHE PATH "Top level install of PySide6" FORCE)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
import PySide6.QtCore as QtCore
|
||||||
|
print(os.path.basename(QtCore.__file__).split('.', 1)[1])
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE PYSIDE6_SUFFIX
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
import PySide6.QtCore as QtCore
|
||||||
|
print(';'.join(map(str, QtCore.__version_info__)))
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE PYSIDE6_SO_VERSION
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
list(GET PYSIDE6_SO_VERSION 0 PYSIDE6_SO_MACRO_VERSION)
|
||||||
|
list(GET PYSIDE6_SO_VERSION 1 PYSIDE6_SO_MICRO_VERSION)
|
||||||
|
list(GET PYSIDE6_SO_VERSION 2 PYSIDE6_SO_MINOR_VERSION)
|
||||||
|
string(REPLACE ";" "." PYSIDE6_SO_VERSION "${PYSIDE6_SO_VERSION}")
|
||||||
|
|
||||||
|
if(NOT APPLE)
|
||||||
|
set(PYSIDE6_SUFFIX "${PYSIDE6_SUFFIX}.${PYSIDE6_SO_MACRO_VERSION}.${PYSIDE6_SO_MICRO_VERSION}")
|
||||||
|
else()
|
||||||
|
string(REPLACE ".so" "" PYSIDE6_SUFFIX ${PYSIDE6_SUFFIX})
|
||||||
|
set(PYSIDE6_SUFFIX "${PYSIDE6_SUFFIX}.${PYSIDE6_SO_MACRO_VERSION}.${PYSIDE6_SO_MICRO_VERSION}.dylib")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(PYSIDE6_FOUND TRUE)
|
||||||
|
message(STATUS "PySide6 base dir: ${PYSIDE6_BASEDIR}")
|
||||||
|
message(STATUS "PySide6 suffix: ${PYSIDE6_SUFFIX}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(PYSIDE6_FOUND)
|
||||||
|
#PySide
|
||||||
|
#===============================================================================
|
||||||
|
find_path(PYSIDE_INCLUDE_DIR
|
||||||
|
pyside.h
|
||||||
|
PATHS ${PYSIDE6_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include/PySide6
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
# Platform specific library names
|
||||||
|
if(MSVC)
|
||||||
|
set(PYSIDE_LIBRARY_BASENAMES "pyside6.abi3.lib")
|
||||||
|
elseif(CYGWIN)
|
||||||
|
set(PYSIDE_LIBRARY_BASENAMES "")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
|
||||||
|
else()
|
||||||
|
set(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_file(PYSIDE_LIBRARY
|
||||||
|
${PYSIDE_LIBRARY_BASENAMES}
|
||||||
|
PATHS ${PYSIDE6_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
find_path(PYSIDE_TYPESYSTEMS
|
||||||
|
typesystem_core.xml
|
||||||
|
PATHS ${PYSIDE6_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide6/typesystems
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(PYSIDE6_FOUND)
|
||||||
|
message(STATUS "PySide include dir: ${PYSIDE_INCLUDE_DIR}")
|
||||||
|
message(STATUS "PySide library: ${PYSIDE_LIBRARY}")
|
||||||
|
message(STATUS "PySide typesystems: ${PYSIDE_TYPESYSTEMS}")
|
||||||
|
message(STATUS "PySide6 version: ${PYSIDE6_SO_VERSION}")
|
||||||
|
|
||||||
|
# Create PySide6 target
|
||||||
|
add_library(PySide6::pyside6 SHARED IMPORTED GLOBAL)
|
||||||
|
if(MSVC)
|
||||||
|
set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY})
|
||||||
|
endif()
|
||||||
|
set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY})
|
||||||
|
set_property(TARGET PySide6::pyside6 APPEND PROPERTY
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES
|
||||||
|
${PYSIDE_INCLUDE_DIR}
|
||||||
|
${PYSIDE_INCLUDE_DIR}/QtCore/
|
||||||
|
${PYSIDE_INCLUDE_DIR}/QtGui/
|
||||||
|
${PYSIDE_INCLUDE_DIR}/QtWidgets/
|
||||||
|
${Python3_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(PySide6
|
||||||
|
REQUIRED_VARS PYSIDE6_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS
|
||||||
|
VERSION_VAR PYSIDE6_SO_VERSION
|
||||||
|
)
|
||||||
191
cmake/KDAB/modules/FindShiboken2.cmake
Normal file
191
cmake/KDAB/modules/FindShiboken2.cmake
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN
|
||||||
|
# SHIBOKEN_LIBRARY - Files to link against to use SHIBOKEN
|
||||||
|
# SHIBOKEN_BINARY - Executable name
|
||||||
|
# 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/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)
|
||||||
|
|
||||||
|
if(SHIBOKEN2_PRIV_FOUND)
|
||||||
|
set(SHIBOKEN_FOUND TRUE)
|
||||||
|
message(STATUS "Using shiboken found in the system!")
|
||||||
|
pkg_get_variable(SHIBOKEN_BINARY
|
||||||
|
shiboken2
|
||||||
|
generator_location
|
||||||
|
)
|
||||||
|
pkg_get_variable(SHIBOKEN_BASEDIR
|
||||||
|
shiboken2
|
||||||
|
libdir
|
||||||
|
)
|
||||||
|
pkg_get_variable(SHIBOKEN_INCLUDE_DIR
|
||||||
|
shiboken2
|
||||||
|
includedir
|
||||||
|
)
|
||||||
|
set(SHIBOKEN_VERSION ${SHIBOKEN2_PRIV_VERSION})
|
||||||
|
set(SHIBOKEN_LIBRARY ${SHIBOKEN2_PRIV_LINK_LIBRARIES})
|
||||||
|
else()
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
try:
|
||||||
|
import shiboken2_generator
|
||||||
|
print(shiboken2_generator.__path__[0])
|
||||||
|
except:
|
||||||
|
exit()
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE SHIBOKEN_GENERATOR_BASEDIR
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
if(NOT SHIBOKEN_GENERATOR_BASEDIR)
|
||||||
|
message(FATAL_ERROR "The shiboken2_generator module could not be imported. Make sure you have it installed by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"")
|
||||||
|
endif()
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
try:
|
||||||
|
import shiboken2
|
||||||
|
print(shiboken2.__path__[0])
|
||||||
|
except:
|
||||||
|
exit()
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE SHIBOKEN_BASEDIR
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
if(NOT SHIBOKEN_BASEDIR)
|
||||||
|
message(FATAL_ERROR "The shiboken2 module could not be imported. Make sure you have it installed by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"")
|
||||||
|
endif()
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
import shiboken2
|
||||||
|
print(';'.join(filter(None, map(str, shiboken2.__version_info__))))
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE SHIBOKEN_VERSION
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
list(GET SHIBOKEN_VERSION 0 SHIBOKEN_MACRO_VERSION)
|
||||||
|
list(GET SHIBOKEN_VERSION 1 SHIBOKEN_MICRO_VERSION)
|
||||||
|
list(GET SHIBOKEN_VERSION 2 SHIBOKEN_MINOR_VERSION)
|
||||||
|
string(REPLACE ";" "." SHIBOKEN_VERSION "${SHIBOKEN_VERSION}")
|
||||||
|
|
||||||
|
message(STATUS "ShibokenGenerator base dir: ${SHIBOKEN_GENERATOR_BASEDIR}")
|
||||||
|
message(STATUS "Shiboken base dir: ${SHIBOKEN_BASEDIR}")
|
||||||
|
message(STATUS "Shiboken custom path: ${SHIBOKEN_CUSTOM_PREFIX}")
|
||||||
|
|
||||||
|
if(SHIBOKEN_BASEDIR)
|
||||||
|
find_path(SHIBOKEN_INCLUDE_DIR
|
||||||
|
shiboken.h
|
||||||
|
PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
if(MSVC)
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES "shiboken2.abi3.lib")
|
||||||
|
elseif(CYGWIN)
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES "")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken2.${PYSIDE2_SUFFIX}")
|
||||||
|
elseif(APPLE)
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES
|
||||||
|
libshiboken2.abi3.dylib
|
||||||
|
libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
|
||||||
|
libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib
|
||||||
|
libshiboken2.abi3.${SHIBOKEN_VERSION}.dylib
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES
|
||||||
|
libshiboken2.abi3.so
|
||||||
|
libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}
|
||||||
|
libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}
|
||||||
|
libshiboken2.abi3.so.${SHIBOKEN_VERSION}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT SHIBOKEN_INCLUDE_DIR)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX})
|
||||||
|
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR})
|
||||||
|
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR})
|
||||||
|
find_file(SHIBOKEN_LIBRARY
|
||||||
|
${SHIBOKEN_LIBRARY_BASENAMES}
|
||||||
|
PATHS ${SHIBOKEN_SEARCH_PATHS}
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
find_program(SHIBOKEN_BINARY
|
||||||
|
shiboken2
|
||||||
|
PATHS ${SHIBOKEN_SEARCH_PATHS}
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(SHIBOKEN_INCLUDE_DIR AND SHIBOKEN_LIBRARY AND SHIBOKEN_BINARY)
|
||||||
|
set(SHIBOKEN_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(SHIBOKEN_FOUND)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
# On Windows we must link to python3.dll that is a small library that links against python3x.dll
|
||||||
|
# that allow us to choose any python3x.dll at runtime
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
for lib in '${Python3_LIBRARIES}'.split(';'):
|
||||||
|
if '/' in lib:
|
||||||
|
prefix, py = lib.rsplit('/', 1)
|
||||||
|
if py.startswith('python3'):
|
||||||
|
print(prefix + '/python3.lib')
|
||||||
|
break
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE PYTHON_LIMITED_LIBRARIES
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
# On Linux and MacOs our modules should not link with any python library
|
||||||
|
# that must be handled by the main process
|
||||||
|
set(PYTHON_LIMITED_LIBRARIES "")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(SHIBOKEN_FOUND)
|
||||||
|
message(STATUS "Shiboken include dir: ${SHIBOKEN_INCLUDE_DIR}")
|
||||||
|
message(STATUS "Shiboken library: ${SHIBOKEN_LIBRARY}")
|
||||||
|
message(STATUS "Shiboken binary: ${SHIBOKEN_BINARY}")
|
||||||
|
message(STATUS "Shiboken version: ${SHIBOKEN_VERSION}")
|
||||||
|
|
||||||
|
# Create shiboke2 target
|
||||||
|
add_library(Shiboken2::libshiboken SHARED IMPORTED GLOBAL)
|
||||||
|
if(MSVC)
|
||||||
|
set_property(TARGET Shiboken2::libshiboken PROPERTY
|
||||||
|
IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
|
||||||
|
endif()
|
||||||
|
set_property(TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY})
|
||||||
|
set_property(TARGET Shiboken2::libshiboken APPEND PROPERTY
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
set_property(TARGET Shiboken2::libshiboken APPEND PROPERTY
|
||||||
|
INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Generator target
|
||||||
|
add_executable(Shiboken2::shiboken IMPORTED GLOBAL)
|
||||||
|
set_property(TARGET Shiboken2::shiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_BINARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(Shiboken2
|
||||||
|
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
|
||||||
|
VERSION_VAR SHIBOKEN_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
168
cmake/KDAB/modules/FindShiboken6.cmake
Normal file
168
cmake/KDAB/modules/FindShiboken6.cmake
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN
|
||||||
|
# SHIBOKEN_LIBRARY - Files to link against to use SHIBOKEN
|
||||||
|
# SHIBOKEN_BINARY - Executable name
|
||||||
|
# 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/official_releases/QtForPython --trusted-host download.qt.io shiboken6-generator
|
||||||
|
|
||||||
|
set(SHIBOKEN_FOUND FALSE)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
try:
|
||||||
|
import shiboken6_generator
|
||||||
|
print(shiboken6_generator.__path__[0])
|
||||||
|
except:
|
||||||
|
exit()
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE SHIBOKEN_GENERATOR_BASEDIR
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
if(NOT SHIBOKEN_GENERATOR_BASEDIR)
|
||||||
|
message(FATAL_ERROR "The shiboken6_generator module could not be imported. Make sure you have it installed by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"")
|
||||||
|
endif()
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
try:
|
||||||
|
import shiboken6
|
||||||
|
print(shiboken6.__path__[0])
|
||||||
|
except:
|
||||||
|
exit()
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE SHIBOKEN_BASEDIR
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
if(NOT SHIBOKEN_BASEDIR)
|
||||||
|
message(FATAL_ERROR "The shiboken6 module could not be imported. Make sure you have it installed by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\"")
|
||||||
|
endif()
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
import os
|
||||||
|
import shiboken6
|
||||||
|
print(';'.join(filter(None, map(str, shiboken6.__version_info__))))
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE SHIBOKEN_VERSION
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
list(GET SHIBOKEN_VERSION 0 SHIBOKEN_MACRO_VERSION)
|
||||||
|
list(GET SHIBOKEN_VERSION 1 SHIBOKEN_MICRO_VERSION)
|
||||||
|
list(GET SHIBOKEN_VERSION 2 SHIBOKEN_MINOR_VERSION)
|
||||||
|
string(REPLACE ";" "." SHIBOKEN_VERSION "${SHIBOKEN_VERSION}")
|
||||||
|
|
||||||
|
message(STATUS "ShibokenGenerator base dir: ${SHIBOKEN_GENERATOR_BASEDIR}")
|
||||||
|
message(STATUS "Shiboken base dir: ${SHIBOKEN_BASEDIR}")
|
||||||
|
message(STATUS "Shiboken custom path: ${SHIBOKEN_CUSTOM_PREFIX}")
|
||||||
|
|
||||||
|
if(SHIBOKEN_BASEDIR)
|
||||||
|
find_path(SHIBOKEN_INCLUDE_DIR
|
||||||
|
shiboken.h
|
||||||
|
PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
if(MSVC)
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES "shiboken6.abi3.lib")
|
||||||
|
elseif(CYGWIN)
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES "")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken6.${PYSIDE2_SUFFIX}")
|
||||||
|
elseif(APPLE)
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES
|
||||||
|
libshiboken6.abi3.dylib
|
||||||
|
libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
|
||||||
|
libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib
|
||||||
|
libshiboken6.abi3.${SHIBOKEN_VERSION}.dylib
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(SHIBOKEN_LIBRARY_BASENAMES
|
||||||
|
libshiboken6.abi3.so
|
||||||
|
libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}
|
||||||
|
libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}
|
||||||
|
libshiboken6.abi3.so.${SHIBOKEN_VERSION}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT SHIBOKEN_INCLUDE_DIR)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX})
|
||||||
|
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR})
|
||||||
|
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR})
|
||||||
|
find_file(SHIBOKEN_LIBRARY
|
||||||
|
${SHIBOKEN_LIBRARY_BASENAMES}
|
||||||
|
PATHS ${SHIBOKEN_SEARCH_PATHS}
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
find_program(SHIBOKEN_BINARY
|
||||||
|
shiboken6
|
||||||
|
PATHS ${SHIBOKEN_SEARCH_PATHS}
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(SHIBOKEN_INCLUDE_DIR AND SHIBOKEN_LIBRARY AND SHIBOKEN_BINARY)
|
||||||
|
set(SHIBOKEN_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(SHIBOKEN_FOUND)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
# On Windows we must link to python3.dll that is a small library that links against python3x.dll
|
||||||
|
# that allow us to choose any python3x.dll at runtime
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
for lib in '${Python3_LIBRARIES}'.split(';'):
|
||||||
|
if '/' in lib:
|
||||||
|
prefix, py = lib.rsplit('/', 1)
|
||||||
|
if py.startswith('python3'):
|
||||||
|
print(prefix + '/python3.lib')
|
||||||
|
break
|
||||||
|
"
|
||||||
|
OUTPUT_VARIABLE PYTHON_LIMITED_LIBRARIES
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
# On Linux and MacOs our modules should not link with any python library
|
||||||
|
# that must be handled by the main process
|
||||||
|
set(PYTHON_LIMITED_LIBRARIES "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(SHIBOKEN_FOUND)
|
||||||
|
message(STATUS "Shiboken include dir: ${SHIBOKEN_INCLUDE_DIR}")
|
||||||
|
message(STATUS "Shiboken library: ${SHIBOKEN_LIBRARY}")
|
||||||
|
message(STATUS "Shiboken binary: ${SHIBOKEN_BINARY}")
|
||||||
|
message(STATUS "Shiboken version: ${SHIBOKEN_VERSION}")
|
||||||
|
|
||||||
|
# Create shiboke2 target
|
||||||
|
add_library(Shiboken6::libshiboken SHARED IMPORTED GLOBAL)
|
||||||
|
if(MSVC)
|
||||||
|
set_property(TARGET Shiboken6::libshiboken PROPERTY
|
||||||
|
IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
|
||||||
|
endif()
|
||||||
|
set_property(TARGET Shiboken6::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY})
|
||||||
|
set_property(TARGET Shiboken6::libshiboken APPEND PROPERTY
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
set_property(TARGET Shiboken6::libshiboken APPEND PROPERTY
|
||||||
|
INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Generator target
|
||||||
|
add_executable(Shiboken6::shiboken IMPORTED GLOBAL)
|
||||||
|
set_property(TARGET Shiboken6::shiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_BINARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(Shiboken6
|
||||||
|
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
|
||||||
|
VERSION_VAR SHIBOKEN_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
52
cmake/KDAB/modules/KDQtInstallPaths.cmake
Normal file
52
cmake/KDAB/modules/KDQtInstallPaths.cmake
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2016-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# Author: Allen Winter <allen.winter@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
# Assumes you've already found Qt and Qt_VERSION_MAJOR is set
|
||||||
|
#
|
||||||
|
# Create variables for all the various install paths for the Qt version in use
|
||||||
|
# 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(NOT DEFINED Qt_VERSION_MAJOR)
|
||||||
|
message(FATAL_ERROR "Please set Qt_VERSION_MAJOR first (ie. set(Qt_VERSION_MAJOR 5))")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(TARGET Qt${Qt_VERSION_MAJOR}::qmake)
|
||||||
|
get_target_property(QT_QMAKE_EXECUTABLE Qt${Qt_VERSION_MAJOR}::qmake LOCATION)
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "No supported Qt version found. Make sure you find Qt before calling this")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${QT_QMAKE_EXECUTABLE} -query
|
||||||
|
RESULT_VARIABLE return_code
|
||||||
|
OUTPUT_VARIABLE ALL_VARS
|
||||||
|
)
|
||||||
|
if(NOT return_code EQUAL 0)
|
||||||
|
message(WARNING "Failed call: ${QMAKE_EXECUTABLE} -query")
|
||||||
|
message(FATAL_ERROR "QMake call failed: ${return_code}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
string(REPLACE "\n" ";" VARS_LIST ${ALL_VARS})
|
||||||
|
foreach(QVAL ${VARS_LIST})
|
||||||
|
if(QVAL MATCHES "QT_INSTALL_")
|
||||||
|
string(REPLACE ":" ";" QVAL_LIST ${QVAL})
|
||||||
|
list(LENGTH QVAL_LIST listlen)
|
||||||
|
list(GET QVAL_LIST 0 var)
|
||||||
|
if(WIN32 AND ${listlen} GREATER 2)
|
||||||
|
list(GET QVAL_LIST 2 path)
|
||||||
|
list(GET QVAL_LIST 1 drive)
|
||||||
|
set(path "${drive}:${path}")
|
||||||
|
else()
|
||||||
|
list(GET QVAL_LIST 1 path)
|
||||||
|
endif()
|
||||||
|
if(NOT ${var}) #if set already on the command line for example
|
||||||
|
set(${var} ${path} CACHE PATH "Qt install path for ${var}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
157
cmake/KDAB/modules/PySide2ModuleBuild.cmake
Normal file
157
cmake/KDAB/modules/PySide2ModuleBuild.cmake
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
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 ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(PATH_SEP "\;")
|
||||||
|
else()
|
||||||
|
set(PATH_SEP ":")
|
||||||
|
endif()
|
||||||
|
#Qt5 requires C++14
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# --enable-parent-ctor-heuristic: Enable heuristics to detect parent relationship on constructors,
|
||||||
|
# this try to guess parent ownership based on the arguments of the constructors
|
||||||
|
# --enable-pyside-extensionsL: This will generate code for Qt based classes, adding extra attributes,
|
||||||
|
# like signal, slot;
|
||||||
|
# --enable-return-value-heuristic: Similar as --enable-parent-ctor-heuristic this use some logic to guess
|
||||||
|
# parent child relationship based on the returned argument
|
||||||
|
# --use-isnull-as-nb_nonzero: If a class have an isNull() const method, it will be used to compute
|
||||||
|
# the value of boolean casts.
|
||||||
|
# Example, QImage::isNull() will be used when on python side you do `if (myQImage)`
|
||||||
|
set(GENERATOR_EXTRA_FLAGS
|
||||||
|
--generator-set=shiboken
|
||||||
|
--enable-parent-ctor-heuristic
|
||||||
|
--enable-pyside-extensions
|
||||||
|
--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}")
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Creates a PySide module target based on the arguments
|
||||||
|
# This will:
|
||||||
|
# 1 - Create a Cmake custom-target that call shiboken-generator passign the correct arguments
|
||||||
|
# 2 - Create a Cmake library target called "Py${LIBRARY_NAME}" the output name of this target
|
||||||
|
# will be changed to match PySide template
|
||||||
|
# Args:
|
||||||
|
# LIBRARY_NAME - The name of the output module
|
||||||
|
# TYPESYSTEM_PATHS - A list of paths where shiboken should look for typesystem files
|
||||||
|
# INCLUDE_PATHS - Include paths necessary to parse your class. *This is not the same as build*
|
||||||
|
# OUTPUT_SOURCES - The files that will be generated by shiboken
|
||||||
|
# TARGET_INCLUDE_DIRS - This will be passed to target_include_directories
|
||||||
|
# TARGET_LINK_LIBRARIES - This will be passed to target_link_libraries
|
||||||
|
# GLOBAL_INCLUDE - A header-file that contains all classes that will be generated
|
||||||
|
# TYPESYSTEM_XML - The target binding typesystem (that should be the full path)
|
||||||
|
# DEPENDS - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
|
||||||
|
# trigger if one of these files changes
|
||||||
|
# MODULE_OUTPUT_DIR - Where the library file should be stored
|
||||||
|
macro(CREATE_PYTHON_BINDINGS
|
||||||
|
LIBRARY_NAME
|
||||||
|
TYPESYSTEM_PATHS
|
||||||
|
INCLUDE_PATHS
|
||||||
|
OUTPUT_SOURCES
|
||||||
|
TARGET_INCLUDE_DIRS
|
||||||
|
TARGET_LINK_LIBRARIES
|
||||||
|
GLOBAL_INCLUDE
|
||||||
|
TYPESYSTEM_XML
|
||||||
|
DEPENDS
|
||||||
|
MODULE_OUTPUT_DIR)
|
||||||
|
|
||||||
|
# Transform the path separators into something shiboken understands.
|
||||||
|
make_path(shiboken_include_dirs ${INCLUDE_PATHS})
|
||||||
|
make_path(shiboken_typesystem_dirs ${TYPESYSTEM_PATHS})
|
||||||
|
get_property(raw_python_dir_include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
|
||||||
|
make_path(python_dir_include_dirs ${raw_python_dir_include_dirs})
|
||||||
|
set(shiboken_include_dirs "${shiboken_include_dirs}${PATH_SEP}${python_dir_include_dirs}")
|
||||||
|
|
||||||
|
set(shiboken_framework_include_dirs_option "")
|
||||||
|
if(CMAKE_HOST_APPLE)
|
||||||
|
set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}")
|
||||||
|
make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
|
||||||
|
set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
|
||||||
|
endif()
|
||||||
|
set_property(SOURCE ${OUTPUT_SOURCES} PROPERTY SKIP_AUTOGEN ON)
|
||||||
|
add_custom_command(OUTPUT ${OUTPUT_SOURCES}
|
||||||
|
COMMAND $<TARGET_PROPERTY:Shiboken2::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS}
|
||||||
|
${GLOBAL_INCLUDE}
|
||||||
|
--include-paths=${shiboken_include_dirs}
|
||||||
|
--typesystem-paths=${shiboken_typesystem_dirs}
|
||||||
|
${shiboken_framework_include_dirs_option}
|
||||||
|
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${TYPESYSTEM_XML}
|
||||||
|
DEPENDS ${TYPESYSTEM_XML} ${DEPENDS}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
COMMENT "Running generator for ${LIBRARY_NAME} binding...")
|
||||||
|
|
||||||
|
set(TARGET_NAME "Py${LIBRARY_NAME}")
|
||||||
|
set(MODULE_NAME "${LIBRARY_NAME}")
|
||||||
|
add_library(${TARGET_NAME} MODULE ${OUTPUT_SOURCES})
|
||||||
|
|
||||||
|
set_target_properties(${TARGET_NAME} PROPERTIES
|
||||||
|
PREFIX ""
|
||||||
|
OUTPUT_NAME ${MODULE_NAME}
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY ${MODULE_OUTPUT_DIR}
|
||||||
|
INSTALL_RPATH "$ORIGIN"
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(${TARGET_NAME} PUBLIC
|
||||||
|
${TARGET_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${TARGET_NAME}
|
||||||
|
${TARGET_LINK_LIBRARIES}
|
||||||
|
PySide2::pyside2
|
||||||
|
Shiboken2::libshiboken
|
||||||
|
)
|
||||||
|
target_compile_definitions(${TARGET_NAME}
|
||||||
|
PRIVATE Py_LIMITED_API=0x03050000
|
||||||
|
)
|
||||||
|
if(APPLE)
|
||||||
|
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY
|
||||||
|
LINK_FLAGS "-undefined dynamic_lookup")
|
||||||
|
endif()
|
||||||
|
install(TARGETS ${TARGET_NAME}
|
||||||
|
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
|
||||||
|
endmacro()
|
||||||
156
cmake/KDAB/modules/PySide6ModuleBuild.cmake
Normal file
156
cmake/KDAB/modules/PySide6ModuleBuild.cmake
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
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 ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(PATH_SEP "\;")
|
||||||
|
else()
|
||||||
|
set(PATH_SEP ":")
|
||||||
|
endif()
|
||||||
|
#Qt6 requires C++17
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
|
||||||
|
get_target_property(QtCore_is_framework Qt6::Core FRAMEWORK)
|
||||||
|
if(QtCore_is_framework)
|
||||||
|
# Get the path to the framework dir.
|
||||||
|
list(GET Qt6Core_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
|
||||||
|
# --enable-parent-ctor-heuristic: Enable heuristics to detect parent relationship on constructors,
|
||||||
|
# this try to guess parent ownership based on the arguments of the constructors
|
||||||
|
# --enable-pyside-extensionsL: This will generate code for Qt based classes, adding extra attributes,
|
||||||
|
# like signal, slot;
|
||||||
|
# --enable-return-value-heuristic: Similar as --enable-parent-ctor-heuristic this use some logic to guess
|
||||||
|
# parent child relationship based on the returned argument
|
||||||
|
# --use-isnull-as-nb_nonzero: If a class have an isNull() const method, it will be used to compute
|
||||||
|
# the value of boolean casts.
|
||||||
|
# Example, QImage::isNull() will be used when on python side you do `if (myQImage)`
|
||||||
|
set(GENERATOR_EXTRA_FLAGS
|
||||||
|
--generator-set=shiboken
|
||||||
|
--enable-parent-ctor-heuristic
|
||||||
|
--enable-pyside-extensions
|
||||||
|
--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}")
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Creates a PySide module target based on the arguments
|
||||||
|
# This will:
|
||||||
|
# 1 - Create a Cmake custom-target that call shiboken-generator passign the correct arguments
|
||||||
|
# 2 - Create a Cmake library target called "Py${LIBRARY_NAME}" the output name of this target
|
||||||
|
# will be changed to match PySide template
|
||||||
|
# Args:
|
||||||
|
# LIBRARY_NAME - The name of the output module
|
||||||
|
# TYPESYSTEM_PATHS - A list of paths where shiboken should look for typesystem files
|
||||||
|
# INCLUDE_PATHS - Include paths necessary to parse your class. *This is not the same as build*
|
||||||
|
# OUTPUT_SOURCES - The files that will be generated by shiboken
|
||||||
|
# TARGET_INCLUDE_DIRS - This will be passed to target_include_directories
|
||||||
|
# TARGET_LINK_LIBRARIES - This will be passed to target_link_libraries
|
||||||
|
# GLOBAL_INCLUDE - A header-file that contains all classes that will be generated
|
||||||
|
# TYPESYSTEM_XML - The target binding typesystem (that should be the full path)
|
||||||
|
# DEPENDS - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
|
||||||
|
# trigger if one of these files changes
|
||||||
|
# MODULE_OUTPUT_DIR - Where the library file should be stored
|
||||||
|
macro(CREATE_PYTHON_BINDINGS
|
||||||
|
LIBRARY_NAME
|
||||||
|
TYPESYSTEM_PATHS
|
||||||
|
INCLUDE_PATHS
|
||||||
|
OUTPUT_SOURCES
|
||||||
|
TARGET_INCLUDE_DIRS
|
||||||
|
TARGET_LINK_LIBRARIES
|
||||||
|
GLOBAL_INCLUDE
|
||||||
|
TYPESYSTEM_XML
|
||||||
|
DEPENDS
|
||||||
|
MODULE_OUTPUT_DIR)
|
||||||
|
|
||||||
|
# Transform the path separators into something shiboken understands.
|
||||||
|
make_path(shiboken_include_dirs ${INCLUDE_PATHS})
|
||||||
|
make_path(shiboken_typesystem_dirs ${TYPESYSTEM_PATHS})
|
||||||
|
get_property(raw_python_dir_include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
|
||||||
|
make_path(python_dir_include_dirs ${raw_python_dir_include_dirs})
|
||||||
|
set(shiboken_include_dirs "${shiboken_include_dirs}${PATH_SEP}${python_dir_include_dirs}")
|
||||||
|
|
||||||
|
set(shiboken_framework_include_dirs_option "")
|
||||||
|
if(CMAKE_HOST_APPLE)
|
||||||
|
set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}")
|
||||||
|
make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
|
||||||
|
set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
|
||||||
|
endif()
|
||||||
|
set_property(SOURCE ${OUTPUT_SOURCES} PROPERTY SKIP_AUTOGEN ON)
|
||||||
|
add_custom_command(OUTPUT ${OUTPUT_SOURCES}
|
||||||
|
COMMAND $<TARGET_PROPERTY:Shiboken6::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS}
|
||||||
|
${GLOBAL_INCLUDE}
|
||||||
|
--include-paths=${shiboken_include_dirs}
|
||||||
|
--typesystem-paths=${shiboken_typesystem_dirs}
|
||||||
|
${shiboken_framework_include_dirs_option}
|
||||||
|
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${TYPESYSTEM_XML}
|
||||||
|
DEPENDS ${TYPESYSTEM_XML} ${DEPENDS}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
COMMENT "Running generator for ${LIBRARY_NAME} binding...")
|
||||||
|
|
||||||
|
set(TARGET_NAME "Py${LIBRARY_NAME}")
|
||||||
|
set(MODULE_NAME "${LIBRARY_NAME}")
|
||||||
|
add_library(${TARGET_NAME} MODULE ${OUTPUT_SOURCES})
|
||||||
|
|
||||||
|
set_target_properties(${TARGET_NAME} PROPERTIES
|
||||||
|
PREFIX ""
|
||||||
|
OUTPUT_NAME ${MODULE_NAME}
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY ${MODULE_OUTPUT_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(${TARGET_NAME} PUBLIC
|
||||||
|
${TARGET_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${TARGET_NAME}
|
||||||
|
${TARGET_LINK_LIBRARIES}
|
||||||
|
PySide6::pyside6
|
||||||
|
Shiboken6::libshiboken
|
||||||
|
)
|
||||||
|
target_compile_definitions(${TARGET_NAME}
|
||||||
|
PRIVATE Py_LIMITED_API=0x03050000
|
||||||
|
)
|
||||||
|
if(APPLE)
|
||||||
|
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY
|
||||||
|
LINK_FLAGS "-undefined dynamic_lookup")
|
||||||
|
endif()
|
||||||
|
install(TARGETS ${TARGET_NAME}
|
||||||
|
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
|
||||||
|
endmacro()
|
||||||
147
code.dev-qtquick.code-workspace
Normal file
147
code.dev-qtquick.code-workspace
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev-qtquick/compile_commands.json",
|
||||||
|
"C_Cpp.default.cStandard": "c17",
|
||||||
|
"files.trimTrailingWhitespace": true,
|
||||||
|
"editor.formatOnType": true,
|
||||||
|
"C_Cpp.autocompleteAddParentheses": true
|
||||||
|
},
|
||||||
|
"launch": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "gdb-kddockwidgets_customtitlebar_quick",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_customtitlebar_quick",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdb-kddockwidgets_example_mdi_quick",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_mdi_quick",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdb-kddockwidgets_example_quick",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_quick",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdb-tst_docks",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-kddockwidgets_customtitlebar_quick",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_customtitlebar_quick",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-kddockwidgets_example_mdi_quick",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_mdi_quick",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-kddockwidgets_example_quick",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_quick",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-tst_docks",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-kddockwidgets_customtitlebar_quick",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_customtitlebar_quick",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-kddockwidgets_example_mdi_quick",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_mdi_quick",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-kddockwidgets_example_quick",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_quick",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-tst_docks",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev-qtquick/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
147
code.dev-qtwidgets.code-workspace
Normal file
147
code.dev-qtwidgets.code-workspace
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev/compile_commands.json",
|
||||||
|
"C_Cpp.default.cStandard": "c17",
|
||||||
|
"files.trimTrailingWhitespace": true,
|
||||||
|
"editor.formatOnType": true,
|
||||||
|
"C_Cpp.autocompleteAddParentheses": true
|
||||||
|
},
|
||||||
|
"launch": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "gdb-kddockwidgets_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdb-kddockwidgets_minimal_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdb-kddockwidgets_minimal_mdi_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_mdi_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdb-tst_docks",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-kddockwidgets_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-kddockwidgets_minimal_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-kddockwidgets_minimal_mdi_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_mdi_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-tst_docks",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-kddockwidgets_example",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-kddockwidgets_minimal_example",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-kddockwidgets_minimal_mdi_example",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_mdi_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-tst_docks",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
147
code.dev-qtwidgets6.code-workspace
Normal file
147
code.dev-qtwidgets6.code-workspace
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev6/compile_commands.json",
|
||||||
|
"C_Cpp.default.cStandard": "c17",
|
||||||
|
"files.trimTrailingWhitespace": true,
|
||||||
|
"editor.formatOnType": true,
|
||||||
|
"C_Cpp.autocompleteAddParentheses": true
|
||||||
|
},
|
||||||
|
"launch": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "gdb-kddockwidgets_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdb-kddockwidgets_minimal_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdb-kddockwidgets_minimal_mdi_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_mdi_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gdb-tst_docks",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-kddockwidgets_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-kddockwidgets_minimal_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-kddockwidgets_minimal_mdi_example",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_mdi_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lldb-tst_docks",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-kddockwidgets_example",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-kddockwidgets_minimal_example",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-kddockwidgets_minimal_mdi_example",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_mdi_example",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-tst_docks",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
21
conan/README.txt
Normal file
21
conan/README.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
In the following example we assume you have the kddockwidgets source available in
|
||||||
|
/path/to/kddockwidgets-source. replace '/path/to/kddockwidgets-source' to fit your needs.
|
||||||
|
|
||||||
|
$ conan create -s build_type=Release -o kddockwidgets:build_examples=True -o kddockwidgets:build_tests=True /path/to/kddockwidgets-source/conan kdab/stable
|
||||||
|
|
||||||
|
Configuration options:
|
||||||
|
* build_static
|
||||||
|
Builds static versions of the libraries. Default=False
|
||||||
|
|
||||||
|
* build_tests
|
||||||
|
Build the test harness. Default=False
|
||||||
|
|
||||||
|
* build_examples
|
||||||
|
Build the examples. Default=True
|
||||||
|
|
||||||
|
* build_python_bindings
|
||||||
|
Build/Generate python bindings (always false for Debug or static builds). Default=False
|
||||||
|
|
||||||
|
* build_for_qt6
|
||||||
|
Build against Qt6 rather than Qt5. Default=false (Qt5 will be used even if Qt6 is available)
|
||||||
|
(Make sure the Qt6 bin directory is found in your execute PATH)
|
||||||
68
conan/conanfile.py
Normal file
68
conan/conanfile.py
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
#
|
||||||
|
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
|
#
|
||||||
|
|
||||||
|
from conans import ConanFile, CMake, tools
|
||||||
|
|
||||||
|
class KDDockWidgetsConan(ConanFile):
|
||||||
|
name = "kddockwidgets"
|
||||||
|
version = "1.4.0"
|
||||||
|
default_user = "kdab"
|
||||||
|
default_channel = "stable"
|
||||||
|
license = ("https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-2.0-only.txt",
|
||||||
|
"https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-3.0-only.txt")
|
||||||
|
author = "Klaralvdalens Datakonsult AB (KDAB) info@kdab.com"
|
||||||
|
url = "https://github.com/KDAB/KDDockWidgets"
|
||||||
|
description = "Advanced Dock Widget Framework for Qt"
|
||||||
|
generators = "cmake"
|
||||||
|
topics = ("qt", "dockwidget" , "kdab")
|
||||||
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
options = {
|
||||||
|
"qt_version": "ANY",
|
||||||
|
"build_static": [True, False],
|
||||||
|
"build_examples": [True, False],
|
||||||
|
"build_tests": [True, False],
|
||||||
|
"build_python_bindings": [True, False],
|
||||||
|
"build_for_qt6": [True, False],
|
||||||
|
}
|
||||||
|
|
||||||
|
default_options = {
|
||||||
|
"qt_version": "qt/[>5.12.0]@kdab/stable",
|
||||||
|
"build_static": False,
|
||||||
|
"build_examples": True,
|
||||||
|
"build_tests": False,
|
||||||
|
"build_python_bindings": False,
|
||||||
|
"build_for_qt6": False,
|
||||||
|
}
|
||||||
|
|
||||||
|
def requirements(self):
|
||||||
|
# Check https://docs.conan.io/en/latest/reference/conanfile/attributes.html#version-ranges for more info about versioning
|
||||||
|
self.requires(str(self.options.qt_version))
|
||||||
|
|
||||||
|
def source(self):
|
||||||
|
git = tools.Git(folder="")
|
||||||
|
git.clone(self.url)
|
||||||
|
|
||||||
|
def build(self, build_type="Release"):
|
||||||
|
self.cmake = CMake(self, generator='Ninja', build_type=build_type)
|
||||||
|
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["KDDockWidgets_PYTHON_BINDINGS"] = self.options.build_python_bindings
|
||||||
|
self.cmake.definitions["KDDockWidgets_QT6"] = self.options.build_for_qt6
|
||||||
|
self.cmake.configure()
|
||||||
|
self.cmake.build()
|
||||||
|
|
||||||
|
def package(self):
|
||||||
|
self.cmake.install()
|
||||||
|
|
||||||
|
def package_info(self):
|
||||||
|
self.env_info.CMAKE_PREFIX_PATH.append(self.package_folder)
|
||||||
|
|
||||||
|
def package_id(self):
|
||||||
|
self.info.requires["qt"].minor_mode() # Check only the major and minor version!
|
||||||
47
distro/debian.changelog
Normal file
47
distro/debian.changelog
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
kddockwidgets (1.4.0) release candidate; urgency=high
|
||||||
|
|
||||||
|
* 1.4.0 final
|
||||||
|
|
||||||
|
-- Allen Winter <allen.winter@kdab.com> Fri, 16 Jul 2021 10:30:00 -0500
|
||||||
|
|
||||||
|
kddockwidgets (1.3.1) release candidate; urgency=high
|
||||||
|
|
||||||
|
* 1.3.1 final
|
||||||
|
|
||||||
|
-- Allen Winter <allen.winter@kdab.com> Mon, 07 Jun 2021 16:00:00 -0500
|
||||||
|
|
||||||
|
kddockwidgets (1.3.0) release candidate; urgency=high
|
||||||
|
|
||||||
|
* 1.3.0 final
|
||||||
|
|
||||||
|
-- Allen Winter <allen.winter@kdab.com> Mon, 08 Feb 2021 15:00:00 -0500
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
-- Allen Winter <allen.winter@kdab.com> Thu, 6 Aug 2020 11:00:00 -0500
|
||||||
1
distro/debian.compat
Normal file
1
distro/debian.compat
Normal file
@@ -0,0 +1 @@
|
|||||||
|
9
|
||||||
12
distro/debian.control
Normal file
12
distro/debian.control
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Source: kddockwidgets
|
||||||
|
Section: Miscellaneous
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Allen Winter <allen.winter@kdab.com>
|
||||||
|
Build-Depends: debhelper (>=9), cdbs, cmake
|
||||||
|
Standards-Version: 3.9.6
|
||||||
|
Homepage: https://github.com/KDAB/KDDockWidgets
|
||||||
|
|
||||||
|
Package: kddockwidgets
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Description: KDAB's Dock Widget Framework for Qt
|
||||||
3
distro/qt5-debian.rules
Normal file
3
distro/qt5-debian.rules
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||||
|
include /usr/share/cdbs/1/class/cmake.mk
|
||||||
1
distro/qt5-kddockwidgets-rpmlintrc
Normal file
1
distro/qt5-kddockwidgets-rpmlintrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
addFilter("E: shlib-policy-name-error")
|
||||||
10
distro/qt5-kddockwidgets.dsc
Normal file
10
distro/qt5-kddockwidgets.dsc
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Format: 1.0
|
||||||
|
Source: kddockwidgets
|
||||||
|
Version: 1.4.0-1
|
||||||
|
Binary: kddockwidgets
|
||||||
|
Maintainer: Allen Winter <allen.winter@kdab.com>
|
||||||
|
Architecture: any
|
||||||
|
Build-Depends: debhelper (>=9), cdbs, cmake, qtbase5-dev, libqt5x11extras5-dev
|
||||||
|
|
||||||
|
Files:
|
||||||
|
00000000000000000000000000000000 00000 qt5-kddockwidgets-1.4.0.tar.gz
|
||||||
116
distro/qt5-kddockwidgets.spec
Normal file
116
distro/qt5-kddockwidgets.spec
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
Name: qt5-kddockwidgets
|
||||||
|
Version: 1.4.0
|
||||||
|
Release: 1
|
||||||
|
Summary: KDAB's Dock Widget Framework for Qt5
|
||||||
|
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
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
Vendor: Klaralvdalens Datakonsult AB (KDAB)
|
||||||
|
Packager: Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
||||||
|
|
||||||
|
BuildRequires: cmake
|
||||||
|
%if %{defined suse_version}
|
||||||
|
BuildRequires: libqt5-qtbase-devel libqt5-qtx11extras-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{defined fedora}
|
||||||
|
BuildRequires: gcc-c++ qt5-qtbase-devel qt5-qtx11extras-devel desktop-file-utils
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{defined rhel}
|
||||||
|
BuildRequires: gcc-c++ qt5-qtbase-devel qt5-qtx11extras-devel desktop-file-utils
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
KDDockWidgets is a Qt dock widget library written by KDAB, suitable for replacing
|
||||||
|
QDockWidget and implementing advanced functionalities missing in Qt, including:
|
||||||
|
- Nesting dock widgets in a floating window and docking that group back to main window
|
||||||
|
- Docking to any main window, not only to the parent main window
|
||||||
|
- Docking to center of main window, or simply removing the concept of "central widget"
|
||||||
|
- Main window supporting detachable tabs in center widget
|
||||||
|
- Detaching arbitrary tabs from a tab bar into a dock area
|
||||||
|
- Exposing inner helper widgets so the user can customize them or provide his own
|
||||||
|
- Customize tab widgets
|
||||||
|
- Customize title bars
|
||||||
|
- Customize window frames
|
||||||
|
- Custom widget separators
|
||||||
|
...and much more
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
||||||
|
|
||||||
|
%define debug_package %{nil}
|
||||||
|
%global __debug_install_post %{nil}
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains header files and associated tools and libraries to
|
||||||
|
develop programs using kddockwidgets.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup
|
||||||
|
|
||||||
|
%build
|
||||||
|
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
|
||||||
|
%__make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%clean
|
||||||
|
%__rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_prefix}/share/doc/KDDockWidgets
|
||||||
|
%{_libdir}/libkddockwidgets.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%if 0%{?sle_version} >= 150200 && 0%{?is_opensuse}
|
||||||
|
%{_libdir}/qt5/mkspecs/modules/*
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%{_libdir}/qt5/mkspecs/modules/*
|
||||||
|
%endif
|
||||||
|
%if 0%{?fedora} > 28
|
||||||
|
%{_libdir}/qt5/mkspecs/modules/*
|
||||||
|
%endif
|
||||||
|
%if %{defined rhel}
|
||||||
|
%{_libdir}/qt5/mkspecs/modules/*
|
||||||
|
%endif
|
||||||
|
%dir %{_includedir}/kddockwidgets
|
||||||
|
%{_includedir}/kddockwidgets/*
|
||||||
|
%dir %{_libdir}/cmake/KDDockWidgets
|
||||||
|
%{_libdir}/cmake/KDDockWidgets/*
|
||||||
|
%{_libdir}/libkddockwidgets.so
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Jul 16 2021 Allen Winter <allen.winter@kdab.com> 1.4.0
|
||||||
|
1.4.0 final
|
||||||
|
* Mon Jun 07 2021 Allen Winter <allen.winter@kdab.com> 1.3.1
|
||||||
|
1.3.1 final
|
||||||
|
* Mon Feb 08 2021 Allen Winter <allen.winter@kdab.com> 1.3.0
|
||||||
|
1.3.0 final
|
||||||
|
* 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
|
||||||
4
distro/qt6-debian.rules
Normal file
4
distro/qt6-debian.rules
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
DEB_CMAKE_EXTRA_FLAGS = -DKDDockWidgets_QT6=True -DCMAKE_BUILD_TYPE=Release
|
||||||
|
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||||
|
include /usr/share/cdbs/1/class/cmake.mk
|
||||||
1
distro/qt6-kddockwidgets-rpmlintrc
Normal file
1
distro/qt6-kddockwidgets-rpmlintrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
addFilter("E: shlib-policy-name-error")
|
||||||
10
distro/qt6-kddockwidgets.dsc
Normal file
10
distro/qt6-kddockwidgets.dsc
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Format: 1.0
|
||||||
|
Source: kddockwidgets
|
||||||
|
Version: 1.4.0-1
|
||||||
|
Binary: kddockwidgets
|
||||||
|
Maintainer: Allen Winter <allen.winter@kdab.com>
|
||||||
|
Architecture: any
|
||||||
|
Build-Depends: debhelper (>=9), cdbs, cmake, qtbase6-dev, libqt6x11extras5-dev
|
||||||
|
|
||||||
|
Files:
|
||||||
|
00000000000000000000000000000000 00000 qt6-kddockwidgets-1.4.0.tar.gz
|
||||||
105
distro/qt6-kddockwidgets.spec
Normal file
105
distro/qt6-kddockwidgets.spec
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
Name: qt6-kddockwidgets
|
||||||
|
Version: 1.4.0
|
||||||
|
Release: 1
|
||||||
|
Summary: KDAB's Dock Widget Framework for Qt6
|
||||||
|
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
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
Vendor: Klaralvdalens Datakonsult AB (KDAB)
|
||||||
|
Packager: Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
||||||
|
|
||||||
|
BuildRequires: cmake
|
||||||
|
%if %{defined suse_version}
|
||||||
|
BuildRequires: libqt6-qtbase-devel libqt6-qtx11extras-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{defined fedora}
|
||||||
|
BuildRequires: gcc-c++ qt6-qtbase-devel desktop-file-utils
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{defined rhel}
|
||||||
|
BuildRequires: gcc-c++ qt6-qtbase-devel qt6-qtx11extras-devel desktop-file-utils
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
KDDockWidgets is a Qt dock widget library written by KDAB, suitable for replacing
|
||||||
|
QDockWidget and implementing advanced functionalities missing in Qt, including:
|
||||||
|
- Nesting dock widgets in a floating window and docking that group back to main window
|
||||||
|
- Docking to any main window, not only to the parent main window
|
||||||
|
- Docking to center of main window, or simply removing the concept of "central widget"
|
||||||
|
- Main window supporting detachable tabs in center widget
|
||||||
|
- Detaching arbitrary tabs from a tab bar into a dock area
|
||||||
|
- Exposing inner helper widgets so the user can customize them or provide his own
|
||||||
|
- Customize tab widgets
|
||||||
|
- Customize title bars
|
||||||
|
- Customize window frames
|
||||||
|
- Custom widget separators
|
||||||
|
...and much more
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
||||||
|
|
||||||
|
%define debug_package %{nil}
|
||||||
|
%global __debug_install_post %{nil}
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains header files and associated tools and libraries to
|
||||||
|
develop programs using kddockwidgets.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup
|
||||||
|
|
||||||
|
%build
|
||||||
|
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_QT6=True -DCMAKE_BUILD_TYPE=Release
|
||||||
|
%__make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%clean
|
||||||
|
%__rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_prefix}/share/doc/KDDockWidgets-qt6
|
||||||
|
%{_libdir}/libkddockwidgets-qt6.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%dir %{_includedir}/kddockwidgets-qt6
|
||||||
|
%{_includedir}/kddockwidgets-qt6/kddockwidgets/*
|
||||||
|
%dir %{_libdir}/cmake/KDDockWidgets-qt6
|
||||||
|
%{_libdir}/cmake/KDDockWidgets-qt6/*
|
||||||
|
%{_libdir}/libkddockwidgets-qt6.so
|
||||||
|
#%{_prefix}/mkspecs/modules/* ECMGeneratePriFile isn't ported to Qt6 yet
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Jul 16 2021 Allen Winter <allen.winter@kdab.com> 1.4.0
|
||||||
|
1.4.0 final
|
||||||
|
* Mon Jun 07 2021 Allen Winter <allen.winter@kdab.com> 1.3.1
|
||||||
|
1.3.1 final
|
||||||
|
* Mon Feb 08 2021 Allen Winter <allen.winter@kdab.com> 1.3.0
|
||||||
|
1.3.0 final
|
||||||
|
* 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
|
||||||
23
docs/CMakeLists.txt
Normal file
23
docs/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# Author: Allen Winter <allen.winter@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
#
|
||||||
|
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Doxygen
|
||||||
|
find_package(Doxygen)
|
||||||
|
set_package_properties(Doxygen PROPERTIES
|
||||||
|
TYPE OPTIONAL
|
||||||
|
DESCRIPTION "API Documentation system"
|
||||||
|
URL "https://www.doxygen.org"
|
||||||
|
PURPOSE "Needed to build the API documentation."
|
||||||
|
)
|
||||||
|
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
add_subdirectory(api)
|
||||||
|
endif()
|
||||||
Binary file not shown.
BIN
docs/KDDockWidgets-CopyrightAssignmentForm.pdf
Normal file
BIN
docs/KDDockWidgets-CopyrightAssignmentForm.pdf
Normal file
Binary file not shown.
71
docs/api/CMakeLists.txt
Normal file
71
docs/api/CMakeLists.txt
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
# Author: Allen Winter <allen.winter@kdab.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
#
|
||||||
|
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
|
#
|
||||||
|
|
||||||
|
# dot should come with Doxygen find_package(Doxygen)
|
||||||
|
if(DOXYGEN_DOT_EXECUTABLE)
|
||||||
|
set(HAVE_DOT "YES")
|
||||||
|
else()
|
||||||
|
set(HAVE_DOT "NO")
|
||||||
|
message(STATUS "Unable to provide inheritance diagrams for the API documentation. To fix, install the graphviz project from https://www.graphviz.org")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# qhelpgenerator
|
||||||
|
find_program(QHELPGEN_EXECUTABLE qhelpgenerator
|
||||||
|
HINTS ${QT_INSTALL_BINS}
|
||||||
|
)
|
||||||
|
if(QHELPGEN_EXECUTABLE)
|
||||||
|
set(HAVE_QHELPGEN "YES")
|
||||||
|
else()
|
||||||
|
set(HAVE_QHELPGEN "NO")
|
||||||
|
message(STATUS "Unable to generate the API documentation in qch format. To fix, install the qthelpgenerator program which comes with Qt.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_file(QDOC_QTCORE_TAG qtcore.tags
|
||||||
|
HINTS ${QT_INSTALL_DOCS}/qtcore
|
||||||
|
HINTS ${QT_INSTALL_DATA}/doc/qtcore
|
||||||
|
)
|
||||||
|
set(QDOC_TAG_DIR "<QDOC_TAG_DIR_not_found>")
|
||||||
|
if(QDOC_QTCORE_TAG)
|
||||||
|
get_filename_component(QDOC_TAG_DIR ${QDOC_QTCORE_TAG} DIRECTORY)
|
||||||
|
get_filename_component(QDOC_TAG_DIR ${QDOC_TAG_DIR} DIRECTORY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(GLOB _dox_deps *.dox *.html)
|
||||||
|
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
|
#apidox generation using doxygen
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
|
)
|
||||||
|
|
||||||
|
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_CURRENT_SOURCE_DIR}/../../screencap.gif ${DOXYGEN_OUTPUT_DIR}/html
|
||||||
|
#copy some files by-hand that are referred to by the markdown README
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/README-bindings.md ${DOXYGEN_OUTPUT_DIR}/html
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOXYGEN_OUTPUT_DIR}/html/LICENSES
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/LICENSES/GPL-2.0-only.txt ${DOXYGEN_OUTPUT_DIR}/html/LICENSES
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/LICENSES/GPL-3.0-only.txt ${DOXYGEN_OUTPUT_DIR}/html/LICENSES
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOXYGEN_OUTPUT_DIR}/html/docs
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/docs/KDDockWidgets-CopyrightAssignmentForm.pdf ${DOXYGEN_OUTPUT_DIR}/html/docs
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/examples ${DOXYGEN_OUTPUT_DIR}/html/examples
|
||||||
|
DEPENDS ${_dox_deps} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
)
|
||||||
|
add_custom_target(kddockwidgets-api.qch ALL DEPENDS ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch)
|
||||||
|
add_custom_target(docs DEPENDS kddockwidgets-api.qch)
|
||||||
|
|
||||||
|
set(QCH_INSTALL_DIR ${INSTALL_DOC_DIR} CACHE STRING "Install location of Qt Assistant help files.")
|
||||||
|
install(FILES ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch DESTINATION ${QCH_INSTALL_DIR})
|
||||||
|
install(FILES ${DOXYGEN_OUTPUT_DIR}/kddockwidgets.tags DESTINATION ${INSTALL_DOC_DIR})
|
||||||
2591
docs/api/Doxyfile.cmake
Normal file
2591
docs/api/Doxyfile.cmake
Normal file
File diff suppressed because it is too large
Load Diff
20
docs/api/footer.html
Normal file
20
docs/api/footer.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<hr>
|
||||||
|
<div style="float: left;">
|
||||||
|
<img src="kdab-logo-16x16.png">
|
||||||
|
<font style="font-weight: bold;">© 2019-2021 Klarälvdalens Datakonsult AB (KDAB)</font>
|
||||||
|
<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="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/kddockwidgets/">https://www.kdab.com/development-resources/qt-tools/kddockwidgets/</a><br>
|
||||||
|
$generatedby doxygen $doxygenversion<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
docs/api/kdab-kddockwidgets-logo-16x16.png
Normal file
BIN
docs/api/kdab-kddockwidgets-logo-16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
docs/api/kdab-logo-16x16.png
Normal file
BIN
docs/api/kdab-logo-16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1,18 +1,28 @@
|
|||||||
cmake_minimum_required(VERSION 3.3)
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2021 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)
|
project(kddockwidgets_example)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||||
|
|
||||||
|
if(NOT TARGET kddockwidgets)
|
||||||
if (NOT TARGET kddockwidgets)
|
|
||||||
# This will look for Qt, do find_package yourself manually before
|
# This will look for Qt, do find_package yourself manually before
|
||||||
# if you want to look for a specific Qt version for instance.
|
# if you want to look for a specific Qt version for instance.
|
||||||
find_package(KDDockWidgets REQUIRED)
|
find_package(KDDockWidgets REQUIRED)
|
||||||
endif()
|
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
|
add_executable(kddockwidgets_example
|
||||||
main.cpp
|
main.cpp
|
||||||
|
|||||||
@@ -1,43 +1,47 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
Copyright (C) 2018-2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MyFrameworkWidgetFactory.h"
|
#include "MyFrameworkWidgetFactory.h"
|
||||||
|
#include "MyTitleBar_CSS.h"
|
||||||
|
|
||||||
#include <kddockwidgets/FrameworkWidgetFactory.h>
|
#include <kddockwidgets/FrameworkWidgetFactory.h>
|
||||||
#include <kddockwidgets/multisplitter/Separator_qwidget.h>
|
|
||||||
|
#include <kddockwidgets/private/TabWidget_p.h>
|
||||||
|
#include <kddockwidgets/private/widgets/FrameWidget_p.h>
|
||||||
|
#include <kddockwidgets/private/widgets/TabBarWidget_p.h>
|
||||||
|
#include <kddockwidgets/private/widgets/TabWidgetWidget_p.h>
|
||||||
|
#include <kddockwidgets/private/widgets/TitleBarWidget_p.h>
|
||||||
|
#include <kddockwidgets/private/multisplitter/Separator_qwidget.h>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
class MyTitleBar : public KDDockWidgets::TitleBar
|
// clazy:excludeall=missing-qobject-macro,ctor-missing-parent-argument
|
||||||
|
|
||||||
|
class MyTitleBar : public KDDockWidgets::TitleBarWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit MyTitleBar(KDDockWidgets::Frame *frame)
|
explicit MyTitleBar(KDDockWidgets::Frame *frame)
|
||||||
: KDDockWidgets::TitleBar(frame)
|
: KDDockWidgets::TitleBarWidget(frame)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit MyTitleBar(KDDockWidgets::FloatingWindow *fw)
|
explicit MyTitleBar(KDDockWidgets::FloatingWindow *fw)
|
||||||
: KDDockWidgets::TitleBar(fw)
|
: KDDockWidgets::TitleBarWidget(fw)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~MyTitleBar() override;
|
||||||
|
|
||||||
void init()
|
void init()
|
||||||
{
|
{
|
||||||
setFixedHeight(60);
|
setFixedHeight(60);
|
||||||
@@ -47,7 +51,9 @@ public:
|
|||||||
{
|
{
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
QPen pen(Qt::black);
|
QPen pen(Qt::black);
|
||||||
QBrush brush(Qt::yellow);
|
const QColor focusedBackgroundColor = Qt::yellow;
|
||||||
|
const QColor backgroundColor = focusedBackgroundColor.darker(115);
|
||||||
|
QBrush brush(isFocused() ? focusedBackgroundColor : backgroundColor);
|
||||||
pen.setWidth(4);
|
pen.setWidth(4);
|
||||||
p.setPen(pen);
|
p.setPen(pen);
|
||||||
p.setBrush(brush);
|
p.setBrush(brush);
|
||||||
@@ -60,6 +66,8 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MyTitleBar::~MyTitleBar() = default;
|
||||||
|
|
||||||
// Inheriting from SeparatorWidget instead of Separator as it handles moving and mouse cursor changing
|
// Inheriting from SeparatorWidget instead of Separator as it handles moving and mouse cursor changing
|
||||||
class MySeparator : public Layouting::SeparatorWidget
|
class MySeparator : public Layouting::SeparatorWidget
|
||||||
{
|
{
|
||||||
@@ -69,6 +77,8 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~MySeparator() override;
|
||||||
|
|
||||||
void paintEvent(QPaintEvent *) override
|
void paintEvent(QPaintEvent *) override
|
||||||
{
|
{
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
@@ -76,13 +86,17 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MySeparator::~MySeparator() = default;
|
||||||
|
|
||||||
KDDockWidgets::TitleBar * CustomWidgetFactory::createTitleBar(KDDockWidgets::Frame *frame) const
|
KDDockWidgets::TitleBar * CustomWidgetFactory::createTitleBar(KDDockWidgets::Frame *frame) const
|
||||||
{
|
{
|
||||||
|
// Feel free to return MyTitleBar_CSS here instead, but just for education purposes!
|
||||||
return new MyTitleBar(frame);
|
return new MyTitleBar(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
KDDockWidgets::TitleBar * CustomWidgetFactory::createTitleBar(KDDockWidgets::FloatingWindow *fw) const
|
KDDockWidgets::TitleBar * CustomWidgetFactory::createTitleBar(KDDockWidgets::FloatingWindow *fw) const
|
||||||
{
|
{
|
||||||
|
// Feel free to return MyTitleBar_CSS here instead, but just for education purposes!
|
||||||
return new MyTitleBar(fw);
|
return new MyTitleBar(fw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,4 +104,3 @@ Layouting::Separator * CustomWidgetFactory::createSeparator(Layouting::Widget *p
|
|||||||
{
|
{
|
||||||
return new MySeparator(parent);
|
return new MySeparator(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
Copyright (C) 2018-2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <kddockwidgets/FrameworkWidgetFactory.h>
|
#include <kddockwidgets/FrameworkWidgetFactory.h>
|
||||||
#include <kddockwidgets/private/TitleBar_p.h>
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
|
// clazy:excludeall=ctor-missing-parent-argument
|
||||||
|
|
||||||
class CustomWidgetFactory : public KDDockWidgets::DefaultWidgetFactory
|
class CustomWidgetFactory : public KDDockWidgets::DefaultWidgetFactory
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
KDDockWidgets::TitleBar *createTitleBar(KDDockWidgets::Frame *frame) const override;
|
KDDockWidgets::TitleBar *createTitleBar(KDDockWidgets::Frame *frame) const override;
|
||||||
KDDockWidgets::TitleBar *createTitleBar(KDDockWidgets::FloatingWindow *fw) const override;
|
KDDockWidgets::TitleBar *createTitleBar(KDDockWidgets::FloatingWindow *fw) const override;
|
||||||
|
|||||||
@@ -1,26 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
Copyright (C) 2018-2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MyMainWindow.h"
|
#include "MyMainWindow.h"
|
||||||
#include "MyWidget.h"
|
#include "MyWidget.h"
|
||||||
|
|
||||||
|
#include <kddockwidgets/Config.h>
|
||||||
#include <kddockwidgets/LayoutSaver.h>
|
#include <kddockwidgets/LayoutSaver.h>
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
@@ -29,21 +21,18 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
|
||||||
#include <QRandomGenerator>
|
#include <QRandomGenerator>
|
||||||
#endif
|
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
// clazy:excludeall=qstring-allocations,ctor-missing-parent-argument,detaching-member
|
||||||
|
|
||||||
static MyWidget *newMyWidget()
|
static MyWidget *newMyWidget()
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
|
|
||||||
const int randomNumber = qrand() % 100 + 1;
|
|
||||||
#else
|
|
||||||
const int randomNumber = QRandomGenerator::global()->bounded(0, 100) + 1;
|
const int randomNumber = QRandomGenerator::global()->bounded(0, 100) + 1;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (randomNumber < 50) {
|
if (randomNumber < 50) {
|
||||||
if (randomNumber < 33) {
|
if (randomNumber < 33) {
|
||||||
return new MyWidget1();
|
return new MyWidget1();
|
||||||
@@ -57,24 +46,23 @@ static MyWidget *newMyWidget()
|
|||||||
|
|
||||||
MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
||||||
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
||||||
bool maxSizeForDockWidget8,
|
bool maxSizeForDockWidget8, bool dockwidget5DoesntCloseBeforeRestore,
|
||||||
const QString &affinityName, QWidget *parent)
|
const QString &affinityName, QWidget *parent)
|
||||||
: MainWindow(uniqueName, options, parent)
|
: MainWindow(uniqueName, options, parent)
|
||||||
, m_dockWidget0IsNonClosable(dockWidget0IsNonClosable)
|
, m_dockWidget0IsNonClosable(dockWidget0IsNonClosable)
|
||||||
, m_dockWidget9IsNonDockable(nonDockableDockWidget9)
|
, m_dockWidget9IsNonDockable(nonDockableDockWidget9)
|
||||||
, m_restoreIsRelative(restoreIsRelative)
|
, m_restoreIsRelative(restoreIsRelative)
|
||||||
, m_maxSizeForDockWidget8(maxSizeForDockWidget8)
|
, m_maxSizeForDockWidget8(maxSizeForDockWidget8)
|
||||||
|
, m_dockwidget5DoesntCloseBeforeRestore(dockwidget5DoesntCloseBeforeRestore)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
|
|
||||||
qsrand(time(nullptr));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// qApp->installEventFilter(this);
|
|
||||||
auto menubar = menuBar();
|
auto menubar = menuBar();
|
||||||
auto fileMenu = new QMenu(QStringLiteral("File"));
|
auto fileMenu = new QMenu(QStringLiteral("File"), this);
|
||||||
m_toggleMenu = new QMenu(QStringLiteral("Toggle"));
|
m_toggleMenu = new QMenu(QStringLiteral("Toggle"), this);
|
||||||
|
auto miscMenu = new QMenu(QStringLiteral("Misc"), this);
|
||||||
|
|
||||||
menubar->addMenu(fileMenu);
|
menubar->addMenu(fileMenu);
|
||||||
menubar->addMenu(m_toggleMenu);
|
menubar->addMenu(m_toggleMenu);
|
||||||
|
menubar->addMenu(miscMenu);
|
||||||
|
|
||||||
QAction *newAction = fileMenu->addAction(QStringLiteral("New DockWidget"));
|
QAction *newAction = fileMenu->addAction(QStringLiteral("New DockWidget"));
|
||||||
|
|
||||||
@@ -108,7 +96,7 @@ MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowO
|
|||||||
|
|
||||||
auto closeAllAction = fileMenu->addAction(QStringLiteral("Close All"));
|
auto closeAllAction = fileMenu->addAction(QStringLiteral("Close All"));
|
||||||
connect(closeAllAction, &QAction::triggered, this, [this] {
|
connect(closeAllAction, &QAction::triggered, this, [this] {
|
||||||
for (auto dw : m_dockwidgets)
|
for (auto dw : qAsConst(m_dockwidgets))
|
||||||
dw->close();
|
dw->close();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -118,8 +106,19 @@ MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowO
|
|||||||
auto quitAction = fileMenu->addAction(QStringLiteral("Quit"));
|
auto quitAction = fileMenu->addAction(QStringLiteral("Quit"));
|
||||||
connect(quitAction, &QAction::triggered, qApp, &QApplication::quit);
|
connect(quitAction, &QAction::triggered, qApp, &QApplication::quit);
|
||||||
|
|
||||||
|
QAction *toggleDropIndicatorSupport = miscMenu->addAction(QStringLiteral("Toggle Drop Indicator Support"));
|
||||||
|
toggleDropIndicatorSupport->setCheckable(true);
|
||||||
|
toggleDropIndicatorSupport->setChecked(true);
|
||||||
|
connect(toggleDropIndicatorSupport, &QAction::toggled, this, [](bool checked) {
|
||||||
|
KDDockWidgets::Config::self().setDropIndicatorsInhibited(!checked);
|
||||||
|
});
|
||||||
|
|
||||||
setAffinities({ affinityName });
|
setAffinities({ affinityName });
|
||||||
createDockWidgets();
|
createDockWidgets();
|
||||||
|
|
||||||
|
if (options & KDDockWidgets::MainWindowOption_HasCentralWidget) {
|
||||||
|
setPersistentCentralWidget(new MyWidget1());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyMainWindow::~MyMainWindow()
|
MyMainWindow::~MyMainWindow()
|
||||||
@@ -138,28 +137,27 @@ void MyMainWindow::createDockWidgets()
|
|||||||
for (int i = 0; i < numDockWidgets; i++)
|
for (int i = 0; i < numDockWidgets; i++)
|
||||||
m_dockwidgets << newDockWidget();
|
m_dockwidgets << newDockWidget();
|
||||||
|
|
||||||
|
|
||||||
// MainWindow::addDockWidget() attaches a dock widget to the main window:
|
// MainWindow::addDockWidget() attaches a dock widget to the main window:
|
||||||
addDockWidget(m_dockwidgets[0], KDDockWidgets::Location_OnTop);
|
addDockWidget(m_dockwidgets.at(0), KDDockWidgets::Location_OnTop);
|
||||||
|
|
||||||
// Here, for finer granularity we specify right of dockwidgets[0]:
|
// Here, for finer granularity we specify right of dockwidgets[0]:
|
||||||
addDockWidget(m_dockwidgets[1], KDDockWidgets::Location_OnRight, m_dockwidgets[0]);
|
addDockWidget(m_dockwidgets.at(1), KDDockWidgets::Location_OnRight, m_dockwidgets.at(0));
|
||||||
|
|
||||||
addDockWidget(m_dockwidgets[2], KDDockWidgets::Location_OnLeft);
|
addDockWidget(m_dockwidgets.at(2), KDDockWidgets::Location_OnLeft);
|
||||||
addDockWidget(m_dockwidgets[3], KDDockWidgets::Location_OnBottom);
|
addDockWidget(m_dockwidgets.at(3), KDDockWidgets::Location_OnBottom);
|
||||||
addDockWidget(m_dockwidgets[4], KDDockWidgets::Location_OnBottom);
|
addDockWidget(m_dockwidgets.at(4), KDDockWidgets::Location_OnBottom);
|
||||||
|
|
||||||
// Tab two dock widgets together
|
// Tab two dock widgets together
|
||||||
m_dockwidgets[3]->addDockWidgetAsTab(m_dockwidgets[5]);
|
m_dockwidgets[3]->addDockWidgetAsTab(m_dockwidgets.at(5));
|
||||||
|
|
||||||
// 6 is floating, as it wasn't added to the main window via MainWindow::addDockWidget().
|
// 6 is floating, as it wasn't added to the main window via MainWindow::addDockWidget().
|
||||||
// and we tab 7 with it.
|
// and we tab 7 with it.
|
||||||
m_dockwidgets[6]->addDockWidgetAsTab(m_dockwidgets[7]);
|
m_dockwidgets[6]->addDockWidgetAsTab(m_dockwidgets.at(7));
|
||||||
|
|
||||||
// Floating windows also support nesting, here we add 8 to the bottom of the group
|
// Floating windows also support nesting, here we add 8 to the bottom of the group
|
||||||
m_dockwidgets[6]->addDockWidgetToContainingWindow(m_dockwidgets[8], KDDockWidgets::Location_OnBottom);
|
m_dockwidgets[6]->addDockWidgetToContainingWindow(m_dockwidgets.at(8), KDDockWidgets::Location_OnBottom);
|
||||||
|
|
||||||
auto floatingWindow = m_dockwidgets[6]->window();
|
auto floatingWindow = m_dockwidgets.at(6)->window();
|
||||||
floatingWindow->move(100, 100);
|
floatingWindow->move(100, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,13 +167,18 @@ KDDockWidgets::DockWidgetBase *MyMainWindow::newDockWidget()
|
|||||||
|
|
||||||
// Passing options is optional, we just want to illustrate Option_NotClosable here
|
// Passing options is optional, we just want to illustrate Option_NotClosable here
|
||||||
KDDockWidgets::DockWidget::Options options = KDDockWidgets::DockWidget::Option_None;
|
KDDockWidgets::DockWidget::Options options = KDDockWidgets::DockWidget::Option_None;
|
||||||
|
KDDockWidgets::DockWidget::LayoutSaverOptions layoutSaverOptions = KDDockWidgets::DockWidget::LayoutSaverOption::None;
|
||||||
|
|
||||||
if (count == 0 && m_dockWidget0IsNonClosable)
|
if (count == 0 && m_dockWidget0IsNonClosable)
|
||||||
options |= KDDockWidgets::DockWidget::Option_NotClosable;
|
options |= KDDockWidgets::DockWidget::Option_NotClosable;
|
||||||
|
|
||||||
if (count == 9 && m_dockWidget9IsNonDockable)
|
if (count == 9 && m_dockWidget9IsNonDockable)
|
||||||
options |= KDDockWidgets::DockWidget::Option_NotDockable;
|
options |= KDDockWidgets::DockWidget::Option_NotDockable;
|
||||||
|
|
||||||
auto dock = new KDDockWidgets::DockWidget(QStringLiteral("DockWidget #%1").arg(count), options);
|
if (count == 5 && m_dockwidget5DoesntCloseBeforeRestore)
|
||||||
|
layoutSaverOptions |= KDDockWidgets::DockWidget::LayoutSaverOption::Skip;
|
||||||
|
|
||||||
|
auto dock = new KDDockWidgets::DockWidget(QStringLiteral("DockWidget #%1").arg(count), options, layoutSaverOptions);
|
||||||
dock->setAffinities(affinities()); // optional, just to show the feature. Pass -mi to the example to see incompatible dock widgets
|
dock->setAffinities(affinities()); // optional, just to show the feature. Pass -mi to the example to see incompatible dock widgets
|
||||||
|
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
@@ -196,8 +199,8 @@ KDDockWidgets::DockWidgetBase *MyMainWindow::newDockWidget()
|
|||||||
}
|
}
|
||||||
|
|
||||||
dock->resize(600, 600);
|
dock->resize(600, 600);
|
||||||
dock->show();
|
|
||||||
m_toggleMenu->addAction(dock->toggleAction());
|
m_toggleMenu->addAction(dock->toggleAction());
|
||||||
|
dock->toggleAction()->setShortcut(QStringLiteral("ctrl+%1").arg(count));
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
return dock;
|
return dock;
|
||||||
|
|||||||
@@ -1,21 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
Copyright (C) 2018-2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -29,7 +20,7 @@ class MyMainWindow : public KDDockWidgets::MainWindow
|
|||||||
public:
|
public:
|
||||||
explicit MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
explicit MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
||||||
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
||||||
bool maxSizeForDockWidget8,
|
bool maxSizeForDockWidget8, bool dockwidget5DoesntCloseBeforeRestore,
|
||||||
const QString &affinityName = {}, // Usually not needed. Just here to show the feature.
|
const QString &affinityName = {}, // Usually not needed. Just here to show the feature.
|
||||||
QWidget *parent = nullptr);
|
QWidget *parent = nullptr);
|
||||||
~MyMainWindow() override;
|
~MyMainWindow() override;
|
||||||
@@ -42,5 +33,6 @@ private:
|
|||||||
const bool m_dockWidget9IsNonDockable;
|
const bool m_dockWidget9IsNonDockable;
|
||||||
const bool m_restoreIsRelative;
|
const bool m_restoreIsRelative;
|
||||||
const bool m_maxSizeForDockWidget8;
|
const bool m_maxSizeForDockWidget8;
|
||||||
|
const bool m_dockwidget5DoesntCloseBeforeRestore;
|
||||||
KDDockWidgets::DockWidget::List m_dockwidgets;
|
KDDockWidgets::DockWidget::List m_dockwidgets;
|
||||||
};
|
};
|
||||||
|
|||||||
79
examples/dockwidgets/MyTitleBar_CSS.h
Normal file
79
examples/dockwidgets/MyTitleBar_CSS.h
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
Author: Sérgio 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/private/widgets/TitleBarWidget_p.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Shows how to implement a custom titlebar which uses "Qt StyleSheets".
|
||||||
|
*
|
||||||
|
* Derive from KDDockWidgets::DefaultWidgetFactory and override the two createTitleBar() methods.
|
||||||
|
*
|
||||||
|
* To try it out, modify examples/dockwidgets/MyFrameworkWidgetFactory.cpp to return a MyTitleBar_CSS instance.
|
||||||
|
* Run the example with: ./bin/kddockwidgets_example -p
|
||||||
|
*
|
||||||
|
* WARNINGS:
|
||||||
|
* - Qt StyleSheets are not recommended for new applications. Often you are able to style 90% of
|
||||||
|
* the application but then hit a road block. QStyle is much more powerful and flexible.
|
||||||
|
* - The Qt maintainers have manifested intention to deprecated stylesheets.
|
||||||
|
* - Stylesheets are supported for built-in QWidgets (QPushButton, QComboBox, etc.), any widget
|
||||||
|
* that's not in Qt needs to be crafted by the user, that includes, for example, having to paint
|
||||||
|
* your background manually. KDDockWidget::TitleBarWidget does this for your convenience though.
|
||||||
|
* - Qt stylesheets don't react to property changes (known old bug in Qt), for example:
|
||||||
|
* QLineEdit[readOnly="true"] { color: gray }
|
||||||
|
* this won't trigger when readOnly changes to false, you need to set/unset. This is QTBUG-51236
|
||||||
|
* - KDDockWidgets::TitleBarWidget::isFocused is a property, there for needs to workaround the
|
||||||
|
* above bug by unsetting the sheet and setting it again.
|
||||||
|
*/
|
||||||
|
class MyTitleBar_CSS : public KDDockWidgets::TitleBarWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit MyTitleBar_CSS(KDDockWidgets::Frame *frame)
|
||||||
|
: KDDockWidgets::TitleBarWidget(frame)
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit MyTitleBar_CSS(KDDockWidgets::FloatingWindow *fw)
|
||||||
|
: KDDockWidgets::TitleBarWidget(fw)
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
~MyTitleBar_CSS() override;
|
||||||
|
|
||||||
|
void initStyleSheet()
|
||||||
|
{
|
||||||
|
// Or use qApp->setStyleSheet(), as you prefer
|
||||||
|
setStyleSheet(QStringLiteral("KDDockWidgets--TitleBarWidget {"
|
||||||
|
"background: blue"
|
||||||
|
"}"
|
||||||
|
"KDDockWidgets--TitleBarWidget:hover {"
|
||||||
|
"background: red"
|
||||||
|
"}"
|
||||||
|
"KDDockWidgets--TitleBarWidget[isFocused=true] {"
|
||||||
|
"background: green"
|
||||||
|
"}"));
|
||||||
|
}
|
||||||
|
|
||||||
|
void init()
|
||||||
|
{
|
||||||
|
initStyleSheet();
|
||||||
|
connect(this, &KDDockWidgets::TitleBar::isFocusedChanged, this, [this] {
|
||||||
|
// Workaround QTBUG-51236, this makes the [isFocused=true] syntax useful
|
||||||
|
setStyleSheet(QString());
|
||||||
|
initStyleSheet();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
MyTitleBar_CSS::~MyTitleBar_CSS()
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -1,21 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
Copyright (C) 2018-2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MyWidget.h"
|
#include "MyWidget.h"
|
||||||
@@ -23,8 +14,9 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QLineEdit>
|
||||||
|
|
||||||
static QHash<QString, QImage> s_images;
|
static QHash<QString, QImage> s_images; /// clazy:exclude=non-pod-global-static
|
||||||
|
|
||||||
MyWidget::MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent)
|
MyWidget::MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
@@ -42,6 +34,15 @@ MyWidget::MyWidget(const QString &backgroundFile, const QString &logoFile, QWidg
|
|||||||
it = s_images.insert(logoFile, QImage(logoFile));
|
it = s_images.insert(logoFile, QImage(logoFile));
|
||||||
m_logo = it.value();
|
m_logo = it.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setFocusPolicy(Qt::StrongFocus);
|
||||||
|
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()
|
MyWidget::~MyWidget()
|
||||||
|
|||||||
@@ -1,21 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
Copyright (C) 2018-2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef EXAMPLEDOCKABLEWIDGET_H
|
#ifndef EXAMPLEDOCKABLEWIDGET_H
|
||||||
@@ -43,6 +34,7 @@ protected:
|
|||||||
|
|
||||||
class MyWidget1 : public MyWidget
|
class MyWidget1 : public MyWidget
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit MyWidget1(QWidget *parent = nullptr);
|
explicit MyWidget1(QWidget *parent = nullptr);
|
||||||
protected:
|
protected:
|
||||||
@@ -51,6 +43,7 @@ protected:
|
|||||||
|
|
||||||
class MyWidget2 : public MyWidget
|
class MyWidget2 : public MyWidget
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit MyWidget2(QWidget *parent = nullptr);
|
explicit MyWidget2(QWidget *parent = nullptr);
|
||||||
protected:
|
protected:
|
||||||
@@ -59,6 +52,7 @@ protected:
|
|||||||
|
|
||||||
class MyWidget3 : public MyWidget
|
class MyWidget3 : public MyWidget
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit MyWidget3(QWidget *parent = nullptr);
|
explicit MyWidget3(QWidget *parent = nullptr);
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -1,21 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
Copyright (C) 2018-2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MyWidget.h"
|
#include "MyWidget.h"
|
||||||
@@ -29,12 +20,16 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
|
|
||||||
|
// clazy:excludeall=qstring-allocations
|
||||||
|
|
||||||
using namespace KDDockWidgets;
|
using namespace KDDockWidgets;
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
#endif
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
app.setOrganizationName(QStringLiteral("KDAB"));
|
app.setOrganizationName(QStringLiteral("KDAB"));
|
||||||
@@ -44,6 +39,7 @@ int main(int argc, char **argv)
|
|||||||
parser.setApplicationDescription("KDDockWidgets example application");
|
parser.setApplicationDescription("KDDockWidgets example application");
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
|
|
||||||
|
// Fusion looks better in general, but feel free to change
|
||||||
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
||||||
|
|
||||||
QCommandLineOption customStyle("p", QCoreApplication::translate("main", "Shows how to style framework internals via FrameworkWidgetFactory"));
|
QCommandLineOption customStyle("p", QCoreApplication::translate("main", "Shows how to style framework internals via FrameworkWidgetFactory"));
|
||||||
@@ -52,9 +48,15 @@ int main(int argc, char **argv)
|
|||||||
QCommandLineOption reorderTabsOption("r", QCoreApplication::translate("main", "Support re-ordering tabs with mouse"));
|
QCommandLineOption reorderTabsOption("r", QCoreApplication::translate("main", "Support re-ordering tabs with mouse"));
|
||||||
parser.addOption(reorderTabsOption);
|
parser.addOption(reorderTabsOption);
|
||||||
|
|
||||||
QCommandLineOption noTitleBars("t", QCoreApplication::translate("main", "Never show titlebars"));
|
QCommandLineOption noTitleBars("t", QCoreApplication::translate("main", "Hide titlebars when tabs are visible"));
|
||||||
parser.addOption(noTitleBars);
|
parser.addOption(noTitleBars);
|
||||||
|
|
||||||
|
QCommandLineOption alwaysTitleBarWhenFloating("q", QCoreApplication::translate("main", "Don't hide title bars if floating, even if Flag_HideTitleBarWhenTabsVisible is specified."));
|
||||||
|
parser.addOption(alwaysTitleBarWhenFloating);
|
||||||
|
|
||||||
|
QCommandLineOption alwaysTabs("z", QCoreApplication::translate("main", "Show tabs even if there's only one"));
|
||||||
|
parser.addOption(alwaysTabs);
|
||||||
|
|
||||||
QCommandLineOption lazyResizeOption("l", QCoreApplication::translate("main", "Use lazy resize"));
|
QCommandLineOption lazyResizeOption("l", QCoreApplication::translate("main", "Use lazy resize"));
|
||||||
parser.addOption(lazyResizeOption);
|
parser.addOption(lazyResizeOption);
|
||||||
|
|
||||||
@@ -79,8 +81,20 @@ int main(int argc, char **argv)
|
|||||||
QCommandLineOption nonDockable("d", QCoreApplication::translate("main", "DockWidget #9 will be non-dockable"));
|
QCommandLineOption nonDockable("d", QCoreApplication::translate("main", "DockWidget #9 will be non-dockable"));
|
||||||
parser.addOption(nonDockable);
|
parser.addOption(nonDockable);
|
||||||
|
|
||||||
QCommandLineOption maximizeButton("b", QCoreApplication::translate("main", "DockWidgets have maximize/restore buttons instead of float/dock button"));
|
QCommandLineOption maximizeButtonOption("b", QCoreApplication::translate("main", "Floating dockWidgets have maximize/restore buttons instead of float/dock button"));
|
||||||
parser.addOption(maximizeButton);
|
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"));
|
parser.addPositionalArgument("savedlayout", QCoreApplication::translate("main", "loads the specified json file at startup"));
|
||||||
|
|
||||||
@@ -89,14 +103,52 @@ int main(int argc, char **argv)
|
|||||||
parser.addOption(dockableMainWindows);
|
parser.addOption(dockableMainWindows);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QCommandLineOption maxSizeOption("g", QCoreApplication::translate("main", "Make dock #8 have a max-size of 200x200. (this feature is work in progress)"));
|
QCommandLineOption maxSizeOption("g", QCoreApplication::translate("main", "Make dock #8 have a max-size of 200x200."));
|
||||||
|
parser.addOption(maxSizeOption);
|
||||||
|
|
||||||
QCommandLineOption centralFrame("f", QCoreApplication::translate("main", "Persistent central frame"));
|
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);
|
||||||
|
|
||||||
|
QCommandLineOption closeOnlyCurrentTab("close-only-current-tab",
|
||||||
|
QCoreApplication::translate("main", "The title bar's close button will only close the current tab instead of all. Illustrates using Config::Flag_CloseOnlyCurrentTab"));
|
||||||
|
parser.addOption(closeOnlyCurrentTab);
|
||||||
|
|
||||||
|
QCommandLineOption dontCloseBeforeRestore("dont-close-widget-before-restore", //krazy:exclude=spelling
|
||||||
|
QCoreApplication::translate("main", "DockWidget #5 won't be closed before a restore. Illustrates LayoutSaverOption::DontCloseBeforeRestore"));
|
||||||
|
parser.addOption(dontCloseBeforeRestore);
|
||||||
|
|
||||||
|
QCommandLineOption showButtonsInTabBarIfTitleBarHidden("show-buttons-in-tabbar-if-titlebar-hidden",
|
||||||
|
QCoreApplication::translate("main", "If we're not using title bars we'll still show the close and float button in the tab bar"));
|
||||||
|
parser.addOption(showButtonsInTabBarIfTitleBarHidden);
|
||||||
|
|
||||||
|
QCommandLineOption centralWidget("central-widget",
|
||||||
|
QCoreApplication::translate("main", "The main window will have a non-detachable central widget"));
|
||||||
|
parser.addOption(centralWidget);
|
||||||
|
|
||||||
|
QCommandLineOption ctxtMenuOnTabs("allow-switch-tabs-via-menu",
|
||||||
|
QCoreApplication::translate("main", "Allow switching tabs via context menu in tabs area"));
|
||||||
|
parser.addOption(ctxtMenuOnTabs);
|
||||||
|
|
||||||
#if defined(DOCKS_DEVELOPER_MODE)
|
#if defined(DOCKS_DEVELOPER_MODE)
|
||||||
parser.addOption(centralFrame);
|
parser.addOption(centralFrame);
|
||||||
parser.addOption(maxSizeOption);
|
|
||||||
|
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
|
#else
|
||||||
Q_UNUSED(maxSizeOption)
|
|
||||||
Q_UNUSED(centralFrame)
|
Q_UNUSED(centralFrame)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -109,28 +161,89 @@ int main(int argc, char **argv)
|
|||||||
Config::self().setSeparatorThickness(10);
|
Config::self().setSeparatorThickness(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parser.isSet(segmentedIndicators))
|
||||||
|
KDDockWidgets::DefaultWidgetFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::Segmented;
|
||||||
|
|
||||||
MainWindowOptions options = MainWindowOption_None;
|
MainWindowOptions options = MainWindowOption_None;
|
||||||
|
auto flags = KDDockWidgets::Config::self().flags();
|
||||||
#if defined(DOCKS_DEVELOPER_MODE)
|
#if defined(DOCKS_DEVELOPER_MODE)
|
||||||
|
auto internalFlags = KDDockWidgets::Config::self().internalFlags();
|
||||||
|
|
||||||
options = parser.isSet(centralFrame) ? MainWindowOption_HasCentralFrame
|
options = parser.isSet(centralFrame) ? MainWindowOption_HasCentralFrame
|
||||||
: MainWindowOption_None;
|
: MainWindowOption_None;
|
||||||
|
|
||||||
|
if (parser.isSet(centralWidget))
|
||||||
|
options |= MainWindowOption_HasCentralWidget;
|
||||||
|
|
||||||
|
if (parser.isSet(noQtTool))
|
||||||
|
internalFlags |= KDDockWidgets::Config::InternalFlag_DontUseQtToolWindowsForFloatingWindows;
|
||||||
|
|
||||||
|
if (parser.isSet(keepAbove))
|
||||||
|
flags |= KDDockWidgets::Config::Flag_KeepAboveIfNotUtilityWindow;
|
||||||
|
|
||||||
|
if (parser.isSet(noParentForFloating))
|
||||||
|
internalFlags |= KDDockWidgets::Config::InternalFlag_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))
|
||||||
|
internalFlags |= KDDockWidgets::Config::InternalFlag_NoAeroSnap;
|
||||||
|
# endif
|
||||||
|
Config::self().setInternalFlags(internalFlags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto flags = KDDockWidgets::Config::self().flags();
|
if (parser.isSet(autoHideSupport))
|
||||||
|
flags |= Config::Flag_AutoHideSupport;
|
||||||
|
|
||||||
|
if (parser.isSet(closeOnlyCurrentTab))
|
||||||
|
flags |= Config::Flag_CloseOnlyCurrentTab;
|
||||||
|
|
||||||
|
if (parser.isSet(showButtonsInTabBarIfTitleBarHidden))
|
||||||
|
flags |= Config::Flag_ShowButtonsOnTabBarIfTitleBarHidden;
|
||||||
|
|
||||||
if (parser.isSet(noTitleBars))
|
if (parser.isSet(noTitleBars))
|
||||||
flags |= KDDockWidgets::Config::Flag_HideTitleBarWhenTabsVisible | KDDockWidgets::Config::Flag_AlwaysShowTabs;
|
flags |= KDDockWidgets::Config::Flag_HideTitleBarWhenTabsVisible;
|
||||||
|
|
||||||
|
if (parser.isSet(noUtilityWindows))
|
||||||
|
flags |= KDDockWidgets::Config::Flag_DontUseUtilityFloatingWindows;
|
||||||
|
|
||||||
|
if (parser.isSet(alwaysTabs))
|
||||||
|
flags |= KDDockWidgets::Config::Flag_AlwaysShowTabs;
|
||||||
|
|
||||||
|
if (parser.isSet(alwaysTitleBarWhenFloating)) {
|
||||||
|
flags |= KDDockWidgets::Config::Flag_AlwaysTitleBarWhenFloating;
|
||||||
|
if (!(flags & KDDockWidgets::Config::Flag_HideTitleBarWhenTabsVisible)) {
|
||||||
|
qWarning() << "Flag_AlwaysTitleBarWhenFloating is unneeded if Flag_HideTitleBarWhenTabsVisible isn't used."
|
||||||
|
<< "As floating windows already have title bars by default.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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))
|
if (parser.isSet(reorderTabsOption))
|
||||||
flags |= KDDockWidgets::Config::Flag_AllowReorderTabs;
|
flags |= KDDockWidgets::Config::Flag_AllowReorderTabs;
|
||||||
|
|
||||||
if (parser.isSet(maximizeButton))
|
if (parser.isSet(maximizeButtonOption))
|
||||||
flags |= KDDockWidgets::Config::Flag_TitleBarHasMaximizeButton;
|
flags |= KDDockWidgets::Config::Flag_TitleBarHasMaximizeButton;
|
||||||
|
|
||||||
|
if (parser.isSet(minimizeButtonOption))
|
||||||
|
flags |= KDDockWidgets::Config::Flag_TitleBarHasMinimizeButton;
|
||||||
|
|
||||||
if (parser.isSet(lazyResizeOption))
|
if (parser.isSet(lazyResizeOption))
|
||||||
flags |= KDDockWidgets::Config::Flag_LazyResize;
|
flags |= KDDockWidgets::Config::Flag_LazyResize;
|
||||||
|
|
||||||
if (parser.isSet(tabsHaveCloseButton))
|
if (parser.isSet(tabsHaveCloseButton))
|
||||||
flags |= KDDockWidgets::Config::Flag_TabsHaveCloseButton;
|
flags |= KDDockWidgets::Config::Flag_TabsHaveCloseButton;
|
||||||
|
|
||||||
|
if (parser.isSet(ctxtMenuOnTabs))
|
||||||
|
flags |= KDDockWidgets::Config::Flag_AllowSwitchingTabsViaMenu;
|
||||||
|
|
||||||
|
|
||||||
if (parser.isSet(doubleClickMaximize))
|
if (parser.isSet(doubleClickMaximize))
|
||||||
flags |= KDDockWidgets::Config::Flag_DoubleClickMaximizes;
|
flags |= KDDockWidgets::Config::Flag_DoubleClickMaximizes;
|
||||||
@@ -146,6 +259,7 @@ int main(int argc, char **argv)
|
|||||||
const bool restoreIsRelative = parser.isSet(relativeRestore);
|
const bool restoreIsRelative = parser.isSet(relativeRestore);
|
||||||
const bool nonDockableDockWidget9 = parser.isSet(nonDockable);
|
const bool nonDockableDockWidget9 = parser.isSet(nonDockable);
|
||||||
const bool maxSizeForDockWidget8 = parser.isSet(maxSizeOption);
|
const bool maxSizeForDockWidget8 = parser.isSet(maxSizeOption);
|
||||||
|
const bool dontCloseDockWidget5BeforeRestore = parser.isSet(dontCloseBeforeRestore);
|
||||||
const bool usesMainWindowsWithAffinity = parser.isSet(multipleMainWindows);
|
const bool usesMainWindowsWithAffinity = parser.isSet(multipleMainWindows);
|
||||||
|
|
||||||
#ifdef KDDOCKWIDGETS_SUPPORTS_NESTED_MAINWINDOWS
|
#ifdef KDDOCKWIDGETS_SUPPORTS_NESTED_MAINWINDOWS
|
||||||
@@ -155,7 +269,8 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
MyMainWindow mainWindow(QStringLiteral("MyMainWindow"), options, nonClosableDockWidget0,
|
MyMainWindow mainWindow(QStringLiteral("MyMainWindow"), options, nonClosableDockWidget0,
|
||||||
nonDockableDockWidget9, restoreIsRelative, maxSizeForDockWidget8);
|
nonDockableDockWidget9, restoreIsRelative, maxSizeForDockWidget8,
|
||||||
|
dontCloseDockWidget5BeforeRestore);
|
||||||
mainWindow.setWindowTitle("Main Window 1");
|
mainWindow.setWindowTitle("Main Window 1");
|
||||||
mainWindow.resize(1200, 1200);
|
mainWindow.resize(1200, 1200);
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
@@ -173,7 +288,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
auto mainWindow2 = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
auto mainWindow2 = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
||||||
nonClosableDockWidget0, nonDockableDockWidget9,
|
nonClosableDockWidget0, nonDockableDockWidget9,
|
||||||
restoreIsRelative, maxSizeForDockWidget8, affinity);
|
restoreIsRelative, maxSizeForDockWidget8,
|
||||||
|
dontCloseDockWidget5BeforeRestore, affinity);
|
||||||
if (affinity.isEmpty())
|
if (affinity.isEmpty())
|
||||||
mainWindow2->setWindowTitle("Main Window 2");
|
mainWindow2->setWindowTitle("Main Window 2");
|
||||||
else
|
else
|
||||||
@@ -186,7 +302,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
const QString affinity = QStringLiteral("Inner-DockWidgets-2");
|
const QString affinity = QStringLiteral("Inner-DockWidgets-2");
|
||||||
auto dockableMainWindow = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
auto dockableMainWindow = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
||||||
false, false, restoreIsRelative, false, affinity);
|
false, false, restoreIsRelative, false,
|
||||||
|
false, affinity);
|
||||||
|
|
||||||
dockableMainWindow->setAffinities({ affinity });
|
dockableMainWindow->setAffinities({ affinity });
|
||||||
|
|
||||||
|
|||||||
37
examples/minimal-mdi/CMakeLists.txt
Normal file
37
examples/minimal-mdi/CMakeLists.txt
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2021 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_minimal_mdi_example)
|
||||||
|
|
||||||
|
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}/../dockwidgets/resources_example.qrc)
|
||||||
|
|
||||||
|
add_executable(kddockwidgets_minimal_mdi_example
|
||||||
|
main.cpp
|
||||||
|
../dockwidgets/MyWidget.cpp
|
||||||
|
${RESOURCES_EXAMPLE_SRC}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(kddockwidgets_minimal_mdi_example
|
||||||
|
PRIVATE
|
||||||
|
KDAB::kddockwidgets
|
||||||
|
)
|
||||||
|
|
||||||
116
examples/minimal-mdi/MyWidget.cpp
Normal file
116
examples/minimal-mdi/MyWidget.cpp
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
Author: Sérgio 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 "MyWidget.h"
|
||||||
|
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QLineEdit>
|
||||||
|
|
||||||
|
static QHash<QString, QImage> s_images; /// clazy:exclude=non-pod-global-static
|
||||||
|
|
||||||
|
MyWidget::MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
if (!backgroundFile.isEmpty()) {
|
||||||
|
auto it = s_images.find(backgroundFile);
|
||||||
|
if (it == s_images.end())
|
||||||
|
it = s_images.insert(backgroundFile, QImage(backgroundFile));
|
||||||
|
m_background = it.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!logoFile.isEmpty()) {
|
||||||
|
auto it = s_images.find(logoFile);
|
||||||
|
if (it == s_images.end())
|
||||||
|
it = s_images.insert(logoFile, QImage(logoFile));
|
||||||
|
m_logo = it.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
MyWidget::~MyWidget()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyWidget::drawLogo(QPainter &p)
|
||||||
|
{
|
||||||
|
if (m_logo.isNull())
|
||||||
|
return;
|
||||||
|
|
||||||
|
const qreal ratio = m_logo.height() / (m_logo.width() * 1.0);
|
||||||
|
|
||||||
|
const int maxWidth = int(0.80 * size().width());
|
||||||
|
const int maxHeight = int(0.80 * size().height());
|
||||||
|
|
||||||
|
const int proposedHeight = int(maxWidth * ratio);
|
||||||
|
|
||||||
|
const int width = proposedHeight <= maxHeight ? maxWidth
|
||||||
|
: int(maxHeight / ratio);
|
||||||
|
|
||||||
|
const int height = int(width * ratio);
|
||||||
|
QRect targetLogoRect(0,0, width, height);
|
||||||
|
targetLogoRect.moveCenter(rect().center() + QPoint(0, -int(size().height() * 0.00)));
|
||||||
|
p.drawImage(targetLogoRect, m_logo, m_logo.rect());
|
||||||
|
}
|
||||||
|
|
||||||
|
MyWidget1::MyWidget1(MyWidget::QWidget *parent)
|
||||||
|
: MyWidget(QStringLiteral(":/assets/triangles.png"), QStringLiteral(":/assets/KDAB_bubble_white.png"), parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyWidget1::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
p.fillRect(rect(), QColor(0xCC, 0xCC, 0xCC));
|
||||||
|
p.drawImage(m_background.rect(), m_background, m_background.rect());
|
||||||
|
|
||||||
|
drawLogo(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
MyWidget2::MyWidget2(MyWidget::QWidget *parent)
|
||||||
|
: MyWidget(QString(), QStringLiteral(":/assets/KDAB_bubble_blue.png"), parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyWidget2::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
p.fillRect(rect(), Qt::white);
|
||||||
|
drawLogo(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
MyWidget3::MyWidget3(MyWidget::QWidget *parent)
|
||||||
|
: MyWidget(QStringLiteral(":/assets/base.png"), QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"), parent)
|
||||||
|
, m_triangle(QImage(QStringLiteral(":/assets/tri.png")))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyWidget3::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
p.fillRect(rect(), QColor(0xD5, 0xD5, 0xD5));
|
||||||
|
|
||||||
|
p.drawImage(m_background.rect(), m_background, m_background.rect());
|
||||||
|
|
||||||
|
const QRect targetRect = QRect({ width() - m_triangle.width(), height() - m_triangle.height() }, m_triangle.size());
|
||||||
|
|
||||||
|
p.drawImage(targetRect, m_triangle, m_triangle.rect());
|
||||||
|
drawLogo(p);
|
||||||
|
}
|
||||||
65
examples/minimal-mdi/MyWidget.h
Normal file
65
examples/minimal-mdi/MyWidget.h
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
Author: Sérgio 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef EXAMPLEDOCKABLEWIDGET_H
|
||||||
|
#define EXAMPLEDOCKABLEWIDGET_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QPainter;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
class MyWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
MyWidget() = default;
|
||||||
|
explicit MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent = nullptr);
|
||||||
|
~MyWidget();
|
||||||
|
protected:
|
||||||
|
void drawLogo(QPainter &);
|
||||||
|
QImage m_background;
|
||||||
|
QImage m_logo;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyWidget1 : public MyWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit MyWidget1(QWidget *parent = nullptr);
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent*) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyWidget2 : public MyWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit MyWidget2(QWidget *parent = nullptr);
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent*) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyWidget3 : public MyWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit MyWidget3(QWidget *parent = nullptr);
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent*) override;
|
||||||
|
QImage m_triangle;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
62
examples/minimal-mdi/main.cpp
Normal file
62
examples/minimal-mdi/main.cpp
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
Author: Sérgio 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 "MyWidget.h"
|
||||||
|
|
||||||
|
#include <kddockwidgets/DockWidget.h>
|
||||||
|
#include <kddockwidgets/MainWindowMDI.h>
|
||||||
|
|
||||||
|
#include <QStyleFactory>
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
// clazy:excludeall=qstring-allocations
|
||||||
|
|
||||||
|
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::MainWindowMDI mainWindow(QStringLiteral("MyMainWindow"));
|
||||||
|
mainWindow.setWindowTitle("Main Window");
|
||||||
|
mainWindow.resize(1200, 1200);
|
||||||
|
mainWindow.show();
|
||||||
|
|
||||||
|
// # 2. Create a dock widget, it needs a unique name
|
||||||
|
auto dock1 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock1"));
|
||||||
|
auto widget1 = new MyWidget1();
|
||||||
|
dock1->setWidget(widget1);
|
||||||
|
|
||||||
|
auto dock2 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock2"));
|
||||||
|
auto widget2 = new MyWidget2();
|
||||||
|
dock2->setWidget(widget2);
|
||||||
|
|
||||||
|
auto dock3 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock3"));
|
||||||
|
auto widget3 = new MyWidget3();
|
||||||
|
dock3->setWidget(widget3);
|
||||||
|
|
||||||
|
// # 3. Dock them
|
||||||
|
mainWindow.addDockWidget(dock1, QPoint(10, 10));
|
||||||
|
mainWindow.addDockWidget(dock2, QPoint(50, 50));
|
||||||
|
mainWindow.addDockWidget(dock3, QPoint(90, 90));
|
||||||
|
|
||||||
|
return app.exec();
|
||||||
|
}
|
||||||
37
examples/minimal/CMakeLists.txt
Normal file
37
examples/minimal/CMakeLists.txt
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2021 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_minimal_example)
|
||||||
|
|
||||||
|
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}/../dockwidgets/resources_example.qrc)
|
||||||
|
|
||||||
|
add_executable(kddockwidgets_minimal_example
|
||||||
|
main.cpp
|
||||||
|
../dockwidgets/MyWidget.cpp
|
||||||
|
${RESOURCES_EXAMPLE_SRC}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(kddockwidgets_minimal_example
|
||||||
|
PRIVATE
|
||||||
|
KDAB::kddockwidgets
|
||||||
|
)
|
||||||
|
|
||||||
116
examples/minimal/MyWidget.cpp
Normal file
116
examples/minimal/MyWidget.cpp
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
Author: Sérgio 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 "MyWidget.h"
|
||||||
|
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QLineEdit>
|
||||||
|
|
||||||
|
static QHash<QString, QImage> s_images; /// clazy:exclude=non-pod-global-static
|
||||||
|
|
||||||
|
MyWidget::MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
if (!backgroundFile.isEmpty()) {
|
||||||
|
auto it = s_images.find(backgroundFile);
|
||||||
|
if (it == s_images.end())
|
||||||
|
it = s_images.insert(backgroundFile, QImage(backgroundFile));
|
||||||
|
m_background = it.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!logoFile.isEmpty()) {
|
||||||
|
auto it = s_images.find(logoFile);
|
||||||
|
if (it == s_images.end())
|
||||||
|
it = s_images.insert(logoFile, QImage(logoFile));
|
||||||
|
m_logo = it.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
MyWidget::~MyWidget()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyWidget::drawLogo(QPainter &p)
|
||||||
|
{
|
||||||
|
if (m_logo.isNull())
|
||||||
|
return;
|
||||||
|
|
||||||
|
const qreal ratio = m_logo.height() / (m_logo.width() * 1.0);
|
||||||
|
|
||||||
|
const int maxWidth = int(0.80 * size().width());
|
||||||
|
const int maxHeight = int(0.80 * size().height());
|
||||||
|
|
||||||
|
const int proposedHeight = int(maxWidth * ratio);
|
||||||
|
|
||||||
|
const int width = proposedHeight <= maxHeight ? maxWidth
|
||||||
|
: int(maxHeight / ratio);
|
||||||
|
|
||||||
|
const int height = int(width * ratio);
|
||||||
|
QRect targetLogoRect(0,0, width, height);
|
||||||
|
targetLogoRect.moveCenter(rect().center() + QPoint(0, -int(size().height() * 0.00)));
|
||||||
|
p.drawImage(targetLogoRect, m_logo, m_logo.rect());
|
||||||
|
}
|
||||||
|
|
||||||
|
MyWidget1::MyWidget1(MyWidget::QWidget *parent)
|
||||||
|
: MyWidget(QStringLiteral(":/assets/triangles.png"), QStringLiteral(":/assets/KDAB_bubble_white.png"), parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyWidget1::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
p.fillRect(rect(), QColor(0xCC, 0xCC, 0xCC));
|
||||||
|
p.drawImage(m_background.rect(), m_background, m_background.rect());
|
||||||
|
|
||||||
|
drawLogo(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
MyWidget2::MyWidget2(MyWidget::QWidget *parent)
|
||||||
|
: MyWidget(QString(), QStringLiteral(":/assets/KDAB_bubble_blue.png"), parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyWidget2::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
p.fillRect(rect(), Qt::white);
|
||||||
|
drawLogo(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
MyWidget3::MyWidget3(MyWidget::QWidget *parent)
|
||||||
|
: MyWidget(QStringLiteral(":/assets/base.png"), QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"), parent)
|
||||||
|
, m_triangle(QImage(QStringLiteral(":/assets/tri.png")))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyWidget3::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
p.fillRect(rect(), QColor(0xD5, 0xD5, 0xD5));
|
||||||
|
|
||||||
|
p.drawImage(m_background.rect(), m_background, m_background.rect());
|
||||||
|
|
||||||
|
const QRect targetRect = QRect({ width() - m_triangle.width(), height() - m_triangle.height() }, m_triangle.size());
|
||||||
|
|
||||||
|
p.drawImage(targetRect, m_triangle, m_triangle.rect());
|
||||||
|
drawLogo(p);
|
||||||
|
}
|
||||||
65
examples/minimal/MyWidget.h
Normal file
65
examples/minimal/MyWidget.h
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
Author: Sérgio 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef EXAMPLEDOCKABLEWIDGET_H
|
||||||
|
#define EXAMPLEDOCKABLEWIDGET_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QPainter;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
class MyWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
MyWidget() = default;
|
||||||
|
explicit MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent = nullptr);
|
||||||
|
~MyWidget();
|
||||||
|
protected:
|
||||||
|
void drawLogo(QPainter &);
|
||||||
|
QImage m_background;
|
||||||
|
QImage m_logo;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyWidget1 : public MyWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit MyWidget1(QWidget *parent = nullptr);
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent*) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyWidget2 : public MyWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit MyWidget2(QWidget *parent = nullptr);
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent*) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MyWidget3 : public MyWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit MyWidget3(QWidget *parent = nullptr);
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent*) override;
|
||||||
|
QImage m_triangle;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
86
examples/minimal/main.cpp
Normal file
86
examples/minimal/main.cpp
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
Author: Sérgio 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 "MyWidget.h"
|
||||||
|
|
||||||
|
#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"));
|
||||||
|
mainWindow.setWindowTitle("Main Window");
|
||||||
|
mainWindow.resize(1200, 1200);
|
||||||
|
mainWindow.show();
|
||||||
|
|
||||||
|
// # 2. Create a dock widget, it needs a unique name
|
||||||
|
auto dock1 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock1"));
|
||||||
|
auto widget1 = new MyWidget();
|
||||||
|
dock1->setWidget(widget1);
|
||||||
|
|
||||||
|
auto dock2 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock2"));
|
||||||
|
auto widget2 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
||||||
|
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
||||||
|
dock2->setWidget(widget2);
|
||||||
|
|
||||||
|
auto dock3 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock3"));
|
||||||
|
auto widget3 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
||||||
|
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
||||||
|
dock3->setWidget(widget3);
|
||||||
|
|
||||||
|
auto dock4 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock4"));
|
||||||
|
auto widget4 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
||||||
|
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
||||||
|
dock4->setWidget(widget4);
|
||||||
|
|
||||||
|
auto dock5 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock5"));
|
||||||
|
auto widget5 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
||||||
|
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
||||||
|
dock5->setWidget(widget5);
|
||||||
|
|
||||||
|
// 3. Add them to the main window
|
||||||
|
mainWindow.addDockWidget(dock1, KDDockWidgets::Location_OnLeft);
|
||||||
|
mainWindow.addDockWidget(dock2, KDDockWidgets::Location_OnTop);
|
||||||
|
|
||||||
|
// 4. Add dock3 to the right of dock2
|
||||||
|
mainWindow.addDockWidget(dock3, KDDockWidgets::Location_OnRight, dock2);
|
||||||
|
|
||||||
|
// 5. dock4 is docked at the bottom, with 200px height
|
||||||
|
const QSize preferredSize(QSize(/*ignored*/0, 200));
|
||||||
|
mainWindow.addDockWidget(dock4, KDDockWidgets::Location_OnBottom, nullptr, preferredSize);
|
||||||
|
|
||||||
|
|
||||||
|
// 5. dock5 will be its own top level (floating window)
|
||||||
|
dock5->show();
|
||||||
|
|
||||||
|
return app.exec();
|
||||||
|
}
|
||||||
17
examples/qtquick/CMakeLists.txt
Normal file
17
examples/qtquick/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2020-2021 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
add_subdirectory(customtitlebar)
|
||||||
|
add_subdirectory(dockwidgets)
|
||||||
|
add_subdirectory(mdi)
|
||||||
|
|
||||||
|
set_compiler_flags(kddockwidgets_example_quick)
|
||||||
|
set_compiler_flags(kddockwidgets_example_mdi_quick)
|
||||||
|
set_compiler_flags(kddockwidgets_customtitlebar_quick)
|
||||||
37
examples/qtquick/customtitlebar/CMakeLists.txt
Normal file
37
examples/qtquick/customtitlebar/CMakeLists.txt
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2021 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
36
examples/qtquick/customtitlebar/Guest.qml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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
18
examples/qtquick/customtitlebar/Guest1.qml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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"
|
||||||
|
}
|
||||||
17
examples/qtquick/customtitlebar/Guest2.qml
Normal file
17
examples/qtquick/customtitlebar/Guest2.qml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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
|
||||||
|
logo: "qrc:/assets/KDAB_bubble_blue.png"
|
||||||
|
}
|
||||||
18
examples/qtquick/customtitlebar/Guest3.qml
Normal file
18
examples/qtquick/customtitlebar/Guest3.qml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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"
|
||||||
|
}
|
||||||
54
examples/qtquick/customtitlebar/MyTitleBar.qml
Normal file
54
examples/qtquick/customtitlebar/MyTitleBar.qml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
72
examples/qtquick/customtitlebar/main.cpp
Normal file
72
examples/qtquick/customtitlebar/main.cpp
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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 <QQmlApplicationEngine>
|
||||||
|
|
||||||
|
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());
|
||||||
|
|
||||||
|
QQmlApplicationEngine appEngine;
|
||||||
|
KDDockWidgets::Config::self().setQmlEngine(&appEngine);
|
||||||
|
appEngine.load((QUrl("qrc:/main.qml")));
|
||||||
|
|
||||||
|
auto dw1 = new KDDockWidgets::DockWidgetQuick("Dock #1");
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
27
examples/qtquick/customtitlebar/main.qml
Normal file
27
examples/qtquick/customtitlebar/main.qml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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 QtQuick.Controls 2.12
|
||||||
|
import com.kdab.dockwidgets 1.0 as KDDW
|
||||||
|
|
||||||
|
ApplicationWindow {
|
||||||
|
visible: true
|
||||||
|
width: 1000
|
||||||
|
height: 800
|
||||||
|
|
||||||
|
KDDW.MainWindowLayout {
|
||||||
|
id: dockWidgetArea
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
uniqueName: "MyMainLayout"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
18
examples/qtquick/dockwidgets/Another.qml
Normal file
18
examples/qtquick/dockwidgets/Another.qml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: root
|
||||||
|
color: "green"
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
37
examples/qtquick/dockwidgets/CMakeLists.txt
Normal file
37
examples/qtquick/dockwidgets/CMakeLists.txt
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2021 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
36
examples/qtquick/dockwidgets/Guest.qml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
19
examples/qtquick/dockwidgets/Guest1.qml
Normal file
19
examples/qtquick/dockwidgets/Guest1.qml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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 com.kdab.dockwidgets 1.0 as KDDW
|
||||||
|
|
||||||
|
Guest {
|
||||||
|
anchors.fill: parent
|
||||||
|
background: "qrc:/assets/triangles.png"
|
||||||
|
logo: "qrc:/assets/KDAB_bubble_white.png"
|
||||||
|
}
|
||||||
17
examples/qtquick/dockwidgets/Guest2.qml
Normal file
17
examples/qtquick/dockwidgets/Guest2.qml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2020-2021 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
|
||||||
|
logo: "qrc:/assets/KDAB_bubble_blue.png"
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user