Compare commits
1183 Commits
python38
...
wip/gtk_wi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8d977c240 | ||
|
|
6385d252e4 | ||
|
|
18253c467c | ||
|
|
71c221981e | ||
|
|
579cd3a201 | ||
|
|
fae03328f6 | ||
|
|
a113a428e7 | ||
|
|
d4e020eb4a | ||
|
|
53c65c6129 | ||
|
|
b60e3ef4c9 | ||
|
|
3764feaf89 | ||
|
|
f1959e5e16 | ||
|
|
084947612b | ||
|
|
7f71efd5f8 | ||
|
|
fc04dc77c4 | ||
|
|
c960673de4 | ||
|
|
7d08925ea2 | ||
|
|
688139cd38 | ||
|
|
ab40c02b56 | ||
|
|
710f71e7f0 | ||
|
|
02847c74bd | ||
|
|
4e6b49f876 | ||
|
|
d12def7baa | ||
|
|
d28dc745bc | ||
|
|
ad8e14ceff | ||
|
|
f9debe5f09 | ||
|
|
ed52e6a955 | ||
|
|
b52b1335a6 | ||
|
|
eaa474e76f | ||
|
|
fedce40883 | ||
|
|
5894fd54f5 | ||
|
|
d788cde263 | ||
|
|
1051e859f4 | ||
|
|
2fa9c06f9a | ||
|
|
d8e0be874b | ||
|
|
296de10571 | ||
|
|
4691f9bfa5 | ||
|
|
9ae0ab294c | ||
|
|
760fc8d0fb | ||
|
|
62020a3ff9 | ||
|
|
e7c51aabd3 | ||
|
|
e83996b402 | ||
|
|
c7dd7d954f | ||
|
|
64a4ad5029 | ||
|
|
7e051d5e71 | ||
|
|
0d82880ea7 | ||
|
|
0f66fe853d | ||
|
|
fe18f994ac | ||
|
|
025c49c583 | ||
|
|
a5e7b94da1 | ||
|
|
77e19fa5bd | ||
|
|
8ad64e5e6f | ||
|
|
8b3a17d629 | ||
|
|
2666ed3f5e | ||
|
|
68e9f4bcea | ||
|
|
ecb2c4ff47 | ||
|
|
37688e1874 | ||
|
|
adcde3a65c | ||
|
|
1f7c1e4188 | ||
|
|
35c9ccdd6a | ||
|
|
518724132b | ||
|
|
b784780428 | ||
|
|
6ebb680c92 | ||
|
|
ceab323916 | ||
|
|
92b49f78a9 | ||
|
|
8e7e68eddc | ||
|
|
1c21555767 | ||
|
|
2f6d618048 | ||
|
|
f9b806ede5 | ||
|
|
8894572174 | ||
|
|
2c924a3a82 | ||
|
|
640ef58553 | ||
|
|
897e0debca | ||
|
|
233736a20b | ||
|
|
e3c08593b9 | ||
|
|
f6315ba4c0 | ||
|
|
1bb3e5de37 | ||
|
|
54a29b5cae | ||
|
|
800d97c352 | ||
|
|
2f9f2c9ba6 | ||
|
|
ba7afe20b0 | ||
|
|
146338c9f4 | ||
|
|
0b5b06dc5a | ||
|
|
460b898bea | ||
|
|
b3e398c530 | ||
|
|
6e5cfd70d1 | ||
|
|
4afc6b62b2 | ||
|
|
0785408a5c | ||
|
|
2c5df301d8 | ||
|
|
a0aef05b2d | ||
|
|
3364d8ba76 | ||
|
|
b5d1b6d02f | ||
|
|
d958e1cc70 | ||
|
|
9a8539fa42 | ||
|
|
5386d44fdb | ||
|
|
019692fd2f | ||
|
|
448313b1e3 | ||
|
|
b1605cc58b | ||
|
|
8383b227aa | ||
|
|
cd41697ee6 | ||
|
|
4e99b44823 | ||
|
|
54802ed856 | ||
|
|
ddf6847d4e | ||
|
|
572b62aa9a | ||
|
|
b74ca53ac8 | ||
|
|
6f177bc2df | ||
|
|
74e9cc94e6 | ||
|
|
8edf8737ce | ||
|
|
b6460c11f7 | ||
|
|
d75e691795 | ||
|
|
b68e348ff3 | ||
|
|
54ad9ec2f2 | ||
|
|
9283a55364 | ||
|
|
35c1517709 | ||
|
|
7b9bde123b | ||
|
|
7b780bc7e9 | ||
|
|
84da42c262 | ||
|
|
1bcd425849 | ||
|
|
aafa9526f6 | ||
|
|
16565fcd46 | ||
|
|
f288d953fc | ||
|
|
f1fb3f1eac | ||
|
|
70da9cc638 | ||
|
|
c63290e6d3 | ||
|
|
57c311f850 | ||
|
|
0963967939 | ||
|
|
7d21516f6d | ||
|
|
ba71ad7407 | ||
|
|
8af8c603c1 | ||
|
|
d461c41d8b | ||
|
|
edb2538220 | ||
|
|
5639b5632a | ||
|
|
c72fdf3586 | ||
|
|
a690477b73 | ||
|
|
3638622c48 | ||
|
|
7fc7fba697 | ||
|
|
e7a4b3ecdd | ||
|
|
5977ffcc1c | ||
|
|
16f6a0f35c | ||
|
|
3845f8cfae | ||
|
|
9546e55cb0 | ||
|
|
5407e23d31 | ||
|
|
99240a2f4e | ||
|
|
d7f677c8fc | ||
|
|
1d0a304d2b | ||
|
|
bf6e8886b1 | ||
|
|
cadd94c233 | ||
|
|
a99c3e1b70 | ||
|
|
214e7d2013 | ||
|
|
219ad5be01 | ||
|
|
199ad09185 | ||
|
|
e60d535242 | ||
|
|
f3532e6ea0 | ||
|
|
cba3f77906 | ||
|
|
91e2df3ead | ||
|
|
fd4431246c | ||
|
|
2f12cd8f3d | ||
|
|
3ef91d8b7f | ||
|
|
558eef792f | ||
|
|
269e062609 | ||
|
|
2eb72114d7 | ||
|
|
a0d5c25c29 | ||
|
|
934ba440b3 | ||
|
|
aff9806ab1 | ||
|
|
0cd515679f | ||
|
|
5a657785d7 | ||
|
|
39274d3e6b | ||
|
|
d92691bc5c | ||
|
|
83a2620015 | ||
|
|
3dd455bfb7 | ||
|
|
5389bcc825 | ||
|
|
49ccecbadd | ||
|
|
64619d85e9 | ||
|
|
1e5cbed254 | ||
|
|
0e6f38381b | ||
|
|
cad7cb1c8f | ||
|
|
696ce887a8 | ||
|
|
0a496aca76 | ||
|
|
68403c866b | ||
|
|
5669e07252 | ||
|
|
07524ad00c | ||
|
|
2f261b6b70 | ||
|
|
ff9a7fba69 | ||
|
|
d43c68bef4 | ||
|
|
5dbf3590f8 | ||
|
|
6ff0a5d759 | ||
|
|
2ee9debb66 | ||
|
|
9aab0af1dc | ||
|
|
820161ba29 | ||
|
|
0024ed54c8 | ||
|
|
f08efcdab7 | ||
|
|
3b8e3b6c6b | ||
|
|
c1f6d64ac3 | ||
|
|
a74d2aae7a | ||
|
|
113cdbafe9 | ||
|
|
c9fede2aab | ||
|
|
f640d8852b | ||
|
|
8f10d86cad | ||
|
|
02ef55f9f1 | ||
|
|
6cd6408bef | ||
|
|
7ec71d65be | ||
|
|
8ad2ece8b9 | ||
|
|
7cc63926d4 | ||
|
|
6184b06d12 | ||
|
|
559a195669 | ||
|
|
95d711ece7 | ||
|
|
74a1520382 | ||
|
|
31ba0ec52d | ||
|
|
10f70c8dd6 | ||
|
|
452a89bfa2 | ||
|
|
5b7630b318 | ||
|
|
82b3aba854 | ||
|
|
0a9506cd21 | ||
|
|
10c918b93c | ||
|
|
2ac996218f | ||
|
|
429bcfc4e0 | ||
|
|
ae5cf1d723 | ||
|
|
4ba58ac1be | ||
|
|
cc918c5195 | ||
|
|
bc767cefac | ||
|
|
0aec6dfdb1 | ||
|
|
9469273c7a | ||
|
|
fe7a8d450c | ||
|
|
e9eee0e69e | ||
|
|
d2339d1b12 | ||
|
|
b45644af74 | ||
|
|
73d627554a | ||
|
|
e980dc9bb1 | ||
|
|
b9773cd262 | ||
|
|
47ad860921 | ||
|
|
a2f0e2e689 | ||
|
|
1c6c7e767f | ||
|
|
1b1d963d3e | ||
|
|
da70b1baed | ||
|
|
2dff66fb97 | ||
|
|
a44886279b | ||
|
|
9072555814 | ||
|
|
b599554ba7 | ||
|
|
2b62b1965a | ||
|
|
ea55c74768 | ||
|
|
729624ab04 | ||
|
|
4fa43c7ba1 | ||
|
|
1f95f67a15 | ||
|
|
73fd21939f | ||
|
|
104a065aeb | ||
|
|
7b4e04703d | ||
|
|
a705ccfe5e | ||
|
|
84a8fd61b4 | ||
|
|
724a67f2ef | ||
|
|
d1e29e6773 | ||
|
|
f2ddbd2cc3 | ||
|
|
8a0fa46deb | ||
|
|
28cc64be4a | ||
|
|
4856da3bec | ||
|
|
08518e02e0 | ||
|
|
1e7f0d7c5f | ||
|
|
793661ea09 | ||
|
|
4c177d7823 | ||
|
|
e763cb138a | ||
|
|
6da693c5da | ||
|
|
d1de3a29b4 | ||
|
|
940991c75e | ||
|
|
c0d1bd3f92 | ||
|
|
92192b7949 | ||
|
|
9fda86a511 | ||
|
|
4114f00183 | ||
|
|
848327d8b3 | ||
|
|
44d38f9f84 | ||
|
|
fe7f71d986 | ||
|
|
05b7980cfe | ||
|
|
e2e34fb11b | ||
|
|
1935d3bace | ||
|
|
8767159cc9 | ||
|
|
198bd60565 | ||
|
|
f8b1745c68 | ||
|
|
30f43d7579 | ||
|
|
950914e15c | ||
|
|
bd4aed18c9 | ||
|
|
d47130f0c8 | ||
|
|
f530668711 | ||
|
|
67bb7c16cf | ||
|
|
c30a266c01 | ||
|
|
66b91c1de3 | ||
|
|
4c670a552e | ||
|
|
d5e46dff31 | ||
|
|
3695595826 | ||
|
|
303532483b | ||
|
|
ff92af1e62 | ||
|
|
cd1ce835d7 | ||
|
|
49b2a10cc6 | ||
|
|
a3f7126dfe | ||
|
|
2faecc68c0 | ||
|
|
fe75297a29 | ||
|
|
60c6ffaabb | ||
|
|
408fe315ed | ||
|
|
5ec68ef608 | ||
|
|
c7f33f589e | ||
|
|
942d086905 | ||
|
|
8dbd87ae0d | ||
|
|
f04e813af3 | ||
|
|
a0accacb5d | ||
|
|
1b0bae7780 | ||
|
|
f7bb0c1dbd | ||
|
|
4c4dcf4423 | ||
|
|
7017ce8396 | ||
|
|
9f1a9df621 | ||
|
|
d7b57d460f | ||
|
|
6be5339fd3 | ||
|
|
82d933ad34 | ||
|
|
cae9627e06 | ||
|
|
5a6ceade6c | ||
|
|
e2870dbe4f | ||
|
|
d5471aceb6 | ||
|
|
e63a34a4a5 | ||
|
|
8be6183543 | ||
|
|
1ee5d21d4a | ||
|
|
26ba2199cb | ||
|
|
08d2b6f764 | ||
|
|
7ae49ee330 | ||
|
|
a609f2233b | ||
|
|
d3de373995 | ||
|
|
a5f364da03 | ||
|
|
499c9412bb | ||
|
|
c48a100f73 | ||
|
|
7e7c9d7300 | ||
|
|
0600c42775 | ||
|
|
4a47366ba0 | ||
|
|
a330042339 | ||
|
|
5e2cc2cc12 | ||
|
|
2a6bd9e415 | ||
|
|
1e3acd2a92 | ||
|
|
ab50f0f19b | ||
|
|
1283cc87dc | ||
|
|
c373354c0c | ||
|
|
d2aba705fb | ||
|
|
78815664cc | ||
|
|
e754bb25c6 | ||
|
|
4a3d15432e | ||
|
|
921d94d731 | ||
|
|
01b2bbc11c | ||
|
|
a45f53f9d9 | ||
|
|
3e44e0c9a9 | ||
|
|
63f0bc9e02 | ||
|
|
1c9b44394e | ||
|
|
84315daa1a | ||
|
|
337afd2919 | ||
|
|
126ed773cd | ||
|
|
38432ccacd | ||
|
|
0825a6bdc2 | ||
|
|
cd35f1ff62 | ||
|
|
0c95550af6 | ||
|
|
e1fe8054d0 | ||
|
|
29c675661f | ||
|
|
de917f103a | ||
|
|
95ff95e995 | ||
|
|
9fdf0c2ae1 | ||
|
|
3b2a395668 | ||
|
|
fec58dd217 | ||
|
|
148a25a452 | ||
|
|
e6dd002ca8 | ||
|
|
95acf7a4cb | ||
|
|
73a5809f62 | ||
|
|
627b6a1593 | ||
|
|
755bc6ac14 | ||
|
|
dafa14536f | ||
|
|
a4d337e891 | ||
|
|
44476789c2 | ||
|
|
458ae05564 | ||
|
|
169d2fe8e2 | ||
|
|
4615936f9e | ||
|
|
ebaf0d170f | ||
|
|
040fe14907 | ||
|
|
59013303ac | ||
|
|
4dab634abf | ||
|
|
32b6c3acbe | ||
|
|
91398d5fab | ||
|
|
b596aaf1f4 | ||
|
|
ec56120290 | ||
|
|
8ba160b0f6 | ||
|
|
6a6854ed84 | ||
|
|
8b49eabe95 | ||
|
|
a17f6468cd | ||
|
|
c62b1a5a9b | ||
|
|
2e4c01f604 | ||
|
|
3ab3076263 | ||
|
|
efc42e8d3f | ||
|
|
e49ecc880e | ||
|
|
cfd4e61a3b | ||
|
|
b56cf151fe | ||
|
|
87414585ea | ||
|
|
3b814866e2 | ||
|
|
55620a5d10 | ||
|
|
5a99c8390a | ||
|
|
1f7ac6897c | ||
|
|
24f1f6be33 | ||
|
|
6c589f0500 | ||
|
|
767bbcb251 | ||
|
|
c12da6b6d5 | ||
|
|
ab2b481a80 | ||
|
|
fb844bc989 | ||
|
|
098a368c79 | ||
|
|
1acbf48786 | ||
|
|
e120f6f318 | ||
|
|
a7b6dd5f24 | ||
|
|
5cd46d572e | ||
|
|
0031f1bcfd | ||
|
|
42998971cc | ||
|
|
35f8e3c3f6 | ||
|
|
98a8e67f9b | ||
|
|
6c53777f1b | ||
|
|
02a8da4fb8 | ||
|
|
29fd6f4a40 | ||
|
|
0f6be75620 | ||
|
|
78025d1e34 | ||
|
|
b75a10b9eb | ||
|
|
6aed1508af | ||
|
|
e9c050b659 | ||
|
|
3c9598a560 | ||
|
|
6bded5e832 | ||
|
|
e34b4c4d09 | ||
|
|
3662f30ea4 | ||
|
|
63ff503568 | ||
|
|
1070cbce87 | ||
|
|
a1d62522f3 | ||
|
|
cfd90b6779 | ||
|
|
b184c6f830 | ||
|
|
2aefa9efa0 | ||
|
|
5791198c51 | ||
|
|
a94daba3fc | ||
|
|
8e85e46ee9 | ||
|
|
74dcbd994a | ||
|
|
118fe3d32e | ||
|
|
189fc7356a | ||
|
|
2ef569c114 | ||
|
|
fb31f893ae | ||
|
|
d275226df9 | ||
|
|
a5279b5efd | ||
|
|
81007f629f | ||
|
|
060fe44e71 | ||
|
|
3c13f51017 | ||
|
|
ad9cdad927 | ||
|
|
31992dcb83 | ||
|
|
a5ecfbdd91 | ||
|
|
0929fb1c75 | ||
|
|
4515c85f91 | ||
|
|
230f562cb4 | ||
|
|
3758dc7dda | ||
|
|
464624f2a5 | ||
|
|
0be61b0a1b | ||
|
|
5faf36700b | ||
|
|
995df8e3e8 | ||
|
|
14189dc601 | ||
|
|
9c881ec53e | ||
|
|
581451c342 | ||
|
|
eb198736b8 | ||
|
|
e8f390f2ad | ||
|
|
2beb4982b0 | ||
|
|
46159d88bd | ||
|
|
fbff1ed4a7 | ||
|
|
6bd87113b4 | ||
|
|
7e3a82ed3e | ||
|
|
f9efe2755e | ||
|
|
a88beb7574 | ||
|
|
792aaf76da | ||
|
|
f11a6a6a8c | ||
|
|
6d926ee6e4 | ||
|
|
666d4be478 | ||
|
|
ce88a00b4b | ||
|
|
075a9d30f0 | ||
|
|
ec4e22b5ae | ||
|
|
56ca80e8fc | ||
|
|
ec144472ce | ||
|
|
991ced33f6 | ||
|
|
78357b53a4 | ||
|
|
16529c6704 | ||
|
|
1ead71442f | ||
|
|
a3f2e8ec9a | ||
|
|
a2b5f40ed1 | ||
|
|
d63a9db5a2 | ||
|
|
03a17c3a9d | ||
|
|
0f8823664c | ||
|
|
cdaa03a413 | ||
|
|
e25a940ad1 | ||
|
|
9332eb3bf8 | ||
|
|
84561a9d67 | ||
|
|
f1f722f1ce | ||
|
|
e5b82e0a45 | ||
|
|
6c5f477c31 | ||
|
|
20546acc4e | ||
|
|
87319c69d2 | ||
|
|
dc36435b35 | ||
|
|
ea9bf1ef0f | ||
|
|
adbaedef89 | ||
|
|
2fafef87df | ||
|
|
d06c6e8f11 | ||
|
|
cd88e19648 | ||
|
|
a2f1c1347a | ||
|
|
596c330a77 | ||
|
|
9f96eff663 | ||
|
|
3260c65a6c | ||
|
|
2c8ceb67ef | ||
|
|
982904e2ba | ||
|
|
b2b75cd5bb | ||
|
|
90ad1a7f23 | ||
|
|
f5622732ce | ||
|
|
e74055c1fd | ||
|
|
1acafd8a6c | ||
|
|
529cedfcbf | ||
|
|
affd1d12ae | ||
|
|
300bd89728 | ||
|
|
61fb31b62a | ||
|
|
58f1900b06 | ||
|
|
b6038bd7d7 | ||
|
|
07853bdc4d | ||
|
|
6289e92e54 | ||
|
|
0a1023aa83 | ||
|
|
bc6417c923 | ||
|
|
b201737149 | ||
|
|
c93911016f | ||
|
|
2e92357adc | ||
|
|
8223f462c6 | ||
|
|
b9b8bfc430 | ||
|
|
f9df3c5872 | ||
|
|
9881e0488f | ||
|
|
5a4342c0af | ||
|
|
c244d7628d | ||
|
|
ab830bb6ee | ||
|
|
827008a96a | ||
|
|
340e65df0b | ||
|
|
83cc6f1b0c | ||
|
|
35a44574a0 | ||
|
|
7a21857ea7 | ||
|
|
94afae2729 | ||
|
|
d8e703275f | ||
|
|
08dc12e8d7 | ||
|
|
31d43b6608 | ||
|
|
ab9396af61 | ||
|
|
30ca6769e4 | ||
|
|
22f6f4b2f1 | ||
|
|
b19f2dfbed | ||
|
|
82f3cd9c5f | ||
|
|
567308934e | ||
|
|
4d1add5221 | ||
|
|
c619c72094 | ||
|
|
e2bb4fb830 | ||
|
|
5c0176f35b | ||
|
|
095dbe1a7f | ||
|
|
230317551b | ||
|
|
a48ce5ccff | ||
|
|
10cf965be2 | ||
|
|
39c058cd29 | ||
|
|
2815a5e84a | ||
|
|
08dc4540f8 | ||
|
|
bcb0668ace | ||
|
|
0b36b7c7e8 | ||
|
|
2421e607a9 | ||
|
|
403f0626b4 | ||
|
|
1bb0b13d77 | ||
|
|
1787a69edb | ||
|
|
04b9590d59 | ||
|
|
c36832d71c | ||
|
|
eff711b9ca | ||
|
|
340f618060 | ||
|
|
58c246cedc | ||
|
|
e27f142ec8 | ||
|
|
6d760cb5e1 | ||
|
|
85f02d8ceb | ||
|
|
fe87380d83 | ||
|
|
20c41fa3b1 | ||
|
|
34d4ba6f64 | ||
|
|
bdb5c533f2 | ||
|
|
07bcea1226 | ||
|
|
f645a4345f | ||
|
|
1c0c594abe | ||
|
|
c77b9628b4 | ||
|
|
a3750ea79a | ||
|
|
4cd362dc33 | ||
|
|
812892f3f2 | ||
|
|
2e6924ec43 | ||
|
|
56a871b86b | ||
|
|
8354043337 | ||
|
|
410d893de9 | ||
|
|
406dd19285 | ||
|
|
586ed8d70b | ||
|
|
da8539820e | ||
|
|
267bc4ec79 | ||
|
|
fb8639969c | ||
|
|
5fdbc12524 | ||
|
|
18651bbf7a | ||
|
|
bcaf0737e9 | ||
|
|
ad7f5f5970 | ||
|
|
652286760b | ||
|
|
df0dde80ef | ||
|
|
03f1a6930c | ||
|
|
e20a8ba396 | ||
|
|
73dd788fa1 | ||
|
|
ebb623f080 | ||
|
|
1dde7e3e99 | ||
|
|
fc74698dac | ||
|
|
c554bdc68c | ||
|
|
4a8ac4a309 | ||
|
|
042cabbe5d | ||
|
|
1e1204a991 | ||
|
|
4727c9c7fc | ||
|
|
6c42a2d40e | ||
|
|
f8ca5ca1ef | ||
|
|
a85c56a25a | ||
|
|
ac51ffc7d4 | ||
|
|
c648e5fbba | ||
|
|
6fd88a8570 | ||
|
|
bab0c99d13 | ||
|
|
79ef648a27 | ||
|
|
0f55a2f87a | ||
|
|
87e9cbc388 | ||
|
|
821002ce43 | ||
|
|
ea00ecf33d | ||
|
|
dab7195408 | ||
|
|
349816dab7 | ||
|
|
46968556bb | ||
|
|
bf255c104f | ||
|
|
e09a328281 | ||
|
|
8c757955b5 | ||
|
|
e7d20a403a | ||
|
|
bafa21d11c | ||
|
|
07fc7d0437 | ||
|
|
cc1f75b1b3 | ||
|
|
4a7446e57b | ||
|
|
fc0fa1c58c | ||
|
|
bb4f5a5037 | ||
|
|
09eb303bab | ||
|
|
4708b2c25d | ||
|
|
e514a8c3e1 | ||
|
|
aefbbd5738 | ||
|
|
ab881c9b5a | ||
|
|
e54ebd096c | ||
|
|
6054ccfdf2 | ||
|
|
2fda6d11e1 | ||
|
|
34c25a065a | ||
|
|
89ceb01b59 | ||
|
|
65c1b53ea0 | ||
|
|
522b2623be | ||
|
|
d2bf83e4ac | ||
|
|
30c3a047d1 | ||
|
|
2b6c18dbcd | ||
|
|
7b486bb28c | ||
|
|
10b61f0e30 | ||
|
|
1b35810766 | ||
|
|
fc0160213e | ||
|
|
a039f102a3 | ||
|
|
9b8759c472 | ||
|
|
41efefa21e | ||
|
|
cc8ee097a3 | ||
|
|
1bacb31949 | ||
|
|
be75247dba | ||
|
|
6bc68fece8 | ||
|
|
be8250acb7 | ||
|
|
8372ffc0d7 | ||
|
|
a10187ed5d | ||
|
|
7fbd1ea920 | ||
|
|
ef4a0214ed | ||
|
|
d5ac23a8d2 | ||
|
|
7434865967 | ||
|
|
f29d3bf5f8 | ||
|
|
97baed0ef9 | ||
|
|
378f380968 | ||
|
|
8e506aa327 | ||
|
|
df96b7ab81 | ||
|
|
20cd7b04a5 | ||
|
|
fa16020d61 | ||
|
|
5ba4e0ee9d | ||
|
|
a27ee4944a | ||
|
|
f537ff007c | ||
|
|
c563fc7d42 | ||
|
|
9d0f137f9d | ||
|
|
bcc823e900 | ||
|
|
23b2ade6bd | ||
|
|
9bebf50d4d | ||
|
|
6b98322d96 | ||
|
|
97faaea983 | ||
|
|
35c7964365 | ||
|
|
65f74077d3 | ||
|
|
d8cf526b5a | ||
|
|
5ce2c0eefd | ||
|
|
1a47d52ed9 | ||
|
|
383e4f8abd | ||
|
|
9698baefd0 | ||
|
|
c5f05694aa | ||
|
|
cda924ac74 | ||
|
|
f719697852 | ||
|
|
df61c35314 | ||
|
|
a3f80ef2f8 | ||
|
|
e6f05a7815 | ||
|
|
1ce6d3721e | ||
|
|
07be3dd0d4 | ||
|
|
f5fe7e6cc8 | ||
|
|
6d9fa9eecd | ||
|
|
313be585ae | ||
|
|
8a725298de | ||
|
|
721402b710 | ||
|
|
73e6822a1d | ||
|
|
9f7c4cb217 | ||
|
|
855b572656 | ||
|
|
93e388e04f | ||
|
|
146b929b5d | ||
|
|
5f38814fd2 | ||
|
|
45a364c44b | ||
|
|
d35afdf81c | ||
|
|
5f7eb335e6 | ||
|
|
9173226be7 | ||
|
|
5d8da8aab6 | ||
|
|
df00c13899 | ||
|
|
d1567322ec | ||
|
|
eb42d9e3f0 | ||
|
|
79eb41298c | ||
|
|
e0f48c9f32 | ||
|
|
f033e4eb36 | ||
|
|
8751216f62 | ||
|
|
cfeb59ee8f | ||
|
|
3c340aee40 | ||
|
|
2b2c5efd1a | ||
|
|
985224f24b | ||
|
|
97f26743e5 | ||
|
|
a3bf159281 | ||
|
|
543427255f | ||
|
|
8eba26fd53 | ||
|
|
17b6b7f7b9 | ||
|
|
0997d48d60 | ||
|
|
6e6bd92d5e | ||
|
|
a6e0fdb6b9 | ||
|
|
7d27d76448 | ||
|
|
418c4514df | ||
|
|
bd675c09a1 | ||
|
|
bacaa0127a | ||
|
|
76b1a394f2 | ||
|
|
984bcd5f06 | ||
|
|
7ba5d1de3b | ||
|
|
16cca5a719 | ||
|
|
9d5c7bfc53 | ||
|
|
62c25eec2e | ||
|
|
58b8633e3d | ||
|
|
bc3126ebee | ||
|
|
a743eafca1 | ||
|
|
d6f56169e1 | ||
|
|
c0d9e3247b | ||
|
|
0a1a783054 | ||
|
|
dc9a0145e2 | ||
|
|
2446519024 | ||
|
|
9f532fb543 | ||
|
|
b719435ae8 | ||
|
|
16816d47d6 | ||
|
|
a693a995b1 | ||
|
|
f8a287675b | ||
|
|
e462098cce | ||
|
|
3d2e45b5d5 | ||
|
|
a49faeced6 | ||
|
|
401ebc586e | ||
|
|
cccd3a47f0 | ||
|
|
96912515a8 | ||
|
|
04785a8b49 | ||
|
|
2b129380d6 | ||
|
|
a6e698b0fe | ||
|
|
33d7d730f4 | ||
|
|
5607fab8db | ||
|
|
c2ae9abfb5 | ||
|
|
a8cb498eb5 | ||
|
|
d0c1b94585 | ||
|
|
e17f6c0066 | ||
|
|
a550567a4c | ||
|
|
3fabf34bee | ||
|
|
0d02be6387 | ||
|
|
fff3adf967 | ||
|
|
4b41291830 | ||
|
|
8dd8eabf1a | ||
|
|
1591ed49da | ||
|
|
a069a812db | ||
|
|
3416a74723 | ||
|
|
58afb97eb2 | ||
|
|
738a78d12b | ||
|
|
545c45e78d | ||
|
|
0a3c2433e7 | ||
|
|
df7627c08a | ||
|
|
b089b49b28 | ||
|
|
7547163d2d | ||
|
|
95f61629a9 | ||
|
|
3227ffab81 | ||
|
|
1ecc42d50c | ||
|
|
712751e89b | ||
|
|
b6d87d10c4 | ||
|
|
59e5759bc2 | ||
|
|
ee256284cc | ||
|
|
f3934ebd2c | ||
|
|
22a43eb9af | ||
|
|
ba92225678 | ||
|
|
496451c434 | ||
|
|
9d52f40632 | ||
|
|
c55cac97d0 | ||
|
|
8d09acdf5f | ||
|
|
fcf02fc8bf | ||
|
|
721d344533 | ||
|
|
9dc53f9755 | ||
|
|
aa72a8cd5a | ||
|
|
099a9018df | ||
|
|
34b07ef340 | ||
|
|
3907660dde | ||
|
|
3d1b450cbb | ||
|
|
93ccaff407 | ||
|
|
a2d17fd0b9 | ||
|
|
9fa80d2061 | ||
|
|
5ef9f4e8ac | ||
|
|
bcd639599a | ||
|
|
1b8ac876ce | ||
|
|
420a85943a | ||
|
|
00bee2edcb | ||
|
|
41383bf7a4 | ||
|
|
3bb0c6a8d2 | ||
|
|
0f61ef63a2 | ||
|
|
6ebb432932 | ||
|
|
b08c49e788 | ||
|
|
1b6fa1bd36 | ||
|
|
dc6d77e266 | ||
|
|
4f5ffa2370 | ||
|
|
860a1a1bb0 | ||
|
|
daa6afd14c | ||
|
|
28754ec260 | ||
|
|
ab0208b603 | ||
|
|
358dfd4cb7 | ||
|
|
6d2d5ca0ed | ||
|
|
e71c54f041 | ||
|
|
f9c3a301b5 | ||
|
|
2c162630f4 | ||
|
|
8015e49bee | ||
|
|
3f97845c9c | ||
|
|
4946cdeed3 | ||
|
|
eff3798987 | ||
|
|
554deb22da | ||
|
|
0249b0e933 | ||
|
|
2f59fb197b | ||
|
|
38df31e99f | ||
|
|
a6cbfbf065 | ||
|
|
28b210586c | ||
|
|
33073c75ee | ||
|
|
23b2ea7195 | ||
|
|
80beeb7ffb | ||
|
|
d2b5bedfa1 | ||
|
|
d5cec9f5de | ||
|
|
05deea3cd8 | ||
|
|
7632278ba8 | ||
|
|
faf3971044 | ||
|
|
6166e5805c | ||
|
|
8e4e998e74 | ||
|
|
995882d2d1 | ||
|
|
c8b896bdd6 | ||
|
|
201e631a0b | ||
|
|
a3d1990857 | ||
|
|
ba79f754dc | ||
|
|
b1379f0bef | ||
|
|
f3da0f0547 | ||
|
|
61a4373459 | ||
|
|
b2fc0c3eb1 | ||
|
|
924b32b3c5 | ||
|
|
664798ee6e | ||
|
|
2dd39ad0cb | ||
|
|
6e7268e42a | ||
|
|
7e6c5b2d9f | ||
|
|
9a9676cb7a | ||
|
|
aff86c3e0f | ||
|
|
d4fe17a0bf | ||
|
|
90bd78846a | ||
|
|
31db3d9562 | ||
|
|
52d91d350b | ||
|
|
432ff65cc2 | ||
|
|
037140b980 | ||
|
|
8cd05c7314 | ||
|
|
ec0e841bb8 | ||
|
|
613a18f60c | ||
|
|
d6fd54cec4 | ||
|
|
4e47518a3f | ||
|
|
ab2843f3ef | ||
|
|
0e5247e039 | ||
|
|
6413266df3 | ||
|
|
c6ce421432 | ||
|
|
47f773ab7c | ||
|
|
5a8f176860 | ||
|
|
8cfb10ef10 | ||
|
|
95671f9d9a | ||
|
|
427af43904 | ||
|
|
4944ad5882 | ||
|
|
59f9824cc2 | ||
|
|
71f0b644f2 | ||
|
|
b60b54327b | ||
|
|
0f2da43737 | ||
|
|
558bd42447 | ||
|
|
7107bfe3e6 | ||
|
|
be150c1c52 | ||
|
|
9f4cb1a13e | ||
|
|
0addad590e | ||
|
|
793e48150a | ||
|
|
3ba4bc2d08 | ||
|
|
43faf85eb4 | ||
|
|
ad3febd87e | ||
|
|
3e4d172765 | ||
|
|
607ec01feb | ||
|
|
dc14a309a7 | ||
|
|
fdc56b938e | ||
|
|
4b62714ef5 | ||
|
|
2763aec6c2 | ||
|
|
73b874ec0b | ||
|
|
124b521308 | ||
|
|
e09d4e2d3b | ||
|
|
1f638d2c7a | ||
|
|
0897263fc9 | ||
|
|
7b73393095 | ||
|
|
570f2c7e30 | ||
|
|
b573d3f0f7 | ||
|
|
862c5f21d4 | ||
|
|
1305dee081 | ||
|
|
84497f422d | ||
|
|
ccd7557c75 | ||
|
|
1116eff816 | ||
|
|
55ab08129a | ||
|
|
c94705593f | ||
|
|
4f0f82f6b4 | ||
|
|
b76e45064f | ||
|
|
97653f03be | ||
|
|
96f3100f77 | ||
|
|
06501c8a70 | ||
|
|
dc93db9276 | ||
|
|
d6e678883c | ||
|
|
3c424474ee | ||
|
|
631736b202 | ||
|
|
495ef0dd6a | ||
|
|
2a379d8735 | ||
|
|
6fcc55ce60 | ||
|
|
a36f85aae3 | ||
|
|
ac5cb637e7 | ||
|
|
185ef5eb63 | ||
|
|
46b4e50a23 | ||
|
|
e593233b8f | ||
|
|
852ff762c5 | ||
|
|
c12b0c161f | ||
|
|
84fb080d13 | ||
|
|
81e5d14e4f | ||
|
|
ad1b77f79e | ||
|
|
6cbf7247ce | ||
|
|
d5700d94e6 | ||
|
|
e9f287e2d7 | ||
|
|
79f9f72ef4 | ||
|
|
a70b419c34 | ||
|
|
3cdd33f42f | ||
|
|
2f0cbf83e9 | ||
|
|
f2aaf65674 | ||
|
|
5681a5a231 | ||
|
|
aab3de29e1 | ||
|
|
08d84337e7 | ||
|
|
9b18ffb05c | ||
|
|
dcdd9333d4 | ||
|
|
7bb363d3b2 | ||
|
|
c8127c1b36 | ||
|
|
57dc7396ee | ||
|
|
c781e82c37 | ||
|
|
ea1fbf021d | ||
|
|
a754743014 | ||
|
|
c95d857483 | ||
|
|
8ea346ca4a | ||
|
|
1b3f90d73f | ||
|
|
6687485e4c | ||
|
|
79abef21a5 | ||
|
|
3fe1a8e79f | ||
|
|
076125e0cf | ||
|
|
0d8479b206 | ||
|
|
cb2930f0e9 | ||
|
|
2574e91634 | ||
|
|
17cac581b8 | ||
|
|
b6bc3810bd | ||
|
|
15cb93ed43 | ||
|
|
bc09ec8a6a | ||
|
|
1354fa8a4a | ||
|
|
1a85363faf | ||
|
|
7f021248bf | ||
|
|
9d8d6f33ef | ||
|
|
15601fc3c9 | ||
|
|
eb3ad6b5a3 | ||
|
|
2434455d41 | ||
|
|
62fe37be9f | ||
|
|
f2957e35d5 | ||
|
|
ba08d0c131 | ||
|
|
65a6201121 | ||
|
|
9fba1e9799 | ||
|
|
8656108e81 | ||
|
|
63b5109113 | ||
|
|
264b08a731 | ||
|
|
0c686c1339 | ||
|
|
27007184aa | ||
|
|
7e2f448ae1 | ||
|
|
90a9159748 | ||
|
|
e0e6d1fd3e | ||
|
|
123fcdde1f | ||
|
|
15956ab222 | ||
|
|
c6d95c42a8 | ||
|
|
bec69e17a2 | ||
|
|
fe7497ab92 | ||
|
|
057b33179a | ||
|
|
030b3c34d2 | ||
|
|
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 | ||
|
|
ca3fe4070a | ||
|
|
bef7aab7f6 | ||
|
|
d4bcc96f2f | ||
|
|
b5003f8fb8 | ||
|
|
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 |
240
.cmake-format.py
Normal file
240
.cmake-format.py
Normal file
@@ -0,0 +1,240 @@
|
|||||||
|
# ----------------------------------
|
||||||
|
# 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 = 6
|
||||||
|
|
||||||
|
# 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 = []
|
||||||
|
|
||||||
|
# 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 = False
|
||||||
|
|
||||||
|
# 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 = {}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
[codespell]
|
[codespell]
|
||||||
skip = ./build-*,.git,*.svg,rc_assets.py
|
skip = ./build-*,.git,*.svg,rc_assets.py
|
||||||
interactive = 3
|
interactive = 3
|
||||||
ignore-words-list = overlay,overlayed
|
ignore-words-list = overlay,overlayed,seh
|
||||||
|
|||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -47,6 +47,7 @@ mylayout.json
|
|||||||
*.cbp
|
*.cbp
|
||||||
*.pyc
|
*.pyc
|
||||||
/python/examples/rc_assets.py
|
/python/examples/rc_assets.py
|
||||||
|
/python/examples-qt6/rc_assets.py
|
||||||
*.pri
|
*.pri
|
||||||
/docks-w
|
/docks-w
|
||||||
kddockwidgets_minimal_example
|
kddockwidgets_minimal_example
|
||||||
@@ -64,3 +65,7 @@ kddockwidgets_minimal_example
|
|||||||
*.sln
|
*.sln
|
||||||
*.dir
|
*.dir
|
||||||
.vscode
|
.vscode
|
||||||
|
/.cache
|
||||||
|
/compile_commands.json
|
||||||
|
/site
|
||||||
|
.DS_Store
|
||||||
|
|||||||
6
.krazy
6
.krazy
@@ -8,6 +8,8 @@ EXTRA kdabcopyright-reuse,kdabcontactus,fosslicense-reuse
|
|||||||
|
|
||||||
#exclude checks now being done by clazy or clang-tools
|
#exclude checks now being done by clazy or clang-tools
|
||||||
EXCLUDE strings,explicit,normalize,passbyvalue,operators,nullstrcompare,nullstrassign,doublequote_chars,qobject,sigsandslots,staticobjects,dpointer,inline,postfixop
|
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 more checks
|
||||||
EXCLUDE style
|
EXCLUDE style
|
||||||
|
|
||||||
@@ -18,6 +20,6 @@ SKIP Doxyfile.cmake
|
|||||||
SKIP /KDDockWidgetsConfig.cmake.in
|
SKIP /KDDockWidgetsConfig.cmake.in
|
||||||
#skip more files
|
#skip more files
|
||||||
SKIP CMakePresets.json
|
SKIP CMakePresets.json
|
||||||
|
SKIP \.cmake-format\.py
|
||||||
#skip the borrowed code in the cmake subdir
|
#skip the borrowed code in the cmake subdir
|
||||||
SKIP /cmake/InstallLocation.cmake|/cmake/ECM/|/cmake/KDAB/
|
SKIP /cmake/ECM/|/cmake/KDAB/
|
||||||
|
|
||||||
|
|||||||
4
.mdlrc.rb
Normal file
4
.mdlrc.rb
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
all
|
||||||
|
rule 'MD013', :line_length => 100, :tables => false
|
||||||
|
rule 'MD029', :style => :ordered
|
||||||
|
exclude_rule 'MD033'
|
||||||
51
.pre-commit-config.yaml
Normal file
51
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
exclude: ^(cmake/ECM|cmake/KDAB/|src/3rdparty/)
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v3.2.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.0
|
||||||
|
hooks:
|
||||||
|
- id: clang-format
|
||||||
|
exclude: (.json)
|
||||||
|
- repo: https://github.com/PyCQA/pylint
|
||||||
|
rev: v2.12.2
|
||||||
|
hooks:
|
||||||
|
- id: pylint
|
||||||
|
exclude: ^(.cmake-format.py|conan/conanfile.py)
|
||||||
|
additional_dependencies: ["PySide2", "PySide6"]
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-autopep8
|
||||||
|
rev: v1.6.0
|
||||||
|
hooks:
|
||||||
|
- id: autopep8
|
||||||
|
- repo: https://github.com/codespell-project/codespell
|
||||||
|
rev: v2.1.0
|
||||||
|
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.11.0
|
||||||
|
hooks:
|
||||||
|
- id: markdownlint
|
||||||
|
entry: mdl
|
||||||
|
language: ruby
|
||||||
|
files: \.(md|mdown|markdown)$
|
||||||
|
- repo: https://github.com/fsfe/reuse-tool
|
||||||
|
rev: v1.0.0
|
||||||
|
hooks:
|
||||||
|
- id: reuse
|
||||||
595
.pylintrc
Normal file
595
.pylintrc
Normal file
@@ -0,0 +1,595 @@
|
|||||||
|
[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,
|
||||||
|
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
29
.reuse/dep5
@@ -3,16 +3,37 @@ Upstream-Name: KDDockWidgets
|
|||||||
Upstream-Contact: <info@kdab.com>
|
Upstream-Contact: <info@kdab.com>
|
||||||
Source: https://www.github.com/KDAB/KDDockWidgets
|
Source: https://www.github.com/KDAB/KDDockWidgets
|
||||||
|
|
||||||
Files: *.qrc *.json *.xml *.html src/fwd_headers/*
|
#misc source code
|
||||||
Copyright: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
Files: *.qrc *.json *.xml src/fwd_headers/*
|
||||||
|
Copyright: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
License: GPL-2.0-only OR GPL-3.0-only
|
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_devel/*.md docs/KDDockWidgets-CopyrightAssignmentForm.pdf *.html
|
||||||
|
Copyright: 2019-2022 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 mkdocs.yml code.dev-*.code-workspace code.dev*.code-workspace docs/api/Doxyfile.cmake distro/*
|
||||||
|
Copyright: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
|
License: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
License: BSD-3-Clause
|
||||||
|
|
||||||
#artwork
|
#artwork
|
||||||
Files: screencap.gif images/* src/img/* docs/api/*.png examples/dockwidgets/assets/*.png src/img/classic_indicators/*.png
|
Files: screencap.gif images/* src/img/* docs/api/*.png examples/dockwidgets/assets/*.png src/img/classic_indicators/*.png
|
||||||
Copyright: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
Copyright: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
License: GPL-2.0-only OR GPL-3.0-only
|
License: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|
||||||
#3rdparty
|
#3rdparty
|
||||||
Files: cmake/ECM/modules/*
|
Files: cmake/ECM/modules/*
|
||||||
Copyright:
|
Copyright: The KDE Project
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
|
|
||||||
|
#3rdparty C++
|
||||||
|
Files: src/3rdparty/kdbindings/genindex_array.h
|
||||||
|
Copyright: 2021 Jeremy Burns
|
||||||
|
License: MIT
|
||||||
|
|
||||||
|
Files: src/3rdparty/doctest/doctest.h
|
||||||
|
Copyright: 2016-2021 Viktor Kirilov <vik.kirilov@gmail.com>
|
||||||
|
License: MIT
|
||||||
|
|||||||
66
.travis.yml
66
.travis.yml
@@ -1,66 +0,0 @@
|
|||||||
env:
|
|
||||||
global:
|
|
||||||
- secure: "NlWO/NTPlOU6cowOMuPOvjAprXVwIjmpHHf9CoMR71E2c/eBFFKIHj10kXuyFwz2KihHAIExmo9OlGtGniNWobvIrVrabO3dsOSb6UGbPAQkzQiyQLKsDNQAZx3nMuWEKBtMsVRee6rd7/2uGTY4WB5Ot3VhrUYcN1FoRgQQ9gk="
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: linux
|
|
||||||
dist: bionic
|
|
||||||
- os: osx
|
|
||||||
osx_image: xcode11.5
|
|
||||||
env:
|
|
||||||
- QT_SELECT=qt5
|
|
||||||
- CMAKE_PREFIX_PATH=/usr/local/opt/qt
|
|
||||||
|
|
||||||
language: cpp
|
|
||||||
compiler:
|
|
||||||
- gcc
|
|
||||||
- clang
|
|
||||||
|
|
||||||
script:
|
|
||||||
- mkdir build
|
|
||||||
- cd build
|
|
||||||
- cmake -DCMAKE_BUILD_TYPE=Release -DKDDockWidgets_TESTS=True -KDDockWidgets_EXAMPLES=True -DKDDockWidgets_DEVELOPER_MODE=True ..
|
|
||||||
- make
|
|
||||||
- make test
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
recipients:
|
|
||||||
- allen.winter@kdab.com
|
|
||||||
- sergio.martins@kdab.com
|
|
||||||
on_success: never
|
|
||||||
on_failure: always
|
|
||||||
|
|
||||||
dist: bionic
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
update: true
|
|
||||||
packages:
|
|
||||||
- qt5-default
|
|
||||||
- qtbase5-dev
|
|
||||||
- qtbase5-dev-tools
|
|
||||||
- qtbase5-private-dev
|
|
||||||
- qttools5-dev
|
|
||||||
- qttools5-dev-tools
|
|
||||||
- qtdeclarative5-dev
|
|
||||||
- qtdeclarative5-dev-tools
|
|
||||||
- libqt5xmlpatterns5-dev
|
|
||||||
- libqt5xmlpatterns5
|
|
||||||
- qtxmlpatterns5-dev-tools
|
|
||||||
- libqt5x11extras5-dev
|
|
||||||
homebrew:
|
|
||||||
update: true
|
|
||||||
packages:
|
|
||||||
- qt5
|
|
||||||
coverity_scan:
|
|
||||||
project:
|
|
||||||
name: KDAB/KDDockWidgets
|
|
||||||
notification_email: allen.winter@kdab.com
|
|
||||||
build_command_prepend: cd build && cmake ..
|
|
||||||
build_command: make
|
|
||||||
branch_pattern: coverity_scan
|
|
||||||
586
CMakeLists.txt
586
CMakeLists.txt
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,165 +11,264 @@
|
|||||||
|
|
||||||
# Pass the following variables to cmake to control the build:
|
# Pass the following variables to cmake to control the build:
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_QT6=[true|false]
|
# -DKDDockWidgets_QT6=[true|false] Build against Qt6 rather than Qt5
|
||||||
# Build against Qt6 rather than Qt5
|
# Default=false (Qt5 will be used even if Qt6 is available)
|
||||||
# Default=false (Qt5 will be used even if Qt6 is available)
|
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_STATIC=[true|false]
|
# -DKDDockWidgets_STATIC=[true|false] Build static versions of the libraries
|
||||||
# Build static versions of the libraries
|
# Default=false
|
||||||
# Default=false
|
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_TESTS=[true|false]
|
# -DKDDockWidgets_TESTS=[true|false] Build the test harness. Currently ignored
|
||||||
# Build the test harness.
|
# (except for Python bindings) unless KDDockWidgets_DEVELOPER_MODE=True.
|
||||||
# Currently ignored unless you also set KDDockWidgets_DEVELOPER_MODE=True
|
# Default=false
|
||||||
# Default=false
|
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_EXAMPLES=[true|false]
|
# -DKDDockWidgets_EXAMPLES=[true|false] Build the examples. Default=true
|
||||||
# Build the examples.
|
|
||||||
# Default=true
|
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_DOCS=[true|false]
|
# -DKDDockWidgets_DOCS=[true|false] Build the API documentation. Enables the
|
||||||
# Build the API documentation. Enables the 'docs' build target.
|
# 'docs' build target. Default=false
|
||||||
# Default=false
|
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_QTQUICK=[true|false]
|
# -DKDDockWidgets_PYTHON_BINDINGS=[true|false] Build/Generate python bindings.
|
||||||
# Build for QtQuick instead of QtWidgets.
|
# Always false for Debug builds (If your shiboken or pyside is installed in a
|
||||||
# Default=false
|
# non-standard locations try passing the SHIBOKEN_CUSTOM_PREFIX and
|
||||||
|
# PYSIDE_CUSTOM_PREFIX variables.) Default=false
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_PYTHON_BINDINGS=[true|false]
|
# -DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=[path] Set an alternative
|
||||||
# Build/Generate python bindings. Always false for Debug builds
|
# install path for Python bindings Default=CMAKE_INSTALL_PREFIX
|
||||||
# (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!!
|
# ## DO NOT USE IF YOU ARE AN END-USER. FOR THE DEVELOPERS ONLY!! # Special
|
||||||
## Special CMake Options for Developers
|
# CMake Options for Developers
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_DEVELOPER_MODE=[true|false]
|
# -DKDDockWidgets_DEVELOPER_MODE=[true|false] Configure the build for a
|
||||||
# Configure the build for a developer setup.
|
# developer setup. Enables some features that are not geared towards end-users.
|
||||||
# Enables some features that are not geared towards end-users.
|
# Forces the test harness to be built. Default=false
|
||||||
# Forces the test harness to be built.
|
|
||||||
# Default=false
|
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_WERROR=[true|false]
|
# -DKDDockWidgets_WERROR=[true|false] Compile with the -Werror gcc/clang option
|
||||||
# Compile with the -Werror gcc/clang option (always true for developer-mode)
|
# (always true for developer-mode) Default=false
|
||||||
# Default=false
|
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_LINTER=[true|false]
|
# -DKDDockWidgets_LINTER=[true|false] Build the layout linter. Ignored unless
|
||||||
# Build the layout linter.
|
# KDDockWidgets_DEVELOPER_MODE=True Default=true
|
||||||
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True
|
|
||||||
# Default=true
|
|
||||||
#
|
#
|
||||||
# -DKDDockWidgets_FUZZER=[true|false]
|
# -DKDDockWidgets_CODE_COVERAGE=[true|false] Enable coverage reporting. Ignored
|
||||||
# Build the fuzzer.
|
# unless KDDockWidgets_DEVELOPER_MODE=True Default=false
|
||||||
# Ignored unless KDDockWidgets_DEVELOPER_MODE=True
|
#
|
||||||
# Default=true
|
# -DKDDockWidgets_FRONTENDS='qtwidgets;qtquick' Semicolon separated list of
|
||||||
|
# frontends to enable. If not specified, frontends will be enabled based on
|
||||||
|
# availability of libraries on your system.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
|
|
||||||
# Allow using a non-KDAB install location.
|
# Allow using a non-KDAB install location.
|
||||||
set(KDAB_INSTALL True CACHE INTERNAL "Install to default KDAB Location")
|
set(KDAB_INSTALL
|
||||||
|
True
|
||||||
|
CACHE INTERNAL "Install to default KDAB Location"
|
||||||
|
)
|
||||||
|
|
||||||
if(DEFINED CMAKE_INSTALL_PREFIX)
|
if(DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "")
|
if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "")
|
||||||
set(KDAB_INSTALL False CACHE INTERNAL "Install to non-KDAB Location")
|
set(KDAB_INSTALL
|
||||||
endif()
|
False
|
||||||
|
CACHE INTERNAL "Install to non-KDAB Location"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
||||||
project(KDDockWidgets LANGUAGES CXX)
|
project(KDDockWidgets LANGUAGES CXX)
|
||||||
else()
|
else()
|
||||||
project(KDDockWidgets
|
project(
|
||||||
DESCRIPTION "An advanced docking system for Qt"
|
KDDockWidgets
|
||||||
HOMEPAGE_URL "https://github.com/KDAB/KDDockWidgets"
|
DESCRIPTION "An advanced docking system for Qt"
|
||||||
LANGUAGES CXX)
|
HOMEPAGE_URL "https://github.com/KDAB/KDDockWidgets"
|
||||||
|
LANGUAGES CXX
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(${PROJECT_NAME}_VERSION_MAJOR 1)
|
set(KDDockWidgets_VERSION_MAJOR 2)
|
||||||
set(${PROJECT_NAME}_VERSION_MINOR 4)
|
set(KDDockWidgets_VERSION_MINOR 0)
|
||||||
set(${PROJECT_NAME}_VERSION_PATCH 95)
|
set(KDDockWidgets_VERSION_PATCH 9)
|
||||||
set(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH})
|
set(KDDockWidgets_VERSION ${KDDockWidgets_VERSION_MAJOR}.${KDDockWidgets_VERSION_MINOR}.${KDDockWidgets_VERSION_PATCH})
|
||||||
set(PROJECT_VERSION ${${PROJECT_NAME}_VERSION}) #PROJECT_VERSION is needed by some ECM modules
|
set(PROJECT_VERSION ${KDDockWidgets_VERSION}) # PROJECT_VERSION is needed by some ECM modules
|
||||||
set(${PROJECT_NAME}_SOVERSION "1.5")
|
set(KDDockWidgets_SOVERSION "2.0")
|
||||||
|
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
|
|
||||||
option(${PROJECT_NAME}_QT6 "Build against Qt 6" OFF)
|
option(KDDockWidgets_QT6 "Build against Qt 6" OFF)
|
||||||
option(${PROJECT_NAME}_DEVELOPER_MODE "Developer Mode" OFF)
|
option(KDDockWidgets_DEVELOPER_MODE "Developer Mode" OFF)
|
||||||
option(${PROJECT_NAME}_PYTHON_BINDINGS "Build python bindings" OFF)
|
option(KDDockWidgets_PYTHON_BINDINGS "Build python bindings" OFF)
|
||||||
option(${PROJECT_NAME}_QTQUICK "Build for QtQuick instead of QtWidgets" OFF)
|
option(KDDockWidgets_STATIC "Build statically" OFF)
|
||||||
option(${PROJECT_NAME}_STATIC "Build statically" OFF)
|
option(KDDockWidgets_TESTS "Build the tests" OFF)
|
||||||
option(${PROJECT_NAME}_TESTS "Build the tests" OFF)
|
option(KDDockWidgets_EXAMPLES "Build the examples" ON)
|
||||||
option(${PROJECT_NAME}_EXAMPLES "Build the examples" ON)
|
option(KDDockWidgets_DOCS "Build the API documentation" OFF)
|
||||||
option(${PROJECT_NAME}_DOCS "Build the API documentation" OFF)
|
option(KDDockWidgets_WERROR "Use -Werror (will be true for developer-mode unconditionally)" OFF)
|
||||||
option(${PROJECT_NAME}_WERROR "Use -Werror (will be true for developer-mode unconditionally)" OFF)
|
option(KDDockWidgets_X11EXTRAS
|
||||||
option(${PROJECT_NAME}_X11EXTRAS "On Linux, link against QtX11Extras so we can detect if the compositor supports transparency. Not applicable to other platforms or Qt6." ON)
|
"Link against QtX11Extras to detect if the compositor supports transparency. Not applicable on non-Linux or Qt6."
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
option(KDDockWidgets_XLib "On Linux, link against XLib, for a more robust window z-order detection." OFF)
|
||||||
|
option(KDDockWidgets_CODE_COVERAGE "Enable coverage reporting" OFF)
|
||||||
|
option(KDDockWidgets_FRONTENDS "Semicolon separated list of frontends to enable" "")
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/ECM/modules")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/ECM/modules")
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/KDAB/modules")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/KDAB/modules")
|
||||||
|
|
||||||
# Set a default build type if none was specified
|
# Set a default build type if none was specified
|
||||||
set(default_build_type "Release")
|
set(default_build_type "Release")
|
||||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.git" OR ${PROJECT_NAME}_DEVELOPER_MODE)
|
if(EXISTS "${CMAKE_SOURCE_DIR}/.git" OR KDDockWidgets_DEVELOPER_MODE)
|
||||||
set(default_build_type "Debug")
|
set(default_build_type "Debug")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
message(STATUS "Setting build type to ${default_build_type} as none was specified.")
|
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(CMAKE_BUILD_TYPE
|
||||||
# Set the possible values of build type for cmake-gui
|
"${default_build_type}"
|
||||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
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()
|
endif()
|
||||||
|
|
||||||
if(${PROJECT_NAME}_QT6)
|
if(KDDockWidgets_XLib)
|
||||||
set(Qt_VERSION_MAJOR 6)
|
add_definitions(-DKDDockWidgets_XLIB)
|
||||||
set(QT_MIN_VERSION "6.0.0")
|
endif()
|
||||||
find_package(Qt6Widgets ${QT_MIN_VERSION} REQUIRED)
|
|
||||||
find_package(Qt6Test ${QT_MIN_VERSION} REQUIRED)
|
if(MSVC AND MSVC_TOOLSET_VERSION LESS 142)
|
||||||
set(${PROJECT_NAME}_LIBRARY_QTID "-qt6")
|
message(FATAL_ERROR "VS 2019 is the minimum required toolset")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(KDDockWidgets_QT6)
|
||||||
|
set(Qt_VERSION_MAJOR 6)
|
||||||
|
set(QT_MIN_VERSION "6.3.0")
|
||||||
|
set(KDDockWidgets_LIBRARY_QTID "-qt6")
|
||||||
else()
|
else()
|
||||||
set(Qt_VERSION_MAJOR 5)
|
set(Qt_VERSION_MAJOR 5)
|
||||||
set(QT_MIN_VERSION "5.12")
|
set(QT_MIN_VERSION "5.15")
|
||||||
find_package(Qt5Widgets ${QT_MIN_VERSION} REQUIRED)
|
set(KDDockWidgets_LIBRARY_QTID "")
|
||||||
find_package(Qt5Test ${QT_MIN_VERSION} REQUIRED)
|
|
||||||
set(${PROJECT_NAME}_LIBRARY_QTID "")
|
|
||||||
endif()
|
endif()
|
||||||
include(KDQtInstallPaths) #to set QT_INSTALL_FOO variables
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_DEPS "widgets")
|
# BEGIN frontend enabling
|
||||||
if(${PROJECT_NAME}_QTQUICK)
|
if(KDDockWidgets_FRONTENDS)
|
||||||
find_package(Qt${Qt_VERSION_MAJOR}Quick)
|
set(KDDockWidgets_ALL_FRONTENDS "qtwidgets;qtquick;dummy;gtk")
|
||||||
find_package(Qt${Qt_VERSION_MAJOR}QuickControls2)
|
|
||||||
add_definitions(-DKDDOCKWIDGETS_QTQUICK)
|
foreach(frontend ${KDDockWidgets_FRONTENDS})
|
||||||
set(${PROJECT_NAME}_DEPS "${${PROJECT_NAME}_DEPS} quick quickcontrols2")
|
if(NOT ${frontend} IN_LIST KDDockWidgets_ALL_FRONTENDS)
|
||||||
|
message(FATAL_ERROR "Unknown frontend ${frontend}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(KDDockWidgets_FRONTENDS)
|
||||||
|
# qtwidgets
|
||||||
|
if("qtwidgets" IN_LIST KDDockWidgets_FRONTENDS)
|
||||||
|
find_package(Qt${Qt_VERSION_MAJOR} ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS Widgets)
|
||||||
|
set(KDDW_FRONTEND_QTWIDGETS ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# qtquick
|
||||||
|
if("qtquick" IN_LIST KDDockWidgets_FRONTENDS)
|
||||||
|
find_package(Qt${Qt_VERSION_MAJOR} ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS Quick QuickControls2)
|
||||||
|
set(KDDW_FRONTEND_QTQUICK ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# dummy
|
||||||
|
if("dummy" IN_LIST KDDockWidgets_FRONTENDS)
|
||||||
|
# For now dummy still depends on Qt
|
||||||
|
find_package(Qt${Qt_VERSION_MAJOR} ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS Gui)
|
||||||
|
set(KDDW_FRONTEND_DUMMY ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# gtk
|
||||||
|
if("gtk" IN_LIST KDDockWidgets_FRONTENDS)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||||
|
pkg_check_modules(GTKMM REQUIRED IMPORTED_TARGET gtkmm-3.0)
|
||||||
|
set(KDDW_FRONTEND_GTK ON)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
add_definitions(-DKDDOCKWIDGETS_QTWIDGETS)
|
set(ENABLED_FRONTENDS "")
|
||||||
|
message("No frontends specified explicitly.")
|
||||||
|
|
||||||
|
# qtwidgets
|
||||||
|
find_package(Qt${Qt_VERSION_MAJOR} ${QT_MIN_VERSION} NO_MODULE COMPONENTS Widgets Quick QuickControls2)
|
||||||
|
|
||||||
|
if(Qt${Qt_VERSION_MAJOR}Widgets_FOUND)
|
||||||
|
list(APPEND ENABLED_FRONTENDS "qtwidgets")
|
||||||
|
set(KDDW_FRONTEND_QTWIDGETS ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# qtquick
|
||||||
|
if(Qt${Qt_VERSION_MAJOR}Quick_FOUND AND Qt${Qt_VERSION_MAJOR}QuickControls2_FOUND)
|
||||||
|
list(APPEND ENABLED_FRONTENDS "qtquick")
|
||||||
|
set(KDDW_FRONTEND_QTQUICK ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#gtk
|
||||||
|
find_package(PkgConfig)
|
||||||
|
if(PkgConfig_Found)
|
||||||
|
pkg_check_modules(GTK IMPORTED_TARGET gtk+-3.0)
|
||||||
|
endif()
|
||||||
|
if(Gtk_Found)
|
||||||
|
set(KDDW_FRONTEND_GTK ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT ENABLED_FRONTENDS)
|
||||||
|
message(FATAL_ERROR "Failed to enable any frontends. Please install the required libraries and try again.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message("Following frontends have been enabled:")
|
||||||
|
|
||||||
|
foreach(frontend ${ENABLED_FRONTENDS})
|
||||||
|
message("* ${frontend}")
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT WIN32 AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ${PROJECT_NAME}_QT6 AND ${PROJECT_NAME}_X11EXTRAS)
|
# END frontend enabling
|
||||||
set(${PROJECT_NAME}_DEPS "${${PROJECT_NAME}_DEPS} x11extras")
|
include(KDQtInstallPaths) # to set QT_INSTALL_FOO variables
|
||||||
|
|
||||||
|
add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
|
option(KDockWidgets_PRETTY_QTWIDGETS_HEADERS
|
||||||
|
"Install DockWidget.h and MainWindow.h as synonyms to the *_qtwidgets.h counterparts."
|
||||||
|
${KDDW_FRONTEND_QTWIDGETS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(KDDW_FRONTEND_QTWIDGETS)
|
||||||
|
set(KDDockWidgets_DEPS "widgets")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#Always build the test harness in developer-mode
|
if(KDDW_FRONTEND_QTQUICK)
|
||||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
set(KDDockWidgets_DEPS "${KDDockWidgets_DEPS} quick quickcontrols2")
|
||||||
set(${PROJECT_NAME}_TESTS ON)
|
endif()
|
||||||
set(${PROJECT_NAME}_WERROR ON)
|
|
||||||
include(ECMEnableSanitizers)
|
if(KDDW_FRONTEND_GTK)
|
||||||
|
add_definitions(-DKDDW_FRONTEND_GTK)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT WIN32
|
||||||
|
AND NOT APPLE
|
||||||
|
AND NOT EMSCRIPTEN
|
||||||
|
AND NOT KDDockWidgets_QT6
|
||||||
|
AND KDDockWidgets_X11EXTRAS
|
||||||
|
)
|
||||||
|
set(KDDockWidgets_DEPS "${KDDockWidgets_DEPS} x11extras")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Always build the test harness in developer-mode
|
||||||
|
if(KDDockWidgets_DEVELOPER_MODE)
|
||||||
|
set(KDDockWidgets_TESTS ON)
|
||||||
|
set(KDDockWidgets_WERROR ON)
|
||||||
|
include(ECMEnableSanitizers)
|
||||||
|
|
||||||
|
# find_package(doctest REQUIRED) TODOm3
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
set(IS_CLANG_BUILD TRUE)
|
set(IS_CLANG_BUILD TRUE)
|
||||||
else()
|
else()
|
||||||
set(IS_CLANG_BUILD FALSE)
|
set(IS_CLANG_BUILD FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${PROJECT_NAME}_QTQUICK)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
@@ -179,116 +278,174 @@ set(CMAKE_C_VISIBILITY_PRESET hidden)
|
|||||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||||
|
|
||||||
|
# Sets compiler flags for the specified target, taking platform into consideration.
|
||||||
macro(set_compiler_flags targetName)
|
macro(set_compiler_flags targetName)
|
||||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
if(KDDockWidgets_DEVELOPER_MODE)
|
||||||
target_compile_definitions(${targetName} PUBLIC DOCKS_DEVELOPER_MODE PRIVATE QT_FORCE_ASSERTS)
|
target_compile_definitions(
|
||||||
|
${targetName}
|
||||||
|
PUBLIC DOCKS_DEVELOPER_MODE
|
||||||
|
PRIVATE QT_FORCE_ASSERTS
|
||||||
|
)
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
target_compile_options(${targetName} PRIVATE -Wall -Wextra)
|
target_compile_options(${targetName} PRIVATE -Wall -Wextra)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
target_compile_options(${targetName} PRIVATE -Wweak-vtables)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
# Enable -Werror
|
||||||
target_compile_options(${targetName} PRIVATE -Wweak-vtables)
|
if(KDDockWidgets_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()
|
||||||
endif()
|
|
||||||
|
|
||||||
# Enable -Werror
|
|
||||||
if(${PROJECT_NAME}_WERROR AND (NOT MSVC OR IS_CLANG_BUILD)) # clang-cl accepts these too
|
|
||||||
target_compile_options(${targetName} PRIVATE -Werror -Wundef -Wno-error=deprecated-declarations)
|
|
||||||
endif()
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) OR
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE)
|
||||||
(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE) OR
|
OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE)
|
||||||
(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32))
|
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}")
|
# Linker warnings should be treated as errors
|
||||||
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_MODULE_LINKER_FLAGS}")
|
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)
|
string(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" compileflags)
|
||||||
if("${CMAKE_CXX_FLAGS} ${${compileflags}}" MATCHES "-fsanitize")
|
|
||||||
set(sanitizers_enabled TRUE)
|
|
||||||
else()
|
|
||||||
set(sanitizers_enabled FALSE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# cannot enable this for clang + sanitizers
|
if("${CMAKE_CXX_FLAGS} ${${compileflags}}" MATCHES "-fsanitize")
|
||||||
if(NOT sanitizers_enabled OR NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
set(sanitizers_enabled TRUE)
|
||||||
# Do not allow undefined symbols, even in non-symbolic shared libraries
|
else()
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
|
set(sanitizers_enabled FALSE)
|
||||||
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}")
|
endif()
|
||||||
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()
|
endif()
|
||||||
|
|
||||||
if(${PROJECT_NAME}_STATIC)
|
if(KDDockWidgets_STATIC)
|
||||||
set(${PROJECT_NAME}_LIBRARY_MODE "STATIC")
|
set(KDDockWidgets_LIBRARY_MODE "STATIC")
|
||||||
else()
|
else()
|
||||||
set(${PROJECT_NAME}_LIBRARY_MODE "SHARED")
|
set(KDDockWidgets_LIBRARY_MODE "SHARED")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(KDAB_INSTALL)
|
if(KDAB_INSTALL)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
set(CMAKE_INSTALL_PREFIX "/usr/local/KDAB/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}" CACHE INTERNAL "Install to default KDAB Location")
|
set(CMAKE_INSTALL_PREFIX
|
||||||
elseif(WIN32)
|
"/usr/local/KDAB/KDDockWidgets-${KDDockWidgets_VERSION}"
|
||||||
set(CMAKE_INSTALL_PREFIX "C:\\KDAB\\${PROJECT_NAME}-$$VERSION" CACHE INTERNAL "Install to default KDAB Location")
|
CACHE INTERNAL "Install to default KDAB Location"
|
||||||
endif()
|
)
|
||||||
|
elseif(WIN32)
|
||||||
|
set(CMAKE_INSTALL_PREFIX
|
||||||
|
"C:\\KDAB\\KDDockWidgets-${KDDockWidgets_VERSION}"
|
||||||
|
CACHE INTERNAL "Install to default KDAB Location"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# setup default install locations
|
# setup default install locations
|
||||||
include(InstallLocation)
|
include(KDInstallLocation)
|
||||||
|
|
||||||
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||||
set(${PROJECT_NAME}_IS_ROOT_PROJECT TRUE)
|
set(KDDockWidgets_IS_ROOT_PROJECT TRUE)
|
||||||
|
|
||||||
message(STATUS "Building ${PROJECT_NAME} ${${PROJECT_NAME}_VERSION} in ${CMAKE_BUILD_TYPE} mode. Installing to ${CMAKE_INSTALL_PREFIX}")
|
message(STATUS "Building KDDockWidgets ${KDDockWidgets_VERSION} in ${CMAKE_BUILD_TYPE} mode. "
|
||||||
|
"Installing to ${CMAKE_INSTALL_PREFIX}"
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
|
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
|
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
|
|
||||||
|
|
||||||
install(FILES LICENSE.txt README.md DESTINATION ${INSTALL_DOC_DIR})
|
|
||||||
install(DIRECTORY LICENSES DESTINATION ${INSTALL_DOC_DIR})
|
|
||||||
|
|
||||||
# Generate .pri file for qmake users
|
|
||||||
#TODO: ECM does not support Qt6 yet
|
|
||||||
if(Qt_VERSION_MAJOR EQUAL 5 AND
|
|
||||||
CMAKE_VERSION VERSION_GREATER "3.11.99" AND NOT CMAKE_CONFIGURATION_TYPES) # Not working with VS generator or older cmake versions
|
|
||||||
include(ECMGeneratePriFile)
|
|
||||||
set(PROJECT_VERSION_STRING ${${PROJECT_NAME}_VERSION})
|
|
||||||
ecm_generate_pri_file(BASE_NAME KDDockWidgets
|
|
||||||
LIB_NAME kddockwidgets
|
|
||||||
DEPS ${${PROJECT_NAME}_DEPS}
|
|
||||||
FILENAME_VAR pri_filename
|
|
||||||
INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}
|
|
||||||
)
|
)
|
||||||
install(FILES ${pri_filename} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
|
|
||||||
endif()
|
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 for older cmake versions and when using the VS generator)
|
||||||
|
if(CMAKE_VERSION VERSION_GREATER "3.11.99" AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
|
include(ECMGeneratePriFile)
|
||||||
|
set(PROJECT_VERSION_STRING ${KDDockWidgets_VERSION})
|
||||||
|
ecm_generate_pri_file(
|
||||||
|
BASE_NAME
|
||||||
|
KDDockWidgets
|
||||||
|
LIB_NAME
|
||||||
|
kddockwidgets${${PROJECT_NAME}_LIBRARY_QTID}
|
||||||
|
DEPS
|
||||||
|
${KDDockWidgets_DEPS}
|
||||||
|
FILENAME_VAR
|
||||||
|
pri_filename
|
||||||
|
INCLUDE_INSTALL_DIR
|
||||||
|
${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
)
|
||||||
|
install(FILES ${pri_filename} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# Always disable tests, examples, docs when used as a submodule
|
||||||
|
set(KDDockWidgets_IS_ROOT_PROJECT FALSE)
|
||||||
|
set(KDDockWidgets_TESTS FALSE)
|
||||||
|
set(KDDockWidgets_EXAMPLES FALSE)
|
||||||
|
set(KDDockWidgets_DOCS FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(KDDockWidgets_TESTS)
|
||||||
|
enable_testing()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
if(${PROJECT_NAME}_IS_ROOT_PROJECT)
|
if(KDDockWidgets_PYTHON_BINDINGS)
|
||||||
if(${PROJECT_NAME}_EXAMPLES)
|
if(CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR KDDockWidgets_STATIC)
|
||||||
if(${PROJECT_NAME}_QTQUICK)
|
message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.")
|
||||||
add_subdirectory(examples/qtquick)
|
|
||||||
else()
|
|
||||||
add_subdirectory(examples/dockwidgets)
|
|
||||||
add_subdirectory(examples/minimal)
|
|
||||||
add_subdirectory(examples/minimal-mdi)
|
|
||||||
set_compiler_flags(kddockwidgets_example)
|
|
||||||
set_compiler_flags(kddockwidgets_minimal_example)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
if(${PROJECT_NAME}_DEVELOPER_MODE)
|
if(CMAKE_UNITY_BUILD)
|
||||||
|
message(FATAL_ERROR "** Python Bindings are disabled in Unity builds. Try again with CMAKE_UNITY_BUILD=OFF")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${PROJECT_NAME}_TESTS)
|
add_subdirectory(python)
|
||||||
enable_testing()
|
endif()
|
||||||
add_subdirectory(tests)
|
|
||||||
|
|
||||||
# Require Qt5.15.1 or higher to run the tests_launcher tests on Mac
|
if(KDDockWidgets_EXAMPLES)
|
||||||
if(NOT APPLE OR Qt5Widgets_VERSION VERSION_GREATER 5.15.0)
|
if(KDDW_FRONTEND_QTQUICK)
|
||||||
# tst_docks.exe is pretty big (160 tests), so split it in more runs so we can use threads.
|
add_subdirectory(examples/qtquick)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(KDDW_FRONTEND_QTWIDGETS)
|
||||||
|
add_subdirectory(examples/dockwidgets)
|
||||||
|
add_subdirectory(examples/minimal)
|
||||||
|
add_subdirectory(examples/mdi)
|
||||||
|
add_subdirectory(examples/mdi_with_docking)
|
||||||
|
set_compiler_flags(qtwidgets_dockwidgets)
|
||||||
|
set_compiler_flags(qtwidgets_minimal)
|
||||||
|
set_compiler_flags(qtwidgets_mdi_with_docking)
|
||||||
|
|
||||||
|
set_target_properties(
|
||||||
|
qtwidgets_dockwidgets PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples/"
|
||||||
|
)
|
||||||
|
set_target_properties(
|
||||||
|
qtwidgets_mdi_with_docking PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||||
|
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples/"
|
||||||
|
)
|
||||||
|
set_target_properties(
|
||||||
|
qtwidgets_mdi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples/"
|
||||||
|
)
|
||||||
|
set_target_properties(
|
||||||
|
qtwidgets_minimal PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples/"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(KDDockWidgets_TESTS)
|
||||||
|
if(KDDockWidgets_DEVELOPER_MODE)
|
||||||
|
add_subdirectory(tests)
|
||||||
|
|
||||||
|
# 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_docks0 COMMAND tests_launcher 0 5)
|
||||||
add_test(NAME tst_docks1 COMMAND tests_launcher 1 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_docks2 COMMAND tests_launcher 2 5)
|
||||||
@@ -311,32 +468,37 @@ if(${PROJECT_NAME}_IS_ROOT_PROJECT)
|
|||||||
add_test(NAME tst_docks19 COMMAND tests_launcher 18 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_docks20 COMMAND tests_launcher 19 5)
|
||||||
add_test(NAME tst_docks21 COMMAND tests_launcher 20 5) # one more for rounding leftovers
|
add_test(NAME tst_docks21 COMMAND tests_launcher 20 5) # one more for rounding leftovers
|
||||||
endif()
|
|
||||||
if(NOT ${PROJECT_NAME}_QTQUICK)
|
add_test(NAME tst_view COMMAND tst_view)
|
||||||
# tst_multisplitter depends on QWidget
|
add_test(NAME tst_window COMMAND tst_window)
|
||||||
|
add_test(NAME tst_platform COMMAND tst_platform)
|
||||||
|
add_test(NAME tst_viewguard COMMAND tst_viewguard)
|
||||||
|
add_test(NAME tst_group COMMAND tst_group)
|
||||||
|
add_test(NAME tst_titlebar COMMAND tst_titlebar)
|
||||||
|
add_test(NAME tst_stack COMMAND tst_stack)
|
||||||
|
add_test(NAME tst_tabbar COMMAND tst_tabbar)
|
||||||
|
add_test(NAME tst_separator COMMAND tst_separator)
|
||||||
|
add_test(NAME tst_floatingwindow COMMAND tst_floatingwindow)
|
||||||
|
add_test(NAME tst_dockwidget COMMAND tst_dockwidget)
|
||||||
add_test(NAME tst_multisplitter COMMAND tst_multisplitter)
|
add_test(NAME tst_multisplitter COMMAND tst_multisplitter)
|
||||||
endif()
|
|
||||||
|
|
||||||
|
if(KDDW_FRONTEND_QTWIDGETS)
|
||||||
|
add_test(NAME tst_qtwidgets COMMAND tst_qtwidgets)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(KDDW_FRONTEND_QTQUICK)
|
||||||
|
add_test(NAME tst_qtquick COMMAND tst_qtquick)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
if(${PROJECT_NAME}_DOCS)
|
|
||||||
add_subdirectory(docs) # needs to go last, in case there are build source files
|
|
||||||
else()
|
|
||||||
add_custom_target(docs
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Sorry, there is no docs target since KDDockWidgets_DOCS=OFF."
|
|
||||||
"Re-run cmake with the -DKDDockWidgets_DOCS=True option if you want to generate the documentation.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Add uninstall target
|
|
||||||
include(ECMUninstallTarget)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${PROJECT_NAME}_PYTHON_BINDINGS)
|
if(KDDockWidgets_DOCS)
|
||||||
if(CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR ${PROJECT_NAME}_STATIC)
|
add_subdirectory(docs) # needs to go last, in case there are build source files
|
||||||
message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.")
|
endif()
|
||||||
endif()
|
|
||||||
add_subdirectory(python)
|
if(KDDockWidgets_IS_ROOT_PROJECT)
|
||||||
|
# Add uninstall target (not for submodules since parent projects typically have uninstall too)
|
||||||
|
include(ECMUninstallTarget)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||||
|
|||||||
@@ -9,28 +9,47 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
"KDDockWidgets_FUZZER": "OFF",
|
||||||
"KDDockWidgets_FUZZER" : "OFF"
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick;dummy;gtk"
|
||||||
},
|
},
|
||||||
"warnings" : {
|
"warnings": {
|
||||||
"uninitialized" : true
|
"uninitialized": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "dev-gammaray",
|
"name": "dev-asan",
|
||||||
"displayName": "dev-gammaray",
|
"displayName": "dev-asan",
|
||||||
"description": "A Gammaray friendly build. (No ASAN)",
|
"description": "An ASAN/UBSAN build",
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"binaryDir": "${sourceDir}/build-dev-gammaray",
|
"binaryDir": "${sourceDir}/build-dev-asan",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
"KDDockWidgets_FUZZER" : "OFF"
|
"KDDockWidgets_FUZZER": "OFF",
|
||||||
|
"ECM_ENABLE_SANITIZERS": "'address;undefined'",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick;dummy;gtk"
|
||||||
},
|
},
|
||||||
"warnings" : {
|
"warnings": {
|
||||||
"uninitialized" : true
|
"uninitialized": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dev-lcov",
|
||||||
|
"displayName": "dev-lcov",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build-dev-lcov",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
|
"KDDockWidgets_FUZZER": "OFF",
|
||||||
|
"KDDockWidgets_CODE_COVERAGE": "ON",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
|
},
|
||||||
|
"warnings": {
|
||||||
|
"uninitialized": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -41,27 +60,12 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"KDDockWidgets_WERROR": "ON",
|
"KDDockWidgets_WERROR": "ON",
|
||||||
"KDDockWidgets_EXAMPLES" : "OFF"
|
"KDDockWidgets_EXAMPLES": "OFF",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick;dummy"
|
||||||
},
|
},
|
||||||
"environment": {
|
"environment": {
|
||||||
"CXX": "clazy",
|
"CXX": "clazy",
|
||||||
"CCACHE_DISABLE" : "ON"
|
"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"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -71,7 +75,8 @@
|
|||||||
"binaryDir": "${sourceDir}/build-release",
|
"binaryDir": "${sourceDir}/build-release",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"CMAKE_UNITY_BUILD" : "ON"
|
"CMAKE_UNITY_BUILD": "OFF",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -81,33 +86,9 @@
|
|||||||
"binaryDir": "${sourceDir}/build-release-no-x11extras",
|
"binaryDir": "${sourceDir}/build-release-no-x11extras",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"CMAKE_UNITY_BUILD" : "ON",
|
"CMAKE_UNITY_BUILD": "OFF",
|
||||||
"KDDockWidgets_X11EXTRAS" : "OFF"
|
"KDDockWidgets_X11EXTRAS": "OFF",
|
||||||
}
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "release-qtquick",
|
|
||||||
"displayName": "release-qtquick",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"binaryDir": "${sourceDir}/build-release-qtquick",
|
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
|
||||||
"KDDockWidgets_QTQUICK": "ON",
|
|
||||||
"CMAKE_UNITY_BUILD" : "ON"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "dev-qtquick",
|
|
||||||
"displayName": "dev-qtquick",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"binaryDir": "${sourceDir}/build-dev-qtquick",
|
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
|
||||||
"KDDockWidgets_QTQUICK": "ON",
|
|
||||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
|
||||||
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
|
|
||||||
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
|
||||||
"KDDockWidgets_FUZZER" : "OFF"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -118,7 +99,8 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"KDDockWidgets_PYTHON_BINDINGS": "ON",
|
"KDDockWidgets_PYTHON_BINDINGS": "ON",
|
||||||
"CMAKE_UNITY_BUILD" : "ON"
|
"CMAKE_UNITY_BUILD": "ON",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -129,19 +111,8 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"KDDockWidgets_STATIC": "ON",
|
"KDDockWidgets_STATIC": "ON",
|
||||||
"CMAKE_UNITY_BUILD" : "ON"
|
"CMAKE_UNITY_BUILD": "ON",
|
||||||
}
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "static-qtquick",
|
|
||||||
"displayName": "static-qtquick",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"binaryDir": "${sourceDir}/build-static-qtquick",
|
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
|
||||||
"KDDockWidgets_STATIC": "ON",
|
|
||||||
"KDDockWidgets_QTQUICK": "ON",
|
|
||||||
"CMAKE_UNITY_BUILD" : "ON"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -152,8 +123,9 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"KDDockWidgets_QT6": "ON",
|
"KDDockWidgets_QT6": "ON",
|
||||||
"CMAKE_UNITY_BUILD" : "ON",
|
"CMAKE_UNITY_BUILD": "OFF",
|
||||||
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
},
|
},
|
||||||
"environment": {
|
"environment": {
|
||||||
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
||||||
@@ -168,49 +140,32 @@
|
|||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"KDDockWidgets_QT6": "ON",
|
"KDDockWidgets_QT6": "ON",
|
||||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
|
"KDDockWidgets_FUZZER": "OFF",
|
||||||
"KDDockWidgets_FUZZER" : "OFF",
|
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}",
|
||||||
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
},
|
},
|
||||||
"environment": {
|
"environment": {
|
||||||
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "release-qtquick6",
|
"name": "dev-asan6",
|
||||||
"displayName": "release-qtquick6",
|
"displayName": "dev-asan6",
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"binaryDir": "${sourceDir}/build-release-qtquick6",
|
"binaryDir": "${sourceDir}/build-dev-asan6",
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
|
||||||
"KDDockWidgets_QTQUICK": "ON",
|
|
||||||
"KDDockWidgets_QT6": "ON",
|
|
||||||
"CMAKE_UNITY_BUILD" : "ON",
|
|
||||||
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
|
||||||
},
|
|
||||||
"environment": {
|
|
||||||
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "dev-qtquick6",
|
|
||||||
"displayName": "dev-qtquick6",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"binaryDir": "${sourceDir}/build-dev-qtquick6",
|
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"KDDockWidgets_QTQUICK": "ON",
|
"KDDockWidgets_QT6": "ON",
|
||||||
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
"ECM_ENABLE_SANITIZERS" : "'address;undefined'",
|
"ECM_ENABLE_SANITIZERS": "'address;undefined'",
|
||||||
"KDDockWidgets_QT6": "ON",
|
"KDDockWidgets_FUZZER": "OFF",
|
||||||
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
},
|
},
|
||||||
"environment": {
|
"environment": {
|
||||||
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}",
|
"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"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -221,30 +176,12 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
"KDDockWidgets_FUZZER" : "ON"
|
"KDDockWidgets_FUZZER": "ON",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
},
|
},
|
||||||
"warnings" : {
|
"warnings": {
|
||||||
"uninitialized" : true
|
"uninitialized": true
|
||||||
},
|
|
||||||
"environment": {
|
|
||||||
"CC": "clang-cl",
|
|
||||||
"CXX": "clang-cl"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "dev-qtquick-clangcl",
|
|
||||||
"displayName": "dev-qtquick-clangcl",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"binaryDir": "${sourceDir}/build-dev-qtquick-clangcl",
|
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
|
||||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
|
||||||
"KDDockWidgets_FUZZER" : "OFF",
|
|
||||||
"KDDockWidgets_QTQUICK": "ON"
|
|
||||||
},
|
|
||||||
"warnings" : {
|
|
||||||
"uninitialized" : true
|
|
||||||
},
|
},
|
||||||
"environment": {
|
"environment": {
|
||||||
"CC": "clang-cl",
|
"CC": "clang-cl",
|
||||||
@@ -259,12 +196,13 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
"KDDockWidgets_FUZZER" : "ON",
|
"KDDockWidgets_FUZZER": "ON",
|
||||||
"KDDockWidgets_QT6": "ON",
|
"KDDockWidgets_QT6": "ON",
|
||||||
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
},
|
},
|
||||||
"warnings" : {
|
"warnings": {
|
||||||
"uninitialized" : true
|
"uninitialized": true
|
||||||
},
|
},
|
||||||
"environment": {
|
"environment": {
|
||||||
"CC": "clang-cl",
|
"CC": "clang-cl",
|
||||||
@@ -273,27 +211,163 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "dev-qtquick-clangcl6",
|
"name": "dev-time-trace",
|
||||||
"displayName": "dev-qtquick-clangcl6",
|
"displayName": "dev-time-trace",
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"binaryDir": "${sourceDir}/build-dev-qtquick-clangcl6",
|
"binaryDir": "${sourceDir}/build-dev-time-trace",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
"KDDockWidgets_FUZZER" : "OFF",
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
"KDDockWidgets_QTQUICK": "ON",
|
"KDDockWidgets_FUZZER": "OFF",
|
||||||
"KDDockWidgets_QT6": "ON",
|
"CMAKE_C_FLAGS_INIT": "-ftime-trace",
|
||||||
"CMAKE_PREFIX_PATH" : "$env{QT6_DIR}"
|
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
},
|
},
|
||||||
"warnings" : {
|
"warnings": {
|
||||||
"uninitialized" : true
|
"uninitialized": true
|
||||||
},
|
},
|
||||||
"environment": {
|
"environment": {
|
||||||
"CC": "clang-cl",
|
"CC": "clang",
|
||||||
"CXX": "clang-cl",
|
"CXX": "clang++",
|
||||||
"PATH": "$env{QT6_DIR}/bin:$penv{PATH}",
|
"CCACHE_DISABLE": "ON"
|
||||||
"QML2_IMPORT_PATH" : "$env{QT6_DIR}/imports:$env{QT6_DIR}/qml",
|
}
|
||||||
"LD_LIBRARY_PATH" : "$env{QT6_DIR}/lib"
|
},
|
||||||
|
{
|
||||||
|
"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_FUZZER": "OFF",
|
||||||
|
"KDDockWidgets_QT6": "ON",
|
||||||
|
"CMAKE_C_FLAGS_INIT": "-ftime-trace",
|
||||||
|
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
|
},
|
||||||
|
"warnings": {
|
||||||
|
"uninitialized": true
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CC": "clang",
|
||||||
|
"CXX": "clang++",
|
||||||
|
"CCACHE_DISABLE": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-dev-qt5",
|
||||||
|
"displayName": "ci-dev-qt5",
|
||||||
|
"description": "Qt5 dev-mode build",
|
||||||
|
"binaryDir": "${sourceDir}/build-ci-dev-qt5",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-release-qt5",
|
||||||
|
"displayName": "ci-release-qt5",
|
||||||
|
"description": "Qt5 non dev-mode build",
|
||||||
|
"binaryDir": "${sourceDir}/build-ci-release-qt5",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-qtwidgets-qt5",
|
||||||
|
"displayName": "ci-qtwidgets-qt5",
|
||||||
|
"description": "Qt5 build which excludes QtQuick",
|
||||||
|
"binaryDir": "${sourceDir}/build-ci-qtwidgets-qt5",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-qtquick-qt5",
|
||||||
|
"displayName": "ci-qtquick-qt5",
|
||||||
|
"description": "Qt5 build which excludes QtWidgets",
|
||||||
|
"binaryDir": "${sourceDir}/build-ci-qtquick-qt5",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtquick"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-dummy",
|
||||||
|
"displayName": "ci-dummy",
|
||||||
|
"description": "Builds only the dummy frontend. Tests that build passes without Qt.",
|
||||||
|
"binaryDir": "${sourceDir}/build-ci-dummy",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_FRONTENDS": "dummy",
|
||||||
|
"KDDockWidgets_QT6": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-dev-qt6",
|
||||||
|
"displayName": "ci-dev-qt6",
|
||||||
|
"description": "Qt6 dev-mode",
|
||||||
|
"binaryDir": "${sourceDir}/build-ci-dev-qt6",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick",
|
||||||
|
"KDDockWidgets_QT6": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-release-qt6",
|
||||||
|
"description": "Qt6 non dev-mode",
|
||||||
|
"displayName": "ci-release-qt6",
|
||||||
|
"binaryDir": "${sourceDir}/build-ci-release-qt6",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_QT6": "ON",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-qtwidgets-qt6",
|
||||||
|
"description": "Qt6 build which excludes QtQuick",
|
||||||
|
"displayName": "ci-qtwidgets-qt6",
|
||||||
|
"binaryDir": "${sourceDir}/build-ci-qtwidgets-qt6",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"KDDockWidgets_QT6": "ON",
|
||||||
|
"KDDockWidgets_FRONTENDS": "qtwidgets"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-qtquick-qt6",
|
||||||
|
"description": "Qt6 build which excludes QtWidgets",
|
||||||
|
"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_FRONTENDS": "qtquick"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -302,16 +376,8 @@
|
|||||||
"name": "clazy",
|
"name": "clazy",
|
||||||
"configurePreset": "clazy",
|
"configurePreset": "clazy",
|
||||||
"environment": {
|
"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",
|
"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"
|
"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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
37
Changelog
37
Changelog
@@ -1,11 +1,38 @@
|
|||||||
* v1.5.0 (unreleased)
|
* v2.0.0 (unreleased)
|
||||||
|
- Architecture rewrite to support more frontends besides QtWidgets and QtQuick.
|
||||||
|
2.0 isn't very interesting for users, but will allow developers to make KDDW
|
||||||
|
support other GUI frameworks more easily. Also QtQuick is now better integrated,
|
||||||
|
without being shoehorned with ifdefs into the QtWidgets implementation.
|
||||||
|
- Split into a view/controller architecture
|
||||||
|
- Non-gui logic moved to controllers
|
||||||
|
- Each controller has a gui counter part, implemented for each supported frontend
|
||||||
|
- Uses nlohmann JSON library (MIT) instead of QJsonDocument, for saving/restoring layouts
|
||||||
|
- Added Config::setStartDragDistance()
|
||||||
|
|
||||||
|
* v1.6.0 (unreleased)
|
||||||
|
- Minimum Qt6 version is now 6.3.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"
|
- Install the Python bindings to "site-packages"
|
||||||
- The Python bindings for Qt6 use the "PyKDDockWidgetsQt6" namespace
|
- The Python bindings for Qt6 use the "PyKDDockWidgetsQt6" namespace
|
||||||
- Co-installable with Qt6
|
- Co-installable with Qt6
|
||||||
- Adds support for non-detachable central widget, MainWindowOption_HasCentralWidget. (#225)
|
- Adds support for non-detachable central widget, MainWindowOption_HasCentralWidget. (#225)
|
||||||
|
- Fix corrupt layout when restoring old JSON
|
||||||
* v1.4.1 (unreleased)
|
- Fix "Unpin" button not showing up in overlayed widgets
|
||||||
-
|
- Minimum Qt version is now 5.15
|
||||||
|
|
||||||
* v1.4.0 (16 July 2021)
|
* v1.4.0 (16 July 2021)
|
||||||
- No longer supports Qt versions less than 5.12
|
- No longer supports Qt versions less than 5.12
|
||||||
@@ -21,7 +48,7 @@
|
|||||||
- FloatingWindow now honours the dockwidget's max-size, if there's a single
|
- 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
|
dock widget docked. Tabbed cases are more difficult since QStackedLayout doesn't
|
||||||
propagate size constraints.
|
propagate size constraints.
|
||||||
- Added MainWindowBase::frameCountChanged()
|
- Added MainWindowBase::groupCountChanged()
|
||||||
- Introduced Config::setDropIndicatorsInhibited(), which allows you to disable support
|
- Introduced Config::setDropIndicatorsInhibited(), which allows you to disable support
|
||||||
for drop indicators while dragging.
|
for drop indicators while dragging.
|
||||||
- Fixed embedding the main window into a non-kddw main window (#204, #168)
|
- Fixed embedding the main window into a non-kddw main window (#204, #168)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
The KDDockWidgets software is Copyright (C) 2018-2021 Klaralvdalens Datakonsult AB.
|
The KDDockWidgets software is Copyright (C) 2018-2022 Klaralvdalens Datakonsult AB.
|
||||||
|
|
||||||
You may use, distribute and copy the KDDockWidgets software under the terms of
|
You may use, distribute and copy the KDDockWidgets software under the terms of
|
||||||
the GNU General Public License version 2 or under the terms of GNU General
|
the GNU General Public License version 2 or under the terms of GNU General
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
KDDockWidgets is (C) 2018-2021, Klarälvdalens Datakonsult AB, and is licensed
|
KDDockWidgets is (C) 2018-2022, Klarälvdalens Datakonsult AB, and is licensed
|
||||||
according to the terms of the:
|
according to the terms of the:
|
||||||
GNU General Public License version 2.0 (see LICENSES/GPL-2.0-only.txt)
|
GNU General Public License version 2.0 (see LICENSES/GPL-2.0-only.txt)
|
||||||
or the
|
or the
|
||||||
|
|||||||
9
LICENSES/MIT.txt
Normal file
9
LICENSES/MIT.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) <year> <copyright holders>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
Supported Qt versions and toolchains
|
# KDDockWidgets and QtQuick
|
||||||
=====================================
|
|
||||||
|
|
||||||
KDDockWidgets for QtQuick requires a C++17 capable compiler and either
|
## Supported Qt versions and toolchains
|
||||||
Qt >= 5.15.0 or Qt >= 6.2.
|
|
||||||
|
|
||||||
|
KDDockWidgets for QtQuick requires a C++17 capable compiler and Qt >= 6.2.1.
|
||||||
|
|
||||||
TROUBLESHOOTING
|
Qt 5.15.2 will probably also work, but it's not built and tested by KDAB CI, we
|
||||||
===============
|
advise users to move to Qt6 as soon as possible.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
- QtGraphicalEffects is not supported, as it's buggy when moving between different QWindows.
|
- QtGraphicalEffects is not supported, as it's buggy when moving between different QWindows.
|
||||||
See for example QTBUG-94943, KDDockWidgets issue #213. Also search the Qt bug tracker
|
See for example QTBUG-94943, KDDockWidgets issue #213. Also search the Qt bug tracker
|
||||||
|
|||||||
@@ -1,33 +1,40 @@
|
|||||||
WebAssembly
|
# KDDockWidgets with WebAssembly
|
||||||
===========
|
|
||||||
|
|
||||||
KDDockWidgets works with WebAssembly with the following known limitations:
|
KDDockWidgets works with WebAssembly with the following known limitations:
|
||||||
|
|
||||||
- Classic drop indicators are not supported, only the segmented ones. This is because
|
- 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.
|
- 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)
|
- 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)
|
- Link to KDDW (libkddockwidgets.a, or similar)
|
||||||
|
|
||||||
- As the build is static, don't forget to initialize KDDW's resources:
|
- As the build is static, don't forget to initialize KDDW's resources:
|
||||||
```
|
|
||||||
#ifdef QT_STATIC
|
```cpp
|
||||||
Q_INIT_RESOURCE(kddockwidgets_resources);
|
#ifdef QT_STATIC
|
||||||
#endif
|
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.
|
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,
|
Wayland works very differently than traditional desktops and imposes us some,
|
||||||
limitations. Here's a list of different behaviours which KDDockWidgets will have
|
limitations. Here's a list of different behaviours which KDDockWidgets will have
|
||||||
when running on Wayland:
|
when running on Wayland:
|
||||||
|
|
||||||
|
|
||||||
- A title bar can either be used for drag&dock or for moving the window around.
|
- 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.
|
- For this reason, floating windows now have two title bars.
|
||||||
@@ -28,7 +28,5 @@ when running on Wayland:
|
|||||||
- Kwin specific:
|
- Kwin specific:
|
||||||
- The pixmap that's shown during a drag can't be bigger than 250x250. Might be a bug.
|
- 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
|
All in all it's pretty decent and usable. Any further improvements should be done at the server or
|
||||||
protocol level now.
|
protocol level now.
|
||||||
|
|||||||
@@ -1,26 +1,29 @@
|
|||||||
|
# KDDockWidgets and Python bindings
|
||||||
|
|
||||||
These are the instructions for building the Python bindings for KDDockWidgets.
|
These are the instructions for building the Python bindings for KDDockWidgets.
|
||||||
|
|
||||||
Make sure you have PySide2, shiboken2 and shiboken2-generator installed.
|
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.
|
As this time, you cannot get shiboken2-generator because the wheels are not on PyPi.
|
||||||
To use the wheels do this:
|
To use the wheels do this:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
% pip3 install \
|
% pip3 install \
|
||||||
--index-url=http://download.qt.io/official_releases/QtForPython/ \
|
--index-url=http://download.qt.io/official_releases/QtForPython/ \
|
||||||
--trusted-host download.qt.io \
|
--trusted-host download.qt.io \
|
||||||
shiboken2 pyside2 shiboken2_generator
|
shiboken2 pyside2 shiboken2_generator
|
||||||
```
|
```
|
||||||
|
|
||||||
For more info visit https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html
|
For more info visit <https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html>.
|
||||||
|
|
||||||
afterwards run 'pip3 list | grep PySide2'
|
afterwards run 'pip3 list | grep PySide2'
|
||||||
Note the version *must* match the same Qt you intend to use when building KDDockWidgets.
|
Note the version *must* match the same Qt you intend to use when building KDDockWidgets.
|
||||||
|
|
||||||
Not supported:
|
Not supported:
|
||||||
- Debug builds
|
|
||||||
- static builds
|
- debug builds
|
||||||
- python2 bindings
|
- static builds
|
||||||
- only some 32-bit platforms are supported. see https://wiki.qt.io/Qt_for_Python
|
- python2 bindings
|
||||||
|
- only some 32-bit platforms are supported (see <https://wiki.qt.io/Qt_for_Python>)
|
||||||
|
|
||||||
Tell CMake to build the bindings by passing the `-DKDDockWidgets_PYTHON_BINDINGS=True' option,
|
Tell CMake to build the bindings by passing the `-DKDDockWidgets_PYTHON_BINDINGS=True' option,
|
||||||
followed by the make command.
|
followed by the make command.
|
||||||
@@ -33,42 +36,42 @@ to CMake (adjust to the python path on your system).
|
|||||||
|
|
||||||
To run the KDDW python example
|
To run the KDDW python example
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ export PYTHONPATH=/kddw/install/path # Only if needed
|
export PYTHONPATH=/kddw/install/path # Only if needed
|
||||||
$ cd python/examples/
|
cd python/examples/
|
||||||
$ rcc -g python -o rc_assets.py ../../examples/dockwidgets/resources_example.qrc
|
rcc -g python -o rc_assets.py ../../examples/dockwidgets/resources_example.qrc
|
||||||
$ python3 main.py
|
python3 main.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Build Issues
|
Build Issues
|
||||||
|
|
||||||
* If you see errors like "Unable to locate Clang's built-in include directory"
|
- If you see errors like "Unable to locate Clang's built-in include directory"
|
||||||
then first make sure you have llvm installed. If you still have problems try
|
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.
|
setting the environment variable `LLVM_INSTALL_DIR` to point to your llvm installation.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
export LLVM_INSTALL_DIR=/usr/local/opt/llvm-11
|
export LLVM_INSTALL_DIR=/usr/local/opt/llvm-11
|
||||||
set "LLVM_INSTALL_DIR=C:\Program Files\LLVM" #Windows
|
set "LLVM_INSTALL_DIR=C:\Program Files\LLVM" #Windows
|
||||||
```
|
```
|
||||||
|
|
||||||
* When building the examples you may encounter errors loading shared libraries from shiboken2_generator.
|
- When building the examples you may encounter errors loading shared libraries from shiboken2_generator.
|
||||||
|
|
||||||
Try:
|
Try:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
export LD_LIBRARY_PATH=/usr/local/lib/python/dist-packages/PySide2/Qt/lib #linux
|
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
|
export DYLD_LIBRARY_PATH=/usr/local/lib/python/dist-packages/PySide2/Qt/lib #Mac
|
||||||
#adjust to wherever your PySide is installed
|
(Adjust to wherever your PySide is installed)
|
||||||
```
|
```
|
||||||
|
|
||||||
* On Windows the `libclang.dll` that ship with QtForPython is not compatible with MSVC2019.
|
- 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:
|
To fix this, copy the `libclang.dll` that comes with llvm into shiboken2, like so:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cd C:\Python37\Lib\site-packages\shiboken2_generator
|
cd C:\Python37\Lib\site-packages\shiboken2_generator
|
||||||
copy libclang.dll libclang.dll.save
|
copy libclang.dll libclang.dll.save
|
||||||
copy "C:\Program Files\llvm\bin\libclang.dll" libclang.dll
|
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
|
(Python3 installation in C:\Python37 and llvm in c:\Program Files\llvm. adjust as needed)
|
||||||
```
|
```
|
||||||
|
|||||||
157
README.md
157
README.md
@@ -1,7 +1,11 @@
|
|||||||
|
# KDDockWidgets
|
||||||
|
|
||||||
[](https://travis-ci.com/KDAB/KDDockWidgets)
|
[](https://travis-ci.com/KDAB/KDDockWidgets)
|
||||||
|
|
||||||
KDDockWidgets
|
> ⚠️⚠️: 2.0 is under development, there might be API breaks before release.
|
||||||
=============
|
> Stick with version 1.6 if you're using QtWidgets. However, if you're using
|
||||||
|
> QtQuick it's better to base on 2.0, as 1.6 won't be receiving much QtQuick development.
|
||||||
|
|
||||||
`KDDockWidgets` is a Qt dock widget library written by KDAB, suitable for replacing
|
`KDDockWidgets` is a Qt dock widget library written by KDAB, suitable for replacing
|
||||||
`QDockWidget` and implementing advanced functionalities missing in Qt.
|
`QDockWidget` and implementing advanced functionalities missing in Qt.
|
||||||
|
|
||||||
@@ -9,9 +13,8 @@ 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
|
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.
|
to expose every internal widget and every knob for the app developer to tune.
|
||||||
|
|
||||||
|
## Motivation
|
||||||
|
|
||||||
Motivation
|
|
||||||
==========
|
|
||||||
Throughout the years KDAB contributed and funded bug fixes and features to `QDockWidget`.
|
Throughout the years KDAB contributed and funded bug fixes and features to `QDockWidget`.
|
||||||
Sadly, this was very painful. Each bug fix or feature took many days of implementation,
|
Sadly, this was very painful. Each bug fix or feature took many days of implementation,
|
||||||
and an equal number of days just to fix dozens of regressions.
|
and an equal number of days just to fix dozens of regressions.
|
||||||
@@ -22,15 +25,15 @@ creative with their requests, so it was clear we needed a better docking framewo
|
|||||||
|
|
||||||
You will find more information in these places:
|
You will find more information in these places:
|
||||||
|
|
||||||
* [our official home page](https://www.kdab.com/development-resources/qt-tools/kddockwidgets)
|
- [our official home page](https://www.kdab.com/development-resources/qt-tools/kddockwidgets)
|
||||||
* [online detailed browsable API reference](https://docs.kdab.com/kddockwidgets)
|
- [online detailed browsable API reference](https://docs.kdab.com/kddockwidgets)
|
||||||
* [our example programs](examples/)
|
- [our example programs](examples/)
|
||||||
|
|
||||||
We also have an [in browser demo](https://demos.kdab.com/wasm/kddockwidgets/dockwidgets.html). Note
|
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.
|
however that this demo isn't fully featured, as it's running on Qt for WebAssembly.
|
||||||
|
|
||||||
Features
|
## Features
|
||||||
========
|
|
||||||
- Provide advanced docking that QDockWidget 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)
|
- Native window resize on Windows (allowing for Aero-snap even with custom title bar decorations)
|
||||||
- Arrow drop indicators for great drop precision
|
- Arrow drop indicators for great drop precision
|
||||||
@@ -66,55 +69,79 @@ Features
|
|||||||
- Optional minimize and maximize button on the title bar
|
- Optional minimize and maximize button on the title bar
|
||||||
- FloatingWindows can be utility windows or full native
|
- FloatingWindows can be utility windows or full native
|
||||||
|
|
||||||
Screen capture
|
## Screen capture
|
||||||
==============
|
|
||||||

|

|
||||||
|
|
||||||
|
## Building and requirements
|
||||||
|
|
||||||
Trying out the examples
|
To build KDDockWidgets you'll need:
|
||||||
=======================
|
|
||||||
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),
|
- CMake
|
||||||
which might be more indicated to learn the API, as it's less overwhelming than the full demo.
|
- Qt 5.15.x or Qt6 >= 6.2
|
||||||
|
- Ninja (Other generators might work but are untested)
|
||||||
|
- C++17 capable compiler. Minimum VS2019 on Windows.
|
||||||
|
- 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.
|
Make sure you have cmake, ninja, compiler, Qt, etc in PATH.
|
||||||
|
|
||||||
Adapt the instructions to suit your cmake generator and operating system.
|
Adapt the instructions to suit your cmake generator and operating system.
|
||||||
Build and install the KDDockWidgets framework:
|
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/path/where/to/install ../path/to/kddockwidgets
|
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/path/where/to/install ../path/to/kddockwidgets
|
||||||
$ cmake --build .
|
cmake --build .
|
||||||
$ cmake --build . --target install
|
cmake --build . --target install
|
||||||
```
|
```
|
||||||
|
|
||||||
Now build and run the example:
|
Now build and run the example:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ cd path/to/kddockwidgets/examples/dockwidgets/
|
cd path/to/kddockwidgets/examples/dockwidgets/
|
||||||
$ cmake -G Ninja -DCMAKE_PREFIX_PATH=/path/where/to/install
|
cmake -G Ninja -DCMAKE_PREFIX_PATH=/path/where/to/install
|
||||||
$ cmake --build .
|
cmake --build .
|
||||||
$ ./kddockwidgets_example
|
./bin/examples/qtwidgets_dockwidgets
|
||||||
```
|
```
|
||||||
|
|
||||||
The installation directory defaults to `c:\KDAB\KDDockWidgets-<version>` on Windows
|
The installation directory defaults to `c:\KDAB\KDDockWidgets-<version>` on Windows
|
||||||
and `/usr/local/KDAB/KDDockWidgets-<version>` on non-Windows.
|
and `/usr/local/KDAB/KDDockWidgets-<version>` on non-Windows.
|
||||||
|
|
||||||
You can change the installation location by passing the option `-DCMAKE_INSTALL_PREFIX=/install/path` to cmake.
|
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
|
||||||
|
|
||||||
Using
|
|
||||||
=====
|
|
||||||
From your CMake Qt5 project, add
|
From your CMake Qt5 project, add
|
||||||
|
|
||||||
```
|
```cmake
|
||||||
find_package(KDDockWidgets CONFIG)
|
find_package(KDDockWidgets CONFIG)
|
||||||
```
|
```
|
||||||
|
|
||||||
or for Qt6
|
or for Qt6
|
||||||
|
|
||||||
```
|
```cmake
|
||||||
find_package(KDDockWidgets-qt6 CONFIG)
|
find_package(KDDockWidgets-qt6 CONFIG)
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -124,58 +151,56 @@ That's all you need to do (the imported target also brings in the include direct
|
|||||||
You may also need to modify the `CMAKE_PREFIX_PATH` environment variable depending
|
You may also need to modify the `CMAKE_PREFIX_PATH` environment variable depending
|
||||||
on where you installed KDDockWidgets.
|
on where you installed KDDockWidgets.
|
||||||
|
|
||||||
|
## Python Bindings
|
||||||
|
|
||||||
Python Bindings
|
|
||||||
================
|
|
||||||
Please refer to [README-bindings.md](README-bindings.md).
|
Please refer to [README-bindings.md](README-bindings.md).
|
||||||
|
|
||||||
Versioning
|
## Versioning
|
||||||
==========
|
|
||||||
|
|
||||||
New features go to master while the stable branch only accepts non-intrusive bug fixes.
|
New features go to master while the stable branch only accepts non-intrusive bug fixes.
|
||||||
|
|
||||||
We'll try to remain source-compatible across versions. API will get a deprecation
|
We'll try to remain source and binary compatible across versions. API will get
|
||||||
notice before being removed in the next version. Note that this source-compatibility
|
a deprecation notice before being removed in the next version. Note that this
|
||||||
effort is only for the public API. Private API (headers ending in _p.h) might change so you
|
compatibility effort is only for the public API. Private API (headers ending
|
||||||
shouldn't depend on them. Private API is only exposed so more advanced users can
|
in _p.h) might change so you shouldn't depend on them. Private API is only
|
||||||
override, for example `paintEvent()`, and not so they can change internal business logic.
|
exposed so more advanced users can override, for example `paintEvent()`, and
|
||||||
|
not so they can change internal business logic.
|
||||||
|
|
||||||
We don't promise or test binary compatibility. It's advised that you recompile
|
We don't promise or test binary compatibility. It's advised that you recompile
|
||||||
your application whenever updating KDDW.
|
your application whenever updating KDDW.
|
||||||
|
|
||||||
|
## Styling
|
||||||
|
|
||||||
Supported Qt versions and toolchains
|
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 ViewFactory. Run
|
||||||
KDDockWidgets requires Qt5 >= 5.12 or Qt6 >= 6.1.
|
"examples/qtwidgets_dockwidgets -p" to see that in action.
|
||||||
The QtQuick support requires Qt5 >= 5.15 or Qt6 >= 6.1.
|
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
Regarding compilers, whatever toolchain is able to build Qt 5.9 should also be
|
Warning: When using private headers, be sure to rebuild your application whenever you
|
||||||
fine. Note however that MSVC 2013 isn't supported anymore due to compiler crashes.
|
update to a new KDDW version. Binary compatibility is only kept when using public
|
||||||
|
headers.
|
||||||
|
|
||||||
|
## Licensing
|
||||||
|
|
||||||
Licensing
|
KDDockWidgets is (C) 2019-2022, Klarälvdalens Datakonsult AB, and is licensed according to
|
||||||
=========
|
|
||||||
KDDockWidgets is (C) 2019-2021, 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).
|
the terms of the [GPL 2.0](LICENSES/GPL-2.0-only.txt) or [GPL 3.0](LICENSES/GPL-3.0-only.txt).
|
||||||
|
|
||||||
Contact KDAB at <info@kdab.com> to inquire about commercial licensing.
|
Contact KDAB at <info@kdab.com> to inquire about commercial licensing.
|
||||||
|
|
||||||
|
## Get Involved
|
||||||
|
|
||||||
Get Involved
|
Please submit your issue reports to our GitHub space at <https://github.com/KDAB/KDDockWidgets>.
|
||||||
============
|
|
||||||
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/`
|
||||||
When reporting bugs please make it easy for the maintainer to reproduce it. Use `examples/minimal/` or
|
or `examples/dockwidgets/` for reproducing the problem. If you did modifications to the example
|
||||||
`examples/dockwidgets/` for reproducing the problem. If you did modifications to the example in order to
|
in order to reproduce then please attach the *patch* and not a picture of your changes. You can
|
||||||
reproduce then please attach the *patch* and not a picture of your changes. You can get a patch by doing
|
get a patch by doing `git diff > repro.diff` at the repo root.
|
||||||
`git diff > repro.diff` at the repo root.
|
|
||||||
|
|
||||||
Also state which KDDW sha1, branch or version you're using, and which operating system.
|
Also state which KDDW sha1, branch or version you're using, and which operating system.
|
||||||
|
|
||||||
|
|
||||||
KDAB will happily accept external contributions; however, **all** contributions require a
|
KDAB will happily accept external contributions; however, **all** contributions require a
|
||||||
signed [Copyright Assignment Agreement](docs/KDDockWidgets-CopyrightAssignmentForm.pdf).
|
signed [Copyright Assignment Agreement](docs/KDDockWidgets-CopyrightAssignmentForm.pdf).
|
||||||
|
|
||||||
@@ -185,8 +210,8 @@ Contact info@kdab.com for more information.
|
|||||||
|
|
||||||
Thanks to our [contributors](CONTRIBUTORS.txt).
|
Thanks to our [contributors](CONTRIBUTORS.txt).
|
||||||
|
|
||||||
About KDAB
|
## About KDAB
|
||||||
==========
|
|
||||||
KDDockWidgets is supported and maintained by Klarälvdalens Datakonsult AB (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
|
The KDAB Group is the global No.1 software consultancy for Qt, C++ and
|
||||||
@@ -198,10 +223,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
|
to the Qt Project. We can give advanced or standard trainings anywhere
|
||||||
around the globe on Qt as well as C++, OpenGL, 3D and more.
|
around the globe on Qt as well as C++, OpenGL, 3D and more.
|
||||||
|
|
||||||
Please visit https://www.kdab.com to meet the people who write code like this.
|
Please visit <https://www.kdab.com> to meet the people who write code like this.
|
||||||
|
|
||||||
Stay up-to-date with KDAB product announcements:
|
Stay up-to-date with KDAB product announcements:
|
||||||
|
|
||||||
* [KDAB Newsletter](https://news.kdab.com)
|
- [KDAB Newsletter](https://news.kdab.com)
|
||||||
* [KDAB Blogs](https://www.kdab.com/category/blogs)
|
- [KDAB Blogs](https://www.kdab.com/category/blogs)
|
||||||
* [KDAB on Twitter](https://twitter.com/KDABQt)
|
- [KDAB on Twitter](https://twitter.com/KDABQt)
|
||||||
|
|||||||
34
appveyor.yml
34
appveyor.yml
@@ -9,6 +9,7 @@ version: 1.0.{build}-{branch}
|
|||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- gh-pages
|
- gh-pages
|
||||||
|
- wip/gtk_window
|
||||||
|
|
||||||
# Do not build on tags (GitHub and BitBucket)
|
# Do not build on tags (GitHub and BitBucket)
|
||||||
skip_tags: false
|
skip_tags: false
|
||||||
@@ -19,6 +20,8 @@ skip_tags: false
|
|||||||
|
|
||||||
# Build worker image
|
# Build worker image
|
||||||
image:
|
image:
|
||||||
|
- Ubuntu2004
|
||||||
|
- macos
|
||||||
- Visual Studio 2019
|
- Visual Studio 2019
|
||||||
|
|
||||||
# scripts that are called at very beginning, before repo cloning
|
# scripts that are called at very beginning, before repo cloning
|
||||||
@@ -36,16 +39,32 @@ platform:
|
|||||||
# build Configuration, i.e. Debug, Release, etc.
|
# build Configuration, i.e. Debug, Release, etc.
|
||||||
configuration:
|
configuration:
|
||||||
- Release
|
- Release
|
||||||
|
- Debug
|
||||||
|
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
- useqt6: False
|
||||||
|
- useqt6: True
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
|
- 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
|
||||||
- set QTDIR=C:\Qt\5.15\msvc2019_64
|
|
||||||
- set PATH=%QTDIR%\bin;%PATH%
|
before_build:
|
||||||
|
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||||
|
- cmd: set PATH=C:\Qt\6.3\msvc2019_64\bin;C:\Qt\5.15\msvc2019_64\bin;%PATH%
|
||||||
|
- sh: export QT_QUICK_BACKEND=software
|
||||||
|
- sh: if [ "`uname -s`" = "Darwin" ]; then export PATH=$HOME/Qt/6.3/macos/bin:$HOME/Qt/5.15/clang_64/bin:$PATH; else export PATH=$HOME/Qt/6.3/gcc_64/bin:$HOME/Qt/5.15/gcc_64/bin:$PATH; fi
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DKDDockWidgets_TESTS=True -DKDDockWidgets_EXAMPLES=True -DKDDockWidgets_DEVELOPER_MODE=True ..
|
- cmd: cmake -G Ninja -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DKDDockWidgets_QT6=%useqt6% -DKDDockWidgets_TESTS=True -DKDDockWidgets_EXAMPLES=True -DKDDockWidgets_DEVELOPER_MODE=True ..
|
||||||
- nmake
|
- 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 . -V
|
||||||
|
|
||||||
# to disable automatic builds
|
# to disable automatic builds
|
||||||
#build: off
|
#build: off
|
||||||
@@ -54,11 +73,8 @@ build_script:
|
|||||||
# tests configuration #
|
# tests configuration #
|
||||||
#---------------------------------#
|
#---------------------------------#
|
||||||
|
|
||||||
test_script:
|
|
||||||
- nmake test
|
|
||||||
|
|
||||||
# to disable automatic tests
|
# to disable automatic tests
|
||||||
#test: off
|
test: off
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------#
|
#---------------------------------#
|
||||||
|
|||||||
@@ -22,24 +22,24 @@ Generate C/C++ CamelCase forwarding headers.
|
|||||||
[COMMON_HEADER <HeaderName>]
|
[COMMON_HEADER <HeaderName>]
|
||||||
[RELATIVE <relative_path>])
|
[RELATIVE <relative_path>])
|
||||||
|
|
||||||
For each CamelCase header name passed to HEADER_NAMES, a file of that name
|
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,
|
will be generated that will include a version with ``.h`` or, if set,
|
||||||
``.<header_extension>`` appended.
|
``.<header_extension>`` appended.
|
||||||
For example, the generated header ``ClassA`` will include ``classa.h`` (or
|
For example, the generated header ``ClassA`` will include ``classa.h`` (or
|
||||||
``ClassA.h``, see ORIGINAL).
|
``ClassA.h``, see ``ORIGINAL``).
|
||||||
If a CamelCaseName consists of multiple comma-separated files, e.g.
|
If a CamelCaseName consists of multiple comma-separated files, e.g.
|
||||||
``ClassA,ClassB,ClassC``, then multiple camelcase header files will be
|
``ClassA,ClassB,ClassC``, then multiple camelcase header files will be
|
||||||
generated which are redirects to the first header file.
|
generated which are redirects to the first header file.
|
||||||
The file locations of these generated headers will be stored in
|
The file locations of these generated headers will be stored in
|
||||||
<camelcase_forwarding_headers_var>.
|
<camelcase_forwarding_headers_var>.
|
||||||
|
|
||||||
ORIGINAL specifies how the name of the original header is written: lowercased
|
``ORIGINAL`` specifies how the name of the original header is written: lowercased
|
||||||
or also camelcased. The default is LOWERCASE. Since 1.8.0.
|
or also camelcased. The default is "LOWERCASE". Since 1.8.0.
|
||||||
|
|
||||||
HEADER_EXTENSION specifies what file name extension is used for the header
|
``HEADER_EXTENSION`` specifies what file name extension is used for the header
|
||||||
files. The default is "h". Since 5.48.0.
|
files. The default is "h". Since 5.48.0.
|
||||||
|
|
||||||
PREFIX places the generated headers in subdirectories. This should be a
|
``PREFIX`` places the generated headers in subdirectories. This should be a
|
||||||
CamelCase name like ``KParts``, which will cause the CamelCase forwarding
|
CamelCase name like ``KParts``, which will cause the CamelCase forwarding
|
||||||
headers to be placed in the ``KParts`` directory (e.g. ``KParts/Part``). It
|
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
|
will also, for the convenience of code in the source distribution, generate
|
||||||
@@ -47,36 +47,36 @@ forwarding headers based on the original names (e.g. ``kparts/part.h``). This
|
|||||||
allows includes like ``"#include <kparts/part.h>"`` to be used before
|
allows includes like ``"#include <kparts/part.h>"`` to be used before
|
||||||
installation, as long as the include_directories are set appropriately.
|
installation, as long as the include_directories are set appropriately.
|
||||||
|
|
||||||
OUTPUT_DIR specifies where the files will be generated; this should be within
|
``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.
|
the build directory. By default, ``${CMAKE_CURRENT_BINARY_DIR}`` will be used.
|
||||||
This option can be used to avoid file conflicts.
|
This option can be used to avoid file conflicts.
|
||||||
|
|
||||||
REQUIRED_HEADERS specifies an output variable name where all the required
|
``REQUIRED_HEADERS`` specifies an output variable name where all the required
|
||||||
headers will be appended so that they can be installed together with the
|
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
|
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
|
header to a project only requires specifying the CamelCase variant in the
|
||||||
CMakeLists.txt file; the original variant will then be added to this
|
CMakeLists.txt file; the original variant will then be added to this
|
||||||
variable.
|
variable.
|
||||||
|
|
||||||
COMMON_HEADER generates an additional convenience header which includes all
|
``COMMON_HEADER`` generates an additional convenience header which includes all
|
||||||
other header files.
|
other header files.
|
||||||
|
|
||||||
The RELATIVE argument indicates where the original headers can be found
|
The ``RELATIVE`` argument indicates where the original headers can be found
|
||||||
relative to CMAKE_CURRENT_SOURCE_DIR. It does not affect the generated
|
relative to ``CMAKE_CURRENT_SOURCE_DIR``. It does not affect the generated
|
||||||
CamelCase forwarding files, but ecm_generate_headers() uses it when checking
|
CamelCase forwarding files, but ``ecm_generate_headers()`` uses it when checking
|
||||||
that the original header exists, and to generate originally named forwarding
|
that the original header exists, and to generate originally named forwarding
|
||||||
headers when PREFIX is set.
|
headers when ``PREFIX`` is set.
|
||||||
|
|
||||||
To allow other parts of the source distribution (eg: tests) to use the
|
To allow other parts of the source distribution (eg: tests) to use the
|
||||||
generated headers before installation, it may be desirable to set the
|
generated headers before installation, it may be desirable to set the
|
||||||
INCLUDE_DIRECTORIES property for the library target to output_dir. For
|
``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
|
example, if ``OUTPUT_DIR`` is ``CMAKE_CURRENT_BINARY_DIR`` (the default), you could do
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
target_include_directories(MyLib PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
|
target_include_directories(MyLib PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
|
||||||
|
|
||||||
Example usage (without PREFIX):
|
Example usage (without ``PREFIX``):
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ Example usage (without PREFIX):
|
|||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
|
||||||
COMPONENT Devel)
|
COMPONENT Devel)
|
||||||
|
|
||||||
Example usage (with PREFIX):
|
Example usage (with ``PREFIX``):
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ the default qmake ``mkspecs`` directory or of a directory that will be in the
|
|||||||
[VERSION <version>] # since 5.83
|
[VERSION <version>] # since 5.83
|
||||||
[DEPS "<dep> [<dep> [...]]"]
|
[DEPS "<dep> [<dep> [...]]"]
|
||||||
[FILENAME_VAR <filename_variable>]
|
[FILENAME_VAR <filename_variable>]
|
||||||
[INCLUDE_INSTALL_DIR <dir>]
|
[INCLUDE_INSTALL_DIRS <dir> [<dir> [...]]] # since 5.92
|
||||||
|
[INCLUDE_INSTALL_DIR <dir>] # deprecated since 5.92
|
||||||
[LIB_INSTALL_DIR <dir>])
|
[LIB_INSTALL_DIR <dir>])
|
||||||
|
|
||||||
If your CMake project produces a Qt-based library, you may expect there to be
|
If your CMake project produces a Qt-based library, you may expect there to be
|
||||||
@@ -36,31 +37,34 @@ library convenient for them, in much the same way that CMake config files make
|
|||||||
things convenient for CMake-based applications. ``ecm_generate_pri_file()``
|
things convenient for CMake-based applications. ``ecm_generate_pri_file()``
|
||||||
generates just such a file.
|
generates just such a file.
|
||||||
|
|
||||||
VERSION specifies the version of the library the ``.pri`` file describes. If
|
``VERSION`` specifies the version of the library the ``.pri`` file describes. If
|
||||||
not set, the value is taken from the context variable ``PROJECT_VERSION``.
|
not set, the value is taken from the context variable ``PROJECT_VERSION``.
|
||||||
This variable is usually set by the ``project(... VERSION ...)`` command or,
|
This variable is usually set by the ``project(... VERSION ...)`` command or,
|
||||||
if CMake policy CMP0048 is not NEW, by :module:`ECMSetupVersion`.
|
if CMake policy CMP0048 is not ``NEW``, by :module:`ECMSetupVersion`.
|
||||||
For backward-compatibility with older ECM versions the
|
For backward-compatibility with older ECM versions the
|
||||||
``PROJECT_VERSION_STRING`` variable as set by :module:`ECMSetupVersion`
|
``PROJECT_VERSION_STRING`` variable as set by :module:`ECMSetupVersion`
|
||||||
will be preferred over ``PROJECT_VERSION`` if set, unless the minimum
|
will be preferred over ``PROJECT_VERSION`` if set, unless the minimum
|
||||||
required version of ECM is 5.83 and newer. Since 5.83.
|
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
|
``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
|
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
|
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
|
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"
|
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
|
for QtCore). ``FILENAME_VAR`` specifies the name of a variable to store the path
|
||||||
to the generated file in.
|
to the generated file in.
|
||||||
|
|
||||||
INCLUDE_INSTALL_DIR is the path (relative to ``CMAKE_INSTALL_PREFIX``) that
|
``INCLUDE_INSTALL_DIRS`` are the paths (relative to ``CMAKE_INSTALL_PREFIX``) that
|
||||||
include files will be installed to. It defaults to
|
include files will be installed to. It defaults to
|
||||||
``${INCLUDE_INSTALL_DIR}/<baseName>`` if the ``INCLUDE_INSTALL_DIR`` variable
|
``${INCLUDE_INSTALL_DIR}/<baseName>`` if the ``INCLUDE_INSTALL_DIR`` variable
|
||||||
is set. If that variable is not set, the ``CMAKE_INSTALL_INCLUDEDIR`` 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
|
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
|
operates similarly for the installation location for libraries; it defaults to
|
||||||
``${LIB_INSTALL_DIR}``, ``${CMAKE_INSTALL_LIBDIR}`` or ``lib``, in that order.
|
``${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:
|
Example usage:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
@@ -85,19 +89,19 @@ Since pre-1.0.0.
|
|||||||
|
|
||||||
# Replicate the logic from KDEInstallDirs.cmake as we can't depend on it
|
# Replicate the logic from KDEInstallDirs.cmake as we can't depend on it
|
||||||
# Ask qmake if we're using the same prefix as Qt
|
# 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)
|
if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS)
|
||||||
include(ECMQueryQmake)
|
include(ECMQueryQt)
|
||||||
query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX TRY)
|
ecm_query_qt(qt_install_prefix_dir QT_INSTALL_PREFIX TRY)
|
||||||
if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
||||||
set(_askqmake ON)
|
set(_should_query_qt ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(KDE_INSTALL_USE_QT_SYS_PATHS OR _askqmake)
|
if(KDE_INSTALL_USE_QT_SYS_PATHS OR _should_query_qt)
|
||||||
include(ECMQueryQmake)
|
include(ECMQueryQt)
|
||||||
query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX)
|
ecm_query_qt(qt_install_prefix_dir QT_INSTALL_PREFIX)
|
||||||
query_qmake(qt_host_data_dir QT_HOST_DATA)
|
ecm_query_qt(qt_host_data_dir QT_HOST_DATA)
|
||||||
if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
||||||
file(RELATIVE_PATH qt_host_data_dir ${qt_install_prefix_dir} ${qt_host_data_dir})
|
file(RELATIVE_PATH qt_host_data_dir ${qt_install_prefix_dir} ${qt_host_data_dir})
|
||||||
endif()
|
endif()
|
||||||
@@ -114,7 +118,7 @@ endif()
|
|||||||
function(ECM_GENERATE_PRI_FILE)
|
function(ECM_GENERATE_PRI_FILE)
|
||||||
set(options )
|
set(options )
|
||||||
set(oneValueArgs BASE_NAME LIB_NAME DEPS FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR VERSION)
|
set(oneValueArgs BASE_NAME LIB_NAME DEPS FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR VERSION)
|
||||||
set(multiValueArgs )
|
set(multiValueArgs INCLUDE_INSTALL_DIRS)
|
||||||
|
|
||||||
cmake_parse_arguments(EGPF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
cmake_parse_arguments(EGPF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
@@ -145,13 +149,19 @@ function(ECM_GENERATE_PRI_FILE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
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)
|
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)
|
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()
|
else()
|
||||||
set(EGPF_INCLUDE_INSTALL_DIR "include/${EGPF_BASE_NAME}")
|
set(EGPF_INCLUDE_INSTALL_DIRS "include/${EGPF_BASE_NAME}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(NOT EGPF_LIB_INSTALL_DIR)
|
if(NOT EGPF_LIB_INSTALL_DIR)
|
||||||
@@ -193,11 +203,15 @@ function(ECM_GENERATE_PRI_FILE)
|
|||||||
set(PRI_TARGET_BASENAME ${EGPF_BASE_NAME})
|
set(PRI_TARGET_BASENAME ${EGPF_BASE_NAME})
|
||||||
set(PRI_TARGET_LIBNAME ${EGPF_LIB_NAME})
|
set(PRI_TARGET_LIBNAME ${EGPF_LIB_NAME})
|
||||||
set(PRI_TARGET_QTDEPS ${EGPF_DEPS})
|
set(PRI_TARGET_QTDEPS ${EGPF_DEPS})
|
||||||
if(IS_ABSOLUTE "${EGPF_INCLUDE_INSTALL_DIR}")
|
set(PRI_TARGET_INCLUDES)
|
||||||
set(PRI_TARGET_INCLUDES "${EGPF_INCLUDE_INSTALL_DIR}")
|
foreach(_dir ${EGPF_INCLUDE_INSTALL_DIRS})
|
||||||
else()
|
# separate list entries with space
|
||||||
set(PRI_TARGET_INCLUDES "${BASEPATH}/${EGPF_INCLUDE_INSTALL_DIR}")
|
if(IS_ABSOLUTE "${_dir}")
|
||||||
endif()
|
string(APPEND PRI_TARGET_INCLUDES " ${_dir}")
|
||||||
|
else()
|
||||||
|
string(APPEND PRI_TARGET_INCLUDES " ${BASEPATH}/${_dir}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
if(IS_ABSOLUTE "${EGPF_LIB_INSTALL_DIR}")
|
if(IS_ABSOLUTE "${EGPF_LIB_INSTALL_DIR}")
|
||||||
set(PRI_TARGET_LIBS "${EGPF_LIB_INSTALL_DIR}")
|
set(PRI_TARGET_LIBS "${EGPF_LIB_INSTALL_DIR}")
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -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()
|
||||||
@@ -36,7 +36,7 @@ version of ECM is < 5.83)::
|
|||||||
|
|
||||||
<prefix>_VERSION_STRING - <version> (use <prefix>_VERSION instead)
|
<prefix>_VERSION_STRING - <version> (use <prefix>_VERSION instead)
|
||||||
|
|
||||||
If CMake policy CMP0048 is not NEW, the following CMake variables will also
|
If CMake policy CMP0048 is not ``NEW``, the following CMake variables will also
|
||||||
be set::
|
be set::
|
||||||
|
|
||||||
PROJECT_VERSION_MAJOR - <major>
|
PROJECT_VERSION_MAJOR - <major>
|
||||||
@@ -44,14 +44,14 @@ be set::
|
|||||||
PROJECT_VERSION_PATCH - <patch>
|
PROJECT_VERSION_PATCH - <patch>
|
||||||
PROJECT_VERSION - <version>
|
PROJECT_VERSION - <version>
|
||||||
|
|
||||||
For backward-compatibility, if CMake policy CMP0048 is not NEW, also this variable is set
|
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)::
|
(only if the minimum required version of ECM is < 5.83)::
|
||||||
|
|
||||||
PROJECT_VERSION_STRING - <version> (use PROJECT_VERSION instead)
|
PROJECT_VERSION_STRING - <version> (use PROJECT_VERSION instead)
|
||||||
|
|
||||||
If the VERSION_HEADER option is used, a simple C header is generated with the
|
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
|
given filename. If filename is a relative path, it is interpreted as relative
|
||||||
to CMAKE_CURRENT_BINARY_DIR. The generated header contains the following
|
to ``CMAKE_CURRENT_BINARY_DIR``. The generated header contains the following
|
||||||
macros::
|
macros::
|
||||||
|
|
||||||
<prefix>_VERSION_MAJOR - <major> as an integer
|
<prefix>_VERSION_MAJOR - <major> as an integer
|
||||||
@@ -64,15 +64,15 @@ macros::
|
|||||||
next 8 bits and ``<major>`` in the remaining bits. Note that ``<patch>`` and
|
next 8 bits and ``<major>`` in the remaining bits. Note that ``<patch>`` and
|
||||||
``<minor>`` must be less than 256.
|
``<minor>`` must be less than 256.
|
||||||
|
|
||||||
If the PACKAGE_VERSION_FILE option is used, a simple CMake package version
|
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
|
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
|
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
|
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
|
relative path, it is interpreted as relative to ``CMAKE_CURRENT_BINARY_DIR``. The
|
||||||
optional COMPATIBILITY option is forwarded to
|
optional ``COMPATIBILITY`` option is forwarded to
|
||||||
write_basic_package_version_file(), and defaults to AnyNewerVersion.
|
``write_basic_package_version_file()``, and defaults to ``AnyNewerVersion``.
|
||||||
|
|
||||||
If CMake policy CMP0048 is NEW, an alternative form of the command is
|
If CMake policy CMP0048 is ``NEW``, an alternative form of the command is
|
||||||
available::
|
available::
|
||||||
|
|
||||||
ecm_setup_version(PROJECT
|
ecm_setup_version(PROJECT
|
||||||
@@ -81,14 +81,14 @@ available::
|
|||||||
[VERSION_HEADER <filename>]
|
[VERSION_HEADER <filename>]
|
||||||
[PACKAGE_VERSION_FILE <filename>] )
|
[PACKAGE_VERSION_FILE <filename>] )
|
||||||
|
|
||||||
This will use the version information set by the project() command.
|
This will use the version information set by the ``project()`` command.
|
||||||
VARIABLE_PREFIX defaults to the project name. Note that PROJECT must be the
|
``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
|
first argument. In all other respects, it behaves like the other form of the
|
||||||
command.
|
command.
|
||||||
|
|
||||||
Since pre-1.0.0.
|
Since pre-1.0.0.
|
||||||
|
|
||||||
COMPATIBILITY option available since 1.6.0.
|
``COMPATIBILITY`` option available since 1.6.0.
|
||||||
#]=======================================================================]
|
#]=======================================================================]
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
@@ -132,9 +132,10 @@ function(ecm_setup_version _version)
|
|||||||
|
|
||||||
if(use_project_version)
|
if(use_project_version)
|
||||||
set(_version "${PROJECT_VERSION}")
|
set(_version "${PROJECT_VERSION}")
|
||||||
set(_major "${PROJECT_VERSION_MAJOR}")
|
# drop leading 0 from values to avoid bogus octal values in c/C++ e.g. with 08 or 09
|
||||||
set(_minor "${PROJECT_VERSION_MINOR}")
|
string(REGEX REPLACE "0*([0-9]+)" "\\1" _major "${PROJECT_VERSION_MAJOR}")
|
||||||
set(_patch "${PROJECT_VERSION_PATCH}")
|
string(REGEX REPLACE "0*([0-9]+)" "\\1" _minor "${PROJECT_VERSION_MINOR}")
|
||||||
|
string(REGEX REPLACE "0*([0-9]+)" "\\1" _patch "${PROJECT_VERSION_PATCH}")
|
||||||
else()
|
else()
|
||||||
string(REGEX REPLACE "^0*([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" _major "${_version}")
|
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*([0-9]+)\\.[0-9]+.*" "\\1" _minor "${_version}")
|
||||||
|
|||||||
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()
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
@@ -58,7 +58,11 @@ else()
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
if(NOT PYSIDE2_BASEDIR)
|
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\"")
|
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()
|
endif()
|
||||||
|
|
||||||
set(PYSIDE_BASEDIR ${PYSIDE2_BASEDIR} CACHE PATH "Top level install of PySide2" FORCE)
|
set(PYSIDE_BASEDIR ${PYSIDE2_BASEDIR} CACHE PATH "Top level install of PySide2" FORCE)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
@@ -33,7 +33,11 @@ execute_process(
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
if(NOT PYSIDE6_BASEDIR)
|
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\"")
|
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()
|
endif()
|
||||||
|
|
||||||
if(PYSIDE6_BASEDIR)
|
if(PYSIDE6_BASEDIR)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
# SHIBOKEN_BUILD_TYPE - Tells if Shiboken was compiled in Release or Debug mode.
|
# SHIBOKEN_BUILD_TYPE - Tells if Shiboken was compiled in Release or Debug mode.
|
||||||
|
|
||||||
# You can install Shiboken from Qt repository with
|
# 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
|
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython \
|
||||||
|
# --trusted-host download.qt.io shiboken2-generator
|
||||||
|
|
||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
if(PKG_CONFIG_FOUND)
|
if(PKG_CONFIG_FOUND)
|
||||||
@@ -51,7 +52,11 @@ else()
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
if(NOT SHIBOKEN_GENERATOR_BASEDIR)
|
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\"")
|
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()
|
endif()
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
@@ -66,7 +71,11 @@ else()
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
if(NOT SHIBOKEN_BASEDIR)
|
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\"")
|
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()
|
endif()
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
# SHIBOKEN_BUILD_TYPE - Tells if Shiboken was compiled in Release or Debug mode.
|
# SHIBOKEN_BUILD_TYPE - Tells if Shiboken was compiled in Release or Debug mode.
|
||||||
|
|
||||||
# You can install Shiboken from Qt repository with
|
# 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
|
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython \
|
||||||
|
# --trusted-host download.qt.io shiboken6-generator
|
||||||
|
|
||||||
set(SHIBOKEN_FOUND FALSE)
|
set(SHIBOKEN_FOUND FALSE)
|
||||||
|
|
||||||
@@ -28,7 +29,11 @@ execute_process(
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
if(NOT SHIBOKEN_GENERATOR_BASEDIR)
|
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\"")
|
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()
|
endif()
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
@@ -43,7 +48,11 @@ execute_process(
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
if(NOT SHIBOKEN_BASEDIR)
|
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\"")
|
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()
|
endif()
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
COMMAND ${Python3_EXECUTABLE} -c "if True:
|
||||||
@@ -142,7 +151,7 @@ if(SHIBOKEN_FOUND)
|
|||||||
message(STATUS "Shiboken binary: ${SHIBOKEN_BINARY}")
|
message(STATUS "Shiboken binary: ${SHIBOKEN_BINARY}")
|
||||||
message(STATUS "Shiboken version: ${SHIBOKEN_VERSION}")
|
message(STATUS "Shiboken version: ${SHIBOKEN_VERSION}")
|
||||||
|
|
||||||
# Create shiboke2 target
|
# Create shiboken2 target
|
||||||
add_library(Shiboken6::libshiboken SHARED IMPORTED GLOBAL)
|
add_library(Shiboken6::libshiboken SHARED IMPORTED GLOBAL)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set_property(TARGET Shiboken6::libshiboken PROPERTY
|
set_property(TARGET Shiboken6::libshiboken PROPERTY
|
||||||
@@ -161,7 +170,8 @@ if(SHIBOKEN_FOUND)
|
|||||||
set_property(TARGET Shiboken6::shiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_BINARY})
|
set_property(TARGET Shiboken6::shiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_BINARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package_handle_standard_args(Shiboken6
|
find_package_handle_standard_args(
|
||||||
|
Shiboken6
|
||||||
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
|
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
|
||||||
VERSION_VAR SHIBOKEN_VERSION
|
VERSION_VAR SHIBOKEN_VERSION
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2012-2022 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
|
# Some default installation locations. These should be global, with any project
|
||||||
# specific locations added to the end. These paths are all relative to the
|
# specific locations added to the end. These paths are all relative to the
|
||||||
# install prefix.
|
# install prefix.
|
||||||
@@ -9,27 +15,27 @@
|
|||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
if(NOT INSTALL_RUNTIME_DIR)
|
if(NOT INSTALL_RUNTIME_DIR)
|
||||||
set(INSTALL_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})
|
set(INSTALL_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})
|
||||||
endif()
|
endif()
|
||||||
if(NOT INSTALL_LIBRARY_DIR)
|
if(NOT INSTALL_LIBRARY_DIR)
|
||||||
set(INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
|
set(INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||||
endif()
|
endif()
|
||||||
if(NOT INSTALL_ARCHIVE_DIR)
|
if(NOT INSTALL_ARCHIVE_DIR)
|
||||||
set(INSTALL_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
|
set(INSTALL_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||||
endif()
|
endif()
|
||||||
if(NOT INSTALL_INCLUDE_DIR)
|
if(NOT INSTALL_INCLUDE_DIR)
|
||||||
set(INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
set(INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
endif()
|
endif()
|
||||||
if(NOT INSTALL_DATADIR)
|
if(NOT INSTALL_DATADIR)
|
||||||
set(INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR})
|
set(INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR})
|
||||||
endif()
|
endif()
|
||||||
if(NOT INSTALL_DOC_DIR)
|
if(NOT INSTALL_DOC_DIR)
|
||||||
set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${KDDockWidgets_LIBRARY_QTID})
|
set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${KDDockWidgets_LIBRARY_QTID})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CMAKE_MACOSX_RPATH ON)
|
set(CMAKE_MACOSX_RPATH ON)
|
||||||
else()
|
else()
|
||||||
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${INSTALL_LIBRARY_DIR}")
|
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${INSTALL_LIBRARY_DIR}")
|
||||||
endif()
|
endif()
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2016-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2016-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Allen Winter <allen.winter@kdab.com>
|
# Author: Allen Winter <allen.winter@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
@@ -28,14 +28,14 @@ execute_process(
|
|||||||
OUTPUT_VARIABLE ALL_VARS
|
OUTPUT_VARIABLE ALL_VARS
|
||||||
)
|
)
|
||||||
if(NOT return_code EQUAL 0)
|
if(NOT return_code EQUAL 0)
|
||||||
message(WARNING "Failed call: ${QMAKE_EXECUTABLE} -query")
|
message(WARNING "Failed call: ${QT_QMAKE_EXECUTABLE} -query")
|
||||||
message(FATAL_ERROR "QMake call failed: ${return_code}")
|
message(FATAL_ERROR "QMake call failed: ${return_code}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
string(REPLACE "\n" ";" VARS_LIST ${ALL_VARS})
|
string(REPLACE "\n" ";" VARS_LIST ${ALL_VARS})
|
||||||
foreach(QVAL ${VARS_LIST})
|
foreach(qval ${VARS_LIST})
|
||||||
if(QVAL MATCHES "QT_INSTALL_")
|
if(qval MATCHES "QT_INSTALL_")
|
||||||
string(REPLACE ":" ";" QVAL_LIST ${QVAL})
|
string(REPLACE ":" ";" QVAL_LIST ${qval})
|
||||||
list(LENGTH QVAL_LIST listlen)
|
list(LENGTH QVAL_LIST listlen)
|
||||||
list(GET QVAL_LIST 0 var)
|
list(GET QVAL_LIST 0 var)
|
||||||
if(WIN32 AND ${listlen} GREATER 2)
|
if(WIN32 AND ${listlen} GREATER 2)
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
|
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.")
|
# cmake-lint: disable=C0103
|
||||||
|
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}
|
||||||
|
CACHE FILEPATH "Custom path to install python bindings."
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "PYTHON INSTALL PREFIX ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}")
|
message(STATUS "PYTHON INSTALL PREFIX ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}")
|
||||||
@@ -19,6 +22,10 @@ endif()
|
|||||||
#Qt5 requires C++14
|
#Qt5 requires C++14
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
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.
|
# 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)
|
get_target_property(QtCore_is_framework Qt5::Core FRAMEWORK)
|
||||||
@@ -61,6 +68,7 @@ if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
|
|||||||
add_definitions(-DAVOID_PROTECTED_HACK)
|
add_definitions(-DAVOID_PROTECTED_HACK)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Replace all semicolons in a string with this platform's path separator
|
||||||
macro(make_path varname)
|
macro(make_path varname)
|
||||||
# accepts any number of path variables
|
# accepts any number of path variables
|
||||||
string(REPLACE ";" "${PATH_SEP}" ${varname} "${ARGN}")
|
string(REPLACE ";" "${PATH_SEP}" ${varname} "${ARGN}")
|
||||||
@@ -69,35 +77,35 @@ endmacro()
|
|||||||
# Creates a PySide module target based on the arguments
|
# Creates a PySide module target based on the arguments
|
||||||
# This will:
|
# This will:
|
||||||
# 1 - Create a Cmake custom-target that call shiboken-generator passign the correct arguments
|
# 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
|
# 2 - Create a Cmake library target called "Py${libraryName}" the output name of this target
|
||||||
# will be changed to match PySide template
|
# will be changed to match PySide template
|
||||||
# Args:
|
# Args:
|
||||||
# LIBRARY_NAME - The name of the output module
|
# libraryName - The name of the output module
|
||||||
# TYPESYSTEM_PATHS - A list of paths where shiboken should look for typesystem files
|
# typesystemPaths - A list of paths where shiboken should look for typesystem files
|
||||||
# INCLUDE_PATHS - Include paths necessary to parse your class. *This is not the same as build*
|
# includePaths - Include paths necessary to parse your class. *This is not the same as build*
|
||||||
# OUTPUT_SOURCES - The files that will be generated by shiboken
|
# outputSource - The files that will be generated by shiboken
|
||||||
# TARGET_INCLUDE_DIRS - This will be passed to target_include_directories
|
# targetIncludeDirs - This will be passed to target_include_directories
|
||||||
# TARGET_LINK_LIBRARIES - This will be passed to target_link_libraries
|
# targetLinkLibraries - This will be passed to targetLinkLibraries
|
||||||
# GLOBAL_INCLUDE - A header-file that contains all classes that will be generated
|
# globalInclude - A header-file that contains all classes that will be generated
|
||||||
# TYPESYSTEM_XML - The target binding typesystem (that should be the full path)
|
# typesystemXML - 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
|
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
|
||||||
# trigger if one of these files changes
|
# trigger if one of these files changes
|
||||||
# MODULE_OUTPUT_DIR - Where the library file should be stored
|
# moduleOutputDir - Where the library file should be stored
|
||||||
macro(CREATE_PYTHON_BINDINGS
|
macro(create_python_bindings
|
||||||
LIBRARY_NAME
|
libraryName
|
||||||
TYPESYSTEM_PATHS
|
typesystemPaths
|
||||||
INCLUDE_PATHS
|
includePaths
|
||||||
OUTPUT_SOURCES
|
outputSource
|
||||||
TARGET_INCLUDE_DIRS
|
targetIncludeDirs
|
||||||
TARGET_LINK_LIBRARIES
|
targetLinkLibraries
|
||||||
GLOBAL_INCLUDE
|
globalInclude
|
||||||
TYPESYSTEM_XML
|
typesystemXML
|
||||||
DEPENDS
|
dependsArg
|
||||||
MODULE_OUTPUT_DIR)
|
moduleOutputDir)
|
||||||
|
|
||||||
# Transform the path separators into something shiboken understands.
|
# Transform the path separators into something shiboken understands.
|
||||||
make_path(shiboken_include_dirs ${INCLUDE_PATHS})
|
make_path(shiboken_include_dirs ${includePaths})
|
||||||
make_path(shiboken_typesystem_dirs ${TYPESYSTEM_PATHS})
|
make_path(shiboken_typesystem_dirs ${typesystemPaths})
|
||||||
get_property(raw_python_dir_include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
|
get_property(raw_python_dir_include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
|
||||||
make_path(python_dir_include_dirs ${raw_python_dir_include_dirs})
|
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_include_dirs "${shiboken_include_dirs}${PATH_SEP}${python_dir_include_dirs}")
|
||||||
@@ -108,54 +116,55 @@ macro(CREATE_PYTHON_BINDINGS
|
|||||||
make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
|
make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
|
||||||
set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
|
set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
|
||||||
endif()
|
endif()
|
||||||
set_property(SOURCE ${OUTPUT_SOURCES} PROPERTY SKIP_AUTOGEN ON)
|
set_property(SOURCE ${outputSource} PROPERTY SKIP_AUTOGEN ON)
|
||||||
add_custom_command(OUTPUT ${OUTPUT_SOURCES}
|
add_custom_command(
|
||||||
|
OUTPUT ${outputSource}
|
||||||
COMMAND $<TARGET_PROPERTY:Shiboken2::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS}
|
COMMAND $<TARGET_PROPERTY:Shiboken2::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS}
|
||||||
${GLOBAL_INCLUDE}
|
${globalInclude}
|
||||||
--include-paths=${shiboken_include_dirs}
|
--include-paths=${shiboken_include_dirs}
|
||||||
--typesystem-paths=${shiboken_typesystem_dirs}
|
--typesystem-paths=${shiboken_typesystem_dirs}
|
||||||
${shiboken_framework_include_dirs_option}
|
${shiboken_framework_include_dirs_option}
|
||||||
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${TYPESYSTEM_XML}
|
${typesystemXML}
|
||||||
DEPENDS ${TYPESYSTEM_XML} ${DEPENDS}
|
DEPENDS ${typesystemXML} ${dependsArg}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
COMMENT "Running generator for ${LIBRARY_NAME} binding...")
|
COMMENT "Running generator for ${libraryName} binding..."
|
||||||
|
)
|
||||||
|
|
||||||
set(TARGET_NAME "Py${LIBRARY_NAME}")
|
set(TARGET_NAME "Py${libraryName}")
|
||||||
set(MODULE_NAME "${LIBRARY_NAME}")
|
set(MODULE_NAME "${libraryName}")
|
||||||
add_library(${TARGET_NAME} MODULE ${OUTPUT_SOURCES})
|
add_library(${TARGET_NAME} MODULE ${outputSource})
|
||||||
|
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES
|
set_target_properties(
|
||||||
PREFIX ""
|
${TARGET_NAME} PROPERTIES
|
||||||
OUTPUT_NAME ${MODULE_NAME}
|
PREFIX ""
|
||||||
LIBRARY_OUTPUT_DIRECTORY ${MODULE_OUTPUT_DIR}
|
OUTPUT_NAME ${MODULE_NAME}
|
||||||
)
|
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
|
||||||
if(APPLE)
|
)
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
|
if(APPLE)
|
||||||
elseif(NOT WIN32) #ie. linux
|
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
elseif(NOT WIN32) #ie. linux
|
||||||
endif()
|
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(${TARGET_NAME} PUBLIC
|
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
|
||||||
${TARGET_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(${TARGET_NAME}
|
target_link_libraries(
|
||||||
${TARGET_LINK_LIBRARIES}
|
${TARGET_NAME}
|
||||||
PySide2::pyside2
|
${targetLinkLibraries}
|
||||||
Shiboken2::libshiboken
|
PySide2::pyside2
|
||||||
)
|
Shiboken2::libshiboken
|
||||||
target_compile_definitions(${TARGET_NAME}
|
)
|
||||||
PRIVATE Py_LIMITED_API=0x03050000
|
target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000)
|
||||||
)
|
if(APPLE)
|
||||||
if(APPLE)
|
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY LINK_FLAGS "-undefined dynamic_lookup")
|
||||||
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY
|
endif()
|
||||||
LINK_FLAGS "-undefined dynamic_lookup")
|
install(
|
||||||
endif()
|
TARGETS ${TARGET_NAME}
|
||||||
install(TARGETS ${TARGET_NAME}
|
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}
|
||||||
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
|
)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
|
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.")
|
# cmake-lint: disable=C0103
|
||||||
|
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}
|
||||||
|
CACHE FILEPATH "Custom path to install python bindings."
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "PYTHON INSTALL PREFIX ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}")
|
message(STATUS "PYTHON INSTALL PREFIX ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}")
|
||||||
@@ -19,6 +22,10 @@ endif()
|
|||||||
#Qt6 requires C++17
|
#Qt6 requires C++17
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
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.
|
# 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)
|
get_target_property(QtCore_is_framework Qt6::Core FRAMEWORK)
|
||||||
@@ -61,6 +68,7 @@ if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
|
|||||||
add_definitions(-DAVOID_PROTECTED_HACK)
|
add_definitions(-DAVOID_PROTECTED_HACK)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Replace all semicolons in a string with this platform's path separator
|
||||||
macro(make_path varname)
|
macro(make_path varname)
|
||||||
# accepts any number of path variables
|
# accepts any number of path variables
|
||||||
string(REPLACE ";" "${PATH_SEP}" ${varname} "${ARGN}")
|
string(REPLACE ";" "${PATH_SEP}" ${varname} "${ARGN}")
|
||||||
@@ -69,35 +77,35 @@ endmacro()
|
|||||||
# Creates a PySide module target based on the arguments
|
# Creates a PySide module target based on the arguments
|
||||||
# This will:
|
# This will:
|
||||||
# 1 - Create a Cmake custom-target that call shiboken-generator passign the correct arguments
|
# 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
|
# 2 - Create a Cmake library target called "Py${libraryName}" the output name of this target
|
||||||
# will be changed to match PySide template
|
# will be changed to match PySide template
|
||||||
# Args:
|
# Args:
|
||||||
# LIBRARY_NAME - The name of the output module
|
# libraryName - The name of the output module
|
||||||
# TYPESYSTEM_PATHS - A list of paths where shiboken should look for typesystem files
|
# typesystemPaths - A list of paths where shiboken should look for typesystem files
|
||||||
# INCLUDE_PATHS - Include paths necessary to parse your class. *This is not the same as build*
|
# includePaths - Include paths necessary to parse your class. *This is not the same as build*
|
||||||
# OUTPUT_SOURCES - The files that will be generated by shiboken
|
# outputSource - The files that will be generated by shiboken
|
||||||
# TARGET_INCLUDE_DIRS - This will be passed to target_include_directories
|
# targetIncludeDirs - This will be passed to target_include_directories
|
||||||
# TARGET_LINK_LIBRARIES - This will be passed to target_link_libraries
|
# targetLinkLibraries - This will be passed to targetLinkLibraries
|
||||||
# GLOBAL_INCLUDE - A header-file that contains all classes that will be generated
|
# globalInclude - A header-file that contains all classes that will be generated
|
||||||
# TYPESYSTEM_XML - The target binding typesystem (that should be the full path)
|
# typesystemXML - 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
|
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
|
||||||
# trigger if one of these files changes
|
# trigger if one of these files changes
|
||||||
# MODULE_OUTPUT_DIR - Where the library file should be stored
|
# moduleOutputDir - Where the library file should be stored
|
||||||
macro(CREATE_PYTHON_BINDINGS
|
macro(create_python_bindings
|
||||||
LIBRARY_NAME
|
libraryName
|
||||||
TYPESYSTEM_PATHS
|
typesystemPaths
|
||||||
INCLUDE_PATHS
|
includePaths
|
||||||
OUTPUT_SOURCES
|
outputSource
|
||||||
TARGET_INCLUDE_DIRS
|
targetIncludeDirs
|
||||||
TARGET_LINK_LIBRARIES
|
targetLinkLibraries
|
||||||
GLOBAL_INCLUDE
|
globalInclude
|
||||||
TYPESYSTEM_XML
|
typesystemXML
|
||||||
DEPENDS
|
dependsArg
|
||||||
MODULE_OUTPUT_DIR)
|
moduleOutputDir)
|
||||||
|
|
||||||
# Transform the path separators into something shiboken understands.
|
# Transform the path separators into something shiboken understands.
|
||||||
make_path(shiboken_include_dirs ${INCLUDE_PATHS})
|
make_path(shiboken_include_dirs ${includePaths})
|
||||||
make_path(shiboken_typesystem_dirs ${TYPESYSTEM_PATHS})
|
make_path(shiboken_typesystem_dirs ${typesystemPaths})
|
||||||
get_property(raw_python_dir_include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
|
get_property(raw_python_dir_include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
|
||||||
make_path(python_dir_include_dirs ${raw_python_dir_include_dirs})
|
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_include_dirs "${shiboken_include_dirs}${PATH_SEP}${python_dir_include_dirs}")
|
||||||
@@ -108,54 +116,55 @@ macro(CREATE_PYTHON_BINDINGS
|
|||||||
make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
|
make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
|
||||||
set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
|
set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
|
||||||
endif()
|
endif()
|
||||||
set_property(SOURCE ${OUTPUT_SOURCES} PROPERTY SKIP_AUTOGEN ON)
|
set_property(SOURCE ${outputSource} PROPERTY SKIP_AUTOGEN ON)
|
||||||
add_custom_command(OUTPUT ${OUTPUT_SOURCES}
|
add_custom_command(
|
||||||
|
OUTPUT ${outputSource}
|
||||||
COMMAND $<TARGET_PROPERTY:Shiboken6::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS}
|
COMMAND $<TARGET_PROPERTY:Shiboken6::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS}
|
||||||
${GLOBAL_INCLUDE}
|
${globalInclude}
|
||||||
--include-paths=${shiboken_include_dirs}
|
--include-paths=${shiboken_include_dirs}
|
||||||
--typesystem-paths=${shiboken_typesystem_dirs}
|
--typesystem-paths=${shiboken_typesystem_dirs}
|
||||||
${shiboken_framework_include_dirs_option}
|
${shiboken_framework_include_dirs_option}
|
||||||
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${TYPESYSTEM_XML}
|
${typesystemXML}
|
||||||
DEPENDS ${TYPESYSTEM_XML} ${DEPENDS}
|
DEPENDS ${typesystemXML} ${dependsArg}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
COMMENT "Running generator for ${LIBRARY_NAME} binding...")
|
COMMENT "Running generator for ${libraryName} binding..."
|
||||||
|
)
|
||||||
|
|
||||||
set(TARGET_NAME "Py${LIBRARY_NAME}")
|
set(TARGET_NAME "Py${libraryName}")
|
||||||
set(MODULE_NAME "${LIBRARY_NAME}")
|
set(MODULE_NAME "${libraryName}")
|
||||||
add_library(${TARGET_NAME} MODULE ${OUTPUT_SOURCES})
|
add_library(${TARGET_NAME} MODULE ${outputSource})
|
||||||
|
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES
|
set_target_properties(
|
||||||
PREFIX ""
|
${TARGET_NAME} PROPERTIES
|
||||||
OUTPUT_NAME ${MODULE_NAME}
|
PREFIX ""
|
||||||
LIBRARY_OUTPUT_DIRECTORY ${MODULE_OUTPUT_DIR}
|
OUTPUT_NAME ${MODULE_NAME}
|
||||||
)
|
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
|
||||||
if(APPLE)
|
)
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
|
if(APPLE)
|
||||||
elseif(NOT WIN32) #ie. linux
|
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
elseif(NOT WIN32) #ie. linux
|
||||||
endif()
|
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(${TARGET_NAME} PUBLIC
|
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
|
||||||
${TARGET_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(${TARGET_NAME}
|
target_link_libraries(
|
||||||
${TARGET_LINK_LIBRARIES}
|
${TARGET_NAME}
|
||||||
PySide6::pyside6
|
${targetLinkLibraries}
|
||||||
Shiboken6::libshiboken
|
PySide6::pyside6
|
||||||
)
|
Shiboken6::libshiboken
|
||||||
target_compile_definitions(${TARGET_NAME}
|
)
|
||||||
PRIVATE Py_LIMITED_API=0x03050000
|
target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000)
|
||||||
)
|
if(APPLE)
|
||||||
if(APPLE)
|
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY LINK_FLAGS "-undefined dynamic_lookup")
|
||||||
set_property(TARGET ${TARGET_NAME} APPEND PROPERTY
|
endif()
|
||||||
LINK_FLAGS "-undefined dynamic_lookup")
|
install(
|
||||||
endif()
|
TARGETS ${TARGET_NAME}
|
||||||
install(TARGETS ${TARGET_NAME}
|
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}
|
||||||
LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
|
)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|||||||
@@ -1,147 +0,0 @@
|
|||||||
{
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"path": "."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev-qtquick/compile_commands.json",
|
|
||||||
"C_Cpp.default.cStandard": "c17",
|
|
||||||
"files.trimTrailingWhitespace": true,
|
|
||||||
"editor.formatOnType": true,
|
|
||||||
"C_Cpp.autocompleteAddParentheses": true
|
|
||||||
},
|
|
||||||
"launch": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "gdb-kddockwidgets_customtitlebar_quick",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_customtitlebar_quick",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gdb-kddockwidgets_example_mdi_quick",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_mdi_quick",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gdb-kddockwidgets_example_quick",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_quick",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gdb-tst_docks",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/tst_docks",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-kddockwidgets_customtitlebar_quick",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_customtitlebar_quick",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-kddockwidgets_example_mdi_quick",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_mdi_quick",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-kddockwidgets_example_quick",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_quick",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-tst_docks",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/tst_docks",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-kddockwidgets_customtitlebar_quick",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_customtitlebar_quick",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-kddockwidgets_example_mdi_quick",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_mdi_quick",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-kddockwidgets_example_quick",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/kddockwidgets_example_quick",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-tst_docks",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev-qtquick/bin/tst_docks",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
{
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"path": "."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev/compile_commands.json",
|
|
||||||
"C_Cpp.default.cStandard": "c17",
|
|
||||||
"files.trimTrailingWhitespace": true,
|
|
||||||
"editor.formatOnType": true,
|
|
||||||
"C_Cpp.autocompleteAddParentheses": true
|
|
||||||
},
|
|
||||||
"launch": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "gdb-kddockwidgets_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gdb-kddockwidgets_minimal_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gdb-kddockwidgets_minimal_mdi_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_mdi_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gdb-tst_docks",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/tst_docks",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-kddockwidgets_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-kddockwidgets_minimal_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-kddockwidgets_minimal_mdi_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_mdi_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-tst_docks",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/tst_docks",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-kddockwidgets_example",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-kddockwidgets_minimal_example",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-kddockwidgets_minimal_mdi_example",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/kddockwidgets_minimal_mdi_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-tst_docks",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev/bin/tst_docks",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
{
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"path": "."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev6/compile_commands.json",
|
|
||||||
"C_Cpp.default.cStandard": "c17",
|
|
||||||
"files.trimTrailingWhitespace": true,
|
|
||||||
"editor.formatOnType": true,
|
|
||||||
"C_Cpp.autocompleteAddParentheses": true
|
|
||||||
},
|
|
||||||
"launch": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "gdb-kddockwidgets_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gdb-kddockwidgets_minimal_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gdb-kddockwidgets_minimal_mdi_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_mdi_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gdb-tst_docks",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-kddockwidgets_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-kddockwidgets_minimal_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-kddockwidgets_minimal_mdi_example",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_mdi_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lldb-tst_docks",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "lldb",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-kddockwidgets_example",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-kddockwidgets_minimal_example",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-kddockwidgets_minimal_mdi_example",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/kddockwidgets_minimal_mdi_example",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "msvc-tst_docks",
|
|
||||||
"type": "cppvsdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"externalConsole": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
140
code.dev.code-workspace
Normal file
140
code.dev.code-workspace
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev/compile_commands.json",
|
||||||
|
"C_Cpp.default.cStandard": "c17",
|
||||||
|
"files.trimTrailingWhitespace": true,
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"C_Cpp.autocompleteAddParentheses": true,
|
||||||
|
"clangd.arguments": [
|
||||||
|
"-header-insertion=never"
|
||||||
|
],
|
||||||
|
"todo-tree.tree.scanMode": "workspace only",
|
||||||
|
"todo-tree.tree.disableCompactFolders": false,
|
||||||
|
"todo-tree.tree.showBadges": true,
|
||||||
|
"todo-tree.general.tags": [
|
||||||
|
"BUG",
|
||||||
|
"HACK",
|
||||||
|
"FIXME",
|
||||||
|
"TODO",
|
||||||
|
"XXX",
|
||||||
|
"[ ]",
|
||||||
|
"[x]",
|
||||||
|
"TODOm2",
|
||||||
|
"TODOm3",
|
||||||
|
"TODOm4"
|
||||||
|
],
|
||||||
|
"testMate.cpp.test.executables": "{build-dev}/**/*{tst}*",
|
||||||
|
"todo-tree.filtering.excludeGlobs": [
|
||||||
|
"**/ECM",
|
||||||
|
"**/3rdparty"
|
||||||
|
],
|
||||||
|
"cmake.copyCompileCommands": "${workspaceFolder}/compile_commands.json"
|
||||||
|
},
|
||||||
|
"launch": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "qtwidgets_dockwidgets",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/examples/qtwidgets_dockwidgets",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "qtwidgets_minimal",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/examples/qtwidgets_minimal",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "qtwidgets_mdi",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/examples/qtwidgets_mdi",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "qtwidgets_mdi_with_docking",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/examples/qtwidgets_mdi_with_docking",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "qtquick_dockwidgets",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/examples/qtquick_dockwidgets",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tst_qtwidgets",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/tst_qtwidgets",
|
||||||
|
"args": [
|
||||||
|
"tst_mainWindowAlwaysHasCentralWidget"
|
||||||
|
],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tst_floatingwindow",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/tst_floatingwindow",
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-qtwidgets_dockwidgets",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/examples/qtwidgets_dockwidgets",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-qtwidgets_minimal",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/examples/qtwidgets_minimal",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-qtwidgets_mdi",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/examples/qtwidgets_mdi",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-tst_docks",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
142
code.dev6.code-workspace
Normal file
142
code.dev6.code-workspace
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"C_Cpp.default.compileCommands": "${workspaceFolder}/build-dev6/compile_commands.json",
|
||||||
|
"C_Cpp.default.cStandard": "c17",
|
||||||
|
"files.trimTrailingWhitespace": true,
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"C_Cpp.autocompleteAddParentheses": true,
|
||||||
|
"clangd.arguments": [
|
||||||
|
"-header-insertion=never"
|
||||||
|
],
|
||||||
|
"todo-tree.tree.scanMode": "workspace only",
|
||||||
|
"todo-tree.tree.disableCompactFolders": false,
|
||||||
|
"todo-tree.tree.showBadges": true,
|
||||||
|
"todo-tree.filtering.excludeGlobs": [
|
||||||
|
"**/ECM",
|
||||||
|
"**/3rdparty"
|
||||||
|
],
|
||||||
|
"todo-tree.general.tags": [
|
||||||
|
"BUG",
|
||||||
|
"HACK",
|
||||||
|
"FIXME",
|
||||||
|
"TODO",
|
||||||
|
"XXX",
|
||||||
|
"[ ]",
|
||||||
|
"[x]",
|
||||||
|
"TODOm2",
|
||||||
|
"TODOm3",
|
||||||
|
"TODOm4"
|
||||||
|
],
|
||||||
|
"testMate.cpp.test.executables": "{build-dev6}/**/*{tst}*"
|
||||||
|
},
|
||||||
|
"launch": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "qtwidgets_dockwidgets",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/examples/qtwidgets_dockwidgets",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "qtwidgets_minimal",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/examples/qtwidgets_minimal",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "qtwidgets_mdi",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/examples/qtwidgets_mdi",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "qtwidgets_mdi_with_docking",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/examples/qtwidgets_mdi_with_docking",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "qtquick_dockwidgets",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/examples/qtquick_dockwidgets",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tst_docks",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
|
||||||
|
"args": [
|
||||||
|
"tst_addMDIDockWidget"
|
||||||
|
],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-qtwidgets_dockwidgets",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/examples/qtwidgets_dockwidgets",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-qtwidgets_minimal",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/examples/qtwidgets_minimal",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-qtwidgets_mdi",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/examples/qtwidgets_mdi",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-qtquick_dockwidgets",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/examples/qtquick_dockwidgets.exe",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-tst_docks",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/build-dev6/bin/tst_docks",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
#
|
#
|
||||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
@@ -9,9 +9,10 @@
|
|||||||
|
|
||||||
from conans import ConanFile, CMake, tools
|
from conans import ConanFile, CMake, tools
|
||||||
|
|
||||||
|
|
||||||
class KDDockWidgetsConan(ConanFile):
|
class KDDockWidgetsConan(ConanFile):
|
||||||
name = "kddockwidgets"
|
name = "kddockwidgets"
|
||||||
version = "1.4.0"
|
version = "1.5.0"
|
||||||
default_user = "kdab"
|
default_user = "kdab"
|
||||||
default_channel = "stable"
|
default_channel = "stable"
|
||||||
license = ("https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-2.0-only.txt",
|
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"
|
url = "https://github.com/KDAB/KDDockWidgets"
|
||||||
description = "Advanced Dock Widget Framework for Qt"
|
description = "Advanced Dock Widget Framework for Qt"
|
||||||
generators = "cmake"
|
generators = "cmake"
|
||||||
topics = ("qt", "dockwidget" , "kdab")
|
topics = ("qt", "dockwidget", "kdab")
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
options = {
|
options = {
|
||||||
"qt_version": "ANY",
|
"qt_version": "ANY",
|
||||||
@@ -65,4 +66,5 @@ class KDDockWidgetsConan(ConanFile):
|
|||||||
self.env_info.CMAKE_PREFIX_PATH.append(self.package_folder)
|
self.env_info.CMAKE_PREFIX_PATH.append(self.package_folder)
|
||||||
|
|
||||||
def package_id(self):
|
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,3 +1,9 @@
|
|||||||
|
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
|
kddockwidgets (1.4.0) release candidate; urgency=high
|
||||||
|
|
||||||
* 1.4.0 final
|
* 1.4.0 final
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Build-Depends: debhelper (>=9), cdbs, cmake
|
|||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Homepage: https://github.com/KDAB/KDDockWidgets
|
Homepage: https://github.com/KDAB/KDDockWidgets
|
||||||
|
|
||||||
Package: kddockwidgets
|
Package: qt5-kddockwidgets
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
Description: KDAB's Dock Widget Framework for Qt
|
Description: KDAB's Dock Widget Framework for Qt
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
Format: 1.0
|
Format: 1.0
|
||||||
Source: kddockwidgets
|
Source: kddockwidgets
|
||||||
Version: 1.4.0-1
|
Version: 1.5.0-1
|
||||||
Binary: kddockwidgets
|
Binary: kddockwidgets
|
||||||
Maintainer: Allen Winter <allen.winter@kdab.com>
|
Maintainer: Allen Winter <allen.winter@kdab.com>
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Build-Depends: debhelper (>=9), cdbs, cmake, qtbase5-dev, libqt5x11extras5-dev
|
Build-Depends: debhelper (>=9), cdbs, cmake, qtbase5-dev, qtbase5-private-dev, libqt5x11extras5-dev, libfontconfig-dev, libfreetype-dev
|
||||||
|
|
||||||
Files:
|
Files:
|
||||||
00000000000000000000000000000000 00000 qt5-kddockwidgets-1.4.0.tar.gz
|
00000000000000000000000000000000 00000 qt5-kddockwidgets-1.5.0.tar.gz
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Name: qt5-kddockwidgets
|
Name: qt5-kddockwidgets
|
||||||
Version: 1.4.0
|
Version: 1.5.0
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: KDAB's Dock Widget Framework for Qt5
|
Summary: KDAB's Dock Widget Framework for Qt5
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
@@ -14,15 +14,15 @@ Packager: Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
|||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
%if %{defined suse_version}
|
%if %{defined suse_version}
|
||||||
BuildRequires: libqt5-qtbase-devel libqt5-qtx11extras-devel
|
BuildRequires: libqt5-qtbase-devel libqt5-qtbase-private-headers-devel libqt5-qtx11extras-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{defined fedora}
|
%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
|
%endif
|
||||||
|
|
||||||
%if %{defined rhel}
|
%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
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -98,6 +98,8 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
|
|||||||
%{_libdir}/libkddockwidgets.so
|
%{_libdir}/libkddockwidgets.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* Fri Jul 16 2021 Allen Winter <allen.winter@kdab.com> 1.4.0
|
||||||
1.4.0 final
|
1.4.0 final
|
||||||
* Mon Jun 07 2021 Allen Winter <allen.winter@kdab.com> 1.3.1
|
* Mon Jun 07 2021 Allen Winter <allen.winter@kdab.com> 1.3.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
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
Format: 1.0
|
Format: 1.0
|
||||||
Source: kddockwidgets
|
Source: kddockwidgets
|
||||||
Version: 1.4.0-1
|
Version: 1.5.0-1
|
||||||
Binary: kddockwidgets
|
Binary: kddockwidgets
|
||||||
Maintainer: Allen Winter <allen.winter@kdab.com>
|
Maintainer: Allen Winter <allen.winter@kdab.com>
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Build-Depends: debhelper (>=9), cdbs, cmake, qtbase6-dev, libqt6x11extras5-dev
|
Build-Depends: debhelper (>=9), cdbs, cmake, qt6-base-dev, qt6-base-private-dev, libgl1-mesa-dev, libfontconfig-dev, libfreetype-dev
|
||||||
|
|
||||||
Files:
|
Files:
|
||||||
00000000000000000000000000000000 00000 qt6-kddockwidgets-1.4.0.tar.gz
|
00000000000000000000000000000000 00000 qt6-kddockwidgets-1.5.0.tar.gz
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Name: qt6-kddockwidgets
|
Name: qt6-kddockwidgets
|
||||||
Version: 1.4.0
|
Version: 1.5.0
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: KDAB's Dock Widget Framework for Qt6
|
Summary: KDAB's Dock Widget Framework for Qt6
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
@@ -14,15 +14,15 @@ Packager: Klaralvdalens Datakonsult AB (KDAB) <info@kdab.com>
|
|||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
%if %{defined suse_version}
|
%if %{defined suse_version}
|
||||||
BuildRequires: libqt6-qtbase-devel libqt6-qtx11extras-devel
|
BuildRequires: libqt6-qtbase-devel libqt6-qtbase-private-headers-devel libqt6-qtx11extras-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{defined fedora}
|
%if %{defined fedora}
|
||||||
BuildRequires: gcc-c++ qt6-qtbase-devel desktop-file-utils
|
BuildRequires: gcc-c++ qt6-qtbase-devel qt6-qtbase-private-devel desktop-file-utils libxkbcommon-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{defined rhel}
|
%if %{defined rhel}
|
||||||
BuildRequires: gcc-c++ qt6-qtbase-devel qt6-qtx11extras-devel desktop-file-utils
|
BuildRequires: gcc-c++ qt6-qtbase-devel qt6-qtbase-private-devel qt6-qtx11extras-devel desktop-file-utils libxkbcommon-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -87,6 +87,8 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_QT6=True -DCMAKE_BUILD_TYPE=
|
|||||||
#%{_prefix}/mkspecs/modules/* ECMGeneratePriFile isn't ported to Qt6 yet
|
#%{_prefix}/mkspecs/modules/* ECMGeneratePriFile isn't ported to Qt6 yet
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* Fri Jul 16 2021 Allen Winter <allen.winter@kdab.com> 1.4.0
|
||||||
1.4.0 final
|
1.4.0 final
|
||||||
* Mon Jun 07 2021 Allen Winter <allen.winter@kdab.com> 1.3.1
|
* Mon Jun 07 2021 Allen Winter <allen.winter@kdab.com> 1.3.1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Allen Winter <allen.winter@kdab.com>
|
# Author: Allen Winter <allen.winter@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,13 +11,14 @@
|
|||||||
|
|
||||||
# Doxygen
|
# Doxygen
|
||||||
find_package(Doxygen)
|
find_package(Doxygen)
|
||||||
set_package_properties(Doxygen PROPERTIES
|
set_package_properties(
|
||||||
TYPE OPTIONAL
|
Doxygen PROPERTIES
|
||||||
DESCRIPTION "API Documentation system"
|
TYPE OPTIONAL
|
||||||
URL "https://www.doxygen.org"
|
DESCRIPTION "API Documentation system"
|
||||||
PURPOSE "Needed to build the API documentation."
|
URL "https://www.doxygen.org"
|
||||||
|
PURPOSE "Needed to build the API documentation."
|
||||||
)
|
)
|
||||||
|
|
||||||
if(DOXYGEN_FOUND)
|
if(DOXYGEN_FOUND)
|
||||||
add_subdirectory(api)
|
add_subdirectory(api)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Allen Winter <allen.winter@kdab.com>
|
# Author: Allen Winter <allen.winter@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,61 +11,74 @@
|
|||||||
|
|
||||||
# dot should come with Doxygen find_package(Doxygen)
|
# dot should come with Doxygen find_package(Doxygen)
|
||||||
if(DOXYGEN_DOT_EXECUTABLE)
|
if(DOXYGEN_DOT_EXECUTABLE)
|
||||||
set(HAVE_DOT "YES")
|
set(HAVE_DOT "YES")
|
||||||
else()
|
else()
|
||||||
set(HAVE_DOT "NO")
|
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")
|
message(STATUS "Unable to provide inheritance diagrams for the API documentation. "
|
||||||
|
"To fix, install the graphviz project from https://www.graphviz.org"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# qhelpgenerator
|
# qhelpgenerator
|
||||||
find_program(QHELPGEN_EXECUTABLE qhelpgenerator
|
find_program(QHELPGEN_EXECUTABLE qhelpgenerator HINTS ${QT_INSTALL_BINS})
|
||||||
HINTS ${QT_INSTALL_BINS}
|
|
||||||
)
|
|
||||||
if(QHELPGEN_EXECUTABLE)
|
if(QHELPGEN_EXECUTABLE)
|
||||||
set(HAVE_QHELPGEN "YES")
|
set(HAVE_QHELPGEN "YES")
|
||||||
else()
|
else()
|
||||||
set(HAVE_QHELPGEN "NO")
|
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.")
|
message(STATUS "Unable to generate the API documentation in qch format. "
|
||||||
|
"To fix, install the qthelpgenerator program which comes with Qt."
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_file(QDOC_QTCORE_TAG qtcore.tags
|
find_file(QDOC_QTCORE_TAG qtcore.tags HINTS ${QT_INSTALL_DOCS}/qtcore ${QT_INSTALL_DATA}/doc/qtcore)
|
||||||
HINTS ${QT_INSTALL_DOCS}/qtcore
|
|
||||||
HINTS ${QT_INSTALL_DATA}/doc/qtcore
|
|
||||||
)
|
|
||||||
set(QDOC_TAG_DIR "<QDOC_TAG_DIR_not_found>")
|
set(QDOC_TAG_DIR "<QDOC_TAG_DIR_not_found>")
|
||||||
if(QDOC_QTCORE_TAG)
|
if(QDOC_QTCORE_TAG)
|
||||||
get_filename_component(QDOC_TAG_DIR ${QDOC_QTCORE_TAG} DIRECTORY)
|
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_TAG_DIR} DIRECTORY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB _dox_deps *.dox *.html)
|
file(GLOB _dox_deps *.dox *.html)
|
||||||
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
#apidox generation using doxygen
|
# apidox generation using doxygen
|
||||||
configure_file(
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch
|
OUTPUT ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch
|
||||||
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
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
|
# handle a bug in doxygen where image files referred to in markdown are not
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../../screencap.gif ${DOXYGEN_OUTPUT_DIR}/html
|
# copied the output
|
||||||
#copy some files by-hand that are referred to by the markdown README
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../../screencap.gif
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/README-bindings.md ${DOXYGEN_OUTPUT_DIR}/html
|
${DOXYGEN_OUTPUT_DIR}/html
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOXYGEN_OUTPUT_DIR}/html/LICENSES
|
# copy some files by-hand that are referred to by the markdown README
|
||||||
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}/README-bindings.md ${DOXYGEN_OUTPUT_DIR}/html
|
||||||
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/LICENSES
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOXYGEN_OUTPUT_DIR}/html/docs
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/LICENSES/GPL-2.0-only.txt
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/docs/KDDockWidgets-CopyrightAssignmentForm.pdf ${DOXYGEN_OUTPUT_DIR}/html/docs
|
${DOXYGEN_OUTPUT_DIR}/html/LICENSES
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/examples ${DOXYGEN_OUTPUT_DIR}/html/examples
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/LICENSES/GPL-3.0-only.txt
|
||||||
DEPENDS ${_dox_deps} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
${DOXYGEN_OUTPUT_DIR}/html/LICENSES
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
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 to 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)
|
|
||||||
add_custom_target(docs DEPENDS kddockwidgets-api.qch)
|
|
||||||
|
|
||||||
set(QCH_INSTALL_DIR ${INSTALL_DOC_DIR} CACHE STRING "Install location of Qt Assistant help files.")
|
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}/qch/kddockwidgets-api.qch DESTINATION ${QCH_INSTALL_DIR})
|
||||||
install(FILES ${DOXYGEN_OUTPUT_DIR}/kddockwidgets.tags DESTINATION ${INSTALL_DOC_DIR})
|
install(FILES ${DOXYGEN_OUTPUT_DIR}/kddockwidgets.tags DESTINATION ${INSTALL_DOC_DIR})
|
||||||
|
|||||||
@@ -1102,38 +1102,6 @@ USE_HTAGS = NO
|
|||||||
|
|
||||||
VERBATIM_HEADERS = YES
|
VERBATIM_HEADERS = YES
|
||||||
|
|
||||||
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
|
|
||||||
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
|
|
||||||
# cost of reduced performance. This can be particularly helpful with template
|
|
||||||
# rich C++ code for which doxygen's built-in parser lacks the necessary type
|
|
||||||
# information.
|
|
||||||
# Note: The availability of this option depends on whether or not doxygen was
|
|
||||||
# generated with the -Duse_libclang=ON option for CMake.
|
|
||||||
# The default value is: NO.
|
|
||||||
|
|
||||||
CLANG_ASSISTED_PARSING = NO
|
|
||||||
|
|
||||||
# If clang assisted parsing is enabled you can provide the compiler with command
|
|
||||||
# line options that you would normally use when invoking the compiler. Note that
|
|
||||||
# the include paths will already be set by doxygen for the files and directories
|
|
||||||
# specified with INPUT and INCLUDE_PATH.
|
|
||||||
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
|
|
||||||
|
|
||||||
CLANG_OPTIONS =
|
|
||||||
|
|
||||||
# If clang assisted parsing is enabled you can provide the clang parser with the
|
|
||||||
# path to the directory containing a file called compile_commands.json. This
|
|
||||||
# file is the compilation database (see:
|
|
||||||
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
|
|
||||||
# options used when the source files were built. This is equivalent to
|
|
||||||
# specifying the "-p" option to a clang tool, such as clang-check. These options
|
|
||||||
# will then be passed to the parser. Any options specified with CLANG_OPTIONS
|
|
||||||
# will be added as well.
|
|
||||||
# Note: The availability of this option depends on whether or not doxygen was
|
|
||||||
# generated with the -Duse_libclang=ON option for CMake.
|
|
||||||
|
|
||||||
CLANG_DATABASE_PATH =
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the alphabetical class index
|
# Configuration options related to the alphabetical class index
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div style="float: left;">
|
<div style="float: left;">
|
||||||
<img src="kdab-logo-16x16.png">
|
<img src="kdab-logo-16x16.png">
|
||||||
<font style="font-weight: bold;">© 2019-2021 Klarälvdalens Datakonsult AB (KDAB)</font>
|
<font style="font-weight: bold;">© 2019-2022 Klarälvdalens Datakonsult AB (KDAB)</font>
|
||||||
<br>
|
<br>
|
||||||
"The Qt, C++ and OpenGL Experts"<br>
|
"The Qt, C++ and OpenGL Experts"<br>
|
||||||
<a href="https://www.kdab.com/">https://www.kdab.com/</a>
|
<a href="https://www.kdab.com/">https://www.kdab.com/</a>
|
||||||
|
|||||||
1
docs_devel/about.md
Normal file
1
docs_devel/about.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# About
|
||||||
82
docs_devel/concepts.md
Normal file
82
docs_devel/concepts.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# Concepts
|
||||||
|
|
||||||
|
Before digging into code we need to learn some high level concepts which will make it easy
|
||||||
|
to learn the API afterwards.
|
||||||
|
|
||||||
|
## Views or Widgets
|
||||||
|
|
||||||
|
A view, or widget is the most basic GUI element usually provided by your framework.
|
||||||
|
KDDockWidget's has its roots in the Qt QWidget GUI framework, hence the term widget
|
||||||
|
will appear in many places. However, since KDDW's goal is to support other GUI toolkits,
|
||||||
|
we've introduced a more generic term, view.
|
||||||
|
|
||||||
|
For the QtWidget frontend, a view will be internally implemented as a QWidget, while for
|
||||||
|
the QtQuick frontend it will be implemented as a QQuickItem.
|
||||||
|
|
||||||
|
## Guest View
|
||||||
|
|
||||||
|
This is the view that the user (library user) wants to dock. It has some custom content that
|
||||||
|
is only relevant for the application. From KDDW's perspective we don't care what's inside,
|
||||||
|
we'll just help dock it.
|
||||||
|
|
||||||
|
## DockWidget
|
||||||
|
|
||||||
|
The DockWidget is a visual container for the Guest, in other words, its visual parent.
|
||||||
|
Visually, DockWidget and Guest might be indistinguishable, except for some margin added by
|
||||||
|
DockWidget. One reason to have this extra indirection is that it allows us to have a common API
|
||||||
|
to deal with the Guest. Since guest is provided by the application developer it doesn't have any interface.
|
||||||
|
|
||||||
|
## TitleBar
|
||||||
|
|
||||||
|
A TitleBar is the area that has the dock widget title and the float and close buttons.
|
||||||
|
Usually KDDW won't use native OS title bars but draw its own.
|
||||||
|
|
||||||
|
## TabBar
|
||||||
|
|
||||||
|
DockWidgets can be grouped together in tabs. A tab bar is just a group of tabs.
|
||||||
|
In Qt this is something like QTabBar.
|
||||||
|
|
||||||
|
## Stack
|
||||||
|
|
||||||
|
A stack is closely related to TabBar. A stack is a group of dock widgets where only one is visible
|
||||||
|
at a time, the visible one is controlled by the current tab. In Qt this would be QTabWidget.
|
||||||
|
|
||||||
|
## Frame
|
||||||
|
|
||||||
|
The Frame is a container that ties the previous concepts all together.
|
||||||
|
It's composed of 1 or more tabbed DockWidgets, a TitleBar, a Stack and a TabBar.
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
Represents a docking layout. Currently 2 are supported, the traditional nested docking with
|
||||||
|
resizable splitters (this is the default), implemented by MultiSplitter. And a MDI layout, where
|
||||||
|
the dock widgets can be arbitrary positioned and even overlap inside an area.
|
||||||
|
|
||||||
|
The layouts deal in Frame. You add Frame objects to a layout.
|
||||||
|
|
||||||
|
## Separator
|
||||||
|
|
||||||
|
A visual separator between two widgets, which allows the user to resize dock widgets with mouse.
|
||||||
|
|
||||||
|
## FloatingWindow
|
||||||
|
|
||||||
|
When a dock widget isn't embedded into a window it's said to be floating. It's its own
|
||||||
|
top-level native window. This class ties all the previous together. It contains one layout, which
|
||||||
|
contains multiple groups.
|
||||||
|
|
||||||
|
## MainWindow
|
||||||
|
|
||||||
|
Not much different from FloatingWindow technically, but users will often add status bar, tool bar
|
||||||
|
and menu bars to a main window, while FloatingWindow is just an utility window (Qt::Tool).
|
||||||
|
MainWindow also has support for a SideBar.
|
||||||
|
|
||||||
|
## SideBar
|
||||||
|
|
||||||
|
A side bar is a place in the MainWindow where you can "minimize" dock widgets.
|
||||||
|
It's also called the auto-hide future. When you send a dock widget to the sidebar it will close
|
||||||
|
but show a button in the sidebar, if you press it, it will show the dock widget as an overlay.
|
||||||
|
|
||||||
|
## Drop Indicators
|
||||||
|
|
||||||
|
When dragging a dock widgets, KDDW will highlight the places where you can drop it, so
|
||||||
|
it embeds in the correct position.
|
||||||
1
docs_devel/index.md
Normal file
1
docs_devel/index.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# Welcome to KDDockWidgets
|
||||||
11
docs_devel/new_frontend.md
Normal file
11
docs_devel/new_frontend.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Creating a new frontend
|
||||||
|
|
||||||
|
- Copy `src/dummy/` into `src/yourfrontend/`
|
||||||
|
- Rename the files from `_dummy` to `_yourfrontend`
|
||||||
|
- Edit `CMakeLists.txt` and `src/CMakeLists.txt`
|
||||||
|
- Edit the `FrontendType` enum in `KDDockWidgets.h` and add a new enumerator for your frontend
|
||||||
|
- Edit `Platform::frontendTypes()` in `Platform.cpp` and honour your new enumerator, properly ifdefed
|
||||||
|
- In `Platform.cpp` add the needed `#include "yourplatform/Platform_yourplatform.h` include
|
||||||
|
- Edit `Platform::tests_initPlatform()` and add your enumerator
|
||||||
|
- Edit `Platform_yourfrontend::name()` to return an ID for your frontend
|
||||||
|
- Run `./bin/tst_platform Platform::Platform Platform::name` , make sure it passes
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -10,30 +10,20 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
project(kddockwidgets_example)
|
project(qtwidgets_dockwidgets)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||||
|
|
||||||
if(NOT TARGET kddockwidgets)
|
if(NOT TARGET kddockwidgets)
|
||||||
# This will look for Qt, do find_package yourself manually before
|
# This will look for Qt, do find_package yourself manually before if you want
|
||||||
# if you want to look for a specific Qt version for instance.
|
# to look for a specific Qt version for instance.
|
||||||
find_package(KDDockWidgets REQUIRED)
|
find_package(KDDockWidgets REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_example.qrc)
|
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_example.qrc)
|
||||||
|
|
||||||
add_executable(kddockwidgets_example
|
add_executable(qtwidgets_dockwidgets main.cpp MyViewFactory.cpp MyMainWindow.cpp MyWidget.cpp ${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(qtwidgets_dockwidgets PRIVATE KDAB::kddockwidgets)
|
||||||
|
|||||||
@@ -1,106 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of KDDockWidgets.
|
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
|
||||||
|
|
||||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "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>
|
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
|
|
||||||
// clazy:excludeall=missing-qobject-macro,ctor-missing-parent-argument
|
|
||||||
|
|
||||||
class MyTitleBar : public KDDockWidgets::TitleBarWidget
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
explicit MyTitleBar(KDDockWidgets::Frame *frame)
|
|
||||||
: KDDockWidgets::TitleBarWidget(frame)
|
|
||||||
{
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
explicit MyTitleBar(KDDockWidgets::FloatingWindow *fw)
|
|
||||||
: KDDockWidgets::TitleBarWidget(fw)
|
|
||||||
{
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
~MyTitleBar() override;
|
|
||||||
|
|
||||||
void init()
|
|
||||||
{
|
|
||||||
setFixedHeight(60);
|
|
||||||
}
|
|
||||||
|
|
||||||
void paintEvent(QPaintEvent *) override
|
|
||||||
{
|
|
||||||
QPainter p(this);
|
|
||||||
QPen pen(Qt::black);
|
|
||||||
const QColor focusedBackgroundColor = Qt::yellow;
|
|
||||||
const QColor backgroundColor = focusedBackgroundColor.darker(115);
|
|
||||||
QBrush brush(isFocused() ? focusedBackgroundColor : backgroundColor);
|
|
||||||
pen.setWidth(4);
|
|
||||||
p.setPen(pen);
|
|
||||||
p.setBrush(brush);
|
|
||||||
p.drawRect(rect().adjusted(4, 4, -4, -4));
|
|
||||||
QFont f = qApp->font();
|
|
||||||
f.setPixelSize(30);
|
|
||||||
f.setBold(true);
|
|
||||||
p.setFont(f);
|
|
||||||
p.drawText(QPoint(10,40), title());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
MyTitleBar::~MyTitleBar() = default;
|
|
||||||
|
|
||||||
// Inheriting from SeparatorWidget instead of Separator as it handles moving and mouse cursor changing
|
|
||||||
class MySeparator : public Layouting::SeparatorWidget
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
explicit MySeparator(Layouting::Widget *parent)
|
|
||||||
: Layouting::SeparatorWidget(parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
~MySeparator() override;
|
|
||||||
|
|
||||||
void paintEvent(QPaintEvent *) override
|
|
||||||
{
|
|
||||||
QPainter p(this);
|
|
||||||
p.fillRect(QWidget::rect(), Qt::cyan);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
MySeparator::~MySeparator() = default;
|
|
||||||
|
|
||||||
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
|
|
||||||
{
|
|
||||||
// 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
|
|
||||||
{
|
|
||||||
return new MySeparator(parent);
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of KDDockWidgets.
|
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
|
||||||
|
|
||||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <kddockwidgets/FrameworkWidgetFactory.h>
|
|
||||||
|
|
||||||
#include <QPainter>
|
|
||||||
|
|
||||||
// clazy:excludeall=ctor-missing-parent-argument
|
|
||||||
|
|
||||||
class CustomWidgetFactory : public KDDockWidgets::DefaultWidgetFactory
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KDDockWidgets::TitleBar *createTitleBar(KDDockWidgets::Frame *frame) const override;
|
|
||||||
KDDockWidgets::TitleBar *createTitleBar(KDDockWidgets::FloatingWindow *fw) const override;
|
|
||||||
Layouting::Separator *createSeparator(Layouting::Widget *parent = nullptr) const override;
|
|
||||||
};
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -47,13 +47,15 @@ static MyWidget *newMyWidget()
|
|||||||
MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
||||||
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
||||||
bool maxSizeForDockWidget8, bool dockwidget5DoesntCloseBeforeRestore,
|
bool maxSizeForDockWidget8, bool dockwidget5DoesntCloseBeforeRestore,
|
||||||
|
bool dock0BlocksCloseEvent,
|
||||||
const QString &affinityName, QWidget *parent)
|
const QString &affinityName, QWidget *parent)
|
||||||
: MainWindow(uniqueName, options, parent)
|
: KDDockWidgets::Views::MainWindow_qtwidgets(uniqueName, options, parent)
|
||||||
, m_dockWidget0IsNonClosable(dockWidget0IsNonClosable)
|
, m_dockWidget0IsNonClosable(dockWidget0IsNonClosable)
|
||||||
, m_dockWidget9IsNonDockable(nonDockableDockWidget9)
|
, m_dockWidget9IsNonDockable(nonDockableDockWidget9)
|
||||||
, m_restoreIsRelative(restoreIsRelative)
|
, m_restoreIsRelative(restoreIsRelative)
|
||||||
, m_maxSizeForDockWidget8(maxSizeForDockWidget8)
|
, m_maxSizeForDockWidget8(maxSizeForDockWidget8)
|
||||||
, m_dockwidget5DoesntCloseBeforeRestore(dockwidget5DoesntCloseBeforeRestore)
|
, m_dockwidget5DoesntCloseBeforeRestore(dockwidget5DoesntCloseBeforeRestore)
|
||||||
|
, m_dock0BlocksCloseEvent(dock0BlocksCloseEvent)
|
||||||
{
|
{
|
||||||
auto menubar = menuBar();
|
auto menubar = menuBar();
|
||||||
auto fileMenu = new QMenu(QStringLiteral("File"), this);
|
auto fileMenu = new QMenu(QStringLiteral("File"), this);
|
||||||
@@ -71,9 +73,9 @@ MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowO
|
|||||||
count++;
|
count++;
|
||||||
auto w = newMyWidget();
|
auto w = newMyWidget();
|
||||||
w->setGeometry(100, 100, 400, 400);
|
w->setGeometry(100, 100, 400, 400);
|
||||||
auto dock = new KDDockWidgets::DockWidget(QStringLiteral("new dock %1").arg(count));
|
auto dock = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("new dock %1").arg(count));
|
||||||
dock->setWidget(w);
|
dock->setWidget(w);
|
||||||
dock->resize(600, 600);
|
dock->resize(QSize(600, 600));
|
||||||
dock->show();
|
dock->show();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -101,7 +103,8 @@ MyMainWindow::MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowO
|
|||||||
});
|
});
|
||||||
|
|
||||||
auto layoutEqually = fileMenu->addAction(QStringLiteral("Layout Equally"));
|
auto layoutEqually = fileMenu->addAction(QStringLiteral("Layout Equally"));
|
||||||
connect(layoutEqually, &QAction::triggered, this, &MainWindow::layoutEqually);
|
connect(layoutEqually, &QAction::triggered,
|
||||||
|
this, [this] { this->layoutEqually(); });
|
||||||
|
|
||||||
auto quitAction = fileMenu->addAction(QStringLiteral("Quit"));
|
auto quitAction = fileMenu->addAction(QStringLiteral("Quit"));
|
||||||
connect(quitAction, &QAction::triggered, qApp, &QApplication::quit);
|
connect(quitAction, &QAction::triggered, qApp, &QApplication::quit);
|
||||||
@@ -132,7 +135,6 @@ void MyMainWindow::createDockWidgets()
|
|||||||
|
|
||||||
const int numDockWidgets = m_dockWidget9IsNonDockable ? 10 : 9;
|
const int numDockWidgets = m_dockWidget9IsNonDockable ? 10 : 9;
|
||||||
|
|
||||||
|
|
||||||
// Create 9 KDDockWidget::DockWidget and the respective widgets they're hosting (MyWidget instances)
|
// Create 9 KDDockWidget::DockWidget and the respective widgets they're hosting (MyWidget instances)
|
||||||
for (int i = 0; i < numDockWidgets; i++)
|
for (int i = 0; i < numDockWidgets; i++)
|
||||||
m_dockwidgets << newDockWidget();
|
m_dockwidgets << newDockWidget();
|
||||||
@@ -157,28 +159,28 @@ void MyMainWindow::createDockWidgets()
|
|||||||
// Floating windows also support nesting, here we add 8 to the bottom of the group
|
// Floating windows also support nesting, here we add 8 to the bottom of the group
|
||||||
m_dockwidgets[6]->addDockWidgetToContainingWindow(m_dockwidgets.at(8), KDDockWidgets::Location_OnBottom);
|
m_dockwidgets[6]->addDockWidgetToContainingWindow(m_dockwidgets.at(8), KDDockWidgets::Location_OnBottom);
|
||||||
|
|
||||||
auto floatingWindow = m_dockwidgets.at(6)->window();
|
auto floatingWindow = m_dockwidgets.at(6)->rootView();
|
||||||
floatingWindow->move(100, 100);
|
floatingWindow->move(100, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
KDDockWidgets::DockWidgetBase *MyMainWindow::newDockWidget()
|
KDDockWidgets::Views::DockWidget_qtwidgets *MyMainWindow::newDockWidget()
|
||||||
{
|
{
|
||||||
static int count = 0;
|
static int count = 0;
|
||||||
|
|
||||||
// Passing options is optional, we just want to illustrate Option_NotClosable here
|
// Passing options is optional, we just want to illustrate Option_NotClosable here
|
||||||
KDDockWidgets::DockWidget::Options options = KDDockWidgets::DockWidget::Option_None;
|
KDDockWidgets::DockWidgetOptions options = KDDockWidgets::DockWidgetOption_None;
|
||||||
KDDockWidgets::DockWidget::LayoutSaverOptions layoutSaverOptions = KDDockWidgets::DockWidget::LayoutSaverOption::None;
|
KDDockWidgets::LayoutSaverOptions layoutSaverOptions = KDDockWidgets::LayoutSaverOption::None;
|
||||||
|
|
||||||
if (count == 0 && m_dockWidget0IsNonClosable)
|
if (count == 0 && m_dockWidget0IsNonClosable)
|
||||||
options |= KDDockWidgets::DockWidget::Option_NotClosable;
|
options |= KDDockWidgets::DockWidgetOption_NotClosable;
|
||||||
|
|
||||||
if (count == 9 && m_dockWidget9IsNonDockable)
|
if (count == 9 && m_dockWidget9IsNonDockable)
|
||||||
options |= KDDockWidgets::DockWidget::Option_NotDockable;
|
options |= KDDockWidgets::DockWidgetOption_NotDockable;
|
||||||
|
|
||||||
if (count == 5 && m_dockwidget5DoesntCloseBeforeRestore)
|
if (count == 5 && m_dockwidget5DoesntCloseBeforeRestore)
|
||||||
layoutSaverOptions |= KDDockWidgets::DockWidget::LayoutSaverOption::Skip;
|
layoutSaverOptions |= KDDockWidgets::LayoutSaverOption::Skip;
|
||||||
|
|
||||||
auto dock = new KDDockWidgets::DockWidget(QStringLiteral("DockWidget #%1").arg(count), options, layoutSaverOptions);
|
auto dock = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("DockWidget #%1").arg(count), options, layoutSaverOptions);
|
||||||
dock->setAffinities(affinities()); // optional, just to show the feature. Pass -mi to the example to see incompatible dock widgets
|
dock->setAffinities(affinities()); // optional, just to show the feature. Pass -mi to the example to see incompatible dock widgets
|
||||||
|
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
@@ -190,15 +192,18 @@ KDDockWidgets::DockWidgetBase *MyMainWindow::newDockWidget()
|
|||||||
myWidget->setMaximumSize(200, 200);
|
myWidget->setMaximumSize(200, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count == 0 && m_dock0BlocksCloseEvent)
|
||||||
|
myWidget->blockCloseEvent();
|
||||||
|
|
||||||
dock->setWidget(myWidget);
|
dock->setWidget(myWidget);
|
||||||
|
|
||||||
if (dock->options() & KDDockWidgets::DockWidget::Option_NotDockable) {
|
if (dock->options() & KDDockWidgets::DockWidgetOption_NotDockable) {
|
||||||
dock->setTitle(QStringLiteral("DockWidget #%1 (%2)").arg(count).arg("non dockable"));
|
dock->setTitle(QStringLiteral("DockWidget #%1 (%2)").arg(count).arg("non dockable"));
|
||||||
} else {
|
} else {
|
||||||
dock->setTitle(QStringLiteral("DockWidget #%1").arg(count));
|
dock->setTitle(QStringLiteral("DockWidget #%1").arg(count));
|
||||||
}
|
}
|
||||||
|
|
||||||
dock->resize(600, 600);
|
dock->resize(QSize(600, 600));
|
||||||
m_toggleMenu->addAction(dock->toggleAction());
|
m_toggleMenu->addAction(dock->toggleAction());
|
||||||
dock->toggleAction()->setShortcut(QStringLiteral("ctrl+%1").arg(count));
|
dock->toggleAction()->setShortcut(QStringLiteral("ctrl+%1").arg(count));
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -14,25 +14,26 @@
|
|||||||
#include <kddockwidgets/DockWidget.h>
|
#include <kddockwidgets/DockWidget.h>
|
||||||
#include <kddockwidgets/MainWindow.h>
|
#include <kddockwidgets/MainWindow.h>
|
||||||
|
|
||||||
class MyMainWindow : public KDDockWidgets::MainWindow
|
class MyMainWindow : public KDDockWidgets::Views::MainWindow_qtwidgets
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
explicit MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
|
||||||
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
|
||||||
bool maxSizeForDockWidget8, bool dockwidget5DoesntCloseBeforeRestore,
|
bool maxSizeForDockWidget8, bool dockwidget5DoesntCloseBeforeRestore, bool dock0BlocksCloseEvent,
|
||||||
const QString &affinityName = {}, // Usually not needed. Just here to show the feature.
|
const QString &affinityName = {}, // Usually not needed. Just here to show the feature.
|
||||||
QWidget *parent = nullptr);
|
QWidget *parent = nullptr);
|
||||||
~MyMainWindow() override;
|
~MyMainWindow() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createDockWidgets();
|
void createDockWidgets();
|
||||||
KDDockWidgets::DockWidgetBase* newDockWidget();
|
KDDockWidgets::Views::DockWidget_qtwidgets *newDockWidget();
|
||||||
QMenu *m_toggleMenu = nullptr;
|
QMenu *m_toggleMenu = nullptr;
|
||||||
const bool m_dockWidget0IsNonClosable;
|
const bool m_dockWidget0IsNonClosable;
|
||||||
const bool m_dockWidget9IsNonDockable;
|
const bool m_dockWidget9IsNonDockable;
|
||||||
const bool m_restoreIsRelative;
|
const bool m_restoreIsRelative;
|
||||||
const bool m_maxSizeForDockWidget8;
|
const bool m_maxSizeForDockWidget8;
|
||||||
const bool m_dockwidget5DoesntCloseBeforeRestore;
|
const bool m_dockwidget5DoesntCloseBeforeRestore;
|
||||||
KDDockWidgets::DockWidget::List m_dockwidgets;
|
const bool m_dock0BlocksCloseEvent;
|
||||||
|
QVector<KDDockWidgets::Views::DockWidget_qtwidgets *> m_dockwidgets;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -14,15 +14,16 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <kddockwidgets/private/widgets/TitleBarWidget_p.h>
|
#include <kddockwidgets/views/TitleBar_qtwidgets.h>
|
||||||
|
#include <kddockwidgets/controllers/TitleBar.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Shows how to implement a custom titlebar which uses "Qt StyleSheets".
|
* @brief Shows how to implement a custom titlebar which uses "Qt StyleSheets".
|
||||||
*
|
*
|
||||||
* Derive from KDDockWidgets::DefaultWidgetFactory and override the two createTitleBar() methods.
|
* Derive from KDDockWidgets::ViewFactory_qtwidgets and override the createTitleBar() method.
|
||||||
*
|
*
|
||||||
* To try it out, modify examples/dockwidgets/MyFrameworkWidgetFactory.cpp to return a MyTitleBar_CSS instance.
|
* To try it out, modify examples/dockwidgets/MyViewFactory.cpp to return a MyTitleBar_CSS instance.
|
||||||
* Run the example with: ./bin/kddockwidgets_example -p
|
* Run the example with: ./bin/examples/qtwidgets_dockwidgets -p
|
||||||
*
|
*
|
||||||
* WARNINGS:
|
* WARNINGS:
|
||||||
* - Qt StyleSheets are not recommended for new applications. Often you are able to style 90% of
|
* - Qt StyleSheets are not recommended for new applications. Often you are able to style 90% of
|
||||||
@@ -30,27 +31,28 @@
|
|||||||
* - The Qt maintainers have manifested intention to deprecated stylesheets.
|
* - The Qt maintainers have manifested intention to deprecated stylesheets.
|
||||||
* - Stylesheets are supported for built-in QWidgets (QPushButton, QComboBox, etc.), any widget
|
* - 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
|
* 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.
|
* your background manually. KDDockWidget::Views::TitleBar_qtwidgets does this for your convenience though.
|
||||||
* - Qt stylesheets don't react to property changes (known old bug in Qt), for example:
|
* - Qt stylesheets don't react to property changes (known old bug in Qt), for example:
|
||||||
* QLineEdit[readOnly="true"] { color: gray }
|
* QLineEdit[readOnly="true"] { color: gray }
|
||||||
* this won't trigger when readOnly changes to false, you need to set/unset. This is QTBUG-51236
|
* 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
|
* - KDDockWidget::Views::TitleBar_qtwidgets::isFocused is a property, there for needs to workaround the
|
||||||
* above bug by unsetting the sheet and setting it again.
|
* above bug by unsetting the sheet and setting it again.
|
||||||
*/
|
*/
|
||||||
class MyTitleBar_CSS : public KDDockWidgets::TitleBarWidget
|
class MyTitleBar_CSS : public KDDockWidgets::Views::TitleBar_qtwidgets
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit MyTitleBar_CSS(KDDockWidgets::Frame *frame)
|
explicit MyTitleBar_CSS(KDDockWidgets::Controllers::TitleBar *controller,
|
||||||
: KDDockWidgets::TitleBarWidget(frame)
|
View *parent = nullptr)
|
||||||
|
: KDDockWidgets::Views::TitleBar_qtwidgets(controller, parent)
|
||||||
{
|
{
|
||||||
init();
|
initStyleSheet();
|
||||||
|
connect(controller, &KDDockWidgets::Controllers::TitleBar::isFocusedChanged, this, [this] {
|
||||||
|
// Workaround QTBUG-51236, this makes the [isFocused=true] syntax useful
|
||||||
|
setStyleSheet(QString());
|
||||||
|
initStyleSheet();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit MyTitleBar_CSS(KDDockWidgets::FloatingWindow *fw)
|
|
||||||
: KDDockWidgets::TitleBarWidget(fw)
|
|
||||||
{
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
~MyTitleBar_CSS() override;
|
~MyTitleBar_CSS() override;
|
||||||
|
|
||||||
@@ -67,16 +69,6 @@ public:
|
|||||||
"background: green"
|
"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()
|
MyTitleBar_CSS::~MyTitleBar_CSS()
|
||||||
|
|||||||
91
examples/dockwidgets/MyViewFactory.cpp
Normal file
91
examples/dockwidgets/MyViewFactory.cpp
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2022 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 "MyViewFactory.h"
|
||||||
|
#include "MyTitleBar_CSS.h"
|
||||||
|
|
||||||
|
#include <kddockwidgets/views/TitleBar_qtwidgets.h>
|
||||||
|
#include <kddockwidgets/views/Separator_qtwidgets.h>
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
|
// clazy:excludeall=missing-qobject-macro,ctor-missing-parent-argument
|
||||||
|
|
||||||
|
class MyTitleBar : public KDDockWidgets::Views::TitleBar_qtwidgets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit MyTitleBar(KDDockWidgets::Controllers::TitleBar *controller,
|
||||||
|
View *parent = nullptr)
|
||||||
|
: KDDockWidgets::Views::TitleBar_qtwidgets(controller, parent)
|
||||||
|
, m_controller(controller)
|
||||||
|
{
|
||||||
|
setFixedHeight(60);
|
||||||
|
}
|
||||||
|
|
||||||
|
~MyTitleBar() override;
|
||||||
|
|
||||||
|
void paintEvent(QPaintEvent *) override
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
QPen pen(Qt::black);
|
||||||
|
const QColor focusedBackgroundColor = Qt::yellow;
|
||||||
|
const QColor backgroundColor = focusedBackgroundColor.darker(115);
|
||||||
|
QBrush brush(m_controller->isFocused() ? focusedBackgroundColor : backgroundColor);
|
||||||
|
pen.setWidth(4);
|
||||||
|
p.setPen(pen);
|
||||||
|
p.setBrush(brush);
|
||||||
|
p.drawRect(rect().adjusted(4, 4, -4, -4));
|
||||||
|
QFont f = qGuiApp->font();
|
||||||
|
f.setPixelSize(30);
|
||||||
|
f.setBold(true);
|
||||||
|
p.setFont(f);
|
||||||
|
p.drawText(QPoint(10, 40), m_controller->title());
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
KDDockWidgets::Controllers::TitleBar *const m_controller;
|
||||||
|
};
|
||||||
|
|
||||||
|
MyTitleBar::~MyTitleBar() = default;
|
||||||
|
|
||||||
|
// Inheriting from SeparatorWidget instead of Separator as it handles moving and mouse cursor changing
|
||||||
|
class MySeparator : public KDDockWidgets::Views::Separator_qtwidgets
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit MySeparator(KDDockWidgets::Controllers::Separator *controller, View *parent)
|
||||||
|
: KDDockWidgets::Views::Separator_qtwidgets(controller, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
~MySeparator() override;
|
||||||
|
|
||||||
|
void paintEvent(QPaintEvent *) override
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
p.fillRect(QWidget::rect(), Qt::cyan);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
MySeparator::~MySeparator() = default;
|
||||||
|
|
||||||
|
KDDockWidgets::View *CustomWidgetFactory::createTitleBar(KDDockWidgets::Controllers::TitleBar *controller,
|
||||||
|
KDDockWidgets::View *parent) const
|
||||||
|
{
|
||||||
|
// Feel free to return MyTitleBar_CSS here instead, but just for education purposes!
|
||||||
|
return new MyTitleBar(controller, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
KDDockWidgets::View *CustomWidgetFactory::createSeparator(KDDockWidgets::Controllers::Separator *controller,
|
||||||
|
KDDockWidgets::View *parent) const
|
||||||
|
{
|
||||||
|
return new MySeparator(controller, parent);
|
||||||
|
}
|
||||||
26
examples/dockwidgets/MyViewFactory.h
Normal file
26
examples/dockwidgets/MyViewFactory.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2022 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <kddockwidgets/ViewFactory_qtwidgets.h>
|
||||||
|
|
||||||
|
// clazy:excludeall=ctor-missing-parent-argument
|
||||||
|
|
||||||
|
class CustomWidgetFactory : public KDDockWidgets::ViewFactory_qtwidgets
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
KDDockWidgets::View *createTitleBar(KDDockWidgets::Controllers::TitleBar *,
|
||||||
|
KDDockWidgets::View *parent) const override;
|
||||||
|
KDDockWidgets::View *createSeparator(KDDockWidgets::Controllers::Separator *,
|
||||||
|
KDDockWidgets::View *parent = nullptr) const override;
|
||||||
|
};
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
|
#include <QCloseEvent>
|
||||||
|
|
||||||
static QHash<QString, QImage> s_images; /// clazy:exclude=non-pod-global-static
|
static QHash<QString, QImage> s_images; /// clazy:exclude=non-pod-global-static
|
||||||
|
|
||||||
@@ -70,6 +71,20 @@ void MyWidget::drawLogo(QPainter &p)
|
|||||||
p.drawImage(targetLogoRect, m_logo, m_logo.rect());
|
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)
|
MyWidget1::MyWidget1(MyWidget::QWidget *parent)
|
||||||
: MyWidget(QStringLiteral(":/assets/triangles.png"), QStringLiteral(":/assets/KDAB_bubble_white.png"), parent)
|
: MyWidget(QStringLiteral(":/assets/triangles.png"), QStringLiteral(":/assets/KDAB_bubble_white.png"), parent)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -26,10 +26,16 @@ class MyWidget : public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent = nullptr);
|
explicit MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent = nullptr);
|
||||||
~MyWidget();
|
~MyWidget();
|
||||||
|
|
||||||
|
// These two are just for demonstrating how to block the close event, if desired
|
||||||
|
void blockCloseEvent();
|
||||||
|
void closeEvent(QCloseEvent *) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void drawLogo(QPainter &);
|
void drawLogo(QPainter &);
|
||||||
QImage m_background;
|
QImage m_background;
|
||||||
QImage m_logo;
|
QImage m_logo;
|
||||||
|
bool m_blocksCloseEvent = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyWidget1 : public MyWidget
|
class MyWidget1 : public MyWidget
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,15 +11,19 @@
|
|||||||
|
|
||||||
#include "MyWidget.h"
|
#include "MyWidget.h"
|
||||||
#include "MyMainWindow.h"
|
#include "MyMainWindow.h"
|
||||||
#include "MyFrameworkWidgetFactory.h"
|
#include "MyViewFactory.h"
|
||||||
|
|
||||||
#include <kddockwidgets/Config.h>
|
#include <kddockwidgets/Config.h>
|
||||||
|
#include <kddockwidgets/ViewFactory.h>
|
||||||
|
#include <kddockwidgets/controllers/DockWidget.h>
|
||||||
|
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
// clazy:excludeall=qstring-allocations
|
// clazy:excludeall=qstring-allocations
|
||||||
|
|
||||||
using namespace KDDockWidgets;
|
using namespace KDDockWidgets;
|
||||||
@@ -31,10 +35,11 @@ int main(int argc, char **argv)
|
|||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#endif
|
#endif
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
app.setOrganizationName(QStringLiteral("KDAB"));
|
app.setOrganizationName(QStringLiteral("KDAB"));
|
||||||
app.setApplicationName(QStringLiteral("Test app"));
|
app.setApplicationName(QStringLiteral("Test app"));
|
||||||
|
|
||||||
|
KDDockWidgets::initFrontend(KDDockWidgets::FrontendType::QtWidgets);
|
||||||
|
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
parser.setApplicationDescription("KDDockWidgets example application");
|
parser.setApplicationDescription("KDDockWidgets example application");
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
@@ -42,7 +47,7 @@ int main(int argc, char **argv)
|
|||||||
// Fusion looks better in general, but feel free to change
|
// Fusion looks better in general, but feel free to change
|
||||||
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
||||||
|
|
||||||
QCommandLineOption customStyle("p", QCoreApplication::translate("main", "Shows how to style framework internals via FrameworkWidgetFactory"));
|
QCommandLineOption customStyle("p", QCoreApplication::translate("main", "Shows how to style framework internals via ViewFactory"));
|
||||||
parser.addOption(customStyle);
|
parser.addOption(customStyle);
|
||||||
|
|
||||||
QCommandLineOption reorderTabsOption("r", QCoreApplication::translate("main", "Support re-ordering tabs with mouse"));
|
QCommandLineOption reorderTabsOption("r", QCoreApplication::translate("main", "Support re-ordering tabs with mouse"));
|
||||||
@@ -106,7 +111,7 @@ int main(int argc, char **argv)
|
|||||||
QCommandLineOption maxSizeOption("g", QCoreApplication::translate("main", "Make dock #8 have a max-size of 200x200."));
|
QCommandLineOption maxSizeOption("g", QCoreApplication::translate("main", "Make dock #8 have a max-size of 200x200."));
|
||||||
parser.addOption(maxSizeOption);
|
parser.addOption(maxSizeOption);
|
||||||
|
|
||||||
QCommandLineOption centralFrame("f", QCoreApplication::translate("main", "Persistent central frame"));
|
QCommandLineOption centralFrame("f", QCoreApplication::translate("main", "Persistent central group"));
|
||||||
|
|
||||||
QCommandLineOption autoHideSupport("w", QCoreApplication::translate("main", "Enables auto-hide/minimization to side-bar support"));
|
QCommandLineOption autoHideSupport("w", QCoreApplication::translate("main", "Enables auto-hide/minimization to side-bar support"));
|
||||||
parser.addOption(autoHideSupport);
|
parser.addOption(autoHideSupport);
|
||||||
@@ -115,10 +120,14 @@ int main(int argc, char **argv)
|
|||||||
QCoreApplication::translate("main", "The title bar's close button will only close the current tab instead of all. Illustrates using Config::Flag_CloseOnlyCurrentTab"));
|
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);
|
parser.addOption(closeOnlyCurrentTab);
|
||||||
|
|
||||||
QCommandLineOption dontCloseBeforeRestore("dont-close-widget-before-restore", //krazy:exclude=spelling
|
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"));
|
QCoreApplication::translate("main", "DockWidget #5 won't be closed before a restore. Illustrates LayoutSaverOption::DontCloseBeforeRestore"));
|
||||||
parser.addOption(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",
|
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"));
|
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);
|
parser.addOption(showButtonsInTabBarIfTitleBarHidden);
|
||||||
@@ -131,6 +140,10 @@ int main(int argc, char **argv)
|
|||||||
QCoreApplication::translate("main", "Allow switching tabs via context menu in tabs area"));
|
QCoreApplication::translate("main", "Allow switching tabs via context menu in tabs area"));
|
||||||
parser.addOption(ctxtMenuOnTabs);
|
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)
|
#if defined(DOCKS_DEVELOPER_MODE)
|
||||||
parser.addOption(centralFrame);
|
parser.addOption(centralFrame);
|
||||||
|
|
||||||
@@ -144,10 +157,10 @@ int main(int argc, char **argv)
|
|||||||
parser.addOption(nativeTitleBar);
|
parser.addOption(nativeTitleBar);
|
||||||
parser.addOption(noDropIndicators);
|
parser.addOption(noDropIndicators);
|
||||||
|
|
||||||
# if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
QCommandLineOption noAeroSnap("no-aero-snap", QCoreApplication::translate("main", "(internal) Disable AeroSnap"));
|
QCommandLineOption noAeroSnap("no-aero-snap", QCoreApplication::translate("main", "(internal) Disable AeroSnap"));
|
||||||
parser.addOption(noAeroSnap);
|
parser.addOption(noAeroSnap);
|
||||||
# endif
|
#endif
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(centralFrame)
|
Q_UNUSED(centralFrame)
|
||||||
#endif
|
#endif
|
||||||
@@ -155,14 +168,14 @@ int main(int argc, char **argv)
|
|||||||
parser.process(app);
|
parser.process(app);
|
||||||
|
|
||||||
if (parser.isSet(customStyle)) {
|
if (parser.isSet(customStyle)) {
|
||||||
Config::self().setFrameworkWidgetFactory(new CustomWidgetFactory()); // Sets our custom factory
|
Config::self().setViewFactory(new CustomWidgetFactory()); // Sets our custom factory
|
||||||
|
|
||||||
// Increase the separator size, just for demo
|
// Increase the separator size, just for demo
|
||||||
Config::self().setSeparatorThickness(10);
|
Config::self().setSeparatorThickness(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parser.isSet(segmentedIndicators))
|
if (parser.isSet(segmentedIndicators))
|
||||||
KDDockWidgets::DefaultWidgetFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::Segmented;
|
KDDockWidgets::ViewFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::Segmented;
|
||||||
|
|
||||||
MainWindowOptions options = MainWindowOption_None;
|
MainWindowOptions options = MainWindowOption_None;
|
||||||
auto flags = KDDockWidgets::Config::self().flags();
|
auto flags = KDDockWidgets::Config::self().flags();
|
||||||
@@ -188,12 +201,12 @@ int main(int argc, char **argv)
|
|||||||
flags |= KDDockWidgets::Config::Flag_NativeTitleBar;
|
flags |= KDDockWidgets::Config::Flag_NativeTitleBar;
|
||||||
|
|
||||||
if (parser.isSet(noDropIndicators))
|
if (parser.isSet(noDropIndicators))
|
||||||
KDDockWidgets::DefaultWidgetFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::None;
|
KDDockWidgets::ViewFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::None;
|
||||||
|
|
||||||
# if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
if (parser.isSet(noAeroSnap))
|
if (parser.isSet(noAeroSnap))
|
||||||
internalFlags |= KDDockWidgets::Config::InternalFlag_NoAeroSnap;
|
internalFlags |= KDDockWidgets::Config::InternalFlag_NoAeroSnap;
|
||||||
# endif
|
#endif
|
||||||
Config::self().setInternalFlags(internalFlags);
|
Config::self().setInternalFlags(internalFlags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -253,6 +266,26 @@ int main(int argc, char **argv)
|
|||||||
return 1;
|
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 areas
|
||||||
|
auto func = [](KDDockWidgets::DropLocation location,
|
||||||
|
const KDDockWidgets::Controllers::DockWidget::List &source,
|
||||||
|
const KDDockWidgets::Controllers::DockWidget::List &target,
|
||||||
|
Controllers::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::Controllers::DockWidget *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);
|
KDDockWidgets::Config::self().setFlags(flags);
|
||||||
|
|
||||||
const bool nonClosableDockWidget0 = parser.isSet(nonClosableDockWidget);
|
const bool nonClosableDockWidget0 = parser.isSet(nonClosableDockWidget);
|
||||||
@@ -261,6 +294,7 @@ int main(int argc, char **argv)
|
|||||||
const bool maxSizeForDockWidget8 = parser.isSet(maxSizeOption);
|
const bool maxSizeForDockWidget8 = parser.isSet(maxSizeOption);
|
||||||
const bool dontCloseDockWidget5BeforeRestore = parser.isSet(dontCloseBeforeRestore);
|
const bool dontCloseDockWidget5BeforeRestore = parser.isSet(dontCloseBeforeRestore);
|
||||||
const bool usesMainWindowsWithAffinity = parser.isSet(multipleMainWindows);
|
const bool usesMainWindowsWithAffinity = parser.isSet(multipleMainWindows);
|
||||||
|
const bool dock0BlocksCloseEvent = parser.isSet(blockCloseEvent);
|
||||||
|
|
||||||
#ifdef KDDOCKWIDGETS_SUPPORTS_NESTED_MAINWINDOWS
|
#ifdef KDDOCKWIDGETS_SUPPORTS_NESTED_MAINWINDOWS
|
||||||
const bool usesDockableMainWindows = parser.isSet(dockableMainWindows);
|
const bool usesDockableMainWindows = parser.isSet(dockableMainWindows);
|
||||||
@@ -270,7 +304,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
MyMainWindow mainWindow(QStringLiteral("MyMainWindow"), options, nonClosableDockWidget0,
|
MyMainWindow mainWindow(QStringLiteral("MyMainWindow"), options, nonClosableDockWidget0,
|
||||||
nonDockableDockWidget9, restoreIsRelative, maxSizeForDockWidget8,
|
nonDockableDockWidget9, restoreIsRelative, maxSizeForDockWidget8,
|
||||||
dontCloseDockWidget5BeforeRestore);
|
dontCloseDockWidget5BeforeRestore, dock0BlocksCloseEvent);
|
||||||
mainWindow.setWindowTitle("Main Window 1");
|
mainWindow.setWindowTitle("Main Window 1");
|
||||||
mainWindow.resize(1200, 1200);
|
mainWindow.resize(1200, 1200);
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
@@ -289,7 +323,7 @@ int main(int argc, char **argv)
|
|||||||
auto mainWindow2 = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
auto mainWindow2 = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
||||||
nonClosableDockWidget0, nonDockableDockWidget9,
|
nonClosableDockWidget0, nonDockableDockWidget9,
|
||||||
restoreIsRelative, maxSizeForDockWidget8,
|
restoreIsRelative, maxSizeForDockWidget8,
|
||||||
dontCloseDockWidget5BeforeRestore, affinity);
|
dontCloseDockWidget5BeforeRestore, dock0BlocksCloseEvent, affinity);
|
||||||
if (affinity.isEmpty())
|
if (affinity.isEmpty())
|
||||||
mainWindow2->setWindowTitle("Main Window 2");
|
mainWindow2->setWindowTitle("Main Window 2");
|
||||||
else
|
else
|
||||||
@@ -298,22 +332,21 @@ int main(int argc, char **argv)
|
|||||||
mainWindow2->resize(1200, 1200);
|
mainWindow2->resize(1200, 1200);
|
||||||
mainWindow2->show();
|
mainWindow2->show();
|
||||||
} else if (usesDockableMainWindows) {
|
} else if (usesDockableMainWindows) {
|
||||||
auto mainWindowDockWidget = new DockWidget(QStringLiteral("MyMainWindow-2-DW"));
|
auto mainWindowDockWidget = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MyMainWindow-2-DW"));
|
||||||
|
|
||||||
const QString affinity = QStringLiteral("Inner-DockWidgets-2");
|
const QString affinity = QStringLiteral("Inner-DockWidgets-2");
|
||||||
auto dockableMainWindow = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
auto dockableMainWindow = new MyMainWindow(QStringLiteral("MyMainWindow-2"), options,
|
||||||
false, false, restoreIsRelative, false,
|
false, false, restoreIsRelative, false,
|
||||||
false, affinity);
|
false, false, affinity);
|
||||||
|
|
||||||
dockableMainWindow->setAffinities({ affinity });
|
dockableMainWindow->setAffinities({ affinity });
|
||||||
|
|
||||||
dockableMainWindow->setStyleSheet(QStringLiteral("background: yellow"));
|
dockableMainWindow->setStyleSheet(QStringLiteral("background: yellow"));
|
||||||
|
|
||||||
dockableMainWindow->setWindowTitle("Dockable Main Window");
|
dockableMainWindow->setWindowTitle("Dockable Main Window");
|
||||||
dockableMainWindow->show();
|
dockableMainWindow->show();
|
||||||
mainWindowDockWidget->setWidget(dockableMainWindow);
|
mainWindowDockWidget->setWidget(dockableMainWindow);
|
||||||
mainWindowDockWidget->show();
|
mainWindowDockWidget->show();
|
||||||
mainWindowDockWidget->resize(800, 800);
|
mainWindowDockWidget->resize(QSize(800, 800));
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList args = parser.positionalArguments();
|
const QStringList args = parser.positionalArguments();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -10,28 +10,23 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
project(kddockwidgets_minimal_mdi_example)
|
project(qtwidgets_mdi)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||||
|
|
||||||
if(NOT TARGET kddockwidgets)
|
if(NOT TARGET kddockwidgets)
|
||||||
# This will look for Qt, do find_package yourself manually before
|
# This will look for Qt, do find_package yourself manually before if you want
|
||||||
# if you want to look for a specific Qt version for instance.
|
# to look for a specific Qt version for instance.
|
||||||
find_package(KDDockWidgets REQUIRED)
|
find_package(KDDockWidgets REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/resources_example.qrc)
|
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/resources_example.qrc)
|
||||||
|
|
||||||
add_executable(kddockwidgets_minimal_mdi_example
|
# Just to reuse MyWidget.h
|
||||||
main.cpp
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/)
|
||||||
../dockwidgets/MyWidget.cpp
|
|
||||||
${RESOURCES_EXAMPLE_SRC}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(kddockwidgets_minimal_mdi_example
|
add_executable(qtwidgets_mdi main.cpp ../dockwidgets/MyWidget.cpp ${RESOURCES_EXAMPLE_SRC})
|
||||||
PRIVATE
|
|
||||||
KDAB::kddockwidgets
|
|
||||||
)
|
|
||||||
|
|
||||||
|
target_link_libraries(qtwidgets_mdi PRIVATE KDAB::kddockwidgets)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
#include "MyWidget.h"
|
#include "MyWidget.h"
|
||||||
|
|
||||||
|
#include <kddockwidgets/views/MainWindowMDI_qtwidgets.h>
|
||||||
#include <kddockwidgets/DockWidget.h>
|
#include <kddockwidgets/DockWidget.h>
|
||||||
#include <kddockwidgets/MainWindowMDI.h>
|
|
||||||
|
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
@@ -30,29 +30,34 @@ int main(int argc, char **argv)
|
|||||||
app.setOrganizationName(QStringLiteral("KDAB"));
|
app.setOrganizationName(QStringLiteral("KDAB"));
|
||||||
app.setApplicationName(QStringLiteral("Test app"));
|
app.setApplicationName(QStringLiteral("Test app"));
|
||||||
|
|
||||||
|
KDDockWidgets::initFrontend(KDDockWidgets::FrontendType::QtWidgets);
|
||||||
|
|
||||||
// Fusion looks better in general, but feel free to change
|
// Fusion looks better in general, but feel free to change
|
||||||
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
||||||
|
|
||||||
// # 1. Create our main window
|
// # 1. Create our main window
|
||||||
|
|
||||||
KDDockWidgets::MainWindowMDI mainWindow(QStringLiteral("MyMainWindow"));
|
KDDockWidgets::Views::MainWindowMDI_qtwidgets mainWindow(QStringLiteral("MyMainWindow"));
|
||||||
mainWindow.setWindowTitle("Main Window");
|
mainWindow.setWindowTitle("Main Window");
|
||||||
mainWindow.resize(1200, 1200);
|
mainWindow.resize(1200, 1200);
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
|
|
||||||
// # 2. Create a dock widget, it needs a unique name
|
// # 2. Create a dock widget, it needs a unique name
|
||||||
auto dock1 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock1"));
|
auto dock1 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MyDock1"));
|
||||||
auto widget1 = new MyWidget1();
|
auto widget1 = new MyWidget1();
|
||||||
dock1->setWidget(widget1);
|
dock1->setWidget(widget1);
|
||||||
|
|
||||||
auto dock2 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock2"));
|
auto dock2 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MyDock2"));
|
||||||
auto widget2 = new MyWidget2();
|
auto widget2 = new MyWidget2();
|
||||||
dock2->setWidget(widget2);
|
dock2->setWidget(widget2);
|
||||||
|
|
||||||
auto dock3 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock3"));
|
auto dock3 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MyDock3"));
|
||||||
auto widget3 = new MyWidget3();
|
auto widget3 = new MyWidget3();
|
||||||
dock3->setWidget(widget3);
|
dock3->setWidget(widget3);
|
||||||
|
|
||||||
|
// Just for my personal testing: Overkill to add an option
|
||||||
|
// widget3->blockCloseEvent();
|
||||||
|
|
||||||
// # 3. Dock them
|
// # 3. Dock them
|
||||||
mainWindow.addDockWidget(dock1, QPoint(10, 10));
|
mainWindow.addDockWidget(dock1, QPoint(10, 10));
|
||||||
mainWindow.addDockWidget(dock2, QPoint(50, 50));
|
mainWindow.addDockWidget(dock2, QPoint(50, 50));
|
||||||
32
examples/mdi_with_docking/CMakeLists.txt
Normal file
32
examples/mdi_with_docking/CMakeLists.txt
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#
|
||||||
|
# This file is part of KDDockWidgets.
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2019-2022 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(qtwidgets_mdi_with_docking)
|
||||||
|
|
||||||
|
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(qtwidgets_mdi_with_docking main.cpp ../dockwidgets/MyWidget.cpp ${RESOURCES_EXAMPLE_SRC})
|
||||||
|
|
||||||
|
target_link_libraries(qtwidgets_mdi_with_docking PRIVATE KDAB::kddockwidgets)
|
||||||
94
examples/mdi_with_docking/main.cpp
Normal file
94
examples/mdi_with_docking/main.cpp
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
|
SPDX-FileCopyrightText: 2019-2022 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/MainWindow.h>
|
||||||
|
#include <kddockwidgets/DockWidget.h>
|
||||||
|
#include <kddockwidgets/views/MDIArea_qtwidgets.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"));
|
||||||
|
|
||||||
|
KDDockWidgets::initFrontend(KDDockWidgets::FrontendType::QtWidgets);
|
||||||
|
|
||||||
|
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::Views::MainWindow_qtwidgets 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::Views::DockWidget_qtwidgets(QStringLiteral("MyDock1"));
|
||||||
|
auto widget1 = new MyWidget1();
|
||||||
|
dock1->setWidget(widget1);
|
||||||
|
|
||||||
|
auto dock2 = new KDDockWidgets::Views::DockWidget_qtwidgets(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::DockWidgetOptions options = {};
|
||||||
|
if (parser.isSet(nestedDocking)) {
|
||||||
|
options |= KDDockWidgets::DockWidgetOption_MDINestable;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Create our MDI widgets, which will go into the MDI area
|
||||||
|
auto mdiWidget1 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MDI widget1"), options);
|
||||||
|
mdiWidget1->setWidget(new MyWidget1());
|
||||||
|
|
||||||
|
auto mdiWidget2 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MDI widget2"), options);
|
||||||
|
mdiWidget2->setWidget(new MyWidget2());
|
||||||
|
|
||||||
|
auto mdiWidget3 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MDI widget3"), options);
|
||||||
|
mdiWidget3->setWidget(new MyWidget3());
|
||||||
|
|
||||||
|
auto mdiArea = new KDDockWidgets::Views::MDIArea_qtwidgets();
|
||||||
|
mainWindow.setPersistentCentralWidget(mdiArea);
|
||||||
|
|
||||||
|
mdiArea->addDockWidget(mdiWidget1, QPoint(10, 10));
|
||||||
|
mdiArea->addDockWidget(mdiWidget2, QPoint(50, 50));
|
||||||
|
mdiArea->addDockWidget(mdiWidget3, QPoint(110, 110));
|
||||||
|
|
||||||
|
return app.exec();
|
||||||
|
}
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of KDDockWidgets.
|
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
|
||||||
|
|
||||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "MyWidget.h"
|
|
||||||
|
|
||||||
#include <QPainter>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QFile>
|
|
||||||
#include <QLineEdit>
|
|
||||||
|
|
||||||
static QHash<QString, QImage> s_images; /// clazy:exclude=non-pod-global-static
|
|
||||||
|
|
||||||
MyWidget::MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent)
|
|
||||||
: QWidget(parent)
|
|
||||||
{
|
|
||||||
if (!backgroundFile.isEmpty()) {
|
|
||||||
auto it = s_images.find(backgroundFile);
|
|
||||||
if (it == s_images.end())
|
|
||||||
it = s_images.insert(backgroundFile, QImage(backgroundFile));
|
|
||||||
m_background = it.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!logoFile.isEmpty()) {
|
|
||||||
auto it = s_images.find(logoFile);
|
|
||||||
if (it == s_images.end())
|
|
||||||
it = s_images.insert(logoFile, QImage(logoFile));
|
|
||||||
m_logo = it.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
setFocusPolicy(Qt::StrongFocus);
|
|
||||||
#if 0
|
|
||||||
// Uncomment to show focus propagation working
|
|
||||||
new QLineEdit(this);
|
|
||||||
auto l2 = new QLineEdit(this);
|
|
||||||
l2->move(0, 100);
|
|
||||||
setFocusProxy(l2);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
MyWidget::~MyWidget()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyWidget::drawLogo(QPainter &p)
|
|
||||||
{
|
|
||||||
if (m_logo.isNull())
|
|
||||||
return;
|
|
||||||
|
|
||||||
const qreal ratio = m_logo.height() / (m_logo.width() * 1.0);
|
|
||||||
|
|
||||||
const int maxWidth = int(0.80 * size().width());
|
|
||||||
const int maxHeight = int(0.80 * size().height());
|
|
||||||
|
|
||||||
const int proposedHeight = int(maxWidth * ratio);
|
|
||||||
|
|
||||||
const int width = proposedHeight <= maxHeight ? maxWidth
|
|
||||||
: int(maxHeight / ratio);
|
|
||||||
|
|
||||||
const int height = int(width * ratio);
|
|
||||||
QRect targetLogoRect(0,0, width, height);
|
|
||||||
targetLogoRect.moveCenter(rect().center() + QPoint(0, -int(size().height() * 0.00)));
|
|
||||||
p.drawImage(targetLogoRect, m_logo, m_logo.rect());
|
|
||||||
}
|
|
||||||
|
|
||||||
MyWidget1::MyWidget1(MyWidget::QWidget *parent)
|
|
||||||
: MyWidget(QStringLiteral(":/assets/triangles.png"), QStringLiteral(":/assets/KDAB_bubble_white.png"), parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyWidget1::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
QPainter p(this);
|
|
||||||
p.fillRect(rect(), QColor(0xCC, 0xCC, 0xCC));
|
|
||||||
p.drawImage(m_background.rect(), m_background, m_background.rect());
|
|
||||||
|
|
||||||
drawLogo(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
MyWidget2::MyWidget2(MyWidget::QWidget *parent)
|
|
||||||
: MyWidget(QString(), QStringLiteral(":/assets/KDAB_bubble_blue.png"), parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyWidget2::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
QPainter p(this);
|
|
||||||
p.fillRect(rect(), Qt::white);
|
|
||||||
drawLogo(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
MyWidget3::MyWidget3(MyWidget::QWidget *parent)
|
|
||||||
: MyWidget(QStringLiteral(":/assets/base.png"), QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"), parent)
|
|
||||||
, m_triangle(QImage(QStringLiteral(":/assets/tri.png")))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyWidget3::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
QPainter p(this);
|
|
||||||
p.fillRect(rect(), QColor(0xD5, 0xD5, 0xD5));
|
|
||||||
|
|
||||||
p.drawImage(m_background.rect(), m_background, m_background.rect());
|
|
||||||
|
|
||||||
const QRect targetRect = QRect({ width() - m_triangle.width(), height() - m_triangle.height() }, m_triangle.size());
|
|
||||||
|
|
||||||
p.drawImage(targetRect, m_triangle, m_triangle.rect());
|
|
||||||
drawLogo(p);
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of KDDockWidgets.
|
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
|
||||||
|
|
||||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef EXAMPLEDOCKABLEWIDGET_H
|
|
||||||
#define EXAMPLEDOCKABLEWIDGET_H
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
class QPainter;
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
class MyWidget : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
MyWidget() = default;
|
|
||||||
explicit MyWidget(const QString &backgroundFile, const QString &logoFile, QWidget *parent = nullptr);
|
|
||||||
~MyWidget();
|
|
||||||
protected:
|
|
||||||
void drawLogo(QPainter &);
|
|
||||||
QImage m_background;
|
|
||||||
QImage m_logo;
|
|
||||||
};
|
|
||||||
|
|
||||||
class MyWidget1 : public MyWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit MyWidget1(QWidget *parent = nullptr);
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent*) override;
|
|
||||||
};
|
|
||||||
|
|
||||||
class MyWidget2 : public MyWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit MyWidget2(QWidget *parent = nullptr);
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent*) override;
|
|
||||||
};
|
|
||||||
|
|
||||||
class MyWidget3 : public MyWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit MyWidget3(QWidget *parent = nullptr);
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent*) override;
|
|
||||||
QImage m_triangle;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -10,28 +10,20 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
project(kddockwidgets_minimal_example)
|
project(qtwidgets_minimal)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||||
|
|
||||||
if(NOT TARGET kddockwidgets)
|
if(NOT TARGET kddockwidgets)
|
||||||
# This will look for Qt, do find_package yourself manually before
|
# This will look for Qt, do find_package yourself manually before if you want
|
||||||
# if you want to look for a specific Qt version for instance.
|
# to look for a specific Qt version for instance.
|
||||||
find_package(KDDockWidgets REQUIRED)
|
find_package(KDDockWidgets REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/resources_example.qrc)
|
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dockwidgets/resources_example.qrc)
|
||||||
|
|
||||||
add_executable(kddockwidgets_minimal_example
|
add_executable(qtwidgets_minimal main.cpp MyWidget.cpp ${RESOURCES_EXAMPLE_SRC})
|
||||||
main.cpp
|
|
||||||
../dockwidgets/MyWidget.cpp
|
|
||||||
${RESOURCES_EXAMPLE_SRC}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(kddockwidgets_minimal_example
|
|
||||||
PRIVATE
|
|
||||||
KDAB::kddockwidgets
|
|
||||||
)
|
|
||||||
|
|
||||||
|
target_link_libraries(qtwidgets_minimal PRIVATE KDAB::kddockwidgets)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
#include "MyWidget.h"
|
#include "MyWidget.h"
|
||||||
|
|
||||||
#include <kddockwidgets/DockWidget.h>
|
|
||||||
#include <kddockwidgets/MainWindow.h>
|
#include <kddockwidgets/MainWindow.h>
|
||||||
|
#include <kddockwidgets/DockWidget.h>
|
||||||
|
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
@@ -28,41 +28,42 @@ int main(int argc, char **argv)
|
|||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#endif
|
#endif
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
app.setOrganizationName(QStringLiteral("KDAB"));
|
app.setOrganizationName(QStringLiteral("KDAB"));
|
||||||
app.setApplicationName(QStringLiteral("Test app"));
|
app.setApplicationName(QStringLiteral("Test app"));
|
||||||
|
|
||||||
|
KDDockWidgets::initFrontend(KDDockWidgets::FrontendType::QtWidgets);
|
||||||
|
|
||||||
// Fusion looks better in general, but feel free to change
|
// Fusion looks better in general, but feel free to change
|
||||||
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
qApp->setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
||||||
|
|
||||||
// # 1. Create our main window
|
// # 1. Create our main window
|
||||||
|
|
||||||
KDDockWidgets::MainWindow mainWindow(QStringLiteral("MyMainWindow"));
|
KDDockWidgets::Views::MainWindow_qtwidgets mainWindow(QStringLiteral("MyMainWindow"));
|
||||||
mainWindow.setWindowTitle("Main Window");
|
mainWindow.setWindowTitle("Main Window");
|
||||||
mainWindow.resize(1200, 1200);
|
mainWindow.resize(1200, 1200);
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
|
|
||||||
// # 2. Create a dock widget, it needs a unique name
|
// # 2. Create a dock widget, it needs a unique name
|
||||||
auto dock1 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock1"));
|
auto dock1 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MyDock1"));
|
||||||
auto widget1 = new MyWidget();
|
auto widget1 = new MyWidget();
|
||||||
dock1->setWidget(widget1);
|
dock1->setWidget(widget1);
|
||||||
|
|
||||||
auto dock2 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock2"));
|
auto dock2 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MyDock2"));
|
||||||
auto widget2 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
auto widget2 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
||||||
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
||||||
dock2->setWidget(widget2);
|
dock2->setWidget(widget2);
|
||||||
|
|
||||||
auto dock3 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock3"));
|
auto dock3 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MyDock3"));
|
||||||
auto widget3 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
auto widget3 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
||||||
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
||||||
dock3->setWidget(widget3);
|
dock3->setWidget(widget3);
|
||||||
|
|
||||||
auto dock4 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock4"));
|
auto dock4 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MyDock4"));
|
||||||
auto widget4 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
auto widget4 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
||||||
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
||||||
dock4->setWidget(widget4);
|
dock4->setWidget(widget4);
|
||||||
|
|
||||||
auto dock5 = new KDDockWidgets::DockWidget(QStringLiteral("MyDock5"));
|
auto dock5 = new KDDockWidgets::Views::DockWidget_qtwidgets(QStringLiteral("MyDock5"));
|
||||||
auto widget5 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
auto widget5 = new MyWidget(QStringLiteral(":/assets/base.png"),
|
||||||
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
QStringLiteral(":/assets/KDAB_bubble_fulcolor.png"));
|
||||||
dock5->setWidget(widget5);
|
dock5->setWidget(widget5);
|
||||||
@@ -75,8 +76,9 @@ int main(int argc, char **argv)
|
|||||||
mainWindow.addDockWidget(dock3, KDDockWidgets::Location_OnRight, dock2);
|
mainWindow.addDockWidget(dock3, KDDockWidgets::Location_OnRight, dock2);
|
||||||
|
|
||||||
// 5. dock4 is docked at the bottom, with 200px height
|
// 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);
|
mainWindow.addDockWidget(dock4, KDDockWidgets::Location_OnBottom,
|
||||||
|
nullptr, preferredSize);
|
||||||
|
|
||||||
|
|
||||||
// 5. dock5 will be its own top level (floating window)
|
// 5. dock5 will be its own top level (floating window)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -8,10 +8,18 @@
|
|||||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||||
#
|
#
|
||||||
|
|
||||||
add_subdirectory(customtitlebar)
|
|
||||||
add_subdirectory(dockwidgets)
|
add_subdirectory(dockwidgets)
|
||||||
add_subdirectory(mdi)
|
set_compiler_flags(qtquick_dockwidgets)
|
||||||
|
set_target_properties(
|
||||||
|
qtquick_dockwidgets PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples/"
|
||||||
|
)
|
||||||
|
|
||||||
set_compiler_flags(kddockwidgets_example_quick)
|
add_subdirectory(mdi)
|
||||||
set_compiler_flags(kddockwidgets_example_mdi_quick)
|
set_compiler_flags(qtquick_mdi)
|
||||||
set_compiler_flags(kddockwidgets_customtitlebar_quick)
|
set_target_properties(qtquick_mdi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples/")
|
||||||
|
|
||||||
|
add_subdirectory(customtitlebar)
|
||||||
|
set_compiler_flags(qtquick_customtitlebar)
|
||||||
|
set_target_properties(
|
||||||
|
qtquick_customtitlebar PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples/"
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -10,28 +10,22 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
project(kddockwidgets_customtitlebar_quick)
|
project(qtquick_customtitlebar)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||||
|
|
||||||
if(NOT TARGET kddockwidgets)
|
if(NOT TARGET kddockwidgets)
|
||||||
# This will look for Qt, do find_package yourself manually before
|
# This will look for Qt, do find_package yourself manually before if you want
|
||||||
# if you want to look for a specific Qt version for instance.
|
# to look for a specific Qt version for instance.
|
||||||
find_package(KDDockWidgets REQUIRED)
|
find_package(KDDockWidgets REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RESOURCES_EXAMPLE_SRC
|
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_example.qrc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_example.qrc
|
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc)
|
|
||||||
|
|
||||||
add_executable(kddockwidgets_customtitlebar_quick
|
|
||||||
main.cpp
|
|
||||||
${RESOURCES_EXAMPLE_SRC}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(kddockwidgets_customtitlebar_quick
|
add_executable(qtquick_customtitlebar main.cpp ${RESOURCES_EXAMPLE_SRC})
|
||||||
PRIVATE
|
|
||||||
KDAB::kddockwidgets
|
target_link_libraries(qtquick_customtitlebar PRIVATE KDAB::kddockwidgets)
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
import QtQuick 2.6
|
import QtQuick 2.6
|
||||||
|
|
||||||
// Will be moved to a plugin in the future
|
// Will be moved to a plugin in the future, if there's enough demand
|
||||||
import "qrc:/kddockwidgets/private/quick/qml/" as KDDW
|
import "qrc:/kddockwidgets/qtquick/views/qml/" as KDDW
|
||||||
|
|
||||||
KDDW.TitleBarBase {
|
KDDW.TitleBarBase {
|
||||||
id: root
|
id: root
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,19 +11,21 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <kddockwidgets/Config.h>
|
#include <kddockwidgets/Config.h>
|
||||||
#include <kddockwidgets/DockWidgetQuick.h>
|
#include <kddockwidgets/views/DockWidget_qtquick.h>
|
||||||
#include <kddockwidgets/private/DockRegistry_p.h>
|
#include <kddockwidgets/Platform_qtquick.h>
|
||||||
#include <kddockwidgets/FrameworkWidgetFactory.h>
|
#include <kddockwidgets/ViewFactory_qtquick.h>
|
||||||
|
#include <kddockwidgets/private/DockRegistry.h>
|
||||||
|
#include <kddockwidgets/views/MainWindow_qtquick.h>
|
||||||
|
|
||||||
|
|
||||||
#include <QQuickView>
|
#include <QQuickView>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
|
|
||||||
class CustomFrameworkWidgetFactory : public KDDockWidgets::DefaultWidgetFactory
|
class CustomViewFactory : public KDDockWidgets::ViewFactory_qtquick
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
~CustomViewFactory() override;
|
||||||
~CustomFrameworkWidgetFactory() override;
|
|
||||||
|
|
||||||
QUrl titleBarFilename() const override
|
QUrl titleBarFilename() const override
|
||||||
{
|
{
|
||||||
@@ -31,7 +33,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CustomFrameworkWidgetFactory::~CustomFrameworkWidgetFactory() = default;
|
CustomViewFactory::~CustomViewFactory() = default;
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@@ -39,34 +41,37 @@ int main(int argc, char *argv[])
|
|||||||
QGuiApplication::setAttribute(Qt::AA_UseOpenGLES);
|
QGuiApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||||
#endif
|
#endif
|
||||||
QGuiApplication app(argc, argv);
|
QGuiApplication app(argc, argv);
|
||||||
|
KDDockWidgets::initFrontend(KDDockWidgets::FrontendType::QtQuick);
|
||||||
|
|
||||||
auto &config = KDDockWidgets::Config::self();
|
auto &config = KDDockWidgets::Config::self();
|
||||||
auto flags = config.flags();
|
auto flags = config.flags();
|
||||||
|
|
||||||
config.setFlags(flags);
|
config.setFlags(flags);
|
||||||
config.setFrameworkWidgetFactory(new CustomFrameworkWidgetFactory());
|
config.setViewFactory(new CustomViewFactory());
|
||||||
|
|
||||||
QQmlApplicationEngine appEngine;
|
QQmlApplicationEngine appEngine;
|
||||||
KDDockWidgets::Config::self().setQmlEngine(&appEngine);
|
KDDockWidgets::Platform_qtquick::instance()->setQmlEngine(&appEngine);
|
||||||
appEngine.load((QUrl("qrc:/main.qml")));
|
appEngine.load((QUrl("qrc:/main.qml")));
|
||||||
|
|
||||||
auto dw1 = new KDDockWidgets::DockWidgetQuick("Dock #1");
|
auto dw1 = new KDDockWidgets::Views::DockWidget_qtquick("Dock #1");
|
||||||
|
|
||||||
dw1->setWidget(QStringLiteral("qrc:/Guest1.qml"));
|
dw1->setGuestItem(QStringLiteral("qrc:/Guest1.qml"));
|
||||||
dw1->resize(QSize(800, 800));
|
dw1->resize(QSize(800, 800));
|
||||||
dw1->show();
|
dw1->show();
|
||||||
|
|
||||||
auto dw2 = new KDDockWidgets::DockWidgetQuick("Dock #2");
|
auto dw2 = new KDDockWidgets::Views::DockWidget_qtquick("Dock #2");
|
||||||
dw2->setWidget(QStringLiteral("qrc:/Guest2.qml"));
|
dw2->setGuestItem(QStringLiteral("qrc:/Guest2.qml"));
|
||||||
dw2->resize(QSize(800, 800));
|
dw2->resize(QSize(800, 800));
|
||||||
dw2->show();
|
dw2->show();
|
||||||
|
|
||||||
auto dw3 = new KDDockWidgets::DockWidgetQuick("Dock #3");
|
auto dw3 = new KDDockWidgets::Views::DockWidget_qtquick("Dock #3");
|
||||||
dw3->setWidget(QStringLiteral("qrc:/Guest3.qml"));
|
dw3->setGuestItem(QStringLiteral("qrc:/Guest3.qml"));
|
||||||
|
|
||||||
dw1->addDockWidgetToContainingWindow(dw3, KDDockWidgets::Location_OnRight);
|
dw1->addDockWidgetToContainingWindow(dw3, KDDockWidgets::Location_OnRight);
|
||||||
|
|
||||||
KDDockWidgets::MainWindowBase *mainWindow = KDDockWidgets::DockRegistry::self()->mainwindows().constFirst();
|
// Access the main area we created in QML with DockingArea {}
|
||||||
mainWindow->addDockWidget(dw2, KDDockWidgets::Location_OnTop);
|
auto mainArea = KDDockWidgets::DockRegistry::self()->mainDockingAreas().constFirst();
|
||||||
|
mainArea->addDockWidget(dw2, KDDockWidgets::Location_OnTop);
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,14 +11,14 @@
|
|||||||
|
|
||||||
import QtQuick 2.6
|
import QtQuick 2.6
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import com.kdab.dockwidgets 1.0 as KDDW
|
import com.kdab.dockwidgets 2.0 as KDDW
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
visible: true
|
visible: true
|
||||||
width: 1000
|
width: 1000
|
||||||
height: 800
|
height: 800
|
||||||
|
|
||||||
KDDW.MainWindowLayout {
|
KDDW.DockingArea {
|
||||||
id: dockWidgetArea
|
id: dockWidgetArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -10,28 +10,22 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
project(kddockwidgets_example_quick)
|
project(qtquick_dockwidgets)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||||
|
|
||||||
if(NOT TARGET kddockwidgets)
|
if(NOT TARGET kddockwidgets)
|
||||||
# This will look for Qt, do find_package yourself manually before
|
# This will look for Qt, do find_package yourself manually before if you want
|
||||||
# if you want to look for a specific Qt version for instance.
|
# to look for a specific Qt version for instance.
|
||||||
find_package(KDDockWidgets REQUIRED)
|
find_package(KDDockWidgets REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RESOURCES_EXAMPLE_SRC
|
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_example.qrc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_example.qrc
|
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc)
|
|
||||||
|
|
||||||
add_executable(kddockwidgets_example_quick
|
|
||||||
main.cpp
|
|
||||||
${RESOURCES_EXAMPLE_SRC}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(kddockwidgets_example_quick
|
add_executable(qtquick_dockwidgets main.cpp ${RESOURCES_EXAMPLE_SRC})
|
||||||
PRIVATE
|
|
||||||
KDAB::kddockwidgets
|
target_link_libraries(qtquick_dockwidgets PRIVATE KDAB::kddockwidgets)
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import com.kdab.dockwidgets 1.0 as KDDW
|
import com.kdab.dockwidgets 2.0 as KDDW
|
||||||
|
|
||||||
Guest {
|
Guest {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,9 +11,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <kddockwidgets/Config.h>
|
#include <kddockwidgets/Config.h>
|
||||||
#include <kddockwidgets/DockWidgetQuick.h>
|
#include <kddockwidgets/private/DockRegistry.h>
|
||||||
#include <kddockwidgets/private/DockRegistry_p.h>
|
#include <kddockwidgets/ViewFactory.h>
|
||||||
#include <kddockwidgets/FrameworkWidgetFactory.h>
|
#include <kddockwidgets/Platform_qtquick.h>
|
||||||
|
#include <kddockwidgets/views/DockWidget_qtquick.h>
|
||||||
|
#include "kddockwidgets/views/MainWindow_qtquick.h"
|
||||||
|
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
@@ -29,26 +31,37 @@ int main(int argc, char *argv[])
|
|||||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#endif
|
#endif
|
||||||
QGuiApplication app(argc, argv);
|
QGuiApplication app(argc, argv);
|
||||||
|
|
||||||
|
KDDockWidgets::initFrontend(KDDockWidgets::FrontendType::QtQuick);
|
||||||
|
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
parser.setApplicationDescription("KDDockWidgets example application");
|
parser.setApplicationDescription("KDDockWidgets example application");
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
|
|
||||||
|
QCommandLineOption noTitleBars("t", QCoreApplication::translate("main", "Hide titlebars when tabs are visible"));
|
||||||
|
parser.addOption(noTitleBars);
|
||||||
|
|
||||||
|
QCommandLineOption alwaysTabs("z", QCoreApplication::translate("main", "Show tabs even if there's only one"));
|
||||||
|
parser.addOption(alwaysTabs);
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
QCommandLineOption nativeTitleBar("native-title-bar", QCoreApplication::translate("main", "(internal) FloatingWindows a native title bar"));
|
||||||
|
parser.addOption(nativeTitleBar);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(DOCKS_DEVELOPER_MODE)
|
#if defined(DOCKS_DEVELOPER_MODE)
|
||||||
QCommandLineOption noQtTool("no-qttool", QCoreApplication::translate("main", "(internal) Don't use Qt::Tool"));
|
QCommandLineOption noQtTool("no-qttool", QCoreApplication::translate("main", "(internal) Don't use Qt::Tool"));
|
||||||
QCommandLineOption noParentForFloating("no-parent-for-floating", QCoreApplication::translate("main", "(internal) FloatingWindows won't have a parent"));
|
QCommandLineOption noParentForFloating("no-parent-for-floating", QCoreApplication::translate("main", "(internal) FloatingWindows won't have a parent"));
|
||||||
QCommandLineOption nativeTitleBar("native-title-bar", QCoreApplication::translate("main", "(internal) FloatingWindows a native title bar"));
|
|
||||||
QCommandLineOption noDropIndicators("no-drop-indicators", QCoreApplication::translate("main", "(internal) Don't use any drop indicators"));
|
QCommandLineOption noDropIndicators("no-drop-indicators", QCoreApplication::translate("main", "(internal) Don't use any drop indicators"));
|
||||||
|
|
||||||
parser.addOption(noQtTool);
|
parser.addOption(noQtTool);
|
||||||
parser.addOption(noParentForFloating);
|
parser.addOption(noParentForFloating);
|
||||||
parser.addOption(nativeTitleBar);
|
|
||||||
parser.addOption(noDropIndicators);
|
parser.addOption(noDropIndicators);
|
||||||
|
|
||||||
# if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
QCommandLineOption noAeroSnap("no-aero-snap", QCoreApplication::translate("main", "(internal) Disable AeroSnap"));
|
QCommandLineOption noAeroSnap("no-aero-snap", QCoreApplication::translate("main", "(internal) Disable AeroSnap"));
|
||||||
parser.addOption(noAeroSnap);
|
parser.addOption(noAeroSnap);
|
||||||
# endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto flags = KDDockWidgets::Config::self().flags();
|
auto flags = KDDockWidgets::Config::self().flags();
|
||||||
@@ -63,49 +76,60 @@ int main(int argc, char *argv[])
|
|||||||
if (parser.isSet(noParentForFloating))
|
if (parser.isSet(noParentForFloating))
|
||||||
internalFlags |= KDDockWidgets::Config::InternalFlag_DontUseParentForFloatingWindows;
|
internalFlags |= KDDockWidgets::Config::InternalFlag_DontUseParentForFloatingWindows;
|
||||||
|
|
||||||
if (parser.isSet(nativeTitleBar))
|
if (parser.isSet(noDropIndicators))
|
||||||
flags |= KDDockWidgets::Config::Flag_NativeTitleBar;
|
KDDockWidgets::ViewFactory::s_dropIndicatorType = KDDockWidgets::DropIndicatorType::None;
|
||||||
else 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))
|
if (parser.isSet(noAeroSnap))
|
||||||
internalFlags |= KDDockWidgets::Config::InternalFlag_NoAeroSnap;
|
internalFlags |= KDDockWidgets::Config::InternalFlag_NoAeroSnap;
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
// These are debug-only/development flags, which you can ignore.
|
// These are debug-only/development flags, which you can ignore.
|
||||||
KDDockWidgets::Config::self().setInternalFlags(internalFlags);
|
KDDockWidgets::Config::self().setInternalFlags(internalFlags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
// On Linux the title bar doesn't send us NonClient mouse events
|
||||||
|
if (parser.isSet(nativeTitleBar))
|
||||||
|
flags |= KDDockWidgets::Config::Flag_NativeTitleBar;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (parser.isSet(noTitleBars))
|
||||||
|
flags |= KDDockWidgets::Config::Flag_HideTitleBarWhenTabsVisible;
|
||||||
|
|
||||||
|
if (parser.isSet(alwaysTabs))
|
||||||
|
flags |= KDDockWidgets::Config::Flag_AlwaysShowTabs;
|
||||||
|
|
||||||
// Set any required flags. The defaults are usually fine.
|
// Set any required flags. The defaults are usually fine.
|
||||||
KDDockWidgets::Config::self().setFlags(flags);
|
KDDockWidgets::Config::self().setFlags(flags);
|
||||||
|
|
||||||
// Create your engine which loads main.qml. A simple QQuickView would work too.
|
// Create your engine which loads main.qml. A simple QQuickView would work too.
|
||||||
QQmlApplicationEngine appEngine;
|
QQmlApplicationEngine appEngine;
|
||||||
KDDockWidgets::Config::self().setQmlEngine(&appEngine);
|
KDDockWidgets::Platform_qtquick::instance()->setQmlEngine(&appEngine);
|
||||||
appEngine.load((QUrl("qrc:/main.qml")));
|
appEngine.load((QUrl("qrc:/main.qml")));
|
||||||
|
|
||||||
// Below we illustrate usage of our C++ API. Alternative you can use declarative API.
|
// Below we illustrate usage of our C++ API. Alternative you can use declarative API.
|
||||||
// See main.qml for examples of dockwidgets created directly in QML
|
// See main.qml for examples of dockwidgets created directly in QML
|
||||||
|
|
||||||
auto dw1 = new KDDockWidgets::DockWidgetQuick("Dock #1");
|
auto dw1 = new KDDockWidgets::Views::DockWidget_qtquick("Dock #1");
|
||||||
|
|
||||||
dw1->setWidget(QStringLiteral("qrc:/Guest1.qml"));
|
dw1->setGuestItem(QStringLiteral("qrc:/Guest1.qml"));
|
||||||
dw1->resize(QSize(800, 800));
|
dw1->resize(QSize(800, 800));
|
||||||
dw1->show();
|
dw1->show();
|
||||||
|
|
||||||
auto dw2 = new KDDockWidgets::DockWidgetQuick("Dock #2");
|
auto dw2 = new KDDockWidgets::Views::DockWidget_qtquick("Dock #2");
|
||||||
dw2->setWidget(QStringLiteral("qrc:/Guest2.qml"));
|
dw2->setGuestItem(QStringLiteral("qrc:/Guest2.qml"));
|
||||||
dw2->resize(QSize(800, 800));
|
dw2->resize(QSize(800, 800));
|
||||||
dw2->show();
|
dw2->show();
|
||||||
|
|
||||||
auto dw3 = new KDDockWidgets::DockWidgetQuick("Dock #3");
|
auto dw3 = new KDDockWidgets::Views::DockWidget_qtquick("Dock #3");
|
||||||
dw3->setWidget(QStringLiteral("qrc:/Guest3.qml"));
|
dw3->setGuestItem(QStringLiteral("qrc:/Guest3.qml"));
|
||||||
|
|
||||||
dw1->addDockWidgetToContainingWindow(dw3, KDDockWidgets::Location_OnRight);
|
dw1->addDockWidgetToContainingWindow(dw3, KDDockWidgets::Location_OnRight);
|
||||||
|
|
||||||
KDDockWidgets::MainWindowBase *mainWindow = KDDockWidgets::DockRegistry::self()->mainwindows().constFirst();
|
// Access the main area we created in QML with DockingArea {}
|
||||||
mainWindow->addDockWidget(dw2, KDDockWidgets::Location_OnTop);
|
auto mainArea = KDDockWidgets::DockRegistry::self()->mainDockingAreas().constFirst();
|
||||||
|
mainArea->addDockWidget(dw2, KDDockWidgets::Location_OnTop);
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.6
|
import QtQuick 2.6
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import com.kdab.dockwidgets 1.0 as KDDW
|
import com.kdab.dockwidgets 2.0 as KDDW
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
visible: true
|
visible: true
|
||||||
@@ -73,7 +73,7 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KDDW.MainWindowLayout {
|
KDDW.DockingArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
// Each main layout needs a unique id
|
// Each main layout needs a unique id
|
||||||
@@ -109,6 +109,13 @@ ApplicationWindow {
|
|||||||
color: "black"
|
color: "black"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
KDDW.DockWidget {
|
||||||
|
id: dock7
|
||||||
|
uniqueName: "dock7"
|
||||||
|
Rectangle {
|
||||||
|
color: "green"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
// Add dock4 to the Bottom location
|
// Add dock4 to the Bottom location
|
||||||
@@ -122,6 +129,10 @@ ApplicationWindow {
|
|||||||
// See MainWindowInstantiator_p.h for the API
|
// See MainWindowInstantiator_p.h for the API
|
||||||
addDockWidget(dock6, KDDW.KDDockWidgets.Location_OnLeft, null,
|
addDockWidget(dock6, KDDW.KDDockWidgets.Location_OnLeft, null,
|
||||||
Qt.size(500, 100), KDDW.KDDockWidgets.StartHidden);
|
Qt.size(500, 100), KDDW.KDDockWidgets.StartHidden);
|
||||||
|
|
||||||
|
|
||||||
|
// dock7 will be tabbed with dock7:
|
||||||
|
dock5.addDockWidgetAsTab(dock7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of KDDockWidgets.
|
# This file is part of KDDockWidgets.
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2019-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
# SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -10,28 +10,22 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
project(kddockwidgets_example_mdi_quick)
|
project(qtquick_mdi)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
set(CMAKE_INCLUDE_CURRENT_DIRS ON)
|
||||||
|
|
||||||
if(NOT TARGET kddockwidgets)
|
if(NOT TARGET kddockwidgets)
|
||||||
# This will look for Qt, do find_package yourself manually before
|
# This will look for Qt, do find_package yourself manually before if you want
|
||||||
# if you want to look for a specific Qt version for instance.
|
# to look for a specific Qt version for instance.
|
||||||
find_package(KDDockWidgets REQUIRED)
|
find_package(KDDockWidgets REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RESOURCES_EXAMPLE_SRC
|
set(RESOURCES_EXAMPLE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_mdi_example.qrc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/resources_qtquick_mdi_example.qrc
|
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../dockwidgets/resources_example.qrc)
|
|
||||||
|
|
||||||
add_executable(kddockwidgets_example_mdi_quick
|
|
||||||
main.cpp
|
|
||||||
${RESOURCES_EXAMPLE_SRC}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(kddockwidgets_example_mdi_quick
|
add_executable(qtquick_mdi main.cpp ${RESOURCES_EXAMPLE_SRC})
|
||||||
PRIVATE
|
|
||||||
KDAB::kddockwidgets
|
target_link_libraries(qtquick_mdi PRIVATE KDAB::kddockwidgets)
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of KDDockWidgets.
|
This file is part of KDDockWidgets.
|
||||||
|
|
||||||
SPDX-FileCopyrightText: 2020-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||||
Author: Sergio Martins <sergio.martins@kdab.com>
|
Author: Sergio Martins <sergio.martins@kdab.com>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import com.kdab.dockwidgets 1.0 as KDDW
|
import com.kdab.dockwidgets 2.0 as KDDW
|
||||||
|
|
||||||
Guest {
|
Guest {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user