Compare commits
1203 Commits
python6
...
LabMCT_KDD
| Author | SHA1 | Date | |
|---|---|---|---|
| ff4d97d5ac | |||
|
|
59a81fbe62 | ||
|
|
0fe194769d | ||
|
|
5861607df1 | ||
|
|
e7c9a20752 | ||
|
|
dba4d649ed | ||
|
|
ede69197ed | ||
|
|
70fd6f0770 | ||
|
|
c91c28748e | ||
|
|
1275327163 | ||
|
|
c3751142c0 | ||
|
|
c603593552 | ||
|
|
ac6ed8e929 | ||
|
|
4f7175c446 | ||
|
|
832736c1e5 | ||
|
|
c5cbe4064a | ||
|
|
68b7c0b1a9 | ||
|
|
285574205c | ||
|
|
dbf96091f8 | ||
|
|
9c03da23a6 | ||
|
|
ea08429b23 | ||
|
|
ad1a2df8af | ||
|
|
af3fd6b296 | ||
|
|
ae461f947f | ||
|
|
f24a04252b | ||
|
|
dd9837c3f1 | ||
|
|
b6beb3d244 | ||
|
|
1a46823b03 | ||
|
|
4d50376ccf | ||
|
|
59f7280d59 | ||
|
|
683dd68754 | ||
|
|
1b33da8b44 | ||
|
|
f6d9ac5606 | ||
|
|
f08d39ecc8 | ||
|
|
ee5e004ed2 | ||
|
|
c744291d33 | ||
|
|
a6e0de9db9 | ||
|
|
0ad83ea1b4 | ||
|
|
fdcdaae1f1 | ||
|
|
af455bb37e | ||
|
|
57aded2a67 | ||
|
|
31b0ad8d7d | ||
|
|
3ae7f4ac21 | ||
|
|
5b3fb35679 | ||
|
|
c39486ce84 | ||
|
|
e7bc93a69f | ||
|
|
f2c3fe6910 | ||
|
|
2326874be7 | ||
|
|
1fc57b02b3 | ||
|
|
c55ce478df | ||
|
|
b0dfbc4486 | ||
|
|
6f6679d6be | ||
|
|
a6598d4607 | ||
|
|
32b0e024d8 | ||
|
|
392504e902 | ||
|
|
5b484a7dda | ||
|
|
4be77d96df | ||
|
|
8947c56442 | ||
|
|
35bf7bc9c8 | ||
|
|
0d943620ac | ||
|
|
8f6c659021 | ||
|
|
a82f2afa64 | ||
|
|
f1ae102383 | ||
|
|
34a7bfd0e5 | ||
|
|
1f27716020 | ||
|
|
4706392464 | ||
|
|
3a9b583552 | ||
|
|
9a74839910 | ||
|
|
322ac107e3 | ||
|
|
e98633b664 | ||
|
|
290c0815e8 | ||
|
|
40d57e5000 | ||
|
|
f2218f8ff3 | ||
|
|
c070a11312 | ||
|
|
7ac6a31512 | ||
|
|
ef1226187d | ||
|
|
757e57559a | ||
|
|
0bef7bc0e9 | ||
|
|
369437cbae | ||
|
|
fd35fc26e6 | ||
|
|
c2208b169e | ||
|
|
ff200950aa | ||
|
|
9916032981 | ||
|
|
e6ccd9d01c | ||
|
|
3a3fedce3f | ||
|
|
5fdc1a14bc | ||
|
|
bced0a66c6 | ||
|
|
fb63fdfd78 | ||
|
|
b61c26669b | ||
|
|
02316c2f72 | ||
|
|
f531e8cb95 | ||
|
|
598787868b | ||
|
|
48319a6309 | ||
|
|
409ac51a3f | ||
|
|
d9b2eab833 | ||
|
|
dc510c06eb | ||
|
|
285a51b940 | ||
|
|
f02e3e27d6 | ||
|
|
be42120e06 | ||
|
|
c8e542cabf | ||
|
|
a267f6a0a7 | ||
|
|
3c2cb67bcd | ||
|
|
77127886da | ||
|
|
70def3e14c | ||
|
|
a91aa74d52 | ||
|
|
619119fc37 | ||
|
|
77c8cec2b8 | ||
|
|
71f5cccb61 | ||
|
|
f5eb97bd26 | ||
|
|
fcedc65c41 | ||
|
|
236ed813f8 | ||
|
|
1c4a4fb8bc | ||
|
|
be7bbe00b1 | ||
|
|
f277d5efb7 | ||
|
|
bde5be9d9c | ||
|
|
7e689f0b39 | ||
|
|
ef78d60751 | ||
|
|
bdbab41674 | ||
|
|
f84006347b | ||
|
|
9ce7477cbb | ||
|
|
913c570b2b | ||
|
|
daebe9e680 | ||
|
|
cf7f037af4 | ||
|
|
72ac856fa7 | ||
|
|
579cd3a201 | ||
|
|
3764feaf89 | ||
|
|
f1959e5e16 | ||
|
|
084947612b | ||
|
|
710f71e7f0 | ||
|
|
4e6b49f876 | ||
|
|
d28dc745bc | ||
|
|
ad8e14ceff | ||
|
|
f9debe5f09 | ||
|
|
b52b1335a6 | ||
|
|
fedce40883 | ||
|
|
5894fd54f5 | ||
|
|
d788cde263 | ||
|
|
1051e859f4 | ||
|
|
2fa9c06f9a | ||
|
|
4691f9bfa5 | ||
|
|
c7dd7d954f | ||
|
|
0f66fe853d | ||
|
|
025c49c583 | ||
|
|
518724132b | ||
|
|
800d97c352 | ||
|
|
ba7afe20b0 | ||
|
|
0b5b06dc5a | ||
|
|
460b898bea | ||
|
|
6e5cfd70d1 | ||
|
|
4afc6b62b2 | ||
|
|
0785408a5c | ||
|
|
3364d8ba76 | ||
|
|
b5d1b6d02f | ||
|
|
ddf6847d4e | ||
|
|
6f177bc2df | ||
|
|
e9eee0e69e | ||
|
|
d2339d1b12 | ||
|
|
e980dc9bb1 | ||
|
|
a2f0e2e689 | ||
|
|
1b1d963d3e | ||
|
|
2dff66fb97 | ||
|
|
a44886279b | ||
|
|
cd1ce835d7 | ||
|
|
74dcbd994a | ||
|
|
189fc7356a | ||
|
|
2ef569c114 | ||
|
|
d06c6e8f11 | ||
|
|
596c330a77 | ||
|
|
9f96eff663 | ||
|
|
3260c65a6c | ||
|
|
2c8ceb67ef | ||
|
|
982904e2ba | ||
|
|
b2b75cd5bb | ||
|
|
90ad1a7f23 | ||
|
|
f5622732ce | ||
|
|
4727c9c7fc | ||
|
|
f8ca5ca1ef | ||
|
|
ea00ecf33d | ||
|
|
bf255c104f | ||
|
|
9b8759c472 | ||
|
|
58b8633e3d | ||
|
|
a743eafca1 | ||
|
|
2446519024 | ||
|
|
6166e5805c | ||
|
|
b1379f0bef | ||
|
|
f3da0f0547 | ||
|
|
b2fc0c3eb1 | ||
|
|
6e7268e42a | ||
|
|
7e6c5b2d9f | ||
|
|
9a9676cb7a | ||
|
|
aff86c3e0f | ||
|
|
d4fe17a0bf | ||
|
|
ab2843f3ef | ||
|
|
0e5247e039 | ||
|
|
6413266df3 | ||
|
|
c6ce421432 | ||
|
|
1f638d2c7a | ||
|
|
7b73393095 | ||
|
|
1a85363faf | ||
|
|
7f021248bf | ||
|
|
bec69e17a2 | ||
|
|
057b33179a | ||
|
|
4945e6318c | ||
|
|
339edf1143 | ||
|
|
f98ce37c12 | ||
|
|
743dbc0718 | ||
|
|
fd4588de0f | ||
|
|
6ba10cfe12 | ||
|
|
096176dc72 | ||
|
|
25b04d7ed8 | ||
|
|
e345e89c35 | ||
|
|
a97663294c | ||
|
|
bb4cf802f5 | ||
|
|
701069617c | ||
|
|
a8c50f1876 | ||
|
|
61cca1e5ec | ||
|
|
7db9938b85 | ||
|
|
01cc915734 | ||
|
|
3454b67a45 | ||
|
|
21765efbac | ||
|
|
60a1e46453 | ||
|
|
8b8ef7f2b0 | ||
|
|
c0e8fe3869 | ||
|
|
524dff9105 | ||
|
|
0099a19a82 | ||
|
|
e6b8636e88 | ||
|
|
86419fd979 | ||
|
|
220471f746 | ||
|
|
412860abac | ||
|
|
2eeb4aac27 | ||
|
|
bfb2ec701e | ||
|
|
54bf24d5d4 | ||
|
|
76cbb760ed | ||
|
|
4824a398ab | ||
|
|
a502a8250b | ||
|
|
85fb4ff671 | ||
|
|
6db3ccc87f | ||
|
|
5811cab164 | ||
|
|
1387c2f573 | ||
|
|
79cc347cd8 | ||
|
|
e62bde3152 | ||
|
|
81abb3cea5 | ||
|
|
ecd3c20adf | ||
|
|
755d53432b | ||
|
|
e00a552bf8 | ||
|
|
faf93fe597 | ||
|
|
4f8aac7df3 | ||
|
|
719803ecfa | ||
|
|
f0ef24383b | ||
|
|
4f8b174a8d | ||
|
|
675b166956 | ||
|
|
b13ba1e42e | ||
|
|
481dae64c3 | ||
|
|
6b04e20a7e | ||
|
|
8a3ee35993 | ||
|
|
146c656e29 | ||
|
|
a190e2dfbf | ||
|
|
d0daff6771 | ||
|
|
721795b113 | ||
|
|
40231b7fae | ||
|
|
1d0300ecc8 | ||
|
|
ce20628555 | ||
|
|
d0dcac6b03 | ||
|
|
2b1aa44eff | ||
|
|
ae42dffcb1 | ||
|
|
21adfe06ad | ||
|
|
7de26139a2 | ||
|
|
894ff9fea0 | ||
|
|
942c462586 | ||
|
|
128645693c | ||
|
|
86bceb4c48 | ||
|
|
ea64aae861 | ||
|
|
d1645dff73 | ||
|
|
a72e018f3b | ||
|
|
66b0ba8902 | ||
|
|
18457d80aa | ||
|
|
95c12dbd4c | ||
|
|
c7682a3524 | ||
|
|
4922363e71 | ||
|
|
9f6ec0244f | ||
|
|
747e987f28 | ||
|
|
68e01c70ee | ||
|
|
296b2a3370 | ||
|
|
074bc26be9 | ||
|
|
f8e6ecf821 | ||
|
|
3e70a2cc71 | ||
|
|
65ced9604f | ||
|
|
45b0536c6a | ||
|
|
8c8f5a8fda | ||
|
|
22a9ce2596 | ||
|
|
93b664414b | ||
|
|
866788674f | ||
|
|
f13f0129d4 | ||
|
|
22ffc6c7ea | ||
|
|
d1767b5534 | ||
|
|
2fbe4f872e | ||
|
|
93e60a743e | ||
|
|
328a14b46a | ||
|
|
9c17b44ad7 | ||
|
|
cf40cadce8 | ||
|
|
16c43b8c24 | ||
|
|
8391d85d48 | ||
|
|
e59e5d7a71 | ||
|
|
aa3c3272ee | ||
|
|
1d8fad245a | ||
|
|
789c531f3d | ||
|
|
5b87fb4435 | ||
|
|
402f0b9d90 | ||
|
|
37567d3980 | ||
|
|
6cef4cea2c | ||
|
|
aea2bf971b | ||
|
|
00a0e455e7 | ||
|
|
d5c7fbfedd | ||
|
|
bea6c09494 | ||
|
|
0adb130d4b | ||
|
|
92d0d74641 | ||
|
|
4d4f2a0183 | ||
|
|
f1e19ec59c | ||
|
|
64b5564f99 | ||
|
|
66cc9ddc03 | ||
|
|
336f1146d3 | ||
|
|
29b1a434c4 | ||
|
|
c0c8399bd7 | ||
|
|
b20ce0895b | ||
|
|
e67f55af51 | ||
|
|
f1410948f8 | ||
|
|
30185d5b2a | ||
|
|
9990300006 | ||
|
|
573e82e9eb | ||
|
|
07a135a10a | ||
|
|
fc172b66f8 | ||
|
|
2be0d5d1d9 | ||
|
|
3007b46892 | ||
|
|
1419db80a2 | ||
|
|
5376ceec7e | ||
|
|
d3a3e7502e | ||
|
|
50c3f9b899 | ||
|
|
8845fae147 | ||
|
|
0c291116b9 | ||
|
|
f0fa0281bf | ||
|
|
313a17a96c | ||
|
|
9e2b1d3e44 | ||
|
|
d832750eb7 | ||
|
|
a82a283b4b | ||
|
|
77392709e2 | ||
|
|
b6770217bb | ||
|
|
c8b22e7ea5 | ||
|
|
8dcaaaf853 | ||
|
|
32ecdb5b37 | ||
|
|
099c7eafc8 | ||
|
|
f872d6fbc1 | ||
|
|
3e21787efb | ||
|
|
58fcd8d04d | ||
|
|
6fd0b4ddee | ||
|
|
95d5146fce | ||
|
|
ea6adafc13 | ||
|
|
f65cb2c0ce | ||
|
|
fbde2bd202 | ||
|
|
0cee15c0d3 | ||
|
|
4b56a336a0 | ||
|
|
56bec0db04 | ||
|
|
dd979d191f | ||
|
|
a5f37f851b | ||
|
|
052d8680dc | ||
|
|
21e8aae823 | ||
|
|
0e866079da | ||
|
|
a8bd6ba840 | ||
|
|
96aefdd3c7 | ||
|
|
753fe57b30 | ||
|
|
9587c1b1e3 | ||
|
|
bc1b296440 | ||
|
|
5626b0120d | ||
|
|
e5d2f5f857 | ||
|
|
3eb52c46b1 | ||
|
|
aaa64bf769 | ||
|
|
b7b1d6d4e9 | ||
|
|
a90417de55 | ||
|
|
73f08df224 | ||
|
|
db9babbdca | ||
|
|
463dd2261e | ||
|
|
4dd66969af | ||
|
|
2c98003219 | ||
|
|
dd853a8f72 | ||
|
|
88d5e6b29d | ||
|
|
71e5d8cc31 | ||
|
|
15b3843172 | ||
|
|
3cffe3b3be | ||
|
|
9dd87b7777 | ||
|
|
b057cf905b | ||
|
|
d7943d30d8 | ||
|
|
1826d68841 | ||
|
|
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 | ||
|
|
b81c32b1c9 |
72
.clang-format
Normal file
72
.clang-format
Normal file
@@ -0,0 +1,72 @@
|
||||
---
|
||||
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
|
||||
...
|
||||
241
.cmake-format.py
Normal file
241
.cmake-format.py
Normal file
@@ -0,0 +1,241 @@
|
||||
# ----------------------------------
|
||||
# Options affecting listfile parsing
|
||||
# ----------------------------------
|
||||
with section("parse"):
|
||||
|
||||
# Specify structure for custom cmake functions
|
||||
additional_commands = {'foo': {'flags': ['BAR', 'BAZ'],
|
||||
'kwargs': {'DEPENDS': '*', 'HEADERS': '*', 'SOURCES': '*'}}}
|
||||
|
||||
# Override configurations per-command where available
|
||||
override_spec = {}
|
||||
|
||||
# Specify variable tags.
|
||||
vartags = []
|
||||
|
||||
# Specify property tags.
|
||||
proptags = []
|
||||
|
||||
# -----------------------------
|
||||
# Options affecting formatting.
|
||||
# -----------------------------
|
||||
with section("format"):
|
||||
|
||||
# Disable formatting entirely, making cmake-format a no-op
|
||||
disable = False
|
||||
|
||||
# How wide to allow formatted cmake files
|
||||
line_width = 120
|
||||
|
||||
# How many spaces to tab for indent
|
||||
tab_size = 4
|
||||
|
||||
# If true, lines are indented using tab characters (utf-8 0x09) instead of
|
||||
# <tab_size> space characters (utf-8 0x20). In cases where the layout would
|
||||
# require a fractional tab character, the behavior of the fractional
|
||||
# indentation is governed by <fractional_tab_policy>
|
||||
use_tabchars = False
|
||||
|
||||
# If <use_tabchars> is True, then the value of this variable indicates how
|
||||
# fractional indentions are handled during whitespace replacement. If set to
|
||||
# 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set
|
||||
# to `round-up` fractional indentation is replaced with a single tab character
|
||||
# (utf-8 0x09) effectively shifting the column to the next tabstop
|
||||
fractional_tab_policy = 'use-space'
|
||||
|
||||
# If an argument group contains more than this many sub-groups (parg or kwarg
|
||||
# groups) then force it to a vertical layout.
|
||||
max_subgroups_hwrap = 2
|
||||
|
||||
# If a positional argument group contains more than this many arguments, then
|
||||
# force it to a vertical layout.
|
||||
max_pargs_hwrap = 4
|
||||
|
||||
# If a cmdline positional group consumes more than this many lines without
|
||||
# nesting, then invalidate the layout (and nest)
|
||||
max_rows_cmdline = 2
|
||||
|
||||
# If true, separate flow control names from their parentheses with a space
|
||||
separate_ctrl_name_with_space = False
|
||||
|
||||
# If true, separate function names from parentheses with a space
|
||||
separate_fn_name_with_space = False
|
||||
|
||||
# If a statement is wrapped to more than one line, than dangle the closing
|
||||
# parenthesis on its own line.
|
||||
dangle_parens = True
|
||||
|
||||
# If the trailing parenthesis must be 'dangled' on its on line, then align it
|
||||
# to this reference: `prefix`: the start of the statement, `prefix-indent`:
|
||||
# the start of the statement, plus one indentation level, `child`: align to
|
||||
# the column of the arguments
|
||||
dangle_align = 'prefix'
|
||||
|
||||
# If the statement spelling length (including space and parenthesis) is
|
||||
# smaller than this amount, then force reject nested layouts.
|
||||
min_prefix_chars = 4
|
||||
|
||||
# If the statement spelling length (including space and parenthesis) is larger
|
||||
# than the tab width by more than this amount, then force reject un-nested
|
||||
# layouts.
|
||||
max_prefix_chars = 10
|
||||
|
||||
# If a candidate layout is wrapped horizontally but it exceeds this many
|
||||
# lines, then reject the layout.
|
||||
max_lines_hwrap = 2
|
||||
|
||||
# What style line endings to use in the output.
|
||||
line_ending = 'unix'
|
||||
|
||||
# Format command names consistently as 'lower' or 'upper' case
|
||||
command_case = 'lower'
|
||||
|
||||
# Format keywords consistently as 'lower' or 'upper' case
|
||||
keyword_case = 'upper'
|
||||
|
||||
# A list of command names which should always be wrapped
|
||||
always_wrap = ["add_executable", "add_library",
|
||||
"target_link_libraries", "target_include_directories", "install"]
|
||||
|
||||
# If true, the argument lists which are known to be sortable will be sorted
|
||||
# lexicographicall
|
||||
enable_sort = True
|
||||
|
||||
# If true, the parsers may infer whether or not an argument list is sortable
|
||||
# (without annotation).
|
||||
autosort = True
|
||||
|
||||
# By default, if cmake-format cannot successfully fit everything into the
|
||||
# desired linewidth it will apply the last, most agressive attempt that it
|
||||
# made. If this flag is True, however, cmake-format will print error, exit
|
||||
# with non-zero status code, and write-out nothing
|
||||
require_valid_layout = False
|
||||
|
||||
# A dictionary mapping layout nodes to a list of wrap decisions. See the
|
||||
# documentation for more information.
|
||||
layout_passes = {}
|
||||
|
||||
# ------------------------------------------------
|
||||
# Options affecting comment reflow and formatting.
|
||||
# ------------------------------------------------
|
||||
with section("markup"):
|
||||
|
||||
# What character to use for bulleted lists
|
||||
bullet_char = '*'
|
||||
|
||||
# What character to use as punctuation after numerals in an enumerated list
|
||||
enum_char = '.'
|
||||
|
||||
# If comment markup is enabled, don't reflow the first comment block in each
|
||||
# listfile. Use this to preserve formatting of your copyright/license
|
||||
# statements.
|
||||
first_comment_is_literal = False
|
||||
|
||||
# If comment markup is enabled, don't reflow any comment block which matches
|
||||
# this (regex) pattern. Default is `None` (disabled).
|
||||
literal_comment_pattern = None
|
||||
|
||||
# Regular expression to match preformat fences in comments default=
|
||||
# ``r'^\s*([`~]{3}[`~]*)(.*)$'``
|
||||
fence_pattern = '^\\s*([`~]{3}[`~]*)(.*)$'
|
||||
|
||||
# Regular expression to match rulers in comments default=
|
||||
# ``r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'``
|
||||
ruler_pattern = '^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$'
|
||||
|
||||
# If a comment line matches starts with this pattern then it is explicitly a
|
||||
# trailing comment for the preceeding argument. Default is '#<'
|
||||
explicit_trailing_pattern = '#<'
|
||||
|
||||
# If a comment line starts with at least this many consecutive hash
|
||||
# characters, then don't lstrip() them off. This allows for lazy hash rulers
|
||||
# where the first hash char is not separated by space
|
||||
hashruler_min_length = 10
|
||||
|
||||
# If true, then insert a space between the first hash char and remaining hash
|
||||
# chars in a hash ruler, and normalize its length to fill the column
|
||||
canonicalize_hashrulers = True
|
||||
|
||||
# enable comment markup parsing and reflow
|
||||
enable_markup = False
|
||||
|
||||
# ----------------------------
|
||||
# Options affecting the linter
|
||||
# ----------------------------
|
||||
with section("lint"):
|
||||
|
||||
# a list of lint codes to disable
|
||||
disabled_codes = []
|
||||
|
||||
# regular expression pattern describing valid function names
|
||||
function_pattern = '[0-9a-z_]+'
|
||||
|
||||
# regular expression pattern describing valid macro names
|
||||
macro_pattern = '[0-9a-z_]+'
|
||||
|
||||
# regular expression pattern describing valid names for variables with global
|
||||
# (cache) scope
|
||||
global_var_pattern = '[A-Z][0-9A-Z_]+'
|
||||
|
||||
# regular expression pattern describing valid names for variables with global
|
||||
# scope (but internal semantic)
|
||||
internal_var_pattern = '[A-Z][0-9A-Z_]+'
|
||||
|
||||
# regular expression pattern describing valid names for variables with local
|
||||
# scope
|
||||
local_var_pattern = '[_A-Za-z][A-Za-z0-9_]+'
|
||||
|
||||
# regular expression pattern describing valid names for privatedirectory
|
||||
# variables
|
||||
private_var_pattern = '[0-9a-z_]+'
|
||||
|
||||
# regular expression pattern describing valid names for public directory
|
||||
# variables
|
||||
public_var_pattern = '.*'
|
||||
|
||||
# regular expression pattern describing valid names for function/macro
|
||||
# arguments and loop variables.
|
||||
argument_var_pattern = '[a-z_][a-z0-9_]+'
|
||||
|
||||
# regular expression pattern describing valid names for keywords used in
|
||||
# functions or macros
|
||||
keyword_pattern = '[A-Z][0-9A-Z_]+'
|
||||
|
||||
# In the heuristic for C0201, how many conditionals to match within a loop in
|
||||
# before considering the loop a parser.
|
||||
max_conditionals_custom_parser = 2
|
||||
|
||||
# Require at least this many newlines between statements
|
||||
min_statement_spacing = 1
|
||||
|
||||
# Require no more than this many newlines between statements
|
||||
max_statement_spacing = 2
|
||||
max_returns = 6
|
||||
max_branches = 15
|
||||
max_arguments = 10
|
||||
max_localvars = 15
|
||||
max_statements = 50
|
||||
|
||||
# -------------------------------
|
||||
# Options affecting file encoding
|
||||
# -------------------------------
|
||||
with section("encode"):
|
||||
|
||||
# If true, emit the unicode byte-order mark (BOM) at the start of the file
|
||||
emit_byteorder_mark = False
|
||||
|
||||
# Specify the encoding of the input file. Defaults to utf-8
|
||||
input_encoding = 'utf-8'
|
||||
|
||||
# Specify the encoding of the output file. Defaults to utf-8. Note that cmake
|
||||
# only claims to support utf-8 so be careful when using anything else
|
||||
output_encoding = 'utf-8'
|
||||
|
||||
# -------------------------------------
|
||||
# Miscellaneous configurations options.
|
||||
# -------------------------------------
|
||||
with section("misc"):
|
||||
|
||||
# A dictionary containing any per-command configuration overrides. Currently
|
||||
# only `command_case` is supported.
|
||||
per_command = {}
|
||||
4
.codespellrc
Normal file
4
.codespellrc
Normal file
@@ -0,0 +1,4 @@
|
||||
[codespell]
|
||||
skip = ./build-*,.git,*.svg,rc_assets.py
|
||||
interactive = 3
|
||||
ignore-words-list = overlay,overlayed
|
||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -47,6 +47,7 @@ mylayout.json
|
||||
*.cbp
|
||||
*.pyc
|
||||
/python/examples/rc_assets.py
|
||||
/python/examples-qt6/rc_assets.py
|
||||
*.pri
|
||||
/docks-w
|
||||
kddockwidgets_minimal_example
|
||||
@@ -58,3 +59,11 @@ kddockwidgets_minimal_example
|
||||
/CMakeDoxygenDefaults.cmake
|
||||
/Testing
|
||||
/layout_tst*
|
||||
/x64
|
||||
/src/kddockwidgets_version.h
|
||||
*.vcxproj*
|
||||
*.sln
|
||||
*.dir
|
||||
.vscode
|
||||
/.cache
|
||||
/compile_commands.json
|
||||
|
||||
13
.krazy
13
.krazy
@@ -7,15 +7,22 @@ EXTRA kdabcopyright-reuse,kdabcontactus,fosslicense-reuse
|
||||
#EXTRA defines,null
|
||||
|
||||
#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 spelling as codespell is much, much better tool
|
||||
EXCLUDE spelling
|
||||
#exclude more checks
|
||||
EXCLUDE style
|
||||
|
||||
SKIP /fwd_headers/
|
||||
SKIP Doxyfile.cmake
|
||||
|
||||
#skip some example files
|
||||
SKIP /examples/qtquick/CMakeFiles/
|
||||
|
||||
#skip CMake files
|
||||
SKIP /KDDockWidgetsConfig.cmake.in
|
||||
#skip more files
|
||||
SKIP CMakePresets.json
|
||||
SKIP \.cmake-format\.py
|
||||
#skip the borrowed code in the cmake subdir
|
||||
SKIP /cmake/Qt5Portability.cmake|/cmake/ECM/|/cmake/InstallLocation.cmake
|
||||
|
||||
SKIP /cmake/ECM/|/cmake/KDAB/
|
||||
|
||||
5
.mdlrc.rb
Normal file
5
.mdlrc.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
all
|
||||
rule 'MD007', :indent => 2, :start_indented => false
|
||||
rule 'MD013', :line_length => 100, :tables => false
|
||||
rule 'MD029', :style => :ordered
|
||||
exclude_rule 'MD033'
|
||||
55
.pre-commit-config.yaml
Normal file
55
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
ci:
|
||||
skip: [pylint]
|
||||
autoupdate_schedule: monthly
|
||||
|
||||
exclude: ^(cmake/ECM|cmake/KDAB/)
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-added-large-files
|
||||
- id: check-case-conflict
|
||||
- id: check-yaml
|
||||
args: [--allow-multiple-documents]
|
||||
- id: check-json
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v14.0.6
|
||||
hooks:
|
||||
- id: clang-format
|
||||
exclude: (.json)
|
||||
- repo: https://github.com/PyCQA/pylint
|
||||
rev: v2.17.1
|
||||
hooks:
|
||||
- id: pylint
|
||||
exclude: ^(.cmake-format.py|conan/conanfile.py)
|
||||
additional_dependencies: ["PySide2", "PySide6"]
|
||||
- repo: https://github.com/pre-commit/mirrors-autopep8
|
||||
rev: v2.0.2
|
||||
hooks:
|
||||
- id: autopep8
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.2.4
|
||||
hooks:
|
||||
- id: codespell
|
||||
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
||||
rev: v0.6.13
|
||||
hooks:
|
||||
- id: cmake-lint
|
||||
exclude: (.py.cmake|Doxyfile.cmake)
|
||||
- id: cmake-format
|
||||
exclude: (.py.cmake|Doxyfile.cmake)
|
||||
- repo: https://github.com/markdownlint/markdownlint
|
||||
rev: v0.12.0
|
||||
hooks:
|
||||
- id: markdownlint
|
||||
entry: mdl
|
||||
language: ruby
|
||||
files: \.(md|mdown|markdown)$
|
||||
- repo: https://github.com/fsfe/reuse-tool
|
||||
rev: v1.1.2
|
||||
hooks:
|
||||
- id: reuse
|
||||
597
.pylintrc
Normal file
597
.pylintrc
Normal file
@@ -0,0 +1,597 @@
|
||||
[MASTER]
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code.
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Specify a score threshold to be exceeded before program exits with error.
|
||||
fail-under=10.0
|
||||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS
|
||||
|
||||
# Add files or directories matching the regex patterns to the blacklist. The
|
||||
# regex matches against base names, not paths.
|
||||
ignore-patterns=rc_assets.py
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
|
||||
# number of processors available to use.
|
||||
jobs=1
|
||||
|
||||
# Control the amount of potential inferred values when inferring a single
|
||||
# object. This can help the performance when dealing with large functions or
|
||||
# complex, nested conditions.
|
||||
limit-inference-results=100
|
||||
|
||||
# List of plugins (as comma separated values of python module names) to load,
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
||||
# When enabled, pylint would attempt to guess common misconfiguration and emit
|
||||
# user-friendly hints instead of false-positive error messages.
|
||||
suggestion-mode=yes
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
||||
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
|
||||
confidence=
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once). You can also use "--disable=all" to
|
||||
# disable everything first and then reenable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use "--disable=all --enable=classes
|
||||
# --disable=W".
|
||||
disable=print-statement,
|
||||
parameter-unpacking,
|
||||
unpacking-in-except,
|
||||
old-raise-syntax,
|
||||
backtick,
|
||||
long-suffix,
|
||||
old-ne-operator,
|
||||
old-octal-literal,
|
||||
import-star-module-level,
|
||||
non-ascii-bytes-literal,
|
||||
raw-checker-failed,
|
||||
bad-inline-option,
|
||||
locally-disabled,
|
||||
file-ignored,
|
||||
suppressed-message,
|
||||
useless-suppression,
|
||||
deprecated-pragma,
|
||||
use-symbolic-message-instead,
|
||||
apply-builtin,
|
||||
basestring-builtin,
|
||||
buffer-builtin,
|
||||
cmp-builtin,
|
||||
coerce-builtin,
|
||||
execfile-builtin,
|
||||
file-builtin,
|
||||
long-builtin,
|
||||
raw_input-builtin,
|
||||
reduce-builtin,
|
||||
standarderror-builtin,
|
||||
unicode-builtin,
|
||||
xrange-builtin,
|
||||
coerce-method,
|
||||
delslice-method,
|
||||
getslice-method,
|
||||
setslice-method,
|
||||
no-absolute-import,
|
||||
old-division,
|
||||
dict-iter-method,
|
||||
dict-view-method,
|
||||
next-method-called,
|
||||
metaclass-assignment,
|
||||
indexing-exception,
|
||||
raising-string,
|
||||
reload-builtin,
|
||||
oct-method,
|
||||
hex-method,
|
||||
nonzero-method,
|
||||
cmp-method,
|
||||
input-builtin,
|
||||
round-builtin,
|
||||
intern-builtin,
|
||||
unichr-builtin,
|
||||
map-builtin-not-iterating,
|
||||
zip-builtin-not-iterating,
|
||||
range-builtin-not-iterating,
|
||||
filter-builtin-not-iterating,
|
||||
using-cmp-argument,
|
||||
eq-without-hash,
|
||||
div-method,
|
||||
idiv-method,
|
||||
rdiv-method,
|
||||
exception-message-attribute,
|
||||
invalid-str-codec,
|
||||
sys-max-int,
|
||||
bad-python3-import,
|
||||
deprecated-string-function,
|
||||
deprecated-str-translate-call,
|
||||
deprecated-itertools-function,
|
||||
deprecated-types-field,
|
||||
next-method-defined,
|
||||
dict-items-not-iterating,
|
||||
dict-keys-not-iterating,
|
||||
dict-values-not-iterating,
|
||||
deprecated-operator-function,
|
||||
deprecated-urllib-function,
|
||||
xreadlines-attribute,
|
||||
deprecated-sys-function,
|
||||
exception-escape,
|
||||
comprehension-escape,
|
||||
consider-using-f-string,
|
||||
useless-option-value,
|
||||
unknown-option-value,
|
||||
R0801,I1101,E0401
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once). See also the "--disable" option for examples.
|
||||
enable=c-extension-no-member=
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
# Python expression which should return a score less than or equal to 10. You
|
||||
# have access to the variables 'error', 'warning', 'refactor', and 'convention'
|
||||
# which contain the number of messages in each category, as well as 'statement'
|
||||
# which is the total number of statements analyzed. This score is used by the
|
||||
# global evaluation report (RP0004).
|
||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
||||
|
||||
# Template used to display messages. This is a python new-style format string
|
||||
# used to format the message information. See doc for all details.
|
||||
#msg-template=
|
||||
|
||||
# Set the output format. Available formats are text, parseable, colorized, json
|
||||
# and msvs (visual studio). You can also give a reporter class, e.g.
|
||||
# mypackage.mymodule.MyReporterClass.
|
||||
output-format=text
|
||||
|
||||
# Tells whether to display a full report or only the messages.
|
||||
reports=no
|
||||
|
||||
# Activate the evaluation score.
|
||||
score=yes
|
||||
|
||||
|
||||
[REFACTORING]
|
||||
|
||||
# Maximum number of nested blocks for function / method body
|
||||
max-nested-blocks=6
|
||||
|
||||
# Complete name of functions that never returns. When checking for
|
||||
# inconsistent-return-statements if a never returning function is called then
|
||||
# it will be considered as an explicit return statement and no message will be
|
||||
# printed.
|
||||
never-returning-functions=sys.exit
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
||||
# Naming style matching correct argument names.
|
||||
argument-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct argument names. Overrides argument-
|
||||
# naming-style.
|
||||
#argument-rgx=
|
||||
|
||||
# Naming style matching correct attribute names.
|
||||
attr-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct attribute names. Overrides attr-naming-
|
||||
# style.
|
||||
#attr-rgx=
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma.
|
||||
bad-names=foo,
|
||||
bar,
|
||||
baz,
|
||||
toto,
|
||||
tutu,
|
||||
tata
|
||||
|
||||
# Bad variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be refused
|
||||
bad-names-rgxs=
|
||||
|
||||
# Naming style matching correct class attribute names.
|
||||
class-attribute-naming-style=any
|
||||
|
||||
# Regular expression matching correct class attribute names. Overrides class-
|
||||
# attribute-naming-style.
|
||||
#class-attribute-rgx=
|
||||
|
||||
# Naming style matching correct class names.
|
||||
class-naming-style=PascalCase
|
||||
|
||||
# Regular expression matching correct class names. Overrides class-naming-
|
||||
# style.
|
||||
#class-rgx=
|
||||
|
||||
# Naming style matching correct constant names.
|
||||
const-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct constant names. Overrides const-naming-
|
||||
# style.
|
||||
#const-rgx=
|
||||
|
||||
# Minimum line length for functions/classes that require docstrings, shorter
|
||||
# ones are exempt.
|
||||
docstring-min-length=-1
|
||||
|
||||
# Naming style matching correct function names.
|
||||
function-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct function names. Overrides function-
|
||||
# naming-style.
|
||||
#function-rgx=
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma.
|
||||
good-names=i,
|
||||
j,
|
||||
k,
|
||||
ex,
|
||||
Run,
|
||||
_
|
||||
|
||||
# Good variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be accepted
|
||||
good-names-rgxs=^[a-z]?$
|
||||
|
||||
# Include a hint for the correct naming format with invalid-name.
|
||||
include-naming-hint=no
|
||||
|
||||
# Naming style matching correct inline iteration names.
|
||||
inlinevar-naming-style=any
|
||||
|
||||
# Regular expression matching correct inline iteration names. Overrides
|
||||
# inlinevar-naming-style.
|
||||
#inlinevar-rgx=
|
||||
|
||||
# Naming style matching correct method names.
|
||||
method-naming-style=any
|
||||
|
||||
# Regular expression matching correct method names. Overrides method-naming-
|
||||
# style.
|
||||
#method-rgx=
|
||||
|
||||
# Naming style matching correct module names.
|
||||
module-naming-style=any
|
||||
|
||||
# Regular expression matching correct module names. Overrides module-naming-
|
||||
# style.
|
||||
#module-rgx=
|
||||
|
||||
# Colon-delimited sets of names that determine each other's naming style when
|
||||
# the name regexes allow several styles.
|
||||
name-group=
|
||||
|
||||
# Regular expression which should only match function or class names that do
|
||||
# not require a docstring.
|
||||
no-docstring-rgx=^_
|
||||
|
||||
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
||||
# to this list to register other decorators that produce valid properties.
|
||||
# These decorators are taken in consideration only for invalid-name.
|
||||
property-classes=abc.abstractproperty
|
||||
|
||||
# Naming style matching correct variable names.
|
||||
variable-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct variable names. Overrides variable-
|
||||
# naming-style.
|
||||
#variable-rgx="[a-z0-9_]{1,30}$"
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
||||
expected-line-ending-format=
|
||||
|
||||
# Regexp for a line that is allowed to be longer than the limit.
|
||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||
|
||||
# Number of spaces of indent required inside a hanging or continued line.
|
||||
indent-after-paren=4
|
||||
|
||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||
# tab).
|
||||
indent-string=' '
|
||||
|
||||
# Maximum number of characters on a single line.
|
||||
max-line-length=120
|
||||
|
||||
# Maximum number of lines in a module.
|
||||
max-module-lines=1000
|
||||
|
||||
# Allow the body of a class to be on the same line as the declaration if body
|
||||
# contains single statement.
|
||||
single-line-class-stmt=no
|
||||
|
||||
# Allow the body of an if to be on the same line as the test if there is no
|
||||
# else.
|
||||
single-line-if-stmt=no
|
||||
|
||||
|
||||
[LOGGING]
|
||||
|
||||
# The type of string formatting that logging methods do. `old` means using %
|
||||
# formatting, `new` is for `{}` formatting.
|
||||
logging-format-style=old
|
||||
|
||||
# Logging modules to check that the string format arguments are in logging
|
||||
# function parameter format.
|
||||
logging-modules=logging
|
||||
|
||||
|
||||
[MISCELLANEOUS]
|
||||
|
||||
# List of note tags to take in consideration, separated by a comma.
|
||||
notes=FIXME,
|
||||
XXX,
|
||||
TODO
|
||||
|
||||
# Regular expression of note tags to take in consideration.
|
||||
#notes-rgx=
|
||||
|
||||
|
||||
[SIMILARITIES]
|
||||
|
||||
# Ignore comments when computing similarities.
|
||||
ignore-comments=yes
|
||||
|
||||
# Ignore docstrings when computing similarities.
|
||||
ignore-docstrings=yes
|
||||
|
||||
# Ignore imports when computing similarities.
|
||||
ignore-imports=yes
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=4
|
||||
|
||||
|
||||
[SPELLING]
|
||||
|
||||
# Limits count of emitted suggestions for spelling mistakes.
|
||||
max-spelling-suggestions=4
|
||||
|
||||
# Spelling dictionary name. Available dictionaries: en_AG (hunspell), en_AU
|
||||
# (hunspell), en_BS (hunspell), en_BW (hunspell), en_BZ (hunspell), en_CA
|
||||
# (hunspell), en_DK (hunspell), en_GB (hunspell), en_GH (hunspell), en_HK
|
||||
# (hunspell), en_IE (hunspell), en_IN (hunspell), en_JM (hunspell), en_MW
|
||||
# (hunspell), en_NA (hunspell), en_NG (hunspell), en_NZ (hunspell), en_PH
|
||||
# (hunspell), en_SG (hunspell), en_TT (hunspell), en_US (hunspell), en_ZA
|
||||
# (hunspell), en_ZM (hunspell), en_ZW (hunspell).
|
||||
spelling-dict=
|
||||
|
||||
# List of comma separated words that should not be checked.
|
||||
spelling-ignore-words=
|
||||
|
||||
# A path to a file that contains the private dictionary; one word per line.
|
||||
spelling-private-dict-file=
|
||||
|
||||
# Tells whether to store unknown words to the private dictionary (see the
|
||||
# --spelling-private-dict-file option) instead of raising a message.
|
||||
spelling-store-unknown-words=no
|
||||
|
||||
|
||||
[STRING]
|
||||
|
||||
# This flag controls whether inconsistent-quotes generates a warning when the
|
||||
# character used as a quote delimiter is used inconsistently within a module.
|
||||
check-quote-consistency=no
|
||||
|
||||
# This flag controls whether the implicit-str-concat should generate a warning
|
||||
# on implicit string concatenation in sequences defined over several lines.
|
||||
check-str-concat-over-line-jumps=no
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
|
||||
# List of decorators that produce context managers, such as
|
||||
# contextlib.contextmanager. Add to this list to register other decorators that
|
||||
# produce valid context managers.
|
||||
contextmanager-decorators=contextlib.contextmanager
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
generated-members=
|
||||
|
||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
||||
ignore-mixin-members=yes
|
||||
|
||||
# Tells whether to warn about missing members when the owner of the attribute
|
||||
# is inferred to be None.
|
||||
ignore-none=yes
|
||||
|
||||
# This flag controls whether pylint should warn about no-member and similar
|
||||
# checks whenever an opaque object is returned when inferring. The inference
|
||||
# can return multiple potential results while evaluating a Python object, but
|
||||
# some branches might not be evaluated, which results in partial inference. In
|
||||
# that case, it might be useful to still emit no-member and other checks for
|
||||
# the rest of the inferred objects.
|
||||
ignore-on-opaque-inference=yes
|
||||
|
||||
# List of class names for which member attributes should not be checked (useful
|
||||
# for classes with dynamically set attributes). This supports the use of
|
||||
# qualified names.
|
||||
ignored-classes=optparse.Values,thread._local,_thread._local
|
||||
|
||||
# List of module names for which member attributes should not be checked
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis). It
|
||||
# supports qualified module names, as well as Unix pattern matching.
|
||||
ignored-modules=
|
||||
|
||||
# Show a hint with possible names when a member name was not found. The aspect
|
||||
# of finding the hint is based on edit distance.
|
||||
missing-member-hint=yes
|
||||
|
||||
# The minimum edit distance a name should have in order to be considered a
|
||||
# similar match for a missing member name.
|
||||
missing-member-hint-distance=1
|
||||
|
||||
# The total number of similar names that should be taken in consideration when
|
||||
# showing a hint for a missing member.
|
||||
missing-member-max-choices=1
|
||||
|
||||
# List of decorators that change the signature of a decorated function.
|
||||
signature-mutators=
|
||||
|
||||
|
||||
[VARIABLES]
|
||||
|
||||
# List of additional names supposed to be defined in builtins. Remember that
|
||||
# you should avoid defining new builtins when possible.
|
||||
additional-builtins=
|
||||
|
||||
# Tells whether unused global variables should be treated as a violation.
|
||||
allow-global-unused-variables=yes
|
||||
|
||||
# List of strings which can identify a callback function by name. A callback
|
||||
# name must start or end with one of those strings.
|
||||
callbacks=cb_,
|
||||
_cb
|
||||
|
||||
# A regular expression matching the name of dummy variables (i.e. expected to
|
||||
# not be used).
|
||||
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
||||
|
||||
# Argument names that match this expression will be ignored. Default to name
|
||||
# with leading underscore.
|
||||
ignored-argument-names=_.*|^ignored_|^unused_
|
||||
|
||||
# Tells whether we should check for unused import in __init__ files.
|
||||
init-import=no
|
||||
|
||||
# List of qualified module names which can have objects that can redefine
|
||||
# builtins.
|
||||
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
|
||||
|
||||
|
||||
[CLASSES]
|
||||
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,
|
||||
__new__,
|
||||
setUp,
|
||||
__post_init__
|
||||
|
||||
# List of member names, which should be excluded from the protected access
|
||||
# warning.
|
||||
exclude-protected=_asdict,
|
||||
_fields,
|
||||
_replace,
|
||||
_source,
|
||||
_make
|
||||
|
||||
# List of valid names for the first argument in a class method.
|
||||
valid-classmethod-first-arg=cls
|
||||
|
||||
# List of valid names for the first argument in a metaclass class method.
|
||||
valid-metaclass-classmethod-first-arg=cls
|
||||
|
||||
|
||||
[DESIGN]
|
||||
|
||||
# Maximum number of arguments for function / method.
|
||||
max-args=10
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=7
|
||||
|
||||
# Maximum number of boolean expressions in an if statement (see R0916).
|
||||
max-bool-expr=6
|
||||
|
||||
# Maximum number of branch for function / method body.
|
||||
max-branches=15
|
||||
|
||||
# Maximum number of locals for function / method body.
|
||||
max-locals=20
|
||||
|
||||
# Maximum number of parents for a class (see R0901).
|
||||
max-parents=7
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
# Maximum number of return / yield for function / method body.
|
||||
max-returns=6
|
||||
|
||||
# Maximum number of statements in function / method body.
|
||||
max-statements=50
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=2
|
||||
|
||||
|
||||
[IMPORTS]
|
||||
|
||||
# List of modules that can be imported at any level, not just the top level
|
||||
# one.
|
||||
allow-any-import-level=
|
||||
|
||||
# Allow wildcard imports from modules that define __all__.
|
||||
allow-wildcard-with-all=no
|
||||
|
||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||
# 3 compatible code, which means that the block might have code that exists
|
||||
# only in one or another interpreter, leading to false positives when analysed.
|
||||
analyse-fallback-blocks=no
|
||||
|
||||
# Deprecated modules which should not be used, separated by a comma.
|
||||
deprecated-modules=optparse,tkinter.tix
|
||||
|
||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
||||
# not be disabled).
|
||||
ext-import-graph=
|
||||
|
||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
||||
# given file (report RP0402 must not be disabled).
|
||||
import-graph=
|
||||
|
||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
||||
# not be disabled).
|
||||
int-import-graph=
|
||||
|
||||
# Force import order to recognize a module as part of the standard
|
||||
# compatibility libraries.
|
||||
known-standard-library=
|
||||
|
||||
# Force import order to recognize a module as part of a third party library.
|
||||
known-third-party=enchant
|
||||
|
||||
# Couples of modules and preferred modules, separated by a comma.
|
||||
preferred-modules=
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when being caught. Defaults to
|
||||
# "BaseException, Exception".
|
||||
overgeneral-exceptions=BaseException,
|
||||
Exception
|
||||
29
.reuse/dep5
Normal file
29
.reuse/dep5
Normal file
@@ -0,0 +1,29 @@
|
||||
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
|
||||
|
||||
#misc source code
|
||||
Files: *.qrc *.json *.xml src/fwd_headers/*
|
||||
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
License: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#misc documentation
|
||||
Files: CONTRIBUTORS.txt Changelog README.md README-QtQuick.md README-WASM.md README-Wayland.md README-bindings.md README-troubleshooting conan/README.txt python/examples/README.txt python/examples-qt6/README.txt docs/KDDockWidgets-CopyrightAssignmentForm.pdf *.html
|
||||
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
License: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#misc config files
|
||||
Files: .pre-commit-config.yaml .codespellrc .krazy .cmake-format .clang-format .clazy .gitignore .mdlrc .mdlrc.rb .pep8 .pylintrc appveyor.yml code.dev-*.code-workspace vscode.code-workspace docs/api/Doxyfile.cmake distro/*
|
||||
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
License: BSD-3-Clause
|
||||
|
||||
#artwork
|
||||
Files: screencap.gif images/* src/img/* docs/api/*.png examples/dockwidgets/assets/*.png src/img/classic_indicators/*.png
|
||||
Copyright: 2019-2023 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: The KDE Project
|
||||
License: BSD-3-Clause
|
||||
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
|
||||
68
.vscode/launch.json
vendored
68
.vscode/launch.json
vendored
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) QtWidgets 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": "(gdb) QtQuick example",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/bin/kddockwidgets_example_quick",
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
10
.vscode/settings.json
vendored
10
.vscode/settings.json
vendored
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools",
|
||||
"files.associations": {
|
||||
"qevent": "cpp"
|
||||
},
|
||||
"cmake.configureSettings": {
|
||||
"KDDockWidgets_DEVELOPER_MODE" : "ON",
|
||||
"KDDockWidgets_QTQUICK" : true
|
||||
}
|
||||
}
|
||||
440
CMakeLists.txt
440
CMakeLists.txt
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -21,7 +21,7 @@
|
||||
#
|
||||
# -DKDDockWidgets_TESTS=[true|false]
|
||||
# Build the test harness.
|
||||
# Currently does nothing unless you also set KDDockWidgets_DEVELOPER_MODE=True
|
||||
# Currently ignored (except for Python bindings) unless KDDockWidgets_DEVELOPER_MODE=True.
|
||||
# Default=false
|
||||
#
|
||||
# -DKDDockWidgets_EXAMPLES=[true|false]
|
||||
@@ -29,227 +29,353 @@
|
||||
# Default=true
|
||||
#
|
||||
# -DKDDockWidgets_DOCS=[true|false]
|
||||
# Build the API documentation.
|
||||
# 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_QTQUICK == IN DEVELOPMENT. DO NOT USE! ==
|
||||
# Build for QtQuick instead of QtWidgets
|
||||
# -DKDDockWidgets_WERROR=[true|false]
|
||||
# Compile with the -Werror gcc/clang option (always true for developer-mode)
|
||||
# Default=false
|
||||
#
|
||||
# -DKDDockWidgets_PYTHON_BINDINGS=[true|false]
|
||||
# Build/Generate python bindings. Always false for Debug builds
|
||||
# Default=false
|
||||
#
|
||||
# -DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=[path]
|
||||
# Set an alternative install path for Python bindings
|
||||
# Default=CMAKE_INSTALL_PREFIX
|
||||
#
|
||||
# -DKDDockWidgets_UNITY_BUILD=[true|false]
|
||||
# Build with CMake's UNITY_BUILD (requires CMake version 3.16 or higher)
|
||||
# -DKDDockWidgets_LINTER=[true|false]
|
||||
# Build the layout linter.
|
||||
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True
|
||||
# Default=true
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
if(POLICY CMP0020)
|
||||
cmake_policy(SET CMP0020 NEW)
|
||||
endif()
|
||||
if(POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
# Allow using a non-KDAB install location.
|
||||
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()
|
||||
|
||||
set(KDAB_INSTALL True)
|
||||
if((NOT DEFINED ${USE_DEFAULT_INSTALL_LOCATION}) OR (NOT ${USE_DEFAULT_INSTALL_LOCATION}))
|
||||
if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "")
|
||||
set(KDAB_INSTALL False)
|
||||
endif()
|
||||
set(USE_DEFAULT_INSTALL_LOCATION ${KDAB_INSTALL} CACHE INTERNAL "Install to default KDAB Location" FORCE)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
||||
project(KDDockWidgets LANGUAGES CXX)
|
||||
else()
|
||||
project(KDDockWidgets
|
||||
DESCRIPTION "An advanced docking system for Qt"
|
||||
HOMEPAGE_URL "https://github.com/KDAB/KDDockWidgets"
|
||||
LANGUAGES CXX)
|
||||
endif()
|
||||
project(
|
||||
KDDockWidgets
|
||||
DESCRIPTION "An advanced docking system for Qt"
|
||||
HOMEPAGE_URL "https://github.com/KDAB/KDDockWidgets"
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
set(${PROJECT_NAME}_VERSION_MAJOR 1)
|
||||
set(${PROJECT_NAME}_VERSION_MINOR 2)
|
||||
set(${PROJECT_NAME}_VERSION_MINOR 7)
|
||||
set(${PROJECT_NAME}_VERSION_PATCH 1)
|
||||
set(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH})
|
||||
set(${PROJECT_NAME}_SOVERSION "1.3")
|
||||
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.7")
|
||||
|
||||
include(FeatureSummary)
|
||||
|
||||
option(${PROJECT_NAME}_QT6 "Build against Qt 6" OFF)
|
||||
option(${PROJECT_NAME}_QT6 "Build against Qt 6" ON)
|
||||
option(${PROJECT_NAME}_DEVELOPER_MODE "Developer Mode" OFF)
|
||||
option(${PROJECT_NAME}_PYTHON_BINDINGS "Build python bindings" OFF)
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
|
||||
option(${PROJECT_NAME}_UNITY_BUILD "Build with CMake's UNITY_BUILD" ON)
|
||||
endif()
|
||||
|
||||
|
||||
if(${PROJECT_NAME}_PYTHON_BINDINGS AND (CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR ${PROJECT_NAME}_STATIC))
|
||||
message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.")
|
||||
endif()
|
||||
|
||||
option(${PROJECT_NAME}_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}_EXAMPLES "Build the examples" OFF)
|
||||
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
|
||||
"Link with QtX11Extras to detect if the compositor supports transparency. Not applicable to non-Linux or Qt6."
|
||||
OFF
|
||||
)
|
||||
option(${PROJECT_NAME}_XLib "On Linux, link against XLib, for a more robust window z-order detection." OFF)
|
||||
|
||||
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 a default build type if none was specified
|
||||
set(default_build_type "Release")
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.git" OR ${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
set(default_build_type "Debug")
|
||||
endif()
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message(STATUS "Setting build type to ${default_build_type} as none was specified.")
|
||||
set(CMAKE_BUILD_TYPE
|
||||
"${default_build_type}"
|
||||
CACHE STRING "Choose the type of build." FORCE
|
||||
)
|
||||
# Set the possible values of build type for cmake-gui
|
||||
set_property(
|
||||
CACHE CMAKE_BUILD_TYPE
|
||||
PROPERTY STRINGS
|
||||
"Debug"
|
||||
"Release"
|
||||
"MinSizeRel"
|
||||
"RelWithDebInfo"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(${PROJECT_NAME}_XLib)
|
||||
add_definitions(-DKDDockWidgets_XLIB)
|
||||
endif()
|
||||
|
||||
if(${PROJECT_NAME}_QT6)
|
||||
set(Qt_VERSION_MAJOR 6)
|
||||
set(QT_MIN_VERSION "6.2.0")
|
||||
set(${PROJECT_NAME}_LIBRARY_QTID "-qt6")
|
||||
else()
|
||||
set(Qt_VERSION_MAJOR 5)
|
||||
set(QT_MIN_VERSION "5.15")
|
||||
set(${PROJECT_NAME}_LIBRARY_QTID "")
|
||||
endif()
|
||||
find_package(Qt${Qt_VERSION_MAJOR} ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS Widgets Test)
|
||||
include(KDQtInstallPaths) #to set QT_INSTALL_FOO variables
|
||||
|
||||
set(${PROJECT_NAME}_DEPS "widgets")
|
||||
if(${PROJECT_NAME}_QTQUICK)
|
||||
find_package(Qt${Qt_VERSION_MAJOR} NO_MODULE REQUIRED COMPONENTS Quick QuickControls2)
|
||||
add_definitions(-DKDDOCKWIDGETS_QTQUICK)
|
||||
set(${PROJECT_NAME}_DEPS "${${PROJECT_NAME}_DEPS} quick quickcontrols2")
|
||||
else()
|
||||
add_definitions(-DKDDOCKWIDGETS_QTWIDGETS)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32
|
||||
AND NOT APPLE
|
||||
AND NOT EMSCRIPTEN
|
||||
AND NOT ${PROJECT_NAME}_QT6
|
||||
AND ${PROJECT_NAME}_X11EXTRAS
|
||||
)
|
||||
set(${PROJECT_NAME}_DEPS "${${PROJECT_NAME}_DEPS} x11extras")
|
||||
endif()
|
||||
|
||||
#Always build the test harness in developer-mode
|
||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
set(${PROJECT_NAME}_TESTS ON)
|
||||
set(${PROJECT_NAME}_WERROR ON)
|
||||
set(${PROJECT_NAME}_TESTS ON)
|
||||
set(${PROJECT_NAME}_WERROR ON)
|
||||
include(ECMEnableSanitizers)
|
||||
endif()
|
||||
|
||||
#option(${PROJECT_NAME}_QTQUICK "Build for QtQuick instead of QtWidgets" OFF)
|
||||
|
||||
if (${PROJECT_NAME}_QT6)
|
||||
find_package(Qt6Widgets REQUIRED)
|
||||
find_package(Qt6Test REQUIRED)
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(IS_CLANG_BUILD TRUE)
|
||||
else()
|
||||
find_package(Qt5Widgets 5.9 REQUIRED)
|
||||
find_package(Qt5Test 5.9 REQUIRED)
|
||||
set(QT_MAJOR_VERSION 5)
|
||||
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)
|
||||
|
||||
set(ECM_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ECM/modules/")
|
||||
set(PYTHON_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}/cmake/Python")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake" ${ECM_MODULE_DIR} ${PYTHON_MODULE_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
# setup default install locations
|
||||
include(InstallLocation)
|
||||
include(QtInstallPaths) #to set QT_INSTALL_FOO variables
|
||||
# Default to hidden visibility for symbols
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
|
||||
# Sets compiler flags for the specified target, taking platform into consideration.
|
||||
macro(set_compiler_flags targetName)
|
||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
target_compile_definitions(${targetName} PUBLIC DOCKS_DEVELOPER_MODE PRIVATE QT_FORCE_ASSERTS)
|
||||
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)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(${targetName} PRIVATE -Wall -Wextra)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_compile_options(${targetName} PRIVATE -Wweak-vtables)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_compile_options(${targetName} PRIVATE -Wweak-vtables)
|
||||
# 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()
|
||||
endif()
|
||||
|
||||
# Enable -Werror
|
||||
if(NOT MSVC AND ${PROJECT_NAME}_WERROR)
|
||||
target_compile_options(${targetName} PRIVATE -Werror -Wno-error=deprecated-declarations)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
if(${PROJECT_NAME}_QTQUICK)
|
||||
find_package(Qt${QT_MAJOR_VERSION}Quick)
|
||||
find_package(Qt${QT_MAJOR_VERSION}QuickControls2)
|
||||
add_definitions(-DKDDOCKWIDGETS_QTQUICK)
|
||||
else()
|
||||
add_definitions(-DKDDOCKWIDGETS_QTWIDGETS)
|
||||
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()
|
||||
|
||||
if(APPLE OR LINUX)
|
||||
# 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()
|
||||
|
||||
if(${PROJECT_NAME}_STATIC)
|
||||
set(${PROJECT_NAME}_LIBRARY_MODE "STATIC")
|
||||
set(${PROJECT_NAME}_LIBRARY_MODE "STATIC")
|
||||
else()
|
||||
set(${PROJECT_NAME}_LIBRARY_MODE "SHARED")
|
||||
set(${PROJECT_NAME}_LIBRARY_MODE "SHARED")
|
||||
endif()
|
||||
|
||||
if(USE_DEFAULT_INSTALL_LOCATION)
|
||||
if(UNIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local/KDAB/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}")
|
||||
elseif(WIN32)
|
||||
set(CMAKE_INSTALL_PREFIX "C:\\KDAB\\${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}")
|
||||
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}-${${PROJECT_NAME}_VERSION}"
|
||||
CACHE INTERNAL "Install to default KDAB Location"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Generate .pri file for qmake users
|
||||
include(ECMGeneratePriFile)
|
||||
set(PROJECT_VERSION_STRING ${${PROJECT_NAME}_VERSION})
|
||||
ecm_generate_pri_file(BASE_NAME KDDockWidgets
|
||||
LIB_NAME kddockwidgets
|
||||
FILENAME_VAR pri_filename
|
||||
)
|
||||
install(FILES ${pri_filename} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
|
||||
# setup default install locations
|
||||
include(KDInstallLocation)
|
||||
|
||||
install(FILES LICENSE.txt README.md DESTINATION ${INSTALL_DOC_DIR})
|
||||
install(DIRECTORY LICENSES DESTINATION ${INSTALL_DOC_DIR})
|
||||
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 (except when using the VS generator)
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES)
|
||||
if(Qt_VERSION_MAJOR EQUAL 5 OR (Qt_VERSION_MAJOR EQUAL 6 AND Qt6Core_VERSION VERSION_GREATER "6.2"))
|
||||
include(ECMGeneratePriFile)
|
||||
set(PROJECT_VERSION_STRING ${${PROJECT_NAME}_VERSION})
|
||||
ecm_generate_pri_file(
|
||||
BASE_NAME
|
||||
KDDockWidgets
|
||||
LIB_NAME
|
||||
kddockwidgets${${PROJECT_NAME}_LIBRARY_QTID}
|
||||
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()
|
||||
else()
|
||||
#Always disable tests, examples, docs when used as a submodule
|
||||
set(${PROJECT_NAME}_IS_ROOT_PROJECT FALSE)
|
||||
set(${PROJECT_NAME}_TESTS FALSE)
|
||||
set(${PROJECT_NAME}_EXAMPLES FALSE)
|
||||
set(${PROJECT_NAME}_DOCS FALSE)
|
||||
endif()
|
||||
|
||||
if(${PROJECT_NAME}_TESTS)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(${PROJECT_NAME}_PYTHON_BINDINGS)
|
||||
add_subdirectory(python)
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR ${PROJECT_NAME}_STATIC)
|
||||
message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.")
|
||||
endif()
|
||||
if(CMAKE_UNITY_BUILD)
|
||||
message(FATAL_ERROR "** Python Bindings are disabled in Unity builds. " "Try again with CMAKE_UNITY_BUILD=OFF")
|
||||
endif()
|
||||
endif()
|
||||
if(${PROJECT_NAME}_PYTHON_BINDINGS)
|
||||
add_subdirectory(python)
|
||||
endif()
|
||||
|
||||
if(${PROJECT_NAME}_EXAMPLES)
|
||||
if (${PROJECT_NAME}_QTQUICK)
|
||||
add_subdirectory(examples/qtquick)
|
||||
else()
|
||||
add_subdirectory(examples/dockwidgets)
|
||||
add_subdirectory(examples/minimal)
|
||||
set_compiler_flags(kddockwidgets_example)
|
||||
set_compiler_flags(kddockwidgets_minimal_example)
|
||||
endif()
|
||||
if(${PROJECT_NAME}_QTQUICK)
|
||||
add_subdirectory(examples/qtquick)
|
||||
else()
|
||||
add_subdirectory(examples/dockwidgets)
|
||||
add_subdirectory(examples/minimal)
|
||||
add_subdirectory(examples/minimal-mdi)
|
||||
add_subdirectory(examples/mdi_with_docking)
|
||||
set_compiler_flags(kddockwidgets_example)
|
||||
set_compiler_flags(kddockwidgets_minimal_example)
|
||||
set_compiler_flags(kddockwidgets_mdi_with_docking_example)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
include(ECMEnableSanitizers)
|
||||
if(${PROJECT_NAME}_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
if(${PROJECT_NAME}_TESTS)
|
||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
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()
|
||||
add_test(NAME tst_docks COMMAND tst_docks)
|
||||
|
||||
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
|
||||
add_subdirectory(docs) # needs to go last, in case there are build source files
|
||||
endif()
|
||||
|
||||
if (${PROJECT_NAME}_UNITY_BUILD)
|
||||
set_target_properties(kddockwidgets PROPERTIES UNITY_BUILD ON)
|
||||
if(${PROJECT_NAME}_IS_ROOT_PROJECT)
|
||||
# Add uninstall target (not for submodules since parent projects typically have uninstall too)
|
||||
include(ECMUninstallTarget)
|
||||
endif()
|
||||
|
||||
# Deployment
|
||||
if(WIN32)
|
||||
add_custom_target(
|
||||
createZipDemo
|
||||
COMMAND cmd /c ${CMAKE_CURRENT_SOURCE_DIR}\\deploy\\create-demo-win-zip.bat
|
||||
${CMAKE_PROJECT_NAME}-Demo-${${PROJECT_NAME}_VERSION}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Target to generate the Zip demo installer for Windows"
|
||||
)
|
||||
endif()
|
||||
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
@@ -1,44 +1,91 @@
|
||||
{
|
||||
"version": 1,
|
||||
"version": 2,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "dev-qtwidgets",
|
||||
"displayName": "dev-qtwidgets",
|
||||
"name": "dev",
|
||||
"displayName": "dev",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-dev-qtwidgets",
|
||||
"binaryDir": "${sourceDir}/build-dev",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"ECM_ENABLE_SANITIZERS" : "'address;undefined'"
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
},
|
||||
"warnings": {
|
||||
"uninitialized": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "clazy-qtwidgets",
|
||||
"displayName": "clazy-qtwidgets",
|
||||
"name": "dev-asan",
|
||||
"displayName": "dev-asan",
|
||||
"description": "An ASAN/UBSAN build",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-clazy-qtwidgets",
|
||||
"binaryDir": "${sourceDir}/build-dev-asan",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_WERROR": "ON"
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"ECM_ENABLE_SANITIZERS": "'address;undefined'"
|
||||
},
|
||||
"environment": {
|
||||
"CXX": "clazy"
|
||||
"warnings": {
|
||||
"uninitialized": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "qtwidgets",
|
||||
"displayName": "qtwidgets",
|
||||
"name": "clazy",
|
||||
"displayName": "clazy",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-qtwidgets",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "qtquick",
|
||||
"displayName": "qtquick",
|
||||
"name": "release-no-x11extras",
|
||||
"displayName": "release-no-x11extras",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-qtquick",
|
||||
"binaryDir": "${sourceDir}/build-release-no-x11extras",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_X11EXTRAS": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "release-qtquick",
|
||||
"displayName": "release-qtquick",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-release-qtquick",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QTQUICK": "ON"
|
||||
@@ -53,7 +100,8 @@
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_QTQUICK": "ON",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"ECM_ENABLE_SANITIZERS" : "'address;undefined'"
|
||||
"ECM_ENABLE_SANITIZERS": "'address;undefined'",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -67,15 +115,26 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "static-qtwidgets",
|
||||
"displayName": "static-qtwidgets",
|
||||
"name": "static",
|
||||
"displayName": "static",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-static-qtwidgets",
|
||||
"binaryDir": "${sourceDir}/build-static",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_STATIC": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "static6",
|
||||
"displayName": "static6",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-static6",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_STATIC": "ON",
|
||||
"KDDockWidgets_QT6": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "static-qtquick",
|
||||
"displayName": "static-qtquick",
|
||||
@@ -88,45 +147,342 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "qtwidgets6",
|
||||
"displayName": "qtwidgets6",
|
||||
"name": "release6",
|
||||
"displayName": "release6",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-qtwidgets6",
|
||||
"binaryDir": "${sourceDir}/build-release6",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QT6": "ON"
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
|
||||
},
|
||||
"environment": {
|
||||
"PATH": "$env{HOME}/Qt/6.0.0/gcc_64/bin:$penv{PATH}"
|
||||
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev-qtwidgets6",
|
||||
"displayName": "dev-qtwidgets6",
|
||||
"name": "dev6",
|
||||
"displayName": "dev6",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-dev-qtwidgets6",
|
||||
"binaryDir": "${sourceDir}/build-dev6",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"ECM_ENABLE_SANITIZERS" : "'address;undefined'"
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
|
||||
},
|
||||
"environment": {
|
||||
"PATH": "$env{HOME}/Qt/6.0.0/gcc_64/bin:$penv{PATH}"
|
||||
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "qtquick6",
|
||||
"displayName": "qtquick6",
|
||||
"name": "dev-asan6",
|
||||
"displayName": "dev-asan6",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-qtquick6",
|
||||
"binaryDir": "${sourceDir}/build-dev-asan6",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"ECM_ENABLE_SANITIZERS": "'address;undefined'",
|
||||
"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"
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
|
||||
},
|
||||
"environment": {
|
||||
"PATH": "$env{HOME}/Qt/6.0.0/gcc_64/bin:$penv{PATH}"
|
||||
"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"
|
||||
},
|
||||
"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_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_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_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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev-time-trace",
|
||||
"displayName": "dev-time-trace",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-dev-time-trace",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"CMAKE_C_FLAGS_INIT": "-ftime-trace",
|
||||
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace"
|
||||
},
|
||||
"warnings": {
|
||||
"uninitialized": true
|
||||
},
|
||||
"environment": {
|
||||
"CC": "clang",
|
||||
"CXX": "clang++",
|
||||
"CCACHE_DISABLE": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev6-time-trace",
|
||||
"displayName": "dev6-time-trace",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-dev6-time-trace",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"CMAKE_C_FLAGS_INIT": "-ftime-trace",
|
||||
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace"
|
||||
},
|
||||
"warnings": {
|
||||
"uninitialized": true
|
||||
},
|
||||
"environment": {
|
||||
"CC": "clang",
|
||||
"CXX": "clang++",
|
||||
"CCACHE_DISABLE": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-qtwidgets-qt5",
|
||||
"displayName": "ci-dev-qtwidgets-qt5",
|
||||
"description": "Qt5 QtWidgets dev-mode build",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-qtwidgets-qt5",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-qtquick-qt5",
|
||||
"displayName": "ci-dev-qtquick-qt5",
|
||||
"description": "Qt5 QtQuick dev-mode build",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-qtquick-qt5",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_QTQUICK": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-qtwidgets-qt5",
|
||||
"displayName": "ci-qtwidgets-qt5",
|
||||
"description": "Qt5 QtWidgets release build",
|
||||
"binaryDir": "${sourceDir}/build-ci-qtwidgets-qt5",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-qtquick-qt5",
|
||||
"displayName": "ci-qtquick-qt5",
|
||||
"description": "Qt5 QtQuick release build",
|
||||
"binaryDir": "${sourceDir}/build-ci-qtquick-qt5",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QTQUICK": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-qtwidgets-qt6",
|
||||
"displayName": "ci-dev-qtwidgets-qt6",
|
||||
"description": "Qt6 dev-mode",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-qtwidgets-qt6",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_QT6": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-qtquick-qt6",
|
||||
"displayName": "ci-dev-qtquick-qt6",
|
||||
"description": "Qt6 dev-mode",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-qtquick-qt6",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"KDDockWidgets_QTQUICK": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-qtwidgets-qt6",
|
||||
"description": "Qt6 QtWidgets release build",
|
||||
"displayName": "ci-qtwidgets-qt6",
|
||||
"binaryDir": "${sourceDir}/build-ci-qtwidgets-qt6",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QT6": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-qtquick-qt6",
|
||||
"description": "Qt6 QtQuick release build",
|
||||
"displayName": "ci-qtquick-qt6",
|
||||
"binaryDir": "${sourceDir}/build-ci-qtquick-qt6",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"KDDockWidgets_QTQUICK": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-static",
|
||||
"inherits": [
|
||||
"static"
|
||||
],
|
||||
"binaryDir": "${sourceDir}/build-ci-static"
|
||||
},
|
||||
{
|
||||
"name": "ci-static-qtquick",
|
||||
"inherits": [
|
||||
"static-qtquick"
|
||||
],
|
||||
"binaryDir": "${sourceDir}/build-ci-static-qtquick"
|
||||
},
|
||||
{
|
||||
"name": "ci-python",
|
||||
"inherits": [
|
||||
"python"
|
||||
],
|
||||
"binaryDir": "${sourceDir}/build-python"
|
||||
}
|
||||
],
|
||||
"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>
|
||||
108
Changelog
108
Changelog
@@ -1,12 +1,114 @@
|
||||
* v1.3.0 (unreleased)
|
||||
- [TODO] QtQuick support
|
||||
* v1.7.1 (unreleased)
|
||||
- Fixed pin button appearing by mistake when using Flag_TitleBarNoFloatButton (#359)
|
||||
|
||||
* v1.7.0 (03 May 2023)
|
||||
- Introduce DockWidget::setFloatingWindowFlags(flags). Allows for different
|
||||
FloatingWindows to have different window flags. For example, some having
|
||||
Qt::Tool while others having Qt::Window (#314).
|
||||
- Fixed fixed-sized windows being able to be resized on Windows (#345)
|
||||
- Allow restoring layouts without touching floating dock widgets
|
||||
- Fix setDropIndicatorsInhibited(false) not showing drop indicators (#334, #337)
|
||||
- Fix relayouting when dock widget is deleted directly (#336)
|
||||
- Minor performance improvement: Cache TitleBar icons
|
||||
- Save side bar overlay geometry when frame is resized
|
||||
- Fixed case of corrupt layout when using setDockWidgetFactoryFunc()
|
||||
- Fix layout scaling factor when main window is native
|
||||
- Fix moving floating windows to negative positions (#321)
|
||||
- Fixed using normal geometry of platform window if fractional scaling is enabled
|
||||
- Allow to specify Qt::Tool or Qt::Window per floating window
|
||||
|
||||
* v1.6.0 (14 September 2022)
|
||||
- Minimum Qt6 version is now 6.2.0
|
||||
- Minimum CMake version is now 3.12.0
|
||||
- Fixed restoring of normal geometry when closing a maximized window (#259)
|
||||
- Experimental support for docking into dock widgets which are in a MDI area.
|
||||
- Fixed potential crash involving infinite loop between QWidget::create() and QWidget::createWinId()
|
||||
- Moved DropIndicatorOverlayInterface::DropLocation enum to KDDockWidgets namespace scope
|
||||
- Added Config::setDropIndicatorAllowedFunc() and corresponding example
|
||||
(kddockwidgets_example --hide-certain-docking-indicators)
|
||||
- Fixed case where unfloating wouldn't restore to the main window (#44 and #96)
|
||||
- Fixed MainWindow not propagating close events to docked widgets
|
||||
- X11: Improved detecting which window is under the cursor, by using native X11 API
|
||||
- X11: Fixed dragging a maximized floating window. Its size is now restored to normal size when the drag starts.
|
||||
- Added DockWidgetBase::currentTabIndex()
|
||||
- Added InitialVisibilityOption::PreserveCurrentTab
|
||||
- Added MainWindow::internalLayout() for advanced customization
|
||||
|
||||
* v1.5.0 (24 November 2021)
|
||||
- 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)
|
||||
- Fix corrupt layout when restoring old JSON
|
||||
- Fix "Unpin" button not showing up in overlayed widgets
|
||||
- Minimum Qt version is now 5.15
|
||||
|
||||
* v1.4.0 (16 July 2021)
|
||||
- No longer supports Qt versions less than 5.12
|
||||
- Experimental MDI support. By using MainWindowMDI you can now have "docked" dock widgets
|
||||
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 (unreleased)
|
||||
* 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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
The KDDockWidgets software is Copyright (C) 2018-2021 Klaralvdalens Datakonsult AB.
|
||||
The KDDockWidgets software is Copyright (C) 2018-2023 Klaralvdalens Datakonsult AB.
|
||||
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
KDDockWidgets is (C) 2018-2021, Klarälvdalens Datakonsult AB, and is licensed
|
||||
KDDockWidgets is (C) 2018-2023, 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
|
||||
|
||||
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.
|
||||
@@ -2,7 +2,7 @@ GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
|
||||
3
README-QtQuick.md
Normal file
3
README-QtQuick.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# KDDockWidgets and QtQuick
|
||||
|
||||
Please use branch 2.0 for QtQuick support.
|
||||
@@ -1,33 +1,40 @@
|
||||
WebAssembly
|
||||
===========
|
||||
# KDDockWidgets with 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.
|
||||
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.
|
||||
Please file a bug with Qt, as it's out of scope for KDDW to fix.
|
||||
|
||||
Demo:
|
||||
=====
|
||||
## Demo
|
||||
|
||||
A demo is available at https://demos.kdab.com/wasm/kddockwidgets/dockwidgets.html
|
||||
A demo is available at <https://demos.kdab.com/wasm/kddockwidgets/dockwidgets.html>.
|
||||
|
||||
Build tips for KDDW:
|
||||
====================
|
||||
## Build tips for KDDW
|
||||
|
||||
- Visit <https://doc.qt.io/qt-5/wasm.html> if you haven't yet
|
||||
|
||||
- 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:
|
||||
=============================
|
||||
- KDDockWidgets can be built with:
|
||||
|
||||
```bash
|
||||
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
|
||||
|
||||
```cpp
|
||||
#ifdef QT_STATIC
|
||||
Q_INIT_RESOURCE(kddockwidgets_resources);
|
||||
#endif
|
||||
```
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# KDDockWidgets and Wayland
|
||||
|
||||
Wayland support is done and has been tested on KDE (Kwin) and weston.
|
||||
|
||||
Limitations
|
||||
============
|
||||
## 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.
|
||||
@@ -28,7 +28,5 @@ when running on Wayland:
|
||||
- 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.
|
||||
|
||||
119
README-bindings.md
Normal file
119
README-bindings.md
Normal file
@@ -0,0 +1,119 @@
|
||||
# KDDockWidgets and Python bindings
|
||||
|
||||
These are the instructions for building the Python bindings for KDDockWidgets.
|
||||
|
||||
Currently unsupported:
|
||||
|
||||
- debug builds
|
||||
- builds against Qt debug libraries
|
||||
- static builds
|
||||
- python2 bindings
|
||||
- only some 32-bit platforms are supported. see <https://wiki.qt.io/Qt_for_Python>
|
||||
|
||||
Also, there are no plans to support the qmake buildsystem.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You will need:
|
||||
|
||||
- a compiler with C++14 support (C++17 for Qt6 builds)
|
||||
- Python3.7 or higher
|
||||
- Qt5 version 5.12 or higher
|
||||
- Qt6 version 6.2 or higher
|
||||
- QtForPython provided by the Qt project.
|
||||
|
||||
## Install PySide2 for Qt5
|
||||
|
||||
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:
|
||||
|
||||
```bash
|
||||
% python3 -m pip 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:
|
||||
|
||||
```bash
|
||||
python3 -m pip list | grep PySide
|
||||
```
|
||||
|
||||
Note the version *must* match the same Qt you intend to use when building KDDockWidgets.
|
||||
|
||||
## Install PySide6 for Qt6
|
||||
|
||||
Follow the same instructions as [the previous section](#Install PySide2 for Qt5),
|
||||
except installing `shiboken6 pyside6 shiboken6_generator` with pip.
|
||||
|
||||
## Building KDDockWidgets Python Bindings
|
||||
|
||||
Tell CMake to build the bindings by passing the `-DKDDockWidgets_PYTHON_BINDINGS=True' option.
|
||||
Then run `cmake --build` as usual.
|
||||
|
||||
The bindings will be installed to `CMAKE_INSTALL_PREFIX`, which might require setting
|
||||
the `PYTHONPATH` env variable to point to that path when running applications.
|
||||
|
||||
For example, if you install to the default location on linux you would:
|
||||
|
||||
```bash
|
||||
export PYTHONPATH=/usr/local/KDAB/KDDockWidgets-1.7.0/lib64/python3.10/site-packages
|
||||
```
|
||||
|
||||
Alternatively, configure the bindings install location by passing (for example)
|
||||
`-DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=/usr/lib/python3.8/site-packages` to CMake
|
||||
and adjust to the PYTHONPATH accordingly, as necessary.
|
||||
|
||||
To run the KDDW python example
|
||||
|
||||
```bash
|
||||
export PYTHONPATH=/usr/local/KDAB/KDDockWidgets-1.7.0/lib64/python3.10/site-packages # adapt as needed
|
||||
cd python/examples/
|
||||
rcc -g python -o rc_assets.py ../../examples/dockwidgets/resources_example.qrc
|
||||
python3 main.py
|
||||
```
|
||||
|
||||
### Build Issues
|
||||
|
||||
- You can override the default Python3 version found by CMake (usually the
|
||||
newest version available) by passing the Python3_EXECUTABLE value to CMake,
|
||||
i.e.
|
||||
|
||||
```bash
|
||||
cmake -DPython3_EXECUTABLE=/usr/bin/python3.10 ....
|
||||
```
|
||||
|
||||
- If you see errors like "Unable to locate Clang's built-in include directory"
|
||||
then first mROUBLESHOOTINGake 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:
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
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)
|
||||
```
|
||||
228
README.md
228
README.md
@@ -1,5 +1,12 @@
|
||||
KDDockWidgets
|
||||
=============
|
||||
# KDDockWidgets
|
||||
|
||||
[](https://travis-ci.com/KDAB/KDDockWidgets)
|
||||
|
||||

|
||||
|
||||
> ⚠️⚠️: If you're using QtQuick/QML it's recommended to use 2.0 branch. 1.x will continue
|
||||
> to receive bug fixes for a long time but only for QtWidgets frontend.
|
||||
|
||||
`KDDockWidgets` is a Qt dock widget library written by KDAB, suitable for replacing
|
||||
`QDockWidget` and implementing advanced functionalities missing in Qt.
|
||||
|
||||
@@ -7,9 +14,20 @@ 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.
|
||||
|
||||
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.
|
||||
|
||||
Additionally, KDAB can provide pre-built Windows binaries for the example programs.
|
||||
Contact <info@kdab.com> if interested.
|
||||
|
||||
## Motivation
|
||||
|
||||
Motivation
|
||||
==========
|
||||
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,
|
||||
and an equal number of days just to fix dozens of regressions.
|
||||
@@ -18,18 +36,9 @@ and an equal number of days just to fix dozens of regressions.
|
||||
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.
|
||||
|
||||
You will find more information in these places:
|
||||
## Features
|
||||
|
||||
* [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
|
||||
========
|
||||
- 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
|
||||
@@ -46,14 +55,13 @@ Features
|
||||
- Customize title bars
|
||||
- Customize window frames
|
||||
- Custom widget separators
|
||||
- Crossplatform (macOS, Linux, Windows, WebAssembly, Wayland, X11/XCB, EGLFS are working)
|
||||
- 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
|
||||
- Not mixing GUI with state with logic with animations
|
||||
- Great test coverage, even the gui and DnD operations are tested. 200 tests currently.
|
||||
- Fuzzer for doing random testing and finding bugs
|
||||
- Great test coverage, even the GUI and DnD operations are tested. 200 tests currently.
|
||||
- Lazy separator resize
|
||||
- Reordering tabs with mouse
|
||||
- Partial layout save/restore, affecting only a chosen sub-set
|
||||
@@ -64,127 +72,149 @@ Features
|
||||
- Optional minimize and maximize button on the title bar
|
||||
- FloatingWindows can be utility windows or full native
|
||||
|
||||
Screen capture
|
||||
==============
|
||||
## Screen capture
|
||||
|
||||

|
||||
|
||||
## Building and requirements
|
||||
|
||||
Roadmap
|
||||
========
|
||||
- QtQuick support
|
||||
To build KDDockWidgets you'll need:
|
||||
|
||||
Trying out the examples
|
||||
=======================
|
||||
A full demo lives in `examples/dockwidgets/`, it showcasts most of the features.
|
||||
A simpler example lives in `examples/minimal/`, which might be more indicated
|
||||
to learn the API, as it's less overwelming than the full demo.
|
||||
- CMake
|
||||
- Qt 5.15.x or Qt6 >= 6.2
|
||||
- Ninja (Other generators might work but are untested)
|
||||
- C++17 capable compiler
|
||||
- Qt Widgets module
|
||||
- Qt X11Extras module if on Linux/X11
|
||||
- Qt Quick and QuickControls2 modules if using the QtQuick support
|
||||
- Qt private development headers, for instance, for Qt5:
|
||||
- SUSE: libqt5-qtbase-private-headers-devel
|
||||
- Ubuntu, debian-based: qtbase5-private-dev
|
||||
- Fedora, redhat-based: qt5-qtbase-private-devel
|
||||
- others: consult your distro
|
||||
|
||||
|
||||
Open a terminal capable of building Qt5 applications.
|
||||
Open a terminal capable of building Qt 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:
|
||||
|
||||
```
|
||||
$ cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/path/where/to/install ../path/to/kddockwidgets
|
||||
$ cmake --build .
|
||||
$ cmake --build . --target install
|
||||
```
|
||||
|
||||
Now build and run the example:
|
||||
```
|
||||
$ cd path/to/kddockwidgets/examples/dockwidgets/
|
||||
$ cmake -G Ninja -DCMAKE_PREFIX_PATH=/path/where/to/install
|
||||
$ cmake --build .
|
||||
$ ./kddockwidgets_example
|
||||
|
||||
```bash
|
||||
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/path/where/to/install ../path/to/kddockwidgets
|
||||
cmake --build .
|
||||
cmake --build . --target install
|
||||
```
|
||||
|
||||
The installation directory defaults to `c:\KDAB\KDDockWidgets-<version>` on Windows
|
||||
and `/usr/local/KDAB/KDDockWidgets-<version>` on non-Windows. You can change this
|
||||
location by passing the option `-DCMAKE_INSTALL_PREFIX=/install/path` to cmake.
|
||||
and `/usr/local/KDAB/KDDockWidgets-<version>` on non-Windows.
|
||||
|
||||
Using
|
||||
=====
|
||||
From your CMake project, add
|
||||
Change the installation location by passing the option `-DCMAKE_INSTALL_PREFIX=/install/path` to CMake.
|
||||
|
||||
## Trying out the examples
|
||||
|
||||
A full demo that showcases most of the features lives in [examples/dockwidgets](examples/dockwidgets).
|
||||
|
||||
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.
|
||||
|
||||
To build and run the example:
|
||||
|
||||
```bash
|
||||
cd path/to/kddockwidgets/examples/dockwidgets/
|
||||
cmake -G Ninja -DCMAKE_PREFIX_PATH=/path/where/kddw/is/installed
|
||||
cmake --build .
|
||||
./kddockwidgets_example
|
||||
```
|
||||
|
||||
## Using
|
||||
|
||||
From your CMake Qt5 project, add
|
||||
|
||||
```cmake
|
||||
find_package(KDDockWidgets CONFIG)
|
||||
```
|
||||
|
||||
or for Qt6
|
||||
|
||||
```cmake
|
||||
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_MODULE_PATH` environment variable depending
|
||||
You may also need to modify the `CMAKE_PREFIX_PATH` environment variable depending
|
||||
on where you installed KDDockWidgets.
|
||||
|
||||
## Python Bindings
|
||||
|
||||
Python Bindings
|
||||
================
|
||||
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:
|
||||
Please refer to [README-bindings.md](README-bindings.md).
|
||||
|
||||
```
|
||||
% pip3 install \
|
||||
--index-url=http://download.qt.io/official_releases/QtForPython/ \
|
||||
--trusted-host download.qt.io \
|
||||
shiboken2 pyside2 shiboken2_generator
|
||||
```
|
||||
## Versioning
|
||||
|
||||
For more info visit https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html
|
||||
There's currently two lines of development: `v1` which is very mature and stable and `v2` which is an
|
||||
ongoing effort to make KDDW support multiple "frontends" (QtWidgets, QtQuick and even non-Qt technologies,
|
||||
like flutter).
|
||||
|
||||
Once QtForPython is installed you are ready to generate the PySide bindings
|
||||
for KDDockwWidgets.
|
||||
1.x will be supported for many years to come, at least for bug fixes and small features.
|
||||
Use `v1.6.0` tag for the latest stable.
|
||||
|
||||
Next pass `-DKDDockWidgets_PYTHON_BINDINGS=ON` to CMake, followed by the
|
||||
make command.
|
||||
Use `2.0` if you need non-QtWidgets support, for example `QtQuick/QML`. While `1.6` has support for `QtQuick/QML`
|
||||
it won't be receiving bug fixes. `2.0` is under active development, you might encounter minor source/ABI
|
||||
incompatibilities. Despite that, it is pretty stable, and all 200 unit-tests pass.
|
||||
|
||||
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).
|
||||
We'll try to remain source-compatible across versions (except for the v1 -> v2 jump).
|
||||
API will get a deprecation notice before being removed in the next version. Note that this
|
||||
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.
|
||||
|
||||
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
|
||||
```
|
||||
We don't promise or test binary compatibility. It's advised that you recompile
|
||||
your application whenever updating KDDW.
|
||||
|
||||
## Styling
|
||||
|
||||
Supported Qt versions and toolchains
|
||||
=====================================
|
||||
KDDockWidgets requires Qt >= 5.9 (or >=5.12 if Python bindings are enabled).
|
||||
The QtQuick support will require Qt >= 5.15.
|
||||
Qt 6 is supported.
|
||||
Almost all private widgets used by KDDW can be derived by the user to give them
|
||||
a custom look. That's done by providing your own FrameworkWidgetFactory. Run
|
||||
"kddockwidgets_example -p" to see that in action.
|
||||
|
||||
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.
|
||||
Qt StyleSheets are not, and will not, be supported. See the comments in
|
||||
`examples/dockwidgets/MyTitleBar_CSS.h` for why. You can however use some minimal
|
||||
CSS, as shown in that example, just don't report bugs about it.
|
||||
|
||||
Warning: When using private headers, be sure to rebuild your application whenever you
|
||||
update to a new KDDW version. Binary compatibility is only kept when using public
|
||||
headers.
|
||||
|
||||
Licensing
|
||||
=========
|
||||
KDDockWidgets is (C) 2018-2021, Klarälvdalens Datakonsult AB, and is licensed according to
|
||||
## Licensing
|
||||
|
||||
KDDockWidgets is (C) 2019-2023, Klarälvdalens Datakonsult AB, and is licensed according to
|
||||
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.
|
||||
|
||||
## Get Involved
|
||||
|
||||
Please submit your issue reports to our GitHub space at <https://github.com/KDAB/KDDockWidgets>.
|
||||
|
||||
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.
|
||||
|
||||
Get Involved
|
||||
============
|
||||
KDAB will happily accept external contributions; however, **all** contributions require a
|
||||
signed [Copyright Assignment Agreement](docs/KDDockWidgets-CopyrightAssignmentForm.docx).
|
||||
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.
|
||||
|
||||
Please submit your contributions or issue reports from our GitHub space at
|
||||
https://github.com/KDAB/KDDockWidgets
|
||||
Thanks to our [contributors](CONTRIBUTORS.txt).
|
||||
|
||||
## About KDAB
|
||||
|
||||
About KDAB
|
||||
==========
|
||||
KDDockWidgets is supported and maintained by Klarälvdalens Datakonsult AB (KDAB).
|
||||
|
||||
The KDAB Group is the global No.1 software consultancy for Qt, C++ and
|
||||
@@ -196,10 +226,10 @@ We continue to help develop parts of Qt and are one of the major contributors
|
||||
to the Qt Project. We can give advanced or standard trainings anywhere
|
||||
around the globe on Qt as well as C++, OpenGL, 3D and more.
|
||||
|
||||
Please visit https://www.kdab.com to meet the people who write code like this.
|
||||
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)
|
||||
- [KDAB Newsletter](https://news.kdab.com)
|
||||
- [KDAB Blogs](https://www.kdab.com/category/blogs)
|
||||
- [KDAB on Twitter](https://twitter.com/KDABQt)
|
||||
|
||||
96
appveyor.yml
Normal file
96
appveyor.yml
Normal file
@@ -0,0 +1,96 @@
|
||||
#---------------------------------#
|
||||
# general configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# version format
|
||||
version: 1.0.{build}-{branch}
|
||||
|
||||
# branches to build
|
||||
branches:
|
||||
except:
|
||||
- gh-pages
|
||||
- wip/v2
|
||||
- master
|
||||
|
||||
# Do not build on tags (GitHub and BitBucket)
|
||||
skip_tags: false
|
||||
|
||||
#---------------------------------#
|
||||
# environment configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# Build worker image
|
||||
image:
|
||||
- Ubuntu2004
|
||||
- macos
|
||||
- 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
|
||||
- Debug
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- useqt6: False
|
||||
- useqt6: True
|
||||
|
||||
install:
|
||||
- sh: if [ "`uname -s`" = "Darwin" ]; then brew install ninja; else sudo apt-get -y update; sudo apt-get -y install mesa-common-dev libglu1-mesa-dev libxkbcommon-dev libxkbcommon-x11-dev; fi
|
||||
|
||||
before_build:
|
||||
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
- cmd: set PATH=C:\Qt\6.2\msvc2019_64\bin;C:\Qt\5.15\msvc2019_64\bin;%PATH%
|
||||
- sh: if [ "`uname -s`" = "Darwin" ]; then export PATH=$HOME/Qt/6.2/macos/bin:$HOME/Qt/5.15/clang_64/bin:$PATH; else export PATH=$HOME/Qt/6.2/gcc_64/bin:$HOME/Qt/5.15/gcc_64/bin:$PATH; fi
|
||||
|
||||
build_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmd: cmake -G Ninja -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DKDDockWidgets_QT6=%useqt6% -DKDDockWidgets_TESTS=True -DKDDockWidgets_EXAMPLES=True -DKDDockWidgets_DEVELOPER_MODE=True ..
|
||||
- sh: cmake -G Ninja -DCMAKE_BUILD_TYPE=$CONFIGURATION -DKDDockWidgets_QT6=$useqt6 -DKDDockWidgets_TESTS=True -DKDDockWidgets_EXAMPLES=True -DKDDockWidgets_DEVELOPER_MODE=True ..
|
||||
- cmake --build .
|
||||
- cmd: cmake --build . --target install
|
||||
- sh: sudo cmake --build . --target install
|
||||
- cmd: set PATH=.\bin;%PATH%
|
||||
- ctest --test-dir .
|
||||
|
||||
# to disable automatic builds
|
||||
#build: off
|
||||
|
||||
#---------------------------------#
|
||||
# tests configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# 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
|
||||
@@ -40,6 +40,7 @@
|
||||
# - thread
|
||||
# - leak
|
||||
# - undefined
|
||||
# - fuzzer-no-link
|
||||
# - fuzzer
|
||||
#
|
||||
# The sanitizers "address", "memory" and "thread" are mutually exclusive. You
|
||||
@@ -102,30 +103,47 @@ endmacro ()
|
||||
# MACRO check_compiler_support
|
||||
#------------------------------
|
||||
macro (enable_sanitizer_flags sanitize_option)
|
||||
if (${sanitize_option} MATCHES "address")
|
||||
check_compiler_version("4.8" "3.1")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
set(XSAN_LINKER_FLAGS "asan")
|
||||
elseif (${sanitize_option} MATCHES "thread")
|
||||
check_compiler_version("4.8" "3.1")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=thread")
|
||||
set(XSAN_LINKER_FLAGS "tsan")
|
||||
elseif (${sanitize_option} MATCHES "memory")
|
||||
check_compiler_version("99.99" "3.1")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=memory")
|
||||
elseif (${sanitize_option} MATCHES "leak")
|
||||
check_compiler_version("4.9" "3.4")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=leak")
|
||||
set(XSAN_LINKER_FLAGS "lsan")
|
||||
elseif (${sanitize_option} MATCHES "undefined")
|
||||
check_compiler_version("4.9" "3.1")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
elseif (${sanitize_option} MATCHES "fuzzer")
|
||||
check_compiler_version("99.99" "6.0")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer")
|
||||
else ()
|
||||
message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
|
||||
endif ()
|
||||
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")
|
||||
check_compiler_version("4.8" "3.1")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
set(XSAN_LINKER_FLAGS "asan")
|
||||
elseif (${sanitize_option} MATCHES "thread")
|
||||
check_compiler_version("4.8" "3.1")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=thread")
|
||||
set(XSAN_LINKER_FLAGS "tsan")
|
||||
elseif (${sanitize_option} MATCHES "memory")
|
||||
check_compiler_version("99.99" "3.1")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=memory")
|
||||
elseif (${sanitize_option} MATCHES "leak")
|
||||
check_compiler_version("4.9" "3.4")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=leak")
|
||||
set(XSAN_LINKER_FLAGS "lsan")
|
||||
elseif (${sanitize_option} MATCHES "undefined")
|
||||
check_compiler_version("4.9" "3.1")
|
||||
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 ()
|
||||
message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
|
||||
endif ()
|
||||
endif()
|
||||
endmacro ()
|
||||
|
||||
if (ECM_ENABLE_SANITIZERS)
|
||||
@@ -149,6 +167,11 @@ if (ECM_ENABLE_SANITIZERS)
|
||||
string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
|
||||
endif ()
|
||||
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()
|
||||
message(STATUS "Tried to enable sanitizers (-DECM_ENABLE_SANITIZERS=${ECM_ENABLE_SANITIZERS}), \
|
||||
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()
|
||||
@@ -1,104 +1,124 @@
|
||||
#.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>
|
||||
# [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. It requires the
|
||||
# ``PROJECT_VERSION_STRING`` variable to be set. This is typically set by
|
||||
# :module:`ECMSetupVersion`, although the project() command in CMake 3.0.0 and
|
||||
# later can also set this.
|
||||
#
|
||||
# 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
|
||||
# )
|
||||
# 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.
|
||||
|
||||
#=============================================================================
|
||||
# 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_DIRS <dir> [<dir> [...]]] # since 5.92
|
||||
[INCLUDE_INSTALL_DIR <dir>] # deprecated since 5.92
|
||||
[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_DIRS`` are the paths (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.
|
||||
|
||||
``INCLUDE_INSTALL_DIR`` is the old variant of ``INCLUDE_INSTALL_DIRS``, taking only one
|
||||
directory.
|
||||
|
||||
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)
|
||||
set(_should_query_qt OFF)
|
||||
if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS)
|
||||
include(ECMQueryQmake)
|
||||
query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX TRY)
|
||||
include(ECMQueryQt)
|
||||
ecm_query_qt(qt_install_prefix_dir QT_INSTALL_PREFIX TRY)
|
||||
if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
||||
set(_askqmake ON)
|
||||
set(_should_query_qt ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(KDE_INSTALL_USE_QT_SYS_PATHS OR _askqmake)
|
||||
include(ECMQueryQmake)
|
||||
query_qmake(qt_host_data_dir QT_HOST_DATA)
|
||||
set(ECM_MKSPECS_INSTALL_DIR ${qt_host_data_dir}/mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.")
|
||||
if(KDE_INSTALL_USE_QT_SYS_PATHS OR _should_query_qt)
|
||||
include(ECMQueryQt)
|
||||
ecm_query_qt(qt_install_prefix_dir QT_INSTALL_PREFIX)
|
||||
ecm_query_qt(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)
|
||||
set(multiValueArgs )
|
||||
set(oneValueArgs BASE_NAME LIB_NAME DEPS FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR VERSION)
|
||||
set(multiValueArgs INCLUDE_INSTALL_DIRS)
|
||||
|
||||
cmake_parse_arguments(EGPF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
@@ -106,22 +126,42 @@ function(ECM_GENERATE_PRI_FILE)
|
||||
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 PROJECT_VERSION_STRING)
|
||||
message(FATAL_ERROR "Required variable PROJECT_VERSION_STRING not set before ECM_GENERATE_PRI_FILE() call. Did you call ecm_setup_version?")
|
||||
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(EGPF_INCLUDE_INSTALL_DIR)
|
||||
if(EGPF_INCLUDE_INSTALL_DIRS)
|
||||
message(FATAL_ERROR "Only one argument of INCLUDE_INSTALL_DIR & INCLUDE_INSTALL_DIRS can be used in ECM_GENERATE_PRI_FILE() call")
|
||||
endif()
|
||||
set(EGPF_INCLUDE_INSTALL_DIRS ${EGPF_INCLUDE_INSTALL_DIR})
|
||||
endif()
|
||||
if(NOT EGPF_INCLUDE_INSTALL_DIRS)
|
||||
if(INCLUDE_INSTALL_DIR)
|
||||
set(EGPF_INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_DIR}/${EGPF_BASE_NAME}")
|
||||
set(EGPF_INCLUDE_INSTALL_DIRS "${INCLUDE_INSTALL_DIR}/${EGPF_BASE_NAME}")
|
||||
elseif(CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(EGPF_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${EGPF_BASE_NAME}")
|
||||
set(EGPF_INCLUDE_INSTALL_DIRS "${CMAKE_INSTALL_INCLUDEDIR}/${EGPF_BASE_NAME}")
|
||||
else()
|
||||
set(EGPF_INCLUDE_INSTALL_DIR "include/${EGPF_BASE_NAME}")
|
||||
set(EGPF_INCLUDE_INSTALL_DIRS "include/${EGPF_BASE_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT EGPF_LIB_INSTALL_DIR)
|
||||
@@ -134,9 +174,22 @@ function(ECM_GENERATE_PRI_FILE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" PROJECT_VERSION_MAJOR "${PROJECT_VERSION_STRING}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" PROJECT_VERSION_MINOR "${PROJECT_VERSION_STRING}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PROJECT_VERSION_PATCH "${PROJECT_VERSION_STRING}")
|
||||
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)
|
||||
@@ -150,11 +203,15 @@ function(ECM_GENERATE_PRI_FILE)
|
||||
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()
|
||||
set(PRI_TARGET_INCLUDES)
|
||||
foreach(_dir ${EGPF_INCLUDE_INSTALL_DIRS})
|
||||
# separate list entries with space
|
||||
if(IS_ABSOLUTE "${_dir}")
|
||||
string(APPEND PRI_TARGET_INCLUDES " ${_dir}")
|
||||
else()
|
||||
string(APPEND PRI_TARGET_INCLUDES " ${BASEPATH}/${_dir}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(IS_ABSOLUTE "${EGPF_LIB_INSTALL_DIR}")
|
||||
set(PRI_TARGET_LIBS "${EGPF_LIB_INSTALL_DIR}")
|
||||
else()
|
||||
@@ -182,10 +239,10 @@ function(ECM_GENERATE_PRI_FILE)
|
||||
file(GENERATE
|
||||
OUTPUT ${PRI_FILENAME}
|
||||
CONTENT
|
||||
"QT.${PRI_TARGET_BASENAME}.VERSION = ${PROJECT_VERSION_STRING}
|
||||
QT.${PRI_TARGET_BASENAME}.MAJOR_VERSION = ${PROJECT_VERSION_MAJOR}
|
||||
QT.${PRI_TARGET_BASENAME}.MINOR_VERSION = ${PROJECT_VERSION_MINOR}
|
||||
QT.${PRI_TARGET_BASENAME}.PATCH_VERSION = ${PROJECT_VERSION_PATCH}
|
||||
"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}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
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()
|
||||
100
cmake/ECM/modules/ECMQueryQt.cmake
Normal file
100
cmake/ECM/modules/ECMQueryQt.cmake
Normal file
@@ -0,0 +1,100 @@
|
||||
# SPDX-FileCopyrightText: 2014 Rohan Garg <rohan16garg@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2014 Alex Merry <alex.merry@kde.org>
|
||||
# SPDX-FileCopyrightText: 2014-2016 Aleix Pol <aleixpol@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017 Friedrich W. H. Kossebau <kossebau@kde.org>
|
||||
# SPDX-FileCopyrightText: 2022 Ahmad Samir <a.samir78@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#[=======================================================================[.rst:
|
||||
ECMQueryQt
|
||||
---------------
|
||||
This module can be used to query the installation paths used by Qt.
|
||||
|
||||
For Qt5 this uses ``qmake``, and for Qt6 this used ``qtpaths`` (the latter has built-in
|
||||
support to query the paths of a target platform when cross-compiling).
|
||||
|
||||
This module defines the following function:
|
||||
::
|
||||
|
||||
ecm_query_qt(<result_variable> <qt_variable> [TRY])
|
||||
|
||||
Passing ``TRY`` will result in the method not making the build fail if the executable
|
||||
used for querying has not been found, but instead simply print a warning message and
|
||||
return an empty string.
|
||||
|
||||
Example usage:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
include(ECMQueryQt)
|
||||
ecm_query_qt(bin_dir QT_INSTALL_BINS)
|
||||
|
||||
If the call succeeds ``${bin_dir}`` will be set to ``<prefix>/path/to/bin/dir`` (e.g.
|
||||
``/usr/lib64/qt/bin/``).
|
||||
|
||||
Since: 5.93
|
||||
#]=======================================================================]
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/QtVersionOption.cmake)
|
||||
include(CheckLanguage)
|
||||
check_language(CXX)
|
||||
if (CMAKE_CXX_COMPILER)
|
||||
# Enable the CXX language to let CMake look for config files in library dirs.
|
||||
# See: https://gitlab.kitware.com/cmake/cmake/-/issues/23266
|
||||
enable_language(CXX)
|
||||
endif()
|
||||
|
||||
if (QT_MAJOR_VERSION STREQUAL "5")
|
||||
# QUIET to accommodate the TRY option
|
||||
find_package(Qt${QT_MAJOR_VERSION}Core QUIET)
|
||||
if(TARGET Qt5::qmake)
|
||||
get_target_property(_qmake_executable_default Qt5::qmake LOCATION)
|
||||
|
||||
set(QUERY_EXECUTABLE ${_qmake_executable_default}
|
||||
CACHE FILEPATH "Location of the Qt5 qmake executable")
|
||||
set(_exec_name_text "Qt5 qmake")
|
||||
set(_cli_option "-query")
|
||||
endif()
|
||||
elseif(QT_MAJOR_VERSION STREQUAL "6")
|
||||
# QUIET to accommodate the TRY option
|
||||
find_package(Qt6 COMPONENTS CoreTools QUIET CONFIG)
|
||||
if (TARGET Qt6::qtpaths)
|
||||
get_target_property(_qtpaths_executable Qt6::qtpaths LOCATION)
|
||||
|
||||
set(QUERY_EXECUTABLE ${_qtpaths_executable}
|
||||
CACHE FILEPATH "Location of the Qt6 qtpaths executable")
|
||||
set(_exec_name_text "Qt6 qtpaths")
|
||||
set(_cli_option "--query")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function(ecm_query_qt result_variable qt_variable)
|
||||
set(options TRY)
|
||||
set(oneValueArgs)
|
||||
set(multiValueArgs)
|
||||
|
||||
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if(NOT QUERY_EXECUTABLE)
|
||||
if(ARGS_TRY)
|
||||
set(${result_variable} "" PARENT_SCOPE)
|
||||
message(STATUS "No ${_exec_name_text} executable found. Can't check ${qt_variable}")
|
||||
return()
|
||||
else()
|
||||
message(FATAL_ERROR "No ${_exec_name_text} executable found. Can't check ${qt_variable} as required")
|
||||
endif()
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${QUERY_EXECUTABLE} ${_cli_option} "${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: ${_command} \"${qt_variable}\"")
|
||||
message(FATAL_ERROR "${_exec_name_text} call failed: ${return_code}")
|
||||
endif()
|
||||
endfunction()
|
||||
213
cmake/ECM/modules/ECMSetupVersion.cmake
Normal file
213
cmake/ECM/modules/ECMSetupVersion.cmake
Normal file
@@ -0,0 +1,213 @@
|
||||
# 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}")
|
||||
# drop leading 0 from values to avoid bogus octal values in c/C++ e.g. with 08 or 09
|
||||
string(REGEX REPLACE "0*([0-9]+)" "\\1" _major "${PROJECT_VERSION_MAJOR}")
|
||||
string(REGEX REPLACE "0*([0-9]+)" "\\1" _minor "${PROJECT_VERSION_MINOR}")
|
||||
string(REGEX REPLACE "0*([0-9]+)" "\\1" _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
|
||||
36
cmake/ECM/modules/QtVersionOption.cmake
Normal file
36
cmake/ECM/modules/QtVersionOption.cmake
Normal file
@@ -0,0 +1,36 @@
|
||||
# SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
QtVersionOption
|
||||
---------------
|
||||
|
||||
Adds a build option to select the major Qt version if necessary,
|
||||
that is, if the major Qt version has not yet been determined otherwise
|
||||
(e.g. by a corresponding ``find_package()`` call).
|
||||
This module is typically included by other modules requiring knowledge
|
||||
about the major Qt version.
|
||||
|
||||
``QT_MAJOR_VERSION`` is defined to either be "5" or "6".
|
||||
|
||||
Since 5.82.0.
|
||||
#]=======================================================================]
|
||||
|
||||
if (DEFINED QT_MAJOR_VERSION)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (TARGET Qt5::Core)
|
||||
set(QT_MAJOR_VERSION 5)
|
||||
elseif (TARGET Qt6::Core)
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
else()
|
||||
option(BUILD_WITH_QT6 "Build against Qt 6" OFF)
|
||||
|
||||
if (BUILD_WITH_QT6)
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
else()
|
||||
set(QT_MAJOR_VERSION 5)
|
||||
endif()
|
||||
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()
|
||||
165
cmake/KDAB/modules/FindPySide2.cmake
Normal file
165
cmake/KDAB/modules/FindPySide2.cmake
Normal file
@@ -0,0 +1,165 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2023 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
|
||||
#===============================================================================
|
||||
if(PYSIDE_CUSTOM_PREFIX STREQUAL "")
|
||||
set(PYSIDE_CUSTOM_PREFIX ${PYSIDE2_BASEDIR})
|
||||
endif()
|
||||
|
||||
find_path(
|
||||
PYSIDE_INCLUDE_DIR pyside.h
|
||||
PATHS ${PYSIDE2_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include/PySide2
|
||||
NO_DEFAULT_PATH
|
||||
NO_CACHE
|
||||
NO_SYSTEM_ENVIRONMENT_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
|
||||
)
|
||||
@@ -1,10 +1,8 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2020-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# PYSIDE_BASEDIR - Top of the PySide6 installation
|
||||
@@ -22,36 +20,47 @@ 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()
|
||||
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)
|
||||
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])
|
||||
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__)))
|
||||
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
|
||||
@@ -63,44 +72,47 @@ if(PYSIDE6_BASEDIR)
|
||||
|
||||
if(NOT APPLE)
|
||||
set(PYSIDE6_SUFFIX "${PYSIDE6_SUFFIX}.${PYSIDE6_SO_MACRO_VERSION}.${PYSIDE6_SO_MICRO_VERSION}")
|
||||
else()
|
||||
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 base dir: ${PYSIDE6_BASEDIR}")
|
||||
message(STATUS "PySide6 suffix: ${PYSIDE6_SUFFIX}")
|
||||
endif()
|
||||
|
||||
if (PYSIDE6_FOUND)
|
||||
if(PYSIDE6_FOUND)
|
||||
#PySide
|
||||
#===============================================================================
|
||||
find_path(PYSIDE_INCLUDE_DIR
|
||||
pyside.h
|
||||
PATHS ${PYSIDE6_BASEDIR}/include ${PYSIDE6_CUSTOM_PREFIX}/include/PySide6
|
||||
NO_DEFAULT_PATH)
|
||||
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")
|
||||
set(PYSIDE_LIBRARY_BASENAMES "pyside6.abi3.lib")
|
||||
elseif(CYGWIN)
|
||||
SET(PYSIDE_LIBRARY_BASENAMES "")
|
||||
set(PYSIDE_LIBRARY_BASENAMES "")
|
||||
elseif(WIN32)
|
||||
SET(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
|
||||
set(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
|
||||
else()
|
||||
SET(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
|
||||
set(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
|
||||
endif()
|
||||
|
||||
find_file(PYSIDE_LIBRARY
|
||||
${PYSIDE_LIBRARY_BASENAMES}
|
||||
PATHS ${PYSIDE6_BASEDIR} ${PYSIDE6_CUSTOM_PREFIX}/lib
|
||||
NO_DEFAULT_PATH)
|
||||
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 ${PYSIDE6_CUSTOM_PREFIX}/share/PySide6/typesystems
|
||||
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)
|
||||
@@ -112,23 +124,23 @@ if(PYSIDE6_FOUND)
|
||||
# Create PySide6 target
|
||||
add_library(PySide6::pyside6 SHARED IMPORTED GLOBAL)
|
||||
if(MSVC)
|
||||
set_property(TARGET PySide6::pyside6 PROPERTY
|
||||
IMPORTED_IMPLIB ${PYSIDE_LIBRARY})
|
||||
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}
|
||||
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
|
||||
find_package_handle_standard_args(
|
||||
PySide6
|
||||
REQUIRED_VARS PYSIDE6_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS
|
||||
VERSION_VAR PYSIDE6_SO_VERSION
|
||||
)
|
||||
203
cmake/KDAB/modules/FindShiboken2.cmake
Normal file
203
cmake/KDAB/modules/FindShiboken2.cmake
Normal file
@@ -0,0 +1,203 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2023 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}")
|
||||
|
||||
if(SHIBOKEN_CUSTOM_PREFIX STREQUAL "")
|
||||
set(SHIBOKEN_CUSTOM_PREFIX ${SHIBOKEN_GENERATOR_BASEDIR})
|
||||
endif()
|
||||
|
||||
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
|
||||
NO_CACHE
|
||||
NO_SYSTEM_ENVIRONMENT_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
|
||||
)
|
||||
183
cmake/KDAB/modules/FindShiboken6.cmake
Normal file
183
cmake/KDAB/modules/FindShiboken6.cmake
Normal file
@@ -0,0 +1,183 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020-2023 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 shiboken2 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
|
||||
)
|
||||
@@ -1,3 +1,9 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2012-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# 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.
|
||||
@@ -9,27 +15,27 @@
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(NOT INSTALL_RUNTIME_DIR)
|
||||
set(INSTALL_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})
|
||||
set(INSTALL_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
if(NOT INSTALL_LIBRARY_DIR)
|
||||
set(INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
set(INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
if(NOT INSTALL_ARCHIVE_DIR)
|
||||
set(INSTALL_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
set(INSTALL_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
if(NOT INSTALL_INCLUDE_DIR)
|
||||
set(INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
set(INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
endif()
|
||||
if(NOT INSTALL_DATADIR)
|
||||
set(INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR})
|
||||
set(INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR})
|
||||
endif()
|
||||
if(NOT INSTALL_DOC_DIR)
|
||||
set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR})
|
||||
set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${${PROJECT_NAME}_LIBRARY_QTID})
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
if (APPLE)
|
||||
set(CMAKE_MACOSX_RPATH ON)
|
||||
if(APPLE)
|
||||
set(CMAKE_MACOSX_RPATH ON)
|
||||
else()
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${INSTALL_LIBRARY_DIR}")
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${INSTALL_LIBRARY_DIR}")
|
||||
endif()
|
||||
170
cmake/KDAB/modules/KDPySide2ModuleBuild.cmake
Normal file
170
cmake/KDAB/modules/KDPySide2ModuleBuild.cmake
Normal file
@@ -0,0 +1,170 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2023 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)
|
||||
# cmake-lint: disable=C0103
|
||||
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)
|
||||
#remove noisy compiler warnings (as the generated code is not necessarily super-warning-free)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-all -Wno-extra")
|
||||
endif()
|
||||
|
||||
# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
|
||||
get_target_property(QtCore_is_framework Qt5::Core FRAMEWORK)
|
||||
if(QtCore_is_framework)
|
||||
# Get the path to the framework dir.
|
||||
list(GET Qt5Core_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
|
||||
get_filename_component(QT_FRAMEWORK_INCLUDE_DIR "${QT_INCLUDE_DIR}/../" ABSOLUTE)
|
||||
|
||||
# QT_INCLUDE_DIR points to the QtCore.framework directory, so we need to adjust this to point
|
||||
# to the actual include directory, which has include files for non-framework parts of Qt.
|
||||
get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
# Flags that we will pass to shiboken-generator
|
||||
# --generator-set=shiboken: tells the generator that we want to use shiboken to generate code,
|
||||
# a doc generator is also available
|
||||
# --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()
|
||||
|
||||
# Replace all semicolons in a string with this platform's path separator
|
||||
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${libraryName}" the output name of this target
|
||||
# will be changed to match PySide template
|
||||
# Args:
|
||||
# libraryName - The name of the output module
|
||||
# typesystemPaths - A list of paths where shiboken should look for typesystem files
|
||||
# includePaths - Include paths necessary to parse your class. *This is not the same as build*
|
||||
# outputSource - The files that will be generated by shiboken
|
||||
# targetIncludeDirs - This will be passed to target_include_directories
|
||||
# targetLinkLibraries - This will be passed to targetLinkLibraries
|
||||
# globalInclude - A header-file that contains all classes that will be generated
|
||||
# typesystemXML - The target binding typesystem (that should be the full path)
|
||||
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
|
||||
# trigger if one of these files changes
|
||||
# moduleOutputDir - Where the library file should be stored
|
||||
macro(
|
||||
create_python_bindings
|
||||
libraryName
|
||||
typesystemPaths
|
||||
includePaths
|
||||
outputSource
|
||||
targetIncludeDirs
|
||||
targetLinkLibraries
|
||||
globalInclude
|
||||
typesystemXML
|
||||
dependsArg
|
||||
moduleOutputDir
|
||||
)
|
||||
|
||||
# Transform the path separators into something shiboken understands.
|
||||
make_path(shiboken_include_dirs ${includePaths})
|
||||
make_path(shiboken_typesystem_dirs ${typesystemPaths})
|
||||
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 ${outputSource} PROPERTY SKIP_AUTOGEN ON)
|
||||
add_custom_command(
|
||||
OUTPUT ${outputSource}
|
||||
COMMAND
|
||||
$<TARGET_PROPERTY:Shiboken2::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} ${globalInclude}
|
||||
--include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs}
|
||||
${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML}
|
||||
DEPENDS ${typesystemXML} ${dependsArg}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Running generator for ${libraryName} binding..."
|
||||
)
|
||||
|
||||
set(TARGET_NAME "Py${libraryName}")
|
||||
set(MODULE_NAME "${libraryName}")
|
||||
add_library(${TARGET_NAME} MODULE ${outputSource})
|
||||
|
||||
set_target_properties(
|
||||
${TARGET_NAME}
|
||||
PROPERTIES PREFIX ""
|
||||
OUTPUT_NAME ${MODULE_NAME}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
|
||||
)
|
||||
if(APPLE)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
|
||||
elseif(NOT WIN32) #ie. linux
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${targetLinkLibraries} 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()
|
||||
170
cmake/KDAB/modules/KDPySide6ModuleBuild.cmake
Normal file
170
cmake/KDAB/modules/KDPySide6ModuleBuild.cmake
Normal file
@@ -0,0 +1,170 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020-2023 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)
|
||||
# cmake-lint: disable=C0103
|
||||
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)
|
||||
#remove noisy compiler warnings (as the generated code is not necessarily super-warning-free)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-all -Wno-extra")
|
||||
endif()
|
||||
|
||||
# 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()
|
||||
|
||||
# Replace all semicolons in a string with this platform's path separator
|
||||
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${libraryName}" the output name of this target
|
||||
# will be changed to match PySide template
|
||||
# Args:
|
||||
# libraryName - The name of the output module
|
||||
# typesystemPaths - A list of paths where shiboken should look for typesystem files
|
||||
# includePaths - Include paths necessary to parse your class. *This is not the same as build*
|
||||
# outputSource - The files that will be generated by shiboken
|
||||
# targetIncludeDirs - This will be passed to target_include_directories
|
||||
# targetLinkLibraries - This will be passed to targetLinkLibraries
|
||||
# globalInclude - A header-file that contains all classes that will be generated
|
||||
# typesystemXML - The target binding typesystem (that should be the full path)
|
||||
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
|
||||
# trigger if one of these files changes
|
||||
# moduleOutputDir - Where the library file should be stored
|
||||
macro(
|
||||
create_python_bindings
|
||||
libraryName
|
||||
typesystemPaths
|
||||
includePaths
|
||||
outputSource
|
||||
targetIncludeDirs
|
||||
targetLinkLibraries
|
||||
globalInclude
|
||||
typesystemXML
|
||||
dependsArg
|
||||
moduleOutputDir
|
||||
)
|
||||
|
||||
# Transform the path separators into something shiboken understands.
|
||||
make_path(shiboken_include_dirs ${includePaths})
|
||||
make_path(shiboken_typesystem_dirs ${typesystemPaths})
|
||||
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 ${outputSource} PROPERTY SKIP_AUTOGEN ON)
|
||||
add_custom_command(
|
||||
OUTPUT ${outputSource}
|
||||
COMMAND
|
||||
$<TARGET_PROPERTY:Shiboken6::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} ${globalInclude}
|
||||
--include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs}
|
||||
${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML}
|
||||
DEPENDS ${typesystemXML} ${dependsArg}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Running generator for ${libraryName} binding..."
|
||||
)
|
||||
|
||||
set(TARGET_NAME "Py${libraryName}")
|
||||
set(MODULE_NAME "${libraryName}")
|
||||
add_library(${TARGET_NAME} MODULE ${outputSource})
|
||||
|
||||
set_target_properties(
|
||||
${TARGET_NAME}
|
||||
PROPERTIES PREFIX ""
|
||||
OUTPUT_NAME ${MODULE_NAME}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
|
||||
)
|
||||
if(APPLE)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
|
||||
elseif(NOT WIN32) #ie. linux
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${targetLinkLibraries} 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()
|
||||
55
cmake/KDAB/modules/KDQtInstallPaths.cmake
Normal file
55
cmake/KDAB/modules/KDQtInstallPaths.cmake
Normal file
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016-2023 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: ${QT_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()
|
||||
@@ -1,160 +0,0 @@
|
||||
#
|
||||
# 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: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
# 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(PYSIDE2_BASEDIR)
|
||||
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}")
|
||||
endif()
|
||||
|
||||
if (PYSIDE2_FOUND)
|
||||
#PySide
|
||||
#===============================================================================
|
||||
find_path(PYSIDE_INCLUDE_DIR
|
||||
pyside.h
|
||||
PATHS ${PYSIDE2_BASEDIR}/include ${PYSIDE2_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} ${PYSIDE2_CUSTOM_PREFIX}/lib
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_path(PYSIDE_TYPESYSTEMS
|
||||
typesystem_core.xml
|
||||
PATHS ${PYSIDE2_BASEDIR}/typesystems ${PYSIDE2_CUSTOM_PREFIX}/share/PySide2/typesystems
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
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
|
||||
)
|
||||
@@ -1,187 +0,0 @@
|
||||
#
|
||||
# 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: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
# 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
|
||||
)
|
||||
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
|
||||
)
|
||||
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_PATH}")
|
||||
|
||||
if(SHIBOKEN_BASEDIR)
|
||||
find_path(SHIBOKEN_INCLUDE_DIR
|
||||
shiboken.h
|
||||
PATHS ${SHIBOKEN_CUSTOM_PATH} ${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_PATH})
|
||||
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
|
||||
)
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
#
|
||||
# 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: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
# 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
|
||||
)
|
||||
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
|
||||
)
|
||||
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_PATH}")
|
||||
|
||||
if(SHIBOKEN_BASEDIR)
|
||||
find_path(SHIBOKEN_INCLUDE_DIR
|
||||
shiboken.h
|
||||
PATHS ${SHIBOKEN_CUSTOM_PATH} ${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_PATH})
|
||||
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
|
||||
)
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
#
|
||||
# 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: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
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()
|
||||
if (NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
|
||||
get_target_property(QtCore_is_framework Qt5::Core FRAMEWORK)
|
||||
if (QtCore_is_framework)
|
||||
# Get the path to the framework dir.
|
||||
list(GET Qt5Core_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
|
||||
get_filename_component(QT_FRAMEWORK_INCLUDE_DIR "${QT_INCLUDE_DIR}/../" ABSOLUTE)
|
||||
|
||||
# QT_INCLUDE_DIR points to the QtCore.framework directory, so we need to adjust this to point
|
||||
# to the actual include directory, which has include files for non-framework parts of Qt.
|
||||
get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
# Flags that we will pass to shiboken-generator
|
||||
# --generator-set=shiboken: tells the generator that we want to use shiboken to generate code,
|
||||
# a doc generator is also available
|
||||
# --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 pahts 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 alls 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}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
${TARGET_INCLUDE_DIRS}
|
||||
${PYSIDE_EXTRA_INCLUDES}
|
||||
)
|
||||
|
||||
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}/${TARGET_NAME})
|
||||
endmacro()
|
||||
@@ -1,157 +0,0 @@
|
||||
#
|
||||
# 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: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
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()
|
||||
if (NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
|
||||
get_target_property(QtCore_is_framework 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 pahts 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 alls 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}
|
||||
${PYSIDE_EXTRA_INCLUDES}
|
||||
)
|
||||
|
||||
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}/${TARGET_NAME})
|
||||
endmacro()
|
||||
@@ -1,70 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# 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 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.
|
||||
|
||||
|
||||
#
|
||||
# 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(TARGET Qt${QT_MAJOR_VERSION}::qmake)
|
||||
get_target_property(QT_QMAKE_EXECUTABLE Qt${QT_MAJOR_VERSION}::qmake LOCATION)
|
||||
else()
|
||||
message(FATAL_ERROR "No supported Qt version found. Make sure you find Qt before calling this")
|
||||
endif()
|
||||
|
||||
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 aleady on the command line for example
|
||||
set(${var} ${path} CACHE PATH "Qt install path for ${var}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -13,6 +13,9 @@ Configuration options:
|
||||
* build_examples
|
||||
Build the examples. Default=True
|
||||
|
||||
* builde_python_bindings
|
||||
* 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)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2020-2023 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.
|
||||
@@ -9,9 +9,10 @@
|
||||
|
||||
from conans import ConanFile, CMake, tools
|
||||
|
||||
|
||||
class KDDockWidgetsConan(ConanFile):
|
||||
name = "kddockwidgets"
|
||||
version = "1.2.0"
|
||||
version = "1.7.0"
|
||||
default_user = "kdab"
|
||||
default_channel = "stable"
|
||||
license = ("https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-2.0-only.txt",
|
||||
@@ -20,7 +21,7 @@ class KDDockWidgetsConan(ConanFile):
|
||||
url = "https://github.com/KDAB/KDDockWidgets"
|
||||
description = "Advanced Dock Widget Framework for Qt"
|
||||
generators = "cmake"
|
||||
topics = ("qt", "dockwidget" , "kdab")
|
||||
topics = ("qt", "dockwidget", "kdab")
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {
|
||||
"qt_version": "ANY",
|
||||
@@ -28,14 +29,16 @@ class KDDockWidgetsConan(ConanFile):
|
||||
"build_examples": [True, False],
|
||||
"build_tests": [True, False],
|
||||
"build_python_bindings": [True, False],
|
||||
"build_for_qt6": [True, False],
|
||||
}
|
||||
|
||||
default_options = {
|
||||
"qt_version": "qt/[>5.9.0]@kdab/stable",
|
||||
"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):
|
||||
@@ -52,6 +55,7 @@ class KDDockWidgetsConan(ConanFile):
|
||||
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()
|
||||
|
||||
@@ -62,4 +66,5 @@ class KDDockWidgetsConan(ConanFile):
|
||||
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!
|
||||
# Check only the major and minor version!
|
||||
self.info.requires["qt"].minor_mode()
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
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
|
||||
47
deploy/create-demo-win-zip.bat
Normal file
47
deploy/create-demo-win-zip.bat
Normal file
@@ -0,0 +1,47 @@
|
||||
@echo off
|
||||
rem
|
||||
rem This file is part of KDDockWidgets.
|
||||
rem
|
||||
rem SPDX-FileCopyrightText: 2022-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
rem
|
||||
rem SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
rem
|
||||
rem Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
rem
|
||||
|
||||
rem assumes the builddir is the workdir
|
||||
rem assumes Qt is in PATH
|
||||
rem %1 is the name of the deployment
|
||||
|
||||
if [%1] == [] (
|
||||
echo "Usage: %~nx0 <deploymentName>"
|
||||
goto theEnd
|
||||
)
|
||||
|
||||
rem Prepare the deployDir
|
||||
set "deploy=%1"
|
||||
if exist %deploy% (
|
||||
rmdir /Q /S %deploy%
|
||||
)
|
||||
mkdir %deploy%
|
||||
|
||||
rem Deploy programs
|
||||
for %%s in (bin\*.dll bin\*_example.exe) do (
|
||||
copy %%s %deploy% >nul
|
||||
)
|
||||
|
||||
rem Deploy Qt
|
||||
windeployqt --compiler-runtime %deploy%
|
||||
|
||||
rem Zip it
|
||||
set zipFile=%cd%\%deploy%.7z
|
||||
if exist %zipFile% (
|
||||
del /F /Q %zipFile%
|
||||
)
|
||||
7z a %zipFile% %deploy%
|
||||
|
||||
rem Must echo this line exactly for the CI
|
||||
echo Created zip file "%zipFile%" successfully
|
||||
|
||||
:theEnd
|
||||
exit /b %ERRORLEVEL%
|
||||
@@ -1,157 +0,0 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020-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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is an helper script which simply reads CMakePresets.json and builds those
|
||||
* presets. It's just for quickly checking that every supported setup builds
|
||||
* without having to wait for CI (or in case you don't have access to KDAB CI)
|
||||
*
|
||||
* Usage:
|
||||
* $ dart build-all.dart <kddw-source-directory> [--unity] [--tests]
|
||||
*/
|
||||
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
|
||||
String s_sourceDirectory = "";
|
||||
bool s_testUnityVariations = false;
|
||||
bool s_runTests = true;
|
||||
|
||||
class Preset {
|
||||
final String name;
|
||||
final String buildDir;
|
||||
Preset.fromJson(var jsonData)
|
||||
: name = jsonData['name'],
|
||||
buildDir = jsonData['binaryDir'] {
|
||||
}
|
||||
|
||||
String buildDirectory() {
|
||||
return buildDir.replaceAll("\${sourceDir}", s_sourceDirectory);
|
||||
}
|
||||
|
||||
List<String> cmakeConfigArguments(bool isUnityBuild) {
|
||||
return [
|
||||
"-G",
|
||||
"Ninja",
|
||||
"-B",
|
||||
buildDirectory(),
|
||||
"-S",
|
||||
s_sourceDirectory,
|
||||
"--preset=" + name,
|
||||
'-DKDDockWidgets_UNITY_BUILD=${isUnityBuild ? "ON" : "OFF"}'
|
||||
];
|
||||
}
|
||||
|
||||
List<String> cmakeBuildArguments() {
|
||||
return ["--build", buildDirectory()];
|
||||
}
|
||||
|
||||
// Builds twice. One with unity build and one without.
|
||||
Future<bool> build() async {
|
||||
if (!await buildSingle(true)) return false;
|
||||
if (s_testUnityVariations) if (!await buildSingle(false)) return false;
|
||||
if (s_runTests && !await runTests()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Future<bool> buildSingle(bool isUnityBuild) async {
|
||||
if (!await runCMake(cmakeConfigArguments(isUnityBuild))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!await runCMake(cmakeBuildArguments())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Future<bool> runTests() async {
|
||||
print("Running: ctest");
|
||||
|
||||
final savedCwd = Directory.current;
|
||||
Directory.current = buildDirectory();
|
||||
ProcessResult result = await Process.run('ctest', ["-j8"]);
|
||||
Directory.current = savedCwd;
|
||||
|
||||
if (result.exitCode != 0) {
|
||||
print(result.stdout);
|
||||
print(result.stderr);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the contents of the CMakePresets.json file
|
||||
String cmakePresetsJson(presetsFile) {
|
||||
var file = File(presetsFile);
|
||||
if (!file.existsSync()) {
|
||||
throw Exception('Not existent file');
|
||||
}
|
||||
return file.readAsStringSync();
|
||||
}
|
||||
|
||||
List<Preset> readPresets(var presetsFile) {
|
||||
var presets = List<Preset>();
|
||||
|
||||
final jsonData = jsonDecode(cmakePresetsJson(presetsFile));
|
||||
for (var presetData in jsonData['configurePresets']) {
|
||||
presets.add(Preset.fromJson(presetData));
|
||||
}
|
||||
return presets;
|
||||
}
|
||||
|
||||
Future<bool> runCMake(var cmd) async {
|
||||
print("Running: cmake " + cmd.join(' '));
|
||||
ProcessResult result = await Process.run('cmake', cmd);
|
||||
if (result.exitCode != 0) {
|
||||
print(result.stdout);
|
||||
print(result.stderr);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Future<int> main(List<String> arguments) async {
|
||||
if (arguments.length == 0) {
|
||||
print("Usage: build-all.dart <src-directory> [--unity] [--tests]");
|
||||
return 1;
|
||||
}
|
||||
|
||||
s_sourceDirectory = arguments[0];
|
||||
s_testUnityVariations = arguments.contains("--unity");
|
||||
s_runTests = arguments.contains("--tests");
|
||||
final presetsFile = s_sourceDirectory + '/CMakePresets.json';
|
||||
|
||||
if (FileSystemEntity.typeSync(presetsFile) == FileSystemEntityType.notFound) {
|
||||
print('ERROR: CMakePresets.json file not found in the source directory');
|
||||
return 1;
|
||||
}
|
||||
|
||||
var presets = readPresets(presetsFile);
|
||||
for (var preset in presets) {
|
||||
if (preset.name == 'python')
|
||||
continue; // TODO: blacklisted as it's not building on my setup yet
|
||||
|
||||
if (!await preset.build()) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
print("Success!!");
|
||||
return 0;
|
||||
}
|
||||
65
distro/debian.changelog
Normal file
65
distro/debian.changelog
Normal file
@@ -0,0 +1,65 @@
|
||||
kddockwidgets (1.7.0) release candidate; urgency=high
|
||||
|
||||
* 1.7.0 final
|
||||
|
||||
-- Allen Winter <allen.winter@kdab.com> Wed, 03 May 2023 15:00:00 -0500
|
||||
|
||||
kddockwidgets (1.6.0) release candidate; urgency=high
|
||||
|
||||
* 1.6.0 final
|
||||
|
||||
-- Allen Winter <allen.winter@kdab.com> Wed, 14 Sep 2022 11:40:00 -0500
|
||||
|
||||
kddockwidgets (1.5.0) release candidate; urgency=high
|
||||
|
||||
* 1.5.0 final
|
||||
|
||||
-- Allen Winter <allen.winter@kdab.com> Mon, 24 Nov 2021 12:00:00 -0500
|
||||
|
||||
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
|
||||
@@ -6,7 +6,7 @@ Build-Depends: debhelper (>=9), cdbs, cmake
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: https://github.com/KDAB/KDDockWidgets
|
||||
|
||||
Package: kddockwidgets
|
||||
Package: qt5-kddockwidgets
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: KDAB's Dock Widget Framework for Qt
|
||||
Description: KDAB's Dock Widget Framework for Qt
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/make -f
|
||||
DEB_CMAKE_EXTRA_FLAGS = -DCMAKE_BUILD_TYPE=Release
|
||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||
include /usr/share/cdbs/1/class/cmake.mk
|
||||
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.7.0-1
|
||||
Binary: kddockwidgets
|
||||
Maintainer: Allen Winter <allen.winter@kdab.com>
|
||||
Architecture: any
|
||||
Build-Depends: debhelper (>=9), cdbs, cmake, qtbase5-dev, qtbase5-private-dev, libqt5x11extras5-dev, libfontconfig-dev, libfreetype-dev
|
||||
|
||||
Files:
|
||||
00000000000000000000000000000000 00000 qt5-kddockwidgets-1.7.0.tar.gz
|
||||
@@ -1,7 +1,7 @@
|
||||
Name: kddockwidgets
|
||||
Version: 1.2.0
|
||||
Name: qt5-kddockwidgets
|
||||
Version: 1.7.0
|
||||
Release: 1
|
||||
Summary: KDAB's Dock Widget Framework for Qt
|
||||
Summary: KDAB's Dock Widget Framework for Qt5
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: %{name}-%{version}.tar.gz.asc
|
||||
Source2: %{name}-rpmlintrc
|
||||
@@ -14,15 +14,15 @@ Packager: Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
||||
|
||||
BuildRequires: cmake
|
||||
%if %{defined suse_version}
|
||||
BuildRequires: libqt5-qtbase-devel libqt5-qtx11extras-devel
|
||||
BuildRequires: libqt5-qtbase-devel libqt5-qtbase-private-headers-devel libqt5-qtx11extras-devel
|
||||
%endif
|
||||
|
||||
%if %{defined fedora}
|
||||
BuildRequires: gcc-c++ qt5-qtbase-devel qt5-qtx11extras-devel desktop-file-utils
|
||||
BuildRequires: gcc-c++ qt5-qtbase-devel qt5-qtbase-private-devel qt5-qtx11extras-devel desktop-file-utils util-linux
|
||||
%endif
|
||||
|
||||
%if %{defined rhel}
|
||||
BuildRequires: gcc-c++ qt5-qtbase-devel qt5-qtx11extras-devel desktop-file-utils
|
||||
BuildRequires: gcc-c++ qt5-qtbase-devel qt5-qtbase-private-devel qt5-qtx11extras-devel desktop-file-utils
|
||||
%endif
|
||||
|
||||
%description
|
||||
@@ -79,7 +79,18 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
%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
|
||||
@@ -87,6 +98,18 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
|
||||
%{_libdir}/libkddockwidgets.so
|
||||
|
||||
%changelog
|
||||
* Wed May 03 2023 Allen Winter <allen.winter@kdab.com> 1.7.0
|
||||
1.7.0 final
|
||||
* Wed Sep 14 2022 Allen Winter <allen.winter@kdab.com> 1.6.0
|
||||
1.6.0 final
|
||||
* Mon Nov 24 2021 Allen Winter <allen.winter@kdab.com> 1.5.0
|
||||
1.5.0 final
|
||||
* 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
|
||||
12
distro/qt6-debian.control
Normal file
12
distro/qt6-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: qt6-kddockwidgets
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: KDAB's Dock Widget Framework for Qt
|
||||
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.7.0-1
|
||||
Binary: kddockwidgets
|
||||
Maintainer: Allen Winter <allen.winter@kdab.com>
|
||||
Architecture: any
|
||||
Build-Depends: debhelper (>=9), cdbs, cmake, qt6-base-dev, qt6-base-private-dev, libgl1-mesa-dev, libfontconfig-dev, libfreetype-dev
|
||||
|
||||
Files:
|
||||
00000000000000000000000000000000 00000 qt6-kddockwidgets-1.7.0.tar.gz
|
||||
116
distro/qt6-kddockwidgets.spec
Normal file
116
distro/qt6-kddockwidgets.spec
Normal file
@@ -0,0 +1,116 @@
|
||||
Name: qt6-kddockwidgets
|
||||
Version: 1.7.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-qtbase-private-headers-devel libqt6-qtx11extras-devel
|
||||
%endif
|
||||
|
||||
%if %{defined fedora}
|
||||
BuildRequires: gcc-c++ qt6-qtbase-devel qt6-qtbase-private-devel desktop-file-utils libxkbcommon-devel util-linux
|
||||
%endif
|
||||
|
||||
%if %{defined rhel}
|
||||
BuildRequires: gcc-c++ qt6-qtbase-devel qt6-qtbase-private-devel qt6-qtx11extras-devel desktop-file-utils libxkbcommon-devel
|
||||
%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,-)
|
||||
%if 0%{?fedora} > 35
|
||||
%{_libdir}/qt6/mkspecs/modules/*
|
||||
%endif
|
||||
#%dir %{_prefix}/share/mkspecs
|
||||
#%dir %{_prefix}/share/mkspecs/features
|
||||
#%{_prefix}/share/mkspecs/features/kddockwidgets.prf
|
||||
%dir %{_includedir}/kddockwidgets-qt6
|
||||
%{_includedir}/kddockwidgets-qt6/kddockwidgets/*
|
||||
%dir %{_libdir}/cmake/KDDockWidgets-qt6
|
||||
%{_libdir}/cmake/KDDockWidgets-qt6/*
|
||||
%{_libdir}/libkddockwidgets-qt6.so
|
||||
|
||||
%changelog
|
||||
* Wed May 03 2023 Allen Winter <allen.winter@kdab.com> 1.7.0
|
||||
1.7.0 final
|
||||
* Wed Sep 14 2022 Allen Winter <allen.winter@kdab.com> 1.6.0
|
||||
1.6.0 final
|
||||
* Mon Nov 24 2021 Allen Winter <allen.winter@kdab.com> 1.5.0
|
||||
1.5.0 final
|
||||
* 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
|
||||
42
docker/pyside2/Dockerfile
Normal file
42
docker/pyside2/Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2023 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.
|
||||
|
||||
# The purpose of this Dockerfile is just for quickly getting a running python build for testing.
|
||||
|
||||
# Instructions:
|
||||
|
||||
# $ docker build -t kddw-pyside2 .
|
||||
# $ docker run -it -v ~/Qt/5.15.2/gcc_64/:/Qt/ -v /tmp/.X11-unix:/tmp/.X11-unix kddw-pyside2
|
||||
# git checkout 1.6
|
||||
# cmake --preset=python -G Ninja . && cd build-python/ && ninja
|
||||
|
||||
# Test with:
|
||||
# cd ../python/examples && rcc -g python -o rc_assets.py ../../examples/dockwidgets/resources_example.qrc
|
||||
# python3 main.py
|
||||
|
||||
FROM ubuntu:22.04
|
||||
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
|
||||
|
||||
ENV TZ=Europe/Berlin
|
||||
ENV LC_CTYPE=C.UTF-8
|
||||
ENV DISPLAY=:0
|
||||
ENV PATH=$PATH:/Qt/bin/
|
||||
ENV LD_LIBRARY_PATH=/Qt/lib/
|
||||
ENV PYTHONPATH=/KDDockWidgets/build-python/python/
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt update
|
||||
RUN apt install build-essential software-properties-common git ninja-build libssl-dev mesa-common-dev libglu1-mesa-dev libglib2.0-dev libfontconfig libxkbcommon-x11-0 libdbus-1-3 cmake pip libxslt1-dev llvm-dev clang libxcb-keysyms1 libxcb-image0 libxcb-icccm4 libxcb-xinerama0 libxcb-shape0 libxcb-render-util0 -y
|
||||
RUN pip3 install --index-url=http://download.qt.io/official_releases/QtForPython/ --trusted-host download.qt.io shiboken2 pyside2 shiboken2_generator
|
||||
|
||||
WORKDIR /
|
||||
RUN git clone https://github.com/KDAB/KDDockWidgets.git
|
||||
WORKDIR /KDDockWidgets/
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2020-2023 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
|
||||
@@ -9,32 +9,16 @@
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
# 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 Qt5.")
|
||||
endif()
|
||||
|
||||
# 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."
|
||||
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_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()
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
add_subdirectory(api)
|
||||
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.
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2020-2023 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
|
||||
@@ -9,32 +9,81 @@
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
find_file(QDOC_QTCORE_TAG qtcore.tags
|
||||
HINTS ${QT_INSTALL_DOCS}/qtcore
|
||||
HINTS ${QT_INSTALL_DATA}/doc/qtcore
|
||||
)
|
||||
# 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 ${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)
|
||||
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
|
||||
)
|
||||
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
|
||||
DEPENDS ${_dox_deps} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
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}
|
||||
COMMENT "Generate the .qch file"
|
||||
)
|
||||
add_custom_target(
|
||||
kddockwidgets-api.qch ALL
|
||||
DEPENDS ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch
|
||||
COMMENT "Target generate the .qch file"
|
||||
)
|
||||
add_custom_target(
|
||||
docs
|
||||
DEPENDS kddockwidgets-api.qch
|
||||
COMMENT "Target to generate the documentation"
|
||||
)
|
||||
add_custom_target(kddockwidgets-api.qch ALL DEPENDS ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch)
|
||||
|
||||
install(FILES ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch DESTINATION ${INSTALL_DOC_DIR})
|
||||
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}
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.8.18
|
||||
# Doxyfile 1.8.20
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
@@ -32,13 +32,13 @@ DOXYFILE_ENCODING = UTF-8
|
||||
# title of most generated pages and in a few other places.
|
||||
# The default value is: My Project.
|
||||
|
||||
PROJECT_NAME = "KDDockWidgets API Documentation"
|
||||
PROJECT_NAME = "@PROJECT_NAME@ API Documentation"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = @KDDockWidgets_VERSION@
|
||||
PROJECT_NUMBER = @KDDockWidgets_VERSION_MAJOR@.@KDDockWidgets_VERSION_MINOR@
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
@@ -99,7 +99,7 @@ OUTPUT_LANGUAGE = English
|
||||
# Possible values are: None, LTR, RTL and Context.
|
||||
# The default value is: None.
|
||||
|
||||
#TOO NEW OUTPUT_TEXT_DIRECTION = None
|
||||
OUTPUT_TEXT_DIRECTION = None
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
@@ -205,7 +205,7 @@ JAVADOC_AUTOBRIEF = NO
|
||||
# interpreted by doxygen.
|
||||
# The default value is: NO.
|
||||
|
||||
#TOO NEW JAVADOC_BANNER = NO
|
||||
JAVADOC_BANNER = NO
|
||||
|
||||
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
|
||||
# line (until the first dot) of a Qt-style comment as the brief description. If
|
||||
@@ -227,6 +227,14 @@ QT_AUTOBRIEF = YES
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# By default Python docstrings are displayed as preformatted text and doxygen's
|
||||
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
|
||||
# doxygen's special commands can be used and the contents of the docstring
|
||||
# documentation blocks is shown as doxygen documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
PYTHON_DOCSTRING = YES
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
|
||||
# documentation from any documented member that it re-implements.
|
||||
# The default value is: YES.
|
||||
@@ -261,7 +269,7 @@ TAB_SIZE = 8
|
||||
# commands \{ and \} for these it is advised to use the version @{ and @} or use
|
||||
# a double escape (\\{ and \\})
|
||||
|
||||
ALIASES =
|
||||
ALIASES = "reimp=Reimplemented for internal purposes.\n"
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C. For
|
||||
@@ -297,7 +305,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
|
||||
# separated into more groups, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
#TOO NEW: OPTIMIZE_OUTPUT_SLICE = NO
|
||||
OPTIMIZE_OUTPUT_SLICE = NO
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
@@ -336,7 +344,7 @@ MARKDOWN_SUPPORT = YES
|
||||
# Minimum value: 0, maximum value: 99, default value: 5.
|
||||
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
|
||||
|
||||
#TOO NEW TOC_INCLUDE_HEADINGS = 5
|
||||
TOC_INCLUDE_HEADINGS = 5
|
||||
|
||||
# When enabled doxygen tries to link words that correspond to documented
|
||||
# classes, or namespaces to their corresponding documentation. Such a link can
|
||||
@@ -449,6 +457,19 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use
|
||||
# during processing. When set to 0 doxygen will based this on the number of
|
||||
# cores available in the system. You can set it explicitly to a value larger
|
||||
# than 0 to get more control over the balance between CPU load and processing
|
||||
# speed. At this moment only the input processing can be done using multiple
|
||||
# threads. Since this is still an experimental feature the default is set to 1,
|
||||
# which efficively disables parallel processing. Please report any issues you
|
||||
# encounter. Generating dot graphs in parallel is controlled by the
|
||||
# DOT_NUM_THREADS setting.
|
||||
# Minimum value: 0, maximum value: 32, default value: 1.
|
||||
|
||||
NUM_PROC_THREADS = 1
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -461,7 +482,7 @@ LOOKUP_CACHE_SIZE = 0
|
||||
# normally produced when WARNINGS is set to YES.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
|
||||
# be included in the documentation.
|
||||
@@ -473,7 +494,7 @@ EXTRACT_PRIVATE = NO
|
||||
# methods of a class will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
#TOO NEW EXTRACT_PRIV_VIRTUAL = NO
|
||||
EXTRACT_PRIV_VIRTUAL = NO
|
||||
|
||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||
# scope will be included in the documentation.
|
||||
@@ -547,13 +568,13 @@ HIDE_IN_BODY_DOCS = YES
|
||||
# will be excluded. Set it to YES to include the internal documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
INTERNAL_DOCS = YES
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# (including Cygwin) ands Mac users are advised to set this option to NO.
|
||||
# (including Cygwin) and Mac users are advised to set this option to NO.
|
||||
# The default value is: system dependent.
|
||||
|
||||
CASE_SENSE_NAMES = YES
|
||||
@@ -698,14 +719,14 @@ MAX_INITIALIZER_LINES = 30
|
||||
# list will mention the files that were used to generate the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
|
||||
# will remove the Files entry from the Quick Index and from the Folder Tree View
|
||||
# (if specified).
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_FILES = NO
|
||||
SHOW_FILES = YES
|
||||
|
||||
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
|
||||
# page. This will remove the Namespaces entry from the Quick Index and from the
|
||||
@@ -823,7 +844,9 @@ WARN_LOGFILE = doxygen.log
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = @CMAKE_SOURCE_DIR@
|
||||
INPUT = "@CMAKE_SOURCE_DIR@/README.md" \
|
||||
"@CMAKE_SOURCE_DIR@/README-bindings.md" \
|
||||
"@CMAKE_SOURCE_DIR@/src"
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
@@ -851,15 +874,11 @@ INPUT_ENCODING = UTF-8
|
||||
# *.vhdl, *.ucf, *.qsf and *.ice.
|
||||
|
||||
FILE_PATTERNS = *.cpp \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
*.h \
|
||||
*.hh \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.dox \
|
||||
*.md \
|
||||
*.gif
|
||||
*.gif \
|
||||
*.png
|
||||
|
||||
# The RECURSIVE tag can be used to specify whether or not subdirectories should
|
||||
# be searched for input files as well.
|
||||
@@ -874,8 +893,7 @@ RECURSIVE = YES
|
||||
# Note that relative paths are relative to the directory from which doxygen is
|
||||
# run.
|
||||
|
||||
EXCLUDE = @CMAKE_SOURCE_DIR@/examples \
|
||||
@CMAKE_SOURCE_DIR@/src/private
|
||||
EXCLUDE =
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
@@ -901,7 +919,9 @@ EXCLUDE_PATTERNS = */.svn/* \
|
||||
*/test/* \
|
||||
*/tests/* \
|
||||
*_p.cpp \
|
||||
*_export.h
|
||||
*_p.h \
|
||||
*_export.h \
|
||||
*/fwd_headers/*
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
@@ -925,7 +945,7 @@ EXAMPLE_PATH =
|
||||
# *.h) to filter out the source-files in the directories. If left blank all
|
||||
# files are included.
|
||||
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_PATTERNS =
|
||||
|
||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||
# searched for input files to be used with the \include or \dontinclude commands
|
||||
@@ -938,7 +958,8 @@ EXAMPLE_RECURSIVE = NO
|
||||
# that contain images that are to be included in the documentation (see the
|
||||
# \image command).
|
||||
|
||||
IMAGE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@" \
|
||||
IMAGE_PATH = "@CMAKE_SOURCE_DIR@/images" \
|
||||
"@CMAKE_CURRENT_SOURCE_DIR@" \
|
||||
"@CMAKE_SOURCE_DIR@/screencap.gif"
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
@@ -1008,7 +1029,7 @@ USE_MDFILE_AS_MAINPAGE = "@CMAKE_SOURCE_DIR@/README.md"
|
||||
# also VERBATIM_HEADERS is set to NO.
|
||||
# The default value is: NO.
|
||||
|
||||
SOURCE_BROWSER = NO
|
||||
SOURCE_BROWSER = YES
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
|
||||
# classes and enums directly into the documentation.
|
||||
@@ -1027,13 +1048,13 @@ STRIP_CODE_COMMENTS = YES
|
||||
# entity all documented functions referencing it will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCED_BY_RELATION = YES
|
||||
|
||||
# If the REFERENCES_RELATION tag is set to YES then for each documented function
|
||||
# all documented entities called/used by that function will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCES_RELATION = NO
|
||||
REFERENCES_RELATION = YES
|
||||
|
||||
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
|
||||
# to YES then the hyperlinks from functions in REFERENCES_RELATION and
|
||||
@@ -1081,7 +1102,7 @@ USE_HTAGS = NO
|
||||
# See also: Section \class.
|
||||
# The default value is: YES.
|
||||
|
||||
VERBATIM_HEADERS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
@@ -1099,7 +1120,7 @@ ALPHABETICAL_INDEX = YES
|
||||
# Minimum value: 1, maximum value: 20, default value: 5.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 3
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all classes will
|
||||
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
|
||||
@@ -1247,7 +1268,7 @@ HTML_TIMESTAMP = YES
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
#TOO NEW HTML_DYNAMIC_MENUS = YES
|
||||
HTML_DYNAMIC_MENUS = YES
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
@@ -1348,7 +1369,7 @@ CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
|
||||
# The GENERATE_CHI flag controls if a separate .chi index file is generated
|
||||
# (YES) or that it should be included in the master .chm file (NO).
|
||||
# (YES) or that it should be included in the main .chm file (NO).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
@@ -1389,7 +1410,7 @@ GENERATE_QHP = @HAVE_QHELPGEN@
|
||||
# the HTML output folder.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QCH_FILE = @DOXYGEN_OUTPUT_DIR@/qch/kddockwidgets-api.qch
|
||||
QCH_FILE = "@DOXYGEN_OUTPUT_DIR@/qch/kddockwidgets-api.qch"
|
||||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
@@ -1397,7 +1418,7 @@ QCH_FILE = @DOXYGEN_OUTPUT_DIR@/qch/kddockwidgets-api.qch
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_NAMESPACE = com.kdab.KDDockWidgets.api.@KDDockWidgets_VERSION@
|
||||
QHP_NAMESPACE = com.kdab.@PROJECT_NAME@.api.@KDDockWidgets_VERSION@
|
||||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
@@ -1406,7 +1427,7 @@ QHP_NAMESPACE = com.kdab.KDDockWidgets.api.@KDDockWidgets_VERSION@
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_VIRTUAL_FOLDER = KDDockWidgets-@KDDockWidgets_VERSION@
|
||||
QHP_VIRTUAL_FOLDER = @PROJECT_NAME@-@KDDockWidgets_VERSION@
|
||||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
@@ -1436,7 +1457,7 @@ QHP_SECT_FILTER_ATTRS =
|
||||
# generated .qhp file.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHG_LOCATION = @QHELPGEN_EXECUTABLE@
|
||||
QHG_LOCATION = "@QHELPGEN_EXECUTABLE@"
|
||||
|
||||
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
|
||||
# generated, together with the HTML files, they form an Eclipse help plugin. To
|
||||
@@ -1514,12 +1535,12 @@ EXT_LINKS_IN_WINDOW = NO
|
||||
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
|
||||
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
|
||||
# the HTML output. These images will generally look nicer at scaled resolutions.
|
||||
# Possible values are: png The default and svg Looks nicer but requires the
|
||||
# pdf2svg tool.
|
||||
# Possible values are: png (the default) and svg (looks nicer but requires the
|
||||
# pdf2svg or inkscape tool).
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
#TOO NEW HTML_FORMULA_FORMAT = png
|
||||
HTML_FORMULA_FORMAT = png
|
||||
|
||||
# Use this tag to change the font size of LaTeX formulas included as images in
|
||||
# the HTML documentation. When you change the font size after a successful
|
||||
@@ -1545,7 +1566,7 @@ FORMULA_TRANSPARENT = YES
|
||||
# to create new LaTeX commands to be used in formulas as building blocks. See
|
||||
# the section "Including formulas" for details.
|
||||
|
||||
#TOO NEW FORMULA_MACROFILE =
|
||||
FORMULA_MACROFILE =
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# https://www.mathjax.org) which uses client side JavaScript for the rendering
|
||||
@@ -1709,7 +1730,7 @@ LATEX_OUTPUT = latex
|
||||
# the output language.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_CMD_NAME =
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
|
||||
# index for LaTeX.
|
||||
@@ -1729,7 +1750,7 @@ MAKEINDEX_CMD_NAME = makeindex
|
||||
# The default value is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
#TOO NEW LATEX_MAKEINDEX_CMD = makeindex
|
||||
LATEX_MAKEINDEX_CMD = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
@@ -1815,13 +1836,15 @@ LATEX_EXTRA_FILES =
|
||||
|
||||
PDF_HYPERLINKS = YES
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
|
||||
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
|
||||
# higher quality PDF documentation.
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
|
||||
# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
|
||||
# files. Set this option to YES, to get a higher quality PDF documentation.
|
||||
#
|
||||
# See also section LATEX_CMD_NAME for selecting the engine.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
USE_PDFLATEX = YES
|
||||
USE_PDFLATEX = NO
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep running
|
||||
@@ -1871,7 +1894,7 @@ LATEX_TIMESTAMP = NO
|
||||
# LATEX_OUTPUT directory will be used.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
#TOO NEW LATEX_EMOJI_DIRECTORY =
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
@@ -2015,7 +2038,7 @@ XML_PROGRAMLISTING = YES
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
#TOO NEW XML_NS_MEMB_FILE_SCOPE = NO
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
@@ -2111,7 +2134,7 @@ ENABLE_PREPROCESSING = YES
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
MACRO_EXPANSION = YES
|
||||
MACRO_EXPANSION = NO
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
|
||||
# the macro expansion is limited to the macros specified with the PREDEFINED and
|
||||
@@ -2177,7 +2200,7 @@ EXPAND_AS_DEFINED =
|
||||
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
|
||||
#---------------------------------------------------------------------------O
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -2194,15 +2217,17 @@ SKIP_FUNCTION_MACROS = YES
|
||||
# the path). If a tag file is not located in the directory in which doxygen is
|
||||
# run, you must also specify the path to the tagfile here.
|
||||
|
||||
TAGFILES = @QDOC_TAG_DIR@/qtcore/qtcore.tags=https://doc.qt.io/qt-5/ \
|
||||
@QDOC_TAG_DIR@/qtgui/qtgui.tags=https://doc.qt.io/qt-5/ \
|
||||
@QDOC_TAG_DIR@/qtwidgets/qtwidgets.tags=https://doc.qt.io/qt-5/
|
||||
TAGFILES = "@QDOC_TAG_DIR@/qtcore/qtcore.tags=https://doc.qt.io/qt-5/" \
|
||||
"@QDOC_TAG_DIR@/qtgui/qtgui.tags=https://doc.qt.io/qt-5/" \
|
||||
"@QDOC_TAG_DIR@/qtwidgets/qtwidgets.tags=https://doc.qt.io/qt-5/" \
|
||||
"@QDOC_TAG_DIR@/qtprintsupport/qtprintsupport.tags=https://doc.qt.io/qt-5/" \
|
||||
"@QDOC_TAG_DIR@/qtxml/qtxml.tags=https://doc.qt.io/qt-5/"
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
|
||||
# tag file that is based on the input files it reads. See section "Linking to
|
||||
# external documentation" for more information about the usage of tag files.
|
||||
|
||||
GENERATE_TAGFILE = kddockwidgets.tag
|
||||
GENERATE_TAGFILE = "@DOXYGEN_OUTPUT_DIR@/kddockwidgets.tags"
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
|
||||
# the class index. If set to NO, only the inherited external classes will be
|
||||
@@ -2403,7 +2428,7 @@ GRAPHICAL_HIERARCHY = YES
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DIRECTORY_GRAPH = NO
|
||||
DIRECTORY_GRAPH = YES
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot. For an explanation of the image formats see the section
|
||||
@@ -2468,7 +2493,7 @@ PLANTUML_JAR_PATH =
|
||||
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
|
||||
# configuration file for plantuml.
|
||||
|
||||
#TOO NEW PLANTUML_CFG_FILE =
|
||||
PLANTUML_CFG_FILE =
|
||||
|
||||
# When using plantuml, the specified paths are searched for files specified by
|
||||
# the !include statement in a plantuml block.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<hr>
|
||||
<div style="float: left;">
|
||||
<img src="kdab-logo-16x16.png">
|
||||
<font style="font-weight: bold;">Klarälvdalens Datakonsult AB (KDAB)</font>
|
||||
<font style="font-weight: bold;">© 2019-2023 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>
|
||||
@@ -12,7 +12,8 @@
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -17,23 +17,23 @@ 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)
|
||||
# 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_example.qrc)
|
||||
|
||||
add_executable(kddockwidgets_example
|
||||
add_executable(
|
||||
kddockwidgets_example
|
||||
${RESOURCES_EXAMPLE_SRC}
|
||||
main.cpp
|
||||
MyFrameworkWidgetFactory.cpp
|
||||
MyMainWindow.cpp
|
||||
MyWidget.cpp
|
||||
${RESOURCES_EXAMPLE_SRC}
|
||||
)
|
||||
|
||||
target_link_libraries(kddockwidgets_example
|
||||
PRIVATE
|
||||
KDAB::kddockwidgets
|
||||
target_link_libraries(
|
||||
kddockwidgets_example
|
||||
PRIVATE KDAB::kddockwidgets
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -10,8 +10,14 @@
|
||||
*/
|
||||
|
||||
#include "MyFrameworkWidgetFactory.h"
|
||||
#include "MyTitleBar_CSS.h"
|
||||
|
||||
#include <kddockwidgets/FrameworkWidgetFactory.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>
|
||||
|
||||
@@ -56,7 +62,7 @@ public:
|
||||
f.setPixelSize(30);
|
||||
f.setBold(true);
|
||||
p.setFont(f);
|
||||
p.drawText(QPoint(10,40), title());
|
||||
p.drawText(QPoint(10, 40), title());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -82,18 +88,19 @@ 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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Layouting::Separator * CustomWidgetFactory::createSeparator(Layouting::Widget *parent) const
|
||||
Layouting::Separator *CustomWidgetFactory::createSeparator(Layouting::Widget *parent) const
|
||||
{
|
||||
return new MySeparator(parent);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "MyMainWindow.h"
|
||||
#include "MyWidget.h"
|
||||
|
||||
#include <kddockwidgets/Config.h>
|
||||
#include <kddockwidgets/LayoutSaver.h>
|
||||
|
||||
#include <QMenu>
|
||||
@@ -20,9 +21,7 @@
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
#include <QTextEdit>
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
#include <QRandomGenerator>
|
||||
#endif
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
@@ -33,12 +32,7 @@
|
||||
|
||||
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;
|
||||
#endif
|
||||
|
||||
if (randomNumber < 50) {
|
||||
if (randomNumber < 33) {
|
||||
return new MyWidget1();
|
||||
@@ -52,24 +46,25 @@ static MyWidget *newMyWidget()
|
||||
|
||||
MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
||||
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
||||
bool maxSizeForDockWidget8,
|
||||
bool maxSizeForDockWidget8, bool dockwidget5DoesntCloseBeforeRestore,
|
||||
bool dock0BlocksCloseEvent,
|
||||
const QString &affinityName, QWidget *parent)
|
||||
: MainWindow(uniqueName, options, parent)
|
||||
, m_dockWidget0IsNonClosable(dockWidget0IsNonClosable)
|
||||
, m_dockWidget9IsNonDockable(nonDockableDockWidget9)
|
||||
, m_restoreIsRelative(restoreIsRelative)
|
||||
, m_maxSizeForDockWidget8(maxSizeForDockWidget8)
|
||||
, m_dockwidget5DoesntCloseBeforeRestore(dockwidget5DoesntCloseBeforeRestore)
|
||||
, m_dock0BlocksCloseEvent(dock0BlocksCloseEvent)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
|
||||
qsrand(time(nullptr));
|
||||
#endif
|
||||
|
||||
// qApp->installEventFilter(this);
|
||||
auto menubar = menuBar();
|
||||
auto fileMenu = new QMenu(QStringLiteral("File"));
|
||||
m_toggleMenu = new QMenu(QStringLiteral("Toggle"));
|
||||
auto fileMenu = new QMenu(QStringLiteral("File"), this);
|
||||
m_toggleMenu = new QMenu(QStringLiteral("Toggle"), this);
|
||||
auto miscMenu = new QMenu(QStringLiteral("Misc"), this);
|
||||
|
||||
menubar->addMenu(fileMenu);
|
||||
menubar->addMenu(m_toggleMenu);
|
||||
menubar->addMenu(miscMenu);
|
||||
|
||||
QAction *newAction = fileMenu->addAction(QStringLiteral("New DockWidget"));
|
||||
|
||||
@@ -113,8 +108,22 @@ MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowO
|
||||
auto quitAction = fileMenu->addAction(QStringLiteral("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 });
|
||||
createDockWidgets();
|
||||
|
||||
if (options & KDDockWidgets::MainWindowOption_HasCentralWidget) {
|
||||
setPersistentCentralWidget(new MyWidget1());
|
||||
}
|
||||
|
||||
// optional, just for demo purposes regarding pressing Ctrl key to hide drop indicators
|
||||
qApp->installEventFilter(this);
|
||||
}
|
||||
|
||||
MyMainWindow::~MyMainWindow()
|
||||
@@ -133,7 +142,6 @@ void MyMainWindow::createDockWidgets()
|
||||
for (int i = 0; i < numDockWidgets; i++)
|
||||
m_dockwidgets << newDockWidget();
|
||||
|
||||
|
||||
// MainWindow::addDockWidget() attaches a dock widget to the main window:
|
||||
addDockWidget(m_dockwidgets.at(0), KDDockWidgets::Location_OnTop);
|
||||
|
||||
@@ -164,13 +172,18 @@ KDDockWidgets::DockWidgetBase *MyMainWindow::newDockWidget()
|
||||
|
||||
// Passing options is optional, we just want to illustrate Option_NotClosable here
|
||||
KDDockWidgets::DockWidget::Options options = KDDockWidgets::DockWidget::Option_None;
|
||||
KDDockWidgets::DockWidget::LayoutSaverOptions layoutSaverOptions = KDDockWidgets::DockWidget::LayoutSaverOption::None;
|
||||
|
||||
if (count == 0 && m_dockWidget0IsNonClosable)
|
||||
options |= KDDockWidgets::DockWidget::Option_NotClosable;
|
||||
|
||||
if (count == 9 && m_dockWidget9IsNonDockable)
|
||||
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
|
||||
|
||||
if (count == 1)
|
||||
@@ -182,6 +195,9 @@ KDDockWidgets::DockWidgetBase *MyMainWindow::newDockWidget()
|
||||
myWidget->setMaximumSize(200, 200);
|
||||
}
|
||||
|
||||
if (count == 0 && m_dock0BlocksCloseEvent)
|
||||
myWidget->blockCloseEvent();
|
||||
|
||||
dock->setWidget(myWidget);
|
||||
|
||||
if (dock->options() & KDDockWidgets::DockWidget::Option_NotDockable) {
|
||||
@@ -192,7 +208,31 @@ KDDockWidgets::DockWidgetBase *MyMainWindow::newDockWidget()
|
||||
|
||||
dock->resize(600, 600);
|
||||
m_toggleMenu->addAction(dock->toggleAction());
|
||||
dock->toggleAction()->setShortcut(QStringLiteral("ctrl+%1").arg(count));
|
||||
|
||||
count++;
|
||||
return dock;
|
||||
}
|
||||
|
||||
bool MyMainWindow::eventFilter(QObject *obj, QEvent *ev)
|
||||
{
|
||||
// This event filter is just for examplify how to use the KDDW API to hide
|
||||
// the drag indicators when ctrl is pressed
|
||||
|
||||
switch (ev->type()) {
|
||||
case QEvent::KeyPress:
|
||||
case QEvent::KeyRelease: {
|
||||
auto kev = static_cast<QKeyEvent *>(ev);
|
||||
if (kev->key() == Qt::Key_Control && qobject_cast<QWindow *>(obj)) {
|
||||
const bool hideIndicators = ev->type() == QEvent::KeyPress;
|
||||
KDDockWidgets::Config::self().setDropIndicatorsInhibited(hideIndicators);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return KDDockWidgets::MainWindow::eventFilter(obj, ev);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -20,18 +20,21 @@ class MyMainWindow : public KDDockWidgets::MainWindow
|
||||
public:
|
||||
explicit MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
||||
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
||||
bool maxSizeForDockWidget8,
|
||||
bool maxSizeForDockWidget8, bool dockwidget5DoesntCloseBeforeRestore, bool dock0BlocksCloseEvent,
|
||||
const QString &affinityName = {}, // Usually not needed. Just here to show the feature.
|
||||
QWidget *parent = nullptr);
|
||||
~MyMainWindow() override;
|
||||
|
||||
private:
|
||||
void createDockWidgets();
|
||||
KDDockWidgets::DockWidgetBase* newDockWidget();
|
||||
bool eventFilter(QObject *obj, QEvent *ev) override;
|
||||
KDDockWidgets::DockWidgetBase *newDockWidget();
|
||||
QMenu *m_toggleMenu = nullptr;
|
||||
const bool m_dockWidget0IsNonClosable;
|
||||
const bool m_dockWidget9IsNonDockable;
|
||||
const bool m_restoreIsRelative;
|
||||
const bool m_maxSizeForDockWidget8;
|
||||
const bool m_dockwidget5DoesntCloseBeforeRestore;
|
||||
const bool m_dock0BlocksCloseEvent;
|
||||
KDDockWidgets::DockWidget::List m_dockwidgets;
|
||||
};
|
||||
|
||||
86
examples/dockwidgets/MyTitleBar_CSS.h
Normal file
86
examples/dockwidgets/MyTitleBar_CSS.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2023 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 EXAMPLETITLEBAR_CSS_H
|
||||
#define EXAMPLETITLEBAR_CSS_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#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()
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QLineEdit>
|
||||
#include <QCloseEvent>
|
||||
|
||||
static QHash<QString, QImage> s_images; /// clazy:exclude=non-pod-global-static
|
||||
|
||||
@@ -65,11 +66,25 @@ void MyWidget::drawLogo(QPainter &p)
|
||||
: int(maxHeight / ratio);
|
||||
|
||||
const int height = int(width * ratio);
|
||||
QRect targetLogoRect(0,0, width, height);
|
||||
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());
|
||||
}
|
||||
|
||||
void MyWidget::blockCloseEvent()
|
||||
{
|
||||
m_blocksCloseEvent = true;
|
||||
}
|
||||
|
||||
void MyWidget::closeEvent(QCloseEvent *ev)
|
||||
{
|
||||
if (m_blocksCloseEvent) {
|
||||
ev->ignore();
|
||||
} else {
|
||||
QWidget::closeEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
MyWidget1::MyWidget1(MyWidget::QWidget *parent)
|
||||
: MyWidget(QStringLiteral(":/assets/triangles.png"), QStringLiteral(":/assets/KDAB_bubble_white.png"), parent)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -26,10 +26,16 @@ class MyWidget : public QWidget
|
||||
public:
|
||||
explicit MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent = nullptr);
|
||||
~MyWidget();
|
||||
|
||||
// These two are just for demonstrating how to block the close event, if desired
|
||||
void blockCloseEvent();
|
||||
void closeEvent(QCloseEvent *) override;
|
||||
|
||||
protected:
|
||||
void drawLogo(QPainter &);
|
||||
QImage m_background;
|
||||
QImage m_logo;
|
||||
bool m_blocksCloseEvent = false;
|
||||
};
|
||||
|
||||
class MyWidget1 : public MyWidget
|
||||
@@ -37,8 +43,9 @@ class MyWidget1 : public MyWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MyWidget1(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
};
|
||||
|
||||
class MyWidget2 : public MyWidget
|
||||
@@ -46,8 +53,9 @@ class MyWidget2 : public MyWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MyWidget2(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
};
|
||||
|
||||
class MyWidget3 : public MyWidget
|
||||
@@ -55,8 +63,9 @@ class MyWidget3 : public MyWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MyWidget3(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
QImage m_triangle;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "MyMainWindow.h"
|
||||
#include "MyFrameworkWidgetFactory.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <kddockwidgets/Config.h>
|
||||
|
||||
#include <QStyleFactory>
|
||||
@@ -111,6 +112,34 @@ int main(int argc, char **argv)
|
||||
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 blockCloseEvent("block-close-event",
|
||||
QCoreApplication::translate("main", "DockWidget #0 will block close events"));
|
||||
parser.addOption(blockCloseEvent);
|
||||
|
||||
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);
|
||||
|
||||
QCommandLineOption hideCertainDockingIndicators("hide-certain-docking-indicators",
|
||||
QCoreApplication::translate("main", "Illustrates usage of Config::setDropIndicatorAllowedFunc()"));
|
||||
parser.addOption(hideCertainDockingIndicators);
|
||||
|
||||
#if defined(DOCKS_DEVELOPER_MODE)
|
||||
parser.addOption(centralFrame);
|
||||
|
||||
@@ -124,10 +153,10 @@ int main(int argc, char **argv)
|
||||
parser.addOption(nativeTitleBar);
|
||||
parser.addOption(noDropIndicators);
|
||||
|
||||
# if defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QCommandLineOption noAeroSnap("no-aero-snap", QCoreApplication::translate("main", "(internal) Disable AeroSnap"));
|
||||
parser.addOption(noAeroSnap);
|
||||
# endif
|
||||
#endif
|
||||
#else
|
||||
Q_UNUSED(centralFrame)
|
||||
#endif
|
||||
@@ -152,6 +181,9 @@ int main(int argc, char **argv)
|
||||
options = parser.isSet(centralFrame) ? MainWindowOption_HasCentralFrame
|
||||
: MainWindowOption_None;
|
||||
|
||||
if (parser.isSet(centralWidget))
|
||||
options |= MainWindowOption_HasCentralWidget;
|
||||
|
||||
if (parser.isSet(noQtTool))
|
||||
internalFlags |= KDDockWidgets::Config::InternalFlag_DontUseQtToolWindowsForFloatingWindows;
|
||||
|
||||
@@ -167,16 +199,22 @@ int main(int argc, char **argv)
|
||||
if (parser.isSet(noDropIndicators))
|
||||
KDDockWidgets::DefaultWidgetFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::None;
|
||||
|
||||
# if defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_WIN)
|
||||
if (parser.isSet(noAeroSnap))
|
||||
internalFlags |= KDDockWidgets::Config::InternalFlag_NoAeroSnap;
|
||||
# endif
|
||||
#endif
|
||||
Config::self().setInternalFlags(internalFlags);
|
||||
#endif
|
||||
|
||||
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))
|
||||
flags |= KDDockWidgets::Config::Flag_HideTitleBarWhenTabsVisible;
|
||||
|
||||
@@ -212,6 +250,9 @@ int main(int argc, char **argv)
|
||||
if (parser.isSet(tabsHaveCloseButton))
|
||||
flags |= KDDockWidgets::Config::Flag_TabsHaveCloseButton;
|
||||
|
||||
if (parser.isSet(ctxtMenuOnTabs))
|
||||
flags |= KDDockWidgets::Config::Flag_AllowSwitchingTabsViaMenu;
|
||||
|
||||
|
||||
if (parser.isSet(doubleClickMaximize))
|
||||
flags |= KDDockWidgets::Config::Flag_DoubleClickMaximizes;
|
||||
@@ -221,13 +262,35 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (parser.isSet(hideCertainDockingIndicators)) {
|
||||
// Here we exemplify adding a restriction to "Dock Widget 8"
|
||||
// Dock widget 8 will only be allowed to dock to the outer areasa
|
||||
auto func = [](KDDockWidgets::DropLocation location,
|
||||
const KDDockWidgets::DockWidgetBase::List &source,
|
||||
const KDDockWidgets::DockWidgetBase::List &target,
|
||||
KDDockWidgets::DropArea *) {
|
||||
Q_UNUSED(target); // When dragging into a tab, 'target' would have the list of already tabbed dock widgets
|
||||
|
||||
const bool isDraggingDW8 = std::find_if(source.cbegin(), source.cend(), [](KDDockWidgets::DockWidgetBase *dw) {
|
||||
return dw->uniqueName() == QLatin1String("DockWidget #8");
|
||||
})
|
||||
!= source.cend();
|
||||
|
||||
return (location & KDDockWidgets::DropLocation_Outter) || !isDraggingDW8;
|
||||
};
|
||||
|
||||
KDDockWidgets::Config::self().setDropIndicatorAllowedFunc(func);
|
||||
}
|
||||
|
||||
KDDockWidgets::Config::self().setFlags(flags);
|
||||
|
||||
const bool nonClosableDockWidget0 = parser.isSet(nonClosableDockWidget);
|
||||
const bool restoreIsRelative = parser.isSet(relativeRestore);
|
||||
const bool nonDockableDockWidget9 = parser.isSet(nonDockable);
|
||||
const bool maxSizeForDockWidget8 = parser.isSet(maxSizeOption);
|
||||
const bool dontCloseDockWidget5BeforeRestore = parser.isSet(dontCloseBeforeRestore);
|
||||
const bool usesMainWindowsWithAffinity = parser.isSet(multipleMainWindows);
|
||||
const bool dock0BlocksCloseEvent = parser.isSet(blockCloseEvent);
|
||||
|
||||
#ifdef KDDOCKWIDGETS_SUPPORTS_NESTED_MAINWINDOWS
|
||||
const bool usesDockableMainWindows = parser.isSet(dockableMainWindows);
|
||||
@@ -236,7 +299,8 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
MyMainWindow mainWindow(QStringLiteral("MyMainWindow"), options, nonClosableDockWidget0,
|
||||
nonDockableDockWidget9, restoreIsRelative, maxSizeForDockWidget8);
|
||||
nonDockableDockWidget9, restoreIsRelative, maxSizeForDockWidget8,
|
||||
dontCloseDockWidget5BeforeRestore, dock0BlocksCloseEvent);
|
||||
mainWindow.setWindowTitle("Main Window 1");
|
||||
mainWindow.resize(1200, 1200);
|
||||
mainWindow.show();
|
||||
@@ -254,7 +318,8 @@ int main(int argc, char **argv)
|
||||
|
||||
auto mainWindow2 = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
||||
nonClosableDockWidget0, nonDockableDockWidget9,
|
||||
restoreIsRelative, maxSizeForDockWidget8, affinity);
|
||||
restoreIsRelative, maxSizeForDockWidget8,
|
||||
dontCloseDockWidget5BeforeRestore, dock0BlocksCloseEvent, affinity);
|
||||
if (affinity.isEmpty())
|
||||
mainWindow2->setWindowTitle("Main Window 2");
|
||||
else
|
||||
@@ -267,7 +332,8 @@ int main(int argc, char **argv)
|
||||
|
||||
const QString affinity = QStringLiteral("Inner-DockWidgets-2");
|
||||
auto dockableMainWindow = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
||||
false, false, restoreIsRelative, false, affinity);
|
||||
false, false, restoreIsRelative, false,
|
||||
false, false, affinity);
|
||||
|
||||
dockableMainWindow->setAffinities({ affinity });
|
||||
|
||||
|
||||
38
examples/mdi_with_docking/CMakeLists.txt
Normal file
38
examples/mdi_with_docking/CMakeLists.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2023 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_mdi_with_docking_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)
|
||||
|
||||
# Just to reuse MyWidget.h
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/)
|
||||
|
||||
add_executable(
|
||||
kddockwidgets_mdi_with_docking_example
|
||||
${RESOURCES_EXAMPLE_SRC} ../dockwidgets/MyWidget.cpp main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
kddockwidgets_mdi_with_docking_example
|
||||
PRIVATE KDAB::kddockwidgets
|
||||
)
|
||||
95
examples/mdi_with_docking/main.cpp
Normal file
95
examples/mdi_with_docking/main.cpp
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2023 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 <kddockwidgets/MDIArea.h>
|
||||
|
||||
#include <QStyleFactory>
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
|
||||
// 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("App supporting both docking and a MDI area"));
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription("KDDockWidgets MDI mixed with normal docking");
|
||||
parser.addHelpOption();
|
||||
|
||||
QCommandLineOption nestedDocking("n", QCoreApplication::translate("main", "The MDI dock widgets will serve as drop areas, allowing for further nesting"));
|
||||
parser.addOption(nestedDocking);
|
||||
|
||||
parser.process(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"), KDDockWidgets::MainWindowOption_HasCentralWidget);
|
||||
mainWindow.setWindowTitle("Main Window");
|
||||
mainWindow.resize(1600, 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);
|
||||
|
||||
// # 3. Dock them
|
||||
mainWindow.addDockWidget(dock1, KDDockWidgets::Location_OnLeft, nullptr, KDDockWidgets::InitialOption(QSize(300, 0)));
|
||||
mainWindow.addDockWidget(dock2, KDDockWidgets::Location_OnBottom, nullptr, KDDockWidgets::InitialOption(QSize(0, 300)));
|
||||
|
||||
KDDockWidgets::DockWidgetBase::Options options = {};
|
||||
if (parser.isSet(nestedDocking)) {
|
||||
options |= KDDockWidgets::DockWidgetBase::Option_MDINestable;
|
||||
}
|
||||
|
||||
// 4. Create our MDI widgets, which will go into the MDI area
|
||||
auto mdiWidget1 = new KDDockWidgets::DockWidget(QStringLiteral("MDI widget1"), options);
|
||||
mdiWidget1->setWidget(new MyWidget1());
|
||||
|
||||
auto mdiWidget2 = new KDDockWidgets::DockWidget(QStringLiteral("MDI widget2"), options);
|
||||
mdiWidget2->setWidget(new MyWidget2());
|
||||
|
||||
auto mdiWidget3 = new KDDockWidgets::DockWidget(QStringLiteral("MDI widget3"), options);
|
||||
auto widget3 = new MyWidget3();
|
||||
mdiWidget3->setWidget(widget3);
|
||||
|
||||
// Just for my personal testing: Overkill to add an option
|
||||
// widget3->blockCloseEvent();
|
||||
|
||||
auto mdiArea = new KDDockWidgets::MDIArea();
|
||||
mainWindow.setPersistentCentralWidget(mdiArea);
|
||||
|
||||
mdiArea->addDockWidget(mdiWidget1, QPoint(10, 10));
|
||||
mdiArea->addDockWidget(mdiWidget2, QPoint(50, 50));
|
||||
mdiArea->addDockWidget(mdiWidget3, QPoint(110, 110));
|
||||
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
38
examples/minimal-mdi/CMakeLists.txt
Normal file
38
examples/minimal-mdi/CMakeLists.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2023 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)
|
||||
|
||||
# Just to reuse MyWidget.h
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/)
|
||||
|
||||
add_executable(
|
||||
kddockwidgets_minimal_mdi_example
|
||||
${RESOURCES_EXAMPLE_SRC} ../dockwidgets/MyWidget.cpp main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
kddockwidgets_minimal_mdi_example
|
||||
PRIVATE KDAB::kddockwidgets
|
||||
)
|
||||
65
examples/minimal-mdi/main.cpp
Normal file
65
examples/minimal-mdi/main.cpp
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2023 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);
|
||||
|
||||
// Just for my personal testing: Overkill to add an option
|
||||
// widget3->blockCloseEvent();
|
||||
|
||||
// # 3. Dock them
|
||||
mainWindow.addDockWidget(dock1, QPoint(10, 10));
|
||||
mainWindow.addDockWidget(dock2, QPoint(50, 50));
|
||||
mainWindow.addDockWidget(dock3, QPoint(90, 90));
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -17,21 +17,19 @@ 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)
|
||||
# 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}
|
||||
add_executable(
|
||||
kddockwidgets_minimal_example
|
||||
${RESOURCES_EXAMPLE_SRC} ../dockwidgets/MyWidget.cpp main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(kddockwidgets_minimal_example
|
||||
PRIVATE
|
||||
KDAB::kddockwidgets
|
||||
target_link_libraries(
|
||||
kddockwidgets_minimal_example
|
||||
PRIVATE KDAB::kddockwidgets
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -65,7 +65,7 @@ void MyWidget::drawLogo(QPainter &p)
|
||||
: int(maxHeight / ratio);
|
||||
|
||||
const int height = int(width * ratio);
|
||||
QRect targetLogoRect(0,0, width, height);
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -27,6 +27,7 @@ public:
|
||||
MyWidget() = default;
|
||||
explicit MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent = nullptr);
|
||||
~MyWidget();
|
||||
|
||||
protected:
|
||||
void drawLogo(QPainter &);
|
||||
QImage m_background;
|
||||
@@ -38,8 +39,9 @@ class MyWidget1 : public MyWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MyWidget1(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
};
|
||||
|
||||
class MyWidget2 : public MyWidget
|
||||
@@ -47,8 +49,9 @@ class MyWidget2 : public MyWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MyWidget2(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
};
|
||||
|
||||
class MyWidget3 : public MyWidget
|
||||
@@ -56,8 +59,9 @@ class MyWidget3 : public MyWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MyWidget3(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
QImage m_triangle;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -75,7 +75,7 @@ int main(int argc, char **argv)
|
||||
mainWindow.addDockWidget(dock3, KDDockWidgets::Location_OnRight, dock2);
|
||||
|
||||
// 5. dock4 is docked at the bottom, with 200px height
|
||||
const QSize preferredSize(QSize(/*ignored*/0, 200));
|
||||
const QSize preferredSize(QSize(/*ignored*/ 0, 200));
|
||||
mainWindow.addDockWidget(dock4, KDDockWidgets::Location_OnBottom, nullptr, preferredSize);
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2020-2023 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
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
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)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# SPDX-FileCopyrightText: 2019-2023 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
|
||||
@@ -17,21 +17,21 @@ 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)
|
||||
# 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}
|
||||
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_example.qrc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc
|
||||
)
|
||||
|
||||
target_link_libraries(kddockwidgets_customtitlebar_quick
|
||||
PRIVATE
|
||||
KDAB::kddockwidgets
|
||||
add_executable(
|
||||
kddockwidgets_customtitlebar_quick
|
||||
${RESOURCES_EXAMPLE_SRC} main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
kddockwidgets_customtitlebar_quick
|
||||
PRIVATE KDAB::kddockwidgets
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2020-2023 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2020-2023 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2020-2023 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2020-2023 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
SPDX-FileCopyrightText: 2020-2023 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user